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

MOM6: +(*)Rescale pressures #1089

Merged
merged 62 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5a56df7
+Add optional pres_scale arguments to EOS routines
Hallberg-NOAA Apr 4, 2020
63c4510
+Rescaled Boussinesq pressure force calculations
Hallberg-NOAA Apr 4, 2020
7632abe
+Add optional SV_scale arg to int_specific_vol_dp
Hallberg-NOAA Apr 5, 2020
3b3c34a
+Rescaled non-Boussinesq pressure force calcs
Hallberg-NOAA Apr 5, 2020
94f94ed
Rescaled pressure in find_eta routines
Hallberg-NOAA Apr 6, 2020
f29e32a
Rescaled pressure in calc_isoneutral_slopes
Hallberg-NOAA Apr 6, 2020
efbbd31
Rescaled pressures in calculate_vertical_integrals
Hallberg-NOAA Apr 6, 2020
f9b63f3
+Added RL2_T2_to_Pa element to unit_scale_type
Hallberg-NOAA Apr 7, 2020
6d7dde4
Use combined scaling factors
Hallberg-NOAA Apr 7, 2020
6af725f
+Rescaled the units of fluxes%p_surf
Hallberg-NOAA Apr 8, 2020
20ae74d
Merge branch 'dev/gfdl' into rescale_pressure
Hallberg-NOAA Apr 8, 2020
916be3c
Rescaled ice_shelf_CS%g_Earth like GV%g_Earth
Hallberg-NOAA Apr 8, 2020
5e16458
+Add optional pres_scale arg to calculate_TFreeze
Hallberg-NOAA Apr 9, 2020
1252e3b
Pass rescaled pressures to calculate_TFreeze
Hallberg-NOAA Apr 9, 2020
ce0905e
+Add hor_index_type variants of EOS routines
Hallberg-NOAA Apr 10, 2020
2fc1c2e
Use new HI_1d forms of calculate_density calls
Hallberg-NOAA Apr 11, 2020
3223eb6
+Rescaled the units of tv%P_Ref to [R L2 T-2]
Hallberg-NOAA Apr 11, 2020
fb820c1
+Rescaled pressure arguments to multiple routines
Hallberg-NOAA Apr 12, 2020
6948cb7
+Replaced optional pres_scale args with US args
Hallberg-NOAA Apr 12, 2020
1e8c501
Corrected pressure units in comments
Hallberg-NOAA Apr 13, 2020
8df34f4
Rescaled internal MOM_diapyc_energy_req variables
Hallberg-NOAA Apr 13, 2020
500c9e3
Rescaled pressures in 17 calculate_density calls
Hallberg-NOAA Apr 13, 2020
00db8d5
Corrected a bug in calculate_spec_vol_derivs_H1_1d
Hallberg-NOAA Apr 13, 2020
2a951e7
Redirected various EOS interfaces to common code
Hallberg-NOAA Apr 13, 2020
04fcfd4
+Rescaled args to find_depth_of_pressure_in_cell
Hallberg-NOAA Apr 14, 2020
b72afce
+Made arguments to unit_scaling_init optional
Hallberg-NOAA Apr 14, 2020
a7836f0
+Rescaled variables in MOM_neutral_diffusion.F90
Hallberg-NOAA Apr 14, 2020
7643bce
Simpler calculate_density in ISOMIP_initialization
Hallberg-NOAA Apr 14, 2020
030a636
Nullify a pointer in neutral diffusion unit tests
Hallberg-NOAA Apr 15, 2020
ad0c70e
Rescaled three diagnosed densities
Hallberg-NOAA Apr 15, 2020
608d210
Rescaled pressures in wave speed calculations
Hallberg-NOAA Apr 15, 2020
a01dae5
Corrected 3 openMP declarations
Hallberg-NOAA Apr 15, 2020
bb73bb8
+(*)Rescaled pressures used to build coordinates
Hallberg-NOAA Apr 15, 2020
4182ad2
+Add optional US arg to calculate_compress
Hallberg-NOAA Apr 15, 2020
b84b2d3
Rescaled variables in convert_thickness
Hallberg-NOAA Apr 15, 2020
da12012
Minor cleanup related to pressure rescaling
Hallberg-NOAA Apr 15, 2020
ae944c2
Merge branch 'dev/gfdl' into rescale_pressure
Hallberg-NOAA Apr 15, 2020
87054b4
Added an omitted dOxygen comment
Hallberg-NOAA Apr 15, 2020
77b6b74
(*)Set loop bounds in calculate_density calls
Hallberg-NOAA Apr 15, 2020
a00c327
(*)Reordered setting calculate_density loop bounds
Hallberg-NOAA Apr 15, 2020
620a97c
Merge branch 'dev/gfdl' into rescale_pressure
Hallberg-NOAA Apr 16, 2020
ab9d8e9
+Added dom interface to calculate_density
Hallberg-NOAA Apr 17, 2020
415a6bc
Adds unit conversions to EOS type
adcroft Apr 17, 2020
acf23a4
Use the 'dom=' interface to calculate_density
Hallberg-NOAA Apr 17, 2020
18d520e
Remove optional US from most MOM_EOS functions
adcroft Apr 17, 2020
4f42d72
Fixed the spelling in an openMP directive
Hallberg-NOAA Apr 17, 2020
abecf02
Merge branch 'Hallberg-NOAA-rescale_pressure' into rescale_pressure
adcroft Apr 17, 2020
0caf9cc
Missed a conflict resolution
adcroft Apr 17, 2020
371ed85
Initialize scaling params without EOS_init()
adcroft Apr 17, 2020
9b53927
Rescaled internal MOM_CVMix variables
Hallberg-NOAA Apr 17, 2020
760dc39
+Rescaled variables in coord_adapt
Hallberg-NOAA Apr 17, 2020
cdeda16
Switched versions of calculate_density in 22 calls
Hallberg-NOAA Apr 19, 2020
7282956
Merge branch 'rescale_pressure' of git://github.com/adcroft/MOM6 into…
Hallberg-NOAA Apr 19, 2020
f0f894c
Merge branch 'Adcroft_rescale_pressure' into rescale_pressure
Hallberg-NOAA Apr 19, 2020
9c5239e
Corrected MOM_EOS dimensional rescaling problem
Hallberg-NOAA Apr 19, 2020
718c3ab
Removed US argument to find_depth_of_pressure_in_cell
Hallberg-NOAA Apr 19, 2020
e3c434e
Store return values from EOS_domain
Hallberg-NOAA Apr 19, 2020
3a817ef
Fixed a diagnostic halo extent
Hallberg-NOAA Apr 20, 2020
37d30b5
Eliminated the use of GV%mks_g_Earth
Hallberg-NOAA Apr 20, 2020
18b2193
Fixed compile time bugs in mom_surface_forcing_mct
Hallberg-NOAA Apr 20, 2020
f5eb171
Eliminated some US args in MOM_neutral_diffusion
Hallberg-NOAA Apr 20, 2020
8cddc68
Merge branch 'dev/gfdl' into rescale_pressure
marshallward Apr 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions config_src/coupled_driver/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ module MOM_surface_forcing_gfdl
real :: latent_heat_fusion !< Latent heat of fusion [J kg-1]
real :: latent_heat_vapor !< Latent heat of vaporization [J kg-1]

real :: max_p_surf !< The maximum surface pressure that can be
!! exerted by the atmosphere and floating sea-ice [Pa].
real :: max_p_surf !< The maximum surface pressure that can be exerted by
!! the atmosphere and floating sea-ice [R L2 T-2 ~> Pa].
!! This is needed because the FMS coupling structure
!! does not limit the water that can be frozen out
!! of the ocean and the ice-ocean heat fluxes are
Expand Down Expand Up @@ -548,14 +548,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = MIN(fluxes%p_surf_full(i,j),CS%max_p_surf)
if (CS%check_no_land_fluxes) &
call check_mask_val_consistency(IOB%p(i-i0,j-j0), G%mask2dT(i,j), i, j, 'p', G)
enddo ; enddo
else
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = fluxes%p_surf_full(i,j)
if (CS%check_no_land_fluxes) &
call check_mask_val_consistency(IOB%p(i-i0,j-j0), G%mask2dT(i,j), i, j, 'p', G)
Expand Down Expand Up @@ -673,7 +673,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS, dt_
net_mass_src, & ! A temporary of net mass sources [kg m-2 s-1].
ustar_tmp ! A temporary array of ustar values [Z T-1 ~> m s-1].

real :: I_GEarth ! 1.0 / G_Earth [s2 m-1]
real :: I_GEarth ! Pressure conversion factors times 1.0 / G_Earth [kg m-2 T2 R-1 L-2 ~> s2 m-1]
real :: Kv_rho_ice ! (CS%kv_sea_ice / CS%density_sea_ice) [m5 s-1 kg-1]
real :: mass_ice ! mass of sea ice at a face [kg m-2]
real :: mass_eff ! effective mass of sea ice for rigidity [kg m-2]
Expand Down Expand Up @@ -751,12 +751,12 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS, dt_
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = MIN(forces%p_surf_full(i,j),CS%max_p_surf)
enddo ; enddo
else
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = forces%p_surf_full(i,j)
enddo ; enddo
endif
Expand Down Expand Up @@ -837,7 +837,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS, dt_

if (CS%rigid_sea_ice) then
call pass_var(forces%p_surf_full, G%Domain, halo=1)
I_GEarth = 1.0 / CS%G_Earth
I_GEarth = US%RL2_T2_to_Pa / CS%G_Earth
Kv_rho_ice = (CS%kv_sea_ice / CS%density_sea_ice)
do I=is-1,ie ; do j=js,je
mass_ice = min(forces%p_surf_full(i,j), forces%p_surf_full(i+1,j)) * I_GEarth
Expand Down Expand Up @@ -1299,8 +1299,8 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)
"needed because the FMS coupling structure does not "//&
"limit the water that can be frozen out of the ocean and "//&
"the ice-ocean heat fluxes are treated explicitly. No "//&
"limit is applied if a negative value is used.", units="Pa", &
default=-1.0)
"limit is applied if a negative value is used.", &
units="Pa", default=-1.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2)
call get_param(param_file, mdl, "RESTORE_SALINITY", CS%restore_salt, &
"If true, the coupled driver will add a globally-balanced "//&
"fresh-water flux that drives sea-surface salinity "//&
Expand Down
22 changes: 11 additions & 11 deletions config_src/mct_driver/mom_surface_forcing_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ module MOM_surface_forcing_mct
real :: latent_heat_fusion !< latent heat of fusion [J kg-1]
real :: latent_heat_vapor !< latent heat of vaporization [J kg-1]

real :: max_p_surf !< maximum surface pressure that can be
!! exerted by the atmosphere and floating sea-ice,
!! [Pa]. This is needed because the FMS coupling
real :: max_p_surf !< The maximum surface pressure that can be exerted by
!! the atmosphere and floating sea-ice [R L2 T-2 ~> Pa].
!! This is needed because the FMS coupling
!! structure does not limit the water that can be
!! frozen out of the ocean and the ice-ocean heat
!! fluxes are treated explicitly.
Expand Down Expand Up @@ -527,12 +527,12 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = MIN(fluxes%p_surf_full(i,j),CS%max_p_surf)
enddo; enddo
else
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = fluxes%p_surf_full(i,j)
enddo; enddo
endif
Expand Down Expand Up @@ -621,7 +621,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
real :: tau_mag !< magnitude of the wind stress [R Z L T-2 ~> Pa]
real :: Pa_conversion ! A unit conversion factor from Pa to the internal wind stress units [R Z L T-2 Pa-1 ~> 1]
real :: stress_conversion ! A unit conversion factor from Pa times any stress multiplier [R Z L T-2 Pa-1 ~> 1]
real :: I_GEarth !< 1.0 / G%G_Earth [s2 m-1]
real :: I_GEarth !< Pressure conversion factors times 1.0 / G_Earth [kg m-2 T2 R-1 L-2 ~> s2 m-1]
real :: Kv_rho_ice !< (CS%kv_sea_ice / CS%density_sea_ice) [m5 s-1 kg-1]
real :: mass_ice !< mass of sea ice at a face [kg m-2]
real :: mass_eff !< effective mass of sea ice for rigidity [kg m-2]
Expand Down Expand Up @@ -686,12 +686,12 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = MIN(forces%p_surf_full(i,j),CS%max_p_surf)
enddo ; enddo
else
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = forces%p_surf_full(i,j)
enddo ; enddo
endif
Expand Down Expand Up @@ -845,7 +845,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)

if (CS%rigid_sea_ice) then
call pass_var(forces%p_surf_full, G%Domain, halo=1)
I_GEarth = 1.0 / CS%G_Earth
I_GEarth = US%RL2_T2_to_Pa / CS%g_Earth
Kv_rho_ice = (CS%kv_sea_ice / CS%density_sea_ice)
do I=is-1,ie ; do j=js,je
mass_ice = min(forces%p_surf_full(i,j), forces%p_surf_full(i+1,j)) * I_GEarth
Expand Down Expand Up @@ -1077,8 +1077,8 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"needed because the FMS coupling structure does not "//&
"limit the water that can be frozen out of the ocean and "//&
"the ice-ocean heat fluxes are treated explicitly. No "//&
"limit is applied if a negative value is used.", units="Pa", &
default=-1.0)
"limit is applied if a negative value is used.", &
units="Pa", default=-1.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2)
call get_param(param_file, mdl, "ADJUST_NET_SRESTORE_TO_ZERO", &
CS%adjust_net_srestore_to_zero, &
"If true, adjusts the salinity restoring seen to zero "//&
Expand Down
22 changes: 11 additions & 11 deletions config_src/nuopc_driver/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ module MOM_surface_forcing_nuopc
real :: latent_heat_fusion !< latent heat of fusion [J/kg]
real :: latent_heat_vapor !< latent heat of vaporization [J/kg]

real :: max_p_surf !< maximum surface pressure that can be
!! exerted by the atmosphere and floating sea-ice,
!! in Pa. This is needed because the FMS coupling
real :: max_p_surf !< maximum surface pressure that can be exerted by the
!! atmosphere and floating sea-ice [R L2 T-2 ~> Pa].
!! This is needed because the FMS coupling
!! structure does not limit the water that can be
!! frozen out of the ocean and the ice-ocean heat
!! fluxes are treated explicitly.
Expand Down Expand Up @@ -524,12 +524,12 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = MIN(fluxes%p_surf_full(i,j),CS%max_p_surf)
enddo; enddo
else
do j=js,je ; do i=is,ie
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
fluxes%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
fluxes%p_surf(i,j) = fluxes%p_surf_full(i,j)
enddo; enddo
endif
Expand Down Expand Up @@ -618,7 +618,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
real :: tau_mag !< magnitude of the wind stress [R Z L T-2 ~> Pa]
real :: Pa_conversion ! A unit conversion factor from Pa to the internal wind stress units [R Z L T-2 Pa-1 ~> 1]
real :: stress_conversion ! A unit conversion factor from Pa times any stress multiplier [R Z L T-2 Pa-1 ~> 1]
real :: I_GEarth !< 1.0 / G_Earth [s2 m-1]
real :: I_GEarth !< Pressure conversion factors times 1.0 / G_Earth [kg m-2 T2 R-1 L-2 ~> s2 m-1]
real :: Kv_rho_ice !< (CS%kv_sea_ice / CS%density_sea_ice) ( m^5/(s*kg) )
real :: mass_ice !< mass of sea ice at a face (kg/m^2)
real :: mass_eff !< effective mass of sea ice for rigidity (kg/m^2)
Expand Down Expand Up @@ -682,12 +682,12 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
if (associated(IOB%p)) then
if (CS%max_p_surf >= 0.0) then
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = MIN(forces%p_surf_full(i,j),CS%max_p_surf)
enddo ; enddo
else
do j=js,je ; do i=is,ie
forces%p_surf_full(i,j) = G%mask2dT(i,j) * IOB%p(i-i0,j-j0)
forces%p_surf_full(i,j) = G%mask2dT(i,j) * US%kg_m3_to_R*US%m_s_to_L_T**2*IOB%p(i-i0,j-j0)
forces%p_surf(i,j) = forces%p_surf_full(i,j)
enddo ; enddo
endif
Expand Down Expand Up @@ -845,7 +845,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)

if (CS%rigid_sea_ice) then
call pass_var(forces%p_surf_full, G%Domain, halo=1)
I_GEarth = 1.0 / CS%g_Earth
I_GEarth = US%RL2_T2_to_Pa / CS%g_Earth
Kv_rho_ice = (CS%kv_sea_ice / CS%density_sea_ice)
do I=is-1,ie ; do j=js,je
mass_ice = min(forces%p_surf_full(i,j), forces%p_surf_full(i+1,j)) * I_GEarth
Expand Down Expand Up @@ -1076,8 +1076,8 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"needed because the FMS coupling structure does not "//&
"limit the water that can be frozen out of the ocean and "//&
"the ice-ocean heat fluxes are treated explicitly. No "//&
"limit is applied if a negative value is used.", units="Pa", &
default=-1.0)
"limit is applied if a negative value is used.", &
units="Pa", default=-1.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2)
call get_param(param_file, mdl, "ADJUST_NET_SRESTORE_TO_ZERO", &
CS%adjust_net_srestore_to_zero, &
"If true, adjusts the salinity restoring seen to zero "//&
Expand Down
Loading