[gradsusr] ctl file

Charles Seman Charles.Seman at noaa.gov
Wed May 5 12:32:29 EDT 2010


Luis,

Try these two changes to your ctl file: 1) change UNDEF to -9999.9 (if 
it is 9999.9) and 2) change TDEF's jan1998 to apr2004
If that doesn't work, here's a couple more ideas: 1) remove the "ZDEF" 
record in your ctl file (GrADS may not allow this, not sure) or 2) if 
you are using GrADS v2, you may be able to add a z-dimension to each 
netCDF file by reading in each netCDF using a GrADS ctl file and then 
write out the data using sdfwrite;  please find attached a GrADS script 
TRMM_3B42.gs in which a downloaded NASA TRMM 3B42 netCDF file is read in 
using a locally-constructed "xdfopen_ddf" (which defines z- and 
t-dimensions; technique courtesy of Jennifer Adams at COLA), regrids the 
precipitation to a user-defined grid (you can remove this) and then uses 
"sdfwrite" to write out a 4d netCDF file; please let me know if you have 
any questions about the script -- note for your case you already have a 
t-dimension so you can try removing the "TDEF" record in the 
"xdfopen_ddf" file).

Hope this helps,
Chuck

luis blacutt wrote:
> Dear Grads users,
>
> I'm using 144 netcdf files from TRMM dataset. I'm trying to write a 
> ctl file but I'm not succeding, my ctl looks like this
>
> DSET ^3B43.%y2%m201.6.nc <http://m201.6.nc>
> UNDEF 9999.9
> OPTIONS template
> DTYPE netcdf
> XDEF 1440 linear -179.875000 0.250000
> YDEF 400 linear -49.875000 0.250000
> TDEF 144 linear jan1998 1mo
> ZDEF 1 linear 1 1
> vars 1
> pcp 0 99 Precipitation
> endvars
>
>
> The name's files are
>
> 3B43.980101.6.nc <http://3B43.980101.6.nc>
> 3B43.980201.6.nc <http://3B43.980201.6.nc>
> ....
> 3B43.990101.6.nc <http://3B43.990101.6.nc>
> 3B43.990201.6.nc <http://3B43.990201.6.nc>
> ...
> 3B43.000101.6.nc <http://3B43.000101.6.nc>
>
> and so on
>
> the ncdump for  is,
>
> netcdf 3B43.090401.6A {
> dimensions:
>         time = UNLIMITED ; // (1 currently)
>         longitude = 1440 ;
>         latitude = 400 ;
> variables:
>         double time(time) ;
>                 time:units = "hours since 2009-4-1 0" ;
>         double longitude(longitude) ;
>                 longitude:units = "degrees_east" ;
>                 longitude:long_name = "Longitude" ;
>         double latitude(latitude) ;
>                 latitude:units = "degrees_north" ;
>                 latitude:long_name = "Latitude" ;
>         float pcp(time, latitude, longitude) ;
>                 pcp:comments = "Unknown1 variable comment" ;
>                 pcp:long_name = "precipitation:Precipitation" ;
>                 pcp:units = "" ;
>                 pcp:grid_name = "grid-1" ;
>                 pcp:grid_type = "linear" ;
>                 pcp:level_description = "Earth surface" ;
>                 pcp:time_statistic = "instantaneous" ;
>                 pcp:missing_value = -9999.9f ;
> }
>
> Whenever I try to display the variable I get:
>
> Cannot contour grid - all undefined values
>
> Any help will be greatly appreciated
>
> Luis
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   

-- 

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect any
official or unofficial position of the United States Federal Government,
the United States Department of Commerce, or NOAA."

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TRMM_3B42.gs
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20100505/16fadcce/attachment-0003.pl 


More information about the gradsusr mailing list