Re: About define Time of new nc file

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 06 2011 - 08:34:33 MST

The code sent to you in a previous email works fine.
It creates a variable of type *float* and size (1464,17,73,144)
It also create netCDF and plots!!

You altered the code.

The ncdump below shows

  *short* hgt(time, level, lat, lon)

Where did the "short" type come from?
The code you sent show no packing (float to short)
so how did this happen?

The GrADS shows Xsize = 144 Ysize = 73 Zsize = 17 Tsize = 1

Tsize=1 ... one time step

Please look more carefully.

On 1/6/11 7:49 AM, Guangtao dong wrote:
> Hello,everyone
> I want to use ncl to generate an 10 years averaged nc data from
> follow input data :
> hgt.yyyy.nc <http://hgt.yyyy.nc/> ( yyyy are years number from 1998 to
> 2007) in which hgt.2000.nc <http://hgt.2000.nc/> and hgt.2004.nc
> <http://hgt.2004.nc/> have 1464 times and the other have 1460 times
> And i want a output file have 1464 times . And i write a ncl script to
> do it , the script are attached as accessories . output file "
> hgt.mean.nc <http://hgt.mean.nc/>" have 1464 times , when i use
> " ncdump -h hgt.mean.nc <http://hgt.mean.nc/>",it shows as follow:
> dimensions:
> time = UNLIMITED ; // (1464 currently)
> level = 17 ;
> lat = 73 ;
> lon = 144 ;
> variables:
> double Time(time) ;
> Time:units = "hours since 1800-1-1 00:00:0.0" ;
> Time:long_name = "Time" ;
> Time:_FillValue = -9999. ;
> int time(time) ;
> short hgt(time, level, lat, lon) ;
> hgt:units = "m" ;
> hgt:long_name = "Geopotential height" ;
> hgt:_FillValue = -999s ;
> float level(level) ;
> level:coordinate_defines = "point" ;
> level:axis = "z" ;
> level:GRIB_name = "hPa" ;
> level:GRIB_id = 100s ;
> level:positive = "down" ;
> level:long_name = "Level" ;
> level:actual_range = 1000.f, 10.f ;
> level:units = "millibar" ;
> float lat(lat) ;
> lat:coordinate_defines = "point" ;
> lat:axis = "y" ;
> lat:standard_name = "latitude_north" ;
> lat:long_name = "Latitude" ;
> lat:actual_range = 90.f, -90.f ;
> lat:units = "degrees_north" ;
> float lon(lon) ;
> lon:coordinate_defines = "point" ;
> lon:axis = "x" ;
> lon:standard_name = "longitude_east" ;
> lon:actual_range = 0.f, 357.5f ;
> lon:long_name = "Longitude" ;
> lon:units = "degrees_east" ;
> }
> but when i open hgt.mean.nc <http://hgt.mean.nc/> by Grads, and use " q
> file " , it shows as follow:
> File 1 :
> Descriptor: hgt.mean.nc <http://hgt.mean.nc/>
> Binary: hgt.mean.nc <http://hgt.mean.nc/>
> Type = Gridded
> Xsize = 144 Ysize = 73 Zsize = 17 Tsize = 1
> Number of Variables = 1
> hgt 17 -999 Geopotential height
> How can i make the file "hgt.mean.nc <http://hgt.mean.nc/>" as NNRP2
> file such as hgt.2000.nc <http://hgt.2000.nc/>. especially how can i
> define time when i generate
> the nc file "hgt.mean.nc <http://hgt.mean.nc/>" ?
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 6 08:34:40 2011

This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST