[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020515: invalid grid in gdcntr



Chris,

On a quick look of your script,

1) you create the $WORK directory, but you never "cd" into that
durectory. So, when you create your symbolic links in $GEMDATA/tmp, 
you probably already have old links there and you may not be able to
overwrite them.

2) You won't have precip forecast grids for P06M (P06I) at f000,
so your ftime strings can be modified to eliminate that time.

See if your problem relates to your links and let me know,

Steve Chiswell
Unidata User Support



>From: Chris Hennon <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200205151605.g4FG5wa27652

>Hi Steve -
>
>I have a script that used to work, possibly on an older version of gempak.
>Now when it runs I get the following error:
>
>[GR -9]  Invalid grid or grid subset size.
>
>I've verified that the grids do exist, and the links to the grid files are
>valid.  Here's what the csh script looks like (it tries to make other
>fields too but I only included one of them) :
>
>#!/bin/csh
>
>source /home/gempak/GEMPAK5.6.e.1/Gemenviron
>
># Create a temporary directory for this process
>cd $GEMDATA/tmp
>set WORK=n-e.$$
>mkdir $WORK
>
>set YYYY = `date -u +%Y`
>set yy = `date -u +%y`
>set mm = `date -u +%m`
>set dd = `date -u +%d`
>set hh = `date -u +%H`
>set date = ${yy}${mm}${dd}
>
># Determine which time (00Z or 12Z) grid to process
>if( ${hh} > 15 || ${hh} < 4 ) then
>   set time = 12
>else set time = 00
>endif
>
># Create links to shorter filenames so that gempak can read the input
># file line (< 72 characters)
>ln -s $HDS/${YYYY}${mm}${dd}${time}_ngm_grid211.gem ngm
>ln -s $HDS/${YYYY}${mm}${dd}${time}_eta_grid211.gem eta
>
># Define the variables
>set glevel = sfc
>set model = n-e
>set device = gf
>
>#  Set the DISPLAY
>if( ${device} == "gf" ) then
>   setenv DISPLAY twister:1.0
>else
>   setenv DISPLAY twister:0.0
>endif
>
>set NGMFILE = ngm
>set ETAFILE = eta
>
>foreach ftime( f000 f006 f012 f018 f024 f030 f036 f042 f048 )
>
>set output =
>"${device}|$MODHTML/models/differences/${model}_${glevel}_${ftime}.gif"
>
>gdcntr << EOF
> GDATTIM  = ${ftime}
> GLEVEL   = 0
> GVCORD   = PRES
> GFUNC    = sm9s(sm9s(sub(P06I+1,P06I+2)))
> GDFILE   = $NGMFILE + $ETAFILE
> CINT     = -.6;-.55;-.5;-.45;-.4;-.35;-.3;-.25;-.2;-.15;-.1;-.05;0
> LINE     = 4
> MAP      = 32
> TITLE    = 4//(NGM - ETA) Previous 6-hr Precip (in) Valid at ~
> DEVICE   = ${output}
> SATFIL   =
> RADFIL   =
> PROJ     = lcc
> GAREA    = 12;-115;60;-52
> CLEAR    = NO
> PANEL    = b
> TEXT     = .8/32//HW
> SCALE    = 0
> LATLON   = 0
> HILO     =
> HLSYM    =
> CLRBAR   = 32/v/cc/.2;.5/.8
> CONTUR   = 0
> SKIP     = 0
> FINT     =
>.01;.02;.03;.04;.05;.10;.15;.20;.25;.30;.35;.40;.45;.50;.55;.60
> FLINE    = 0;27-7
> CTYPE    = C/F
> LUTFIL   = DEFAULT
> STNPLT   =
>r
>
>e
>EOF
>
>if( ${device} == "gf" ) then
>   gpend
>endif
>
>end
>
>
># Remove temporary directory
>cd $GEMDATA/tmp/$WORK
>rm -f *
>cd ..
>rmdir $WORK
>
>------------------------------------------------------------------
>
>Do you see anything suspicious?  Thanks.
>
>Chris
>
>================================================
>| Chris Hennon        Ohio State University   |
>| Tropical Meteorology      address@hidden   |
>|                                              |
>| Dept of Geography   Office: 1155 Derby Hall  |
>| 1036 Derby Hall     Phone : (614) 292-2704   |
>| Columbus, OH 43210  Fax   : (614) 292-6213   |
>================================================
>