add_berg_flux_to_shelf adds rigidity and ice-area coverage due to icebergs to the forces type fields, and adds ice-areal coverage and modifies various thermodynamic fluxes due to the presence of icebergs.
46 type(ocean_grid_type),
intent(inout) :: G
47 type(mech_forcing),
intent(inout) :: forces
48 type(surface),
intent(inout) :: sfc_state
50 logical,
intent(in) :: use_ice_shelf
51 real,
intent(in) :: time_step
52 type(marine_ice_CS),
pointer :: CS
55 integer :: i, j, is, ie, js, je
56 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec
62 if (.not.
associated(cs))
return
64 if (.not.(
associated(forces%area_berg) .and.
associated(forces%mass_berg) ) )
return
66 if (.not.(
associated(forces%frac_shelf_u) .and.
associated(forces%frac_shelf_v) .and. &
67 associated(forces%rigidity_ice_u) .and.
associated(forces%rigidity_ice_v)) )
return
70 if (.not. use_ice_shelf)
then
71 forces%frac_shelf_u(:,:) = 0.0 ; forces%frac_shelf_v(:,:) = 0.0
73 if (.not. forces%accumulate_rigidity)
then
74 forces%rigidity_ice_u(:,:) = 0.0 ; forces%rigidity_ice_v(:,:) = 0.0
77 call pass_var(forces%area_berg, g%domain, to_all+omit_corners, halo=1, complete=.false.)
78 call pass_var(forces%mass_berg, g%domain, to_all+omit_corners, halo=1, complete=.true.)
79 kv_rho_ice = cs%kv_iceberg / cs%density_iceberg
80 do j=js,je ;
do i=is-1,ie
81 if ((g%areaT(i,j) + g%areaT(i+1,j) > 0.0)) &
82 forces%frac_shelf_u(i,j) = forces%frac_shelf_u(i,j) + &
83 (((forces%area_berg(i,j)*g%areaT(i,j)) + &
84 (forces%area_berg(i+1,j)*g%areaT(i+1,j))) / &
85 (g%areaT(i,j) + g%areaT(i+1,j)) )
86 forces%rigidity_ice_u(i,j) = forces%rigidity_ice_u(i,j) + kv_rho_ice * &
87 min(forces%mass_berg(i,j), forces%mass_berg(i+1,j))
89 do j=js-1,je ;
do i=is,ie
90 if ((g%areaT(i,j) + g%areaT(i,j+1) > 0.0)) &
91 forces%frac_shelf_v(i,j) = forces%frac_shelf_v(i,j) + &
92 (((forces%area_berg(i,j)*g%areaT(i,j)) + &
93 (forces%area_berg(i,j+1)*g%areaT(i,j+1))) / &
94 (g%areaT(i,j) + g%areaT(i,j+1)) )
95 forces%rigidity_ice_v(i,j) = forces%rigidity_ice_v(i,j) + kv_rho_ice * &
96 min(forces%mass_berg(i,j), forces%mass_berg(i,j+1))
99 call pass_vector(forces%frac_shelf_u, forces%frac_shelf_v, g%domain, to_all, cgrid_ne)