188 real,
dimension(SZI_(G),SZJ_(G)),
intent(inout) :: mass_shelf, area_shelf_h, hmask, h_shelf
189 type(user_ice_shelf_cs),
pointer :: cs
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 Ocean grid type. See mom_grid for details.