-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue538 seasurfaceheight #662
Conversation
This variable has to be set from outside. CGDynamicsKernel::prepareIteration will compute the gradient of SeasurfaceHeight and stores it as CG-Vectors uGradSeasurfaceHeight and vGradSeasurfaceHeight ins CGDynamicsKernel. VPCGDynamicsKernel is using it in main update loop. Before merging we should activate a ice-only testcase.
Adds ssh to IDynamics and IOceanBoundary classes and all the derived classes. Also modifies TOPAZOcn_test.cpp and topaz_test_data.py to test ssh, as well as changing era5_topaz4_maker.py to include and interpolate ssh.
And that is "ssh" (instead of "SSH").
... to appease clang-format and the PR template
... which I missed on the last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small change. I am assuming that the sea-surface gradient calculation code is correct.
It should be a variable like H and A, so HField appears good.
* --------------------------------------------
| Prof. Dr. Thomas Richter
| Numerische Mathematik in den Anwendungen
| Otto-von-Guericke Universität Magdeburg
| numerics.ovgu.de
| +49 391 67-57162 +49 176 615 612 26 (mobil)
… On 1. Oct 2024, at 16:42, Tim Spain ***@***.***> wrote:
@timspainNERSC requested changes on this pull request.
Just one small change. I am assuming that the sea-surface gradient calculation code is correct.In physics/src/modules/include/IOceanBoundary.hpp:
> @@ -86,6 +89,7 @@ class IOceanBoundary : public ModelComponent {
HField cpml; // Heat capacity of the mixed layer, J K⁻¹ m²
UField u; // x(east)-ward ocean current, m s⁻¹
VField v; // y(north)-ward ocean current, m s⁻¹
+ VField ssh; // sea surface height, m
This should be an HField, I believe.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
As pointed out by Tim when reviewing the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of formatting changes, but if they are what clang-format
demands, then they shall stand as they are.
{ "damage", "DAMAGE0" }, // Ice thickness, cell average, m | ||
{ "hice", "H_ICE_cell" }, // Ice thickness, cell average, m | ||
{ "cice", "C_ICE0" }, // Ice concentration | ||
{ "hsnow", "H_SNOW_cell" }, // Snow depth, cell average, m | ||
{ "tice", "T_ICE0" }, // Ice temperature, ˚C | ||
{ "tair", "T_AIR" }, // Air temperature, ˚C | ||
{ "dew2m", "DEW_2M" }, // Dew point at 2 m, ˚C | ||
{ "pair", "P_AIR" }, // sea level air pressure, Pa | ||
{ "mixrat", "MIXRAT" }, // water vapour mass mixing ratio | ||
{ "sw_in", "SW_IN" }, // incoming shortwave flux, W m⁻² | ||
{ "lw_in", "LW_IN" }, // incoming longwave flux, W m⁻² | ||
{ "mld", "MLD" }, // mixed layer depth, m | ||
{ "snowfall", "SNOWFALL" }, // snow fall, kg m⁻² s⁻¹ | ||
{ "sss", "SSS" }, // sea surface salinity, PSU | ||
{ "sst", "SST" }, // sea surface temperature ˚C | ||
{ "sst_ext", "EXT_SST" }, // External sea surface temperature ˚C | ||
{ "sss_ext", "EXT_SSS" }, // External sea surface salinity PSU | ||
{ "eminusp", "E-P" }, // E-P atmospheric freshwater flux, kg s⁻¹ m⁻² | ||
{ "mlcp", "CPML" }, // Mixed layer bulk heat capacity J K⁻¹ m⁻² | ||
{ "tf", "TF" }, // Ocean freezing temperature, ˚C | ||
{ "wind_speed", "WIND_SPEED" }, // Wind speed, m s⁻¹ | ||
{ "wind_u", "WIND_U" }, // wind velocity x component, m s⁻¹ | ||
{ "wind_v", "WIND_V" }, // wind velocity y component, m s⁻¹ | ||
{ "hice_true_pro", "HTRUE_ICE" }, // Ice thickness, ice average, m | ||
{ "hsnow_true_pro", "HTRUE_SNOW" }, // Snow thickness, ice average, m | ||
{ "ocean_u", "OCEAN_U" }, // x(east)-ward ocean current, m s⁻¹ | ||
{ "ocean_v", "OCEAN_V" }, // y(north)-ward ocean current, m s⁻¹ | ||
{ "u", "ICE_U" }, // x(east)-ward ice velocity, m s⁻¹ | ||
{ "v", "ICE_V" }, // y(north)-ward ice velocity, m s⁻¹ | ||
{ "sst_slab", "SLAB_SST" }, // Slab ocean surface temperature ˚C | ||
{ "sss_slab", "SLAB_SSS" }, // Slab ocean surface salinity PSU | ||
{ "qdw", "SLAB_QDW" }, // Slab ocean temperature nudging heat flux, W m⁻² | ||
{ "fdw", "SLAB_FDW" }, // Slab ocean salinity nudging water flux, kg s⁻¹ m⁻² | ||
{ "hice", "H_ICE_cell" }, // Ice thickness, cell average, m | ||
{ "cice", "C_ICE0" }, // Ice concentration | ||
{ "hsnow", "H_SNOW_cell" }, // Snow depth, cell average, m | ||
{ "tice", "T_ICE0" }, // Ice temperature, ˚C | ||
{ "tair", "T_AIR" }, // Air temperature, ˚C | ||
{ "dew2m", "DEW_2M" }, // Dew point at 2 m, ˚C | ||
{ "pair", "P_AIR" }, // sea level air pressure, Pa | ||
{ "mixrat", "MIXRAT" }, // water vapour mass mixing ratio | ||
{ "sw_in", "SW_IN" }, // incoming shortwave flux, W m⁻² | ||
{ "lw_in", "LW_IN" }, // incoming longwave flux, W m⁻² | ||
{ "mld", "MLD" }, // mixed layer depth, m | ||
{ "snowfall", "SNOWFALL" }, // snow fall, kg m⁻² s⁻¹ | ||
{ "sss", "SSS" }, // sea surface salinity, PSU | ||
{ "sst", "SST" }, // sea surface temperature ˚C | ||
{ "sst_ext", "EXT_SST" }, // External sea surface temperature ˚C | ||
{ "sss_ext", "EXT_SSS" }, // External sea surface salinity PSU | ||
{ "eminusp", "E-P" }, // E-P atmospheric freshwater flux, kg s⁻¹ m⁻² | ||
{ "mlcp", "CPML" }, // Mixed layer bulk heat capacity J K⁻¹ m⁻² | ||
{ "tf", "TF" }, // Ocean freezing temperature, ˚C | ||
{ "wind_speed", "WIND_SPEED" }, // Wind speed, m s⁻¹ | ||
{ "wind_u", "WIND_U" }, // wind velocity x component, m s⁻¹ | ||
{ "wind_v", "WIND_V" }, // wind velocity y component, m s⁻¹ | ||
{ "hice_true_pro", "HTRUE_ICE" }, // Ice thickness, ice average, m | ||
{ "hsnow_true_pro", "HTRUE_SNOW" }, // Snow thickness, ice average, m | ||
{ "ocean_u", "OCEAN_U" }, // x(east)-ward ocean current, m s⁻¹ | ||
{ "ocean_v", "OCEAN_V" }, // y(north)-ward ocean current, m s⁻¹ | ||
{ "u", "ICE_U" }, // x(east)-ward ice velocity, m s⁻¹ | ||
{ "v", "ICE_V" }, // y(north)-ward ice velocity, m s⁻¹ | ||
{ "sst_slab", "SLAB_SST" }, // Slab ocean surface temperature ˚C | ||
{ "sss_slab", "SLAB_SSS" }, // Slab ocean surface salinity PSU | ||
{ "qdw", "SLAB_QDW" }, // Slab ocean temperature nudging heat flux, W m⁻² | ||
{ "fdw", "SLAB_FDW" }, // Slab ocean salinity nudging water flux, kg s⁻¹ m⁻² | ||
{ "ssh", "SSH" }, // Slab ocean salinity nudging water flux, kg s⁻¹ m⁻² | ||
|
||
{ "taux", "IO_STRESS_U" }, // Ice-ocean stress x(east) direction, Pa | ||
{ "tauy", "IO_STRESS_V" }, // Ice-ocean stress x(east) direction, Pa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some, but not all, of these are indented. Can they at least be consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is weird. I removed the indentation. I'm not sure if clang-format knows what to do with this file.
It looks like clang-format was a bit overzealous.
# Add sea-surface height Fixes #538 ### Task List - [x] Defined the tests that specify a complete and functioning change (*It may help to create a [design specification & test specification](../../../wiki/Specification-Template)*) - [x] Implemented the source code change that satisfies the tests - [x] Documented the feature by providing worked example - [ ] Updated the README or other documentation - [x] Completed the pre-Request checklist below --- # Change Description This PR adds the contribution of the sea-surface-height gradient to both the mEVP and BBM codes (through VPCGDynamicsKernel and BrittleDynamicsKernel). SSH is read in from IOceanBoundary and passed to the dynamical core. It can also be output through ConfigOutput as "ssh". This PR is a repeat of PR #662 with some fixes to make sure the integration test runs. --- # Test Description No unit test was implemented for this feature, and no quantitative test exists. Qualitative testing shows that setting a fixed sea-surface-height gradient gives drift speed close to back-of-the-envelope estimates (13 cm/s modelled, 20 cm/s from back-of-the-envelope). --- # Documentation Impact None --- # Other Details None --- ### Pre-Request Checklist - [x] The requirements of this pull request are fully captured in an issue or design specification and are linked and summarised in the description of this PR - [x] No new warnings are generated - [x] The documentation has been updated (or an issue has been created to track the corresponding change) - [x] Methods and Tests are commented such that they can be understood without having to obtain additional context - [x] This PR/Issue is labelled as a bug/feature/enhancement/breaking change - [x] File dates have been updated to reflect modification date - [x] This change conforms to the conventions described in the README
Add sea-surface height
Fixes #538
Task List
Change Description
This PR adds the contribution of the sea-surface-height gradient to both the mEVP and BBM codes (through VPCGDynamicsKernel and BrittleDynamicsKernel). SSH is read in from IOceanBoundary and passed to the dynamical core. It can also be output through ConfigOutput as "ssh".
Test Description
No unit test was implemented for this feature, and no quantitative test exists. Qualitative testing shows that setting a fixed sea-surface-height gradient gives drift speed close to back-of-the-envelope estimates (13 cm/s modelled, 20 cm/s from back-of-the-envelope).
Documentation Impact
None
Other Details
None
Pre-Request Checklist