problem with opening multiple NetCDF files

Jennifer Adams jma at COLA.IGES.ORG
Tue Jun 10 07:39:07 EDT 2008


Hi, Pavel --
Templating netcdf files with GrADS 1.9 is best done with a dtype  
netcdf descriptor file, so you should stick with the 'open' command  
and not try to use 'xdfopen'. What you have below is a good start,  
but the error message you got "invalid variable record" does tell you  
where the problem lies. Your variable declarations have two problems:  
you need a long name for each variable, and you need to change the  
"1" in the levels field to "0" since your variables do not vary in Z.

    aot 0 t,y,x  total aerosol optical thickness

and don't forget to add 'dtype netcdf' to your descriptor and also  
'undef -9.99e36' . The number you use for undef is irrelevant, since  
it appears your data do not have and missing values, but GrADS  
requires something in the undef record. Make sure there are only  
spaces and no tabs in the whitespace between fields in your variable  
declarations.

Jennifer



On Jun 9, 2008, at 11:27 AM, Pavel Kishcha wrote:

> Dear All,
>
> The problem comes about when I am trying to open multiple NetCDF  
> files in
> GRADS.
> Here is my descriptor file  (data.ctl):
>
> dset ^%y4-%2m.nc
> options template
> XDEF 360 linear -179.500000 1.00000
> YDEF 181  linear -89.5000000 1.000000
> ZDEF 1 levels 1000
> TDEF 24 linear 01apr2000  1mo
> vars 8
> aot       1 t,y,x
> aot_land  1 t,y,x
> aot_water 1 t,y,x
> aot_dust  1 t,y,x
> angst     1 t,y,x
> small     1 t,y,x
> medium    1 t,y,x
> large     1 t,y,x
> endvars
>
>
> ***When I run it in GrADS Version 1.9b4 by using the command  
> xdfopen I see
> the message:
>
> ga-> xdfopen data.ctl
> Scanning Descriptor File:  data.ctl
> XDFopen Error:  Missing or invalid dimension size.
>   --> The invalid description file record is:
>   --> xdef 360 linear -179.500000 1.00000
>   The data file was not opened.
>
> ***When I run it by using the command open I see the message:
>
> ga-> open data.ctl
> Scanning description file:  MISR_L3.ctl
> Open Error:  Invalid variable record
>   --> The invalid description file record is:
>   --> aot       1 t,y,x
>
> What am I doing wrong?
> Thank you for all of your help.
>
> Cheers,
> Pavel
>
> P.S. Here are my files:
>
> 2000-04.nc
> 2000-05.nc
> 2000-06.nc
>> 2002-03.nc
>
> ***Here is the output from "ncdump -h" of 2000-04.nc
>
> [pavel at wind ~]$ /usr/local/bin/ncdump -h 2000-04.nc
> netcdf 2000-04 {
> dimensions:
>         longitude = 360 ;
>         latitude = 181 ;
>         ftime = 1 ;
> variables:
>         double longitude(longitude) ;
>                 longitude:units = "degree_east" ;
>                 longitude:standard_name = "longitude" ;
>         double latitude(latitude) ;
>                 latitude:units = "degree_north" ;
>                 latitude:standard_name = "latitude" ;
>         double ftime(ftime) ;
>                 ftime:units = "seconds since ??" ;
>                 ftime:standard_name = "ftime" ;
>         double aot(ftime, latitude, longitude) ;
>                 aot:units = "kg m-2" ;
>                 aot:standard_name =  
> "total_aerosol_optical_thickness" ;
>                 aot:coordinates = "ftime latitude longitude" ;
>         double aot_land(ftime, latitude, longitude) ;
>                 aot_land:units = "kg m-2" ;
>                 aot_land:standard_name
> = "total_aerosol_optical_thickness" ;
>                 aot_land:coordinates = "ftime latitude longitude" ;
>         double aot_water(ftime, latitude, longitude) ;
>                 aot_water:units = "kg m-2" ;
>                 aot_water:standard_name
> = "total_aerosol_optical_thickness" ;
>                 aot_water:coordinates = "ftime latitude longitude" ;
>         double aot_dust(ftime, latitude, longitude) ;
>                 aot_dust:units = "kg m-2" ;
>                 aot_dust:standard_name
> = "atmosphere_content_of_dust_aerosol" ;
>                 aot_dust:coordinates = "ftime latitude longitude" ;
>         double angst(ftime, latitude, longitude) ;
>                 angst:units = "None" ;
>                 angst:standard_name = "angstrom_exponent" ;
>                 angst:coordinates = "ftime latitude longitude" ;
>         double small(ftime, latitude, longitude) ;
>                 small:units = "kg m-2" ;
>                 small:standard_name
> = "aerosol_optical_thickness_due_to_small_particles" ;
>                 small:coordinates = "ftime latitude longitude" ;
>         double medium(ftime, latitude, longitude) ;
>                 medium:units = "kg m-2" ;
>                 medium:standard_name
> = "aerosol_optical_thickness_due_to_medium_particles" ;
>                 medium:coordinates = "ftime latitude longitude" ;
>         double large(ftime, latitude, longitude) ;
>                 large:units = "kg m-2" ;
>                 large:standard_name
> = "aerosol_optical_thickness_due_to_large_particles" ;
>                 large:coordinates = "ftime latitude longitude" ;
>
> // global attributes:
>                 :Conventions = "CF-1.0" ;
>                 :history = "Created Mon May  5 15:55:49 2008 by  
> mikeb" ;
>                 :comment = "??" ;
>                 :source = "IMPACT model v??" ;
>                 :references = "??" ;
>                 :institution = "Los Alamos" ;
>                 :title = "AOT global grid for total, dust, angst,  
> small,
> medium, large" ;
> }

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080610/b96d5a46/attachment.html 


More information about the gradsusr mailing list