Hi,
The answers so far are just fine. However the file could be changed slightly so it would work as expected with no need for those definitions Here's an ncdump output for the dataset. You'll see that the dimensions of vo are vo(time, dep, lat, lon), listing "dep" as the z dimension, but the coordinate variable containing the z depths is named "depth"
> ncdump -h vo_oras4_1m_2017_grid_1x1.nc
The unix tool "ncrename" could be used to change the file so that the dimension and coordinate variable have the same name. Either rename name the dimension to depth or the coordinate variable to dep. For example, rename the dimension:
netcdf vo_oras4_1m_2017_grid_1x1 {
dimensions:
time = UNLIMITED ; // (12 currently)
dep = 42 ;
lat = 180 ;
lon = 360 ;
variables:
float vo(time, dep, lat, lon) ;
vo:_FillValue = 9.96921e+36f ;
vo:_CoordinateAxes = "time depth lat lon" ;
vo:_Fillvalue = 9.96921e+36f ;
vo:associate = "time depth lat lon" ;
vo:coordinates = "time depth lat lon" ;
vo:interval_write = "monthly" ;
vo:long_name = "Meridional Current" ;
vo:offline_operation = "time average and spatial interpolation" ;
vo:standard_name = "northward_sea_water_velocity" ;
vo:units = "m s**-1" ;
float depth(dep) ;
depth:axis = "Z" ;
depth:standard_name = "depth" ;
depth:units = "m" ;
depth:positive = "down" ;
depth:valid_min = 5.02158975601196 ;
depth:valid_max = 5350.27197265625 ;
float mask(dep, lat, lon) ;
mask:_CoordinateAxes = "depth lat lon" ;
mask:coordinates = "depth lat lon" ;
mask:standard_name = "land_sea_mask" ;
mask:associate = "depth lat lon" ;
> ncrename -d dep,depth vo_oras4_1m_2017_grid_1x1.nc
> ncdump -h vo_oras4_1m_2017_grid_1x1.nc
netcdf vo_oras4_1m_2017_grid_1x1 {
dimensions:
time = UNLIMITED ; // (12 currently)
depth = 42 ;
lat = 180 ;
lon = 360 ;
variables:
float vo(time, depth, lat, lon) ;
vo:_FillValue = 9.96921e+36f ;
vo:_CoordinateAxes = "time depth lat lon" ;
vo:_Fillvalue = 9.96921e+36f ;
vo:associate = "time depth lat lon" ;
vo:coordinates = "time depth lat lon" ;
vo:interval_write = "monthly" ;
vo:long_name = "Meridional Current" ;
vo:offline_operation = "time average and spatial interpolation" ;
vo:standard_name = "northward_sea_water_velocity" ;
vo:units = "m s**-1" ;
float depth(depth) ;
> ferret
...
yes? use vo_oras4_1m_2017_grid_1x1.nc
yes? show data
currently SET data sets:
1> ./vo_oras4_1m_2017_grid_1x1.nc(default) yes? show grid vo
name titleI J K L
VO Meridional Current 1:360 1:180 1:42 1:12
MASK1:360 1:180 1:42 ...
GRID GHO1
name axis # pts start end subset
LON LONGITUDE 360mr 0.5E 0.5W full
LAT LATITUDE 180 r 89.5S 89.5N full
DEPTH DEPTH (m) 42 i- 5.0216 5350.3 full
TIME TIME 12 i 16-JAN-2017 00:00 16-DEC-2017 00:00 full
yes? list/l=3/x=150/y=-10 vo
VARIABLE : Meridional Current (m s**-1)
DATA SET : ORAS4 ocean reanalysis
FILENAME : vo_oras4_1m_2017_grid_1x1.nc
SUBSET : 42 points (DEPTH (m))
LONGITUDE: 149.5E
LATITUDE : 10.5S
TIME : 16-MAR-2017 00:00
149.5E
150
5 / 1: 0.006617
15.1 / 2: 0.007251
25.2 / 3: 0.008769
35.3 / 4: 0.006337
45.4 / 5: 0.004724
55.7 / 6: -0.000646
66 / 7: -0.001031
76.5 / 8: -0.000896
...
You also asked about the mask variable. That just seems to be 0 where vo is missing and 1 where it's valid, so you probably don't need to use it.
Ansley
On 4/16/2018 8:53 PM, saurabh rathore wrote:
Dear Ferreters,
I am facing a problem in regarding depth axis and I also want to know that what is the use of mask variable. If anyone used ORAS 4 data, as this data is having 3 variable namely currents, mask and depth. I want to put the depth axis in the current variable and consequently want to know what is the use of mask variable.
I am attaching a sample file for this testing.
I believe its a very simple problem and I am missing something.
Regards, Saurabh
--
REGARDS
Saurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434