[Thread Prev][Thread Next][Index]

Re: [ferret_users] vertical formula embedded in netcdf file



Hi Albert,

I'm not super familiar with the issue, I've seen this discussed on this mailing list, and somebody else must have a better answer, but anyway . . . 

On Fri, May 8, 2020 at 8:58 AM Albert Hermann - NOAA Affiliate <albert.j.hermann@xxxxxxxx> wrote:
Hi group,

I am reading in a file created from one of the CMIP6 models. It appears to have a coordinate transformation embedded as metadata, which one might think would yield different z-levels for the 4D variable (vo) at each horizontal location. However, when I read the file into ferret v7.5, I get vo appearing on a single z-axis (which ferret labels as  "lev"), ranging from 1 to 7250. That axis has the same values as the "zlev" variable in the original file. Now, "zlev" is in fact used in the depth formula, but it is *not* the only term - other terms in the equation suggest that z-levels should vary by location and time (see the formula listed in the ncdump below). Is ferret in fact regridding to a uniform z-axis based on zlev, or is it erroneously assuming all is uniform?

Ferret just shows information contained in your netCDF file.  It doesn't automatically regrid the data for you.

Your 4D variable seems to be defined on the sigma coordinates for levels k = 1, 2, 3, . . . , nsigma
and on the level coordinates for the deeper levels (k = nsigma + 1, . . . ).

for k <= nsigma:
    z(n,k,j,i) = eta(n,j,i) + sigma(k)*(min(depth_c,depth(j,i))+eta(n,j,i)) 
for k > nsigma:
    z(n,k,j,i) = zlev(k)

In the netCDF file, your 4D variable is defined at zlev(k) for all k just for convenience, I guess.   For k <= nsigma, therefore, zlev(k) doesn't indicate the actual depth at which your variable is defined.   (For a model that uses the sigma coordinates for all depth, the vertical coordinate is usually sigma in [0, 1].)

So, to use your data on Ferret, you first construct z(n,k,j,i) as described above for all k, and use it to regrid your variable onto the level coordinates with the ZAXREPLACE function.  There have been discussions about that in this mailing list and I think there is an entry in Ferret's FAQ, in Ferret's official manual, or both.

Hope this helps,

Regards,
Ryo

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement