[gradsusr] template for multiple netcdf files
Joyce Meyerson
hobo at atmos.ucla.edu
Thu Mar 10 19:58:06 EST 2011
Hi All,
I am trying to write a control file to open multiple CMIP5 6hr .nc
files.
I am running grads-2.0.a8 on Linux version 2.6.27.45-server-1mnb.
My files are 6h temperature in 3 month bundles and look like
ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_200512010600-200603010000.nc
ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_200603010600-200606010000.nc
ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_200606010600-200609010000.nc
...
They open fine individually with sdfopen.
All the examples I've seen on the user list and elsewhere more or less
have names that are simple sequential (e.g., pr.1998.nc, pr.1999.nc,
etc. or month, day, year, that kind of thing).
I'm not sure of the nomenclature with a time interval in the name like
the above (xxx_%y4%m2%d2%t4-%y4%m2%d2%t4.nc)
I tried %ch
DSET ^ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_%ch.nc
CHSUB 1 360 200512010600-200603010000
CHSUB 361 720 200603010600-200606010000
OPTIONS template
DTYPE netcdf
TDEF time 720 linear 6Z1dec2005 6hr
with the error message:
ga-> open test.ctl
Scanning description file: test.ctl
Open Error: Missing or invalid dimension size.
--> The invalid description file record is:
--> TDEF time 720 linear 6Z1dec2005 6hr
The data file was not opened.
I tried
DSET ^ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_200512010600-200603010000.nc
ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_%y4%m2%d2%t4-%y4%m2%d2%t4.nc
OPTIONS template
TDEF time 1800 linear 6Z1dec2005 6hr
[opens just the first file]
and I tried
DSET ^ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_%y4%m2%d2%t4-%y4%m2%d2%t4.nc
OPTIONS template
TDEF time 1800 linear 6Z1dec2005 6hr
[gives error message: read_metadata: gaopfn failed (rc=-88888)
gadsdf: Couldn't ingest SDF metadata.
SDF Descriptor file test2.ctl was not successfully opened & parsed.]
I'm not the most adept grads/computer/scripting person. Please help.
Joyce
**************************
Joyce Meyerson
UCLA
Dept. of Oceanic & Atmospheric Sciences
7235 Math Science Bld.
Los Angeles, CA 90095-1565
hobo at atmos.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110310/446ac82d/attachment-0003.html
More information about the gradsusr
mailing list