MOM6
MOM_shortwave_abs.F90
Go to the documentation of this file.
2 !***********************************************************************
3 !* GNU General Public License *
4 !* This file is a part of MOM. *
5 !* *
6 !* MOM is free software; you can redistribute it and/or modify it and *
7 !* are expected to follow the terms of the GNU General Public License *
8 !* as published by the Free Software Foundation; either version 2 of *
9 !* the License, or (at your option) any later version. *
10 !* *
11 !* MOM is distributed in the hope that it will be useful, but WITHOUT *
12 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
13 !* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public *
14 !* License for more details. *
15 !* *
16 !* For the full text of the GNU General Public License, *
17 !* write to: Free Software Foundation, Inc., *
18 !* 675 Mass Ave, Cambridge, MA 02139, USA. *
19 !* or see: http://www.gnu.org/licenses/gpl.html *
20 !***********************************************************************
21 
22 use mom_error_handler, only : mom_error, fatal, warning
24 use mom_grid, only : ocean_grid_type
26 
27 implicit none ; private
28 
29 #include <MOM_memory.h>
30 
32 
33 type, public :: optics_type
34  ! ocean optical properties
35 
36  integer :: nbands ! number of penetrating bands of SW radiation
37 
38  real, pointer, dimension(:,:,:,:) :: &
39  opacity_band => null() ! SW optical depth per unit thickness (1/m)
40  ! Number of radiation bands is most rapidly varying (first) index.
41 
42  real, pointer, dimension(:,:,:) :: &
43  sw_pen_band => null() ! shortwave radiation (W/m^2) at the surface in each of
44  ! the nbands bands that penetrates beyond the surface.
45  ! The most rapidly varying dimension is the band.
46 
47  real, pointer, dimension(:) :: &
48  min_wavelength_band => null(), & ! The range of wavelengths in each band of
49  max_wavelength_band => null() ! penetrating shortwave radiation (nm)
50 
51 end type optics_type
52 
53 
54 contains
55 
56 !> Apply shortwave heating below surface boundary layer.
57 subroutine absorbremainingsw(G, GV, h, opacity_band, nsw, j, dt, H_limit_fluxes, &
58  adjustAbsorptionProfile, absorbAllSW, T, Pen_SW_bnd, &
59  eps, ksort, htot, Ttot, TKE, dSV_dT)
60 
61 !< This subroutine applies shortwave heating below the boundary layer (when running
62 !! with the bulk mixed layer from GOLD) or throughout the water column. In
63 !! addition, it causes all of the remaining SW radiation to be absorbed,
64 !! provided that the total water column thickness is greater than
65 !! H_limit_fluxes. For thinner water columns, the heating is scaled down
66 !! proportionately, the assumption being that the remaining heating (which is
67 !! left in Pen_SW) should go into an (absent for now) ocean bottom sediment layer.
68 
69  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
70  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
71  real, dimension(SZI_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H (usually m or
72  !! kg m-2).
73  real, dimension(:,:,:), intent(in) :: opacity_band !< Opacity in each band of
74  !! penetrating shortwave radiation (1/H).
75  !! The indicies are band, i, k.
76  integer, intent(in) :: nsw !< Number of bands of penetrating
77  !! shortwave radiation.
78  integer, intent(in) :: j !< j-index to work on.
79  real, intent(in) :: dt !< Time step (seconds).
80  real, intent(in) :: H_limit_fluxes !< If the total ocean depth is
81  !! less than this, they are scaled away
82  !! to avoid numerical instabilities. (H)
83  !! This would not be necessary if a
84  !! finite heat capacity mud-layer
85  !! were added.
86  logical, intent(in) :: adjustAbsorptionProfile !< If true, apply
87  !! heating above the layers in which it
88  !! should have occurred to get the
89  !! correct mean depth (and potential
90  !! energy change) of the shortwave that
91  !! should be absorbed by each layer.
92  logical, intent(in) :: absorbAllSW !< If true, apply heating above the
93  !! layers in which it should have occurred
94  !! to get the correct mean depth (and
95  !! potential energy change) of the
96  !! shortwave that should be absorbed by
97  !! each layer.
98  real, dimension(SZI_(G),SZK_(G)), intent(inout) :: T !< Layer potential/conservative
99  !! temperatures (deg C)
100  real, dimension(:,:), intent(inout) :: Pen_SW_bnd !< Penetrating shortwave heating in
101  !! each band that hits the bottom and
102  !! will be redistributed through the
103  !! water column (units of K*H), size
104  !! nsw x SZI_(G).
105  real, dimension(SZI_(G),SZK_(G)), &
106  optional, intent(in) :: eps !< Small thickness that must remain in
107  !! each layer, and which will not be
108  !! subject to heating (units of H)
109  integer, dimension(SZI_(G),SZK_(G)), &
110  optional, intent(in) :: ksort !< Density-sorted k-indicies.
111  real, dimension(SZI_(G)), &
112  optional, intent(in) :: htot !< Total mixed layer thickness, in H .
113  real, dimension(SZI_(G)), &
114  optional, intent(inout) :: Ttot !< Depth integrated mixed layer
115  !! temperature (units of K H).
116  real, dimension(SZI_(G),SZK_(G)), &
117  optional, intent(in) :: dSV_dT !< The partial derivative of specific
118  !! volume with temperature, in m3 kg-1
119  !! K-1.
120  real, dimension(SZI_(G),SZK_(G)), &
121  optional, intent(inout) :: TKE !< The TKE sink from mixing the heating
122  !! throughout a layer, in J m-2.
123 
124 ! Arguments:
125 ! (in) G = the ocean grid structure.
126 ! (in) GV = The ocean's vertical grid structure.
127 ! (in) h = the layer thicknesses, in m or kg m-2.
128 ! units of h are referred to as "H" below.
129 ! (in) opacity_band = opacity in each band of penetrating shortwave
130 ! radiation (1/H). The indicies are band, i, k.
131 ! (in) nsw = number of bands of penetrating shortwave radiation
132 ! (in) j = j-index to work on
133 ! (in) dt = time step (seconds)
134 ! (in) H_limit_fluxes = if the total ocean depth is less than this, they
135 ! are scaled away to avoid numerical instabilities. (H)
136 ! This would not be necessary if a finite heat
137 ! capacity mud-layer were added.
138 ! (in) adjustAbsorptionProfile = if true, apply heating above the layers
139 ! in which it should have occurred to get the correct
140 ! mean depth (and potential energy change) of the
141 ! shortwave that should be absorbed by each layer.
142 ! (in) absorbAllSW = if true, any shortwave radiation that hits the
143 ! bottom is absorbed uniformly over the water column.
144 ! (inout) T = layer potential/conservative temperatures (deg C)
145 ! (inout) Pen_SW_bnd = penetrating shortwave heating in each band that
146 ! hits the bottom and will be redistributed through
147 ! the water column (units of K*H), size nsw x SZI_(G).
148 
149 ! These optional arguments apply when the bulk mixed layer is used
150 ! but are unnecessary with other schemes.
151 ! (in,opt) eps = small thickness that must remain in each layer, and
152 ! which will not be subject to heating (units of H)
153 ! (inout,opt) ksort = density-sorted k-indicies
154 ! (in,opt) htot = total mixed layer thickness, in H
155 ! (inout,opt) Ttot = depth integrated mixed layer temperature (units of K H)
156 ! (in,opt) dSV_dT = the partial derivative of specific volume with temperature, in m3 kg-1 K-1.
157 ! (inout,opt) TKE = the TKE sink from mixing the heating throughout a layer, in J m-2.
158 
159  real, dimension(SZI_(G),SZK_(G)) :: &
160  T_chg_above ! A temperature change that will be applied to all the thick
161  ! layers above a given layer, in K. This is only nonzero if
162  ! adjustAbsorptionProfile is true, in which case the net
163  ! change in the temperature of a layer is the sum of the
164  ! direct heating of that layer plus T_chg_above from all of
165  ! the layers below, plus any contribution from absorbing
166  ! radiation that hits the bottom.
167  real, dimension(SZI_(G)) :: &
168  h_heat, & ! The thickness of the water column that will be heated by
169  ! any remaining shortwave radiation (H units).
170  t_chg, & ! The temperature change of thick layers due to the remaining
171  ! shortwave radiation and contributions from T_chg_above, in K.
172  pen_sw_rem ! The sum across all wavelength bands of the penetrating shortwave
173  ! heating that hits the bottom and will be redistributed through
174  ! the water column (in units of K H)
175  real :: SW_trans ! fraction of shortwave radiation that is not
176  ! absorbed in a layer (nondimensional)
177  real :: unabsorbed ! fraction of the shortwave radiation that
178  ! is not absorbed because the layers are too thin
179  real :: Ih_limit ! inverse of the total depth at which the
180  ! surface fluxes start to be limited (1/H)
181  real :: h_min_heat ! minimum thickness layer that should get heated (H)
182  real :: opt_depth ! optical depth of a layer (non-dim)
183  real :: exp_OD ! exp(-opt_depth) (non-dim)
184  real :: heat_bnd ! heating due to absorption in the current
185  ! layer by the current band, including any piece that
186  ! is moved upward (K H units)
187  real :: SWa ! fraction of the absorbed shortwave that is
188  ! moved to layers above with adjustAbsorptionProfile (non-dim)
189  real :: coSWa_frac ! The fraction of SWa that is actually moved upward.
190  real :: min_SW_heating ! A minimum remaining shortwave heating rate that will be
191  ! simply absorbed in the next layer for computational
192  ! efficiency, instead of continuing to penetrate, in units
193  ! of K H s-1. The default, 2.5e-11, is about 0.08 K m / century.
194  real :: epsilon ! A small thickness that must remain in each
195  ! layer, and which will not be subject to heating (units of H)
196  real :: I_G_Earth
197  real :: g_Hconv2
198  logical :: SW_Remains ! If true, some column has shortwave radiation that
199  ! was not entirely absorbed.
200  logical :: TKE_calc ! If true, calculate the implications to the
201  ! TKE budget of the shortwave heating.
202  real :: C1_6, C1_60
203  integer :: is, ie, nz, i, k, ks, n
204  sw_remains = .false.
205 
206  min_sw_heating = 2.5e-11
207 
208  h_min_heat = 2.0*gv%Angstrom + gv%H_subroundoff
209  is = g%isc ; ie = g%iec ; nz = g%ke
210  c1_6 = 1.0 / 6.0 ; c1_60 = 1.0 / 60.0
211 
212  tke_calc = (present(tke) .and. present(dsv_dt))
213  g_hconv2 = gv%g_Earth * gv%H_to_kg_m2**2
214 
215  h_heat(:) = 0.0
216  if (present(htot)) then ; do i=is,ie ; h_heat(i) = htot(i) ; enddo ; endif
217 
218  ! Apply penetrating SW radiation to remaining parts of layers.
219  ! Excessively thin layers are not heated to avoid runaway temps.
220  do ks=1,nz ; do i=is,ie
221  k = ks
222  if (present(ksort)) then
223  if (ksort(i,ks) <= 0) cycle
224  k = ksort(i,ks)
225  endif
226  epsilon = 0.0 ; if (present(eps)) epsilon = eps(i,k)
227 
228  t_chg_above(i,k) = 0.0
229 
230  if (h(i,k) > 1.5*epsilon) then
231  do n=1,nsw ; if (pen_sw_bnd(n,i) > 0.0) then
232  ! SW_trans is the SW that is transmitted THROUGH the layer
233  opt_depth = h(i,k) * opacity_band(n,i,k)
234  exp_od = exp(-opt_depth)
235  sw_trans = exp_od
236 
237  ! Heating at a rate of less than 10-4 W m-2 = 10-3 K m / Century,
238  ! and of the layer in question less than 1 K / Century, can be
239  ! absorbed without further penetration.
240  ! ###Make these numbers into parameters!
241  if (nsw*pen_sw_bnd(n,i)*sw_trans < &
242  dt*min_sw_heating*min(gv%m_to_H,1e3*h(i,k)) ) sw_trans = 0.0
243 
244  heat_bnd = pen_sw_bnd(n,i) * (1.0 - sw_trans)
245  if (adjustabsorptionprofile .and. (h_heat(i) > 0.0)) then
246  ! In this case, a fraction of the heating is applied to the
247  ! overlying water so that the mean pressure at which the shortwave
248  ! heating occurs is exactly what it would have been with a careful
249  ! pressure-weighted averaging of the exponential heating profile,
250  ! hence there should be no TKE budget requirements due to this
251  ! layer. Very clever, but this is also limited so that the
252  ! water above is not heated at a faster rate than the layer
253  ! actually being heated, i.e., SWA <= h_heat / (h_heat + h(i,k))
254  ! and takes the energetics of the rest of the heating into account.
255  ! (-RWH, ~7 years later.)
256  if (opt_depth > 1e-5) then
257  swa = ((opt_depth + (opt_depth + 2.0)*exp_od) - 2.0) / &
258  ((opt_depth + opacity_band(n,i,k) * h_heat(i)) * &
259  (1.0 - exp_od))
260  else
261  ! Use Taylor series expansion of the expression above for a
262  ! more accurate form with very small layer optical depths.
263  swa = h(i,k) * (opt_depth * (1.0 - opt_depth)) / &
264  ((h_heat(i) + h(i,k)) * (6.0 - 3.0*opt_depth))
265  endif
266  coswa_frac = 0.0
267  if (swa*(h_heat(i) + h(i,k)) > h_heat(i)) then
268  coswa_frac = (swa*(h_heat(i) + h(i,k)) - h_heat(i) ) / &
269  (swa*(h_heat(i) + h(i,k)))
270  swa = h_heat(i) / (h_heat(i) + h(i,k))
271  endif
272 
273  t_chg_above(i,k) = t_chg_above(i,k) + (swa * heat_bnd) / h_heat(i)
274  t(i,k) = t(i,k) + ((1.0 - swa) * heat_bnd) / h(i,k)
275  else
276  coswa_frac = 1.0
277  t(i,k) = t(i,k) + pen_sw_bnd(n,i) * (1.0 - sw_trans) / h(i,k)
278  endif
279 
280  if (tke_calc) then
281  if (opt_depth > 1e-2) then
282  tke(i,k) = tke(i,k) - coswa_frac*heat_bnd*dsv_dt(i,k)* &
283  (0.5*h(i,k)*g_hconv2) * &
284  (opt_depth*(1.0+exp_od) - 2.0*(1.0-exp_od)) / (opt_depth*(1.0-exp_od))
285  else
286  ! Use Taylor series-derived approximation to the above expression
287  ! that is well behaved and more accurate when opt_depth is small.
288  tke(i,k) = tke(i,k) - coswa_frac*heat_bnd*dsv_dt(i,k)* &
289  (0.5*h(i,k)*g_hconv2) * &
290  (c1_6*opt_depth * (1.0 - c1_60*opt_depth**2))
291  endif
292  endif
293 
294  pen_sw_bnd(n,i) = pen_sw_bnd(n,i) * sw_trans
295  endif ; enddo
296  endif
297 
298  ! Add to the accumulated thickness above that could be heated.
299  ! Only layers greater than h_min_heat thick should get heated.
300  if (h(i,k) >= 2.0*h_min_heat) then
301  h_heat(i) = h_heat(i) + h(i,k)
302  elseif (h(i,k) > h_min_heat) then
303  h_heat(i) = h_heat(i) + (2.0*h(i,k) - 2.0*h_min_heat)
304  endif
305  enddo ; enddo ! i & k loops
306 
307 
308 ! if (.not.absorbAllSW .and. .not.adjustAbsorptionProfile) return
309 
310  ! Unless modified, there is no temperature change due to fluxes from the bottom.
311  do i=is,ie ; t_chg(i) = 0.0 ; enddo
312 
313  if (absorballsw) then
314  ! If there is still shortwave radiation at this point, it could go into
315  ! the bottom (with a bottom mud model), or it could be redistributed back
316  ! through the water column.
317  do i=is,ie
318  pen_sw_rem(i) = pen_sw_bnd(1,i)
319  do n=2,nsw ; pen_sw_rem(i) = pen_sw_rem(i) + pen_sw_bnd(n,i) ; enddo
320  enddo
321  do i=is,ie ; if (pen_sw_rem(i) > 0.0) sw_remains = .true. ; enddo
322 
323  ih_limit = 1.0 / h_limit_fluxes
324  do i=is,ie ; if ((pen_sw_rem(i) > 0.0) .and. (h_heat(i) > 0.0)) then
325  if (h_heat(i)*ih_limit >= 1.0) then
326  t_chg(i) = pen_sw_rem(i) / h_heat(i) ; unabsorbed = 0.0
327  else
328  t_chg(i) = pen_sw_rem(i) * ih_limit
329  unabsorbed = 1.0 - h_heat(i)*ih_limit
330  endif
331  do n=1,nsw ; pen_sw_bnd(n,i) = unabsorbed * pen_sw_bnd(n,i) ; enddo
332  endif ; enddo
333  endif ! absorbAllSW
334 
335  if (absorballsw .or. adjustabsorptionprofile) then
336  do ks=nz,1,-1 ; do i=is,ie
337  k = ks
338  if (present(ksort)) then
339  if (ksort(i,ks) <= 0) cycle
340  k = ksort(i,ks)
341  endif
342 
343  if (t_chg(i) > 0.0) then
344  ! Only layers greater than h_min_heat thick should get heated.
345  if (h(i,k) >= 2.0*h_min_heat) then ; t(i,k) = t(i,k) + t_chg(i)
346  elseif (h(i,k) > h_min_heat) then
347  t(i,k) = t(i,k) + t_chg(i) * (2.0 - 2.0*h_min_heat/h(i,k))
348  endif
349  endif
350  ! Increase the heating for layers above.
351  t_chg(i) = t_chg(i) + t_chg_above(i,k)
352  enddo ; enddo
353  if (present(htot) .and. present(ttot)) then
354  do i=is,ie ; ttot(i) = ttot(i) + t_chg(i) * htot(i) ; enddo
355  endif
356  endif ! absorbAllSW .or. adjustAbsorptionProfile
357 
358 end subroutine absorbremainingsw
359 
360 
361 subroutine sumswoverbands(G, GV, h, opacity_band, nsw, j, dt, &
362  H_limit_fluxes, absorbAllSW, iPen_SW_bnd, netPen)
363 !< This subroutine calculates the total shortwave heat flux integrated over
364 !! bands as a function of depth. This routine is only called for computing
365 !! buoyancy fluxes for use in KPP. This routine does not updat e the state.
366  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
367  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
368  real, dimension(SZI_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H (usually m
369  !! or kg m-2).
370  real, dimension(:,:,:), intent(in) :: opacity_band !< opacity in each band of
371  !! penetrating shortwave radiation,
372  !! in m-1. The indicies are band, i, k.
373  integer, intent(in) :: nsw !< number of bands of penetrating
374  !! shortwave radiation.
375  integer, intent(in) :: j !< j-index to work on.
376  real, intent(in) :: dt !< Time step (seconds).
377  real, intent(in) :: H_limit_fluxes
378  logical, intent(in) :: absorbAllSW
379  real, dimension(:,:), intent(in) :: iPen_SW_bnd
380  real, dimension(SZI_(G),SZK_(G)+1), intent(inout) :: netPen ! Units of K H.
381 
382 ! Arguments:
383 ! (in) G = ocean grid structure
384 ! (in) GV = The ocean's vertical grid structure.
385 ! (in) h = layer thickness (units of m or kg/m^2);
386 ! units of h are referred to as H below.
387 ! (in) opacity_band = opacity in each band of penetrating shortwave
388 ! radiation, in m-1. The indicies are band, i, k.
389 ! (in) nsw = number of bands of penetrating shortwave radiation
390 ! (in) j = j-index to work on
391 ! (in) dt = time step (seconds)
392 ! (inout) Pen_SW_bnd = penetrating shortwave heating in each band that
393 ! hits the bottom and will be redistributed through
394 ! the water column (K H units); size nsw x SZI_(G).
395 ! (out) netPen = attenuated flux at interfaces, summed over bands (K H units)
396 
397  real :: h_heat(szi_(g)) ! thickness of the water column that receives
398  ! remaining shortwave radiation, in H.
399  real :: Pen_SW_rem(szi_(g)) ! sum across all wavelength bands of the
400  ! penetrating shortwave heating that hits the bottom
401  ! and will be redistributed through the water column
402  ! (K H units)
403 
404  real, dimension(size(iPen_SW_bnd,1),size(iPen_SW_bnd,2)) :: Pen_SW_bnd
405  real :: SW_trans ! fraction of shortwave radiation not
406  ! absorbed in a layer (nondimensional)
407  real :: unabsorbed ! fraction of the shortwave radiation
408  ! not absorbed because the layers are too thin.
409  real :: Ih_limit ! inverse of the total depth at which the
410  ! surface fluxes start to be limited (1/H units)
411  real :: h_min_heat ! minimum thickness layer that should get heated (H units)
412  real :: opt_depth ! optical depth of a layer (non-dim)
413  real :: exp_OD ! exp(-opt_depth) (non-dim)
414  logical :: SW_Remains ! If true, some column has shortwave radiation that
415  ! was not entirely absorbed.
416 
417  integer :: is, ie, nz, i, k, ks, n
418  sw_remains = .false.
419 
420  h_min_heat = 2.0*gv%Angstrom + gv%H_subroundoff
421  is = g%isc ; ie = g%iec ; nz = g%ke
422 
423  pen_sw_bnd(:,:) = ipen_sw_bnd(:,:)
424  do i=is,ie ; h_heat(i) = 0.0 ; enddo
425  netpen(:,1) = sum( pen_sw_bnd(:,:), dim=1 ) ! Surface interface
426 
427  ! Apply penetrating SW radiation to remaining parts of layers.
428  ! Excessively thin layers are not heated to avoid runaway temps.
429  do k=1,nz
430 
431  do i=is,ie
432  netpen(i,k+1) = 0.
433 
434  if (h(i,k) > 0.0) then
435  do n=1,nsw ; if (pen_sw_bnd(n,i) > 0.0) then
436  ! SW_trans is the SW that is transmitted THROUGH the layer
437  opt_depth = h(i,k)*gv%H_to_m * opacity_band(n,i,k)
438  exp_od = exp(-opt_depth)
439  sw_trans = exp_od
440 
441  ! Heating at a rate of less than 10-4 W m-2 = 10-3 K m / Century,
442  ! and of the layer in question less than 1 K / Century, can be
443  ! absorbed without further penetration.
444  if ((nsw*pen_sw_bnd(n,i)*sw_trans < gv%m_to_H*2.5e-11*dt) .and. &
445  (nsw*pen_sw_bnd(n,i)*sw_trans < h(i,k)*dt*2.5e-8)) &
446  sw_trans = 0.0
447 
448  pen_sw_bnd(n,i) = pen_sw_bnd(n,i) * sw_trans
449  netpen(i,k+1) = netpen(i,k+1) + pen_sw_bnd(n,i)
450  endif ; enddo
451  endif ! h(i,k) > 0.0
452 
453  ! Add to the accumulated thickness above that could be heated.
454  ! Only layers greater than h_min_heat thick should get heated.
455  if (h(i,k) >= 2.0*h_min_heat) then
456  h_heat(i) = h_heat(i) + h(i,k)
457  elseif (h(i,k) > h_min_heat) then
458  h_heat(i) = h_heat(i) + (2.0*h(i,k) - 2.0*h_min_heat)
459  endif
460  enddo ! i loop
461  enddo ! k loop
462 
463  if (absorballsw) then
464 
465  ! If there is still shortwave radiation at this point, it could go into
466  ! the bottom (with a bottom mud model), or it could be redistributed back
467  ! through the water column.
468  do i=is,ie
469  pen_sw_rem(i) = pen_sw_bnd(1,i)
470  do n=2,nsw ; pen_sw_rem(i) = pen_sw_rem(i) + pen_sw_bnd(n,i) ; enddo
471  enddo
472  do i=is,ie ; if (pen_sw_rem(i) > 0.0) sw_remains = .true. ; enddo
473 
474  ih_limit = 1.0 / h_limit_fluxes
475  do i=is,ie ; if ((pen_sw_rem(i) > 0.0) .and. (h_heat(i) > 0.0)) then
476  if (h_heat(i)*ih_limit < 1.0) then
477  unabsorbed = 1.0 - h_heat(i)*ih_limit
478  else
479  unabsorbed = 0.0
480  endif
481  do n=1,nsw ; pen_sw_bnd(n,i) = unabsorbed * pen_sw_bnd(n,i) ; enddo
482  endif ; enddo
483 
484  endif ! absorbAllSW
485 
486 end subroutine sumswoverbands
487 
488 end module mom_shortwave_abs
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
Provides the ocean grid type.
Definition: MOM_grid.F90:2
subroutine, public absorbremainingsw(G, GV, h, opacity_band, nsw, j, dt, H_limit_fluxes, adjustAbsorptionProfile, absorbAllSW, T, Pen_SW_bnd, eps, ksort, htot, Ttot, TKE, dSV_dT)
Apply shortwave heating below surface boundary layer.
subroutine, public sumswoverbands(G, GV, h, opacity_band, nsw, j, dt, H_limit_fluxes, absorbAllSW, iPen_SW_bnd, netPen)
subroutine, public mom_error(level, message, all_print)