[Thread Prev][Thread Next][Index]

Re: [ferret_users] Failed creating coord variable %%

Hi Antonio,
Yes, you can use Ferret to make a new version of this dataset.  Open the file with Ferret v6.3, define one-point depth and time axes, and save the file.  For example, if the depth is 10 and the time is December 2000, you could do it this way. (On the time axis definition you could give a time origin and time units, for instance /t0=1-jan-2000/units=days . What I show below will use default units of hours since 1901-01-15.)

yes? USE dec.nc

! Define the z and t axes as desired
yes? DEFINE AXIS/Z=10:10/NPOINTS=1/DEPTH/UNITS=meters zaxis
yes? DEFINE AXIS/T=15-DEC-2000:15-DEC-2000/NPOINTS=1 taxis

! Rename the input variable, so that the output variable can
! have the original name

yes? SET VARIABLE/NAME=temporary l3m_data

! Put our variable onto the new Z and T axes
yes? LET l3m_data = temporary[gz=zaxis@ASN,GT=taxis@ASN]

! Keep all of the attributes from the original variable, such as units
yes? SET ATTRIBUTE/LIKE=temporary l3m_data

! Write it out to a new file.
yes? SAVE/FILE=new_dec.nc l3m_data

Antonio Rodríguez wrote:

Would it be possible for you to explain me how to convert my file to a CF compliant one. Ferret syntax is sometimes a little bit difficult to manage for me. I will greatly appreciate any hint

Best regards,


PD: At the moment I'm trying to work with Modis-terra data form Giovanni-NASA programme and the way the data are presented is somehow weird

2009/10/6 Ansley Manke <Ansley.B.Manke@xxxxxxxx>
To explain a bit more, if we look at the output of ncdump that you show, this file isn't actually CF compliant even though it says in its global attributes that it adheres to the CF conventions.

The variable
    float l3m_data(time, depth, G3fakeDim0, G3fakeDim1) ;

has four dimensions listed, but only G3fakeDim0, G3fakeDim1 are described as coordinate variables in the file.  The time and depth coordinates are not listed among the coordinate variables. A CF-compliant file would have variables along these lines in the header:

        float depth(depth) ;
                depth:units = "meters" ;
                depth:axis = "z" ;
        double time(time) ;
                time:units = "hour since 1980-01-14 14:00:00" ;
                time:time_origin = "14-jan-1980 14:00:00" ;
                time:axis = "t" ;

and would list the coordinate values in the coordinate section.

In any case, I think that Ferret v6.3 would be able to handle this file.


Ansley Manke wrote:
Hi Antonio,
What version of Ferret are you running?  This sounds like a bug that was in version 6.2 of Ferret but has been fixed in version 6.3.  Please try upgrading to version 6.3, following the directions on the downloads pages, http://ferret.pmel.noaa.gov/Ferret/downloads

Here is a thread of the Users List with some discussion of this.



Antonio Rodríguez wrote:

Trying to make a mask from my file, I get:

use dec.nc
let mask=if l3m_data lt 65535 then 0 else 1
save/file=mask.nc mask
LISTing to file mask.nc
 ** netCDF error:
 Failed creating coord variable %%

I couldn't find any trick after browsing the help pages. I don't know what's going on. Any idea?



Bellow you could find the result from ncdumping my dec.nc file:

ncdump -h dec.nc
netcdf dec {
    G3fakeDim0 = 205 ;
    G3fakeDim1 = 145 ;
    depth = 1 ;
    time = UNLIMITED ; // (1 currently)
    float l3m_data(time, depth, G3fakeDim0, G3fakeDim1) ;
        l3m_data:Scaling = "linear" ;
        l3m_data:Slope = 0.000717185f ;
        l3m_data:Intercept = -2.f ;
        l3m_data:Scaling_Equation = "(Slope*l3m_data) + Intercept = Parameter value" ;
        l3m_data:_FillValue = 65535.f ;
        l3m_data:structureType = "Grid" ;
        l3m_data:unitsCategory = "science" ;
        l3m_data:units = "C" ;
        l3m_data:scale_factor = 1.f ;
        l3m_data:add_offset = 0.f ;
    float G3fakeDim0(G3fakeDim0) ;
        G3fakeDim0:scale = 0 ;
        G3fakeDim0:stride = 0.08333334f ;
        G3fakeDim0:gridReference = "edge" ;
        G3fakeDim0:axis = "Y" ;
        G3fakeDim0:standard_name = "latitude" ;
        G3fakeDim0:endValue = 47.f ;
        G3fakeDim0:units = "degrees" ;
        G3fakeDim0:scaleType = "linear" ;
        G3fakeDim0:startValue = 29.91667f ;
        G3fakeDim0:size = 205 ;
    float G3fakeDim1(G3fakeDim1) ;
        G3fakeDim1:scale = 0 ;
        G3fakeDim1:stride = 0.08333334f ;
        G3fakeDim1:gridReference = "edge" ;
        G3fakeDim1:axis = "X" ;
        G3fakeDim1:standard_name = "longitude" ;
        G3fakeDim1:endValue = 1.000005f ;
        G3fakeDim1:units = "degrees" ;
        G3fakeDim1:scaleType = "linear" ;
        G3fakeDim1:startValue = -11.08333f ;
        G3fakeDim1:size = 145 ;

// global attributes:
        :Conventions = "CF-1.0" ;
        :history = "Mon Oct  5 19:51:52 2009: ncecat -u time dec.nc dec.nc\n",
            "Mon Oct  5 19:51:47 2009: ncecat -u depth modisterra-dec2001.nc dec.nc" ;
        :nco_openmp_thread_number = 1 ;

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement