Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Map Projection for Regional MPAS Mesh #328

Open
jherwehe opened this issue Nov 22, 2023 · 3 comments
Open

Incorrect Map Projection for Regional MPAS Mesh #328

jherwehe opened this issue Nov 22, 2023 · 3 comments

Comments

@jherwehe
Copy link
Collaborator

Describe the bug
As NCAR is transitioning away from developing WRF toward further developing MPAS, the user community will begin using the relatively recently-added limited-area capability of MPAS more to produce regional MPAS simulations.

A recent regional MPAS simulation was completed and we discovered that VERDI does not correctly display the regional map when plotting the grid mesh (or any of the output data from the simulation).

To Reproduce
This test was conducted using the 20231013 build of VERDI 2.1.4 under Linux:

  1. Open VERDI.
  2. Load the regional MPAS mesh file from the Atmos system:
    /work/MOD3DEV/jherwehe/mpas/meshes/92-25km/conus_25km.grid.nc
  3. Doubleclick on variable "meshStructure (unitless)[1]" to add it to Formulas.
  4. Click "Tile Plot" to see the incorrect map (however, based on the scale range, the data are being read correctly).
  5. The user cannot zoom in or out of the resulting incorrect regional map.
  6. And cell borders cannot be shown.

Expected behavior
The expected plot should initially be a colored contour plot illustrating the different MPAS cell sizes (nominally 25 km) centered over CONUS. The "Show Cell Borders" under "Controls" could then be selected to explicitly show the cell edges.

Screenshots
Here is the incorrect map for the regional MPAS mesh:
regional_mesh_test_VERDI_build_2023-10-13

Operating system:

  • Red Hat Enterprise Linux release 8.9 (Ootpa)

Additional context
VERDI must be expecting only global data from MPAS. So in some ways, this issue is about adding a new feature to VERDI.

Tried uploading here a zip of the test regional MPAS mesh from the path above, but it was too large (33MB).

@yadongxuEPA
Copy link
Collaborator

Confirmed this issue on Atmos, add some additional information regarding this issue:

  1. We got these error messages in the command window when started to zoom in and out on the map
    issue_328_error_messages
  2. The header information is as below in "conus_25km.grid.nc":
    issue_328_conus_25km_header

@dkang2
Copy link
Collaborator

dkang2 commented Jan 2, 2024

image This issue is partially resolved. It does show the regional map, but the cell boundaries (grid) can't be displayed. The full implement can be achieved after version 2.1.5 release.

@lizadams
Copy link
Contributor

lizadams commented Jan 4, 2024

Used the CLI to load the dataset

./verdi.command -f ~/downloads/conus_25km.grid.nc
in netcdfdataset.java openDataset 1 arguments
in netcdfdataset.java openDataset 3 arguments
in netcdfdataset.java ready to return openDataset 5 arguments

Then added the meshStructure variable and created a tile plot using the GUI
Then used Controls>Show Cell Borders

The meshStructure grid was not displayed, and I am not getting the CONUS US, but a portion of South America, so there is a geolocation issue.
Screen Shot 2024-01-04 at 1 52 17 PM

I am getting this error message after I select the show cell borders and then click on the map:

./verdi.command -f ~/downloads/conus_25km.grid.nc
in netcdfdataset.java openDataset 1 arguments
in netcdfdataset.java openDataset 3 arguments
in netcdfdataset.java ready to return openDataset 5 arguments
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "anl.verdi.plot.gui.MeshPlot$LocalCellInfo.getSource()" because the return value of "anl.verdi.plot.gui.MeshPlot.getCellInfo(int)" is null
at anl.verdi.plot.gui.MeshPlot$AreaFinder.mouseReleased(MeshPlot.java:5003)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at anl.verdi.plot.gui.MeshPlot.processMouseEvent(MeshPlot.java:1491)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants