Skip to content

Commit

Permalink
Merge branch 'dev/master' of github.com:CommerceGov/NOAA-GFDL-MOM6 in…
Browse files Browse the repository at this point in the history
…to dev/master
  • Loading branch information
MJHarrison-GFDL committed Oct 2, 2014
2 parents d2ce721 + 22cb941 commit 7194bb0
Show file tree
Hide file tree
Showing 144 changed files with 3,620 additions and 2,995 deletions.
34 changes: 32 additions & 2 deletions config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ module ocean_model_mod
use MOM_time_manager, only : operator(/=)
use MOM_tracer_flow_control, only : call_tracer_register, tracer_flow_control_init
use MOM_variables, only : surface

use MOM_ice_shelf, only : initialize_ice_shelf, shelf_calc_flux, ice_shelf_CS
use MOM_ice_shelf, only : ice_shelf_end, ice_shelf_save_restart
use coupler_types_mod, only : coupler_2d_bc_type
use mpp_domains_mod, only : domain2d, mpp_get_layout, mpp_get_global_domain
use mpp_domains_mod, only : mpp_define_domains, mpp_get_compute_domain, mpp_get_data_domain
Expand Down Expand Up @@ -151,7 +152,8 @@ module ocean_model_mod
type(time_type) :: write_energy_time ! The next time to write to the energy file.

integer :: nstep = 0 ! The number of calls to update_ocean.

logical :: use_ice_shelf = .false. ! If true, the ice shelf model is enabled.
type(ice_shelf_CS), pointer :: Ice_shelf_CSp => NULL()
logical :: restore_salinity ! If true, the coupled MOM driver adds a term to
! restore salinity to a specified value.
real :: press_to_z ! A conversion factor between pressure and ocean
Expand Down Expand Up @@ -263,10 +265,19 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in)
call get_param(param_file, mod, "G_EARTH", G_Earth, &
"The gravitational acceleration of the Earth.", &
units="m s-2", default = 9.80)

call get_param(param_file,mod,"ICE_SHELF",OS%use_ice_shelf)


OS%press_to_z = 1.0/(Rho0*G_Earth)

call surface_forcing_init(Time_in, OS%grid, param_file, OS%MOM_CSp%diag, &
OS%forcing_CSp, OS%restore_salinity)

if (OS%use_ice_shelf) then
call initialize_ice_shelf(OS%Time, OS%ice_shelf_CSp,OS%MOM_CSp%diag, OS%fluxes)
endif

call MOM_sum_output_init(OS%grid, param_file, OS%dirs%output_directory, &
OS%MOM_CSp%ntrunc, Time_init, OS%sum_output_CSp)

Expand Down Expand Up @@ -362,6 +373,14 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
call enable_averaging(time_step, OS%Time + Ocean_coupling_time_step, OS%MOM_CSp%diag) ! Needed to allow diagnostics in convert_IOB
call convert_IOB_to_fluxes(Ice_ocean_boundary, OS%fluxes, index_bnds, OS%Time, &
OS%grid, OS%forcing_CSp, OS%state, OS%restore_salinity)

! Add ice shelf fluxes

if (OS%use_ice_shelf) then
call shelf_calc_flux(OS%State, OS%fluxes, OS%Time, time_step, OS%Ice_shelf_CSp)
endif


call disable_averaging(OS%MOM_CSp%diag)
Master_time = OS%Time ; Time1 = OS%Time

Expand Down Expand Up @@ -412,12 +431,18 @@ subroutine ocean_model_restart(OS, timestamp)
OS%MOM_CSp%restart_CSp, .true.)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir, .true.)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir, .true.)
endif
endif
if (BTEST(OS%Restart_control,0)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%MOM_CSp%restart_CSp)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir)
endif
endif

end subroutine ocean_model_restart
Expand Down Expand Up @@ -445,6 +470,7 @@ subroutine ocean_model_end(Ocean_sfc, Ocean_state, Time)

call ocean_model_save_restart(Ocean_state, Time)
call MOM_end(Ocean_state%MOM_CSp)
if (Ocean_state%use_ice_shelf) call ice_shelf_end(Ocean_state%Ice_shelf_CSp)
end subroutine ocean_model_end
! </SUBROUTINE> NAME="ocean_model_end"

Expand Down Expand Up @@ -472,6 +498,10 @@ subroutine ocean_model_save_restart(OS, Time, directory, filename_suffix)

call forcing_save_restart(OS%forcing_CSp, OS%grid, Time, restart_dir)

if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir)
endif

end subroutine ocean_model_save_restart

!#######################################################################
Expand Down
62 changes: 10 additions & 52 deletions examples/coupled_AM2_LM3_SIS/AM2_MOM6i_1deg/MOM_parameter_doc.all
Original file line number Diff line number Diff line change
Expand Up @@ -504,58 +504,9 @@ APPLY_OBC_V = False ! [Boolean] default = False
! v-points, with the configuration controlled by OBC_CONFIG

! === module MOM_MEKE ===
MEKE_DAMPING = 0.0 ! [s-1] default = 0.0
! The local depth-indepented MEKE dissipation rate.
MEKE_CD_SCALE = 0.0 ! [nondim] default = 0.0
! A scaling for the bottom drag applied to MEKE. This
! should be less than 1 to account for the surface
! intensification of MEKE and the fraction of MEKE that
! may be temporarily stored as potential energy.
MEKE_GMCOEFF = -1.0 ! [nondim] default = -1.0
! The efficiency of the conversion of potential energy
! into MEKE by the thickness mixing parameterization.
! If MEKE_GMCOEFF is negative, this conversion is not
! used or calculated.
MEKE_FRCOEFF = -1.0 ! [nondim] default = -1.0
! The efficiency of the conversion of mean energy into
! MEKE. If MEKE_FRCOEFF is negative, this conversion
! is not used or calculated.
MEKE_BGSRC = 0.0 ! [W kg-1] default = 0.0
! A background energy source for MEKE.
MEKE_KH = -1.0 ! [m2 s-1] default = -1.0
! A background lateral diffusivity of MEKE, or a
! Use a negative value to not apply lateral diffusion to MEKE.
MEKE_DTSCALE = 1.0 ! [nondim] default = 1.0
! A scaling factor to accelerate the time evolution of MEKE.
MEKE_KHCOEFF = -1.0 ! [nondim] default = -1.0
! A scaling factor which is combined with the square root
! of MEKE times the grid-cell area to give MEKE%Kh, or a
! negative value not to calculate MEKE%Kh.
! This factor must be >0 for MEKE to contribute to the
! thickness/tracer mixing in the rest of the model.
MEKE_USCALE = 1.0 ! [m s-1] default = 1.0
! The background velocity that is combined with MEKE to
! calculate the bottom drag.
CDRAG = 0.003 ! [nondim] default = 0.003
! CDRAG is the drag coefficient relating the magnitude of
! the velocity field to the bottom stress.
MEKE_VISC_DRAG = False ! [Boolean] default = False
! If true, use the vertvisc_type to calculate the bottom
! drag acting on MEKE.
MEKE_KHTH_FAC = 1.0 ! [nondim] default = 1.0
! A factor that maps MEKE%Kh to KhTh.
MEKE_KHTR_FAC = 1.0 ! [nondim] default = 1.0
! A factor that maps MEKE%Kh to KhTr.
MEKE_KHMEKE_FAC = 0.0 ! [nondim] default = 0.0
! A factor that maps MEKE%Kh to Kh for MEKE itself.
MEKE_RD_MAX_SCALE = True ! [nondim] default = True
! If true, the maximum length scale used by MEKE is
! the deformation radius.
MEKE_VISCOSITY_COEFF = 0.0 ! [nondim] default = 0.0
! If non-zero, is the scaling coefficient in the expression for
! viscosity used to parameterize lateral momentum mixing by
! unresolved eddies represented by MEKE. Can be negative to
! represent backscatter from the unresolved eddies.
USE_MEKE = False ! [Boolean] default = False
! If true, turns on the MEKE scheme which calculates
! a sub-grid mesoscale eddy kinetic energy budget.

! === module MOM_lateral_mixing_coeffs ===
USE_VARIABLE_MIXING = True ! [Boolean] default = False
Expand Down Expand Up @@ -877,6 +828,10 @@ ML_USE_OMEGA = True ! [Boolean] default = False
! If true, use the absolute rotation rate instead of the
! vertical component of rotation when setting the decay
! scale for turbulence.
CDRAG = 0.003 ! [nondim] default = 0.003
! CDRAG is the drag coefficient relating the magnitude of
! the velocity field to the bottom stress. CDRAG is only
! used if BOTTOMDRAGLAW is defined.
DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0
! DRAG_BG_VEL is either the assumed bottom velocity (with
! LINEAR_DRAG) or an unresolved velocity that is
Expand Down Expand Up @@ -1363,6 +1318,9 @@ KPP_ZERO_DIFFUSIVITY = False ! [Boolean] default = False
KPP_IS_ADDITIVE = False ! [Boolean] default = False
! If true, adds KPP diffusivity to the existing diffusivity. If false, replaces exisiting diffusivity with KPP diffusivity wherever the latter is non-zero.
%KPP
SALT_REJECT_BELOW_ML = False ! [Boolean] default = False
! If true, place salt from brine rejection below the mixed layer,
! into the first non-vanished layer for which the column remains stable

! === module MOM_diffConvection ===
! This module implements enhanced diffusivity as a
Expand Down
30 changes: 15 additions & 15 deletions examples/coupled_AM2_LM3_SIS/AM2_MOM6i_1deg/diag_table
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ CM2.2
#==================
"ocean_model","T_adx", "T_adx", "ocean_month","all",.true.,"none",2
"ocean_model","T_ady", "T_ady", "ocean_month","all",.true.,"none",2
"ocean_model","T_diffx","T_diffx","ocean_month","all",.true.,"none",2
"ocean_model","T_diffy","T_diffy","ocean_month","all",.true.,"none",2
"ocean_model","T_diffx_2d","T_diffx_2d","ocean_month","all",.true.,"none",2
"ocean_model","T_diffy_2d","T_diffy_2d","ocean_month","all",.true.,"none",2
"ocean_model","S_adx", "S_adx", "ocean_month","all",.true.,"none",2
"ocean_model","S_ady", "S_ady", "ocean_month","all",.true.,"none",2
"ocean_model","S_diffx","S_diffx","ocean_month","all",.true.,"none",2
"ocean_model","S_diffy","S_diffy","ocean_month","all",.true.,"none",2
"ocean_model","S_diffx_2d","S_diffx_2d","ocean_month","all",.true.,"none",2
"ocean_model","S_diffy_2d","S_diffy_2d","ocean_month","all",.true.,"none",2


# Momentum Balance Terms:
Expand Down Expand Up @@ -172,9 +172,9 @@ CM2.2

# MEKE:
#======
"ocean_model","MEKE","MEKE","ocean_month","all",.true.,"none",2
"ocean_model","MEKE_src","MEKE_src","ocean_month","all",.true.,"none",2
"ocean_model","MEKE_Kh","MEKE_Kh","ocean_month","all",.true.,"none",2
#"ocean_model","MEKE","MEKE","ocean_month","all",.true.,"none",2
#"ocean_model","MEKE_src","MEKE_src","ocean_month","all",.true.,"none",2
#"ocean_model","MEKE_Kh","MEKE_Kh","ocean_month","all",.true.,"none",2

#
# Kinetic Energy Balance Terms:
Expand Down Expand Up @@ -448,14 +448,14 @@ CM2.2
#
## aerosols
## for the aerosol fields, set do_cmip_diagnostics=.true. in shortwave_driver_nml
"radiation","olr_800_1200", "olr_800_1200", "atmos_month_aer", "all", .true.,"none", 2
"radiation","olr_900_990", "olr_900_990", "atmos_month_aer", "all", .true.,"none", 2
"radiation","sfc_800_1200", "sfc_800_1200", "atmos_month_aer", "all", .true.,"none", 2
"radiation","sfc_900_990", "sfc_900_990", "atmos_month_aer", "all", .true.,"none", 2
"radiation","olr_800_1200_cf", "olr_800_1200_cf", "atmos_month_aer", "all", .true.,"none", 2
"radiation","olr_900_990_cf", "olr_900_990_cf", "atmos_month_aer", "all", .true.,"none", 2
"radiation","sfc_800_1200_cf", "sfc_800_1200_cf", "atmos_month_aer", "all", .true.,"none", 2
"radiation","sfc_900_990_cf", "sfc_900_990_cf", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","olr_800_1200", "olr_800_1200", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","olr_900_990", "olr_900_990", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","sfc_800_1200", "sfc_800_1200", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","sfc_900_990", "sfc_900_990", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","olr_800_1200_cf", "olr_800_1200_cf", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","olr_900_990_cf", "olr_900_990_cf", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","sfc_800_1200_cf", "sfc_800_1200_cf", "atmos_month_aer", "all", .true.,"none", 2
#"radiation","sfc_900_990_cf", "sfc_900_990_cf", "atmos_month_aer", "all", .true.,"none", 2
"radiation","swup_toa_vis", "swup_toa_vis", "atmos_month_aer", "all", .true.,"none", 2
"radiation","swup_toa_1p6", "swup_toa_1p6", "atmos_month_aer", "all", .true.,"none", 2
"radiation","swnt_sfc_vis", "swnt_sfc_vis", "atmos_month_aer", "all", .true.,"none", 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,58 +504,9 @@ APPLY_OBC_V = False ! [Boolean] default = False
! v-points, with the configuration controlled by OBC_CONFIG

! === module MOM_MEKE ===
MEKE_DAMPING = 0.0 ! [s-1] default = 0.0
! The local depth-indepented MEKE dissipation rate.
MEKE_CD_SCALE = 0.0 ! [nondim] default = 0.0
! A scaling for the bottom drag applied to MEKE. This
! should be less than 1 to account for the surface
! intensification of MEKE and the fraction of MEKE that
! may be temporarily stored as potential energy.
MEKE_GMCOEFF = -1.0 ! [nondim] default = -1.0
! The efficiency of the conversion of potential energy
! into MEKE by the thickness mixing parameterization.
! If MEKE_GMCOEFF is negative, this conversion is not
! used or calculated.
MEKE_FRCOEFF = -1.0 ! [nondim] default = -1.0
! The efficiency of the conversion of mean energy into
! MEKE. If MEKE_FRCOEFF is negative, this conversion
! is not used or calculated.
MEKE_BGSRC = 0.0 ! [W kg-1] default = 0.0
! A background energy source for MEKE.
MEKE_KH = -1.0 ! [m2 s-1] default = -1.0
! A background lateral diffusivity of MEKE, or a
! Use a negative value to not apply lateral diffusion to MEKE.
MEKE_DTSCALE = 1.0 ! [nondim] default = 1.0
! A scaling factor to accelerate the time evolution of MEKE.
MEKE_KHCOEFF = -1.0 ! [nondim] default = -1.0
! A scaling factor which is combined with the square root
! of MEKE times the grid-cell area to give MEKE%Kh, or a
! negative value not to calculate MEKE%Kh.
! This factor must be >0 for MEKE to contribute to the
! thickness/tracer mixing in the rest of the model.
MEKE_USCALE = 1.0 ! [m s-1] default = 1.0
! The background velocity that is combined with MEKE to
! calculate the bottom drag.
CDRAG = 0.003 ! [nondim] default = 0.003
! CDRAG is the drag coefficient relating the magnitude of
! the velocity field to the bottom stress.
MEKE_VISC_DRAG = False ! [Boolean] default = False
! If true, use the vertvisc_type to calculate the bottom
! drag acting on MEKE.
MEKE_KHTH_FAC = 1.0 ! [nondim] default = 1.0
! A factor that maps MEKE%Kh to KhTh.
MEKE_KHTR_FAC = 1.0 ! [nondim] default = 1.0
! A factor that maps MEKE%Kh to KhTr.
MEKE_KHMEKE_FAC = 0.0 ! [nondim] default = 0.0
! A factor that maps MEKE%Kh to Kh for MEKE itself.
MEKE_RD_MAX_SCALE = True ! [nondim] default = True
! If true, the maximum length scale used by MEKE is
! the deformation radius.
MEKE_VISCOSITY_COEFF = 0.0 ! [nondim] default = 0.0
! If non-zero, is the scaling coefficient in the expression for
! viscosity used to parameterize lateral momentum mixing by
! unresolved eddies represented by MEKE. Can be negative to
! represent backscatter from the unresolved eddies.
USE_MEKE = False ! [Boolean] default = False
! If true, turns on the MEKE scheme which calculates
! a sub-grid mesoscale eddy kinetic energy budget.

! === module MOM_lateral_mixing_coeffs ===
USE_VARIABLE_MIXING = True ! [Boolean] default = False
Expand Down Expand Up @@ -877,6 +828,10 @@ ML_USE_OMEGA = True ! [Boolean] default = False
! If true, use the absolute rotation rate instead of the
! vertical component of rotation when setting the decay
! scale for turbulence.
CDRAG = 0.003 ! [nondim] default = 0.003
! CDRAG is the drag coefficient relating the magnitude of
! the velocity field to the bottom stress. CDRAG is only
! used if BOTTOMDRAGLAW is defined.
DRAG_BG_VEL = 0.1 ! [m s-1] default = 0.0
! DRAG_BG_VEL is either the assumed bottom velocity (with
! LINEAR_DRAG) or an unresolved velocity that is
Expand Down Expand Up @@ -1363,6 +1318,9 @@ KPP_ZERO_DIFFUSIVITY = False ! [Boolean] default = False
KPP_IS_ADDITIVE = False ! [Boolean] default = False
! If true, adds KPP diffusivity to the existing diffusivity. If false, replaces exisiting diffusivity with KPP diffusivity wherever the latter is non-zero.
%KPP
SALT_REJECT_BELOW_ML = False ! [Boolean] default = False
! If true, place salt from brine rejection below the mixed layer,
! into the first non-vanished layer for which the column remains stable

! === module MOM_diffConvection ===
! This module implements enhanced diffusivity as a
Expand Down

0 comments on commit 7194bb0

Please sign in to comment.