mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
update netcdf read function for THREDDS dataset
This commit is contained in:
parent
00a5290a22
commit
5aba94c0dd
29
.idea/inspectionProfiles/Project_Default.xml
generated
29
.idea/inspectionProfiles/Project_Default.xml
generated
@ -1011,9 +1011,30 @@
|
||||
<inspection_tool class="HtmlMissingClosingTag" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlTagCanBeJavadocTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownAnchorTarget" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="6">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownTarget" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlWrongAttributeValue" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="I18nForm" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
@ -1868,7 +1889,9 @@
|
||||
<inspection_tool class="ReplaceWithJavadoc" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||
<inspection_tool class="ReplaceWithOperatorAssignment" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ReplaceWithStringBuilderAppendRange" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="RequiredAttributes" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="RequiredAttributes" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myAdditionalRequiredHtmlAttributes" value="" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="RestRoleInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RestrictReturnStatementTargetMigration" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ResultOfObjectAllocationIgnored" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
|
||||
@ -36,8 +36,9 @@ public class Model extends TriMeshGraphic {
|
||||
* Set angle
|
||||
* @param value The angle
|
||||
*/
|
||||
public void setAngle(List<Float> value) {
|
||||
angle = new Vector3f(value.get(0), value.get(1), value.get(2));
|
||||
public void setAngle(List<Number> value) {
|
||||
angle = new Vector3f(value.get(0).floatValue(), value.get(1).floatValue(),
|
||||
value.get(2).floatValue());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,6 +57,15 @@ public class Model extends TriMeshGraphic {
|
||||
scale = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get radians angle
|
||||
* @return Radians
|
||||
*/
|
||||
public Vector3f getRadians() {
|
||||
return new Vector3f((float) Math.toRadians(angle.x), (float) Math.toRadians(angle.y),
|
||||
(float) Math.toRadians(angle.z));
|
||||
}
|
||||
|
||||
/**
|
||||
* Build triangle mesh graphic
|
||||
*/
|
||||
|
||||
@ -162,7 +162,7 @@ public class ModelRender extends JOGLGraphicRender {
|
||||
FloatBuffer fb = Buffers.newDirectFloatBuffer(16);
|
||||
Matrix4f modelView = new Matrix4f(this.modelViewMatrixR);
|
||||
modelView.scale(this.model.getScale());
|
||||
modelView.rotateXYZ(model.getAngle());
|
||||
modelView.rotateXYZ(model.getRadians());
|
||||
gl.glLoadMatrixf(modelView.get(fb));
|
||||
|
||||
if (useShader) {
|
||||
|
||||
@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream;
|
||||
public static String getVersion(){
|
||||
String version = GlobalUtil.class.getPackage().getImplementationVersion();
|
||||
if (version == null || version.equals("")) {
|
||||
version = "3.5.9";
|
||||
version = "3.5.10";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -55,7 +55,6 @@ import ucar.nc2.NetcdfFile;
|
||||
import ucar.nc2.NetcdfFileWriter;
|
||||
import ucar.nc2.NetcdfFiles;
|
||||
import ucar.nc2.dataset.NetcdfDataset;
|
||||
import ucar.nc2.dataset.NetcdfDatasets;
|
||||
import ucar.nc2.iosp.hdf5.H5header;
|
||||
import ucar.unidata.io.RandomAccessFile;
|
||||
|
||||
@ -397,7 +396,7 @@ public class NetCDFDataInfo extends DataInfo implements IGridDataInfo, IStationD
|
||||
try {
|
||||
this.setFileName(fileName);
|
||||
//ncDataset = NetcdfDatasets.openDataset(fileName);
|
||||
ncfile = NetcdfDatasets.openFile(fileName, null);
|
||||
ncfile = NetcdfDataset.openFile(fileName, null);
|
||||
readDataInfo(keepOpen);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NetCDFDataInfo.class.getName()).log(Level.SEVERE, null, ex);
|
||||
@ -3071,7 +3070,7 @@ public class NetCDFDataInfo extends DataInfo implements IGridDataInfo, IStationD
|
||||
public Array read(String varName, boolean unpack) {
|
||||
try {
|
||||
if (ncfile == null) {
|
||||
ncfile = NetcdfFile.open(this.getFileName());
|
||||
ncfile = NetcdfDataset.openFile(this.fileName, null);
|
||||
}
|
||||
ucar.nc2.Variable var = ncfile.findVariable(varName);
|
||||
if (var == null) {
|
||||
@ -3147,9 +3146,9 @@ public class NetCDFDataInfo extends DataInfo implements IGridDataInfo, IStationD
|
||||
public Array read(String varName, int[] origin, int[] size, int[] stride, boolean unpack) {
|
||||
try {
|
||||
if (ncfile == null) {
|
||||
//ncfile = NetcdfDataset.openFile(this.getFileName(), null);
|
||||
ncfile = NetcdfDataset.openFile(this.fileName, null);
|
||||
//ncfile = NetcdfFiles.open(this.fileName);
|
||||
ncfile = NetcdfFile.open(this.fileName);
|
||||
//ncfile = NetcdfFile.open(this.fileName);
|
||||
}
|
||||
ucar.nc2.Variable var = ncfile.findVariable(varName);
|
||||
if (var == null) {
|
||||
@ -3278,7 +3277,7 @@ public class NetCDFDataInfo extends DataInfo implements IGridDataInfo, IStationD
|
||||
public Array read(String varName, int[] origin, int[] size, boolean unpack) {
|
||||
try {
|
||||
if (ncfile == null) {
|
||||
ncfile = NetcdfFile.open(this.getFileName());
|
||||
ncfile = NetcdfDataset.openFile(this.fileName, null);
|
||||
}
|
||||
ucar.nc2.Variable var = ncfile.findVariable(varName);
|
||||
|
||||
@ -3362,7 +3361,7 @@ public class NetCDFDataInfo extends DataInfo implements IGridDataInfo, IStationD
|
||||
public Array read(String varName, String key) {
|
||||
try {
|
||||
if (ncfile == null) {
|
||||
ncfile = NetcdfFile.open(this.getFileName());
|
||||
ncfile = NetcdfDataset.openFile(this.fileName, null);
|
||||
}
|
||||
ucar.nc2.Variable var = ncfile.findVariable(varName);
|
||||
|
||||
|
||||
@ -1,34 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<MeteoInfo File="milconfig.xml" Type="configurefile">
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\meteo\calc">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart\axis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\patch"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript"/>
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model">
|
||||
<RecentFolder Folder="D:\Working\MIScript\cuace_dust"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\cuace_dust\py"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\cuace_dust\py\plot"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\mesh"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\test"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\web"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_Lion_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_airplane_line.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\potential_vorticity_baroclinic.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\frontogenesis.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\web\web_4.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_car_1.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_Lion_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_airplane_line.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\potential_vorticity_baroclinic.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\frontogenesis.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\io\web\web_4.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model\obj_car_1.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
@ -36,5 +34,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="-7,0" MainFormSize="1376,806"/>
|
||||
<Startup MainFormLocation="-7,-7" MainFormSize="1293,685"/>
|
||||
</MeteoInfo>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user