-
Notifications
You must be signed in to change notification settings - Fork 64
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
subroutine keyword arguments #306
Comments
@climbfuji @grantfirl @gold2718 @cacraigucar If host models do not have those fields at compile-time, those arguments can be absent in the constructed call. Therefore the scheme is portable to host models either with or without those variables. |
@davegill We already had quite some discussion around this ... since I will be out the next two meetings, we should schedule something earlier than July 9 to get you up to speed. |
@climbfuji, This issue is really only necessary when considering #305. Still, it might be an interesting option that would make the generated caps longer but perhaps more readable in that each local variable name of the scheme would be shown in the call statement making it easy to see how the CCPP is calling that scheme. |
Note that ccpp_prebuild.py always uses keyword arguments. This is almost necessary, because local names in subroutines often/almost always differ from the host model names and it makes it much easier to read what goes to where. |
@climbfuji, it sounds like you would prefer that this 'feature' just be added to capgen. Do you agree? |
Yes, please. |
This was fixed by #347 but a typo in the "fixes" line prevented automatic closure. |
One can use any order of the input arguments if those arguments are specified by their dummy name. However, for CCPP usage, this variable ordering is not important for automatically generated code.
However, in support of optional arguments to CCPP-ized routines (#305 Support for optional arguments to CCPP-ized physics schemes), the subroutine keyword arguments will be invaluable. Without keyword argument support, optional arguments are severely restricted in use.
The text was updated successfully, but these errors were encountered: