[gradsusr] GFS plotting data from different files (different points of time) in one 2D (height – time) plot

Jeff Duda jeffduda319 at gmail.com
Sun Oct 19 19:09:47 EDT 2014


Oh okay.  Now that I know what you're looking for...

You will have to incorporate templating over time
<http://www.iges.org/grads/gadoc/templates.html> into the control files.
Grads won't know how to display a time-height section properly without
templating. For the specific data files you are using, use either the %f2
or %f3 template strings in your file name for the DSET entry in the control
file. You appear to be using data from NCEP's NOMADS server, so the file
names have the form

gfs.t00z.master.grbf159.10m.uv.grib2
<http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2014101700/gfs.t00z.master.grbf159.10m.uv.grib2>

so you can use the template strings as follows (just for example):

DSET gfs.t00z.master.grbf%f3.10m.uv.grib2

Don't forget to also adjust the TDEF entry of the control file to
correspond to the number of data files you are using.  Lastly, you'll have
to rerun gribmap after editing the control file.

Once that's done you also won't need all that "set time 15Z17OCT2014" and
"set dfile 2" junk either.  Templating over time is a very powerful feature
of Grads. I suggest getting acquainted with it.

Jeff

On Sun, Oct 19, 2014 at 1:58 PM, André Petersen <mail at andrepetersen.de>
wrote:

>  Hi Jeff,
>
> thank you very much vor your answer! I removed the commands "set t 1 2".
> Now I get a plot with the wind speed on the x-axis and the height on the y
> axis, see attachement.
>
> What I want is, that it looks like this:
> http://www.atmos.albany.edu/facstaff/tang/forecast/fig/NAMM_WIND1.png
>
> I really appreciate any further help!
>
> Best regards, André
>
>
> On 19.10.2014 11:55, Jeff Duda wrote:
>
>   Andre,
>  It looks like you have the right idea, but I don't see a reason for the
> commands
>
>  'set t 1 2'
>
>  That will cause grads to plot two different time steps worth of data.
> Based on my knowledge of those GFS files, there is only one time slice of
> data in each file, so depending on what the TDEF line of your control file
> says, you should get an error on the second time slice.  Also, Grads does
> not overlay plots that vary in time, only plots that are fixed in any two
> dimensions (X-Y for instance).
>
> Basically, remove the "set t 1 2' commands and see if the result is what
> you are looking for.
>
> Jeff Duda
>
> On Sat, Oct 18, 2014 at 2:50 PM, André Petersen <mail at andrepetersen.de>
> wrote:
>
>>  Dear subscriber,
>>
>> I downloaded data from the american gfs weather modell (from
>> ftp://ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2014101812/master,
>> edit date if you read more than 1 month later).
>>
>> I am using grads to plot data and it works fine if I plot data from 1
>> timestep (=1 file) on a map. So my first try was to open the first 2 files
>> and to make a shaded plot showing areas with the same wind speed in the
>> same color. What I get is an empty plot with correct axes.
>>
>> 'open gfs.t12z.mastergrb2f00.ctl'
>>
>> 'open gfs.t12z.mastergrb2f03.ctl'
>>
>> 'set dfile 1'
>>
>> 'set time 12Z17OCT2014'
>> 'set gxout shaded'
>> 'set lat 50'
>> 'set lon 0'
>> 'set lev 1000 200'
>> 'set t 1 2'
>> 'd sqrt(ugrdprs*ugrdprs+vgrdprs*vgrdprs)*1.9438'
>>
>> 'set dfile 2'
>> 'set time 15Z17OCT2014'
>> 'set t 1 2'
>> 'd sqrt(ugrdprs*ugrdprs+vgrdprs*vgrdprs)*1.9438'
>>
>> I am using opengrads – Grid Analysis and Display System (GrADS) Version
>> 2.0.2.oga.2.
>>
>> Anyone who can help me plotting data from different timesteps (=
>> different files) into one plot?
>>
>> Best regards,
>> André Petersen
>>
>> _______________________________________________
>> 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 listgradsusr at gradsusr.orghttp://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/20141019/fedb59cb/attachment-0001.html 


More information about the gradsusr mailing list