[Thread Prev][Thread Next][Index]

Re: your mail [problem with variable named T]



Dear Gnzeng,
               Since your variable is having the same name as one of the
coordinate variable (in your case, time), i think you have to either
define a new variable or to change the variable name in the netcdf file
itself.

1. defining new variable
------------------------
     you can define the new varible as follows (for further details refer
         ferret manual)

     def var/title="temperature" /units="^oC" temp = 'T'

     then you can use the variable 'temp' or any other name of your
choice.
     but remember that you have to do the same exercise whenever you
        opens this dataset in ferret.

2. editing netcdf file..rather permanent solution
------------------------------------------------
    If you are familiar with netcdf editing with fortran/C programs, you
       can easily change the variable name.
    Otherwise you can try ncdump + ncgen utilities for changing the
       variable name.
       suppose you want to change the variable name from SST to TEMP in
           coads_climatology.cdf (hope you are using linux)

       ncdump coads_climatology.cdf > coads.cdl

          open this cdl file & replace 'SST' with 'TEMP' (that is, in the
          variable declaration part and in the data part)

       ncgen -o coads.nc coads.cdl

          in this new nc file, coads.nc, the variable name will be TEMP.

3. list command
--------------
    After going through any of the above methods, you can use the list
          command with the new variable name. For example,

   LIST/x=50e:60e/y=0n/k=1/l=1 temp

hope this will help you,

as a remark, please try to give some meaningfull subject for the email

with regards

Jaison



On Thu, 11 Sep 2003, gnzeng wrote:

> dear ferret_users
> 
> 		 i would like to know if i have a variable named "T",which means temperature.
> supposed its dimensions are i=1:10,j=1:10,k=1:10,l=1:10,
> how can i list the data?how can i contour at special setting?
> 
> you know, according to ferret request, "t" is the default time dimension ,
> or could i rename the variable name to another in a netcdf file, if could, what should i do?
> 
> thanks very much .
> 
> 
>  				
> 
> gnzeng
> led_rs@scsio.ac.cn
> 2003-09-11
> 



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement