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

Self-attraction-and-loading and harmonic analysis for SSH != 0 #52

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dengwirda
Copy link
Collaborator

@dengwirda dengwirda commented Apr 25, 2023

This PR addresses three issues encountered in tides runs with non-zero initial sea-surface heights (due to either ice-shelf cavities and/or dry cells adjacent to the coast):

  1. The SAL tendency is updated to consider surface pressure loading (due either to ISC weight or applied ATM pressure). This ensures the SAL is computed using the full barotropic pressure, and that a well-balanced initial state is maintained (a balanced SSH and pressure state doesn't lead to spurious horizontal motion). The ssh_sal variable(s) have been renamed pgf_sal since there's now the full barotropic pressure dependence rather than just SSH.
  2. The coastalSmoothingFactor used in the SAL computation is updated to use a depth threshold, allowing very thin, dry cells to be effectively masked out of the computation. This prevents spurious SAL tendencies being computed near the coast, where dry cells on land (with effectively a raised SSH value) would previously contaminate the SAL computed on adjacent wet cells. The depth threshold is controlled using the config_self_attraction_loading_depth_cutoff option, with SSH smoothing applied to columns of lesser thickness, which controls SAL behaviour near the wet-dry interface.
  3. The harmonic analysis AM is updated to work with the SSH anomaly rather than SSH directly, which computes the correct amplitude and phase for cells with an initial SSH offset.

Tested with the ICoM 45to5km tides mesh, cori-haswell + pm-cpu and gnu.

- Include pressure forcing term in SAL computation to account for
  under isc and atm pressure cases.

- Update SAL coastal smoothing factor to mask shallow cells where
  wet-dry effects may occur out of SAL computation.

- Compute harmonic analysis AM wrt. SSH-SSH_init to account for
  initially non-zero SSH distributions.
Copy link
Collaborator

@sbrus89 sbrus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dengwirda, thanks for making the modifications! I just left a few minor comments to possibly consider as well.

- Clean up descriptions, comments and use real-valued switches.
- Change sshSmoothed to btrPressure in SAL routines, since we're
  now working with surface pressures too.
@dengwirda
Copy link
Collaborator Author

Thanks @sbrus89, I've updated to include those suggestions.

@dengwirda dengwirda marked this pull request as ready for review April 25, 2023 20:46
Copy link

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look reasonable to me. This PR can proceed from Ocean-Discussion to an E3SM-Project PR. I made the three comments above because it was hard to pick out the substantial changes from all the renamed variables.

allocate(sshDiff(nCellsSolve))

do iCell = 1,nCellsSolve
sshDiff(iCell) = ssh(iCell) - sshInit(iCell)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to point it out, this is the substantial line of this PR.

sshSmoothed(iCell) = coastalSmoothingFactor(iCell)*ssh(iCell)
! compute SAL wrt. the full barotropic bottom pressure
btrPressure(iCell) = coastalSmoothingFactor(iCell) * ( &
ssh(iCell) + rho0gInv * surfacePressure(iCell) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another substantial change.

do iCell = 1,nCellsAll
depth = ssh(iCell) + bottomDepth(iCell)
coastalSmoothingFactor(iCell) = 0.5_RKIND*(tanh( &
(depth - 0.5_RKIND*depth_tol) / (0.2_RKIND*depth_tol)) + 1.0_RKIND)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to coastal smoothing factor to be depth-based rather than width-based.

Copy link
Collaborator

@sbrus89 sbrus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dengwirda, thanks for making those changes. This looks ready to be moved to an E3SM PR.

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.

3 participants