For now, we keep the current non-standard approach that optional arguments can be anywhere in the call list, not just at the end (after the mandatory arguments). Since this is not standard, we must document this in the CCPP tech docs.
The long term solution depends on when/how the error handling changes. If for the foreseeable future we keep errmsg and errflg, we should move them to the beginning of the argument list and reorder the remaining arguments such that optional arguments come last. If the error handling is done differently in the future, the two arguments errmsg and errflg may no longer be necessary. Either way, we can re-arrange the argument list in a separate effort to follow the standard.
Description
See discussion in https://github.com/NCAR/ccpp-framework/pull/529#discussion_r1502670225.
Solution
For now, we keep the current non-standard approach that optional arguments can be anywhere in the call list, not just at the end (after the mandatory arguments). Since this is not standard, we must document this in the CCPP tech docs.
The long term solution depends on when/how the error handling changes. If for the foreseeable future we keep
errmsg
anderrflg
, we should move them to the beginning of the argument list and reorder the remaining arguments such that optional arguments come last. If the error handling is done differently in the future, the two argumentserrmsg
anderrflg
may no longer be necessary. Either way, we can re-arrange the argument list in a separate effort to follow the standard.Alternatives (optional)
n/a
Related to (optional)
n/a