MOM6
mom_ice_shelf_state Module Reference

Detailed Description

Implements the thermodynamic aspects of ocean / ice-shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.

Data Types

type  ice_shelf_state
 Structure that describes the ice shelf state. More...
 

Functions/Subroutines

subroutine, public ice_shelf_state_init (ISS, G)
 Deallocates all memory associated with this module. More...
 
subroutine, public ice_shelf_state_end (ISS)
 Deallocates all memory associated with this module. More...
 

Function/Subroutine Documentation

◆ ice_shelf_state_end()

subroutine, public mom_ice_shelf_state::ice_shelf_state_end ( type(ice_shelf_state), pointer  ISS)

Deallocates all memory associated with this module.

Parameters
issA pointer to the ice shelf state structure

Definition at line 87 of file MOM_ice_shelf_state.F90.

87  type(ice_shelf_state), pointer :: ISS !< A pointer to the ice shelf state structure
88 
89  if (.not.associated(iss)) return
90 
91  deallocate(iss%mass_shelf, iss%area_shelf_h, iss%h_shelf, iss%hmask)
92 
93  deallocate(iss%tflux_ocn, iss%water_flux, iss%salt_flux, iss%tflux_shelf)
94  deallocate(iss%tfreeze)
95 
96  deallocate(iss)
97 

Referenced by mom_ice_shelf::ice_shelf_end().

Here is the caller graph for this function:

◆ ice_shelf_state_init()

subroutine, public mom_ice_shelf_state::ice_shelf_state_init ( type(ice_shelf_state), pointer  ISS,
type(ocean_grid_type), intent(in)  G 
)

Deallocates all memory associated with this module.

Parameters
issA pointer to the ice shelf state structure
[in]gThe grid structure used by the ice shelf.

Definition at line 58 of file MOM_ice_shelf_state.F90.

58  type(ice_shelf_state), pointer :: ISS !< A pointer to the ice shelf state structure
59  type(ocean_grid_type), intent(in) :: G !< The grid structure used by the ice shelf.
60 
61  integer :: isd, ied, jsd, jed
62  isd = g%isd ; jsd = g%jsd ; ied = g%ied ; jed = g%jed
63 
64  if (associated(iss)) then
65  call mom_error(fatal, "MOM_ice_shelf_state.F90, ice_shelf_state_init: "// &
66  "called with an associated ice_shelf_state pointer.")
67  return
68  endif
69  allocate(iss)
70 
71  allocate(iss%mass_shelf(isd:ied,jsd:jed) ) ; iss%mass_shelf(:,:) = 0.0
72  allocate(iss%area_shelf_h(isd:ied,jsd:jed) ) ; iss%area_shelf_h(:,:) = 0.0
73  allocate(iss%h_shelf(isd:ied,jsd:jed) ) ; iss%h_shelf(:,:) = 0.0
74  allocate(iss%hmask(isd:ied,jsd:jed) ) ; iss%hmask(:,:) = -2.0
75 
76  allocate(iss%tflux_ocn(isd:ied,jsd:jed) ) ; iss%tflux_ocn(:,:) = 0.0
77  allocate(iss%water_flux(isd:ied,jsd:jed) ) ; iss%water_flux(:,:) = 0.0
78  allocate(iss%salt_flux(isd:ied,jsd:jed) ) ; iss%salt_flux(:,:) = 0.0
79  allocate(iss%tflux_shelf(isd:ied,jsd:jed) ) ; iss%tflux_shelf(:,:) = 0.0
80  allocate(iss%tfreeze(isd:ied,jsd:jed) ) ; iss%tfreeze(:,:) = 0.0
81 

References mom_error_handler::mom_error().

Referenced by mom_ice_shelf::initialize_ice_shelf().

Here is the call graph for this function:
Here is the caller graph for this function: