Opened 3 years ago

Last modified 2 years ago

#312 accepted Task

EMOSLIB to disappear on new HPC in Bologna

Reported by: pesei Owned by: anphi
Priority: major Milestone: flex_extract_v7.1.3
Component: flex_extract Version:
Keywords: Cc: anphi


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.

Change History (3)

comment:1 Changed 3 years ago by pesei

  • Status changed from new to accepted

Extraction of all entry points in (Debian package libemos0d) via

nm -D /usr/lib/x86_64-linux-gnu/ | 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:

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)

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))

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.


  1. 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.
  1. 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.
  1. Full fix:
  1. Either extract those parts from EMOSLIB which are actually needed and bundle them with calc_etadot, or rewrite the code to use fftw instead (recommended by ECMWF). For details of this library, see Ideally combined with 2. Quick fix.
  1. Install the EMOSLIB manually, even on ECMWF servers.

In any case, the documentation needs to be adapted.

Last edited 2 years ago by pesei (previous) (diff)

comment:2 Changed 3 years ago by pesei

Note that the FORD documentation does not properly recognise all of the external subroutines and functions:
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.

comment:3 Changed 2 years ago by anphi

  • Owner changed from pesei to anphi

I am going to work on option number 2 within the next couple months.

Note: See TracTickets for help on using tickets.
hosted by ZAMG