Hi Jian,
We have been working over the last couple of Ferret releases on how Ferret defines grids. Previously we did not insist that a dimension had the same direction in all grids. This lead to inconsistencies, where a dimension would be the T axis in one grid and the X axis in another grid. In older versions we also did a lot with the names of coordinate axes, and that led to odd stuff too, such as TSTATION being assigned to the T direction where it really should have been an X axis.
So we implemented changes where dimensions should have the same direction in all grids, and we don't use dimension names but rely on coordinate variable attributes to determine their directions. The axis attribute, or standard names that define a direction, or units that are unique to a direction let us assign the right direction.
This means that files such as yours which have the dimensions declared, but do not have coordinate variables for some of the dimensions, sometimes give Ferret problems in defining the grids. Your NetCDF header is,
netcdf svdpactp {
dimensions:
lat = 20 ;
latitude = 20 ;
longitude = 68 ;double latitude(latitude) ;
z = 10 ;
time = 22 ;
variables:
latitude:units = "degree_north" ;
double lat(latitude) ;
lat:units = "degree_north" ;
double longitude(longitude) ;
longitude:units = "degree_east" ;
double lam(z) ;
double lamt(z) ;
double lamp(z) ;
double txy(z, latitude, longitude) ;
double pxy(z, lat, longitude) ;Latitude, lat, and longitude are coordinate variables and their direction is determined by their units, but z and time are simply dimensions, so there aren't any attributes to use in setting their direction.
double tti(time, z) ;
double pti(time, z) ;
}
In our next release we are backing off of the decision to not use dimension names. If the dimension name is a single letter x, y, z, t; or if it is time, date, layer, level, or starts with lon, lat, dep, elev, hei, or alt, we'll go ahead and put it in the appropriate direction. Here is how your file looks when I open it in the beta version of Ferret v6.85 (not yet released):
NOAA/PMEL TMAP
FERRET v6.85 (beta)
Linux 2.6.18-348.4.1.el5 64-bit - 05/30/13
30-May-13 14:18
yes? use svdpactp.nc
yes? sh dat
currently SET data sets:
1> ./svdpactp.nc (default)
name title I J K L M N
LAM ... ... 1:10 ... ... ...
LAMT ... ... 1:10 ... ... ...
LAMP ... ... 1:10 ... ... ...
TXY 1:68 1:20 1:10 ... ... ...
PXY 1:68 1:20 1:10 ... ... ...
TTI ... ... 1:10 1:22 ... ...
PTI ... ... 1:10 1:22 ... ...
yes? sh grid tti
GRID GPI4
name axis # pts start end
normal X
normal Y
Z Z 10 r 1 10
TIME T 22 r 1 22
normal E
normal F
A further idea which we have not yet implemented is to allow the user to specify what dimension gets what direction, when opening the file.
On 5/30/2013 11:57 AM, Jian Ma wrote:
TonyMany thanks in advance!Pls help resolve this issue.When I try to use these variables:But in ferret:With ncdump, it reads:Hi All,I have a metlab-written nc file. The nc files created with the method I use works with former ferret version v5.x. But now I have problem with v6.84 on Linux. The dimension axis of some variables are not right. Pls check the attached file.
dimensions:
z = 10 ;
time = 22 ;
variables:
double tti(time, z) ;
double pti(time, z) ;
TTI 1:22 ... 1:10 ... ... ...
PTI 1:22 ... 1:10 ... ... ...
yes? plot/k=1 tti
**netCDF error
NetCDF: Start+count exceeds dimension bound (OPeNDAP/netCDF Error code -57)
Data set: ./svdpactp.nc
Attachment:
svdpactp.nc
Description: Cdf file