MOM6
mom_ice_shelf_initialize Module Reference

Functions/Subroutines

subroutine, public initialize_ice_thickness (h_shelf, area_shelf_h, hmask, G, PF)
 
subroutine initialize_ice_thickness_from_file (h_shelf, area_shelf_h, hmask, G, PF)
 
subroutine initialize_ice_thickness_channel (h_shelf, area_shelf_h, hmask, G, PF)
 

Function/Subroutine Documentation

◆ initialize_ice_thickness()

subroutine, public mom_ice_shelf_initialize::initialize_ice_thickness ( real, dimension(:,:), intent(inout)  h_shelf,
real, dimension(:,:), intent(inout)  area_shelf_h,
real, dimension(:,:), intent(inout)  hmask,
type(ocean_grid_type), intent(in)  G,
type(param_file_type), intent(in)  PF 
)
Parameters
[in]gThe ocean's grid structure

Definition at line 52 of file MOM_ice_shelf_initialize.F90.

References initialize_ice_thickness_channel(), initialize_ice_thickness_from_file(), mom_error_handler::mom_error(), and user_shelf_init::user_init_ice_thickness().

52 
53  real, intent(inout), dimension(:,:) :: h_shelf, area_shelf_h, hmask
54  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure
55  type(param_file_type), intent(in) :: pf
56 
57  character(len=40) :: mdl = "initialize_ice_thickness" ! This subroutine's name.
58  character(len=200) :: config
59 
60  call get_param(pf, mdl, "ICE_PROFILE_CONFIG", config, &
61  "This specifies how the initial ice profile is specified. \n"//&
62  "Valid values are: CHANNEL, FILE, and USER.", &
63  fail_if_missing=.true.)
64 
65  select case ( trim(config) )
66  case ("CHANNEL"); call initialize_ice_thickness_channel (h_shelf, area_shelf_h, hmask, g, pf)
67  case ("FILE"); call initialize_ice_thickness_from_file (h_shelf, area_shelf_h, hmask, g, pf)
68  case ("USER"); call user_init_ice_thickness (h_shelf, area_shelf_h, hmask, g, pf)
69  case default ; call mom_error(fatal,"MOM_initialize: "// &
70  "Unrecognized ice profile setup "//trim(config))
71  end select
72 
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
Here is the call graph for this function:

◆ initialize_ice_thickness_channel()

subroutine mom_ice_shelf_initialize::initialize_ice_thickness_channel ( real, dimension(:,:), intent(inout)  h_shelf,
real, dimension(:,:), intent(inout)  area_shelf_h,
real, dimension(:,:), intent(inout)  hmask,
type(ocean_grid_type), intent(in)  G,
type(param_file_type), intent(in)  PF 
)
private
Parameters
[in]gThe ocean's grid structure

Definition at line 158 of file MOM_ice_shelf_initialize.F90.

References mom_error_handler::mom_mesg().

Referenced by initialize_ice_thickness().

158 
159  real, intent(inout), dimension(:,:) :: h_shelf, area_shelf_h, hmask
160  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure
161  type(param_file_type), intent(in) :: pf
162 
163  character(len=40) :: mdl = "initialize_ice_shelf_thickness_channel" ! This subroutine's name.
164  real :: max_draft, min_draft, flat_shelf_width, c1, slope_pos
165  real :: edge_pos, shelf_slope_scale, rho_ocean
166  integer :: i, j, jsc, jec, jsd, jed, jedg, nyh, isc, iec, isd, ied
167  integer :: j_off
168 
169  jsc = g%jsc ; jec = g%jec ; isc = g%isc ; iec = g%iec
170  jsd = g%jsd ; jed = g%jed ; isd = g%isd ; ied = g%ied
171  nyh = g%domain%njhalo ; jedg = g%domain%njglobal+nyh
172  j_off = g%jdg_offset
173 
174  call mom_mesg(mdl//": setting thickness")
175 
176  call get_param(pf, mdl, "SHELF_MAX_DRAFT", max_draft, &
177  units="m", default=1.0)
178  call get_param(pf, mdl, "SHELF_MIN_DRAFT", min_draft, &
179  units="m", default=1.0)
180  call get_param(pf, mdl, "FLAT_SHELF_WIDTH", flat_shelf_width, &
181  units="axis_units", default=0.0)
182  call get_param(pf, mdl, "SHELF_SLOPE_SCALE", shelf_slope_scale, &
183  units="axis_units", default=0.0)
184  call get_param(pf, mdl, "SHELF_EDGE_POS_0", edge_pos, &
185  units="axis_units", default=0.0)
186 
187  slope_pos = edge_pos - flat_shelf_width
188  c1 = 0.0 ; if (shelf_slope_scale > 0.0) c1 = 1.0 / shelf_slope_scale
189 
190  do j=g%jsd,g%jed
191 
192  if (((j+j_off) <= jedg) .AND. ((j+j_off) >= nyh+1)) then
193 
194  do i=g%isc,g%iec
195 
196  if ((j.ge.jsc) .and. (j.le.jec)) then
197 
198  if (g%geoLonCu(i-1,j) >= edge_pos) then
199  ! Everything past the edge is open ocean.
200 ! mass_shelf(i,j) = 0.0
201  area_shelf_h(i,j) = 0.0
202  hmask(i,j) = 0.0
203  h_shelf(i,j) = 0.0
204  else
205  if (g%geoLonCu(i,j) > edge_pos) then
206  area_shelf_h(i,j) = g%areaT(i,j) * (edge_pos - g%geoLonCu(i-1,j)) / &
207  (g%geoLonCu(i,j) - g%geoLonCu(i-1,j))
208  hmask(i,j) = 2.0
209  else
210  area_shelf_h(i,j) = g%areaT(i,j)
211  hmask(i,j) = 1.0
212  endif
213 
214  if (g%geoLonT(i,j) > slope_pos) then
215  h_shelf(i,j) = min_draft
216 ! mass_shelf(i,j) = Rho_ocean * min_draft
217  else
218 ! mass_shelf(i,j) = Rho_ocean * (min_draft + &
219 ! (CS%max_draft - CS%min_draft) * &
220 ! min(1.0, (c1*(slope_pos - G%geoLonT(i,j)))**2) )
221  h_shelf(i,j) = (min_draft + &
222  (max_draft - min_draft) * &
223  min(1.0, (c1*(slope_pos - g%geoLonT(i,j)))**2) )
224  endif
225 
226  endif
227  endif
228 
229  if ((i+g%idg_offset) .eq. g%domain%nihalo+1) then
230  hmask(i-1,j) = 3.0
231  endif
232 
233  enddo
234  endif ; enddo
235 
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_ice_thickness_from_file()

subroutine mom_ice_shelf_initialize::initialize_ice_thickness_from_file ( real, dimension(:,:), intent(inout)  h_shelf,
real, dimension(:,:), intent(inout)  area_shelf_h,
real, dimension(:,:), intent(inout)  hmask,
type(ocean_grid_type), intent(in)  G,
type(param_file_type), intent(in)  PF 
)
private
Parameters
[in]gThe ocean's grid structure

Definition at line 77 of file MOM_ice_shelf_initialize.F90.

References mom_error_handler::mom_error(), and mom_error_handler::mom_mesg().

Referenced by initialize_ice_thickness().

77 
78  real, intent(inout), dimension(:,:) :: h_shelf, area_shelf_h, hmask
79  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure
80  type(param_file_type), intent(in) :: pf
81 
82  ! This subroutine reads ice thickness and area from a file and puts it into
83  ! h_shelf and area_shelf_h in m (and dimensionless) and updates hmask
84  character(len=200) :: filename,thickness_file,inputdir ! Strings for file/path
85  character(len=200) :: thickness_varname, area_varname! Variable name in file
86  character(len=40) :: mdl = "initialize_ice_thickness_from_file" ! This subroutine's name.
87  integer :: i, j, isc, jsc, iec, jec
88  real :: len_sidestress, mask, udh
89 
90  call mom_mesg(" MOM_ice_shelf_init_profile.F90, initialize_thickness_from_file: reading thickness")
91 
92  call get_param(pf, mdl, "INPUTDIR", inputdir, default=".")
93  inputdir = slasher(inputdir)
94  call get_param(pf, mdl, "ICE_THICKNESS_FILE", thickness_file, &
95  "The file from which the bathymetry is read.", &
96  default="ice_shelf_h.nc")
97  call get_param(pf, mdl, "LEN_SIDE_STRESS", len_sidestress, &
98  "position past which shelf sides are stress free.", &
99  default=0.0, units="axis_units")
100 
101  filename = trim(inputdir)//trim(thickness_file)
102  call log_param(pf, mdl, "INPUTDIR/THICKNESS_FILE", filename)
103  call get_param(pf, mdl, "ICE_THICKNESS_VARNAME", thickness_varname, &
104  "The name of the thickness variable in ICE_THICKNESS_FILE.", &
105  default="h_shelf")
106  call get_param(pf, mdl, "ICE_AREA_VARNAME", area_varname, &
107  "The name of the area variable in ICE_THICKNESS_FILE.", &
108  default="area_shelf_h")
109 
110  if (.not.file_exists(filename, g%Domain)) call mom_error(fatal, &
111  " initialize_topography_from_file: Unable to open "//trim(filename))
112 
113  call read_data(filename,trim(thickness_varname),h_shelf,domain=g%Domain%mpp_domain)
114  call read_data(filename,trim(area_varname),area_shelf_h,domain=g%Domain%mpp_domain)
115 
116 ! call get_param(PF, mdl, "ICE_BOUNDARY_CONFIG", config, &
117 ! "This specifies how the ice domain boundary is specified", &
118 ! fail_if_missing=.true.)
119 
120  isc = g%isc ; jsc = g%jsc ; iec = g%iec ; jec = g%jec
121 
122  do j=jsc,jec
123  do i=isc,iec
124 
125  ! taper ice shelf in area where there is no sidestress -
126  ! but do not interfere with hmask
127 
128  if ((g%geoLonCv(i,j) .gt. len_sidestress).and. &
129  (len_sidestress .gt. 0.)) then
130  udh = exp(-(g%geoLonCv(i,j)-len_sidestress)/5.0) * h_shelf(i,j)
131  if (udh .le. 25.0) then
132  h_shelf(i,j) = 0.0
133  area_shelf_h(i,j) = 0.0
134  else
135  h_shelf(i,j) = udh
136  endif
137  endif
138 
139  ! update thickness mask
140 
141  if (area_shelf_h(i,j) .ge. g%areaT(i,j)) then
142  hmask(i,j) = 1.
143  elseif (area_shelf_h(i,j) .eq. 0.0) then
144  hmask(i,j) = 0.
145  elseif ((area_shelf_h(i,j) .gt. 0) .and. (area_shelf_h(i,j) .le. g%areaT(i,j))) then
146  hmask(i,j) = 2.
147  else
148  call mom_error(fatal,mdl// " AREA IN CELL OUT OF RANGE")
149  endif
150  enddo
151  enddo
152 
153 
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
Here is the call graph for this function:
Here is the caller graph for this function: