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

Breaking CMIP6 backward compatibility through bugfixes - iHAMOCC ready for NorESM2.1 #315

Merged
merged 46 commits into from
Nov 21, 2023

Conversation

jmaerz
Copy link
Collaborator

@jmaerz jmaerz commented Nov 20, 2023

This PR breaks CMIP6 backward compatibility since it introduces a few bugfixes to master:

  • sediment alkalinity
  • sinking of free dust with potential effects on burial rates
  • burial time smoothing (time smoothing was formerly applied multiple times)
  • OMP fixes (1D setup with iHAMOCC now reproducible also when OMP is switched on)

This PR makes master ready for the NorESM2.1 milestone (at least from the iHAMOCC point of view).

jmaerz and others added 30 commits August 22, 2022 16:35
* FIX: impose no-flux boundary condition at surface for fdust

This bugfix potentially affects the sediment burrying rate
Merge branch 'master' into 'feature-hamocc_beyond-CMIP6'
Bug fixes for denitrification stoichiometry and C-isotopes in the sediment
Introducing a static 3D sediment porosity field that can be optionally read in with effects on molecular pore water diffusion and shifting.
…sedbypass=true` (#198)

* Removing bodensed -  Initialization of sediment parameters and fields now in mo_sedmnt
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.
* 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
* add pCO2m (moist), CO2 piston velocity and solubility output - caution: kwco2 piston velocity now really holds only piston velocity (and not times solubility)
* Add variables used by PNETCDF to explicit use staements.

* Move implicit none statments

* update explicit use statement for pnetcdf
* Dynamic mapping of pore water tracers to ocean tracers (#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 (#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` (#198)

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

* Hamocc hybrid coord2 (#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 (#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 (#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 (#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 (#212)

Fixed sediment clay units.

* Add option for surface pH output (#221)

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

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

Co-authored-by: Mats Bentsen <[email protected]>
Co-authored-by: Tomas Torsvik <[email protected]>
Co-authored-by: Tomas Torsvik <[email protected]>
Co-authored-by: Jörg Schwinger <[email protected]>
Fixing a missing ' that only showed up when using `cisonew`
* Dynamic mapping of pore water tracers to ocean tracers (#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 (#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` (#198)

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

* This is the first commit of MKS units. All variables in the subroutines have been converted to MKS [meter, kg, seconds] instead of CGS [cm, gram, seconds] with necessary coefficients. The default option which is CGS reproduce old results. The new option MKS cannot reproduce because of machine precision.

* Hamocc hybrid coord2 (#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.

* BLOM CIME cpp updates to run in NorESM

* bug fixes for the CGS MKS conversion

* cesm thermal forcing bug fixes for reproducibility

* BLOM MKS update to export winds into the CESM using proper units.

* input values in ocn_in case is updated for mks setup

* default cgsmks value changed

* Initialize some variables in the k-epsilon model.

* Fix porosity read (#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 (#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 (#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 (#212)

Fixed sediment clay units.

* - Made the "fuk95" configuration work with MKS units.
- Removed "CGS" CPP flag.
- Changed some unit conversion factors from variables to parameters.
- Introduced rho0 (= 1/alpha0) parameter.
- Updated copyright statements.

* Correct unit conversion of mixed layer depth to pressure.

* Updated NorESM coupling scripts for the use of MKS units.

* Fixed check of unit system when building as NorESM component.

* Add option for surface pH output (#221)

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

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

* fix missing ' (#228)

Fixing a missing ' that only showed up when using `cisonew`

---------

Co-authored-by: Mats Bentsen <[email protected]>
Co-authored-by: Tomas Torsvik <[email protected]>
Co-authored-by: Mehmet Ilicak <[email protected]>
Co-authored-by: Tomas Torsvik <[email protected]>
Co-authored-by: Jörg Schwinger <[email protected]>
Merge latest `master` changes into the `feature-hamocc_beyond-CMIP6` and align commit history again getting a new common hook.
Add missing local parameters to private OMP
@jmaerz jmaerz added the iHAMOCC Issue mainly concerns the iHAMOCC code base label Nov 20, 2023
@jmaerz jmaerz added this to the NorESM2.1 milestone Nov 20, 2023
@jmaerz jmaerz self-assigned this Nov 20, 2023
Copy link
Contributor

@JorgSchwinger JorgSchwinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

Copy link
Contributor

@mvertens mvertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
I have two questions:

  1. What tag will we use for this and moving forwards
  2. Can we decide on regression tests that can be carried out with this tag and subsequent tags?

@jmaerz
Copy link
Collaborator Author

jmaerz commented Nov 21, 2023

@mvertens, @JorgSchwinger and @TomasTorsvik : I suspect that we should briefly talk about the tagging during the BLOM core meeting tmw. Any opinion on this @JorgSchwinger? - see also discussion #295. Wrt the regression testing: I would be happy to incorporate the automated regression testing in my daily routine of coding (thus far mainly manually done). I hope that the full support will be available through the NorESM2.1 release. Wrt to specific testcases, I see that some combinations are probably needed - particularly in combination with the hybrid coordinates, at some point potentially with the new SI units, potentially a combination of HAMOCC logicals and potentially wrt to air-sea fluxes.

Wrt to merging #314 and #315, I'll wait a bit longer today for Tomas, but I suspect that he's busy with the workshop so that I merge the stuff in the afternoon.

@JorgSchwinger
Copy link
Contributor

I don't have any strong opinion on the tagging-question. Using vX.Y.Z and updating z automatically sounds ok to me. But I'm fine with whatever is decided tomorrow (I can't make it)

@jmaerz
Copy link
Collaborator Author

jmaerz commented Nov 21, 2023

@JorgSchwinger , ok, thanks for the input on the tagging. I suspect it will be a decision between Mats and Mariana then.

Properly declare and initialize bifrXX_ini and clean mo_biomod from growth_co2
@jmaerz jmaerz marked this pull request as ready for review November 21, 2023 14:44
@jmaerz jmaerz changed the title Merge feature-hamocc_beyond-CMIP6 into master - breaking CMIP6 backward compatibility through bugfixes Breaking CMIP6 backward compatibility through bugfixes - merge beyond-CMIP6 into master Nov 21, 2023
@jmaerz jmaerz changed the title Breaking CMIP6 backward compatibility through bugfixes - merge beyond-CMIP6 into master Breaking CMIP6 backward compatibility through bugfixes - iHAMOCC ready for NorESM2.1 Nov 21, 2023
@jmaerz jmaerz removed the request for review from TomasTorsvik November 21, 2023 16:51
@jmaerz
Copy link
Collaborator Author

jmaerz commented Nov 21, 2023

I performed another regression testing between an earlier stage of the feature-hamocc_beyond-CMIP6 branch and the latest stage that we will merge with this PR into master. It looked all good and we are all set for merging the PR, making master ready for the NorESM2.1.

@jmaerz jmaerz merged commit cca8d11 into master Nov 21, 2023
22 of 24 checks passed
@TomasTorsvik TomasTorsvik deleted the feature-hamocc_beyond-CMIP6 branch October 22, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iHAMOCC Issue mainly concerns the iHAMOCC code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants