Skip to content

(*) Remap opacity diagnostic to tanh()#952

Merged
adcroft merged 1 commit into
mom-ocean:dev/gfdlfrom
marshallward:tanh_opacity
Jul 20, 2019
Merged

(*) Remap opacity diagnostic to tanh()#952
adcroft merged 1 commit into
mom-ocean:dev/gfdlfrom
marshallward:tanh_opacity

Conversation

@marshallward
Copy link
Copy Markdown
Collaborator

This patch remaps the opacity diagnostic to a tanh function, i.e.

op -> 1/L * tanh(op * L)

where L is arbitrarily set to 10^-10 (1 Angstrom). For op << 1/L, the
diagnostic is nearly equivalent to the model opacity. For values
comparable and larger than L, the diagnostic approaches 1/L, a
sufficiently large value to reproduce the effects of a divergent
opacity.

This allows us to safely manipulate and store the opacity while also
avoiding infinite values and floating point overflow.

This change will modify the opacity diagnostic, but should not affect
the dynamic state.

This patch remaps the opacity diagnostic to a tanh function, i.e.

    op -> 1/L * tanh(op * L)

where L is arbitrarily set to 10^-10 (1 Angstrom).  For op << 1/L, the
diagnostic is nearly equivalent to the model opacity.  For values
comparable and larger than L, the diagnostic approaches 1/L, a
sufficiently large value to reproduce the effects of a divergent
opacity.

This allows us to safely manipulate and store the opacity while also
avoiding infinite values and floating point overflow.

This change will modify the opacity diagnostic, but should not affect
the dynamic state.
@marshallward
Copy link
Copy Markdown
Collaborator Author

@marshallward
Copy link
Copy Markdown
Collaborator Author

GitLab tests have passed (excepting parameters, which is waiting on an update)

@adcroft adcroft merged commit da6c760 into mom-ocean:dev/gfdl Jul 20, 2019
@marshallward marshallward deleted the tanh_opacity branch September 3, 2019 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants