Problems running ioda_connverter on HERA

Hi, new to JEDI here.

I just built the jedi-bundle on HERA, with the -DBUILD_IODA_CONVERTERS=ON option. After some experimentation with modules and configurations, the process went (mostly) without errors.
Once the building process is done, I can see the *.py converter files in the bin directory. However, when I try to run the converter I keep getting the following error:

File “/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi-bundle/iodaconv/src/pyiodaconv/ioda_conv_engines.py”, line 3, in
from pyioda import ioda_obs_space as ioda_os
ModuleNotFoundError: No module named ‘pyioda’

I can’t find pyioda in the build folder nor as a separate repository in GitHub.
The way I setup my environment is:

export JEDI_ROOT=/scratch2/BMC/gsienkf/Joao.Souza/jedi
export JEDI_SRC=$JEDI_ROOT/jedi-bundle
export JEDI_BUILD=$JEDI_ROOT/jedi_build
export PYTHONPATH=$PYTHONPATH:/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi_build/iodaconv/src/pyiodaconv
export PYTHONPATH=$PYTHONPATH:/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi-bundle/iodaconv/src
export PYTHONPATH=$PYTHONPATH:/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi-bundle/ioda/src
export PYTHONPATH=$PYTHONPATH:/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi-bundle/ioda/src/python/pyiodautils
export PYTHONPATH=/scratch2/BMC/gsienkf/Joao.Souza/jedi/jedi_build/lib/python3.11:$PYTHONPATH

module purge
module use /scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles
module load miniconda/3.9.12
module load ecflow

#HERA specific
module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.7.0/envs/ue-intel/install/modulefiles/Core
module load stack-intel/2021.5.0
module load stack-intel-oneapi-mpi/2021.5.1
module load stack-python/3.10.13

#Prepare environment
module load jedi-fv3-env
module load ewok-env
module load soca-env
module load sp
module unload fms
module load fms/2023.04

I saw in one of the topics that a separate ioda-bundle is necessary for the converters. My thouth was that this would be included in when building the whole jedi-bundle (and I can see ioda in there!). I wonder if there is something in ioda-bundle that is - for some reason - not included in the jedi-bundle…
Any help will be appreciated!

Cheers

Joao

I’m also new to JEDI, but I ran into the same problem when I build the ioda-converters software.

I found the README documents for ioda-converters had suggestions on setting PYTHONPATH that did not work for me. Instead I did this:

export PYTHONPATH=$PYTHONPATH:$IODA_BUNDLE/build/lib/python3.10

In my case, $IODA_BUNDLE is the top level directory of the bundle used to gather all the necessary repos for ioda-converters, and $IODA_BUNDLE/build is the build directory for that bundle. However, you layout of directories might be a bit different.

The development container I used had python3.10 as the version of python, so the python modules were placed under the python3.10 directory. If you have a different version of python, this python direcotry might have a different name for you.

To confirm the details, I would suggest looking under the “lib” subdirectory under your build directory. There should be a directory named for some version of python, e.g. python3.10. This directory should have directories called pyioda and pyiodautils. Ultimately, having PYTHONPATH include the parent directory that contains pyioda and pyiodautils subdirs should fix your problem.

I hope this helps!

Yours,
Steve Marshall

Thank you, Steve, for the reply.

I already have the “…/lib/python3.11” folder in my $PYTHONPATH
Also, I am not using a container since I am working in HERA (loading the spack-stack modules).

Therefore, my problem persists!

Alternatively, I am building with a colleague a new container based on the development one. The idea is to be able to run the IODA_CONVERTERS and the observation operators in UFO in any linux machine (locally). So the new container will have JEDI already installed.
But I imagine there must be a way I am not seeing to make it work in HERA!

So, it would be amazing if someone running JEDI in this machine (HERA, or ORION/GAEA) could give some hints!

Cheers

Joao