-
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
add ability to read input file for ocean alkalinization #241
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.
I wonder if it would simplify the implementation a bit if you introduced reading from a file as a separate scenario, e.g. oalkscen=='file'
, so you don't need to test for both oalkscen
and oalkfile
in the if statements.
Otherwise I think the PR look fine.
I agree with Tomas here. I would think setting |
Hi Thomas and Jörg, thank you for your review. I submitted another commit following your suggestion of having to define both |
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 @TimotheeBrgs !
hamocc/mo_read_oafx.F90
Outdated
@@ -275,8 +316,9 @@ subroutine get_oafx(kpie,kpje,kplyear,kplmon,omask,oafx) | |||
real, intent(out) :: oafx(kpie,kpje) | |||
integer :: current_day |
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.
Since there is a section "Local variables" just below, it would be nice to move current_day there.
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 very good. Once you have tested that everything work, let me know, then I'll merge it.
Hi @JorgSchwinger @TimotheeBrgs , I therefore suggest that we revert back to reading If so, can this change be included in the current PR? Otherwise, I can open a new one. |
Yes that sound good. This also would also be consistent with the fact that How to do this technically? Should Timothée incorporate this into this PR, or should it be done separately? |
It is probably easier to do this in the current PR, otherwise the current PR would run into merge conflicts. |
Just as a side note - the file can be empty. It just needs to be there. |
Great! |
Hi again, thank you all for the bug discovery and improvement suggestions. I hope that the commits 5d37e37 and 2ae28c8 will solve them. @TomasTorsvik @JorgSchwinger @jmaerz I am not sure if I understand the potential issue raised by your message. Do you suggest to include the triggering of an error if the netCDF file is empty? Or to trigger an error telling " Now, with the current commits, the way to use the file scenario is the following:
|
Hi @TimotheeBrgs , sorry for the confusion. It's all fine from my side - I just wanted to note that one could live with an empty BGCOAFX nml file. But the solution now looks way better. |
I think in |
Hi @TomasTorsvik , good point! With the last two commits, I removed what you suggest and I added a few missing explanatory comments in |
add ability to read an ocean alkalinization scenario from file and put ocean alkalinisation related variables in own namelist (BGCOAFX)
Hi all,
Previously, a constant scenario and a linear ramping-up of ocean alkalinization have been implemented in
mo_read_oafx.F90
, both spatially homogeneous and customizable via the user_nl_blom namelist. Here, a third case is added for scenarios defined from a fileoalkfile
prescribing monthly 2D fields of surface alkalinity addition in kmol ALK m-2 yr-1.Now, to use the constant or ramping-up scenario, the user needs to define only the variable
oalkscen
and leavesoalkfile
undefined (default value is''
). To use the scenario fromoalkfile
, the user needs to define onlyoalkfile
and leavesoalkscen
undefined (default value''
as well). Defining bothoalkscen
andoalkfile
returns an explicit error.Because this case defined from a file is the same procedure as the N deposition, this commit is mostly coming from a copy-paste of
mo_read_ndep.F90
blocks.Example of user_nl_blom to use this case: