[gradsusr] Control file for nc file from CMIP5 (syairah atiqah atiq)

Hoop hoop at colorado.edu
Wed Feb 22 13:32:14 EST 2017


All,

To help a little bit with such cases, I've written a script that
Jennifer has been kind enough to place in the standard library:

http://cola.gmu.edu/grads/gadoc/library.html

It only works for files that are otherwise compatible with the
sdfopen command.  It takes several arguments and writes a three
line Data Descriptor File (DDF) and then executes the xdfopen
command on it.  An example of using it at the GrADS prompt:

sdfopen365 /path/to/file.nc time 800 0z1jan1903 1dy test.ddf

The final argument is optional and defaults to ".out.ddf".  The other
arguments are the name of the temporal dimension in the file, the
number of time steps in the file, the initial time value in
GrADS' format, and the time increment in GrADS' notation.

I hope this helps.

-Hoop

On 02/20/17 00:24, gradsusr-request at gradsusr.org wrote:
> Date: Mon, 20 Feb 2017 07:24:23 +0000 (UTC) From: syairah atiqah atiq
> <syairahatiqah at yahoo.com> Subject: Re: [gradsusr] Control file for nc file
> from CMIP5 To: GrADS Users Forum <gradsusr at gradsusr.org>,
> "andfried at gmail.com" <andfried at gmail.com>
>
> Thank you. I able to open it. Here my ctrl file look like:
>dset ^E:\CMIP5\MIROC5\histo\si\sic_OImon_MIROC5_historical_r1i1p1_185001-201212.nc
>options 365_day_calendar
>TDEF time 1956 LINEAR 0Z1jan1850 1mon
> Regards,Atiqah    On Monday, February 20, 2017 3:20 PM, Andrew Friedman
> <andfried at gmail.com> wrote:
>
> Here are some previous answers specifically regarding the 365-day calendar
> issue: http://gradsusr.org/pipermail/gradsusr/2011-June/030237.html
>
>> On Feb 20, 2017, at 7:39 AM, Lyndon Mark Olaguera
>> <olagueralyndonmark429 at gmail.com> wrote:
>>
>> Hi,
>>
>> You can do any of the following.
>>
>>
>> [1] Set tdef like this if you want to use a ctl file. To determine the
>> XDEF and YDEF, you can use ncdump -h or cdo sinfo to get the correct
>> coordinates.
>>
>> TDEF time 365 LINEAR 01Jan1971 1mo
>>
>> [2] Use nco like the following. In this case, no need to create a ctl
>> file. You can open the netcdf via sdfopen.
>>
>> ncatted -O -a calendar,time,o,c,"standard" input_file.nc
>>
>> Goodluck,
>>
>> Lyndon Mark P. Olaguera PhD Student Monsoon Climatology Laboratory
>> Department of Geography Faculty of Urban Environmental Science
>> Minami-Osawa Campus Tokyo Metropolitan University
>>
>>
>> On Mon, Feb 20, 2017 at 9:51 AM, syairah atiqah atiq
>> <syairahatiqah at yahoo.com> wrote: Dear grads experts,
>>
>> Anyone has an experience deal with CMIP5 data? I need help. I downloaded
>> nc. file from CMIP5 model. However when I try to open it using sdfopen,
>> it's error. Below what the grads said:
>>
>> sdfopen
>> C:\Users\atiqah\Downloads\sic_OImon_MIROC5_historical_r1i1p1_185001-201212.nc
>>
Scanning self-describing file:? 
C:\Users\atiqah\Downloads\sic_OImon_MIROC5_historical_r1i1p1_185001-201212.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
>>
>> what should I do? did I need do the control file??
>>
>> dset?
>> C:\Users\atiqah\Downloads\sic_OImon_MIROC5_historical_r1i1p1_185001-201212.nc
>>
>>
undef? -9.99e+33
>> title? Sea ice area fraction xdef? ydef? zdef? 1 levels 0 tdef? 163
>> linear 00z01JAN1980 1mon OPTIONS vars 1 sic? 0 99 summer [%] endvars
>>
>> Thank you Atiqah
>>
>> _______________________________________________ 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
> _______________________________________________ gradsusr mailing list
> gradsusr at gradsusr.org http://gradsusr.org/mailman/listinfo/gradsusr
>
> -------------- next part -------------- An HTML attachment was scrubbed...
> URL:
> http://gradsusr.org/pipermail/gradsusr/attachments/20170220/839cc404/attachment.html
>
> ------------------------------
>
> _______________________________________________ gradsusr mailing list
> gradsusr at gradsusr.org http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> End of gradsusr Digest, Vol 84, Issue 31
> ****************************************


More information about the gradsusr mailing list