Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Latest PR) Clean up diagnostic variables in WW3 for Langmuir turbulence parameterization #9

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

alperaltuntas
Copy link
Member

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

  • Clean up the calculations of the surface Stokes drift (USSX and USSY) and surface layer averaged Stokes drift (USSHX and USSHY). The calculation of surface layer averaged Stokes drift and the tail contributions to both versions of Stokes drift are activated when W3_CESMCOUPLED is defined.
  • Change the input field of mixed layer depth HML to a more general surface layer depth HSL. 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.
  • Clean up the diagnostic variables for Langmuir turbulence parameterization. Some variables are intermediate quantities and are not used in the parameterization. These variables are now deleted. The key variable diagnosed in WW3 is the surface layer averaged Stokes drift (USSHX and USSHY). 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 way LAMULT is defined.
  • This PR only changes the diagnostic variables in WW3 and shouldn't change the answers of WW3. Ideally, this PR shouldn't change the diagnostic variables to be used in CESM (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.
  • Labels: enhancement?

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.

alperaltuntas and others added 3 commits June 26, 2023 11:14
…rization

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.

* Clean up the calculations of the surface Stokes drift (`USSX` and `USSY`) and surface layer averaged Stokes drift (`USSHX` and `USSHY`). The calculation of surface layer averaged Stokes drift and the tail contributions to both versions of Stokes drift are activated when `W3_CESMCOUPLED` is defined.
* Change the input field of mixed layer depth `HML` to a more general surface layer depth `HSL`. 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.
* Clean up the diagnostic variables for Langmuir turbulence parameterization. Some variables are intermediate quantities and are not used in the parameterization. These variables are now deleted. The key variable diagnosed in WW3 is the surface layer averaged Stokes drift (`USSHX` and `USSHY`). 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 way `LAMULT` is defined.
* This PR only changes the diagnostic variables in WW3 and shouldn't change the answers of WW3. Ideally, this PR shouldn't change the diagnostic variables to be used in CESM (`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.

Co-authored-by: qingli411 <lqingpku@gmail.com>
@alperaltuntas alperaltuntas merged commit a4fbf16 into dev/unified Jul 5, 2023
francescococetta pushed a commit to francescococetta/WW3 that referenced this pull request Sep 26, 2023
updates to use either PR1 or PR3 easily
@alperaltuntas alperaltuntas deleted the dev/unified_new_merge_pr4 branch October 18, 2023 19:58
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.

1 participant