Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
icepack_atmo: use separate stability factors for momentum and scalars
In 37f2a17 (Add support for staggered atmospheric levels (CICE-Consortium#364), 2021-05-28), we introduced the subroutine compute_stability_function, which computes the stability function during the iteration in 'icepack_amto::atmo_boundary_layer'. This subroutine also returns the unit step function 'stable' at 'hol', since it is used at the end of the computation to compute the diagnostic temperature and humidity. Note that we overwrite 'stable' in the second call to compute_stability_function, but this is OK since we call it first for momentum and then for scalars, and it is the value for scalars that we want to use later for diagnostic temperature and humdity. In a following commit we will want to compute the diagnostic _velocity_ in a different way than what is done now, and we will need the unit step function computed at the momentum level (which is currently overwritten). In preparation for that change, add a new variable 'stablem' for the unit step function at the momentum level, and rename the existing 'stable' variable to 'stables' (for scalars). Adjust the computation of 'psix2' accordingly.
- Loading branch information