Need a bright idea - how to create a new grid file from multiple single files

Stefan Gofferje gradsusers at GOFFERJE.HOMELINUX.ORG
Fri Mar 21 06:20:17 EDT 2008


Hei,

I have another topic which I didn't get straight yet.
On my hoster's webserver, gradsdods / gradsdap doesn't run due to
lacking libraries. Only grads without almost anything runs.

I am plotting seven day temperature curves for all Finnish regional
capitals from GFS data. Currently, I use DODS for that (all timesteps in
one file) but due to the mentioned restrictions, I have to plot those at
home and upload them to the server. Pretty bad thing - I have a noisy
machine in the living room running 24/7... :).

The weather charts for the timesteps on the webserver, I generate via a
script sequence where a bash-script cycles through calling get_gfs.pl
and then grads with the chart-plotting script and the ctl-file name as
parameters. After the charts for the timestep are plotted, the grib
files are deleted and the next is downloaded - and so on:

---
if [ "$1" = "18" ] ; then {
  DATE=$(date -d yesterday +"%Y%m%d")
  DATE2=$(date -d yesterday +"%y%m%d")
}
else {
  DATE=$(date +"%Y%m%d")
  DATE2=$(date +"%y%m%d")
}
fi

RUN="${1}"
RUNTIME=$(date +"%HZ%d%b%Y" -d "${DATE2} ${RUN}00" | tr [:lower:]\
[:upper:])
i=0

while [ $i -le 180 ]; do

  $GETGFS data ${DATE}${RUN} $i $i 0 all 'TMP.(2 m above ground\
  |850 mb)|RH.2 m above ground|PRMSL.mean sea level\
  |CAPE.180-0 mb|4LFTX.surface|CIN.180-0 mb\
  |UGRD.(10 m above ground|500 mb|700 mb|850 mb|925 mb)\
  |VGRD.(10 m above ground|500 mb|700 mb|850 mb|925 mb)\
  |PRATE.surface|CSNOW.surface|CRAIN.surface' ${GRIBDIR}

  if [ $i -lt 10 ]; then
    FILENAME="${GRIBDIR}/gfs.t${RUN}z.pgrb2f0${i}"
  else
    FILENAME="${GRIBDIR}/gfs.t${RUN}z.pgrb2f${i}"
  fi

  $G2CTL -verf ${FILENAME} > ${FILENAME}.ctl

  $GRIBMAP -i ${FILENAME}.ctl

  $PROCESSDATA ${FILENAME}.ctl ${RUNTIME} ${i}

  rm ${FILENAME}*

  i=$(echo "$i+3"|bc)

done
---

Is it possible to create some kind of own grid file and append the data
with each of the steps and finally use this for plotting the value-time
graphs?

Or what would be a clever solution?

Tervehdys Suomesta,
Stefan Gofferje

--
Since light travels faster than sound, is that why some people appear
bright until you hear them speak?



More information about the gradsusr mailing list