Regridding Files

Hi, I am trying to regrid some files using the scripts in this github ukca/README.md at master · theabro/ukca · GitHub and on the UKCA tutorials on ARCHER2. Previously this has worked fine, but I think the environments must have changed on ARCHER2 as when I have installed the packages listed in the README file, I still cannot get the script to run!

Anyone had any luck running these on ARCHER2?

Thanks,
Hannah

Hi Hannah,

Are you using the UMvn13.0 scripts, or other ones?

If you are not using the UM13.0 ones these are very old and many need a lot of work to get them usable. I’m afraid that I’m not sure exactly what versions of the various packages were used.

The UM13.0 notebooks are about 3 years old and there the packages used were installed as follows:

PATH=~/miniconda3/bin:$PATH mamba install cf-python==3.13.1 cf-plot==3.1.28 udunits2 cartopy==0.20.0 cfdm=1.9.0.4 mpich esmpy iris mo_pack cf-units==3.1.1 cftime==1.6.2 matplotlib==3.5.2 nc-time-axis ipython jupyter jupyterlab -c conda-forge -y

as defined here.

Best wishes,
Luke

Hi Luke,

Thanks! I was trying to use the 11.8 version. What is the best way do you think of running these on Archer2? Or is there a better way of regridding files?

Thanks,
Hannah

Hi Hannah,

In the scripts directory there are .py versions of all the notebooks. I would suggest either using the cf-python or Iris version to regrid files and make up emissions files (assuming that is what you want to do). See the UKCA emissions tutorial for further information.

Best wishes,
Luke

Hi Luke,

I set up a virtual environment with those packages through conda install -c conda-forge cf-python==3.13.1 cf-plot==3.1.28 udunits2 cartopy==0.20.0 cfdm=1.9.0.4 mpich esmpy iris mo_pack cf-units==3.1.1 cftime==1.6.2 matplotlib==3.5.2 nc-time-axis ipython jupyter jupyterlab and tried running the script (cf) but I got the error ‘RuntimeError: Regridding methods will not work unless the ESMF library is installed’. I tried adding this library as conda install esmf but still got the same error?

I also tried the iris script but this had many errors related to the np version etc. so I assume the miniconda3 link is for the cf one?

Sorry for all the questions! When I did this a few years ago it worked first time so am having a puzzle with this.

Best,
Hannah

Hi Hannah,

I’m afraid that I’m probablyt not the best person to debug python environments. The ESMF should have been fixed with esmpy being installed I think.

As for Iris, it’s probably taking a too-modern version. I have checked at the full listing of all packages used in this python environment is below. You can install this by saving this list to a text file (e.g. ukca_vn13.txt) and then installing it with the command

conda install --file ukca_vn13.txt -c conda-forge -y

Best wishes,
Luke

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex=0.1=conda_forge
_openmp_mutex=4.5=2_kmp_llvm
alsa-lib=1.2.3.2=h166bdaf_0
anaconda-anon-usage=0.4.4=py312hfc0e8ea_100
antlr-python-runtime=4.7.2=py39hf3d152e_1003
anyio=3.6.2=pyhd8ed1ab_0
archspec=0.2.3=pyhd3eb1b0_0
argon2-cffi=21.3.0=pyhd8ed1ab_0
argon2-cffi-bindings=21.2.0=py39hb9d737c_3
asttokens=2.1.0=pyhd8ed1ab_0
attrs=22.1.0=pyh71513ae_1
babel=2.11.0=pyhd8ed1ab_0
backcall=0.2.0=pyh9f0ad1d_0
backports=1.0=py_2
backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
beautifulsoup4=4.11.1=pyha770c72_0
bleach=5.0.1=pyhd8ed1ab_0
boltons=23.0.0=py312h06a4308_0
brotli=1.0.9=h166bdaf_8
brotli-bin=1.0.9=h166bdaf_8
brotli-python=1.0.9=py312h6a678d5_8
brotlipy=0.7.0=py39h27cfd23_1003
bzip2=1.0.8=h7f98852_4
c-ares=1.18.1=h7f98852_0
ca-certificates=2022.9.24=ha878542_0
cartopy=0.20.0=py39ha48bd0d_2
certifi=2022.9.24=pyhd8ed1ab_0
cf-plot=3.1.28=pyhd8ed1ab_0
cf-python=3.13.1=py39hb9d737c_0
cf-units=3.1.1=py39h2ae25f5_2
cf-view=3.2.25=pypi_0
cfdm=1.9.0.4=py39hf3d152e_1
cffi=1.15.1=py39h74dc2b5_0
cftime=1.6.2=py39h2ae25f5_1
cfunits=3.3.5=pyhd8ed1ab_0
charset-normalizer=2.0.4=pyhd3eb1b0_0
click=8.1.3=unix_pyhd8ed1ab_2
cloudpickle=2.2.0=pyhd8ed1ab_0
conda=22.9.0=py39hf3d152e_2
conda-content-trust=0.2.0=py312h06a4308_1
conda-libmamba-solver=24.11.0=pyhd8ed1ab_0
conda-package-handling=1.9.0=py39h5eee18b_1
conda-package-streaming=0.10.0=py312h06a4308_0
cpp-expected=1.1.0=hf52228f_0
cryptography=38.0.1=py39h9ce1e76_0
curl=7.86.0=h2283fc2_1
cycler=0.11.0=pyhd8ed1ab_0
dask-core=2022.10.2=pyhd8ed1ab_0
dbus=1.13.6=h5008d03_3
debugpy=1.6.3=py39h5a03fae_1
decorator=5.1.1=pyhd8ed1ab_0
defusedxml=0.7.1=pyhd8ed1ab_0
distro=1.9.0=py312h06a4308_0
entrypoints=0.4=pyhd8ed1ab_0
esmf=8.2.0=mpi_mpich_h5a1934d_102
esmpy=8.2.0=mpi_mpich_py39h8bb458d_101
executing=1.2.0=pyhd8ed1ab_0
expat=2.5.0=h27087fc_0
flit-core=3.8.0=pyhd8ed1ab_0
fmt=9.1.0=h924138e_0
font-ttf-dejavu-sans-mono=2.37=hab24e00_0
font-ttf-inconsolata=3.000=h77eed37_0
font-ttf-source-code-pro=2.038=h77eed37_0
font-ttf-ubuntu=0.83=hab24e00_0
fontconfig=2.14.1=hc2a2eb6_0
fonts-conda-ecosystem=1=0
fonts-conda-forge=1=0
fonttools=4.38.0=py39hb9d737c_1
freetype=2.12.1=hca18f0e_0
frozendict=2.4.2=py312h06a4308_0
fsspec=2022.11.0=pyhd8ed1ab_0
geos=3.9.1=h9c3ff4c_2
gettext=0.21.1=h27087fc_0
glib=2.74.1=h6239696_1
glib-tools=2.74.1=h6239696_1
gst-plugins-base=1.20.2=hcf0ee16_0
gstreamer=1.20.3=hd4edc92_2
hdf4=4.2.15=h9772cbc_5
hdf5=1.12.2=mpi_mpich_h5d83325_0
icu=69.1=h9c3ff4c_0
idna=3.4=py39h06a4308_0
importlib-metadata=5.0.0=pyha770c72_1
importlib_resources=5.10.0=pyhd8ed1ab_0
ipykernel=6.17.1=pyh210e3f2_0
ipython=8.6.0=pyh41d4057_1
ipython_genutils=0.2.0=py_1
ipywidgets=8.0.2=pyhd8ed1ab_1
iris=3.3.0=pyhd8ed1ab_0
jedi=0.18.1=pyhd8ed1ab_2
jinja2=3.1.2=pyhd8ed1ab_1
jpeg=9e=h166bdaf_2
json5=0.9.5=pyh9f0ad1d_0
jsonpatch=1.33=py312h06a4308_1
jsonpointer=2.1=pyhd3eb1b0_0
jsonschema=4.17.0=pyhd8ed1ab_0
jupyter=1.0.0=py39hf3d152e_7
jupyter_client=7.4.5=pyhd8ed1ab_0
jupyter_console=6.4.4=pyhd8ed1ab_0
jupyter_core=5.0.0=py39hf3d152e_0
jupyter_server=1.23.1=pyhd8ed1ab_0
jupyterlab=3.5.0=pyhd8ed1ab_0
jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
jupyterlab_server=2.16.2=pyhd8ed1ab_0
jupyterlab_widgets=3.0.3=pyhd8ed1ab_0
keyutils=1.6.1=h166bdaf_0
kiwisolver=1.4.4=py39hf939315_1
krb5=1.19.3=h08a2579_0
lcms2=2.14=h6ed2654_0
ld_impl_linux-64=2.38=h1181459_1
lerc=4.0.0=h27087fc_0
libarchive=3.5.2=hed592e5_1
libblas=3.9.0=16_linux64_openblas
libbrotlicommon=1.0.9=h166bdaf_8
libbrotlidec=1.0.9=h166bdaf_8
libbrotlienc=1.0.9=h166bdaf_8
libcblas=3.9.0=16_linux64_openblas
libclang=13.0.1=default_hc23dcda_0
libcurl=7.86.0=h2283fc2_1
libdeflate=1.14=h166bdaf_0
libedit=3.1.20191231=he28a2e2_2
libev=4.33=h516909a_1
libevent=2.1.10=h28343ad_4
libexpat=2.6.3=h5888daf_0
libffi=3.4.2=h7f98852_5
libgcc=14.2.0=h77fa898_1
libgcc-ng=12.2.0=h65d4601_19
libgfortran-ng=12.2.0=h69a702a_19
libgfortran5=12.2.0=h337968e_19
libglib=2.74.1=h606061b_1
libgomp=14.2.0=h77fa898_1
libiconv=1.17=h166bdaf_0
liblapack=3.9.0=16_linux64_openblas
libllvm13=13.0.1=hf817b99_2
libmamba=1.0.0=h9eff5f0_2
libmambapy=1.0.0=py39h37259de_2
libmo_unpack=3.1.2=hf484d3e_1001
libnetcdf=4.8.1=mpi_mpich_h06c54e2_4
libnghttp2=1.47.0=hff17c54_1
libnsl=2.0.0=h7f98852_0
libogg=1.3.4=h7f98852_1
libopenblas=0.3.21=pthreads_h78a6416_3
libopus=1.3.1=h7f98852_1
libpng=1.6.38=h753d276_0
libpq=14.5=he2d8382_1
libsodium=1.0.18=h36c2ea0_1
libsolv=0.7.22=h6239696_0
libsqlite=3.47.0=hadc24fc_1
libssh2=1.10.0=hf14f497_3
libstdcxx=14.2.0=hc0a3c3a_1
libstdcxx-ng=12.2.0=h46fd767_19
libtiff=4.4.0=h55922b4_4
libuuid=2.32.1=h7f98852_1000
libvorbis=1.3.7=h9c3ff4c_0
libwebp-base=1.2.4=h166bdaf_0
libxcb=1.13=h7f98852_1004
libxcrypt=4.4.36=hd590300_1
libxkbcommon=1.0.3=he3ba5ed_0
libxml2=2.9.12=h885dcf4_1
libzip=1.9.2=hc929e4a_1
libzlib=1.2.13=h166bdaf_4
llvm-openmp=15.0.4=he0ac6c6_0
locket=1.0.0=pyhd8ed1ab_0
lz4-c=1.9.3=h9c3ff4c_1
lzo=2.10=h516909a_1000
mamba=1.0.0=py39hc5d2bb1_2
markupsafe=2.1.1=py39hb9d737c_2
matplotlib=3.5.2=py39hf3d152e_1
matplotlib-base=3.5.2=py39h700656a_1
matplotlib-inline=0.1.6=pyhd8ed1ab_0
menuinst=2.1.2=py312h06a4308_0
mistune=2.0.4=pyhd8ed1ab_0
mo_pack=0.2.0=py39h2ae25f5_1008
mpi=1.0=mpich
mpi4py=3.1.4=py39h32b9844_0
mpich=4.0.3=h846660c_100
munkres=1.1.4=pyh9f0ad1d_0
mysql-common=8.0.31=h26416b9_0
mysql-libs=8.0.31=hbc51c84_0
nbclassic=0.4.8=pyhd8ed1ab_0
nbclient=0.7.0=pyhd8ed1ab_0
nbconvert=7.2.4=pyhd8ed1ab_0
nbconvert-core=7.2.4=pyhd8ed1ab_0
nbconvert-pandoc=7.2.4=pyhd8ed1ab_0
nbformat=5.7.0=pyhd8ed1ab_0
nc-time-axis=1.4.1=pyhd8ed1ab_0
ncurses=6.3=h5eee18b_3
nest-asyncio=1.5.6=pyhd8ed1ab_0
netcdf-flattener=1.2.0=pyh9f0ad1d_0
netcdf-fortran=4.6.0=mpi_mpich_hd09bd1e_1
netcdf4=1.6.1=nompi_py39hfaa66c4_101
nlohmann_json=3.11.3=he02047a_1
notebook=6.5.2=pyha770c72_1
notebook-shim=0.2.2=pyhd8ed1ab_0
nspr=4.32=h9c3ff4c_1
nss=3.78=h2350873_0
numpy=1.23.4=py39h3d75532_1
openjpeg=2.5.0=h7d73246_1
openssl=3.0.7=h166bdaf_0
packaging=21.3=pyhd8ed1ab_0
pandoc=2.19.2=h32600fe_1
pandocfilters=1.5.0=pyhd8ed1ab_0
parso=0.8.3=pyhd8ed1ab_0
partd=1.3.0=pyhd8ed1ab_0
pcre2=10.40=hc3806b6_0
pexpect=4.8.0=pyh1a96a4e_2
pickleshare=0.7.5=py_1003
pillow=9.2.0=py39hf3a2cdf_3
pip=22.3.1=pyhd8ed1ab_0
pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
platformdirs=2.5.2=pyhd8ed1ab_1
pluggy=1.0.0=py312h06a4308_1
proj=8.1.1=h277dcde_2
prometheus_client=0.15.0=pyhd8ed1ab_0
prompt-toolkit=3.0.32=pyha770c72_0
prompt_toolkit=3.0.32=hd8ed1ab_0
psutil=5.9.4=py39hb9d737c_0
pthread-stubs=0.4=h36c2ea0_1001
ptyprocess=0.7.0=pyhd3deb0d_0
pure_eval=0.2.2=pyhd8ed1ab_0
pybind11-abi=4=hd8ed1ab_3
pycosat=0.6.4=py39h5eee18b_0
pycparser=2.21=pyhd3eb1b0_0
pygments=2.13.0=pyhd8ed1ab_0
pyopenssl=22.0.0=pyhd3eb1b0_0
pyparsing=3.0.9=pyhd8ed1ab_0
pyproj=3.2.1=py39ha81a305_2
pyqt=5.12.3=py39hf3d152e_8
pyqt-impl=5.12.3=py39hde8b62d_8
pyqt5-sip=4.19.18=py39he80948d_8
pyqtchart=5.12=py39h0fcd23e_8
pyqtwebengine=5.12.1=py39h0fcd23e_8
pyrsistent=0.19.2=py39hb9d737c_0
pyshp=2.3.1=pyhd8ed1ab_0
pysocks=1.7.1=py39h06a4308_0
python=3.9.13=h2660328_0_cpython
python-dateutil=2.8.2=pyhd8ed1ab_0
python-fastjsonschema=2.16.2=pyhd8ed1ab_0
python-xxhash=3.0.0=py39hb9d737c_2
python_abi=3.9=2_cp39
pytz=2022.6=pyhd8ed1ab_0
pyyaml=6.0=py39hb9d737c_5
pyzmq=24.0.1=py39headdf64_1
qt=5.12.9=h1304e3e_6
qtconsole=5.4.0=pyhd8ed1ab_0
qtconsole-base=5.4.0=pyha770c72_0
qtpy=2.3.0=pyhd8ed1ab_0
readline=8.2=h5eee18b_0
reproc=14.2.3=h7f98852_0
reproc-cpp=14.2.3=h9c3ff4c_0
requests=2.28.1=py39h06a4308_0
ruamel.yaml=0.18.6=py312h5eee18b_0
ruamel.yaml.clib=0.2.8=py312h5eee18b_0
ruamel_yaml=0.15.100=py39h27cfd23_0
scipy=1.9.3=py39hddc5342_2
send2trash=1.8.0=pyhd8ed1ab_0
setuptools=65.5.0=py39h06a4308_0
shapely=1.8.0=py39ha61afbd_0
simdjson=3.10.1=h84d6215_0
six=1.16.0=pyh6c4a22f_0
sniffio=1.3.0=pyhd8ed1ab_0
soupsieve=2.3.2.post1=pyhd8ed1ab_0
spdlog=1.14.1=hed91bc2_1
sqlite=3.39.3=h5082296_0
stack_data=0.6.0=pyhd8ed1ab_0
terminado=0.17.0=pyh41d4057_0
tinycss2=1.2.1=pyhd8ed1ab_0
tk=8.6.12=h1ccaba5_0
tomli=2.0.1=pyhd8ed1ab_0
toolz=0.12.0=py39h06a4308_0
tornado=6.2=py39hb9d737c_1
tqdm=4.64.1=py39h06a4308_0
traitlets=5.5.0=pyhd8ed1ab_0
truststore=0.8.0=py312h06a4308_0
typing_extensions=4.4.0=pyha770c72_0
tzdata=2022f=h04d1e81_0
udunits2=2.2.28=hc3e0081_0
unicodedata2=15.0.0=py39hb9d737c_0
urllib3=1.26.12=py39h06a4308_0
wcwidth=0.2.5=pyh9f0ad1d_2
webencodings=0.5.1=py_1
websocket-client=1.4.2=pyhd8ed1ab_0
wheel=0.38.4=pyhd8ed1ab_0
widgetsnbextension=4.0.3=pyhd8ed1ab_0
xorg-libxau=1.0.9=h7f98852_0
xorg-libxdmcp=1.1.3=h7f98852_0
xxhash=0.8.0=h7f98852_3
xz=5.2.6=h5eee18b_0
yaml=0.2.5=h7b6447c_0
yaml-cpp=0.7.0=h27087fc_2
zeromq=4.3.4=h9c3ff4c_1
zipp=3.10.0=pyhd8ed1ab_0
zlib=1.2.13=h166bdaf_4
zstandard=0.23.0=py312h2c38b39_0
zstd=1.5.2=h6239696_4