to version 3.2.0

This commit is contained in:
wyq 2021-10-14 14:33:07 +08:00
parent 7c636cbbbb
commit 8e6d7798fc
24 changed files with 44 additions and 28 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -65,7 +65,7 @@ import java.util.zip.ZipInputStream;
public static String getVersion(){
String version = GlobalUtil.class.getPackage().getImplementationVersion();
if (version == null || version.equals("")) {
version = "3.1.7";
version = "3.2.0";
}
return version;
}

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl">
<RecentFolder Folder="D:\Temp\test\emission"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\verification"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\io">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\traj"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\projection"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart\axes"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\pie"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\polar"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Temp\test\emission"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\netcdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
</Path>
<File>
<OpenedFiles>
@ -23,12 +23,18 @@
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sphere.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\mesh_peaks.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_cylinder_1.py"/>
<OpenedFile File="D:\Temp\test\emission\proj_nc4.py"/>
<OpenedFile File="D:\Temp\test\emission\test_read_wrfchem.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\ncwrite_nc4.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\deep_learning\classification\saturn.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sphere.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\mesh_peaks.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_cylinder_1.py"/>
<RecentFile File="D:\Temp\test\emission\proj_nc4.py"/>
<RecentFile File="D:\Temp\test\emission\test_read_wrfchem.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\ncwrite_nc4.py"/>
</RecentFiles>
</File>
<Font>
@ -36,5 +42,5 @@
</Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/>
<Startup MainFormLocation="-7,-7" MainFormSize="1293,693"/>
<Startup MainFormLocation="-7,0" MainFormSize="1421,870"/>
</MeteoInfo>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<artifactId>meteoinfo-lab</artifactId>
<packaging>jar</packaging>

View File

@ -440,7 +440,7 @@ class DimDataFile(object):
var.addattr('name', v.name)
else:
for attr in v.attributes:
var.addattr(attr.getName(), attr.getStringValue())
var.addattr(attr.getName(), attr.getValue())
#Create netCDF file
self.ncfile.create()

View File

@ -447,12 +447,19 @@ class DimVariable(object):
def addattr(self, attrname, attrvalue):
if self.attributes is None:
self.attributes = []
if isinstance(attrvalue, Array):
attrvalue = np.NDArray(attrvalue)
if isinstance(attrvalue, np.NDArray):
if attrvalue.size == 1:
attrvalue = attrvalue[0]
attr = Attribute(attrname, attrvalue)
else:
attr = Attribute(attrname, attrvalue._array)
else:
attr = Attribute(attrname, attrvalue)
self.attributes.append(attr)
if not self.ncvariable is None:

View File

@ -1,7 +1,7 @@
from org.meteoinfo.ndarray import DataType as JDataType
__all__ = [
'byte','char','int','integer','int32','int16','short','int64','long','float','float32','float64',
'byte','char','int','integer','int32','int16','short','int64','uint','long','float','float32','float64',
'double','str','string','complex','date','datetime'
]
@ -9,6 +9,7 @@ _dtype_dict = dict(byte = JDataType.BYTE,
char = JDataType.CHAR,
boolean = JDataType.BOOLEAN,
int = JDataType.INT,
uint = JDataType.UINT,
short = JDataType.SHORT,
long = JDataType.LONG,
float = JDataType.FLOAT,
@ -99,7 +100,7 @@ class DataType(object):
return 'b'
elif self.name == 'int16' or self.name == 'short':
return 'h'
elif self.name == 'int' or self.name == 'integer' or self.name == 'int32':
elif self.name == 'int' or self.name == 'integer' or self.name == 'int32' or self.name == 'uint':
return 'l'
elif self.name == 'int64' or self.name == 'long':
return 'q'
@ -124,7 +125,7 @@ class DataType(object):
if self.name == 'bool' or self.name == 'boolean':
return 'b'
elif self.name == 'int' or self.name == 'integer' or self.name == 'int32' or self.name == 'int16' or \
self.name == 'short' or self.name == 'int64' or self.name == 'long':
self.name == 'uint' or self.name == 'short' or self.name == 'int64' or self.name == 'long':
return 'i'
elif self.name == 'float' or self.name == 'float64' or self.name == 'double':
return 'f'
@ -169,6 +170,7 @@ class dtype(DataType):
bool = DataType('boolean')
boolean = DataType('boolean')
int = DataType('int')
uint = DataType('uint')
integer = DataType('int')
int32 = DataType('int')
int16 = DataType('short')
@ -211,6 +213,7 @@ int32 = DataType('int')
int16 = DataType('short')
short = DataType('short')
int64 = DataType('long')
uint = DataType('uint')
long = DataType('long')
float = DataType('float')
float32 = DataType('float')

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<artifactId>meteoinfo-map</artifactId>
<packaging>jar</packaging>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId>
<version>3.1.7</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
<packaging>pom</packaging>
<parent>