[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to flip a variable? U is read at reverse


Also, this looks like a dataset where depth is not a simple z-axis coordinate variable but varies in location:

depth_u(z, lat, lon)

So depth is not a simple z-axis but data needs to be transformed so that the correct depth is used for any given location.  This is addressed by Ferret in "Auxiliary Coordinates"; see this documentation:


-- we need to do some more FAQ's on this topic.  Does anyone have an OPeNDAP URL pointing to data such as this?


On 1/31/2018 1:32 PM, karen guihou wrote:
Hi all

I am struggling with some ROMS files that I try to read. The surface is at level 40, and the bottom at level 1.
When I import the netcdf, Ferret automatically flips (I do not understand how/why) the U,V,T,S variables so that k=1 is now at the surface and k=40 is at the bottom. However, it does not flip the depth variable. My depths levels are negative values.

If I do u*depth, I end up multiplying the bottom by the surface. If I plot a vertical section of U, the max velocities are at the bottom...

Any idea of option to give, or some missing attribute in the netcdf? I created the nc from a mat file.
Thank you in advance!

netcdf U_climato_CMM {
z = 40 ;
lat = 384 ;
lon = 349 ;
time = UNLIMITED ; // (1 currently)
float depth_u(z, lat, lon) ;
depth_u:units = "m" ;
float dz(z, lat, lon) ;
dz:units = "m" ;
float lat(lat) ;
lat:units = "degrees south" ;
float latitude(lat) ;
latitude:units = "degrees south" ;
float lon(lon) ;
lon:units = "degrees west" ;
float longitude(lon) ;
longitude:units = "degrees west" ;
float taux(time, lat, lon) ;
taux:units = "N/m2" ;
taux:cell_methods = "time: mean" ;
float time(time) ;
time:units = "days since 1980-01-01" ;
time:cell_methods = "time: mean" ;
float u(time, z, lat, lon) ;
u:units = "m/s" ;
u:cell_methods = "time: mean" ;
float ubar(time, lat, lon) ;
ubar:units = "m/s" ;
ubar:cell_methods = "time: mean" ;

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

Privacy Policy | Disclaimer | Accessibility Statement