Skip to content

Getting started user

Erwin Lambert edited this page Oct 20, 2025 · 1 revision

Here is a step-by-step guide to set up the UFEMISM and LADDIE models on your local machine (mac or linux) and do a test run.

NOTE we have no general guideline for HPC configurations. The same packages as below are required, though these are usually maintained by HPC support. To load or install required packages, look at the HPC manual or contact the HPC support.

Install dependencies

  1. Download & install Homebrew (https://brew.sh/) This is a library manager that will help you to quickly and easily install all the external libraries that UPSY depends on. For me, the last few lines of output from the homebrew installer gave some additional instructions to follow, probably you’ll need to do the same:
  2. Run these two commands in your terminal to add Homebrew to your PATH: (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/Beren017/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
  3. Use Homebrew from the terminal to install the required external libraries:
    1. brew install git Git is a version control system. When you write some new code, git stores the changes on a remote server (so you basically have a back-up with a long-term “undo” function). When multiple people work on the same code simultaneously, git helps them detect and resolve conflicts. Git also helps us manage the automated tests for UPSY.
    2. brew install gcc gcc stands for “GNU Compiler Collection”, the compiler that lets you compile and run your code
    3. brew install open-mpi OpenMPI is an implementation of the Message Passing Interface (MPI), which is what UPSY uses to be able to run on multiple cores in parallel.
    4. brew install petsc The Portable, Extensible Toolkit for Scientific Computation (PETSc, pronounced “Petsy”) is a library containing routines for solving matrix equations.
    5. brew install netcdf NetCDF is the binary file format used for in- and output files by most geoscientific models, including UPSY.
    6. brew install netcdf-fortran The Fortran interface for NetCDF has to be installed separately.
    7. brew install cmake CMake is a program that helps you compile large projects like UPSY, by automatically creating a Makefile for you.
    8. brew install ninja Ninja is a small helper tool for CMake to quickly analyse the interdependencies of your source code files.

Get the code and compile the models

  1. In your terminal, go to the directory where you want to install the models
  2. git clone git@github.com:UPSY-group/UPSY-models.git Alternatively you can use the Github Desktop Client (https://github.com/apps/desktop)
  3. git submodule init This is needed only once, to link to an external repository which contains useful data
  4. git submodule update --recursive --remote Get the external data.
  5. In the terminal, go to the main repository directory
  6. ./compile_LADDIE.csh perf clean or ./compile_UFEMISM.csh perf clean This should compile the required model. When integrating latest model changes, you can try replacing clean with changed for a faster compilation.

Do a test run

LADDIE:

  1. mpirun -n 2 LADDIE_program src/LADDIE/validation/integrated_tests/Antarctica/test_coarse.cfg This will perform a coarse pan-Antarctic simulation on 2 cores.
  2. Check output in src/LADDIE/validation/integrated_tests/Antarctica/results/

UFEMISM:

  1. mpirun -n 2 UFEMISM_program automated_testing/integrated_tests/realistic/Antarctica/initialisation/Ant_init_20kyr_invBMB_invfric_40km/config.cfg This will perform a pan-Antarctic spinup with inverted basal mass balance
  2. Check output in automated_testing/integrated_tests/realistic/Antarctica/initialisation/Ant_init_20kyr_invBMB_invfric_40km/results/

Clone this wiki locally