NCO can produce 2D UGRID output

45 views
Skip to first unread message

Charlie Zender

unread,
Apr 26, 2017, 2:10:42 PM4/26/17
to UGRID Interoperability
UGRID folks,

The latest stable version of NCO, 4.6.6, supports some 2D UGRID.
The support is limited to 2D rectangular grids.
NCO can "infer" the UGRID representation of (I think) any such grid.
It outputs both a SCRIP gridfile and UGRID meshfile corresponding to
the 2D rectangular input datafile: 

ncks --rgr nfr=y --rgr ugrid=${HOME}/grd_ugrid.nc \
     --rgr grid=${HOME}/grd_scrip.nc ~/skl_180x360.nc ~/foo.nc

Here ugrid is the UGRID output, and grid is the SCRIP output,
skl_180x360.nc is any data file (that will not be touched) on the
desired 2D rectangular grid. It must contain orthogonal 1D lat and lon
arrays (NCO can generate any 2D rectangular grid to input).
foo.nc is any dummy netCDF file and will be overwritten.
I'll integrate the UGRID switch into ncremap in NCO 4.6.7.
The UGRID output has all required and lacks these optional fields:
face_edge_connectivity face_face_connectivity edge_face_connectivity. 
You can download the three files above at http://dust.ess.uci.edu/tmp.

Rectangular global meshes do not really exploit the power of UGRID,
but implementing this simple use-case helped me to learn UGRID.
I discovered SGRID after finishing the UGRID implementation :)
I may add an SGRID output option to NCO for 2D rectangular meshes.
Not sure if NCO will ever implement UGRID on more complex meshes.
Feedback always welcome.

Charlie

Reply all
Reply to author
Forward
0 new messages