[gradsusr] Change of month
Oriol Ciurana
uri at uriens.cat
Tue Oct 6 03:47:08 EDT 2015
Thanks for sharing, Miquel!
Regards,
Oriol
2015-10-06 7:31 GMT+02:00 Miquel Bernis <bernisfeina at gmail.com>:
> Thanks Jennifer, gràcies Oriol!
>
> I finally solved the problem. Now I can generate correctly the template
> and it seems the best way to work. About that, my only problem was that if
> you don't download also the first file "f000", the template don't get
> correctly assembled. Once I realized that it's running ok.
>
> Thanks a lot,
> Miquel
>
> 2015-10-05 14:53 GMT+02:00 Oriol Ciurana <uri at uriens.cat>:
>
>> Hola Miquel,
>>
>> Sorry, i haven't seen your mail until now. For GFS0.25 I use templates
>> too, is the best way, and I never haven't had any problem.
>> I generate the CTL and IDX with these commands, like yours:
>>
>> ${config_g2ctl} gfs.t${hini}z.pgrb2.0p25.f%f3 >
>> gfs.t${hini}z.pgrb2.0p25.f000.ctl
>> gribmap -i gfs.t${hini}z.pgrb2.0p25.f000.ctl
>>
>> And this is the generated CTL header:
>>
>> dset ^gfs.t00z.pgrb2.0p25.f%f3
>> index ^gfs.t00z.pgrb2.0p25.f000.idx
>> undef 9.999E+20
>> title gfs.t00z.pgrb2.0p25.f000
>> * produced by g2ctl v0.0.9
>> * command line options: gfs.t00z.pgrb2.0p25.f%f3
>> * griddef=1:0:(1440 x 721):grid_template=0:winds(N/S): lat-lon grid:(1440
>> x 721) units 1e-06 input WE:NS output WE:SN res 48 lat 90.000000 to
>> -90.000000 by 0.250000 lon 0.000000 to 359.750000 by 0.250000
>> #points=1038240:winds(N/S)
>>
>> dtype grib2
>> options template
>> ydef 721 linear -90.000000 0.25
>> xdef 1440 linear 0.000000 0.250000
>> tdef 41 linear 00Z05oct2015 3hr
>> * PROFILE hPa
>> zdef 26 levels 100000 97500 95000 92500 90000 85000 80000 75000 70000
>> 65000 60000 55000 50000 45000 40000 35000 30000 25000 20000 15000 10000
>> 7000 5000 3000 2000 1000
>> options pascals
>> vars 165
>> [...]
>> ENDVARS
>>
>> [CATALAN]
>> Com baixes els fitxers de GFS? M'ha semblat entendre que tu només baixes
>> una zona concreta i cada 6h, m'equivoco? Suposo que per guanyar velocitat
>> en la descàrrega.
>> Prova, ni que només sigui un cop, de baixar els fitxers de tot el món i
>> cada 3h i fes servir les comandes que et poso a veure si et funciona bé i
>> digue'ns. Potser el problema pot venir per aquí...
>>
>> Salut!
>>
>> Oriol
>>
>> 2015-09-29 16:06 GMT+02:00 Jennifer Adams <jma at cola.iges.org>:
>>
>>> When you have *monthly* data, GrADS is happiest when the hour and day
>>> in the TDEF statement are "00z01". Even if your data variable is an
>>> accumulation over the entire month, and those variables usually take the
>>> time stamp of the end of the accumulation period, everything in GrADS works
>>> better (for monthly data) if you use the first of the month in the date
>>> stamp instead. If your data is in grib format, use -b with gribmap.
>>>
>>>
>>> Here's the problem. Your first file TDEF is:
>>>
>>> tdef 1 linear 18Z30sep2015 1mo
>>>
>>>
>>> Yes, this is a problem. It should be “TDEF 1 linear 00z01sep2015 1mo"
>>>
>>>
>>> and the second file TDEF is:
>>>
>>> tdef 1 linear 00Z01oct2015 1mo
>>>
>>> This is okay.
>>>
>>>
>>> So, when you open the first file, the first time value will be set to
>>> 1800 on Sept. 30, 2015. The increment is define as one month (1mo), so t=2
>>> would presumably be 1800 Oct. 30, 2015, t=3 same for Nov., and so on. The
>>> combined file has:
>>>
>>> tdef 30 linear 06Z29sep2015 6hr
>>>
>>>
>>> There are two problems with this entry: the start time and the
>>> increment. This is monthly data, correct?
>>> Try “TDEF 30 linear 00z01sep2015 1mo” instead for the case where you are
>>> templating files together. But be careful about your file naming convention
>>> and your DSET entry — make sure you are templating over month, not forecast
>>> hour. If you need help figuring out templating, please have a look at
>>> http://iges.org/grads/gadoc/templates.html
>>>
>>>
>>> Also, when diagnosing problems, please be sure to run gribmap in the
>>> verbose mode (-v) and make sure that all records in your data file are
>>> matching. If not, there will be some informative messages about why the
>>> record didn’t match. If you’re still having problems, please send the
>>> gribmap output along with your descriptor files.
>>>
>>> —Jennifer
>>>
>>>
>>>
>>> Here, the initial time is 0600 on Sept. 29, 2015 and the increment is 6
>>> hours, so the next time step should be 1200 on Sept. 29. I suspect that
>>> your files either have too many, or too few, time steps. Maybe the files
>>> contain forecast information that overlaps? It looks like the names of the
>>> files are f066 then f072, so maybe 6 time-steps in each, which means
>>> (complete speculation here) that they have 6 time-steps in each for a total
>>> of 36 hours? If true, the first file starts at 0600 Sept 29, the next file
>>> should start 1200 Sept 30?
>>>
>>> Jim
>>>
>>> On 9/29/15 2:32 AM, Miquel Bernis wrote:
>>>
>>> Thanks for your instructions Jeff and James, I think I understood what
>>> you said, and I tried that way. It seems to be everything right, but when I
>>> open de .ctl and try to display a var, I get the error:
>>>
>>> Cannot contour grid - all undefined values
>>>
>>> These are commands that I execute to create de template, and after that
>>> de .ctl header that results. I don't know what might the mistake.
>>>
>>> Sorry for being so hopeless on that.
>>> Miquel
>>>
>>> >>>
>>>
>>> #el convertim a .ctl
>>> perl g2ctl.pl GFS025_f%f3.grb >GFS025.ctl
>>>
>>> #creem arxiu .idf
>>> gribmap -i GFS025.ctl
>>>
>>> >>>
>>>
>>> dset ^GFS025_f%f3.grb
>>> index ^GFS025_f006.grb.idx
>>> undef 9.999E+20
>>> title GFS025_f006.grb
>>> * produced by g2ctl v0.1.1
>>> * command line options: GFS025_f%f3.grb
>>> * griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x
>>> 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000
>>> by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)
>>>
>>> dtype grib2
>>> options template
>>> ydef 41 linear 35.000000 0.25
>>> xdef 53 linear -5 0.250000
>>> tdef 30 linear 06Z29sep2015 6hr
>>> * PROFILE hPa
>>> zdef 3 levels 100000 85000 50000
>>> options pascals
>>> vars 27
>>>
>>>
>>>
>>> 2015-09-29 1:23 GMT+02:00 Jeff Duda <jeffduda319 at gmail.com>:
>>>
>>>> As James mentioned and I suspected, doing this one file at a time is
>>>> harder than using templates. What I would do is download all the GFS data
>>>> files, then use one single control file to open all of them. Use
>>>> templating, as described here
>>>> <http://www.iges.org/grads/gadoc/templates.html>. Then adjust the TDEF
>>>> line of the control file accordingly. The last thing to do is to run
>>>> gribmap on that control file.
>>>>
>>>> Jeff
>>>>
>>>> On Mon, Sep 28, 2015 at 5:48 PM, Miquel Bernis <
>>>> <bernisfeina at gmail.com>bernisfeina at gmail.com> wrote:
>>>>
>>>>> Thanks again Jeff and James.
>>>>>
>>>>> I've pasted here a pair of my .ctl file example headers. After that,
>>>>> you have the commands I use for downloading the GFS 0.25 data, and for the
>>>>> conversion to .ctl. As you can see I use the perl g2ctl.
>>>>>
>>>>> I really appreciate your help.
>>>>> Miquel
>>>>>
>>>>> >>>>
>>>>>
>>>>> dset ^GFS025_f066.grb
>>>>> index ^GFS025_f066.grb.idx
>>>>> undef 9.999E+20
>>>>> title GFS025_f066.grb
>>>>> * produced by g2ctl v0.1.1
>>>>> * command line options: GFS025_f066.grb
>>>>> * griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x
>>>>> 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000
>>>>> by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)
>>>>>
>>>>> dtype grib2
>>>>> ydef 41 linear 35.000000 0.25
>>>>> xdef 53 linear -5 0.250000
>>>>> tdef 1 linear 18Z30sep2015 1mo
>>>>> * PROFILE hPa
>>>>> zdef 3 levels 100000 85000 50000
>>>>> options pascals
>>>>> vars 27
>>>>> ....
>>>>>
>>>>> >>>>
>>>>> dset ^GFS025_f072.grb
>>>>> index ^GFS025_f072.grb.idx
>>>>> undef 9.999E+20
>>>>> title GFS025_f072.grb
>>>>> * produced by g2ctl v0.1.1
>>>>> * command line options: GFS025_f072.grb
>>>>> * griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x
>>>>> 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000
>>>>> by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)
>>>>>
>>>>> dtype grib2
>>>>> ydef 41 linear 35.000000 0.25
>>>>> xdef 53 linear -5 0.250000
>>>>> tdef 1 linear 00Z01oct2015 1mo
>>>>> * PROFILE hPa
>>>>> zdef 3 levels 100000 85000 50000
>>>>> options pascals
>>>>> vars 27
>>>>> ....
>>>>>
>>>>> >>>>
>>>>>
>>>>> URL="
>>>>> http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t${fhr}z.pgrb2.0p25.f${hr}&lev_10_m_above_ground=on&lev_2_m_above_ground=on&lev_500_mb=on&lev_850_mb=on&lev_1000_mb=on&lev_entire_atmosphere=on&lev_high_cloud_layer=on&lev_low_cloud_layer=on&lev_middle_cloud_layer=on&lev_surface=on&var_APCP=on&var_CAPE=on&var_CFRZR=on&var_CICEP=on&var_CRAIN=on&var_CSNOW=on&var_DPT=on&var_GUST=on&var_HGT=on&var_LFTX=on&var_PRATE=on&var_RH=on&var_TCDC=on&var_TMAX=on&var_TMIN=on&var_TMP=on&var_UGRD=on&var_VGRD=on&subregion=&leftlon=-5&rightlon=8&toplat=45&bottomlat=35&dir=%2Fgfs.${date}${fhr}
>>>>> <http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t$%7Bfhr%7Dz.pgrb2.0p25.f$%7Bhr%7D&lev_10_m_above_ground=on&lev_2_m_above_ground=on&lev_500_mb=on&lev_850_mb=on&lev_1000_mb=on&lev_entire_atmosphere=on&lev_high_cloud_layer=on&lev_low_cloud_layer=on&lev_middle_cloud_layer=on&lev_surface=on&var_APCP=on&var_CAPE=on&var_CFRZR=on&var_CICEP=on&var_CRAIN=on&var_CSNOW=on&var_DPT=on&var_GUST=on&var_HGT=on&var_LFTX=on&var_PRATE=on&var_RH=on&var_TCDC=on&var_TMAX=on&var_TMIN=on&var_TMP=on&var_UGRD=on&var_VGRD=on&subregion=&leftlon=-5&rightlon=8&toplat=45&bottomlat=35&dir=%2Fgfs.$%7Bdate%7D$%7Bfhr%7D>
>>>>> "
>>>>>
>>>>> # download file
>>>>> curl "$URL" -o GFS025_f"$hr".grb
>>>>> sleep 1
>>>>>
>>>>> #convert to .ctl
>>>>> perl g2ctl.pl GFS025_f"$hr".grb > GFS025_f"$hr".ctl
>>>>>
>>>>> #create .idf file
>>>>> gribmap -i GFS025_f"$hr".ctl
>>>>>
>>>>>
>>>>> 2015-09-28 21:22 GMT+02:00 James T. Potemra <jimp at hawaii.edu>:
>>>>>
>>>>>> Miquel,
>>>>>>
>>>>>> We'd need to see you control files, but I suspect the TDEF line is
>>>>>> causing problems. I believe this gets set with your first open file. For
>>>>>> example, if you open a file and "set t 1", time will get set to some date
>>>>>> as defined in that control file. If the subsequent files don't have this
>>>>>> date defined you'll get the grid coordinate error. You could issue a "set
>>>>>> dfile" command to re-set the coordinates.
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>>
>>>>>> On 9/28/15 3:12 PM, Miquel Bernis wrote:
>>>>>>
>>>>>> Thanks a lot for your answer Jeff. I'm not sure how can I give more
>>>>>> clues about the error. There's no problem when I work with the files
>>>>>> separately, only when I operate between files in a different month. I
>>>>>> realized that there's something wrong about the time vars. When I open
>>>>>> consecutive files 24z, 30z, 36z, 42z... the first one has the right time
>>>>>> value, but the next ones shows a change of month, instead of just a 6h
>>>>>> advance:
>>>>>>
>>>>>> ga-> set t 1
>>>>>> Time values set: 2015:9:30:6 2015:9:30:6
>>>>>> ga-> set t 2
>>>>>> Time values set: 2015:10:30:6 2015:10:30:6
>>>>>> ga-> set t 3
>>>>>> Time values set: 2015:11:30:6 2015:11:30:6
>>>>>> ga-> set t 4
>>>>>> Time values set: 2015:12:30:6 2015:12:30:6
>>>>>> ga->
>>>>>>
>>>>>> If open the files separately there's no time problem. Kind of weird.
>>>>>>
>>>>>> Anyway, you suggested:
>>>>>>
>>>>>> "I would just use templates and do the sum over different time index
>>>>>> values"
>>>>>>
>>>>>> I'm sorry, I don't understand that. Maybe you can tell the same in
>>>>>> another way or with more details. It would be helpful.
>>>>>>
>>>>>> Thanks a lot again.
>>>>>> Miquel
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ,
>>>>>>
>>>>>> 2015-09-28 17:51 GMT+02:00 Jeff Duda < <jeffduda319 at gmail.com>
>>>>>> jeffduda319 at gmail.com>:
>>>>>>
>>>>>>> Perhaps some more information on the specifics of the problem would
>>>>>>> help us to troubleshoot. However, if you're summing precip totals from a
>>>>>>> single GFS run, I would just use templates and do the sum over different
>>>>>>> time index values.
>>>>>>>
>>>>>>> Jeff Duda
>>>>>>>
>>>>>>> On Mon, Sep 28, 2015 at 4:19 AM, Miquel Bernis <
>>>>>>> <bernisfeina at gmail.com>bernisfeina at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi everyone,
>>>>>>>>
>>>>>>>> I'm stucked in a problem that might be simple to fix, maybe any of
>>>>>>>> you could help me. The point is that I can't operate with files when
>>>>>>>> there's change of month. I'm working with GFS 0.25, and when I try to sum
>>>>>>>> the rain of the last file of month with the rain of the first file of the
>>>>>>>> moth ahead, it returns and error like this:
>>>>>>>>
>>>>>>>> Invalid grid coordinates
>>>>>>>> World coordinates convert to non-integer grid coordinates
>>>>>>>> Variable = apcpsfc Dimension = 3
>>>>>>>>
>>>>>>>> Has any of you a solution for that?
>>>>>>>> Thank you very much.
>>>>>>>> I'll really appreciate your help.
>>>>>>>>
>>>>>>>> Miquel
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> gradsusr mailing list
>>>>>>>> <gradsusr at gradsusr.org>gradsusr at gradsusr.org
>>>>>>>> <http://gradsusr.org/mailman/listinfo/gradsusr>
>>>>>>>> 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 listgradsusr at gradsusr.orghttp://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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> 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 listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>> --
>>> Jennifer M. Adams
>>> Center for Ocean-Land-Atmosphere Studies (COLA)
>>> 111 Research Hall, Mail Stop 2B3
>>> George Mason University
>>> 4400 University Drive
>>> Fairfax, VA 22030
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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/20151006/4763650c/attachment-0001.html
More information about the gradsusr
mailing list