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

20040414: Vietnam and GEMPAK GRIB decoding (cont.)



>From: Mai Nguyen <address@hidden>
>Organization: National Center for Hydro-Meteorological Forecasting of Vietnam
>Keywords: 200312020023.hB20N4p2027742 IDD LDM Linux GEMPAK

Mai,

I have a quick question:

Are the latitudes and longitudes in the file
~ldm/VNdata/SYNOP/VN_Synstns.txt in degrees and minutes or in degrees
and fractional degrees?  GEMPAK tables need degrees and fractional
degrees.  A quick look a the entries in VN_Synstns.txt seems to
indicate that the latitudes and longitudes are in degrees and minutes.
If this is true, they must be translated to degrees and fractional
degrees.  Please see below for more information.

Here is what I am doing at the moment:

- created the directories ~gempak/etc and ~gempak/util

- copied the station information you incorporated
  into $GEMTBL/stns/lsfstns.tbl into ~gempak/etc/lsystns.vn

  modified the entries in lsystns.vn to use the incorrect station ID
  number (e.g., 48/01) as a station ID.  Since you had already changed
  the '/'s to '7's, I did not need do that.  The reason creating a
  station ID is by specifying the station IDs as the old, incorrect ID
  number, you have a record of the mapping of new station ID number to
  old station ID number.

  changed tab characters at the beginning of lines to spaces (the
  GEMPAK table white space is all spaces; tabs are not allowed).

- copied the Tcl script cvtVNsyn.tcl to ~gempak/util

- added /home/gempak/util to the PATH for the user 'gempak'

I am just about to add the code to merge your Vietnam station table
entries with the GEMPAK synoptic station table entries in
cvtVNsyn.tcl.  As I said in my previous email, I think that it is
better to create a new station table each time the Tcl script is run
than to modify an existing GEMPAK table.  This way you won't have to
remember to update the GEMPAK table(s) when you install a new release.

What I need before I proceed is a clear understanding of the format of
the latitude and longitude data in VN_Synstns.txt.  If they are in
degrees and minutes, I will convert the numbers to degrees and
fractional degrees.  If they are already in degrees and fractional
degrees, I will leave the numbers alone.

After I finish generating a combined station table in cvtVNsyn.tcl, I
will add code to run the GEMPAK decoder.  My objective is for you to be
able to run the script and specify the input and output files on
the command line.  An invocation will look something like:

cvtVNsyn.tcl /home/nadata/ldm/raw/synoptic/AAXX00 
/home/nadata/ldm/gempak/syn/YYYYMMDD_syn.gem

and this invocation will:

- regularize the observations in /home/nadata/ldm/raw/synoptic/AAXX00
  (the location and file name will not matter; the file only has to
  be readable).  The regularized report will be written to /tmp

- create a new, combined station table from $GEMTBL/stns/lsfstns.tbl
  and /home/gempak/etc/lsystns.vn and write the combined table to /tmp

- run the GEMPAK dclsfc decoder which will decode observations from
  the converted AAXXnn file (again, file name and location are not
  important) and put the output in the GEMPAK file that is created by
  the ~ldm/etc/pqact.con action that decodes global synoptic data

At this point you should be able to plot all of your data on any map
you like.

So, as soon as I have your answer on th eformat of the latitude and
longitude data, I will be able to finish the script.

Cheers,

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.