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

Fix porosity read #201

Merged
merged 3 commits into from
Nov 9, 2022
Merged

Fix porosity read #201

merged 3 commits into from
Nov 9, 2022

Conversation

jmaerz
Copy link
Collaborator

@jmaerz jmaerz commented Nov 8, 2022

In preparation of the new NorESM release, I fixed the reading of the variable sediment porosity so that it is now fully functional. As written in #189 , the reading was thus far untested and has been now tested and applied in my private N-cycle branches (from which I cherry-picked the fix). For non-variable sediment porosity (the default), nothing changes.

…r the NorESM 2.0.6 release

Cherry-picked from private Ncycleprivate branch 0d56930e2fdd62caba964d375b57304942568926
@jmaerz jmaerz added bug Something isn't working iHAMOCC Issue mainly concerns the iHAMOCC code base labels Nov 8, 2022
@jmaerz jmaerz added this to the BLOM/iHAMOCC-1.3.0 milestone Nov 8, 2022
@jmaerz jmaerz self-assigned this Nov 8, 2022
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 to me.

Copy link
Contributor

@TomasTorsvik TomasTorsvik left a comment

Choose a reason for hiding this comment

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

Thanks! I'm fine with this code change.

@jmaerz jmaerz merged commit 613b8bc into NorESMhub:master Nov 9, 2022
TomasTorsvik pushed a commit to TomasTorsvik/BLOM-TTfork that referenced this pull request Dec 5, 2022
* 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
TomasTorsvik pushed a commit to TomasTorsvik/BLOM-TTfork that referenced this pull request Dec 5, 2022
* 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
jmaerz added a commit that referenced this pull request Jan 25, 2023
* 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 <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>
jmaerz added a commit that referenced this pull request Feb 9, 2023
* 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 <mben@norceresearch.no>
Co-authored-by: Tomas Torsvik <tomas.torsvik.work@gmail.com>
Co-authored-by: Mehmet Ilicak <milicak@itu.edu.tr>
Co-authored-by: Tomas Torsvik <43031053+TomasTorsvik@users.noreply.github.com>
Co-authored-by: Jörg Schwinger <jorg.schwinger@norceresearch.no>
jmaerz added a commit to jmaerz/BLOM that referenced this pull request Aug 9, 2023
* 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
jmaerz added a commit to jmaerz/BLOM that referenced this pull request Aug 9, 2023
* 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
jmaerz added a commit to jmaerz/BLOM that referenced this pull request Aug 9, 2023
* 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>
jmaerz added a commit to jmaerz/BLOM that referenced this pull request Aug 9, 2023
…b#232)

* 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

* 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 (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.

* 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 (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.

* - 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 (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)

* fix missing ' (NorESMhub#228)

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

---------

Co-authored-by: Mats Bentsen <mben@norceresearch.no>
Co-authored-by: Tomas Torsvik <tomas.torsvik.work@gmail.com>
Co-authored-by: Mehmet Ilicak <milicak@itu.edu.tr>
Co-authored-by: Tomas Torsvik <43031053+TomasTorsvik@users.noreply.github.com>
Co-authored-by: Jörg Schwinger <jorg.schwinger@norceresearch.no>
@jmaerz jmaerz deleted the fix_porosity_read branch November 23, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iHAMOCC Issue mainly concerns the iHAMOCC code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants