-
Notifications
You must be signed in to change notification settings - Fork 25
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
transfer most parameters into mo_param_bgc #294
Conversation
Untested, but compiles in single column mode
hamocc/mo_param_bgc.F90
Outdated
fractdim,fse,fsh,nmldmin,plower,pupper,safe,sinkexp,stick,tmfac,tsfac,vsmall,zdis,wmin,wmax,wlin,rbro, & | ||
bifr13,bifr14,c14fac,prei13,prei14,re1312,re14to | ||
use mo_sedmnt, only: claydens,o2ut,rno3 | ||
use mo_carbch, only: atm,atm_co2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for not including atm_CO2 in this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, no - but since it was thus far initialized in bgcnml
, I didn't move it at first place also in the wish to not break potentially older scripts that make use of this nml. But I can move it, no problem.
hamocc/mo_param_bgc.F90
Outdated
real, protected :: tf2 = -0.0042 | ||
real, protected :: tf1 = 0.2253 | ||
real, protected :: tf0 = -2.7819 | ||
real, protected :: tff = 0.2395 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would tend to have tf* defined as parameters - these come from a specific parameterization, so I wouldn't think there is a need to have them as tunable parameters? (Anyway, this is obsolete with the new N-cycle, I guess)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, they are still used - also with the N-cycle. Since there might be the wish to run bluefix
only in the euphotic zone with the new hybrid coordinates, there might be the wish to tune them (while I suspect, we won't). Hence, I would be a bit hesitant to set these parameters a parameter
.
hamocc/mo_param_bgc.F90
Outdated
real :: bifr13 | ||
real :: bifr14 | ||
! Decay parameter for sco214, HalfLive = 5730 years | ||
real, protected :: c14_t_half ! Half life of 14C [days] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can definitely be a parameter, I think - this is known with relatively little uncertainty, so not used for tuning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done for c14_t_half
.
hamocc/mo_param_bgc.F90
Outdated
!******************************************************************** | ||
real :: wpoc = 5. !m/d Sinking speed of detritus iris : 5. | ||
real :: wcal = 30. !m/d Sinking speed of CaCO3 shell material | ||
real :: wopal = 30. !m/d Sinking speed of opal iris : 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it makes sense to rename them wpocfix,... or similar
end subroutine | ||
! o2ut = 172. | ||
! rno3 = 16. | ||
! end subroutine | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this whole routine will be removed eventually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, done.
hamocc/mo_param_bgc.F90
Outdated
!JT Following discussion with B. Quack and D. Booge (01.07.2021), we agree to use 2.4e-6 | ||
real, protected :: rbro | ||
real, protected :: fbro1 | ||
real, protected :: fbro2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bromoform stuff could be initialized here, couldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, done.
hamocc/mo_param_bgc.F90
Outdated
! 1 kmolP = (122*12/60)*10^6 mg[Chlorophyl] | ||
real, protected :: ctochl = 60. ! C to Chlorophyl ratio | ||
real, protected :: atten_w = 0.04 ! yellow substances attenuation in 1/m | ||
real, protected :: atten_c ! phytoplankton attenuation in 1/m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is atten_C not initialized here? I see ctochl would need to be defined as a parameter then, but that would be fine in my oppinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, done.
Agree, I also prefer this
I would support to remove most (or even all)
If the calculation only involves parameter variables, I would suggest to keep the initialization in the module header, otherwise I agree.
I don't understand this, un-initialized variables can be read from a namelist, can't they?
Agree with renaming them.
I think these are more local variables than parameters, we should check whether it is necessary to initialize them at al?
Good idea, thank you
Good point to discuss, but maybe keep this out of this PR? |
Hi @JorgSchwinger , thanks for the input, here some more explanation:
I fear that this isn't possible per Fortran 2008 standard: executable statements are not allowed in module headers - only if the variable used in the statement is previously declared as |
hamocc/mo_param_bgc.F90
Outdated
public :: ini_parambgc | ||
public :: ro2ut,rcar,rnit,rnoi,riron,rdnit0,rdnit1,rdnit2,rdn2o1,rdn2o2,rno3,atm_n2,atm_o2,atm_co2_nat,atm_bromo,re1312, & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended that all variables in this public
block will be declared either parameter
or protected
eventually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I/we am/are aiming at. Currently there are a few parameters, where this wasn't possible since they are used as changeable parameters in other subroutines, though (which is upon change).
@jmaerz |
… reading the namelist - simplify dust sinking
Re point 3, I just thought there are some variables that could/should be decleared as |
Well, depends, how flexible one wants to go - if we are ending up with having more and more (variable) parameters in the namelist, then this won't work and would thus be a reason to keep the structure as is (see also the updated code). Thus far, I simplified the dust sinking a bit (since code was doubled - only the time point of |
I just realized that there were a few more comments from your side @JorgSchwinger - I'll work them in. |
Hi @TomasTorsvik and @JorgSchwinger , Currently, Further, since there is a bug in the sinking scheme anyway (dust sinking), I would suggest to handle the I will try to perform the regression testing tmw. |
Hi @TomasTorsvik and @JorgSchwinger , after one fix of the code, the results of the runs carried out via the regression testing are bit identical (was running just the
and the automatic testing tries then to compare to One thing, though: shall we also transfer the sediment-related rates and parameters into |
@jmaerz |
@TomasTorsvik , would you suggest to do the sediment parameter transfer for the milestone? - or thereafter? |
@jmaerz , it would be nice to include the transfer of sediment parameters for the milestone if possible. It seems the atmospheric component is somewhat delayed for |
Hi @TomasTorsvik , ok, good to know - it shouldn't take too long - the general layout is there now. |
@jmaerz,
where I made up a new variable name, |
Dear @gold2718 , many thanks for this, but if you need a new baseline (not having an old one to compare to), what's wrong with the script above? The cases were created (different folder structure than regular), but the comparison failed since cime seemed to expect the folder structure differently (if I remember correctly, 2 runs where created - with the nc files and one testbase folder which cime tried to compare with, while not finding the nc files there). Do I need to manually re-organize the base to which to compare to (as in: moving the run for the baseline manually) or would you expect that cime is doing this automatically? |
Maybe I am misunderstanding (easy since I am late to the discussion) but isn't the
If I am still off the mark, please let me know what I am missing. |
Dear @gold2718 , many thanks for looking into it. I am a bit confused about the second command: why would you want to generate another baseline - or is that needed? -note that I assume the runs of |
I think I am starting to understand (I'm feeling slow today). It sounds like you are not interested in storing a baseline. However, the real problem here (which I keep failing to grasp) seems to be that there is some baseline format change between the tag you are testing and the tag you are comparing to. Is this accurate? Can you point me to the baseline directory and the test directory (if they are available on a Sigma2 machine)? I would like to look around to better understand what happened and how we might address it. |
Dear @gold2718 , sorry for getting back to this that late. I fear, I didn't took enough time to dig deeper into the test results and at least, most things work as expected. However, one thing remains: in the |
In your $CASEROOT - I did the following:
So the problem is that you are not pointing to a cprnc executable. That was never created.
We need to update CIME for the release so that it contains a pointer to this file. |
Dear @mvertens , thanks for the info. From |
@jmaerz - I think I have a simple solution.
with
Then try to create a new case and see if this works. We will make a new release tag with this change. |
Dear @mvertens, thanks, that sounds convenient - I'll try this out. |
Hi @JorgSchwinger and @TomasTorsvik , this is a first draft of transferring most model parameters as
real,protected
intomo_param_bgc
- thus far, it is not cleaned up, untested, but compiles in single column mode. There are a few observations and thus questions, on how to best handle them:if then
...endif
almost completely inmo_param_bgc
(at least for the initialization procedures).dummy=-9999
and then use it for initializiation)wpoc
,wopal
,wcalc
andwdust
are and were used as locally changeable variable inocprod
(not the nicest practice..., preventing from setting themprotected
and in the namelist + making them local to OMP) - I would suggest to declare (and initialize) them now aswpocfix
, etc. and use the former as local variables inocprod
.growth_co2
,bifr13_perm
,atm_cfc11_nh
... Partially, I am not sure, whether they are somewhat protected when OMP is used....use_xxxx
so that the logs will also enable to check, which config setting were used.closes #292
I would appreciate comments :-)