Opened 10 years ago
Last modified 7 years ago
#67 accepted New feature
Support for removing levels from EN files
Reported by: | pesei | Owned by: | anphi |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | FP input data | Version: | none |
Keywords: | Cc: |
Description
For tropospheric dispersion problems, atmospheric layers higher than ca. 100 hPa are rarely needed. However, they may have been extracted from ECMWF MARS into the EN files (some versions of the extraction routines haven't offered the option to take only a part of the levels).
This causes the EN files to be unnecessarily large, and it creates additional overhead in verttransform.f90 and calcpv.f90. As recent experiences have shown, with 1-h temporal resolution, these two subroutines can form a bottleneck. It is therefore worthwhile to offer fixes for this problem. Options:
- A script using the GRIB_API to remove certain layers
- An option in FLEXPART to not ingest certain layers.
Probably implementing both solutions would be best.
Change History (4)
comment:1 Changed 10 years ago by anphi
- Owner changed from somebody to anphi
- Status changed from new to accepted
comment:2 Changed 10 years ago by anphi
comment:3 Changed 8 years ago by pesei
Option 2 is now impemented in the lastest version of the extraction softwarew, see ticket:130
comment:4 Changed 7 years ago by dearn
If someone wants to do this without reextracting the files, the filter rule needs to be slightly different. It is important to note that, with the filter above, nlev_ec stays unmodified in the GRIB files, which means that gridcheck does not handle properly the a and b parameters for the vertical discretisation (actually I was getting running FLEXPART but with wrong FLEXPART model heights - the first one was corresponding to the second when running wiht the original uncut ECMWF GRIB files). In addition, I have had to pass the pv array explicitly ( where the coefficients a and b are stored) which means I first dumped the array using grib_dump -d, putting the array in the filter, and erasing those values not needed.
An example of the filter_rule to erase the uppermost ten levels is written here:
if (level > 10 ){ set PVPresent=1; set level = level - 10 ; set pv={ 4.2879241943e+01, 5.4955463409e+01, 6.9520576477e+01, 8.6895881653e+01, 1.0741574097e+02, 1.3142550659e+02, 1.5927940369e+02, 1.9133856201e+02, 2.2796894836e+02, 2.6953958130e+02, 3.1642074585e+02, 3.6898236084e+02, 4.2759249878e+02, 4.9261602783e+02, 5.6441345215e+02, 6.4333990479e+02, 7.2974414062e+02, 8.2396783447e+02, 9.2634490967e+02, 1.0372011719e+03, 1.1568536377e+03, 1.2856103516e+03, 1.4237701416e+03, 1.5716229248e+03, 1.7294489746e+03, 1.8975192871e+03, 2.0760959473e+03, 2.2654316406e+03, 2.4657705078e+03, 2.6773481445e+03, 2.9003913574e+03, 3.1351193848e+03, 3.3817436523e+03, 3.6404682617e+03, 3.9114904785e+03, 4.1949306641e+03, 4.4908173828e+03, 4.7991494141e+03, 5.1198950195e+03, 5.4529907227e+03, 5.7983447266e+03, 6.1560742188e+03, 6.5269467773e+03, 6.9118706055e+03, 7.3118691406e+03, 7.7274121094e+03, 8.1593540039e+03, 8.6085253906e+03, 9.0764003906e+03, 9.5626826172e+03, 1.0065978516e+04, 1.0584631836e+04, 1.1116662109e+04, 1.1660067383e+04, 1.2211547852e+04, 1.2766873047e+04, 1.3324668945e+04, 1.3881331055e+04, 1.4432139648e+04, 1.4975615234e+04, 1.5508256836e+04, 1.6026115234e+04, 1.6527322266e+04, 1.7008789062e+04, 1.7467613281e+04, 1.7901621094e+04, 1.8308433594e+04, 1.8685718750e+04, 1.9031289062e+04, 1.9343511719e+04, 1.9620042969e+04, 1.9859390625e+04, 2.0059931641e+04, 2.0219664062e+04, 2.0337863281e+04, 2.0412308594e+04, 2.0442078125e+04, 2.0425718750e+04, 2.0361816406e+04, 2.0249511719e+04, 2.0087085938e+04, 1.9874025391e+04, 1.9608572266e+04, 1.9290226562e+04, 1.8917460938e+04, 1.8489707031e+04, 1.8006925781e+04, 1.7471839844e+04, 1.6888687500e+04, 1.6262046875e+04, 1.5596695312e+04, 1.4898453125e+04, 1.4173324219e+04, 1.3427769531e+04, 1.2668257812e+04, 1.1901339844e+04, 1.1133304688e+04, 1.0370175781e+04, 9.6175156250e+03, 8.8804531250e+03, 8.1633750000e+03, 7.4703437500e+03, 6.8044218750e+03, 6.1685312500e+03, 5.5643828125e+03, 4.9937968750e+03, 4.4573750000e+03, 3.9559609375e+03, 3.4892343750e+03, 3.0572656250e+03, 2.6591406250e+03, 2.2942421875e+03, 1.9615000000e+03, 1.6594765625e+03, 1.3875468750e+03, 1.1432500000e+03, 9.2650781250e+02, 7.3499218750e+02, 5.6806250000e+02, 4.2441406250e+02, 3.0247656250e+02, 2.0248437500e+02, 1.2210156250e+02, 6.2781250000e+01, 2.2835937500e+01, 3.7578129768e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 3.8199999608e-08, 6.7607002165e-06, 2.4348000807e-05, 5.8921999880e-05, 1.1191429803e-04, 1.9857739971e-04, 3.4037968726e-04, 5.6155532366e-04, 8.8969792705e-04, 1.3528055279e-03, 1.9918379840e-03, 2.8571242001e-03, 3.9709536359e-03, 5.3778146394e-03, 7.1333767846e-03, 9.2614600435e-03, 1.1806022376e-02, 1.4815628529e-02, 1.8318451941e-02, 2.2354844958e-02, 2.6963520795e-02, 3.2176095992e-02, 3.8026399910e-02, 4.4547960162e-02, 5.1773015410e-02, 5.9728413820e-02, 6.8448252976e-02, 7.7958308160e-02, 8.8285736740e-02, 9.9461667240e-02, 1.1150465161e-01, 1.2444812804e-01, 1.3831289113e-01, 1.5312503278e-01, 1.6891041398e-01, 1.8568944931e-01, 2.0349121094e-01, 2.2233286500e-01, 2.4224400520e-01, 2.6324188709e-01, 2.8535401821e-01, 3.0859845877e-01, 3.3293908834e-01, 3.5825419426e-01, 3.8436332345e-01, 4.1112476587e-01, 4.3839120865e-01, 4.6600329876e-01, 4.9380031228e-01, 5.2161920071e-01, 5.4930114746e-01, 5.7669216394e-01, 6.0364806652e-01, 6.3003581762e-01, 6.5573596954e-01, 6.8064302206e-01, 7.0466899872e-01, 7.2773873806e-01, 7.4979656935e-01, 7.7079755068e-01, 7.9071676731e-01, 8.0953603983e-01, 8.2725608349e-01, 8.4388113022e-01, 8.5943180323e-01, 8.7392926216e-01, 8.8740754128e-01, 8.9990049601e-01, 9.1144818068e-01, 9.2209565639e-01, 9.3188077211e-01, 9.4085955620e-01, 9.4906443357e-01, 9.5654952526e-01, 9.6335172653e-01, 9.6951341629e-01, 9.7507840395e-01, 9.8007160425e-01, 9.8454189301e-01, 9.8849952221e-01, 9.9198400974e-01, 9.9500250816e-01, 9.9763011932e-01, 1.0000000000e+00}; write; #append; } if ( typeOfLevel is 'surface' || typeOfLevel is 'meanSea' ||typeOfLevel is 'heightAboveGround' || typeOfLevel is 'depthBelowLandLayer'){ #append; write; }
I already started to work on the first option:
I used the grib_filter command to cut out some levels of a gribfile.
The filter rule was:
In my test case it worked. Unfortunately, with a second test case it failed with the error message:
I am still working on this problem and contacted the ECMWF help desk.