28 implicit none ;
private 30 #include <MOM_memory.h> 31 #ifdef SYMMETRIC_LAND_ICE 32 # define GRID_SYM_ .true. 33 # define NIMEMQ_IS_ NIMEMQS_ 34 # define NJMEMQ_IS_ NJMEMQS_ 35 # define ISUMSTART_INT_ CS%grid%iscq+1 36 # define JSUMSTART_INT_ CS%grid%jscq+1 38 # define GRID_SYM_ .false. 39 # define NIMEMQ_IS_ NIMEMQ_ 40 # define NJMEMQ_IS_ NJMEMQ_ 41 # define ISUMSTART_INT_ CS%grid%iscq 42 # define JSUMSTART_INT_ CS%grid%jscq 53 real,
intent(inout),
dimension(:,:) :: h_shelf, area_shelf_h, hmask
57 character(len=40) :: mdl =
"initialize_ice_thickness" 58 character(len=200) :: config
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.)
65 select case ( trim(config) )
69 case default ;
call mom_error(fatal,
"MOM_initialize: "// &
70 "Unrecognized ice profile setup "//trim(config))
78 real,
intent(inout),
dimension(:,:) :: h_shelf, area_shelf_h, hmask
84 character(len=200) :: filename,thickness_file,inputdir
85 character(len=200) :: thickness_varname, area_varname
86 character(len=40) :: mdl =
"initialize_ice_thickness_from_file" 87 integer :: i, j, isc, jsc, iec, jec
88 real :: len_sidestress, mask, udh
90 call mom_mesg(
" MOM_ice_shelf_init_profile.F90, initialize_thickness_from_file: reading thickness")
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")
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.", &
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")
111 " initialize_topography_from_file: Unable to open "//trim(filename))
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)
120 isc = g%isc ; jsc = g%jsc ; iec = g%iec ; jec = g%jec
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 133 area_shelf_h(i,j) = 0.0
141 if (area_shelf_h(i,j) .ge. g%areaT(i,j))
then 143 elseif (area_shelf_h(i,j) .eq. 0.0)
then 145 elseif ((area_shelf_h(i,j) .gt. 0) .and. (area_shelf_h(i,j) .le. g%areaT(i,j)))
then 148 call mom_error(fatal,mdl//
" AREA IN CELL OUT OF RANGE")
159 real,
intent(inout),
dimension(:,:) :: h_shelf, area_shelf_h, hmask
163 character(len=40) :: mdl =
"initialize_ice_shelf_thickness_channel" 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
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
174 call mom_mesg(mdl//
": setting thickness")
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)
187 slope_pos = edge_pos - flat_shelf_width
188 c1 = 0.0 ;
if (shelf_slope_scale > 0.0) c1 = 1.0 / shelf_slope_scale
192 if (((j+j_off) <= jedg) .AND. ((j+j_off) >= nyh+1))
then 196 if ((j.ge.jsc) .and. (j.le.jec))
then 198 if (g%geoLonCu(i-1,j) >= edge_pos)
then 201 area_shelf_h(i,j) = 0.0
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))
210 area_shelf_h(i,j) = g%areaT(i,j)
214 if (g%geoLonT(i,j) > slope_pos)
then 215 h_shelf(i,j) = min_draft
221 h_shelf(i,j) = (min_draft + &
222 (max_draft - min_draft) * &
223 min(1.0, (c1*(slope_pos - g%geoLonT(i,j)))**2) )
229 if ((i+g%idg_offset) .eq. g%domain%nihalo+1)
then Ocean grid type. See mom_grid for details.
Provides the ocean grid type.
This module contains I/O framework code.
subroutine, public user_init_ice_thickness(h_shelf, area_shelf_h, hmask, G, param_file)
subroutine, public initialize_ice_thickness(h_shelf, area_shelf_h, hmask, G, PF)
logical function, public is_root_pe()
subroutine initialize_ice_thickness_from_file(h_shelf, area_shelf_h, hmask, G, PF)
subroutine, public mom_mesg(message, verb, all_print)
subroutine initialize_ice_thickness_channel(h_shelf, area_shelf_h, hmask, G, PF)
subroutine, public mom_error(level, message, all_print)