Potential bug(?) in GrADS when sub-hour data-file names are generated from template

Jennifer M. Adams jma at COLA.IGES.ORG
Wed Jun 28 13:27:05 EDT 2006


Henryk,
Thanks for the clear explanation of the problem. I was able to
reproduce it and will dig a little deeper to see why the %f template
isn't getting the hour right. In the meanwhile, change the %f2 in
your template string to %h2 and it should work fine.
Jennifer

On Jun 26, 2006, at 7:49 PM, Henryk Modzelewski wrote:

> Hi,
>
> Let me explain shortly. Quite recently we increased the frequency of
> our NWP output to 30 minutes (from 1 hour). We have been using GrADS
> for years and they worked perfectly fine with hourly output based on
> template option, but have problems with sub-hourly. Basically, I
> suspect that GrADS gets the data from the wrong file whenever time
> index ('set t' with template) does not point to an equal hour.
>
> To investigate, I have got the source code for 1.9 (although we use
> 1.8 daily) from the web page and compiled gradsc on Linux system. I
> added extra print statement just before 'return (fnout);' in gafndt
> (gautil.c). The .ctl file and the result of print statement are
> below. You will notice that whenever the filename is for the data-
> file off an equal hour, then an extra hour is added to the forecast
> time; the first off-hour file is skipped (g4.0606210000_0130.dat
> instead of g4.0606210000_0030.dat), and the one-before-last is beyond
> the length of the forecast (g4.0606210000_6030.dat instead of File
> from template g4.0606210000_5930.dat).
>
> I did not have a chance to get to the source of the problem, but I
> identified the same behavior for Irix and Mac OS, so it does not seem
> to be platform specific.
>
> Am I doing something wrong in the template? I would appreciate any
> help and/or suggestions.
>
> Here is my .ctl:
> ++++++++++++++++++
> DSET ^g4.%iy2%im2%id2%ih2%in2_%f2%n2.dat
> OPTIONS template
> TITLE MM5 data
> OPTIONS big_endian
> UNDEF -9999.
> PDEF  210  153 nps     453.5852661    1113.1054688
> -105.0000000       4.0000000
> XDEF   210 LINEAR     -130.2394409       0.0616600
> YDEF   127 LINEAR       46.0058861       0.0566101
> ZDEF  16 LEVELS
> 1001.00
> 1000.00
>   975.00
>   950.00
>   925.00
>   900.00
>   850.00
>   800.00
>   750.00
>   700.00
>   600.00
>   500.00
>   400.00
>   300.00
>   250.00
>   200.00
> TDEF   121 LINEAR 00:00Z21JUN2006   30MN
> VARS 38
> PCPCONV    0 99 1hr accum conv pcn (
> PCPTOT     0 99 1hr accum non-c pcn
> PCPCONVAC  0 99 accum conv pcn (mm)
> PCPTOTAC   0 99 accum non-c pcn (mm)
> D2TOPO     0 99 ter elevation (m)
> LAT        0 99 cross lat (degree)
> LON        0 99 cross lon (degree)
> ZPBL       0 99 pbl height (m)
> SFCTC      0 99 2 m temperature (C)
> SFCQ       0 99 2 m mixing ratio (kg
> SFCU       0 99 10 m u wind (kts)
> SFCV       0 99 10 m v wind (kts)
> CAPE       0 99        CAPE (J/Kg)
> SP         0 99    sfc pressure (mb)
> SFCRH      0 99       surface rh (%)
> PCPSOLID   0 99  1hr solid preci(mm)
> PCPLIQ     0 99  1hr liquid preci (m
> PCPSOLIDAC 0 99 Accum. solid preci(m
> PCPLIQAC   0 99  Accum. liquid preci
> MSLP       0 99 sea level prs (mb)
> cref       0 99 composite refl (dbz)
> clfrlo     0 99 low cloud fraction
> clfrmi     0 99 mid cloud fraction
> clfrhi     0 99 high cloud fraction
> U         16 99 u wind (kts)
> V         16 99 v wind (kts)
> WP        16 99 vertical vel (Pa/s)
> W         16 99 vertical vel (m/s)
> TC        16 99 temperature (C)
> Z         16 99 geopot height (dam)
> TDC       16 99 dewpoint temp (C)
> RH        16 99 rel humidity (%)
> TH        16 99 potential temp (K)
> vor       16 99 vorticity (s-1)
> DBZ       16 99 reflectivity (dbz)
> div       16 99 divergence (s-1)
> dir       16 99 dir (degrees)
> CLOUD     16 99  cloud dimensionless
> ENDVARS
> ++++++++++++++++++
>
> Here is what extra print statement in gafndt shows:
> ==================
> File from template g4.0606210000_0000.dat
> File from template g4.0606210000_0130.dat
> File from template g4.0606210000_0100.dat
> File from template g4.0606210000_0230.dat
> File from template g4.0606210000_0200.dat
> File from template g4.0606210000_0330.dat
> File from template g4.0606210000_0300.dat
> File from template g4.0606210000_0430.dat
> File from template g4.0606210000_0400.dat
> File from template g4.0606210000_0530.dat
> File from template g4.0606210000_0500.dat
> File from template g4.0606210000_0630.dat
> File from template g4.0606210000_0600.dat
> File from template g4.0606210000_0730.dat
> File from template g4.0606210000_0700.dat
> File from template g4.0606210000_0830.dat
> File from template g4.0606210000_0800.dat
> File from template g4.0606210000_0930.dat
> File from template g4.0606210000_0900.dat
> File from template g4.0606210000_1030.dat
> File from template g4.0606210000_1000.dat
> File from template g4.0606210000_1130.dat
> File from template g4.0606210000_1100.dat
> File from template g4.0606210000_1230.dat
> File from template g4.0606210000_1200.dat
> File from template g4.0606210000_1330.dat
> File from template g4.0606210000_1300.dat
> File from template g4.0606210000_1430.dat
> File from template g4.0606210000_1400.dat
> File from template g4.0606210000_1530.dat
> File from template g4.0606210000_1500.dat
> File from template g4.0606210000_1630.dat
> File from template g4.0606210000_1600.dat
> File from template g4.0606210000_1730.dat
> File from template g4.0606210000_1700.dat
> File from template g4.0606210000_1830.dat
> File from template g4.0606210000_1800.dat
> File from template g4.0606210000_1930.dat
> File from template g4.0606210000_1900.dat
> File from template g4.0606210000_2030.dat
> File from template g4.0606210000_2000.dat
> File from template g4.0606210000_2130.dat
> File from template g4.0606210000_2100.dat
> File from template g4.0606210000_2230.dat
> File from template g4.0606210000_2200.dat
> File from template g4.0606210000_2330.dat
> File from template g4.0606210000_2300.dat
> File from template g4.0606210000_2430.dat
> File from template g4.0606210000_2400.dat
> File from template g4.0606210000_2530.dat
> File from template g4.0606210000_2500.dat
> File from template g4.0606210000_2630.dat
> File from template g4.0606210000_2600.dat
> File from template g4.0606210000_2730.dat
> File from template g4.0606210000_2700.dat
> File from template g4.0606210000_2830.dat
> File from template g4.0606210000_2800.dat
> File from template g4.0606210000_2930.dat
> File from template g4.0606210000_2900.dat
> File from template g4.0606210000_3030.dat
> File from template g4.0606210000_3000.dat
> File from template g4.0606210000_3130.dat
> File from template g4.0606210000_3100.dat
> File from template g4.0606210000_3230.dat
> File from template g4.0606210000_3200.dat
> File from template g4.0606210000_3330.dat
> File from template g4.0606210000_3300.dat
> File from template g4.0606210000_3430.dat
> File from template g4.0606210000_3400.dat
> File from template g4.0606210000_3530.dat
> File from template g4.0606210000_3500.dat
> File from template g4.0606210000_3630.dat
> File from template g4.0606210000_3600.dat
> File from template g4.0606210000_3730.dat
> File from template g4.0606210000_3700.dat
> File from template g4.0606210000_3830.dat
> File from template g4.0606210000_3800.dat
> File from template g4.0606210000_3930.dat
> File from template g4.0606210000_3900.dat
> File from template g4.0606210000_4030.dat
> File from template g4.0606210000_4000.dat
> File from template g4.0606210000_4130.dat
> File from template g4.0606210000_4100.dat
> File from template g4.0606210000_4230.dat
> File from template g4.0606210000_4200.dat
> File from template g4.0606210000_4330.dat
> File from template g4.0606210000_4300.dat
> File from template g4.0606210000_4430.dat
> File from template g4.0606210000_4400.dat
> File from template g4.0606210000_4530.dat
> File from template g4.0606210000_4500.dat
> File from template g4.0606210000_4630.dat
> File from template g4.0606210000_4600.dat
> File from template g4.0606210000_4730.dat
> File from template g4.0606210000_4700.dat
> File from template g4.0606210000_4830.dat
> File from template g4.0606210000_4800.dat
> File from template g4.0606210000_4930.dat
> File from template g4.0606210000_4900.dat
> File from template g4.0606210000_5030.dat
> File from template g4.0606210000_5000.dat
> File from template g4.0606210000_5130.dat
> File from template g4.0606210000_5100.dat
> File from template g4.0606210000_5230.dat
> File from template g4.0606210000_5200.dat
> File from template g4.0606210000_5330.dat
> File from template g4.0606210000_5300.dat
> File from template g4.0606210000_5430.dat
> File from template g4.0606210000_5400.dat
> File from template g4.0606210000_5530.dat
> File from template g4.0606210000_5500.dat
> File from template g4.0606210000_5630.dat
> File from template g4.0606210000_5600.dat
> File from template g4.0606210000_5730.dat
> File from template g4.0606210000_5700.dat
> File from template g4.0606210000_5830.dat
> File from template g4.0606210000_5800.dat
> File from template g4.0606210000_5930.dat
> File from template g4.0606210000_5900.dat
> File from template g4.0606210000_6030.dat
> File from template g4.0606210000_6000.dat
> ==================
>
> Thanks,
> Henryk
> _______________________________________________________
> Henryk Modzelewski
>   UBC EOS, Atmospheric Science Programme
>   #224-6339 Stores Road, Vancouver, BC V6T 1Z4, Canada
>     E-mail : hmodzelewski at eos.ubc.ca
>     Office : 604 822 4760
>     Mobile : 604 341 0531
>     Fax : 604 822 6088
>
> "For what are we left with if there remains no mystery?
> What hope might we find if we know all of the answers?"
>                                         Drizzt Do'Urden
> _______________________________________________________
>

Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Beltsville, MD 20705
jma at cola.iges.org



More information about the gradsusr mailing list