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> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.1.7</version> <version>3.2.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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