[gradsusr] help - NetCDF file

Celso Bandeira de Melo Ribeiro celso.bandeira at ufjf.edu.br
Thu Jul 11 12:57:21 EDT 2013


Hi James,
Thank you for attention and help.
I modified the file data to diaries as show below:

DSET ^amazonia.clm2.h0.2002-01-%m2-00000.nc
OPTIONS 365_day_calendar
tdef time 4 linear 01jan2000 1dy

But it did not work, appeared the following error message:

ga-> xdfopen amazonia.ctl
Scanning Descriptor File:  amazonia.ctl
Error: nc_open failed to open file amazonia.clm2.h0.2002-01-%m2-00000.nc
No such file or directory
gadsdf: Couldn't ingest SDF metadata.
SDF Descriptor file amazonia.ctl was not successfully opened & parsed.
ga-> 

All the best!

Celso



On Wed, 10 Jul 2013 17:06:21 -1000, "James T. Potemra" <jimp at hawaii.edu>
wrote:
> Celso:
> 
> Your descriptor file lists four times (months), but it is specifically 
> reading only one file (amazonia.clm2.h0.2002-01-01-00000.nc).  You 
> likely want to read all four, so you'll have to add an option 
> "template".  Also, it's not clear from the file names if they reference 
> month-day or day-month, e.g., is amazonia.clm2.h0.2002-01-04-00000.nc 
> for January 4, 2002 or April 1, 2002?  In your descriptor file you 
> specify the time increment as monthly (1mo).  If the files have single 
> time values (one monthly value), and the format of the file name is 
> day-month, your DSET line should be something like:
> 
> DSET ^amazonia.clm2.h0.2002-01-%m2-00000.nc
> 
> The %m2 indicating a substitution template of 2-digit month.
> 
> Jim
> 
> On 7/10/13 3:58 PM, Celso Bandeira de Melo Ribeiro wrote:
>> Hi Matt,
>>
>> Thank you very much for your attention and help.
>> Worked perfectly I created the following file:
>>
>> DSET ^amazonia.clm2.h0.2002-01-01-00000.nc
>> OPTIONS 365_day_calendar
>> tdef time 4 linear 01jan2000 1mo
>>
>> I am working with 4 files (Daily), whose names are:
>>
>> amazonia.clm2.h0.2002-01-01-00000.nc
>> amazonia.clm2.h0.2002-01-02-00000.nc
>> amazonia.clm2.h0.2002-01-03-00000.nc
>> amazonia.clm2.h0.2002-01-04-00000.nc
>>
>> The file opens perfectly in GrADS:
>>
>> ga-> xdfopen amazonia.ctl
>> Scanning Descriptor File:  amazonia.ctl
>> SDF file amazonia.clm2.h0.2002-01-01-00000.nc is open as file 1
>> LON set to 279.062 311.875
>> LAT set to -20.2999 6.45372
>> LEV set to 0.00710064 0.00710064
>> Time values set: 2000:1:1:0 2000:1:1:0
>> E set to 1 1
>> ga-> q file
>> File 1 : CLM History file information
>>    Descriptor: amazonia.ctl
>>    Binary: amazonia.clm2.h0.2002-01-01-00000.nc
>>    Type = Gridded
>>    Xsize = 106  Ysize = 115  Zsize = 15  Tsize = 4  Esize = 1
>>    Number of Variables = 175
>>      ...
>>       tsoi  15  t,z,y,x  soil temperature
>>       tsoi_10cm  0  t,y,x  soil temperature in top 10cm of soil
>>       tv  0  t,y,x  vegetation temperature
>>       u10  0  t,y,x  10-m wind
>>       urban_ac  0  t,y,x  urban air conditioning flux
>>   ...
>>
>> But when I try to open in GrADS putting time as a variable (set 1 t 4)
>> appears the following error message:
>>
>> ga-> set t 1 4
>> Time values set: 2000:1:1:0 2000:4:1:0
>> ga-> d tsoi
>> Contouring: 273 to 279 interval 0.5
>> gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds
>> dimension
>> bound
>> Data Request Error:  Error for variable 'tsoi'
>>    Error ocurred at column 1
>> DISPLAY error:  Invalid expression
>>    Expression = tsoi
>> ga->
>>
>> You know how to help me change the time?
>>
>> All the best!
>>
>> Celso
>>
>>
>>
>> On Wed, 10 Jul 2013 12:43:38 -0700, Matt Masarik
>> <mmasarik at atmos.ucla.edu>
>> wrote:
>>> Hi Celso,
>>>
>>> you can solve this by using a small (3 line) control file
>>> that has the 365_day_calendar option specified.  Copy
>>> the following text into a file, say, amazonia.ctl
>>>
>>> DSET ^amazonia.clm2.h0.2002-01-04-00000.nc
>>> OPTIONS 365_day_calendar
>>> tdef time 3084 linear 16jan1850 1mo
>>>
>>> I put your file name in the DSET line already.  You will
>>> need to change the 3084 to the total number of time
>>> records in the file.  You can find this out by issuing
>>> the following at a command prompt:
>>>
>>> ncdump -c amazonia.clm2.h0.2002-01-04-00000.nc
>>>
>>> you will also need to change 16jan1850 to the start
>>> date of your data set, again use ncdump.
>>>
>>> Once you make those changes you should be able to open
>>> the file by using
>>>
>>> xdfopen amazonia.ctl
>>>
>>>
>>> Matt
>>>
>>>
>>> On 07/10/2013 11:50 AM, Celso Bandeira de Melo Ribeiro wrote:
>>>> Hello,
>>>> I'm working with GrADS Version 2.0.a9 in Linux Ubuntu 64-bit and I am
>> not
>>>> able to open NetCDF file.
>>>> I am using the function "sdfopen" but an error message appears as
>> sending
>>>> the attachment.
>>>> The message, as follows:
>>>>
>>>> ga-> sdfopen amazonia.clm2.h0.2002-01-04-00000.nc
>>>> Scanning self-describing file:  amazonia.clm2.h0.2002-01-04-00000.nc
>>>> SDF Error: 365 day calendars are no longer supported by sdfopen.
>>>>     To open this file with GrADS, use a descriptor file with
>>>>     a complete TDEF entry and OPTIONS 365_day_calendar.
>>>>     Documentation is at
>> http://iges.org/grads/gadoc/SDFdescriptorfile.html
>>>> ga->
>>>>
>>>> I would like to know how solve this problem.
>>>> Thank you!
>>>> Celso
>>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-- 
____________________________________________
Prof. Celso Bandeira de Melo Ribeiro
Universidade Federal de Juiz de Fora - UFJF
Faculdade de Engenharia, Plataforma 4
Departamento de Engenharia Sanitária e Ambiental - ESA
Bairro Martelos, Juiz de Fora (MG) CEP. 36036-900
tel. (32) 2102-3419, Ramal 30



More information about the gradsusr mailing list