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

Incorrect values for the probed grid cells after using "maximum_8hour_mean" stats in a tile plot #325

Closed yadongxuEPA closed 6 months ago

yadongxuEPA commented 1 year ago

Describe the bug This issue was first reported on CMAS forum by a user under this link https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186

To Reproduce Steps to reproduce the behavior:

  1. Launch VERDI GUI
  2. Load testing CAMx dataset: "CAMx.SIP_WF4_1_33kn2023OSATnoctrlv1.20170713.avrg.grd02.nc" from /work/MOD3APP/verdi/VERDI_2.1.4_testing_files
  3. Select "O3(ppmv)" from variables list of the above model data and click "Tile Plot"
  4. Click on Controls >> Set Row and Column Ranges to set the columns as 40-60 and rows as 60-80 and turn on the grid lines
  5. Select "maximum_8hour_mean" from "Stats" drop-down menu
  6. Click on Controls >> Probe to read the MD8A values from the color map

Expected behavior VERDI can display the calculated maximum daily 8 hour averages (MD8A) correctly for CAMx output file.

Screenshots If applicable, add screenshots to help explain your problem. The screenshot below showed that there is a mismatch between the color in the grid cell (50,64) and the probed value at the lower left corner. the color map showed that the grid cell's value is between 0.048-0.057, but the probed value is 0.006 reported_issue_on_CMAS_3_user_data_on_VERDI_2 1 3_edited

yadongxuEPA commented 1 year ago

I also tested this issue with the example CAMx file "camx.example.grd01" came with the VERDI builds, found the same problem.
reported_issue_on_CMAS_2_on_VERDI_2 1 3_edited Furthermore, I found that this issue has been long-existing (including VERDI_2.0_20210311 builds).
Please note that the color map did display the right color after selecting "maximum_8hour_mean" Stats. However, the "probe" function could not display the correct value when clicking on a specific grid cell.

A temporal solution for this user is to get the grid cell values from the exported shapefiles (instead of using 'probe' function on the color map) after applying "maximum_8hour_mean" Stats. But we still need to resolve the issue of incorrect "probed" values.

lizadams commented 7 months ago

Testing using VERDI_2.1.5_mac_20240124.tar.gz

./verdi.command -f $cwd/../CAMx.SIP_WF4_1_33kn2023OSATnoctrlv1.20170713.avrg.grd02.nc -s "O3[2]" -subDomain 40 60 60 80 -g tile

When I use the GUI and select

Stats> maximum_8hr_mean

Select Controls > Probe

I get the following error, and no values appear in the lower left corner of the GUI window.

2024.01.25 17:09:55.620 [AWT-EventQueue-0] ERROR anl.verdi.plot.gui.FastTilePlot - Invalid Range Exception in FastTilePlot.Probe ucar.ma2.InvalidRangeException: first (-55) must be >= 0 at ucar.ma2.Range.(Range.java:148) ~[netcdfAll-4.5.5-SNAPSHOT.jar:?] at ucar.ma2.Range.(Range.java:134) ~[netcdfAll-4.5.5-SNAPSHOT.jar:?] at ucar.ma2.Array.sectionNoReduce(Array.java:679) ~[netcdfAll-4.5.5-SNAPSHOT.jar:?] at anl.verdi.data.AbstractDataFrame.sliceCopy(AbstractDataFrame.java:193) ~[?:?] at anl.verdi.plot.gui.FastTilePlot.probe(FastTilePlot.java:3251) ~[?:?] at anl.verdi.plot.gui.FastTilePlot.access$36(FastTilePlot.java:3220) ~[?:?] at anl.verdi.plot.gui.FastTilePlot$AreaFinder.mouseReleased(FastTilePlot.java:3506) ~[?:?] at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298) ~[?:?] at java.awt.Component.processMouseEvent(Component.java:6621) ~[?:?] at javax.swing.JComponent.processMouseEvent(JComponent.java:3398) ~[?:?] at anl.verdi.plot.gui.FastTilePlot.processMouseEvent(FastTilePlot.java:1231) ~[?:?] at java.awt.Component.processEvent(Component.java:6386) ~[?:?] at java.awt.Container.processEvent(Container.java:2266) ~[?:?] at java.awt.Component.dispatchEventImpl(Component.java:4996) ~[?:?] at java.awt.Container.dispatchEventImpl(Container.java:2324) ~[?:?] at java.awt.Component.dispatchEvent(Component.java:4828) ~[?:?] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) ~[?:?] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) ~[?:?] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) ~[?:?] at java.awt.Container.dispatchEventImpl(Container.java:2310) ~[?:?] at java.awt.Window.dispatchEventImpl(Window.java:2780) ~[?:?] at java.awt.Component.dispatchEvent(Component.java:4828) ~[?:?] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:720) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:714) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:400) [?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) ~[?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98) ~[?:?] at java.awt.EventQueue$5.run(EventQueue.java:747) ~[?:?] at java.awt.EventQueue$5.run(EventQueue.java:745) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:400) [?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) [?:?] at java.awt.EventQueue.dispatchEvent(EventQueue.java:744) [?:?] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?] at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]

The probe now is looking for a value of (11,5) from the subdomain versus (1,1,51,64) from the larger domain, and VERDI throws the following error:

max_8h4_mean_with_subdomain_probe_fails

If I don't use the -subDomain option, but instead zoom into the same area from the GUI, then probing works.

 ./verdi.command -f $cwd/../CAMx.SIP_WF4_1_33kn2023OSATnoctrlv1.20170713.avrg.grd02.nc -s "O3[2]" -g tile

When I use the GUI and select

Stats> maximum_8hr_mean

Select Controls > Probe

Then it works, the correct value is available in the plot.

Max_8hr_mean_stat_tileplot
yadongxuEPA commented 7 months ago

Re-tested VERDI_2.1.5_linux64_20240124.tar.gz on Atmos, the probed grid cell values were still shifted toward +1 north-eastward as previously described. I don't think we planned to resolve this issue in VERDI 2.1.5. We can discuss the details later.

cgnolte commented 7 months ago

In my testing, using VERDI 2.1.5 on atmos interactively, in probe mode, clicking on a grid cell results in the coordinates and value of the grid cell shifted by 1 north and east (diagonally). The data value is consistent with the coordinate displayed -- it just isn't the grid cell the user clicked on.

yadongxuEPA commented 6 months ago

Re-tested VERDI_2.1.5_linux64_20240221.tar.gz on Atmos, found that the issue has resolved. The values were displayed correctly for the probed grid cells (with or without using the stats). testing_325_with_camx_1

yadongxuEPA commented 6 months ago

Also tried from the command line then use probe the grid cells, it also worked. image

testing_325_with_camx_2