Skip to content

Commit

Permalink
Merge pull request #1 from vanroekel/ocean/VMixGPUport_ashwath
Browse files Browse the repository at this point in the history
Fixes to adcTurbulence
  • Loading branch information
ashwathsv authored Jul 11, 2020
2 parents ca8b10d + 0a13957 commit bce749e
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 139 deletions.
4 changes: 2 additions & 2 deletions src/core_ocean/shared/mpas_ocn_adcReconstruct.F
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,15 @@ subroutine compute_ADC_tends(nCells,nVertLevels, nTracers, dt,activeTracers, uve
KE = 0.5_RKIND*(u2(2,k,iCell) + v2(2,k,iCell) + w2(2,k,iCell))
KEp1 = 0.5_RKIND*(u2(2,k+1,iCell) + v2(2,k+1,iCell) + w2(2,k+1,iCell))
lenav = 0.5_RKIND*(length(k,iCell) + length(k+1,iCell))
diff = C_mom * sqrt(0.5_RKIND*(KE + KEp1)) / lenav
diff = C_mom * sqrt(0.5_RKIND*(KE + KEp1)) / (1.0E-10_RKIND + lenav)
dz = ze(k,iCell) - ze(k+1,iCell)
uw2(k,iCell) = -diff*(uw(2,k,iCell) - uw(2,k+1,iCell)) / dz
vw2(k,iCell) = -diff*(vw(2,k,iCell) - vw(2,k+1,iCell)) / dz
u2w(k,iCell) = -diff*(u2(2,k,iCell) - u2(2,k+1,iCell)) / dz
v2w(k,iCell) = -diff*(v2(2,k,iCell) - v2(2,k+1,iCell)) / dz
uvw(k,iCell) = -diff*(uv(2,k,iCell) - uv(2,k+1,iCell)) / dz

diff = C_therm*sqrt(0.5*(KE + KEp1)) / lenav
diff = C_therm*sqrt(0.5*(KE + KEp1)) / (1.0E-10_RKIND + lenav)
uwt(k,iCell) = -diff*(ut(2,k,iCell) - ut(2,k+1,iCell)) / dz
vwt(k,iCell) = -diff*(vt(2,k,iCell) - vt(2,k+1,iCell)) / dz
uws(k,iCell) = -diff*(us(2,k,iCell) - us(2,k+1,iCell)) / dz
Expand Down
Loading

0 comments on commit bce749e

Please sign in to comment.