EMOSLIB to disappear on new HPC in Bologna
EMOSLIB has been retired by ECMWF and it will not be provided on the new HPC system in Bologna, which should become operational around March or April 2022.
Emoslib is used in the Fortran code of flex_extract. It should be checked what exactly is used and necessary changes should be implemented.
Extraction of all entry points in libemosR64.so.0d
(Debian package libemos0d) via
nm -D /usr/lib/x86_64-linux-gnu/libemosR64.so.0d | grep T | cut -d\ -f3 | sed "s/_//" > emoslib
and then search the Fortran files in flex_extract_v7.1.2/Source/Fortran/
for all of them. We find:\
fft99
grphreal.f90: CALL FFT99(CXM,WSAVE,TRIGS,IFAX,1,1,MAXL,1,-1) phgrreal.f90: CALL FFT99(CXM,WSAVE,TRIGS,IFAX,1,1,MAXL,1,1)
jsppole
calc_etadot.f90: CALL JSPPOLE(XMN(:,K),1,MNAUF,.TRUE.,CUA(:,:,K)) calc_etadot.f90: CALL JSPPOLE(XMN(:,MLEVEL+K),1,MNAUF,.TRUE.,CVA(:,:,K))
calc_etadot.f90: CALL JSPPOLE(XMN(:,K),-1,MNAUF,.TRUE.,CUA(:,3:4,K))
calc_etadot.f90: CALL JSPPOLE(XMN(:,MLEVEL+K),-1,MNAUF,.TRUE.,CVA(:,3:4,K))
set99
calc_etadot.f90: CALL SET99(WSAVE,IFAX,mauf)
calc_etadot.f90: CALL SET99(GWSAVE(1,J),GIFAX(1,J),MLAT(J))
fft99
calculates the FFT, set99
initialises for the FFT, and jsppole
calculates some Fourier coefficients.
This code is only executed with the setting GAUSS 1.
As explained in the documentation, this is required only if using ERA-40, ERA-Interim or operational data prior to September 2008.
Options
- Very quick fix: Provide do-nothing versions of these three subroutines in order to remove the dependency on EMOSLIB, and disable usage of GAUSS 1. Problem: Few cases where someone need this.
- Quick fix: Replace the Fortran code by calls to eccodes form a Python programme integrated with the rest of flex_extract. Problem: same as above. Advantage: clean solution that will speed up the execution and simplify installation.
- Full fix:
- Either extract those parts from EMOSLIB which are actually needed and bundle them with
calc_etadot
, or rewrite the code to usefftw
instead (recommended by ECMWF). For details of this library, see https://www.fftw.org/. Ideally combined with 2. Quick fix. - Install the EMOSLIB manually, even on ECMWF servers.
In any case, the documentation needs to be adapted.
Note that the FORD documentation does not properly recognise all of the external subroutines and functions: https://www.flexpart.eu/flex_extract/Documentation/Api/Fortran/lists/procedures.html
jsppole is not found, and a number of arrays is erroneously identifed as calls to external program units. We used v6.0, now there is 6.1.6, could try again.
Anne said: I am going to work on option number 2 within the next couple months.