Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+(*)non-Boussinesq ALE_sponges work in Z units
Revised the ALE_sponge code to convert the model's thicknesses (in thickness units of [H ~> m or kg m-2]) into layer vertical extents (in height units of [Z ~> m]) to match how the input datasets vertical grids are specified and to avoid using the Boussinesq reference density to do the opposite conversion when in non-Boussinesq mode. The internal conversion in apply_ALE_sponge between layer thicknesses and layer vertical extents matches those in thickness_to_dz, and uses the layer-averaged specific volumes when in non-Boussinesq mode. As a part of these changes, 12 internal variables in MOM_ALE_sponge were renamed (e.g., from data_h to data_dz) to more clearly reflect that they are the layer vertical extents instead of thicknesses, and there are new 3-d variables dz_model, that is created from h when the sponges are applied to the velocities, and data_dz to handle the conversion of the input thicknesses or vertical extents in initialize_ALE_sponge_fixed. This commit includes adding a new thermo_var_type argument to apply_ALE_sponge, a new unit_scale_type argument to rotate_ALE_sponge and initialize_ALE_sponge_varying and the new optional argument data_h_is_Z to initialize_ALE_sponge_fixed to indicate that the in thicknesses arguments are vertical distances (in [Z ~> m]) and do not need to be rescaled inside of the ALE_sponge code, and similarly for the new optional argument data_h_in_Z to get_ALE_sponge_thicknesses. This commit also adds halo size and Omit_Corners arguments to the pass_var calls in the ALE_sponge code. There are new optional arguments to 2 publicly visible routines, and new mandatory arguments to 3 others, but by default the meaning and units of all previous arguments are the same, and answers will be bitwise identical in any Boussinesq cases. However, answers will change in any non-Boussinesq cases that use the ALE_sponges.
- Loading branch information