Memory optimization (was Re: Performance tuning)

Stefan Gofferje gradsusers at GOFFERJE.HOMELINUX.ORG
Thu Sep 18 07:29:36 EDT 2008


Arlindo da Silva schrieb:

>     I already do some limiting in the download sript:
>
>
> From what I can tell you are selecting levels and variables, but still
> getting the whole globe.

The wgrib2 does some undefine :).

> If I recall well your meteograms are for a relatively confined region.
> Use lats4d to pull the data you want
>
> % lats4d -i filename -o subset -lon $lon1 $lon2 -lat $lat1 $lat2 -format
> grads_grib \
>               -func 'g2(@)' -v
>
> then run the meteogram script on the subset; ($lon1,$lat1,$lon2,$lat2)
> is your bounding box.
> (You can also run lats4d from within your chart rendering script; in
> this case omit "-i filename")
>
>
>     What would be an appropiate format to write the data to disk so another
>     script can easily read them?
>
>
> If using lats4d I'd use grib-1 (-format grads_grib).

Ok, so it would be like that:

while t <= 61 do
  download timestep
  start chart script for timestep
  cat to big grib2 file
done
lats4d big grib2 file to grib1 file
start meteogram script

?

Terve,
Stefan

--
Last words of a stormchaser:
"Where is that rotation on the radar?!"



More information about the gradsusr mailing list