Skip to content

Commit

Permalink
Adding basic conda recipe (#3)
Browse files Browse the repository at this point in the history
* Adding basic conda recipe

* Fixing conda recipe pyfabm install

* Updating conda recipe

* Adding netcdf-fortran to conda build run
  • Loading branch information
Michael Wathen authored Mar 15, 2021
1 parent 2bf2d8d commit 6af80e1
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions conda.recipe/build.sh
Original file line number Diff line number Diff line change
@@ -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 ..

31 changes: 31 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6af80e1

Please sign in to comment.