Skip to content

Commit

Permalink
Merge pull request #19 from NOAA-GFDL/dev/gfdl
Browse files Browse the repository at this point in the history
Merge in latest dev/gfdl updates
  • Loading branch information
wrongkindofdoctor authored May 24, 2019
2 parents f6879f4 + 41cfb68 commit b4fd53b
Show file tree
Hide file tree
Showing 121 changed files with 2,203 additions and 3,813 deletions.
96 changes: 48 additions & 48 deletions config_src/coupled_driver/MOM_surface_forcing.F90

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -278,41 +278,41 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn)
call log_version(param_file, mdl, version, "")

call get_param(param_file, mdl, "SINGLE_STEPPING_CALL", OS%single_step_call, &
"If true, advance the state of MOM with a single step \n"//&
"including both dynamics and thermodynamics. If false, \n"//&
"If true, advance the state of MOM with a single step "//&
"including both dynamics and thermodynamics. If false, "//&
"the two phases are advanced with separate calls.", default=.true.)
call get_param(param_file, mdl, "DT", OS%dt, &
"The (baroclinic) dynamics time step. The time-step that \n"//&
"is actually used will be an integer fraction of the \n"//&
"The (baroclinic) dynamics time step. The time-step that "//&
"is actually used will be an integer fraction of the "//&
"forcing time-step.", units="s", fail_if_missing=.true.)
call get_param(param_file, mdl, "DT_THERM", OS%dt_therm, &
"The thermodynamic and tracer advection time step. \n"//&
"Ideally DT_THERM should be an integer multiple of DT \n"//&
"and less than the forcing or coupling time-step, unless \n"//&
"THERMO_SPANS_COUPLING is true, in which case DT_THERM \n"//&
"can be an integer multiple of the coupling timestep. By \n"//&
"The thermodynamic and tracer advection time step. "//&
"Ideally DT_THERM should be an integer multiple of DT "//&
"and less than the forcing or coupling time-step, unless "//&
"THERMO_SPANS_COUPLING is true, in which case DT_THERM "//&
"can be an integer multiple of the coupling timestep. By "//&
"default DT_THERM is set to DT.", units="s", default=OS%dt)
call get_param(param_file, "MOM", "THERMO_SPANS_COUPLING", OS%thermo_spans_coupling, &
"If true, the MOM will take thermodynamic and tracer \n"//&
"timesteps that can be longer than the coupling timestep. \n"//&
"The actual thermodynamic timestep that is used in this \n"//&
"case is the largest integer multiple of the coupling \n"//&
"If true, the MOM will take thermodynamic and tracer "//&
"timesteps that can be longer than the coupling timestep. "//&
"The actual thermodynamic timestep that is used in this "//&
"case is the largest integer multiple of the coupling "//&
"timestep that is less than or equal to DT_THERM.", default=.false.)
call get_param(param_file, mdl, "DIABATIC_FIRST", OS%diabatic_first, &
"If true, apply diabatic and thermodynamic processes, \n"//&
"including buoyancy forcing and mass gain or loss, \n"//&
"If true, apply diabatic and thermodynamic processes, "//&
"including buoyancy forcing and mass gain or loss, "//&
"before stepping the dynamics forward.", default=.false.)

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
elseif (uppercase(stagger(1:1)) == 'B') then ; Ocean_sfc%stagger = BGRID_NE
Expand All @@ -321,9 +321,9 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn)
trim(stagger)//" is invalid.") ; endif

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 @@ -341,9 +341,9 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn)
! Consider using a run-time flag to determine whether to do the diagnostic
! 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
92 changes: 46 additions & 46 deletions config_src/ice_solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -976,41 +976,41 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
! Read all relevant parameters and write them to the model log.
call log_version(param_file, mdl, version, "")
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, "INPUTDIR", CS%inputdir, &
"The directory in which all input files are found.", &
default=".")
CS%inputdir = slasher(CS%inputdir)

call get_param(param_file, mdl, "ADIABATIC", CS%adiabatic, &
"There are no diapycnal mass fluxes if ADIABATIC is \n"//&
"true. This assumes that KD = KDML = 0.0 and that \n"//&
"there is no buoyancy forcing, but makes the model \n"//&
"There are no diapycnal mass fluxes if ADIABATIC is "//&
"true. This assumes that KD = KDML = 0.0 and that "//&
"there is no buoyancy forcing, but makes the model "//&
"faster by eliminating subroutine calls.", default=.false.)
call get_param(param_file, mdl, "VARIABLE_WINDS", CS%variable_winds, &
"If true, the winds vary in time after the initialization.", &
default=.true.)
call get_param(param_file, mdl, "VARIABLE_BUOYFORCE", CS%variable_buoyforce, &
"If true, the buoyancy forcing varies in time after the \n"//&
"If true, the buoyancy forcing varies in time after the "//&
"initialization of the model.", default=.true.)

call get_param(param_file, mdl, "BUOY_CONFIG", CS%buoy_config, &
"The character string that indicates how buoyancy forcing \n"//&
"is specified. Valid options include (file), (zero), \n"//&
"The character string that indicates how buoyancy forcing "//&
"is specified. Valid options include (file), (zero), "//&
"(linear), (USER), and (NONE).", fail_if_missing=.true.)
if (trim(CS%buoy_config) == "file") then
call get_param(param_file, mdl, "LONGWAVEDOWN_FILE", CS%longwavedown_file, &
"The file with the downward longwave heat flux, in \n"//&
"The file with the downward longwave heat flux, in "//&
"variable lwdn_sfc.", fail_if_missing=.true.)
call get_param(param_file, mdl, "LONGWAVEUP_FILE", CS%longwaveup_file, &
"The file with the upward longwave heat flux, in \n"//&
"The file with the upward longwave heat flux, in "//&
"variable lwup_sfc.", fail_if_missing=.true.)
call get_param(param_file, mdl, "EVAPORATION_FILE", CS%evaporation_file, &
"The file with the evaporative moisture flux, in \n"//&
"The file with the evaporative moisture flux, in "//&
"variable evap.", fail_if_missing=.true.)
call get_param(param_file, mdl, "SENSIBLEHEAT_FILE", CS%sensibleheat_file, &
"The file with the sensible heat flux, in \n"//&
"The file with the sensible heat flux, in "//&
"variable shflx.", fail_if_missing=.true.)
call get_param(param_file, mdl, "SHORTWAVEUP_FILE", CS%shortwaveup_file, &
"The file with the upward shortwave heat flux.", &
Expand All @@ -1019,28 +1019,28 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
"The file with the downward shortwave heat flux.", &
fail_if_missing=.true.)
call get_param(param_file, mdl, "SNOW_FILE", CS%snow_file, &
"The file with the downward frozen precip flux, in \n"//&
"The file with the downward frozen precip flux, in "//&
"variable snow.", fail_if_missing=.true.)
call get_param(param_file, mdl, "PRECIP_FILE", CS%precip_file, &
"The file with the downward total precip flux, in \n"//&
"The file with the downward total precip flux, in "//&
"variable precip.", fail_if_missing=.true.)
call get_param(param_file, mdl, "FRESHDISCHARGE_FILE", CS%freshdischarge_file, &
"The file with the fresh and frozen runoff/calving fluxes, \n"//&
"The file with the fresh and frozen runoff/calving fluxes, "//&
"invariables disch_w and disch_s.", fail_if_missing=.true.)
call get_param(param_file, mdl, "SSTRESTORE_FILE", CS%SSTrestore_file, &
"The file with the SST toward which to restore in \n"//&
"The file with the SST toward which to restore in "//&
"variable TEMP.", fail_if_missing=.true.)
call get_param(param_file, mdl, "SALINITYRESTORE_FILE", CS%salinityrestore_file, &
"The file with the surface salinity toward which to \n"//&
"The file with the surface salinity toward which to "//&
"restore in variable SALT.", fail_if_missing=.true.)
endif
call get_param(param_file, mdl, "WIND_CONFIG", CS%wind_config, &
"The character string that indicates how wind forcing \n"//&
"is specified. Valid options include (file), (2gyre), \n"//&
"The character string that indicates how wind forcing "//&
"is specified. Valid options include (file), (2gyre), "//&
"(1gyre), (gyres), (zero), and (USER).", fail_if_missing=.true.)
if (trim(CS%wind_config) == "file") then
call get_param(param_file, mdl, "WIND_FILE", CS%wind_file, &
"The file in which the wind stresses are found in \n"//&
"The file in which the wind stresses are found in "//&
"variables STRESS_X and STRESS_Y.", fail_if_missing=.true.)
call get_param(param_file, mdl, "WINDSTRESS_X_VAR",CS%stress_x_var, &
"The name of the x-wind stress variable in WIND_FILE.", &
Expand All @@ -1049,7 +1049,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
"The name of the y-wind stress variable in WIND_FILE.", &
default="STRESS_Y")
call get_param(param_file, mdl, "WINDSTRESS_STAGGER",CS%wind_stagger, &
"A character indicating how the wind stress components \n"//&
"A character indicating how the wind stress components "//&
"are staggered in WIND_FILE. This may be A or C for now.", &
default="A")
call get_param(param_file, mdl, "WINDSTRESS_SCALE", CS%wind_scale, &
Expand All @@ -1058,66 +1058,66 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
endif
if (trim(CS%wind_config) == "gyres") then
call get_param(param_file, mdl, "TAUX_CONST", CS%gyres_taux_const, &
"With the gyres wind_config, the constant offset in the \n"//&
"zonal wind stress profile: \n"//&
"With the gyres wind_config, the constant offset in the "//&
"zonal wind stress profile: "//&
" A in taux = A + B*sin(n*pi*y/L) + C*cos(n*pi*y/L).", &
units="Pa", default=0.0)
call get_param(param_file, mdl, "TAUX_SIN_AMP",CS%gyres_taux_sin_amp, &
"With the gyres wind_config, the sine amplitude in the \n"//&
"zonal wind stress profile: \n"//&
"With the gyres wind_config, the sine amplitude in the "//&
"zonal wind stress profile: "//&
" B in taux = A + B*sin(n*pi*y/L) + C*cos(n*pi*y/L).", &
units="Pa", default=0.0)
call get_param(param_file, mdl, "TAUX_COS_AMP",CS%gyres_taux_cos_amp, &
"With the gyres wind_config, the cosine amplitude in \n"//&
"the zonal wind stress profile: \n"//&
"With the gyres wind_config, the cosine amplitude in "//&
"the zonal wind stress profile: "//&
" C in taux = A + B*sin(n*pi*y/L) + C*cos(n*pi*y/L).", &
units="Pa", default=0.0)
call get_param(param_file, mdl, "TAUX_N_PIS",CS%gyres_taux_n_pis, &
"With the gyres wind_config, the number of gyres in \n"//&
"the zonal wind stress profile: \n"//&
"With the gyres wind_config, the number of gyres in "//&
"the zonal wind stress profile: "//&
" n in taux = A + B*sin(n*pi*y/L) + C*cos(n*pi*y/L).", &
units="nondim", default=0.0)
endif
call get_param(param_file, mdl, "SOUTHLAT", CS%south_lat, &
"The southern latitude of the domain or the equivalent \n"//&
"The southern latitude of the domain or the equivalent "//&
"starting value for the y-axis.", units=axis_units, default=0.)
call get_param(param_file, mdl, "LENLAT", CS%len_lat, &
"The latitudinal or y-direction length of the domain.", &
units=axis_units, fail_if_missing=.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, "RESTOREBUOY", CS%restorebuoy, &
"If true, the buoyancy fluxes drive the model back \n"//&
"toward some specified surface state with a rate \n"//&
"If true, the buoyancy fluxes drive the model back "//&
"toward some specified surface state with a rate "//&
"given by FLUXCONST.", default= .false.)
if (CS%restorebuoy) 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.)
! Convert CS%Flux_const from m day-1 to m s-1.
CS%Flux_const = CS%Flux_const / 86400.0
if (trim(CS%buoy_config) == "linear") then
call get_param(param_file, mdl, "SST_NORTH", CS%T_north, &
"With buoy_config linear, the sea surface temperature \n"//&
"at the northern end of the domain toward which to \n"//&
"With buoy_config linear, the sea surface temperature "//&
"at the northern end of the domain toward which to "//&
"to restore.", units="deg C", default=0.0)
call get_param(param_file, mdl, "SST_SOUTH", CS%T_south, &
"With buoy_config linear, the sea surface temperature \n"//&
"at the southern end of the domain toward which to \n"//&
"With buoy_config linear, the sea surface temperature "//&
"at the southern end of the domain toward which to "//&
"to restore.", units="deg C", default=0.0)
call get_param(param_file, mdl, "SSS_NORTH", CS%S_north, &
"With buoy_config linear, the sea surface salinity \n"//&
"at the northern end of the domain toward which to \n"//&
"With buoy_config linear, the sea surface salinity "//&
"at the northern end of the domain toward which to "//&
"to restore.", units="PSU", default=35.0)
call get_param(param_file, mdl, "SSS_SOUTH", CS%S_south, &
"With buoy_config linear, the sea surface salinity \n"//&
"at the southern end of the domain toward which to \n"//&
"With buoy_config linear, the sea surface salinity "//&
"at the southern end of the domain toward which to "//&
"to restore.", units="PSU", default=35.0)
endif
endif
Expand All @@ -1129,11 +1129,11 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
"The background gustiness in the winds.", units="Pa", &
default=0.02)
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.)
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.", fail_if_missing=.true.)
call safe_alloc_ptr(CS%gust,G%isd,G%ied,G%jsd,G%jed) ; CS%gust(:,:) = 0.0
filename = trim(CS%inputdir) // trim(gust_file)
Expand Down
Loading

0 comments on commit b4fd53b

Please sign in to comment.