[Thread Prev][Thread Next][Index]

Re: [ferret_users] A possible bug in reading dimemsions



Hi Ansley,

Thanks.

However, even if I define a variable for z and time, it shows up the same problem with the following warning.

 *** NOTE: unrepairable repeated axis coords on axis time at subscript 536
 *** NOTE: A dummy axis of subscripts will be used
 *** NOTE: unrepairable repeated axis coords on axis z at subscript 524
 *** NOTE: A dummy axis of subscripts will be used

Pls check the attached file. Do I need to add other attributes?

Tony



On Thu, May 30, 2013 at 2:22 PM, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:
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 ;

        z = 10 ;
        time = 22 ;
variables:
        double latitude(latitude) ;
                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) ;

        double tti(time, z) ;
        double pti(time, z) ;
}

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.

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:
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.

With ncdump, it reads:

dimensions:
    z = 10 ;
    time = 22 ;
variables:
   double tti(time, z) ;
    double pti(time, z) ;

But in ferret:

TTI    1:22      ...       1:10      ...       ...       ...
PTI    1:22      ...       1:10      ...       ...       ...

When I try to use these variables:

yes? plot/k=1 tti
 **netCDF error
             NetCDF: Start+count exceeds dimension bound (OPeNDAP/netCDF Error code -57)
             Data set: ./svdpactp.nc

Pls help resolve this issue.

Many thanks in advance!
Tony


Attachment: svdpactp.nc
Description: Cdf file


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

Privacy Policy | Disclaimer | Accessibility Statement