Skip to content

Commit

Permalink
Clean up print statements, from Luke's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-petersen committed Jan 26, 2020
1 parent 32f2fef commit 7b60bf6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 56 deletions.
16 changes: 3 additions & 13 deletions src/core_ocean/shared/mpas_ocn_diagnostics.F
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,6 @@ subroutine ocn_reconstruct_gm_vectors(diagnosticsPool, meshPool) !{{{
transportVelocityMeridional, normalGMBolusVelocity, GMBolusVelocityX, GMBolusVelocityY, GMBolusVelocityZ, &
GMBolusVelocityZonal, GMBolusVelocityMeridional, &
gmStreamFuncTopOfEdge, GMStreamFuncX, GMStreamFuncY, GMStreamFuncZ, GMStreamFuncZonal, GMStreamFuncMeridional
real(kind=RKIND), dimension(:,:,:), pointer :: slopeTriadUp, slopeTriadDown
call mpas_timer_start('reconstruct gm vecs')
Expand All @@ -1884,32 +1883,23 @@ subroutine ocn_reconstruct_gm_vectors(diagnosticsPool, meshPool) !{{{
call mpas_pool_get_array(diagnosticsPool, 'GMStreamFuncZonal', GMStreamFuncZonal)
call mpas_pool_get_array(diagnosticsPool, 'GMStreamFuncMeridional', GMStreamFuncMeridional)
call mpas_pool_get_array(diagnosticsPool, 'slopeTriadUp', slopeTriadUp)
call mpas_pool_get_array(diagnosticsPool, 'slopeTriadDown', slopeTriadDown)
! mrp temporary change to see slope
!call mpas_reconstruct(meshPool, normalTransportVelocity, &
call mpas_reconstruct(meshPool, slopeTriadUp(:,1,:), &
call mpas_reconstruct(meshPool, normalTransportVelocity, &
transportVelocityX, &
transportVelocityY, &
transportVelocityZ, &
transportVelocityZonal, &
transportVelocityMeridional &
)
! mrp temporary change to see slope
!call mpas_reconstruct(meshPool, normalGMBolusVelocity, &
call mpas_reconstruct(meshPool, slopeTriadUp(:,2,:), &
call mpas_reconstruct(meshPool, normalGMBolusVelocity, &
GMBolusVelocityX, &
GMBolusVelocityY, &
GMBolusVelocityZ, &
GMBolusVelocityZonal, &
GMBolusVelocityMeridional &
)
! mrp temporary change to see slope
!call mpas_reconstruct(meshPool, gmStreamFuncTopOfEdge, &
call mpas_reconstruct(meshPool, slopeTriadUp(:,1,:), &
call mpas_reconstruct(meshPool, gmStreamFuncTopOfEdge, &
GMStreamFuncX, &
GMStreamFuncY, &
GMStreamFuncZ, &
Expand Down
38 changes: 10 additions & 28 deletions src/core_ocean/shared/mpas_ocn_equation_of_state_linear.F
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ subroutine ocn_equation_of_state_linear_density_exp( &

! copy some intent(in) into local work space

! mrp printing debug loop. Remove later
!print *, 'EOS. displacementType=',trim(displacementType)
! print *, 'k,density(k,iCell),thermalExpansionCoeff(k,iCell),salineContractionCoeff(k,iCell)'
!*** if surfaceDisplaced, then compute density at all levels
!*** based on input surface values
!*** return fixed values of expansion coefficients
Expand All @@ -320,18 +317,11 @@ subroutine ocn_equation_of_state_linear_density_exp( &
(tracersSurfaceLayerValue(indexS,iCell) - &
ocnEqStateLinearSref)

!mrp replace this ********** temporary
! thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha/ &
! density(k,iCell)
!
! salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta/ &
! density(k,iCell)
thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha
salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta
! mrp printing debug loop. Remove later
!if (iCell==6) then
! print *, k,density(k,iCell),thermalExpansionCoeff(k,iCell),salineContractionCoeff(k,iCell)
!endif
thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha/ &
density(k,iCell)

salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta/ &
density(k,iCell)
end do
end do
!$omp end do
Expand All @@ -350,24 +340,16 @@ subroutine ocn_equation_of_state_linear_density_exp( &
(tracers(indexS,k,iCell) - &
ocnEqStateLinearSref)

!mrp replace this ********** temporary
! thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha/ &
! density(k,iCell)
!
! salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta/ &
! density(k,iCell)
thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha
salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta
! mrp printing debug loop. Remove later
!if (iCell==6) then
! print *, k,density(k,iCell),thermalExpansionCoeff(k,iCell),salineContractionCoeff(k,iCell)
!endif
thermalExpansionCoeff(k,iCell) = ocnEqStateLinearAlpha/ &
density(k,iCell)

salineContractionCoeff(k,iCell) = ocnEqStateLinearBeta/ &
density(k,iCell)
end do
end do
!$omp end do

endif


!-----------------------------------------------------------------

Expand Down
15 changes: 0 additions & 15 deletions src/core_ocean/shared/mpas_ocn_gm.F
Original file line number Diff line number Diff line change
Expand Up @@ -508,25 +508,10 @@ subroutine ocn_GM_compute_Bolus_velocity(statePool, diagnosticsPool, &
! Normalize k33
do k = 2, maxLevelCell(iCell)
k33(k,iCell) = k33(k,iCell) / k33Norm(k)
!print '(a,2i5,1000e9.2)', 'iCell,k,Up',iCell,k,slopeTriadUp(k,:,iCell)
!print '(a,2i5,1000e9.2)', 'iCell,k,Dn',iCell,k,slopeTriadDown(k,:,iCell)
if (k33Norm(k)<1e-15) then
print *, 'WARNING: k33Norm(k)<1e-15'
!print '(a,100i9)', 'k,iCell: ',k,iCell
!print '(a,100e9.2)', 'k33: ',k33(k,iCell)
!print '(a,100e9.2)', 'k33Norm: ',k33Norm(k)
!print '(a,100f5.2)', 'slopeTaper: ',slopeTaper(k)
!print '(a,1000e9.2)', 'slopeTriadUp: ',slopeTriadUp(k,:,iCell)
!print '(a,1000e9.2)', 'slopeTriadDown: ',slopeTriadDown(k,:,iCell)
endif
end do
end do ! iCell
!$omp end do
! print *, 'in gm: max/min, up/down',&
! maxval(slopeTriadUp),minval(slopeTriadUp), &
! maxval(slopeTriadDown),minval(slopeTriadDown)
deallocate(dzTop)
deallocate(dTdzTop)
deallocate(dSdzTop)
Expand Down

0 comments on commit 7b60bf6

Please sign in to comment.