How to build and run GOTM

How to Builld

  1. First get the FABM source code:
    git clone https://github.com/fabm-model/fabm.git <FABMDIR>
    (Replace FABMDIR with the directory where you want the FABM code to go, e.g., ~/fabm-git.)
  2. Now get the ERSEM code:
git clone git@gitlab.ecosystem-modelling.pml.ac.uk:edge/ersem.git <ERSEMDIR>

(Replace ERSEMDIR with the directory where you want the ERSEM code to go, e.g., ~/ersem-git.) For this to work,you have to provide the PML GitLab server with your public SSH key.

If SSH key not available, please find at /pexue7/czhao4/ERSEM_phase3/ERSEM

  1. Get the GOTM code:
git clone https://github.com/gotm-model/code.git <GOTMDIR>

(Replace GOTMDIR with the directory where you want the code to go, e.g., ~/gotm-git.)
4. Run git submodule update --init --recursive at GOTMDIR
5. Set up the environment:

module purge
module load users/2021.08
module load tools/EasyBuild/4.8.1
module load data/netCDF-Fortran/4.6.0-gompi-2022a
module load devel/CMake/3.24.3-GCCcore-11.3.0
  1. Create a build directory
mkdir -p ./build/gotm
cd ./build/gotm
cmake <GOTMDIR>/src -DFABM_BASE=<FABMDIR> -DFABM_ERSEM_BASE=<ERSEMDIR>
make install

In the above:
replace GOTMDIR with the directory with the GOTM code, e.g., ~/gotm-git
replace FABMDIR with the directory with the FABM code, e.g., ~/fabm-git
replace ERSEMDIR with the directory with the ERSEM code, e.g., ~/ersem-git.

Now you should have a GOTM executable with FABM and ERSEM support at
~/local/gotm/bin/gotm and the ./build/gotm

  1. Here is a example test can be found at /pexue7/czhao4/ERSEM_phase3/test.
[czhao4@compute-0-201 test]$ pwd
/pexue7/czhao4/ERSEM_phase3/test
[czhao4@compute-0-201 test]$ ls
erie_45005  erie_45142  erie_WE04  erie_WE12  fabm_DRAMA_phase3.yaml  fabm.yaml  gotm  gotm.yaml  restart.nc  run.sh  station_input

in which erie_* folders contain the output files at four stations.
gotm.yaml and station_input contain the necessary input files at four stations.

fabm.yaml is the namelist file and its name has to be “fabm.yaml”.

How to run
Use run.sh at /pexue7/czhao4/ERSEM_phase3/test.

module purge
module load users/2021.08
module load tools/EasyBuild/4.8.1
module load data/netCDF-Fortran/4.6.0-gompi-2022a
module load devel/CMake/3.24.3-GCCcore-11.3.0

python3 ../GOTM/scripts/python/update_setup.py gotm.yaml/gotm_erie_WE12.yaml
./gotm gotm.yaml/gotm_erie_WE12.yaml --ignore_unknown_config
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值