[gradsusr] template for multiple netcdf files

Jennifer Adams jma at cola.iges.org
Thu Mar 10 21:30:32 EST 2011


Joyce,
Take the 'time' keyword out of your TDEF statement -- that is for  
'xdfopen' style descriptors, and you are using 'open'.
--Jennifer


On Mar 10, 2011, at 8:57 PM, Joyce Meyerson wrote:

> Thanks Jeff,
>
> Unfortunately, when I tried
> DSET ^ta_6hrLev_HadGEM2-ES_rcp45_r1i1p1_%y4%m2%d2%h200- 
> %y4%m2%d2%h200.nc
> OPTIONS template
> TDEF time 1800 linear 6Z1dec2005 6hr
>
> I get the message
> ga-> open test2.ctl
> Scanning description file:  test2.ctl
> Open Error:  Missing or invalid dimension size.
>   --> The invalid description file record is:
>   --> TDEF time 1800 linear 6Z1dec2005 6hr
>   The data file was not opened.
>
> Joyce
>
> On Mar 10, 2011, at 5:19 PM, Jeffrey Duda wrote:
>
>> Joyce,
>> You have the general idea of templating down right, but you do have  
>> a few template strings that are not right.  If the last four digits  
>> in the dates of your filenames are just four-digit UTC times, use  
>> %h200.  If they're forecast hours, use %f30.  Also, I think you  
>> should only have one file name listed in the DSET entry (i.e.,  
>> don't double up on the file names, just leave the templated file  
>> name string there instead).
>>
>> Unfortunately if that change doesn't work, that's as far as I can  
>> go to help you, as I don't use sdfopen and it could be an issue  
>> related to that.
>>
>> Hope this helps.
>>
>> Jeff Duda
>>
>> On Thu, Mar 10, 2011 at 6:58 PM, Joyce Meyerson  
>> <hobo at atmos.ucla.edu> wrote:
>> 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
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>
>>
>> -- 
>> Jeff Duda
>> Iowa State University
>> Meteorology Graduate Student
>> 3134 Agronomy Hall
>> www.meteor.iastate.edu/~jdduda
>> <ATT00001..txt>
>
> **************************
> Joyce Meyerson
> UCLA
> Dept. of Oceanic & Atmospheric Sciences
> 7235 Math Science Bld.
> Los Angeles, CA 90095-1565
> hobo at atmos.ucla.edu
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
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/20110310/91e68ad3/attachment-0003.html 


More information about the gradsusr mailing list