Skip to content

Commit

Permalink
changes to the interfaces to bring them more in line with dev/ncar la…
Browse files Browse the repository at this point in the history
…test
  • Loading branch information
Mariana Vertenstein committed Jul 14, 2019
1 parent 87e6f17 commit 8da9eb9
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 137 deletions.
38 changes: 19 additions & 19 deletions config_src/mct_driver/MOM_ocean_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
! Read all relevant parameters and write them to the model log.
call log_version(param_file, mdl, version, "")
call get_param(param_file, mdl, "RESTART_CONTROL", OS%Restart_control, &
"An integer whose bits encode which restart files are \n"//&
"written. Add 2 (bit 1) for a time-stamped file, and odd \n"//&
"(bit 0) for a non-time-stamped file. A restart file \n"//&
"will be saved at the end of the run segment for any \n"//&
"An integer whose bits encode which restart files are "//&
"written. Add 2 (bit 1) for a time-stamped file, and odd "//&
"(bit 0) for a non-time-stamped file. A restart file "//&
"will be saved at the end of the run segment for any "//&
"non-negative value.", default=1)
call get_param(param_file, mdl, "OCEAN_SURFACE_STAGGER", stagger, &
"A case-insensitive character string to indicate the \n"//&
"staggering of the surface velocity field that is \n"//&
"returned to the coupler. Valid values include \n"//&
"A case-insensitive character string to indicate the "//&
"staggering of the surface velocity field that is "//&
"returned to the coupler. Valid values include "//&
"'A', 'B', or 'C'.", default="C")
if (uppercase(stagger(1:1)) == 'A') then
Ocean_sfc%stagger = AGRID
Expand All @@ -308,17 +308,17 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
end if

call get_param(param_file, mdl, "RESTORE_SALINITY",OS%restore_salinity, &
"If true, the coupled driver will add a globally-balanced \n"//&
"fresh-water flux that drives sea-surface salinity \n"//&
"If true, the coupled driver will add a globally-balanced "//&
"fresh-water flux that drives sea-surface salinity "//&
"toward specified values.", default=.false.)
call get_param(param_file, mdl, "RESTORE_TEMPERATURE",OS%restore_temp, &
"If true, the coupled driver will add a \n"//&
"heat flux that drives sea-surface temperauture \n"//&
"If true, the coupled driver will add a "//&
"heat flux that drives sea-surface temperature "//&
"toward specified values.", default=.false.)
call get_param(param_file, mdl, "RHO_0", Rho0, &
"The mean ocean density used with BOUSSINESQ true to \n"//&
"calculate accelerations and the mass for conservation \n"//&
"properties, or with BOUSSINSEQ false to convert some \n"//&
"The mean ocean density used with BOUSSINESQ true to "//&
"calculate accelerations and the mass for conservation "//&
"properties, or with BOUSSINSEQ false to convert some "//&
"parameters from vertical units of m to kg m-2.", &
units="kg m-3", default=1035.0)
call get_param(param_file, mdl, "G_EARTH", G_Earth, &
Expand All @@ -339,8 +339,8 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
call get_param(param_file, mdl, "LATENT_HEAT_FUSION", OS%latent_heat_fusion, &
"The latent heat of fusion.", units="J/kg", default=hlf)
call get_param(param_file, mdl, "BERG_AREA_THRESHOLD", OS%berg_area_threshold, &
"Fraction of grid cell which iceberg must occupy, so that fluxes \n"//&
"below berg are set to zero. Not applied for negative \n"//&
"Fraction of grid cell which iceberg must occupy, so that fluxes "//&
"below berg are set to zero. Not applied for negative "//&
" values.", units="non-dim", default=-1.0)
endif

Expand All @@ -350,9 +350,9 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
! vertical integrals, since the related 3-d sums are not negligible in cost.

call get_param(param_file, mdl, "HFREEZE", HFrz, &
"If HFREEZE > 0, melt potential will be computed. The actual depth \n"//&
"over which melt potential is computed will be min(HFREEZE, OBLD), \n"//&
"where OBLD is the boundary layer depth. If HFREEZE <= 0 (default), \n"//&
"If HFREEZE > 0, melt potential will be computed. The actual depth "//&
"over which melt potential is computed will be min(HFREEZE, OBLD), "//&
"where OBLD is the boundary layer depth. If HFREEZE <= 0 (default), "//&
"melt potential will not be computed.", units="m", default=-1.0, do_not_log=.true.)

if (HFrz .gt. 0.0) then
Expand Down
78 changes: 39 additions & 39 deletions config_src/mct_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1050,59 +1050,59 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
default=".")
CS%inputdir = slasher(CS%inputdir)
call get_param(param_file, mdl, "ENABLE_THERMODYNAMICS", CS%use_temperature, &
"If true, Temperature and salinity are used as state \n"//&
"If true, Temperature and salinity are used as state "//&
"variables.", default=.true.)
call get_param(param_file, mdl, "RHO_0", CS%Rho0, &
"The mean ocean density used with BOUSSINESQ true to \n"//&
"calculate accelerations and the mass for conservation \n"//&
"properties, or with BOUSSINSEQ false to convert some \n"//&
"The mean ocean density used with BOUSSINESQ true to "//&
"calculate accelerations and the mass for conservation "//&
"properties, or with BOUSSINSEQ false to convert some "//&
"parameters from vertical units of m to kg m-2.", &
units="kg m-3", default=1035.0)
call get_param(param_file, mdl, "LATENT_HEAT_FUSION", CS%latent_heat_fusion, &
"The latent heat of fusion.", units="J/kg", default=hlf)
call get_param(param_file, mdl, "LATENT_HEAT_VAPORIZATION", CS%latent_heat_vapor, &
"The latent heat of fusion.", units="J/kg", default=hlv)
call get_param(param_file, mdl, "MAX_P_SURF", CS%max_p_surf, &
"The maximum surface pressure that can be exerted by the \n"//&
"atmosphere and floating sea-ice or ice shelves. This is \n"//&
"needed because the FMS coupling structure does not \n"//&
"limit the water that can be frozen out of the ocean and \n"//&
"the ice-ocean heat fluxes are treated explicitly. No \n"//&
"The maximum surface pressure that can be exerted by the "//&
"atmosphere and floating sea-ice or ice shelves. 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. No "//&
"limit is applied if a negative value is used.", units="Pa", &
default=-1.0)
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\n"//&
"If true, adjusts the salinity restoring seen to zero "//&
"whether restoring is via a salt flux or virtual precip.",&
default=restore_salt)
call get_param(param_file, mdl, "ADJUST_NET_SRESTORE_BY_SCALING", &
CS%adjust_net_srestore_by_scaling, &
"If true, adjustments to salt restoring to achieve zero net are\n"//&
"If true, adjustments to salt restoring to achieve zero net are "//&
"made by scaling values without moving the zero contour.",&
default=.false.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_TO_ZERO", &
CS%adjust_net_fresh_water_to_zero, &
"If true, adjusts the net fresh-water forcing seen \n"//&
"If true, adjusts the net fresh-water forcing seen "//&
"by the ocean (including restoring) to zero.", default=.false.)
if (CS%adjust_net_fresh_water_to_zero) &
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to\n"//&
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.false.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_BY_SCALING", &
CS%adjust_net_fresh_water_by_scaling, &
"If true, adjustments to net fresh water to achieve zero net are\n"//&
"If true, adjustments to net fresh water to achieve zero net are "//&
"made by scaling values without moving the zero contour.",&
default=.false.)
call get_param(param_file, mdl, "ICE_SALT_CONCENTRATION", &
CS%ice_salt_concentration, &
"The assumed sea-ice salinity needed to reverse engineer the \n"//&
"The assumed sea-ice salinity needed to reverse engineer the "//&
"melt flux (or ice-ocean fresh-water flux).", &
units="kg/kg", default=0.005)
call get_param(param_file, mdl, "USE_LIMITED_PATM_SSH", CS%use_limited_P_SSH, &
"If true, return the sea surface height with the \n"//&
"correction for the atmospheric (and sea-ice) pressure \n"//&
"limited by max_p_surf instead of the full atmospheric \n"//&
"If true, return the sea surface height with the "//&
"correction for the atmospheric (and sea-ice) pressure "//&
"limited by max_p_surf instead of the full atmospheric "//&
"pressure.", default=.true.)

! smg: should get_param call should be removed when have A=B code reconciled.
Expand All @@ -1111,23 +1111,23 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
default=CS%use_temperature,do_not_log=.true.)

call get_param(param_file, mdl, "WIND_STAGGER", stagger, &
"A case-insensitive character string to indicate the \n"//&
"staggering of the input wind stress field. Valid \n"//&
"A case-insensitive character string to indicate the "//&
"staggering of the input wind stress field. Valid "//&
"values are 'A', 'B', or 'C'.", default="C")
if (uppercase(stagger(1:1)) == 'A') then ; CS%wind_stagger = AGRID
elseif (uppercase(stagger(1:1)) == 'B') then ; CS%wind_stagger = BGRID_NE
elseif (uppercase(stagger(1:1)) == 'C') then ; CS%wind_stagger = CGRID_NE
else ; call MOM_error(FATAL,"surface_forcing_init: WIND_STAGGER = "// &
trim(stagger)//" is invalid.") ; endif
call get_param(param_file, mdl, "WIND_STRESS_MULTIPLIER", CS%wind_stress_multiplier, &
"A factor multiplying the wind-stress given to the ocean by the\n"//&
"coupler. This is used for testing and should be =1.0 for any\n"//&
"A factor multiplying the wind-stress given to the ocean by the "//&
"coupler. This is used for testing and should be =1.0 for any "//&
"production runs.", default=1.0)

if (restore_salt) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes \n"//&
"to the relative surface anomalies (akin to a piston \n"//&
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", units="m day-1", &
fail_if_missing=.true.)
call get_param(param_file, mdl, "SALT_RESTORE_FILE", CS%salt_restore_file, &
Expand All @@ -1141,19 +1141,19 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
CS%Flux_const = CS%Flux_const / 86400.0

call get_param(param_file, mdl, "SRESTORE_AS_SFLUX", CS%salt_restore_as_sflux, &
"If true, the restoring of salinity is applied as a salt \n"//&
"If true, the restoring of salinity is applied as a salt "//&
"flux instead of as a freshwater flux.", default=.false.)
call get_param(param_file, mdl, "MAX_DELTA_SRESTORE", CS%max_delta_srestore, &
"The maximum salinity difference used in restoring terms.", &
units="PSU or g kg-1", default=999.0)
call get_param(param_file, mdl, "MASK_SRESTORE_UNDER_ICE", &
CS%mask_srestore_under_ice, &
"If true, disables SSS restoring under sea-ice based on a frazil\n"//&
"If true, disables SSS restoring under sea-ice based on a frazil "//&
"criteria (SST<=Tf). Only used when RESTORE_SALINITY is True.", &
default=.false.)
call get_param(param_file, mdl, "MASK_SRESTORE_MARGINAL_SEAS", &
CS%mask_srestore_marginal_seas, &
"If true, disable SSS restoring in marginal seas. Only used when\n"//&
"If true, disable SSS restoring in marginal seas. Only used when "//&
"RESTORE_SALINITY is True.", default=.false.)
call get_param(param_file, mdl, "BASIN_FILE", basin_file, &
"A file in which to find the basin masks, in variable 'basin'.", &
Expand All @@ -1171,8 +1171,8 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,

if (restore_temp) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes \n"//&
"to the relative surface anomalies (akin to a piston \n"//&
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", units="m day-1", &
fail_if_missing=.true.)
call get_param(param_file, mdl, "SST_RESTORE_FILE", CS%temp_restore_file, &
Expand All @@ -1199,11 +1199,11 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"The drag coefficient that applies to the tides.", &
units="nondim", default=1.0e-4)
call get_param(param_file, mdl, "READ_TIDEAMP", CS%read_TIDEAMP, &
"If true, read a file (given by TIDEAMP_FILE) containing \n"//&
"If true, read a file (given by TIDEAMP_FILE) containing "//&
"the tidal amplitude with INT_TIDE_DISSIPATION.", default=.false.)
if (CS%read_TIDEAMP) then
call get_param(param_file, mdl, "TIDEAMP_FILE", TideAmp_file, &
"The path to the file containing the spatially varying \n"//&
"The path to the file containing the spatially varying "//&
"tidal amplitudes with INT_TIDE_DISSIPATION.", &
default="tideamp.nc")
CS%utide=0.0
Expand Down Expand Up @@ -1238,14 +1238,14 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
! constant.

call get_param(param_file, mdl, "READ_GUST_2D", CS%read_gust_2d, &
"If true, use a 2-dimensional gustiness supplied from \n"//&
"If true, use a 2-dimensional gustiness supplied from "//&
"an input file", default=.false.)
call get_param(param_file, mdl, "GUST_CONST", CS%gust_const, &
"The background gustiness in the winds.", units="Pa", &
default=0.02)
if (CS%read_gust_2d) then
call get_param(param_file, mdl, "GUST_2D_FILE", gust_file, &
"The file in which the wind gustiness is found in \n"//&
"The file in which the wind gustiness is found in "//&
"variable gustiness.")

call safe_alloc_ptr(CS%gust,isd,ied,jsd,jed)
Expand All @@ -1256,31 +1256,31 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,

! See whether sufficiently thick sea ice should be treated as rigid.
call get_param(param_file, mdl, "USE_RIGID_SEA_ICE", CS%rigid_sea_ice, &
"If true, sea-ice is rigid enough to exert a \n"//&
"If true, sea-ice is rigid enough to exert a "//&
"nonhydrostatic pressure that resist vertical motion.", &
default=.false.)
if (CS%rigid_sea_ice) then
call get_param(param_file, mdl, "SEA_ICE_MEAN_DENSITY", CS%density_sea_ice, &
"A typical density of sea ice, used with the kinematic \n"//&
"A typical density of sea ice, used with the kinematic "//&
"viscosity, when USE_RIGID_SEA_ICE is true.", units="kg m-3", &
default=900.0)
call get_param(param_file, mdl, "SEA_ICE_VISCOSITY", CS%Kv_sea_ice, &
"The kinematic viscosity of sufficiently thick sea ice \n"//&
"The kinematic viscosity of sufficiently thick sea ice "//&
"for use in calculating the rigidity of sea ice.", &
units="m2 s-1", default=1.0e9)
call get_param(param_file, mdl, "SEA_ICE_RIGID_MASS", CS%rigid_sea_ice_mass, &
"The mass of sea-ice per unit area at which the sea-ice \n"//&
"The mass of sea-ice per unit area at which the sea-ice "//&
"starts to exhibit rigidity", units="kg m-2", default=1000.0)
endif

call get_param(param_file, mdl, "ALLOW_ICEBERG_FLUX_DIAGNOSTICS", iceberg_flux_diags, &
"If true, makes available diagnostics of fluxes from icebergs\n"//&
"If true, makes available diagnostics of fluxes from icebergs "//&
"as seen by MOM6.", default=.false.)
call register_forcing_type_diags(Time, diag, US, CS%use_temperature, CS%handles, &
use_berg_fluxes=iceberg_flux_diags)

call get_param(param_file, mdl, "ALLOW_FLUX_ADJUSTMENTS", CS%allow_flux_adjustments, &
"If true, allows flux adjustments to specified via the \n"//&
"If true, allows flux adjustments to specified via the "//&
"data_table using the component name 'OCN'.", default=.false.)
if (CS%allow_flux_adjustments) then
call data_override_init(Ocean_domain_in=G%Domain%mpp_domain)
Expand Down
8 changes: 4 additions & 4 deletions config_src/mct_driver/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,19 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )

if (glb%sw_decomp) then
call get_param(param_file, mdl, "SW_c1", glb%c1, &
"Coeff. used to convert net shortwave rad. into \n"//&
"Coeff. used to convert net shortwave rad. into "//&
"visible, direct shortwave.", units="nondim", default=0.285)

call get_param(param_file, mdl, "SW_c2", glb%c2, &
"Coeff. used to convert net shortwave rad. into \n"//&
"Coeff. used to convert net shortwave rad. into "//&
"visible, diffuse shortwave.", units="nondim", default=0.285)

call get_param(param_file, mdl, "SW_c3", glb%c3, &
"Coeff. used to convert net shortwave rad. into \n"//&
"Coeff. used to convert net shortwave rad. into "//&
"near-IR, direct shortwave.", units="nondim", default=0.215)

call get_param(param_file, mdl, "SW_c4", glb%c4, &
"Coeff. used to convert net shortwave rad. into \n"//&
"Coeff. used to convert net shortwave rad. into "//&
"near-IR, diffuse shortwave.", units="nondim", default=0.215)
else
glb%c1 = 0.0; glb%c2 = 0.0; glb%c3 = 0.0; glb%c4 = 0.0
Expand Down
Loading

0 comments on commit 8da9eb9

Please sign in to comment.