Skip to content

Commit

Permalink
Merge pull request #280 from mvertens/feature/refactor_ifdefs2
Browse files Browse the repository at this point in the history
remove #ifdefs from HAMOCC
  • Loading branch information
TomasTorsvik authored Oct 17, 2023
2 parents 4556746 + 4c816e6 commit 264762e
Show file tree
Hide file tree
Showing 35 changed files with 6,028 additions and 6,152 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
matrix:
mpi: [true, false]
openmp: ['enabled', 'disabled']
ecosys: [true, false]
# Tell Meson to use Intel compilers
env:
CC: icc
Expand Down
15 changes: 10 additions & 5 deletions cesm/mod_cesm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ module mod_cesm
use mod_xc
use mod_forcing, only: trxday, srxday, swa, nsf, lip, sop, eva, rnf, rfi, &
fmltfz, sfl, ztx, mty, ustarw, slp, abswnd, &
lamult, lasl, ustokes, vstokes, atmco2, atmbrf
lamult, lasl, ustokes, vstokes, atmco2, atmbrf, &
flxdms, flxbrf
use mod_ben02, only: initai, rdcsic, rdctsf, fnlzai
use mod_seaice, only: ficem
use mod_checksum, only: csdiag, chksummsk
#ifdef HAMOCC
use mo_control_bgc, only: use_bromo
#endif

implicit none

Expand Down Expand Up @@ -76,7 +80,9 @@ module mod_cesm
ustokes_da, & ! u-component of surface Stokes drift [m s-1].
vstokes_da, & ! v-component of surface Stokes drift [m s-1].
atmco2_da, & ! Atmospheric CO2 concentration [ppm].
atmbrf_da ! Atmospheric bromoform concentration [ppt].
atmbrf_da, & ! Atmospheric bromoform concentration [ppt].
flxdms_da, & ! dms surface flux computed by mediator [kg m-2 s-1]
flxbrf_da ! brf surface flux computed by mediator [kg m-2 s-1]

logical :: &
smtfrc ! If true, time smooth CESM forcing fields.
Expand All @@ -87,10 +93,9 @@ module mod_cesm
public :: runid_cesm, runtyp_cesm, ocn_cpl_dt_cesm, nstep_in_cpl, hmlt, &
frzpot, mltpot, swa_da, nsf_da, hmlt_da, lip_da, sop_da, eva_da, &
rnf_da, rfi_da, fmltfz_da, sfl_da, ztx_da, mty_da, ustarw_da, &
slp_da, abswnd_da, ficem_da, lamult_da, lasl_da, &
slp_da, abswnd_da, ficem_da, lamult_da, lasl_da, flxdms_da, flxbrf_da, &
ustokes_da, vstokes_da, atmco2_da, atmbrf_da, smtfrc, l1ci, l2ci, &
inicon_cesm, inifrc_cesm, getfrc_cesm

contains

subroutine inicon_cesm
Expand Down Expand Up @@ -208,7 +213,7 @@ subroutine getfrc_cesm
call ncfopn('getfrc_cesm.nc', 'w', 'c', 1, iotype)
call ncdims('x', itdm)
call ncdims('y', jtdm)
call ncdefvar('ustarw_da', 'x y', ndouble, 8)
call ncdefvar('ustarw_da', 'x y', ndouble, 8)
call ncdefvar('lip_da', 'x y', ndouble, 8)
call ncdefvar('sop_da', 'x y', ndouble, 8)
call ncdefvar('eva_da', 'x y', ndouble, 8)
Expand Down
4 changes: 2 additions & 2 deletions cime_config/ocn_in.readme
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
! SRXBAL : Balance the SSS relaxation (l)
! SCFILE : Name of file containing SSS climatology used for relaxation (a)
! WAVSRC : Source of wave fields. Valid source: 'none', 'param', 'extern' (a)
! SMTFRC : Smooth CESM forcing (l)
! SPRFAC : Send precipitation/runoff factor to CESM coupler (l)
! SMTFRC : Smooth NorESM forcing (l)
! SPRFAC : Send precipitation/runoff factor to NorESM coupler (l)
! ATM_PATH : Path to forcing fields in case of EXPCNF 'ben02clim' or
! 'ben02syn' (a)
! ITEST : Global i-index of point diagnostics (i)
Expand Down
Loading

0 comments on commit 264762e

Please sign in to comment.