Skip to content

Commit

Permalink
Merge master into feature-hamocc_beyond-CMIP6 branch (NorESMhub#226)
Browse files Browse the repository at this point in the history
* Dynamic mapping of pore water tracers to ocean tracers (NorESMhub#192)

* Initial restructuring of sediment-related tracer declaration and initialization

* Introducing mapping function

* Remove unncessary comments

* Fixed diagnostics bug and updated index naming

* Added initial support for NUOPC driver.

* Lon-lat variable sediment porosity (NorESMhub#189)

Introducing a static 3D sediment porosity field that can be optionally read in with effects on molecular pore water diffusion and shifting.

* Added wave forcing fields.

* Renamed folder for MCT driver.

* Moved MCT specific file from drivers/cpl_share/ to drivers/mct/.

* Rename drivers/mct/mod_swtfrz.F to drivers/mct/mod_swtfrz.F90.

* Rewrite to drivers/mct/mod_swtfrz.F90 to free format Fortran.

* Remove redundant definition of kOBL.

* Redefine kOBL, cast as integer

* Fixing variable sediment porosity - field initialization in case of `sedbypass=true` (NorESMhub#198)

* Removing bodensed -  Initialization of sediment parameters and fields now in mo_sedmnt

* Hamocc hybrid coord2 (NorESMhub#179)

Make the surface mixed layer depth fractional index `hOBL` available for use in iHAMOCC, and adjust the internal iHAMOCC index `kmle` according to `hOBL`. Default value `kmle = 2` is retained for consistency with isopycnic coordinates.

* Fix porosity read (NorESMhub#201)

* Fixing the reading of variable porosity input field in preparation for the NorESM 2.0.6 release

Cherry-picked from private Ncycleprivate branch 0d56930e2fdd62caba964d375b57304942568926

* Provide number of layers (3rd dim) via ks and not hard-coded

* minor clean-up

* Correct unit of diagnostic variable dp_trc.

* Made conservation and checksum diagnostics selectable by namelist options (default off).

* pCO2, Piston velocity and solubility output (NorESMhub#202)

* add pCO2m (moist), CO2 piston velocity and solubility output - caution: kwco2 piston velocity now really holds only piston velocity (and not times solubility)

* Bugfix pnetcdf (NorESMhub#208)

* Add variables used by PNETCDF to explicit use staements.

* Move implicit none statments

* update explicit use statement for pnetcdf

* fixed units and renamed calcium burial to CaCO3 burial (NorESMhub#212)

Fixed sediment clay units.

* Add option for surface pH output (NorESMhub#221)

* Remove unused parameters in wrt* subroutine calls in ncout_hamocc.F90

* Import get_bgc_namelist only in subroutine where it is needed. (NorESMhub#225)

Co-authored-by: Mats Bentsen <mben@norceresearch.no>
Co-authored-by: Tomas Torsvik <tomas.torsvik.work@gmail.com>
Co-authored-by: Tomas Torsvik <43031053+TomasTorsvik@users.noreply.github.com>
Co-authored-by: Jörg Schwinger <jorg.schwinger@norceresearch.no>
  • Loading branch information
5 people authored Jan 25, 2023
1 parent 09290fc commit e5eb631
Show file tree
Hide file tree
Showing 4 changed files with 277 additions and 556 deletions.
8 changes: 6 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ set SRF_ALKALI = '4, 2, 2'
set SRF_SILICA = '0, 2, 2'
set SRF_DIC = '4, 2, 2'
set SRF_PHYTO = '4, 2, 2'
set SRF_PH = '0, 2, 2'
set SRF_EXPORT = '0, 2, 2'
set SRF_EXPOSI = '0, 2, 2'
set SRF_EXPOCA = '0, 2, 2'
Expand All @@ -446,6 +447,7 @@ set SRF_ATMO2 = '0, 2, 2'
set SRF_ATMN2 = '0, 2, 2'
set SRF_NATDIC = '0, 2, 2'
set SRF_NATALKALI = '0, 2, 2'
set SRF_NATPH = '0, 2, 2'
set SRF_NATPCO2 = '0, 2, 2'
set SRF_NATCO2FX = '0, 2, 2'
set SRF_CO213FXD = '0, 2, 2'
Expand Down Expand Up @@ -1535,8 +1537,10 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF
! IRON - Dissolved iron (dfe) [mol Fe m-3]
! SILICA - Silicate (si) [mol Si m-3]
! PHYTO - Phytoplankton (phyc) [mol C m-3]
! PH - pH (ph) [-log10([h+])]
! NATDIC - Natural dissolved carbon (natdissic) [mol C m-3]
! NATALKALI - Natural alkalinity (nattalk) [eq m-3]
! NATPH - Natural pH (natph) [-log10([h+])]
!
! Other 3d tracer or diagnostic variables (LYR or LVL)
! DP - Layer thickness (pddpo) [m]
Expand All @@ -1554,14 +1558,12 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF
! PHOSY - Primary production (pp) [mol C m-3 s-1]
! CO3 - Carbonate ions (co3) [mol C m-3]
! N2O - Nitrous oxide concentration [mol N2O m-3]
! PH - pH (ph) [-log10([h+])]
! OMEGAA - Aragonite saturation state (omegaa) [1]
! OMEGAC - Calcite saturation state (omegac) [1]
! NATDIC - Natural dissolved carbon (natdissic) [mol C m-3]
! NATALKALI - Natural alkalinity (nattalk) [eq m-3]
! NATCO3 - Natural carbonate ion concentration (natco3) [mol C m-3]
! NATCALC - Natural CaCO3 shells (natcalc) [mol C m-3]
! NATPH - Natural pH (natph) [-log10([h+])]
! NATOMEGAA - Natural aragonite saturation state (natomegaa) [1]
! NATOMEGAC - Natural calcite saturation state (natomegac) [1]
! DIC13 - Dissolved C13 (dissic13) [mol C m-3]
Expand Down Expand Up @@ -1668,6 +1670,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF
SRF_SILICA = $SRF_SILICA
SRF_DIC = $SRF_DIC
SRF_PHYTO = $SRF_PHYTO
SRF_PH = $SRF_PH
SRF_EXPORT = $SRF_EXPORT
SRF_EXPOSI = $SRF_EXPOSI
SRF_EXPOCA = $SRF_EXPOCA
Expand All @@ -1692,6 +1695,7 @@ cat >>! $RUNDIR/ocn_in$inststr << EOF
SRF_ATMN2 = $SRF_ATMN2
SRF_NATDIC = $SRF_NATDIC
SRF_NATALKALI = $SRF_NATALKALI
SRF_NATPH = $SRF_NATPH
SRF_NATPCO2 = $SRF_NATPCO2
SRF_NATCO2FX = $SRF_NATCO2FX
SRF_CO213FXD = $SRF_CO213FXD
Expand Down
11 changes: 6 additions & 5 deletions hamocc/accfields.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask)
& jlvlprefo2,jlvlprefpo4,jlvlsf6,jlvlsilica,jlvlwnos,jlvlwphy,jn2flux,jn2o,jn2oflux,jn2ofx, &
& jprorca,jprcaca,jsilpro,jpodiic,jpodial,jpodiph,jpodiox,jpodin2,jpodino3,jpodisi,jndep, &
& jniflux,jnos,jo2flux,jo2sat,jomegaa,jomegac,jopal,joxflux,joxygen,jpco2,jpco2m,jkwco2khm,jco2khm, &
& jco2kh,jph,jphosph,jphosy,jphyto, &
& jpoc,jprefalk,jprefdic,jprefo2,jprefpo4,jsilica,jsrfalkali,jsrfano3,jsrfdic,jsrfiron,jsrfoxygen, &
& jsrfphosph,jsrfphyto,jsrfsilica,jwnos,jwphy,nbgc,nacc_bgc,bgcwrt,glb_inventory,bgct2d,acclvl, &
& acclyr,accsrf,bgczlv
& jco2kh,jph,jphosph,jphosy,jphyto,jpoc,jprefalk,jprefdic,jprefo2,jprefpo4,jsilica,jsrfalkali, &
& jsrfano3,jsrfdic,jsrfiron,jsrfoxygen,jsrfphosph,jsrfphyto,jsrfsilica,jsrfph,jwnos,jwphy, &
& nbgc,nacc_bgc,bgcwrt,glb_inventory,bgct2d,acclvl,acclyr,accsrf,bgczlv
use mo_control_bgc, only: io_stdo_bgc
use mo_param1_bgc, only: ialkali,ian2o,iano3,iatmco2,iatmdms,iatmn2,iatmn2o,iatmo2,icalc,idet,idms,idicsat,idoc,iiron,iopal,&
& ioxygen,iphosph,iphy,iprefalk,iprefdic,iprefpo4,iprefo2,isco212,isilica,izoo, &
Expand Down Expand Up @@ -100,7 +99,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask)
use mo_param1_bgc, only: iatmnco2,inatalkali,inatcalc,inatsco212
use mo_carbch, only: natco3,nathi,natomegaa,natomegac,natpco2d
use mo_bgcmean, only: jlvlnatph,jnatalkali,jnatcalc,jnatco2fx,jnatco3,jnatdic,jnatomegaa,jnatomegac,jnatpco2,jnatph, &
& jsrfnatalk,jsrfnatdic
& jsrfnatalk,jsrfnatdic,jsrfnatph
#endif
#ifndef sedbypass
use mo_param1_bgc, only: ipowaal,ipowaic,ipowaox,ipowaph,ipowasi,ipown2,ipowno3,isssc12,issso12,issssil,issster
Expand Down Expand Up @@ -242,6 +241,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask)
call accsrf(jsrfsilica,ocetra(1,1,1,isilica),omask,0)
call accsrf(jsrfdic,ocetra(1,1,1,isco212),omask,0)
call accsrf(jsrfphyto,ocetra(1,1,1,iphy),omask,0)
call accsrf(jsrfph,hi(1,1,1),omask,0)
call accsrf(jdms,ocetra(1,1,1,idms),omask,0)
call accsrf(jexport,expoor,omask,0)
call accsrf(jexpoca,expoca,omask,0)
Expand All @@ -256,6 +256,7 @@ SUBROUTINE ACCFIELDS(kpie,kpje,kpke,pdlxp,pdlyp,pddpo,omask)
call accsrf(jsrfnatdic,ocetra(1,1,1,inatsco212),omask,0)
call accsrf(jsrfnatalk,ocetra(1,1,1,inatalkali),omask,0)
call accsrf(jnatpco2,natpco2d,omask,0)
call accsrf(jsrfnatph,nathi(1,1,1),omask,0)
#endif
#ifdef BROMO
call accsrf(jsrfbromo,ocetra(1,1,1,ibromo),omask,0)
Expand Down
Loading

0 comments on commit e5eb631

Please sign in to comment.