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

20030421: Problem trying to create hourly surface LI



Kevin,

Gridfiles must have the same projections in order to 
do computations on the grid points.

When you run OAGRID, it will create a CED projection where the
KX;KY is determined from the station spacing. But, surface and
upperair data have different station spacing. You should use
GDCFIL instead of OAGRID so that you can specify the same grid
navigations (or just use the same output grid file for
oabsfc and oabsnd).

When trying to do computations with surface and upperair with
model RUC data, you either have to grid your surface and upper air
data to the same navigation as the RUC file, or, you can use the
utility I created called "GDBIINT" to interpolate the necessary RUC
data fields to the other grid file projection).


As far as running scripts from cron and avoiding gplt problems,
you should create a unique work directory for each script so that
files are not stepped on. In a csh for example, I typically
create a WORK directory such as:

set WORKDIR=/tmp/gemwrk.$$
mkdir $WORKDIR
cd $WORKDIR
<do stuff>
gpend
cd /tmp
rm -rf $WORKDIR

The $$ above will be replaced by the process id so that your gemglb.nts and
last.nts files are not stepped on by other scripts.

Also, if you are using a single program, you can avoid the gplt processes by 
using the _gf and _nc programs which are linked directly to the device driver.

Finally, when multiple scripts are invoked at nearly the same time, you could 
be 
getting a race condition between the time when a message queue is asked for
and when it is opened....such that another program has also obtained the
same message queue id. If this is the case, then using a system of directory 
locks
to ensure that each script secures its queue id before another script is
allowed to proceed may be the best course. I typically do this when invoking
scripts from the LDM since restarting the LDM can cause a flurry (hours of )
of data to come in and kick off scripts many times when normally, you may 
expect the data to arrive perirodically (such as getting an hours worth
of nexrad data all at once, and expecting a gif to be generated for each.

Steve Chiswell


>From: "Kevin Polston" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200304212103.h3LL3S7U017481

>Hi,
>
>I've got a problem and I need some help. I am trying to create an hourly surfa
> ce
>lifted index using the observed 12Z or 00Z 500mb temps and also by using the R
> UC
>model's 500 mb temps as a "better" version of the hourly sfcli.  My problem is
>  I
>cannot seem to get the grids set up properly to do the calculation.
>
>Here are the steps I have followed so far:
>
> - on the hourly surface obs I run oagrid and create the LTMP and STHE
>parameters.  Then I run the OABSFC program with the same two parameters....sav
> ing
>this to a grid file.
>
>- For the observed upper air obs...I also run OAGRID, setting my level to 500 
> and
>my coordinate system to PRES and the paramter is TMPC. I save that to a differ
> ent
>grid file than what I saved the surface grid file to.
>
>- My next step was to try and merge the two data sets. I used the GDDIAG progr
> am
>and I believe I succesfully merged the two files. However.....when I ran GDPLO
> T2
>to actually do the calculation.....it didn't work. I was trying to subtract th
> e
>sfc LTMP at 16Z  from the TMPC at 500 mb at 12Z but the error message was that
>  it
>couldn't find the time  for the TMPC at 16Z.  I thought I had used the inline
>parameters properly to specify the height, level and time for the 500 mb TMPC 
> but
>apparently I am doing something wrong. I have tried many times but I seem to k
> eep
>hitting snags . From what I have read from the manual about GDDIAG it seems li
> ke
>it would be relatively simple to create another grid (surface or upper air) an
> d
>then add it to the existing grid.  But when I try the calculation that is wher
> e
>the problem comes in.
>
>I have a similar problem when I am trying to use my latest RUC file to create 
> a
>surface hourly LI. I have no problems gridding the surface data but how exactl
> y do
>I extract the 500 mb TMPC from the RUC?  I thought I had done it right one tim
> e
>but I got an error message stating I had different grid sizes. Well, I like my
>current grid area and would not want to change it.  What do I need to do to
>extract the 500mb RUC TMPC and then put it into my surface grid to create the
>hourly sfcli?
>
>Another problem I have noticed ....and it might be related to the version of L
> inux
>I am running.....is that when I run these scripts manually from a command prom
> pt
>they run perfectly. When I stick these scripts into the cron....they will run 
> for
>an hour or two and then I will have a buttload of msqid processes that prevent
>  the
>gempak programs from running. I am running GPEND at the end of my scripts. Why
>  is
>this happening and is there anyhting I can do about it?  It is annoying and
>baffling why it would run from the command line prompt just fine and not creat
> e
>any residual msqid processes but stick it into the cron and then it happens. I
>  am
>currently running Redhat Linux 7.3.
>
>I would appreciate your help with this.  Thanks.
>
>Kevin Polston
>Senior Instructor, NWSTC
>Kansas City MO 64152
>
>816-880-9314 ext 273
>