NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Update CCPP tech doc: schemes can currently have optional arguments in between regular arguments - follow up with moving opt args to the end #544

Open climbfuji opened 8 months ago

climbfuji commented 8 months ago

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 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.

Alternatives (optional)

n/a

Related to (optional)

n/a

mkavulich commented 3 months ago

Details on optional arguments are included in https://github.com/NCAR/ccpp-doc/pull/73, see the preview here