-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ballast and remin/clean code #79
Conversation
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.
Still need some time to go through this in detail. But to start with, here are just a couple typos I caught in my first read through.
generic_tracers/generic_COBALT.F90
Outdated
! The ligand concentration includes a background concentration (felig_bkg) and an additional amount proportional | ||
! to dissolved organic matter (felig_2_don). When the free iron (feprime) exceeds solubility limits defined as | ||
! a function of temperature and salinity according to Liu and Millero (2002), scavenging is increased by the factor | ||
! fast_scav_fac to mimic rapd precipitation. In coarse resolution global simulations, fast_scav_fac was generally |
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.
"rapid"
generic_tracers/generic_COBALT.F90
Outdated
cobalt%jprod_cadet_arag(i,j,k) = (zoo(2)%jzloss_n(i,j,k)*zoo(3)%phi_det + & | ||
(zoo(2)%jhploss_n(i,j,k) + zoo(3)%jhploss_n(i,j,k))*cobalt%hp_phi_det)* & | ||
cobalt%ca_2_n_arag*min(cobalt%caco3_sat_max, max(0.0,cobalt%omega_arag(i,j,k) - 1.0)) + epsln | ||
! Forams and coccolithophores are assumed to the primary calcite shell formers. Forams fall into the small |
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.
are assumed to be the primary
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.
Thanks for catching these Jessica.
else !}{ | ||
cobalt%jremin_ndet(i,j,k) = cobalt%gamma_ndet * cobalt%o2_min / & | ||
(cobalt%k_o2 + cobalt%o2_min)* & | ||
cobalt%f_no3(i,j,k) / (phyto(SMALL)%k_no3 + cobalt%f_no3(i,j,k))* & | ||
cobalt%f_no3(i,j,k) / (cobalt%k_no3_denit + cobalt%f_no3(i,j,k))* & |
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.
Although the new code makes sense to me, it changes our baseline in the NWA12-RT case. I checked COBALTv2 and found that we also used small phytoplankton's k_no3
. @charliestock just wants to confirm if this is the change we want.
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.
Does it? I think cobalt(SMALL)%k_no3 and cobalt%k_no3_denit have the same value. We just introduced k_no3_denit to be explicit that this was a different paramater.
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 stand corrected. These parameters are different. This will change answers, but in a minimal way. The parameter is only has a significant effect when both oxygen and nitrate have been exhausted which rarely, if ever, happens. Even in such cases, the impact will be small.
In general, I suggest we remove uses of the phytoplankton parameters beyond their explicit definition. It looks like we used phyto(SMALL)%k_no3, for example, for the anammox dependence on NO3. Thus, changing phyto(SMALL)%k_no3 risks unintentionally changing multiple factors. I think we should adopt k_no3_denit for denitrification and define k_no2_anammox for anammox and set both to 1e-6. What do you folks think?
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, I completely agree. It was just a quick shorthand to use phyto(SMALL)%k_no3 but doing so poses risks where a user may come in and change what they think is just the small phytoplankton nitrate half saturation constant and end up changing values for other processes as well.
This new commit fixes typos in the comments (thanks Jessica), eliminates omegaa and omegac from cobalt_types.F90, and retains the k_no3_denit change in the water column remin (which will change answers very slightly), and introduces k_no3_amx. The last of these changes will have no impact since anammox isn't turned on but, line k_no3_denit, establishes a clear separation between this parameter and the phytoplankton uptake parameters. @jessluo @yichengt900 |
@charliestock, I like the idea of removing the uses of the phytoplankton parameters beyond their explicit definition. The new commit looks good to me. I will wait a bit for others' comments. |
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 changes, and the added descriptions look good to me, and make it easier to follow.
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.
@charliestock, overall the changes look good, and the comments are straightforward and easy to understand. Although this PR will change our baselines due to the introduction of the new runtime parameter k_no3_denit
with a slightly different value (we also added k_no3_amx
, but it is not yet in use), we expect the impact to be minor. Please approve this PR.
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.
Looks good to me!
This pull request cleans up the mineral ballasting, remineralization of sinking detritus and iron scavenging sections of COBALTv3. It gets rid of one redundant local variable (z_remin_ramp) and introduces a parameter for the augmentation of scavenging when free iron exceeds fe solubility (fast_fescav_fac).
For fast_fescav_fac have been using a factor of 2 for this in the regional runs, but previous global coarse resolution runs used a factor of 10. I think this parameter is somewhat scale dependent. I used a higher value in prior global runs to try and erode coastal iron signals that were propagating too far into the ocean interior, probably because shelf residence times were under-estimated with coarse resolution. Higher resolution addressed this problem and a factor of 2 seems to work better. I have thus made 2 the default.
Most of this pull request is commenting and clean up. Perhaps most significantly, the comments now include a detailed description of the ligand binding derivation used to calculate the free iron (feprime). This involves solving a system of three equations and results in a quadratic equation for feprime. The comments should now provide enough information for users to be able to understand and verify the derivation.
One thing I did not have time to do yet is to enhance all the variable definitions associated with this pull request. I will handle this in a follow on pull request soon.
This pull request should not change answers!