90 use mpp_mod
, only : mpp_pe, mpp_sync
94 implicit none ;
private 96 #include <MOM_memory.h> 106 real :: flat_shelf_width
107 real :: shelf_slope_scale
108 real :: pos_shelf_edge_0
117 real,
dimension(SZI_(G),SZJ_(G)),
intent(out) :: mass_shelf, area_shelf_h, hmask, h_shelf
136 real :: flat_shelf_width
138 character(len=40) :: mdl =
"USER_initialize_shelf_mass" 144 if (.not.
associated(cs))
allocate(cs)
148 call get_param(param_file, mdl,
"RHO_0", cs%Rho_ocean, &
149 "The mean ocean density used with BOUSSINESQ true to \n"//&
150 "calculate accelerations and the mass for conservation \n"//&
151 "properties, or with BOUSSINSEQ false to convert some \n"//&
152 "parameters from vertical units of m to kg m-2.", &
153 units=
"kg m-3", default=1035.0)
154 call get_param(param_file, mdl,
"SHELF_MAX_DRAFT", cs%max_draft, &
155 units=
"m", default=1.0)
156 call get_param(param_file, mdl,
"SHELF_MIN_DRAFT", cs%min_draft, &
157 units=
"m", default=1.0)
158 call get_param(param_file, mdl,
"FLAT_SHELF_WIDTH", cs%flat_shelf_width, &
159 units=
"axis_units", default=0.0)
160 call get_param(param_file, mdl,
"SHELF_SLOPE_SCALE", cs%shelf_slope_scale, &
161 units=
"axis_units", default=0.0)
162 call get_param(param_file, mdl,
"SHELF_EDGE_POS_0", cs%pos_shelf_edge_0, &
163 units=
"axis_units", default=0.0)
164 call get_param(param_file, mdl,
"SHELF_SPEED", cs%shelf_speed, &
165 units=
"axis_units day-1", default=0.0)
174 real,
dimension(SZI_(G),SZJ_(G)),
intent(out) :: area_shelf_h, hmask, h_shelf
179 real,
dimension(SZI_(G),SZJ_(G)) :: mass_shelf
188 real,
dimension(SZI_(G),SZJ_(G)),
intent(inout) :: mass_shelf, area_shelf_h, hmask, h_shelf
190 type(time_type),
intent(in) :: Time
191 logical,
intent(in) :: new_sim
201 real :: c1, edge_pos, slope_pos
204 edge_pos = cs%pos_shelf_edge_0 + cs%shelf_speed*(time_type_to_real(time) / 86400.0)
206 slope_pos = edge_pos - cs%flat_shelf_width
207 c1 = 0.0 ;
if (cs%shelf_slope_scale > 0.0) c1 = 1.0 / cs%shelf_slope_scale
212 if (((j+g%jdg_offset) .le. g%domain%njglobal+g%domain%njhalo) .AND. &
213 ((j+g%jdg_offset) .ge. g%domain%njhalo+1))
then 220 if ((j.ge.g%jsc) .and. (j.le.g%jec))
then 222 if (new_sim)
then ;
if (g%geoLonCu(i-1,j) >= edge_pos)
then 224 mass_shelf(i,j) = 0.0
225 area_shelf_h(i,j) = 0.0
229 if (g%geoLonCu(i,j) > edge_pos)
then 230 area_shelf_h(i,j) = g%areaT(i,j) * (edge_pos - g%geoLonCu(i-1,j)) / &
231 (g%geoLonCu(i,j) - g%geoLonCu(i-1,j))
234 area_shelf_h(i,j) = g%areaT(i,j)
238 if (g%geoLonT(i,j) > slope_pos)
then 239 h_shelf(i,j) = cs%min_draft
240 mass_shelf(i,j) = cs%Rho_ocean * cs%min_draft
242 mass_shelf(i,j) = cs%Rho_ocean * (cs%min_draft + &
243 (cs%max_draft - cs%min_draft) * &
244 min(1.0, (c1*(slope_pos - g%geoLonT(i,j)))**2) )
245 h_shelf(i,j) = (cs%min_draft + &
246 (cs%max_draft - cs%min_draft) * &
247 min(1.0, (c1*(slope_pos - g%geoLonT(i,j)))**2) )
250 endif ;
endif ;
endif 252 if ((i+g%idg_offset) .eq. g%domain%nihalo+1)
then 256 enddo ;
endif ;
enddo 263 character(len=128) :: version =
'$Id: user_shelf_init.F90,v 1.1.2.7 2012/06/19 22:15:52 Robert.Hallberg Exp $' 264 character(len=128) :: tagname =
'$Name: MOM_ogrp $' 265 character(len=40) :: mdl =
"user_shelf_init" 267 call log_version(param_file, mdl, version, tagname)
subroutine, public user_initialize_shelf_mass(mass_shelf, area_shelf_h, h_shelf, hmask, G, CS, param_file, new_sim)
Ocean grid type. See mom_grid for details.
Provides the ocean grid type.
subroutine, public user_update_shelf_mass(mass_shelf, area_shelf_h, h_shelf, hmask, G, CS, Time, new_sim)
subroutine write_user_log(param_file)
subroutine, public user_init_ice_thickness(h_shelf, area_shelf_h, hmask, G, param_file)
logical function, public is_root_pe()
subroutine, public mom_mesg(message, verb, all_print)
subroutine, public mom_error(level, message, all_print)