MITgcm icon indicating copy to clipboard operation
MITgcm copied to clipboard

OBCS_SEAICE_NEUMANN flag, more store directives, and cleanup

Open mjlosch opened this issue 1 year ago • 0 comments

What changes does this PR introduce?

new feature and some additional tweaks of TAF store directives and cleanup

What is the current behaviour?

  • no Neumann boundary condition for sea ice variables
  • defining ALLOW_OBCS_BALANCE and ALLOW_OBCS_STEVENS leads to (hidden) recomputations and also to some recomputation warnings (untested configuration)
  • divisions by zero in taf-generated ad-code of ggl90_calc.F

What is the new behaviour

  • Neumann boundary conditions for sea ice variables, activate by defining new flag OBCS_SEAICE_NEUMANN, defining this flag will override any other input from files for sea ice variables.
  • fewer (hidden) recomputations and no recomputation warnings when both ALLOW_OBCS_BALANCE and ALLOW_OBCS_STEVENS and OBCS_SEAICE_NEUMANN are defined
  • avoid divisions by zero in taf-generated ad-code of ggl90_calc.F due to AD of SQRT
  • new runtime flag for pkg/cost: cost_mask_file, which can be useful for flexible cost function definitions

Does this PR introduce a breaking change?

No

Other information:

These are changes that were required for a specific configuration. I think they are useful for everyone.

Suggested addition to tag-index

o pkg/obcs:

  • Neumann boundary conditions for sea ice variables, activate by defining new flag OBCS_SEAICE_NEUMANN
  • fewer (hidden) recomputations and no recomputation warnings when both ALLOW_OBCS_BALANCE and ALLOW_OBCS_STEVENS and OBCS_SEAICE_NEUMANN are defined

o pkg/ggl90: avoid divisions by zero in taf-generated ad-code of ggl90_calc.F due to AD of SQRT o pkg/cost: new runtime flag for pkg/cost: cost_mask_file, which can be useful for flexible cost function definitions

mjlosch avatar Jun 26 '23 11:06 mjlosch