-
Notifications
You must be signed in to change notification settings - Fork 134
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
Update icepack_step_therm2, make fsd arguments optional #440
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'm still confused about how the optional arguments work. Do the FSD-related arguments need to be optional in lateral_melt? E.g. fiso_ocn is optional in step_therm2 but not in the routines called from there, like lateral_melt and add_new_ice. Why would the FSD args be different?
@eclare108213, that's a good question. The optional argument attribute is not required in lower level routines. You may not be able to check whether that argument is present anymore in the lower level routines, but as long as you DON'T use an optional argument that was not passed above, the code should compile and run fine whether the optional attribute is on the lower level routines or not. As we know, if you don't pass an optional argument then try to use it, whether it's declared optional or not in the lower level routines, you should get a runtime error. The lower level optional arguments don't change that. If you prefer, I can remove the optional arguments on the lower level routines for consistency. I don't feel strongly that it has to be one way or the other, but we can define a standard if you like. There may be times where that optional argument attribute has to be set in lower level routines, but hopefully that's not the case most of the time. |
I'd prefer that we do it consistently -- otherwise it's too confusing when implementing new arguments (or fixing old code). There was an issue a few months back, maybe with a snow variable? and now I worry that the code isn't as robust with all the optional args. Does the |
I updated the lower level optional arguments and retested everything, still working fine. Section 5.2 of the Icepack users guide talks about optional arguments. It's relatively current, but let me update that a bit. |
This looks fine to me. Did your test to check BFB-ness have tr_fsd=True? |
I ran a full test suite, that includes tests with tr_fsd=true, all results are bit-for-bit. |
PR checklist
Update icepack_step_therm2, make fsd arguments optional
apcraig
Full test suite run on cheyenne for Icepack+intel and CICE+gnu, all tests pass and bit-for-bit.
Also update interface documentation.