ROMS
Loading...
Searching...
No Matches
sed_surface_mod Module Reference

Functions/Subroutines

subroutine, public sed_surface (ng, tile)
 
subroutine sed_surface_tile (ng, tile, lbi, ubi, lbj, ubj, imins, imaxs, jmins, jmaxs, nstp, nnew, bed_frac, bottom)
 

Function/Subroutine Documentation

◆ sed_surface()

subroutine, public sed_surface_mod::sed_surface ( integer, intent(in) ng,
integer, intent(in) tile )

Definition at line 34 of file sed_surface.F.

35!***********************************************************************
36!
37 USE mod_param
38 USE mod_ocean
39 USE mod_sedbed
40 USE mod_stepping
41!
42! Imported variable declarations.
43!
44 integer, intent(in) :: ng, tile
45!
46! Local variable declarations.
47!
48 character (len=*), parameter :: MyFile = &
49 & __FILE__
50!
51# include "tile.h"
52!
53# ifdef PROFILE
54 CALL wclock_on (ng, inlm, 16, __line__, myfile)
55# endif
56 CALL sed_surface_tile (ng, tile, &
57 & lbi, ubi, lbj, ubj, &
58 & imins, imaxs, jmins, jmaxs, &
59 & nstp(ng), nnew(ng), &
60 & sedbed(ng) % bed_frac, &
61 & sedbed(ng) % bottom)
62# ifdef PROFILE
63 CALL wclock_off (ng, inlm, 16, __line__, myfile)
64# endif
65!
66 RETURN
integer, parameter inlm
Definition mod_param.F:662
type(t_sedbed), dimension(:), allocatable sedbed
Definition sedbed_mod.h:157
integer, dimension(:), allocatable nnew
integer, dimension(:), allocatable nstp
recursive subroutine wclock_off(ng, model, region, line, routine)
Definition timers.F:148
recursive subroutine wclock_on(ng, model, region, line, routine)
Definition timers.F:3

References mod_param::inlm, mod_stepping::nnew, mod_stepping::nstp, sed_surface_tile(), mod_sedbed::sedbed, wclock_off(), and wclock_on().

Referenced by sediment_mod::sediment().

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

◆ sed_surface_tile()

subroutine sed_surface_mod::sed_surface_tile ( integer, intent(in) ng,
integer, intent(in) tile,
integer, intent(in) lbi,
integer, intent(in) ubi,
integer, intent(in) lbj,
integer, intent(in) ubj,
integer, intent(in) imins,
integer, intent(in) imaxs,
integer, intent(in) jmins,
integer, intent(in) jmaxs,
integer, intent(in) nstp,
integer, intent(in) nnew,
real(r8), dimension(lbi:,lbj:,:,:), intent(inout) bed_frac,
real(r8), dimension(lbi:,lbj:,:), intent(inout) bottom )
private

Definition at line 70 of file sed_surface.F.

75!***********************************************************************
76!
77 USE mod_param
78 USE mod_scalars
79 USE mod_sediment
80!
81 USE bc_3d_mod, ONLY : bc_r3d_tile
82# ifdef DISTRIBUTE
84# endif
85!
86! Imported variable declarations.
87!
88 integer, intent(in) :: ng, tile
89 integer, intent(in) :: LBi, UBi, LBj, UBj
90 integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
91 integer, intent(in) :: nstp, nnew
92!
93# ifdef ASSUMED_SHAPE
94 real(r8), intent(inout) :: bed_frac(LBi:,LBj:,:,:)
95 real(r8), intent(inout) :: bottom(LBi:,LBj:,:)
96# else
97 real(r8), intent(inout) :: bed_frac(LBi:UBi,LBj:UBj,Nbed,NST)
98 real(r8), intent(inout) :: bottom(LBi:UBi,LBj:UBj,MBOTP)
99# endif
100!
101! Local variable declarations.
102!
103 integer :: i, ised, j
104
105 real(r8) :: cff1, cff2, cff3, cff4
106 real(r8), parameter :: eps = 1.0e-14_r8
107
108# include "set_bounds.h"
109
110!
111! Update mean surface properties.
112! Sd50 must be positive definite, due to BBL routines.
113! Srho must be >1000, due to (s-1) in BBL routines
114!
115 j_loop : DO j=jstr,jend
116 DO i=istr,iend
117 cff1=1.0_r8
118 cff2=1.0_r8
119 cff3=1.0_r8
120 cff4=1.0_r8
121 DO ised=1,nst
122 cff1=cff1*tau_ce(ised,ng)**bed_frac(i,j,1,ised)
123 cff2=cff2*sd50(ised,ng)**bed_frac(i,j,1,ised)
124 cff3=cff3*(wsed(ised,ng)+eps)**bed_frac(i,j,1,ised)
125 cff4=cff4*srho(ised,ng)**bed_frac(i,j,1,ised)
126 END DO
127 bottom(i,j,itauc)=cff1
128 bottom(i,j,isd50)=min(cff2,zob(ng))
129 bottom(i,j,iwsed)=cff3
130 bottom(i,j,idens)=max(cff4,1050.0_r8)
131 END DO
132 END DO j_loop
133!!
134!! Move bottom roughness computations from BBL routines to here.
135!!
136
137!
138!-----------------------------------------------------------------------
139! Apply periodic or gradient boundary conditions to property arrays.
140!-----------------------------------------------------------------------
141!
142 CALL bc_r3d_tile (ng, tile, &
143 & lbi, ubi, lbj, ubj, 1, mbotp, &
144 & bottom)
145# ifdef DISTRIBUTE
146 CALL mp_exchange3d (ng, tile, inlm, 1, &
147 & lbi, ubi, lbj, ubj, 1, mbotp, &
148 & nghostpoints, &
149 & ewperiodic(ng), nsperiodic(ng), &
150 & bottom)
151# endif
152!
153 RETURN
subroutine bc_r3d_tile(ng, tile, lbi, ubi, lbj, ubj, lbk, ubk, a)
Definition bc_3d.F:48
integer nghostpoints
Definition mod_param.F:710
integer nst
Definition mod_param.F:521
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
real(r8), dimension(:), allocatable zob
integer, parameter iwsed
integer, parameter mbotp
real(r8), dimension(:,:), allocatable srho
integer, parameter idens
integer, parameter isd50
real(r8), dimension(:,:), allocatable sd50
real(r8), dimension(:,:), allocatable wsed
integer, parameter itauc
real(r8), dimension(:,:), allocatable tau_ce
subroutine mp_exchange4d(ng, tile, model, nvar, lbi, ubi, lbj, ubj, lbk, ubk, lbt, ubt, nghost, ew_periodic, ns_periodic, a, b, c)
subroutine mp_exchange3d(ng, tile, model, nvar, lbi, ubi, lbj, ubj, lbk, ubk, nghost, ew_periodic, ns_periodic, a, b, c, d)

References bc_3d_mod::bc_r3d_tile(), mod_scalars::ewperiodic, mod_sediment::idens, mod_param::inlm, mod_sediment::isd50, mod_sediment::itauc, mod_sediment::iwsed, mp_exchange_mod::mp_exchange3d(), mp_exchange_mod::mp_exchange4d(), mod_param::nghostpoints, mod_scalars::nsperiodic, mod_sediment::sd50, mod_sediment::srho, mod_sediment::tau_ce, mod_sediment::wsed, and mod_scalars::zob.

Referenced by sed_surface().

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