[Thread Prev][Thread Next][Index]

Re: MOM4p0 [ferret_users] reading netcdf-files, prepared with ferret



Hi Martin,
As we read the CF standard, nv, the number of vertices in a multi-dimensioned coordinate variable, is a dimension but not a coordinate variable, so this is how Ferret has implemented it. Ferret calls this bnds rather than nv. The number of vertices is determined by the header of the netcdf file, where the dimension length is listed as 2. Here's the CF standard, for reference
http://www.cgd.ucar.edu/cms/eaton/cf-metadata/CF-1.0.html

We are certainly willing to coordinate with the MOM4 developers to solve this incompatibility.

Ansley

Martin Schmidt wrote:

Hi,

I send this mail to the mom4 and ferret list, because there
is a possible incompatibility in the understanding
of netcdf in ferret and mom4 (fms).

Trying to read netcdf-files through the data_override utility I
have found the following:

- ferret is a useful tool to process netcdf-files. Recent
versions add bounds, if axes are non equidistant. This is a nice
feature as far as information on data is kept accurate.

Ferret adds a dimension bnds to the netcdf-file and defines a
double variable like in the example LON = 44 ;
LAT = 38 ;
bnds = 2 ;
TAX = UNLIMITED ; // (1714 currently)
double LAT(LAT) ;
LAT:units = "degrees_north" ;
LAT:point_spacing = "uneven" ;
LAT:axis = "Y" ;
LAT:bounds = "LAT_bnds" ;
double LAT_bnds(LAT, bnds) ;

There is no axis named bnds!

- mom4 tries to read bounds too. However, it expects a complete
axis. In mpp_read_meta the number of dimensions is read and then
axes are allocated:

allocate(Axis(ndim))
However, the axis corresponding to the dimension bnds is not
there and remains unknown. Later in get_axis_bounds, mom4
gets confused. It finds bounds in the attribute
list of one axis and tries to extract the values from a
data structure, which has the type of axis. However,
there is no axis but a field. Mom4 falls back to the default axis
(nothing), gets the axis length -1 which gives an error stop.

Hence, two important codes, Ferret and MOM4 (FMS) make different assumptions
on the "correct" structure of a netcdf File. Please note,
also LAS 6.4 fails with netcdf-files with bounds
from ferret.
I put this on the two list to draw developers attention to this problem.
Kind regards,
Martin Schmidt


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement