amcz/hysplit_metdata

grib2arlscript

Tommy-EE opened this issue · 3 comments

Hey,

i have noticed that the grib2arlscript looks like this, e.g.:

${MDL}/era52arl -i./ERA5_2017.Jan03.3dpl.T1.grib -a./ERA5_2017.Jan03.2dpl.all.T1.grib 
mv DATA.ARL T1.ARL
mv ERA52ARL.MESSAGE MESSAGE.ERA5_20170103.ARL.T1 
cat T1.ARL > ERA5_20170103.ARL
rm T1.ARL

${MDL}/era52arl -i./ERA5_2017.Jan03.3dpl.T1.grib -a./ERA5_2017.Jan03.2dpl.all.T1.grib 
mv DATA.ARL T2.ARL
mv ERA52ARL.MESSAGE MESSAGE.ERA5_20170103.ARL.T2 
cat T2.ARL >> ERA5_20170103.ARL
rm T2.ARL

${MDL}/era52arl -i./ERA5_2017.Jan03.3dpl.T2.grib -a./ERA5_2017.Jan03.2dpl.all.T2.grib 
mv DATA.ARL T2.ARL
mv ERA52ARL.MESSAGE MESSAGE.ERA5_20170103.ARL.T2 
cat T2.ARL >> ERA5_20170103.ARL
rm T2.ARL

It is the right intend, that the T1.grib files get another time processed by the era52arl programm?

I thought it should more look like this:

${MDL}/era52arl -i./ERA5_2017.Jan03.3dpl.T1.grib -a./ERA5_2017.Jan03.2dpl.all.T1.grib 
mv DATA.ARL T1.ARL
mv ERA52ARL.MESSAGE MESSAGE.ERA5_20170103.ARL.T1 
cat T1.ARL > ERA5_20170103.ARL
rm T1.ARL

${MDL}/era52arl -i./ERA5_2017.Jan03.3dpl.T2.grib -a./ERA5_2017.Jan03.2dpl.all.T2.grib 
mv DATA.ARL T2.ARL
mv ERA52ARL.MESSAGE MESSAGE.ERA5_20170103.ARL.T2 
cat T2.ARL >> ERA5_20170103.ARL
rm T2.ARL

Are my assumptions correct or are there other things that need to be considered?

Thanks,
Thomas

amcz commented

You are right - it looks like there is an error in the script that it is writing it out twice.

Ah ok, thanks for you answer 👍
I did a work around by including:

    f3list = []
    f2list = []
    f2flist = []

into the loop, so its gone get a reset all the time and still counts as a vector, or is there an intention to retain a full list of all .grib file names?

Thanks for your work, it helps me a lot!
Thomas

amcz commented

I'm not sure what you are asking.
The basic idea is.

  1. Download the grib files (2d and 3d) in manageable chunks using the python scripts. For the global dataset I've found the grib files easier to download if downloading for less than a day. If I'm just downloading a smaller area then it usually works to download a whole day at a time.
  2. Input the grib files into the era52arl converter to get an ARL file.
  3. The step of concatenating the files is not necessary but is convenient - I like to have a days worth of data in my ARL files.
    ARL files are constructed so you can concatenate files. For instance if you have ARL file with data for Feb1, 2019 00 to 12z and one with Feb1 2019 13 to 23z then you can just cat the second file onto the first to get the whole day worth in one file.

Hope that helps.