(Latest PR) Clean up diagnostic variables in WW3 for Langmuir turbulence parameterization #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This the updated PR based on #4 by @qingli411
In addition to the changes by @qingli411 as summarized below, I have added mod_def namelist parameters to control the Langmuir parameterization and eliminated the CESMCOUPLED and SDTAIL ifdefs by replacing them with if statements (with flags from the newly added namelist) wherever applicable.
Pull Request Summary
This PR cleans up the calculation of Stokes drift and other diagnostics variables in WW3 for Langmuir turbulence parameterization in CESM.
Description
USSX
andUSSY
) and surface layer averaged Stokes drift (USSHX
andUSSHY
). The calculation of surface layer averaged Stokes drift and the tail contributions to both versions of Stokes drift are activated whenW3_CESMCOUPLED
is defined.HML
to a more general surface layer depthHSL
. This depth is used to calculate the surface layer averaged Stokes drift. When used in CESM, the surface layer depth is defined as 1/5 of the mixed layer depth. Now this 1/5 factor is applied to the mixed layer depth when importing the fields in the cap.USSHX
andUSSHY
). The Langmuir enhancement factor (LAMULT
) and the surface layer averaged Langmuir number (LASL
) are now calculated when they are exported in the cap.LASL
is needed for the Langmuir induced entrainment parameterization in CVMix but was not there in the cap code. So it is now added following the wayLAMULT
is defined.LAMULT
,LASL
) as well. But given that the calculation of these variables are moved to the cap, and the way division by zero and physically invalid values (both should be rare) are handled, small changes to these variables are expected.Issue(s) addressed
This PR addresses the following issues.
Commit Message
Clean up the calculation of Stokes drift and other diagnostic variables for Langmuir turbulence parameterization.