[gradsusr] help - NetCDF file

Celso Bandeira de Melo Ribeiro celso.bandeira at ufjf.edu.br
Wed Jul 10 21:58:21 EDT 2013


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

-- 



More information about the gradsusr mailing list