Skip to content

Commit

Permalink
Merge branch 'Hallberg-NOAA-dev/gfdl' into dev/gfdl
Browse files Browse the repository at this point in the history
  • Loading branch information
adcroft committed Jul 5, 2017
2 parents 4416201 + 22a5d8f commit 65b1d23
Show file tree
Hide file tree
Showing 19 changed files with 261 additions and 261 deletions.
58 changes: 29 additions & 29 deletions src/SIS2_ice_thm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -192,42 +192,42 @@ subroutine SIS2_ice_thm_init(param_file, CS)

! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS2_ice_thm (updates)" ! This module's name.
character(len=40) :: mdl = "SIS2_ice_thm (updates)" ! This module's name.

if (.not.associated(CS)) allocate(CS)

call log_version(param_file, mod, version, &
call log_version(param_file, mdl, version, &
"This sub-module does updates of the sea-ice due to thermodynamic changes.")

call get_param(param_file, mod, "SNOW_CONDUCTIVITY", CS%Ks, &
call get_param(param_file, mdl, "SNOW_CONDUCTIVITY", CS%Ks, &
"The conductivity of heat in snow.", units="W m-1 K-1", &
default=0.31)
call get_param(param_file, mod, "ICE_CONDUCTIVITY", CS%Ki, &
call get_param(param_file, mdl, "ICE_CONDUCTIVITY", CS%Ki, &
"The conductivity of heat in ice.", units="W m-1 K-1", &
default=2.03)
call get_param(param_file, mod, "MIN_H_FOR_TEMP_CALC", CS%h_lo_lim, &
call get_param(param_file, mdl, "MIN_H_FOR_TEMP_CALC", CS%h_lo_lim, &
"The minimum ice thickness at which to do temperature \n"//&
"calculations.", units="m", default=0.0)

call get_param(param_file, mod, "DO_POND", CS%do_pond, &
call get_param(param_file, mdl, "DO_POND", CS%do_pond, &
"If true, calculate melt ponds and use them for\n"//&
"shortwave radiation calculation.", default=.false.)
call get_param(param_file, mod, "TDRAIN", CS%tdrain, &
call get_param(param_file, mdl, "TDRAIN", CS%tdrain, &
"Melt ponds drain to sea level when ice average temp.\n"//&
"exceeds TDRAIN (stand-in for mushy layer thermo)", default=-0.8)
call get_param(param_file, mod, "R_MIN_POND", CS%r_min_pond, &
call get_param(param_file, mdl, "R_MIN_POND", CS%r_min_pond, &
"Minimum retention rate of surface water sources in melt pond\n"//&
"(retention scales linearly with ice cover)", default=0.15)
call get_param(param_file, mod, "R_MAX_POND", CS%r_max_pond, &
call get_param(param_file, mdl, "R_MAX_POND", CS%r_max_pond, &
"Maximum retention rate of surface water sources in melt pond\n"//&
"(retention scales linearly with ice cover)", default=0.9)
call get_param(param_file, mod, "MIN_POND_FRAC", CS%min_pond_frac, &
call get_param(param_file, mdl, "MIN_POND_FRAC", CS%min_pond_frac, &
"Minimum melt pond cover (by ponds at sea level)\n"//&
"pond drains to this when ice is porous.", default=0.2)
call get_param(param_file, mod, "MAX_POND_FRAC", CS%max_pond_frac, &
call get_param(param_file, mdl, "MAX_POND_FRAC", CS%max_pond_frac, &
"Maximum melt pond cover - associated with pond volume\n"//&
"that suppresses ice top to waterline", default=0.5)
call get_param(param_file, mod, "ICE_TEMP_RANGE_ESTIMATE", CS%temp_range_est,&
call get_param(param_file, mdl, "ICE_TEMP_RANGE_ESTIMATE", CS%temp_range_est,&
"An estimate of the range of snow and ice temperatures \n"//&
"that is used to evaluate whether an explicit diffusive \n"//&
"form of the heat fluxes or an inversion based on the \n"//&
Expand Down Expand Up @@ -1786,74 +1786,74 @@ subroutine ice_thermo_init(param_file, ITV, init_EOS )

! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS2_ice_thm (thermo)" ! This module's name.
character(len=40) :: mdl = "SIS2_ice_thm (thermo)" ! This module's name.
logical :: specified_ice

if (.not.associated(ITV)) allocate(ITV)

call log_version(param_file, mod, version, &
call log_version(param_file, mdl, version, &
"This sub-module calculates ice thermodynamic quantities.")
call get_param(param_file, mod, "LATENT_HEAT_FUSION", ITV%LI, &
call get_param(param_file, mdl, "LATENT_HEAT_FUSION", ITV%LI, &
"The latent heat of fusion as used by SIS.", &
units="J kg-1", default=3.34e5)
call get_param(param_file, mod, "LATENT_HEAT_VAPOR", ITV%Lat_Vapor, &
call get_param(param_file, mdl, "LATENT_HEAT_VAPOR", ITV%Lat_Vapor, &
"The latent heat of vaporization of water at 0C as used by SIS.", &
units="J kg-1", default=2.500e6)
call get_param(param_file, mod, "RHO_OCEAN", ITV%Rho_water, &
call get_param(param_file, mdl, "RHO_OCEAN", ITV%Rho_water, &
"The nominal density of sea water as used by SIS.", &
units="kg m-3", default=1030.0)
call get_param(param_file, mod, "RHO_ICE", ITV%Rho_ice, &
call get_param(param_file, mdl, "RHO_ICE", ITV%Rho_ice, &
"The nominal density of sea ice as used by SIS.", &
units="kg m-3", default=905.0)
call get_param(param_file, mod, "RHO_SNOW", ITV%Rho_snow, &
call get_param(param_file, mdl, "RHO_SNOW", ITV%Rho_snow, &
"The nominal density of snow as used by SIS.", &
units="kg m-3", default=330.0)
call get_param(param_file, mod, "CP_ICE", ITV%Cp_ice, &
call get_param(param_file, mdl, "CP_ICE", ITV%Cp_ice, &
"The heat capacity of fresh ice, approximated as a \n"//&
"constant.", units="J kg-1 K-1", default=2100.0)
call get_param(param_file, mod, "CP_SEAWATER", ITV%Cp_Water, &
call get_param(param_file, mdl, "CP_SEAWATER", ITV%Cp_Water, &
"The heat capacity of sea water, approximated as a \n"//&
"constant.", units="J kg-1 K-1", default=4200.0)
call get_param(param_file, mod, "CP_BRINE", ITV%Cp_brine, &
call get_param(param_file, mdl, "CP_BRINE", ITV%Cp_brine, &
"The heat capacity of water in brine pockets within the \n"//&
"sea-ice, approximated as a constant. CP_BRINE and \n"//&
"CP_SEAWATER should be equal, but for computational \n"//&
"convenience CP_BRINE can be set equal to CP_ICE.", &
units="J kg-1 K-1", default=ITV%Cp_Water)
call get_param(param_file, mod, "DTFREEZE_DS", ITV%dTf_dS, &
call get_param(param_file, mdl, "DTFREEZE_DS", ITV%dTf_dS, &
"The derivative of the freezing temperature with salinity.", &
units="deg C PSU-1", default=-0.054)

call get_param(param_file, mod, "ENTHALPY_LIQUID_0", ITV%enth_liq_0, &
call get_param(param_file, mdl, "ENTHALPY_LIQUID_0", ITV%enth_liq_0, &
"The enthalpy of liquid fresh water at 0 C. The solutions \n"//&
"should be physically consistent when this is adjusted, \n"//&
"because only the relative value is of physical meaning, \n"//&
"but roundoff errors can change the solution.", units="J kg-1", &
default=0.0)
call get_param(param_file, mod, "ENTHALPY_UNITS", ITV%enth_unit, &
call get_param(param_file, mdl, "ENTHALPY_UNITS", ITV%enth_unit, &
"A constant that rescales enthalpy from J/kg to a \n"//&
"different scale in its internal representation. Changing \n"//&
"this by a power of 2 is useful for debugging, as answers \n"//&
"should not change. A negative values is taken as an inverse.", &
units="J kg-1", default=1.0)
if (ITV%enth_unit < 0.) ITV%enth_unit = -1.0 / ITV%enth_unit
ITV%I_enth_unit = 1.0 / ITV%enth_unit
call get_param(param_file, mod, "SUBLIMATION_BUG", ITV%sublimation_bug, &
call get_param(param_file, mdl, "SUBLIMATION_BUG", ITV%sublimation_bug, &
"If true use an older calculation that omits the latent \n"//&
"heat of fusion from the latent heat of sublimation. \n"//&
"This variable should be obsoleted as soon as possible.", &
default=.false.)

call get_param(param_file, mod, "SPECIFIED_ICE", specified_ice, &
call get_param(param_file, mdl, "SPECIFIED_ICE", specified_ice, &
"If true, the ice is specified and there is no dynamics.", &
default=.false.)
if (specified_ice) then
ITV%slab_ice = .true.
call log_param(param_file, mod, "USE_SLAB_ICE", ITV%slab_ice, &
call log_param(param_file, mdl, "USE_SLAB_ICE", ITV%slab_ice, &
"Use the very old slab-style ice. With SPECIFIED_ICE, \n"//&
"USE_SLAB_ICE is always true.")
else
call get_param(param_file, mod, "USE_SLAB_ICE", ITV%slab_ice, &
call get_param(param_file, mdl, "USE_SLAB_ICE", ITV%slab_ice, &
"If true, use the very old slab-style ice.", default=.false.)
endif

Expand Down
8 changes: 4 additions & 4 deletions src/SIS_continuity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ subroutine SIS_continuity_init(Time, G, param_file, diag, CS)
! for this module
! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS_continuity" ! This module's name.
character(len=40) :: mdl = "SIS_continuity" ! This module's name.
character(len=40) :: mesg ! Message for error messages.

if (associated(CS)) then
Expand All @@ -824,8 +824,8 @@ subroutine SIS_continuity_init(Time, G, param_file, diag, CS)
allocate(CS)

! Read all relevant parameters and write them to the model log.
call log_version(param_file, mod, version)
call get_param(param_file, mod, "SIS_CONTINUITY_SCHEME", mesg, &
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "SIS_CONTINUITY_SCHEME", mesg, &
desc="The horizontal transport scheme used in continuity:\n"//&
" UPWIND_2D - Non-directionally split upwind\n"//&
" PCM - Directionally split piecewise constant\n"//&
Expand Down Expand Up @@ -857,7 +857,7 @@ subroutine SIS_continuity_init(Time, G, param_file, diag, CS)
call obsolete_logical(param_file, "UPWIND_1ST_CONTINUITY", &
hint="Use SIS_CONTINUITY_SCHEME instead.")

call get_param(param_file, mod, "CONT_PPM_VOLUME_BASED_CFL", CS%vol_CFL, &
call get_param(param_file, mdl, "CONT_PPM_VOLUME_BASED_CFL", CS%vol_CFL, &
"If true, use the ratio of the open face lengths to the \n"//&
"tracer cell areas when estimating CFL numbers.", &
default=.false.)
Expand Down
10 changes: 5 additions & 5 deletions src/SIS_debugging.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ subroutine SIS_debugging_init(param_file)
type(param_file_type), intent(in) :: param_file
! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS_debugging" ! This module's name.
character(len=40) :: mdl = "SIS_debugging" ! This module's name.

call log_version(param_file, mod, version)
call get_param(param_file, mod, "DEBUG", debug, &
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "DEBUG", debug, &
"If true, write out verbose debugging data.", default=.false.)
call get_param(param_file, mod, "DEBUG_CHKSUMS", debug_chksums, &
call get_param(param_file, mdl, "DEBUG_CHKSUMS", debug_chksums, &
"If true, checksums are performed on arrays in the \n"//&
"various vec_chksum routines.", default=debug)
call get_param(param_file, mod, "DEBUG_REDUNDANT", debug_redundant, &
call get_param(param_file, mdl, "DEBUG_REDUNDANT", debug_redundant, &
"If true, debug redundant data points during calls to \n"//&
"the various vec_chksum routines.", default=debug)

Expand Down
14 changes: 7 additions & 7 deletions src/SIS_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ subroutine set_SIS_axes_info(G, IG, param_file, diag_cs, set_vertical, axes_set_
character(len=80) :: grid_config, units_temp, set_name
! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS_diag_mediator" ! This module's name.
character(len=40) :: mdl = "SIS_diag_mediator" ! This module's name.

set_vert = .true. ; if (present(set_vertical)) set_vert = set_vertical
set_name = "ice" ; if (present(axes_set_name)) set_name = trim(axes_set_name)

! Read all relevant parameters and write them to the model log.
call log_version(param_file, mod, version)
call get_param(param_file, mod, "GRID_CONFIG", grid_config, &
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "GRID_CONFIG", grid_config, &
"The method for defining the horizontal grid. Valid \n"//&
"entries include:\n"//&
"\t file - read the grid from GRID_FILE \n"//&
Expand All @@ -174,7 +174,7 @@ subroutine set_SIS_axes_info(G, IG, param_file, diag_cs, set_vertical, axes_set_
if (index(lowercase(trim(grid_config)),"cartesian") > 0) then
! This is a cartesian grid, and may have different axis units.
Cartesian_grid = .true.
call get_param(param_file, mod, "AXIS_UNITS", units_temp, &
call get_param(param_file, mdl, "AXIS_UNITS", units_temp, &
"The units for the x- and y- axis labels. AXIS_UNITS \n"//&
"should be defined as 'k' for km, 'm' for m, or 'd' \n"//&
"for degrees of latitude and longitude (the default). \n"//&
Expand All @@ -185,7 +185,7 @@ subroutine set_SIS_axes_info(G, IG, param_file, diag_cs, set_vertical, axes_set_
elseif (units_temp(1:1) == 'm') then
G%x_axis_units = "meters" ; G%y_axis_units = "meters"
endif
call log_param(param_file, mod, "explicit AXIS_UNITS", G%x_axis_units)
call log_param(param_file, mdl, "explicit AXIS_UNITS", G%x_axis_units)
else
Cartesian_grid = .false.
endif
Expand Down Expand Up @@ -785,7 +785,7 @@ subroutine SIS_diag_mediator_init(G, IG, param_file, diag_cs, component, err_msg
character(len=8) :: this_pe
character(len=240) :: doc_file, doc_file_dflt, doc_path
character(len=40) :: doc_file_param
character(len=40) :: mod = "SIS_diag_mediator" ! This module's name.
character(len=40) :: mdl = "SIS_diag_mediator" ! This module's name.

call diag_manager_init(err_msg=err_msg)

Expand All @@ -807,7 +807,7 @@ subroutine SIS_diag_mediator_init(G, IG, param_file, diag_cs, component, err_msg
doc_file_dflt = "available_diags."//this_pe
doc_file_param = "AVAILABLE_DIAGS_FILE"
endif
call get_param(param_file, mod, trim(doc_file_param), doc_file, &
call get_param(param_file, mdl, trim(doc_file_param), doc_file, &
"A file into which to write a list of all available \n"//&
"sea ice diagnostics that can be included in a diag_table.", &
default=doc_file_dflt)
Expand Down
34 changes: 17 additions & 17 deletions src/SIS_dyn_bgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ subroutine SIS_B_dyn_init(Time, G, param_file, diag, CS)

! This include declares and sets the variable "version".
#include "version_variable.h"
character(len=40) :: mod = "SIS_dyn_bgrid" ! This module's name.
character(len=40) :: mdl = "SIS_dyn_bgrid" ! This module's name.
logical :: debug
real, parameter :: missing = -1e34

Expand All @@ -116,64 +116,64 @@ subroutine SIS_B_dyn_init(Time, G, param_file, diag, CS)
CS%Time => Time

! Read all relevant parameters and write them to the model log.
call log_version(param_file, mod, version)
call get_param(param_file, mod, "SPECIFIED_ICE", CS%specified_ice, &
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "SPECIFIED_ICE", CS%specified_ice, &
"If true, the ice is specified and there is no dynamics.", &
default=.false.)
if ( CS%specified_ice ) then
CS%evp_sub_steps = 0 ; CS%dt_Rheo = -1.0
call log_param(param_file, mod, "NSTEPS_DYN", CS%evp_sub_steps, &
call log_param(param_file, mdl, "NSTEPS_DYN", CS%evp_sub_steps, &
"The number of iterations in the EVP dynamics for each \n"//&
"slow time step. With SPECIFIED_ICE this is always 0.")
else
call get_param(param_file, mod, "DT_RHEOLOGY", CS%dt_Rheo, &
call get_param(param_file, mdl, "DT_RHEOLOGY", CS%dt_Rheo, &
"The sub-cycling time step for iterating the rheology \n"//&
"and ice momentum equations. If DT_RHEOLOGY is negative, \n"//&
"the time step is set via NSTEPS_DYN.", units="seconds", &
default=-1.0)
CS%evp_sub_steps = -1
if (CS%dt_Rheo <= 0.0) &
call get_param(param_file, mod, "NSTEPS_DYN", CS%evp_sub_steps, &
call get_param(param_file, mdl, "NSTEPS_DYN", CS%evp_sub_steps, &
"The number of iterations of the rheology and ice \n"//&
"momentum equations for each slow ice time step.", default=432)
endif

call get_param(param_file, mod, "ICE_STRENGTH_PSTAR", CS%p0, &
call get_param(param_file, mdl, "ICE_STRENGTH_PSTAR", CS%p0, &
"A constant in the expression for the ice strength, \n"//&
"P* in Hunke & Dukowicz 1997.", units="Pa", default=2.75e4)
call get_param(param_file, mod, "ICE_STRENGTH_CSTAR", CS%c0, &
call get_param(param_file, mdl, "ICE_STRENGTH_CSTAR", CS%c0, &
"A constant in the exponent of the expression for the \n"//&
"ice strength, c* in Hunke & Dukowicz 1997.", &
units="nondim", default=20.)
call get_param(param_file, mod, "ICE_CDRAG_WATER", CS%cdw, &
call get_param(param_file, mdl, "ICE_CDRAG_WATER", CS%cdw, &
"The drag coefficient between the sea ice and water.", &
units="nondim", default=3.24e-3)

call get_param(param_file, mod, "RHO_OCEAN", CS%Rho_ocean, &
call get_param(param_file, mdl, "RHO_OCEAN", CS%Rho_ocean, &
"The nominal density of sea water as used by SIS.", &
units="kg m-3", default=1030.0)
call get_param(param_file, mod, "RHO_ICE", CS%Rho_ice, &
call get_param(param_file, mdl, "RHO_ICE", CS%Rho_ice, &
"The nominal density of sea ice as used by SIS.", &
units="kg m-3", default=905.0)
CS%p0_rho = CS%p0 / CS%Rho_ice

call get_param(param_file, mod, "DEBUG", debug, &
call get_param(param_file, mdl, "DEBUG", debug, &
"If true, write out verbose debugging data.", default=.false.)
call get_param(param_file, mod, "DEBUG_SLOW_ICE", CS%debug, &
call get_param(param_file, mdl, "DEBUG_SLOW_ICE", CS%debug, &
"If true, write out verbose debugging data on the slow ice PEs.", &
default=debug)
call get_param(param_file, mod, "DEBUG_REDUNDANT", CS%debug_redundant, &
call get_param(param_file, mdl, "DEBUG_REDUNDANT", CS%debug_redundant, &
"If true, debug redundant data points.", default=CS%debug)
if ( CS%specified_ice ) then
CS%slab_ice = .true.
call log_param(param_file, mod, "USE_SLAB_ICE", CS%slab_ice, &
call log_param(param_file, mdl, "USE_SLAB_ICE", CS%slab_ice, &
"Use the very old slab-style ice. With SPECIFIED_ICE, \n"//&
"USE_SLAB_ICE is always true.")
else
call get_param(param_file, mod, "USE_SLAB_ICE", CS%slab_ice, &
call get_param(param_file, mdl, "USE_SLAB_ICE", CS%slab_ice, &
"If true, use the very old slab-style ice.", default=.false.)
endif
call get_param(param_file, mod, "AIR_WATER_STRESS_TURN_ANGLE", CS%blturn, &
call get_param(param_file, mdl, "AIR_WATER_STRESS_TURN_ANGLE", CS%blturn, &
"An angle by which to rotate the velocities at the air- \n"//&
"water boundary in calculating stresses.", units="degrees", &
default=0.0)
Expand Down
Loading

0 comments on commit 65b1d23

Please sign in to comment.