Sediment depth flexible via namelist#685
Conversation
tested in 1D, untested in 3D
|
Hi @JorgSchwinger and @TomasTorsvik , I still need to test the code in 3D for bfb, while in 1D it works as expected. The idea is to enable deeper sediment (and thus more oxygen deficit areas in deeper sediment) to enhance the representation of anaerob processes, i.e. the nitrogen cycle processes. This isn't related to any CMIP7 Fast Track simulations, but rather for a version towards NorESM3.X (e.g. X=5). |
TomasTorsvik
left a comment
There was a problem hiding this comment.
@jmaerz - looks fine to me.
I'm not sure if I understand, if the number of layers can be flexible, as long as there are fixed parameter settings for porwat_def and dzs_def.
|
Hi @TomasTorsvik , the number of layers is set via: |
|
@TomasTorsvik , I am not sure, how the regression testing is carried out, but it could fail due to non-comparable number of variables, since two more variables and one dimension have been added in this PR (i.e. the vertical extension of sediment grid boxes and porosity) - both in case of default values as well as the flexible settings. Writing porosity is currently neglected, when 3D porosity is (optionally) chosen. The latter maybe a matter of -later- change. |
|
@TomasTorsvik and @JorgSchwinger , from my side, the PR should be ready. |
|
Maybe worth to note that one could even read in the |
To be honest, I would prefer this solution. To have duplicate fields, one of which is used when |
|
Hi @TomasTorsvik and @JorgSchwinger , I now updated the code in such a way that the sediment porosity and sediment layer thickness is always read from the |
|
@TomasTorsvik and @JorgSchwinger , indirectly shown via po4lvl and no3lvl, the results look like remaining bfb. But maybe it's worth running the full test-suite on the branch? Any chance you could give it a try with it, @TomasTorsvik ? (Note again that some issues may come up due to changed number of variables - |
|
@jmaerz - Thanks for the update, I will run the BLOM regression tests for the branch. |
|
Test output available here: I'm getting the expected namelist fail (NLFAIL) for all test with active BGC. One unexpected fail on |
|
@jmaerz - The |
|
Hi @TomasTorsvik , thanks for the testing and sorry to burden you with it in addition to the NorESM3 development stuff. @JorgSchwinger , I would suggest that you could approve it and @TomasTorsvik decides, when to bring in the changes - just let me know, when it suits best the development plan of NorESM3. |
|
@JorgSchwinger , are you fine with merging this sediment PR? |
JorgSchwinger
left a comment
There was a problem hiding this comment.
Looks ok to me. If it is bit-for-bit I am fine with merging it, although we might want to wait until after the spinup has started?
| if (mnproc==1 .and. errstat.ne.0) then | ||
| write(io_stdo_bgc,*) 'Memory allocation failed for sed_POCage_init in mo_hamocc_init' | ||
| endif | ||
| sed_POCage_init(:,:,:) = 0._rp |
There was a problem hiding this comment.
Sorry I didn't look deeper into this, but why is it necessary to have these variables local and allocate them here in the top-level routine? Couldn't this be done in alloc_mem_sedment?
There was a problem hiding this comment.
Hi @JorgSchwinger , ok, I now allocate those fields in mo_read_X... - I do it this way, to not screw up the current structure of reading and subsequent initialization - technically, one could restructure the whole sediment initialization (again), which goes beyond the current PR in my opinion.
JorgSchwinger
left a comment
There was a problem hiding this comment.
I approve this PR now, however I have a general comment, which is actually not specific to to this PR, but about the general model structure: The way the sediment age and quality fields are read in and passed to HAMOCC break with the general paradigm of separating everything that is related to the BLOM model grid and parallelism from the core HAMOCC routines. To comply with this paradigm, the fields would be read in outside hamocc4bgc and then passed as an argument (as it is the case now for e.g. iron and fe-deposition). This might be something to think about at a later stage.
|
Hi @JorgSchwinger , I am not entirely sure, if I really understand the issue with these fields as they -can be- dynamically changed during runtime and are just once read at initialization for initialization from scratch (afterwards included in the restart file), but maybe better to discuss this offline (and for a later PR). @TomasTorsvik , I leave the merging to you so that you can better organize the tags for NorESM. |
|
I'm putting the merging of this PR temporarily on hold until we get in #691 (hopefully this is soon). |
The aim of this PR is to make the number of sediment layers, their vertical extensions and the porosity flexibly settable via the namelist. This is thus far only for test purposes, but can lead for a more sediment-oxygen-deficit layers-oriented setup (i.e. testing, if this improves the nitrogen cycle representation in sediments). I hope to make this work in combination with the still in progress offline sediment spinup (#560).
An example
user_nl_blomsnippet to make use of the flexible number of sediment layers looks like:Here, the number of sediment layers is reduced to 4 and a changed porosity of the third and fourth layer. Note that the length of
DZSis by one longer thanSED_POROSITY.NOTE that due to numerics, there is a lower limit of sediment layers to be used.
Changing the sediment initialization came with a small restructuring of
mo_hamocc_init- placing now the memory allocation of fields before readingbgcnml- which made it necessary to moveuse_M4AGOout ofbgcnmland instead put it intoconfig_nml(where it is actually better placed as well).Changes required in the 1D vertical columns setup
limitsfile:USE_M4AGOneeds to be moved frombgcnmlinto nml sectionconfig_nmlKS=12needs to be added toconfig_nmland
needs to be put into
bgcnml.