dtcenter / MET

Model Evaluation Tools
https://dtcenter.org/community-code/model-evaluation-tools-met
Apache License 2.0
74 stars 22 forks source link

Enhance Point2Grid to support a wider variety of input tripolar datasets #2857

Closed hsoh-u closed 6 days ago

hsoh-u commented 3 months ago

Replace italics below with details for this issue.

Describe the Enhancement

point2grid recognizes a CICE tripolar data as CF compliant NetCDF, but not as a point data. If the NC-CF file is not recognized as a point data, there is a sanity checking (evenly distributed latitude and longitude). The sanity checking prevents from handling a CICE tripolar data by point2grid.

point2grid recognizes CF compliant NetCDF file with 2D lat/lon as point data for following cases:

The enhancements are:

checking coordinates attributes is not simple because a CICE tripolar data has multiple coordinates attribute values:

        float dxe(nj, ni) ;
                dxe:long_name = "E cell width through middle" ;
                dxe:units = "m" ;
                dxe:coordinates = "ELON ELAT" ;
                dxe:missing_value = 1.e+30f ;
                dxe:_FillValue = 1.e+30f ;
        float ANGLE(nj, ni) ;
                ANGLE:long_name = "angle grid makes with latitude line on U grid" ;
                ANGLE:units = "radians" ;
                ANGLE:coordinates = "ULON ULAT" ;
                ANGLE:missing_value = 1.e+30f ;
                ANGLE:_FillValue = 1.e+30f ;
        float ANGLET(nj, ni) ;
                ANGLET:long_name = "angle grid makes with latitude line on T grid" ;
                ANGLET:units = "radians" ;
                ANGLET:coordinates = "TLON TLAT" ;
                ANGLET:missing_value = 1.e+30f ;
                ANGLET:_FillValue = 1.e+30f ;
        float hi_d(time, nj, ni) ;
                hi_d:units = "m" ;
                hi_d:long_name = "grid cell mean ice thickness" ;
                hi_d:coordinates = "TLON TLAT time" ;
                hi_d:cell_measures = "area: tarea" ;
                hi_d:comment = "ice volume per unit grid cell area" ;
                hi_d:missing_value = 1.e+30f ;
                hi_d:_FillValue = 1.e+30f ;
                hi_d:cell_methods = "time: mean" ;
                hi_d:time_rep = "averaged" ;

The location of CICE tripolar data: seneca:/d1/personal/jopatz/workbench/tripolar/iceh.2018-01-03.c00.nc

Time Estimate

Estimate the amount of work required here. 2 or 3 days of work.

Sub-Issues

Consider breaking the enhancement down into sub-issues.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

Labels

Milestone and Projects

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

j-opatz commented 3 months ago

After checking NOAA's RTOFS and GFSv17 ocean datasets, there are some notes:

A note on this is that every tripolar dataset we've been handed for testing has had a slightly different approach to file structure: a very simple example of this is that the CICE file uses the TLAT, TLON, ULAT, ULON, etc. for its variable coordinate attribute while the GFS data does not. So a "one size fits all" solution on this, such as checking the coordinate variable attribute might not work as previously expected.

j-opatz commented 1 month ago

For work completed so far on this issue:

lat/lon variables comes from "coordinates" attribute for CICE tripolar data are now recognized. point2grid supports multiple variables with different lat/lon variables, too.

As an example, the following option is supported by reading TLON and TLAT variables for hi_d varibale, and ULON and ULAT variables for uvel_d.

-field 'name="uvel_d"; level="(0,*,*)";' -field 'name="hi_d"; level="(0,*,*)";'

One issue is not resolved. Howard is working on the lat/lon variable names from the configuration file. This is for when point2grid can not identify the lat/lon variables. User provides the lat/ lon variable names at the user defined config file. point2gird won't find the lat/lon variables in this case.

jprestop commented 3 weeks ago

@hsoh-u or @j-opatz Can you please provide a status update and let me know if any more work is needed on this before the 12.0.0-beta5 release? Or should this be moved to beta6?