Skip to content

Commit

Permalink
(+)Added iceberg elements to mech_forcing type
Browse files Browse the repository at this point in the history
  Added the new elements area_berg and mass_berg to the mech_forcing type, since
these may be updated at different points in the algorithm than the fluxes type.
All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed May 1, 2018
1 parent 0c5fab3 commit 4cc6eab
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ module MOM_forcing_type
!! This may point to p_surf or to p_surf_full.
net_mass_src => NULL(), & !< The net mass source to the ocean, in kg m-2 s-1.

! iceberg related inputs
area_berg => NULL(), & !< area of ocean surface covered by icebergs (m2/m2)
mass_berg => NULL(), & !< mass of icebergs (kg/m2)

! land ice-shelf related inputs
frac_shelf_u => NULL(), & !< Fractional ice shelf coverage of u-cells, nondimensional
!! from 0 to 1. This is only associated if ice shelves are
Expand Down Expand Up @@ -2605,6 +2609,10 @@ subroutine allocate_mech_forcing(G, forces, stress, ustar, shelf, press, iceberg
call myAlloc(forces%frac_shelf_u,IsdB,IedB,jsd,jed, shelf)
call myAlloc(forces%frac_shelf_v,isd,ied,JsdB,JedB, shelf)

!These fields should only on allocated when iceberg area is being passed through the coupler.
call myAlloc(forces%area_berg,isd,ied,jsd,jed, iceberg)
call myAlloc(forces%mass_berg,isd,ied,jsd,jed, iceberg)

end subroutine allocate_mech_forcing

!> Allocates and zeroes-out array.
Expand Down Expand Up @@ -2678,13 +2686,15 @@ subroutine deallocate_mech_forcing(forces)
if (associated(forces%taux)) deallocate(forces%taux)
if (associated(forces%tauy)) deallocate(forces%tauy)
if (associated(forces%ustar)) deallocate(forces%ustar)
if (associated(forces%p_surf)) deallocate(forces%p_surf)
if (associated(forces%p_surf_full)) deallocate(forces%p_surf_full)
if (associated(forces%p_surf)) deallocate(forces%p_surf)
if (associated(forces%p_surf_full)) deallocate(forces%p_surf_full)
if (associated(forces%net_mass_src)) deallocate(forces%net_mass_src)
if (associated(forces%rigidity_ice_u)) deallocate(forces%rigidity_ice_u)
if (associated(forces%rigidity_ice_v)) deallocate(forces%rigidity_ice_v)
if (associated(forces%frac_shelf_u)) deallocate(forces%frac_shelf_u)
if (associated(forces%frac_shelf_v)) deallocate(forces%frac_shelf_v)
if (associated(forces%area_berg)) deallocate(forces%area_berg)
if (associated(forces%mass_berg)) deallocate(forces%mass_berg)

end subroutine deallocate_mech_forcing

Expand Down

0 comments on commit 4cc6eab

Please sign in to comment.