diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh new file mode 100644 index 0000000..9cd20c4 --- /dev/null +++ b/conda.recipe/build.sh @@ -0,0 +1,26 @@ + +git clone https://github.com/fabm-model/fabm.git +git clone https://github.com/gotm-model/code.git gotm +cd gotm && git submodule update --init --recursive && cd .. + +mkdir build_pyfabm && cd build_pyfabm +cmake ../fabm/src/drivers/python -DFABM_ERSEM_BASE=.. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX +# This makes sure pyfabm is built in the correct enviroment +# Will be changed once pyfabm install is updated. +sed -i -e 's/--user//g' cmake_install.cmake +make -j${CPU_COUNT} +make install DESTDIR=$PREFIX +cd .. + +mkdir build_0d && cd build_0d +cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX ../fabm/src/drivers/0d -DGOTM_BASE=../gotm -DFABM_ERSEM_BASE=.. +make -j${CPU_COUNT} +make install +cd .. + +mkdir build_gotm && cd build_gotm +cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX ../gotm -DFABM_BASE=../fabm -DFABM_ERSEM_BASE=.. +make -j${CPU_COUNT} +make install +cd .. + diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 0000000..90b7d5b --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,31 @@ + +package: + name: ersem + version: 20.10 + +source: + path: .. + + +requirements: + build: + - git + - cmake + - make + - netcdf-fortran + - gfortran_linux-64 + - libgfortran4 + - numpy + - wheel + + run: + - python + - numpy + - matplotlib + - netCDF4 + - netcdf-fortran + +about: + home: https://github.com/pmlmodelling/ersem + summary: "European Regional Seas Ecosystem Model (ERSEM) is a marine ecosystem model. It describes the biogeochemical cycling of carbon, nitrogen, phosphorus, silicon, oxygen and iron through pelagic and benthic ecosystems. The ecosystem is divided into functional types, which are further subdivided by traits such as size." + license: GPL-3