Skip to content

Commit 6658d37

Browse files
committed
Removes autocorrelation calculation
Also removes computed particle velocity BFB
1 parent 7801348 commit 6658d37

File tree

3 files changed

+99
-126
lines changed

3 files changed

+99
-126
lines changed

src/core_ocean/analysis_members/Registry_lagrangian_particle_tracking.xml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@
101101
<var name="indexLevel"/>
102102
<var name="cellOwnerBlock"/>
103103
<var name="transfered"/>
104-
<var name="lonVel"/>
105-
<var name="latVel"/>
106104
<var name="buoyancySurfaceValues"/>
107105
<var name="buoyancySurfaceVelocityMeridional"/>
108106
<var name="buoyancySurfaceVelocityZonal"/>
@@ -142,11 +140,6 @@
142140
<var name="dtParticle"/>
143141
<var name="indexLevel"/>
144142
<var name="transfered"/>
145-
<var name="sumU"/>
146-
<var name="sumV"/>
147-
<var name="sumUU"/>
148-
<var name="sumUV"/>
149-
<var name="sumVV"/>
150143
<var name="buoyancySurfaceValues"/>
151144
</stream>
152145

@@ -314,27 +307,6 @@
314307
<var name="transfered" type ="integer" dimensions="nParticles Time" units="unitless"
315308
description="flag to monitor if the particle was transfered"
316309
/>
317-
<var name="sumU" type="real" dimensions="nParticles Time" units="m s^{-1}"
318-
description="summed velocity: $\sum_i U_i$"
319-
/>
320-
<var name="sumV" type="real" dimensions="nParticles Time" units="m s^{-1}"
321-
description="summed velocity: $\sum_i V_i$"
322-
/>
323-
<var name="sumUU" type="real" dimensions="nParticles Time" units="m^2 s^{-2}"
324-
description="summed energy: $\sum_i U*U$"
325-
/>
326-
<var name="sumUV" type="real" dimensions="nParticles Time" units="m^2 s^{-2}"
327-
description="summed energy: $\sum_i U*V$"
328-
/>
329-
<var name="sumVV" type="real" dimensions="nParticles Time" units="m^2 s^{-2}"
330-
description="summed energy: $\sum_i V*V$"
331-
/>
332-
<var name="lonVel" type="real" dimensions="nParticles Time" units="m s^{-1}"
333-
description="u velocity of particle - zonal direction"
334-
/>
335-
<var name="latVel" type="real" dimensions="nParticles Time" units="m s^{-1}"
336-
description="v velocity of particle - meridional direction"
337-
/>
338310
</var_struct>
339311
<!--
340312
<var_struct name="lagrPartTrackNonHalo" time_levs="1" packages="lagrPartTrackAMPKG">

src/core_ocean/analysis_members/mpas_ocn_lagrangian_particle_tracking.F

Lines changed: 87 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ subroutine ocn_init_lagrangian_particle_tracking(domain, err)!{{{
180180
LIGHT_DEBUG_WRITE('g_compProcNeighsNearby = ' COMMA g_compProcNeighsNearby)
181181
!}}}
182182
183-
! now set sums for autocorrelation calculation to be zero
184-
call zero_autocorrelation_sums(domain)
183+
! ! now set sums for autocorrelation calculation to be zero
184+
! call zero_autocorrelation_sums(domain)
185185
186186
! previous compute startup calls
187187
call intialize_wachspress_coefficients(domain, err)
@@ -260,8 +260,8 @@ subroutine ocn_compute_lagrangian_particle_tracking(domain, timeLevel, err)!{{{
260260
type (mpas_particle_type), pointer :: particle
261261
262262
real (kind=RKIND), dimension(3) :: particlePosition, particleVelocity
263-
real (kind=RKIND), pointer :: xParticle, yParticle, zParticle, lonVel, latVel, buoyancyParticle, sumU, sumV, sumUU, &
264-
sumUV, sumVV
263+
real (kind=RKIND), pointer :: xParticle, yParticle, zParticle, buoyancyParticle !, &
264+
! lonVel, latVel, sumU, sumV, sumUU, sumUV, sumVV
265265
real (kind=RKIND), dimension(3) :: xSubStep, diffSubStep, diffParticlePosition
266266
real (kind=RKIND), pointer :: zLevelParticle
267267
real (kind=RKIND), dimension(:,:), pointer :: zTop, vertVelocityTop, zMid, areaBArray
@@ -472,13 +472,13 @@ subroutine ocn_compute_lagrangian_particle_tracking(domain, timeLevel, err)!{{{
472472
call mpas_pool_get_array(particle % haloDataPool, 'indexToParticleID', indexToParticleID)
473473
call mpas_pool_get_array(particle % haloDataPool, 'currentCell', iCell)
474474

475-
call mpas_pool_get_array(particle % haloDataPool, 'lonVel', lonVel)
476-
call mpas_pool_get_array(particle % haloDataPool, 'latVel', latVel)
477-
call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
478-
call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
479-
call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
480-
call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
481-
call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
475+
! call mpas_pool_get_array(particle % haloDataPool, 'lonVel', lonVel)
476+
! call mpas_pool_get_array(particle % haloDataPool, 'latVel', latVel)
477+
! call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
478+
! call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
479+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
480+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
481+
! call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
482482
#ifdef MPAS_DEBUG
483483
call mpas_timer_stop("memtasksLPT")
484484
#endif
@@ -745,24 +745,24 @@ subroutine ocn_compute_lagrangian_particle_tracking(domain, timeLevel, err)!{{{
745745
#endif
746746
! convert horizontal velocity to lat/lon velocity
747747

748-
! store velocity for use in computing normalized autocorrelation offline
749-
#ifdef MPAS_DEBUG
750-
call mpas_timer_start("mpas_convert_xyz_velocity_to_latlonLPT")
751-
#endif
752-
call mpas_convert_xyz_velocity_to_latlon(lonVel, latVel, particlePosition, particleVelocity)
753-
#ifdef MPAS_DEBUG
754-
call mpas_timer_stop("mpas_convert_xyz_velocity_to_latlonLPT")
755-
#endif
748+
! ! store velocity for use in computing normalized autocorrelation offline
749+
!#ifdef MPAS_DEBUG
750+
! call mpas_timer_start("mpas_convert_xyz_velocity_to_latlonLPT")
751+
!#endif
752+
! call mpas_convert_xyz_velocity_to_latlon(lonVel, latVel, particlePosition, particleVelocity)
753+
!#ifdef MPAS_DEBUG
754+
! call mpas_timer_stop("mpas_convert_xyz_velocity_to_latlonLPT")
755+
!#endif
756756

757-
! now store components needed to compute integral timescale
758-
#ifdef MPAS_DEBUG
759-
call mpas_timer_start("storeSingleParticleStats")
760-
#endif
761-
sumU = sumU + lonVel
762-
sumV = sumV + latVel
763-
sumUU = sumUU + lonVel*lonVel
764-
sumUV = sumUV + lonVel*latVel
765-
sumVV = sumVV + latVel*latVel
757+
! ! now store components needed to compute integral timescale
758+
!#ifdef MPAS_DEBUG
759+
! call mpas_timer_start("storeSingleParticleStats")
760+
!#endif
761+
! sumU = sumU + lonVel
762+
! sumV = sumV + latVel
763+
! sumUU = sumUU + lonVel*lonVel
764+
! sumUV = sumUV + lonVel*latVel
765+
! sumVV = sumVV + latVel*latVel
766766
#ifdef MPAS_DEBUG
767767
call mpas_timer_stop("storeSingleParticleStats")
768768
#endif
@@ -1646,8 +1646,8 @@ subroutine initialize_particle_properties(domain, timeLevel, err)!{{{
16461646
type (mpas_particle_type), pointer :: particle
16471647

16481648
real (kind=RKIND), dimension(3) :: particlePosition, particleVelocity
1649-
real (kind=RKIND), pointer :: xParticle, yParticle, zParticle, lonVel, latVel, buoyancyParticle, sumU, sumV, sumUU, &
1650-
sumUV, sumVV
1649+
real (kind=RKIND), pointer :: xParticle, yParticle, zParticle, lonVel, latVel, buoyancyParticle !, &
1650+
! lonVel, latVel, sumU, sumV, sumUU, sumUV, sumVV
16511651
real (kind=RKIND), dimension(3) :: xSubStep, diffSubStep, diffParticlePosition
16521652
real (kind=RKIND), pointer :: zLevelParticle
16531653
real (kind=RKIND), dimension(:,:), pointer :: zTop, vertVelocityTop, zMid, areaBArray
@@ -1746,6 +1746,8 @@ subroutine initialize_particle_properties(domain, timeLevel, err)!{{{
17461746
call mpas_pool_get_array(particle % haloDataPool, 'yParticle', yParticle)
17471747
call mpas_pool_get_array(particle % haloDataPool, 'zParticle', zParticle)
17481748
call mpas_pool_get_array(particle % haloDataPool, 'currentCell', iCell)
1749+
iCell = -1
1750+
17491751
particlePosition(1) = xParticle
17501752
particlePosition(2) = yParticle
17511753
particlePosition(3) = zParticle
@@ -1758,13 +1760,13 @@ subroutine initialize_particle_properties(domain, timeLevel, err)!{{{
17581760
call mpas_pool_get_array(particle % haloDataPool, 'buoyancyParticle', buoyancyParticle)
17591761
call mpas_pool_get_array(particle % haloDataPool, 'indexToParticleID', indexToParticleID)
17601762

1761-
call mpas_pool_get_array(particle % haloDataPool, 'lonVel', lonVel)
1762-
call mpas_pool_get_array(particle % haloDataPool, 'latVel', latVel)
1763-
call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
1764-
call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
1765-
call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
1766-
call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
1767-
call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
1763+
! call mpas_pool_get_array(particle % haloDataPool, 'lonVel', lonVel)
1764+
! call mpas_pool_get_array(particle % haloDataPool, 'latVel', latVel)
1765+
! call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
1766+
! call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
1767+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
1768+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
1769+
! call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
17681770

17691771
!}}}
17701772

@@ -1818,9 +1820,8 @@ subroutine initialize_particle_properties(domain, timeLevel, err)!{{{
18181820
18191821
LIGHT_DEBUG_WRITE(iLevel COMMA particleVelocity)
18201822
1821-
! store velocity for use in computing normalized autocorrelation offline
1822-
1823-
call mpas_convert_xyz_velocity_to_latlon(lonVel, latVel, particlePosition, particleVelocity)
1823+
! ! store velocity for use in computing normalized autocorrelation offline
1824+
! call mpas_convert_xyz_velocity_to_latlon(lonVel, latVel, particlePosition, particleVelocity)
18241825
!}}}
18251826
18261827
! get next particle to process on the list
@@ -2129,52 +2130,52 @@ subroutine velocity_time_interpolation(particleVelocity, particleVelocityVert, &
21292130
21302131
end subroutine velocity_time_interpolation !}}}
21312132
2132-
subroutine zero_autocorrelation_sums(domain) !{{{
2133-
implicit none
2134-
2135-
! input/output variables
2136-
type (domain_type), intent(inout) :: domain
2137-
! local
2138-
type (block_type), pointer :: block
2139-
type (mpas_particle_list_type), pointer :: particlelist
2140-
type (mpas_particle_type), pointer :: particle
2141-
! output variables (per particle)
2142-
real (kind=RKIND), pointer :: sumU, sumV, sumUU, sumUV, sumVV
2143-
integer, pointer :: currentCell
2144-
2145-
! get the appropriate pools
2146-
block => domain % blocklist
2147-
do while (associated(block)) !{{{
2148-
particlelist => block % particlelist
2149-
do while(associated(particlelist)) !{{{
2150-
! get pointers / option values
2151-
particle => particlelist % particle
2152-
2153-
! get values (may want a flag for reinitialization in the future)
2154-
!call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
2155-
!call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
2156-
!call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
2157-
!call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
2158-
!call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
2159-
call mpas_pool_get_array(particle % haloDataPool, 'currentCell', currentCell)
2160-
2161-
! initialize the values
2162-
!sumU = 0.0_RKIND
2163-
!sumV = 0.0_RKIND
2164-
!sumUU = 0.0_RKIND
2165-
!sumUV = 0.0_RKIND
2166-
!sumVV = 0.0_RKIND
2167-
currentCell = -1
2168-
2169-
! get next particle to process on the list
2170-
particlelist => particlelist % next
2171-
end do !}}}
2172-
2173-
! get next block
2174-
block => block % next
2175-
end do !}}}
2176-
2177-
end subroutine zero_autocorrelation_sums !}}}
2133+
! subroutine zero_autocorrelation_sums(domain) !{{{
2134+
! implicit none
2135+
!
2136+
! ! input/output variables
2137+
! type (domain_type), intent(inout) :: domain
2138+
! ! local
2139+
! type (block_type), pointer :: block
2140+
! type (mpas_particle_list_type), pointer :: particlelist
2141+
! type (mpas_particle_type), pointer :: particle
2142+
! ! output variables (per particle)
2143+
! real (kind=RKIND), pointer :: sumU, sumV, sumUU, sumUV, sumVV
2144+
! integer, pointer :: currentCell
2145+
!
2146+
! ! get the appropriate pools
2147+
! block => domain % blocklist
2148+
! do while (associated(block)) !{{{
2149+
! particlelist => block % particlelist
2150+
! do while(associated(particlelist)) !{{{
2151+
! ! get pointers / option values
2152+
! particle => particlelist % particle
2153+
!
2154+
! ! get values (may want a flag for reinitialization in the future)
2155+
! !call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
2156+
! !call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
2157+
! !call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
2158+
! !call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
2159+
! !call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
2160+
! call mpas_pool_get_array(particle % haloDataPool, 'currentCell', currentCell)
2161+
!
2162+
! ! initialize the values
2163+
! !sumU = 0.0_RKIND
2164+
! !sumV = 0.0_RKIND
2165+
! !sumUU = 0.0_RKIND
2166+
! !sumUV = 0.0_RKIND
2167+
! !sumVV = 0.0_RKIND
2168+
! currentCell = -1
2169+
!
2170+
! ! get next particle to process on the list
2171+
! particlelist => particlelist % next
2172+
! end do !}}}
2173+
!
2174+
! ! get next block
2175+
! block => block % next
2176+
! end do !}}}
2177+
!
2178+
! end subroutine zero_autocorrelation_sums !}}}
21782179
21792180
!***********************************************************************
21802181
!

src/core_ocean/analysis_members/mpas_ocn_lagrangian_particle_tracking_reset.F

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ subroutine ocn_evaluate_particle_reset_condition(domain, block, particle, dt, iC
181181
real (kind=RKIND), pointer :: xParticleReset, yParticleReset, zParticleReset, zLevelParticleReset
182182
real (kind=RKIND), pointer :: xParticle, yParticle, zParticle, zLevelParticle
183183
real (kind=RKIND), pointer :: timeSinceReset
184-
real (kind=RKIND), pointer :: sumU, sumV, sumUU, sumUV, sumVV
184+
! real (kind=RKIND), pointer :: sumU, sumV, sumUU, sumUV, sumVV
185185
integer, pointer :: resetTime
186186
real (kind=RKIND), pointer :: globalResetTimeValue
187187

@@ -301,11 +301,11 @@ subroutine ocn_evaluate_particle_reset_condition(domain, block, particle, dt, iC
301301
call mpas_pool_get_array(particle % haloDataPool, 'zLevelParticle', zLevelParticle)
302302
call mpas_pool_get_array(particle % haloDataPool, 'numTimesReset', numTimesReset)
303303
call mpas_pool_get_array(particle % haloDataPool, 'transfered', transfered)
304-
call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
305-
call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
306-
call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
307-
call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
308-
call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
304+
! call mpas_pool_get_array(particle % haloDataPool, 'sumU', sumU)
305+
! call mpas_pool_get_array(particle % haloDataPool, 'sumV', sumV)
306+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUU', sumUU)
307+
! call mpas_pool_get_array(particle % haloDataPool, 'sumUV', sumUV)
308+
! call mpas_pool_get_array(particle % haloDataPool, 'sumVV', sumVV)
309309
310310
! reset the time
311311
timeSinceReset = 0.0_RKIND
@@ -328,12 +328,12 @@ subroutine ocn_evaluate_particle_reset_condition(domain, block, particle, dt, iC
328328
zParticle = zParticleReset
329329
zLevelParticle = zLevelParticleReset
330330
331-
! reset velocity sums
332-
sumU = 0.0_RKIND
333-
sumV = 0.0_RKIND
334-
sumUU = 0.0_RKIND
335-
sumUV = 0.0_RKIND
336-
sumVV = 0.0_RKIND
331+
! ! reset velocity sums
332+
! sumU = 0.0_RKIND
333+
! sumV = 0.0_RKIND
334+
! sumUU = 0.0_RKIND
335+
! sumUV = 0.0_RKIND
336+
! sumVV = 0.0_RKIND
337337
338338
! more variables may need to be reset in the future
339339

0 commit comments

Comments
 (0)