FAQ — Frequently Asked Questions¶
I have weird errors (MPI?) when I try to read a FA file…
=> the
epygram.init_env()should be called at the beginning of your script(s), to be sure FA/ectrans underlying libraries do not use MPI, or uses OpenMP with an initialized environment.
I have weird ecCodes errors…
=> check environment variables
$[ECCODES|GRIB]_[SAMPLES|DEFINITION]_PATHand make sure they are consistent with your ecCodes install, or rather unset them
There is a field in my Surfex FA file, recognized as H2DField by
epygramwhereas it is a meta-data field; how can I manage to read it ?=> copy
$EPYGRAM_INSTALL_DIR/src/epygram/data/sfxflddesc_mod.F90into$HOME/.epygram/sfxflddesc_mod.F90, and add your field in there in the manner of another meta-data field of the same kind And warn theepygramteam about it, so that it will enter next version defaultsfxflddesc_mod.F90.
I need to overwrite the faFieldName.def ecCodes definition file for FA fieldnames conversion to GRIB2 parameters:
=> copy
$EPYGRAM_INSTALL_DIR/src/epygram/data/gribapi.def.??/as$HOME/.epygram/gribapi.def.99/, then edit$HOME/.epygram/gribapi.def.99/grib2/localConcepts/lfpw/faFieldName.defand set any field therein.
My PC does not have enough memory to deal with these global spectral fields…
>>> Legendre spectral transforms need XX.XX MB >>> memory, while only YY.YY MB is available: >>> SWAPPING prevented !
=> either:
run your script on supercomputers using the alias
s1batch='sbatch -N 1 -p normal256 --mem 250000 -t 00:30:00'e.g.:s1batch myscript.py options -of -my --scriptuse the
fa_sp2gp.pytool on supercomputers (using the above alias) to convert your file to all-gridpoint then work in gridpoint space
I have a brutal crash (e.g. SegFault) while working with some large size fields…
=> before running Python, you need to raise the stack size limit:
ulimit -s unlimited
How to hide LFI/FA messages ?
=> either:
export FA4PY_MUTE=1edit
$HOME/.epygram/userconfig.pyand setFA_mute_FA4py = True
How to modify values of parameters or options of ``epygram`` *configuration* ?
=> values of
epygram.configcan be modified in$HOME/.epygram/userconfig.py
How to modify the validity of a FA file ?
=> e.g. to set the cumulativeduration to 0:
fa_resource.modify_validity(basis=fa_resource.validity.get(), cumulativeduration=datetime.timedelta(0))
(to be continued…)