Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove most hamocc #ifdefs in favorite of new logicals #264

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fa648b7
first set of updates to send and receive dms fluxes
mvertens Jun 8, 2023
47700e5
more updates to update ocetra with mediator fluxes
mvertens Jun 12, 2023
996903b
first working version of being able to have blom use dms fluxes from …
mvertens Jun 12, 2023
129e1cb
fixes to have dms tracer update occur correctly when dms fluxes are p…
mvertens Jun 14, 2023
670d3d5
put in changes necessary for backwards compatibility and testing
mvertens Jun 15, 2023
a8540ea
fixes for slowdown
mvertens Jun 15, 2023
650253d
updated to blom master
Jun 16, 2023
714a4e0
minor updates
Jun 16, 2023
8c4fa29
reimplementation for PR
mvertens Jun 20, 2023
42d95f7
fix compute_flxdms logic
mvertens Jun 21, 2023
c4bc745
simplification of flxdms setting
mvertens Jun 21, 2023
b964a51
changed compute_flxdms to do_bgc_aofluxes
mvertens Jun 26, 2023
2f1cc53
these changes cause nans for Faox_dms back from mediator
mvertens Jun 27, 2023
3ccf919
added bromo logic
mvertens Jun 28, 2023
ebdca5a
Merge branch 'feature/dms_flux_frmed_pr_bromo_debug' into feature/dms…
mvertens Jun 28, 2023
c18571c
changes to get bromoform computed correctly by mediator
mvertens Jun 30, 2023
d3eb11b
first steps in refactoring buildnml
mvertens Jul 14, 2023
5957d2c
updates to refactor addition of bromo
mvertens Jul 14, 2023
b396a60
rename files
mvertens Jul 14, 2023
8638c67
updates for python namelist generation
mvertens Jul 16, 2023
46bfd6a
more updates
mvertens Jul 16, 2023
4da982e
more cleanup
mvertens Jul 16, 2023
e99c590
udpates for bgcnml
mvertens Jul 16, 2023
c7c6c6e
more extensions
mvertens Jul 16, 2023
ab237bd
update for bgc diag output
mvertens Jul 16, 2023
4bac767
updates for user_nl_blom and copy of ocn_in.readme
mvertens Jul 17, 2023
183bbf8
cleanup of python code
mvertens Jul 17, 2023
9f2e803
replaced double with single quotes
mvertens Jul 25, 2023
417923e
updates as part of testing
mvertens Jul 25, 2023
bfdf804
more bug fixes from testing
mvertens Jul 25, 2023
39eabb3
added descriptions
mvertens Jul 25, 2023
c932d80
merged changes from feature/add_tests PR
mvertens Jul 27, 2023
528e2fa
updates to feature/add_testing
mvertens Jul 27, 2023
7cf9267
wav update to mod_nuopc_methods.F90
mvertens Jul 27, 2023
e44a6f9
bring back #BROMO ifdefs and also fix name of daily file
mvertens Jul 28, 2023
ed6a639
updated name of daily history file
mvertens Jul 28, 2023
397160d
change defaults for history file handling for testing
mvertens Jul 28, 2023
c52fe8b
updated branch to new buildnml functionality
mvertens Jul 31, 2023
54b181b
fixes for testing
mvertens Jul 31, 2023
b946566
fixed setting of do_bgc_aofluxes
mvertens Jul 31, 2023
b3d1326
removed the majority of #ifdefs in HAMOCC other than PNETCDF
mvertens Aug 1, 2023
5ceeb79
addition of mod_ifdefs.F90
mvertens Aug 1, 2023
12e5219
feature/refactor_ifdefs
mvertens Aug 1, 2023
a65eaff
implemented issues raised in the PR review
mvertens Aug 2, 2023
8b39950
removed BROMO ifdef
mvertens Aug 2, 2023
46b589c
fixed comment
mvertens Aug 3, 2023
e0e1c83
updated to master
mvertens Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 0 additions & 157 deletions .github/workflows/ci.yml

This file was deleted.

25 changes: 20 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: do_bgc_aofluxes, 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 @@ -189,6 +194,16 @@ subroutine getfrc_cesm
vstokes(i, j) = w1*vstokes_da(i, j, l1ci) + w2*vstokes_da(i, j, l2ci)
atmco2(i, j) = w1*atmco2_da(i, j, l1ci) + w2*atmco2_da(i, j, l2ci)
atmbrf(i, j) = w1*atmbrf_da(i, j, l1ci) + w2*atmbrf_da(i, j, l2ci)
#ifdef HAMOCC
if (.not. do_bgc_aofluxes) then
! flxdms is obtained from the mediator
flxdms(i, j) = w1*flxdms_da(i, j, l1ci) + w2*flxdms_da(i, j, l2ci)
if (use_bromo) then
! flxbrf is obtained from the mediator
flxbrf(i, j) = w1*flxbrf_da(i, j, l1ci) + w2*flxbrf_da(i, j, l2ci)
end if
end if
#endif
enddo
enddo
do l = 1, isu(j)
Expand All @@ -208,7 +223,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
5 changes: 3 additions & 2 deletions cime_config/buildcpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def buildcpp(case):
hamocc_nattrc = case.get_value("HAMOCC_NATTRC")
hamocc_sedbypass = case.get_value("HAMOCC_SEDBYPASS")
hamocc_ciso = case.get_value("HAMOCC_CISO")
hamocc_vsls = case.get_value("HAMOCC_VSLS")
blom_unit = case.get_value("BLOM_UNIT")
pio_typename = case.get_value("PIO_TYPENAME", subgroup="OCN")

Expand Down Expand Up @@ -143,7 +142,9 @@ def buildcpp(case):
if hamocc_ciso:
expect(hamocc_sedbypass, "HAMOCC C-isotopes currently not supported in the sediment module. Use HAMOCC_SEDBYPASS=TRUE")
blom_cppdefs = blom_cppdefs + " -Dcisonew"
if hamocc_vsls:
if ocn_grid in ["tnx1v4"]:
# HAMOCC bromoform scheme currently only supported on the tnx1v4 grid
# (no swa-climatology has been created for other grid configurations)"
blom_cppdefs = blom_cppdefs + " -DBROMO"
if co2type == "prognostic":
blom_cppdefs = blom_cppdefs + " -DPROGCO2"
Expand Down
Loading