CEMPD / VERDI

This is the repo for the VERDI project, written in java.
GNU General Public License v3.0
16 stars 13 forks source link

Ability to plot "zgrid" data #257

Closed cwsimmon closed 7 months ago

cwsimmon commented 3 years ago

Requested by Russ Bullock

When tile plotting the 2-m temperature data from MPAS, the data probe shows “(lon, lat, z)” information. I noticed some negative values for “z” in certain cells (e.g., south of the Himalayas) that are not below sea level. I could not investigate these negative values using Verdi because it cannot plot layer interface heights even though the zgrid array is input to plot 3-d variables. Using other methods, I was able to verify that negative z values were indeed in the zgrid array created for the MPAS data I was analyzing. However, this illustrated the need for Verdi to be able to plot “zgrid” data.

yadongxuEPA commented 2 years ago

Retested with VERDI_2.1.4_linux64_20220526.tar.gz on Atmos, could not found the plotting "zgrid" functionality added for MPAS files. The "Vertical Cross Section" tab was greyed out (disabled). Tony, please tell us where you added the plotting "zgrid" feature.

yadongxuEPA commented 2 years ago

Retested with VERDI_2.1.4_linux64_20220706.tar.gz on Atmos, found that this issue is partially resolved. To reproduce: Step 1: load data file "UV_only.2016-07-04.nc" Step 2: double click on "zgrid" variable Step 3: create a tile plot (shown as below) VERDI_testing_issue_257_1 We can see that now "zgrid" is listed under variables and user can plot a tile plot for "zgrid". But the color map scale is not ideal, the maximum "mMSL" value is shown at the bottom and the automatic color scale should reflect this range.
The tile plot seems displaying "zgrid" correctly after setting up a customized color scale. VERDI_testing_issue_257_2

yadongxuEPA commented 2 years ago

Retested with VERDI_2.1.4_win64_20220706.zip on a Windows 10 PC with another data file "history_qv_only.2016-07-04_00UTC.nc", was able to create a tile plot for "zgrid" variable but the automatic color map scale is not ideal.

VERDI_testing_issue_257_on_Win64_1 VERDI_testing_issue_257_on_Win64_2
systemsgo commented 2 years ago

Not much we can do about this in the near term. There are a few cells with a maximum value of 30000, which forces the automatic scaling to include it in the range. Maybe we can consider other algorithms that consider the data distribution when calculating color scale, although we probably don't want to enable something like that by default.

yadongxuEPA commented 2 years ago

Not much we can do about this in the near term. There are a few cells with a maximum value of 30000, which forces the automatic scaling to include it in the range. Maybe we can consider other algorithms that consider the data distribution when calculating color scale, although we probably don't want to enable something like that by default.

Hi Tony, If there are a few cells with a maximum value of 30000, I am wondering why at the bottom of the tile plot showed the "Max(78.321,35.338) = 5424" ?

Thanks, Yadong

lizadams commented 2 years ago

UV_only.2016-07-04.nc Downloaded the file from the following google drive: https://drive.google.com/drive/u/1/folders/1ykwOX9h7YwB07bX7fD7wNOmCkLOJPSDb

./verdi.sh -f $cwd/data/model/UV_only.2016-07-04.nc -s "zgrid[1]"

The min and max values are set for the total number of timesteps and layers. So the 51 layer has the maximum value of 30000, which is causing the default maximum value.

Screen Shot 2022-07-20 at 1 04 53 PM

VERDI is able to create a tile plot of the zgrid variable.

lizadams commented 2 years ago

Also tested with VERDI_2.1.4_win64_20220720.zip Confirmed that VERDI is able to create a tile plot for the zgrid variable, and you can increment the layers.

lizadams commented 1 year ago

Tested with VERDI_2.1.4_mac_20221007.tar.gz

If I try to create the tile plot with the script, it gives an error.

./verdi.sh -f $cwd/data/model/MPAS/UV_only.2016-07-04.nc -s "zgrid[1]" -g tile in netcdfdataset.java openDataset 1 arguments in netcdfdataset.java openDataset 3 arguments in netcdfdataset.java ready to return openDataset 5 arguments 2022.10.13 16:27:34.867 [main] ERROR anl.verdi.commandline.ScriptHandler - Error in ScriptHandler.dataMap.put 'G' java.lang.NullPointerException: Cannot invoke "anl.verdi.data.DataFrameAxis.getOrigin()" because the return value of "anl.verdi.data.Axes.getTimeAxis()" is null at anl.verdi.commandline.ScriptHandler$14.run(ScriptHandler.java:579) [core.jar:?] at anl.verdi.commandline.ScriptHandler.handleOptions(ScriptHandler.java:1520) [core.jar:?] at anl.verdi.commandline.ScriptHandler.run(ScriptHandler.java:167) [core.jar:?] at anl.verdi.core.VerdiPlugin.run(VerdiPlugin.java:168) [core.jar:?] at saf.core.runtime.CorePlugin.runApplicationRunnable(CorePlugin.java:93) [saf.core.runtime.jar:?] at saf.core.runtime.CorePlugin.run(CorePlugin.java:48) [saf.core.runtime.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at saf.core.runtime.Boot.run(Boot.java:178) [saf.core.runtime.jar:?] at saf.core.runtime.Boot.main(Boot.java:388) [saf.core.runtime.jar:?]

If I load the file and the variable into VERDI and then select the tile plot in the gui, it works.

Screen Shot 2022-10-13 at 12 30 04 PM
yadongxuEPA commented 1 year ago

Retested with VERDI_2.1.4_linux64_20221007.tar.gz on Atmos, found the same issue when use command line to create tile plot for "zgrid" as Liz described above. We will try to fix this in our next release.
image

yadongxuEPA commented 8 months ago

Checked VERDI_2.1.5_linux64_20231222.tar.gz on Atmos, found the same issue in these builds. Below is the error message in the command window: testing_Github_issue_257_error

lizadams commented 8 months ago

The command line optino is not working correctly, to create a tile plot from the zgrid variable, and gives the error below. However, VERDI GUI can be used to select zgrid and then create the tile plot. ./verdi.command -f $cwd/../mpas_UV_only.2016-07-04.nc -s "zgrid[1]" -g tile in netcdfdataset.java openDataset 1 arguments in netcdfdataset.java openDataset 3 arguments in netcdfdataset.java ready to return openDataset 5 arguments 2024.01.04 19:41:28.988 [main] ERROR anl.verdi.commandline.ScriptHandler - Error in ScriptHandler.dataMap.put 'G' java.lang.NullPointerException: Cannot invoke "anl.verdi.data.DataFrameAxis.getOrigin()" because the return value of "anl.verdi.data.Axes.getTimeAxis()" is null at anl.verdi.commandline.ScriptHandler$14.run(ScriptHandler.java:579) [core.jar:?] at anl.verdi.commandline.ScriptHandler.handleOptions(ScriptHandler.java:1525) [core.jar:?] at anl.verdi.commandline.ScriptHandler.run(ScriptHandler.java:167) [core.jar:?] at anl.verdi.core.VerdiPlugin.run(VerdiPlugin.java:168) [core.jar:?] at saf.core.runtime.CorePlugin.runApplicationRunnable(CorePlugin.java:93) [saf.core.runtime.jar:?] at saf.core.runtime.CorePlugin.run(CorePlugin.java:48) [saf.core.runtime.jar:?] at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at saf.core.runtime.Boot.run(Boot.java:178) [saf.core.runtime.jar:?] at saf.core.runtime.Boot.main(Boot.java:388) [saf.core.runtime.jar:?] I am getting the following plot, when I use the GUI to select the zgrid variable and create the tile plot, and then change the max value in the legend to 6000.

Screen Shot 2024-01-04 at 2 43 15 PM

I am getting the following plot.

lizadams commented 7 months ago

Tested the command line option on the mac using the VERDI_2.1.5_mac_20240124.tar.gz package and it worked.

./verdi.command -f $cwd/../mpas_UV_only.2016-07-04.nc -s "zgrid[1]" -g tile -saveImage "png" $cwd/mpas_zgrid.png -quit

mpas_zgrid

yadongxuEPA commented 7 months ago

Tested the command line option on Atmos using the VERDI_2.1.5_linux64_20240124.tar.gz and it worked.