Skip to content

Commit 2f65ba4

Browse files
authored
Merge branch 'gotm-model:master' into fabm_calendar_year
2 parents f549766 + 11971f4 commit 2f65ba4

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

.github/workflows/gotm.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@ on: push
33
jobs:
44
gfortran:
55
strategy:
6-
matrix:
7-
version: [9, 10, 11, 12]
8-
os: ["ubuntu-latest"]
9-
include:
10-
- version: 7
11-
os: ubuntu-20.04
12-
- version: 8
13-
os: ubuntu-20.04
14-
cmake_args: -DFABM_USE_CONTIGUOUS=OFF
15-
- version: 13
16-
os: ubuntu-24.04
17-
- version: 14
18-
os: ubuntu-24.04
19-
fail-fast: false
6+
matrix:
7+
version: [9, 10, 11, 12]
8+
os: ["ubuntu-latest"]
9+
include:
10+
#- version: 7
11+
#os: ubuntu-20.04
12+
#- version: 8
13+
#os: ubuntu-20.04
14+
#cmake_args: -DFABM_USE_CONTIGUOUS=OFF
15+
- version: 13
16+
os: ubuntu-24.04
17+
- version: 14
18+
os: ubuntu-24.04
19+
fail-fast: false
2020
runs-on: ${{ matrix.os }}
2121
steps:
22-
- name: Install compiler
23-
run: |
22+
- name: Install compiler
23+
run: |
2424
sudo apt-get update
2525
sudo apt-get install gfortran-${{ matrix.version }}
26-
- name: Clone gotm
27-
uses: actions/checkout@v4
28-
with:
26+
- name: Clone gotm
27+
uses: actions/checkout@v4
28+
with:
2929
path: gotm
3030
submodules: recursive
31-
- name: Clone gotm-cases
32-
uses: actions/checkout@v4
33-
with:
31+
- name: Clone gotm-cases
32+
uses: actions/checkout@v4
33+
with:
3434
path: cases
3535
repository: gotm-model/cases
36-
- name: Build and run all test cases
37-
run: python3 cases/scripts/run_all.py --show_logs --gotm_base=gotm --exclude plume --compiler=gfortran-${{ matrix.version }} -DGOTM_USE_STIM=ON -DGOTM_USE_SEAGRASS=ON -DGOTM_USE_NetCDF=OFF ${{ matrix.cmake_args }}
36+
- name: Build and run all test cases
37+
run: python3 cases/scripts/run_all.py --show_logs --gotm_base=gotm --exclude plume --compiler=gfortran-${{ matrix.version }} -DGOTM_USE_STIM=ON -DGOTM_USE_SEAGRASS=ON -DGOTM_USE_NetCDF=OFF ${{ matrix.cmake_args }}
3838
conda-forge:
3939
strategy:
4040
fail-fast: false
@@ -45,22 +45,22 @@ jobs:
4545
shell: bash -el {0}
4646
runs-on: ${{ matrix.os }}
4747
steps:
48-
- uses: conda-incubator/setup-miniconda@v3
49-
with:
50-
auto-update-conda: true
51-
- name: Clone gotm
52-
uses: actions/checkout@v4
53-
with:
48+
- uses: conda-incubator/setup-miniconda@v3
49+
with:
50+
auto-update-conda: true
51+
- name: Clone gotm
52+
uses: actions/checkout@v4
53+
with:
5454
submodules: recursive
55-
- name: Install conda packages (Linux, Mac)
56-
if: matrix.os != 'windows-latest'
57-
run: conda install -c conda-forge fortran-compiler netcdf-fortran
58-
- name: Install conda packages (Windows)
59-
if: matrix.os == 'windows-latest'
60-
run: |
61-
conda install -c conda-forge m2w64-gcc-fortran m2w64-make netcdf-fortran
62-
echo "CMAKE_GENERATOR=MinGW Makefiles" >> "$GITHUB_ENV"
63-
- name: build
64-
run: |
65-
cmake -B build -S . -DGOTM_USE_STIM=ON -DGOTM_USE_SEAGRASS=ON -DCMAKE_BUILD_TYPE=Release
66-
cmake --build build --config Release
55+
- name: Install conda packages (Linux, Mac)
56+
if: matrix.os != 'windows-latest'
57+
run: conda install -c conda-forge fortran-compiler netcdf-fortran
58+
- name: Install conda packages (Windows)
59+
if: matrix.os == 'windows-latest'
60+
run: |
61+
conda install -c conda-forge m2w64-gcc-fortran m2w64-make netcdf-fortran
62+
echo "CMAKE_GENERATOR=MinGW Makefiles" >> "$GITHUB_ENV"
63+
- name: build
64+
run: |
65+
cmake -B build -S . -DGOTM_USE_STIM=ON -DGOTM_USE_SEAGRASS=ON -DCMAKE_BUILD_TYPE=Release
66+
cmake --build build --config Release

src/extras/seagrass/seagrass.F90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module seagrass
3535
! Original author(s): Hans Burchard & Karsten Bolding
3636
!
3737
REALTYPE, dimension(:), allocatable :: exc,vfric,grassz,xxP
38+
integer :: method
3839
character(len=PATH_MAX) :: grassfile='seagrass.dat'
3940
REALTYPE :: alpha
4041
integer :: grassind
@@ -75,7 +76,7 @@ subroutine init_seagrass()
7576

7677

7778
branch => settings_store%get_typed_child('seagrass','calculate seagrass effect on turbulence')
78-
call branch%get(i, 'method', '', options=(/option(0, 'off'), option(1, 'from file')/), default=0)
79+
call branch%get(method, 'method', '', options=(/option(0, 'off'), option(1, 'from file')/), default=0)
7980
call branch%get(grassfile, 'file', 'path to file with grass specifications', default='seagrass.dat')
8081
call branch%get(alpha, 'alpha', 'efficiency of leafes turbulence production', '',default=0._rk)
8182

src/gotm/print_version.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ subroutine print_version()
6363
#ifdef _CVMIX_
6464
LEVEL0 'CVMix: included'
6565
#endif
66+
#ifdef _SEAGRASS_
67+
LEVEL0 'Seagrass:included'
68+
#endif
6669
#ifdef NETCDF_FMT
6770
LEVEL0 'NetCDF: ',trim(NF90_INQ_LIBVERS())
6871
#endif

0 commit comments

Comments
 (0)