Skip to content

Commit

Permalink
replace hard-coded mesh diff. limit with a param: eps_omesh
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Aug 28, 2019
1 parent 7ad7296 commit 18c6f1e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion config_src/nuopc_driver/mom_ocean_model_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module MOM_ocean_model_nuopc
public ocean_public_type_chksum
public ocean_model_data_get
public get_ocean_grid
public get_eps_omesh

!> This interface extracts a named scalar field or array from the ocean surface or public type
interface ocean_model_data_get
Expand Down Expand Up @@ -182,6 +183,9 @@ module MOM_ocean_model_nuopc
logical :: diabatic_first !< If true, apply diabatic and thermodynamic
!! processes before time stepping the dynamics.

real :: eps_omesh !< Max allowable difference between ESMF mesh and MOM6
!! domain coordinates

type(directories) :: dirs !< A structure containing several relevant directory paths.
type(mech_forcing) :: forces !< A structure with the driving mechanical surface forces
type(forcing) :: fluxes !< A structure containing pointers to
Expand Down Expand Up @@ -327,6 +331,9 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
else ; call MOM_error(FATAL,"ocean_model_init: OCEAN_SURFACE_STAGGER = "// &
trim(stagger)//" is invalid.") ; endif

call get_param(param_file, mdl, "EPS_OMESH",OS%eps_omesh, &
"Maximum allowable difference between ESMF mesh and "//&
"MOM6 domain coordinates.", default=1.e-2)
call get_param(param_file, mdl, "RESTORE_SALINITY",OS%restore_salinity, &
"If true, the coupled driver will add a globally-balanced "//&
"fresh-water flux that drives sea-surface salinity "//&
Expand All @@ -353,7 +360,7 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i

OS%press_to_z = 1.0/(Rho0*G_Earth)

call get_param(param_file, mdl, "HFREEZE", HFrz, &
call get_param(param_file, mdl, "HFREEZE", HFrz, &
"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), "//&
Expand Down Expand Up @@ -1174,4 +1181,10 @@ subroutine get_ocean_grid(OS, Gridp)
return
end subroutine get_ocean_grid

!> Returns eps_omesh read from param file
real function get_eps_omesh(OS)
type(ocean_state_type) :: OS
get_eps_omesh = OS%eps_omesh; return
end function

end module MOM_ocean_model_nuopc

0 comments on commit 18c6f1e

Please sign in to comment.