Changeset 2369 for palm/trunk
- Timestamp:
- Aug 22, 2017 3:20:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/eqn_state_seawater.f90
r2233 r2369 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix, do not mask topography here, since density becomes zero, leading to 28 ! division by zero in production_e 29 ! 30 ! 2233 2017-05-30 18:08:54Z suehring 27 31 ! 28 32 ! 2232 2017-05-30 17:47:52Z suehring … … 123 127 ONLY: hyp, prho, pt_p, rho_ocean, sa_p 124 128 USE indices, & 125 ONLY: nxl, nxr, nyn, nys, nzb, nzt , wall_flags_0129 ONLY: nxl, nxr, nyn, nys, nzb, nzt 126 130 127 131 USE surface_mod, & … … 138 142 INTEGER(iwp) :: surf_s !< Start index of surface elements at (j,i)-gridpoint 139 143 140 REAL(wp) :: flag !< flag to mask topography grid points141 144 REAL(wp) :: pden !< 142 145 REAL(wp) :: pnom !< … … 183 186 den(10)*sa15*pt2 184 187 ! 185 !-- Predetermine flag to mask topography186 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )187 !188 188 !-- Potential density (without pressure terms) 189 prho(k,j,i) = pnom / pden * flag189 prho(k,j,i) = pnom / pden 190 190 191 191 pnom = pnom + nom(8)*p1 + nom(9)*p1*pt2 + & … … 197 197 ! 198 198 !-- In-situ density 199 rho_ocean(k,j,i) = pnom / pden * flag199 rho_ocean(k,j,i) = pnom / pden 200 200 201 201 ENDDO … … 242 242 243 243 USE indices, & 244 ONLY: nzb, nzt , wall_flags_0244 ONLY: nzb, nzt 245 245 246 246 USE surface_mod, & … … 257 257 INTEGER(iwp) :: surf_s !< Start index of surface elements at (j,i)-gridpoint 258 258 259 REAL(wp) :: flag !< flag to mask topography grid points260 259 REAL(wp) :: pden !< 261 260 REAL(wp) :: pnom !< … … 298 297 den(10)*sa15*pt2 299 298 ! 300 !-- Predetermine flag to mask topography301 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )302 !303 299 !-- Potential density (without pressure terms) 304 prho(k,j,i) = pnom / pden * flag300 prho(k,j,i) = pnom / pden 305 301 306 302 pnom = pnom + nom(8)*p1 + nom(9)*p1*pt2 + & … … 311 307 ! 312 308 !-- In-situ density 313 rho_ocean(k,j,i) = pnom / pden * flag309 rho_ocean(k,j,i) = pnom / pden 314 310 315 311
Note: See TracChangeset
for help on using the changeset viewer.