[gradsusr] Opening and extracting grads file generated from fortran
Jeff Duda
jeffduda319 at gmail.com
Tue Jul 31 12:38:00 EDT 2012
It is possible to create control files for each data file, but I don't see
why you would ever want to do that. It would be much easier and take much
less time to change the DSET entry in your one control file instead. For
the templating, you only have to match up the pattern of the data file
name. See this page about
templates<http://www.iges.org/grads/gadoc/templates.html>for more
information. THe warning is just a warning. The only reason it
appears is because you have the keyword "options template" in your control
file, yet you have no template symbols in the DSET entry of your control
file. Change your DSET line to this: DSET %y4/mld%y4%m2%d2.gpv to be able
to use the one control file to open all data files. Again, make sure you
run this from the directory that contains those directories or else you
will get errors from the control file being unable to find the data.
The message you will get when Grads successfully displays data is something
like what you said: Contouring: 50 to 450 interval 50
Possible reasons for why you couldn't see it:
1) Did you open a display window?
2) Is your data defined over a different geographical region than the one
specified in the control file? If the dimension environment completely
misses the region over which the data are defined, you won't see anything
even though Grads will display it.
You said someone else made these files. I suggest talking to them about
how they made them to determine how to display the data if you continue to
have problems.
Jeff
On Mon, Jul 30, 2012 at 11:40 PM, irene alabia <irenealabia at gmail.com>wrote:
> Hi, Thank you for walking me through the process. the folder 1981 exists,
> but the files were renamed to mld19810101.gpv by an external script. I
> tried to change the data file to mld19810101.gpv in an attempt to open the
> first file and it gives me a warning message:
>
>
> ga-> open mld.ctl
> Scanning description file: mld.ctl
> Warning: OPTIONS keyword "template" is used, but the
> DSET entry contains no substitution templates.
> Data file mld19810101.gpv is open as file 1
>
> LON set to 99.5 285
> LAT set to -15.5 65
> LEV set to 0.5 0.5
> Time values set: 1981:1:1:0 1981:1:1:0
> E set to 1 1
>
> Is it possible to create .ctl file corresponding to each datafile? I also
> tried to do "d mld" and gives me a message
> Contouring: 50 to 450 interval 50. However, data were not displayed.
> Thanks much.
>
>
>
>
> On Tue, Jul 31, 2012 at 1:09 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
>
>> Your control file has time templated. The time index defaults to 1 when
>> you first open the control file. So check if the file
>> 1981/mld.19810101_0000 exists. I guessed the name of this file based off
>> of the DSET entry in the control file (which tells Grads where to look for
>> the data files) and the TDEF entry. Since the path I just mentioned seems
>> relative, make sure you run Grads from the directory that contains these
>> files. Otherwise the control file will not find the data and you'll get
>> that error. So check on that first.
>>
>> Jeff
>>
>>
>> On Mon, Jul 30, 2012 at 11:03 PM, irene alabia <irenealabia at gmail.com>wrote:
>>
>>> When i run the open mld.ctl, I get the following lines:
>>>
>>>
>>> ga-> open mld.ctl
>>> Scanning description file: mld.ctl
>>> Data file %y4/mld.%y4%m2%d2_%h2%n2 is open as file 1
>>> LON set to 99.5 285
>>> LAT set to -15.5 65
>>> LEV set to 0.5 0.5
>>> Time values set: 1981:1:1:0 1981:1:1:0
>>> E set to 1 1
>>>
>>> and running the d mld gives an error msg.
>>> ga-> d mld
>>> Cannot contour grid - all undefined values
>>>
>>> Irene
>>>
>>>
>>> On Tue, Jul 31, 2012 at 12:46 PM, Jeff Duda <jeffduda319 at gmail.com>wrote:
>>>
>>>> What happens when you run the commands
>>>> 'open mld.ctl'
>>>> 'd mld'
>>>> Any error messages? Do the data display?
>>>>
>>>> Jeff
>>>>
>>>>
>>>> On Mon, Jul 30, 2012 at 10:36 PM, irene alabia <irenealabia at gmail.com>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Thank you for the quick reply. Attached is the entire control file.
>>>>>
>>>>> Thanks much
>>>>>
>>>>>
>>>>> On Tue, Jul 31, 2012 at 12:13 PM, Jeff Duda <jeffduda319 at gmail.com>wrote:
>>>>>
>>>>>> Please show the entire control file.
>>>>>>
>>>>>> Jeff Duda
>>>>>>
>>>>>> On Mon, Jul 30, 2012 at 10:04 PM, irene alabia <irenealabia at gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Dear Grads-users,
>>>>>>>
>>>>>>> I am working with data files which I believed are created using
>>>>>>> Fortran code. I am new to Grads and I tried the basic commands to explore
>>>>>>> the data files but cant get past the opening phase. the file has a control
>>>>>>> file which looks like this:
>>>>>>>
>>>>>>> ga-> open mld.ctl
>>>>>>> Scanning description file: mld.ctl
>>>>>>> Data file %y4/mld.%y4%m2%d2_%h2%n2 is open as file 1
>>>>>>> LON set to 99.5 285
>>>>>>> LAT set to -15.5 65
>>>>>>> LEV set to 0.5 0.5
>>>>>>> Time values set: 1981:1:1:0 1981:1:1:0
>>>>>>> E set to 1 1
>>>>>>>
>>>>>>> ga-> q file
>>>>>>> File 1 : Mixed layer depth (delta_sigma = 0.05)
>>>>>>> Descriptor: mld.ctl
>>>>>>> Binary: %y4/mld.%y4%m2%d2_%h2%n2
>>>>>>> Type = Gridded
>>>>>>> Xsize = 372 Ysize = 162 Zsize = 54 Tsize = 1080 Esize = 1
>>>>>>> Number of Variables = 2
>>>>>>> mld 1 99 Mixed layer depth (unit in m ; d_sigma=0.05)
>>>>>>> rsig 1 99 Surface density
>>>>>>>
>>>>>>> Any help to read and save the files for each Zlevels is very much
>>>>>>> appreciated. Thanks in advance.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Irene
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gradsusr mailing list
>>>>>>> gradsusr at gradsusr.org
>>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jeff Duda
>>>>>> Graduate research assistant
>>>>>> University of Oklahoma School of Meteorology
>>>>>> Center for Analysis and Prediction of Storms
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jeff Duda
>>>> Graduate research assistant
>>>> University of Oklahoma School of Meteorology
>>>> Center for Analysis and Prediction of Storms
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>>
>> --
>> Jeff Duda
>> Graduate research assistant
>> University of Oklahoma School of Meteorology
>> Center for Analysis and Prediction of Storms
>>
>>
>> _______________________________________________
>> 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
>
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120731/437ea19b/attachment-0003.html
More information about the gradsusr
mailing list