How to Builld
- 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.) - 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
- 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
- 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
- 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

315

被折叠的 条评论
为什么被折叠?



