-
Notifications
You must be signed in to change notification settings - Fork 5
/
desktopEnv
35 lines (28 loc) · 1.43 KB
/
desktopEnv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# this environment management script needs to be sourced in order to provide
# equivalent functionality on the MO Linux desktop to the Github CI environment.
# `. desktopEnv`
# Use the LFRic programming environment
module purge
module unuse /project/ukmo/rhel7/R/modulefiles; module unuse /project/ukmo/rhel7/fortran/opt/gfortran/modulefiles
module use /project/extrasoftware/modulefiles.rhel7
module use /data/users/lfric/software/modulefiles.rhel7
module load environment/lfric/gcc
# provide explicit paths to all XIOS components
export XIOS_INCDIR=$XIOS_R2252_2_ROOT/include
export XIOS_LIBDIR=$XIOS_R2252_2_ROOT/lib
export XIOS_BINDIR=$XIOS_R2252_2_ROOT/bin
# ensure netcdf is on the LD path & flags
export LD_LIBRARY_PATH=$NETCDF_4_8_1_ROOT/lib:$NETCDF_4_8_1_ROOT/lib64:$LD_LIBRARY_PATH
export LDFLAGS="-L$XIOS_LIBDIR -lxios -L$NETCDF_4_8_1_ROOT/lib -lnetcdf -L$NETCDF_4_8_1_ROOT/lib64 -lnetcdff -lstdc++"
export FCFLAGS="-g -I$XIOS_INCDIR -I$NETCDF_4_8_1_ROOT/include"
export FC=mpif90
# use an extend LFRic Python environment
# that includes netCDF4-python built w.r.t. the LFRIC
# netCDF
. /data/users/itmh/pylfricpyexptl/bin/activate
# dev-notes (starting from the lfric Python as provided by module)
# - python -m venv {/some/path}
# - python -m pip install cython mpi4py
# - python -m pip install --no-build-isolation netCDF4==1.5.8
# - pinned version needed for compatability with libnetcdf 4.8.1
# - . activate {/some/path}