-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Describe the Problem
This issue arose via the dtcenter/METplus#1718 discussion. Further investigation reveals that the MET NetCDF-CF library code needs to be enhanced to instantiate Polar Stereographic grids from NSIDC Sea Ice Edge NetCDF files. Those file are CF-compliant but MET fails to read that data.
Expected Behavior
MET should be able to read data from NSIDC Sea Ice Edge NetCDF file and instantiate the Polar Stereographic grids on which they resides.
Environment
Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop) Not Hardware-specific
2. OS: (e.g. RedHat Linux, MacOS) Not OS-specific
3. Software version number(s) version 10.1.0
To Reproduce
Describe the steps to reproduce the behavior:
1. Retrieve these sample data files:
See NSIDC_sample_data.tar.gz
https://n5eil01u.ecs.nsidc.org/PM/NSIDC-0081.002/2022.07.23/NSIDC0081_SEAICE_PS_N25km_20220723_v2.0.nc
https://n5eil01u.ecs.nsidc.org/PM/NSIDC-0081.002/2022.07.23/NSIDC0081_SEAICE_PS_S25km_20220723_v2.0.nc
2. Run plot_data_plane:
plot_data_plane NSIDC0081_SEAICE_PS_S25km_20220723_v2.0.nc test.ps 'name="F16_ICECON"; level="(0,*,*)";' -v 4
3. See error
ERROR : get_nc_var_att_double() -> Cannot get "longitude_of_projection_origin" from crs variable.
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp
The CF-Convention documentation defines Polar Stereographic grids here. And this is parsed by the get_grid_mapping_polar_stereographic() function in MET.
This task is to enhance MET's NCCF library to handle these files.
Some initial testing got us closer but still produced an error:
ncatted \
-a longitude_of_projection_origin,crs,a,d,0 NSIDC0081_SEAICE_PS_N25km_20220723_v2.0.nc \
-a scale_factor_at_projection_origin,crs,a,d,1.0 \
-a units,x,o,c,"m" \
-a units,y,o,c,"m" \
-o NSIDC0081_SEAICE_PS_N25km_20220723_v2.0_mod.nc
But the result still produces this error from MET:
ERROR : NcCfFile::get_grid_mapping_polar_stereographic() -> MET can only process Polar Stereographic files where the x-axis and y-axis deltas are the same.
The X delta is +25000 m and the Y delta is -25000 m. So the magnitude is the same, but the sign is different.
If we ignore the sign, then MET is able to plot the result but the image is upside-down. So the library code need to detect this situation and flip the data accordingly, as is done in MET's GRIB1/2 libraries.
Please see the images in the attached tarfile to see how the data should actually be oriented.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
2773542 (was 2793541)
Define the Metadata
Assignee
- Select engineer(s) or no engineer required
- Select scientist(s) or no scientist required
Labels
- Select component(s)
- Select priority
- Select requestor(s)
Projects and Milestone
- Select Organization level Project for support of the current coordinated release
- Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
- Select Milestone as the next bugfix version
Define Related Issue(s)
Consider the impact to the other METplus components.
Bugfix Checklist
See the METplus Workflow for details.
- Complete the issue definition above, including the Time Estimate and Funding Source.
- Fork this repository or create a branch of main_<Version>.
Branch name:bugfix_<Issue Number>_main_<Version>_<Description>
- Fix the bug and test your changes.
- Add/update log messages for easier debugging.
- Add/update unit tests.
- Add/update documentation.
- Push local changes to GitHub.
- Submit a pull request to merge into main_<Version>.
Pull request:bugfix <Issue Number> main_<Version> <Description>
- Define the pull request metadata, as permissions allow.
Select: Reviewer(s) and Linked issues
Select: Organization level software support Project for the current coordinated release
Select: Milestone as the next bugfix version - Iterate until the reviewer(s) accept and merge your changes.
- Delete your fork or branch.
- Complete the steps above to fix the bug on the develop branch.
Branch name:bugfix_<Issue Number>_develop_<Description>
Pull request:bugfix <Issue Number> develop <Description>
Select: Reviewer(s) and Linked issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version - Close this issue.
Metadata
Metadata
Labels
Type
Projects
Status