Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Moving particle routines from analysis members to shared #1468

Open
wants to merge 6 commits into
base: ocean/develop
Choose a base branch
from

Conversation

davelee2804
Copy link

Particle routines previously only available to light analysis members directory, now moved to general location

  • adding new particles pool to the registry and moving arrays from lagrangian particle pools in analysis members to this new pool
  • modifying routines in geometric_utils to remove the pointer attribute from incoming mesh pools
  • calling shift_time_levels on contents of the particels pool, which differ slightly from the previous lagrangian particles pool in analysis members
  • have not correspondingly updated mpas_particle_list_update_particle_block() for new pool
  • have added particle helpers module to shared and moved routines from analysis members to here

@davelee2804
Copy link
Author

Branched off an earlier version of ocean develop for compatibility of CDG and FCT tracer advection prior to operator split version of FCT being merged in.

…ion routine

2) moving wachspressAreaB array to the ocean/shared/Registry
3) deleting the particles Pool and reverting the contents back to the lagrangian particles pools
Copy link
Contributor

@pwolfram pwolfram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see some comments and thanks for chatting about this @davelee2804. The key thing is to have distinct velocity namespace between LIGHT and CDG.

/>
<var name="ucReconstructZ" type="real" dimensions="nVertLevels nCells" units="m s^{-1}"
description="reconstructed cell center velocity- z component"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davelee2804, I think these have to be left here, correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need them to advect particles.

/>
<var name="ucZ" type="real" dimensions="nVertLevels nCells" units="m s^{-1}"
description="cell velocity- z component"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please leave.

/>
<var name="boundaryVertexGlobal" type="integer" dimensions="nVertLevels nVertices" units="unitless"
description="Mask for determining boundary vertices, but global. A boundary vertex has at least one inactive cell neighboring it."
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please leave.

@@ -398,7 +400,7 @@ subroutine ocn_compute_lagrangian_particle_tracking(domain, timeLevel, err)!{{{
call mpas_timer_start("reconst_filter_LPT")
#endif
! need to handle periodicity within functions below for vertex reconstruction
call ocn_vertex_reconstruction(filterNum, meshPool, lagrPartTrackScratchPool, lagrPartTrackCellsPool, &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to leave this line as-is because vertex reconstruction can be filtered.

@@ -1327,7 +1331,7 @@ subroutine initalize_fields(domain, err)!{{{
#ifdef MPAS_DEBUG
call mpas_timer_start("init_reconst_filter_LPT")
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we don't want these changes because we are keeping separate fields for CDG and LIGHT.

@@ -412,173 +128,6 @@ subroutine ocn_vector_vertex_to_cell_center(meshPool, & !{{{

end subroutine ocn_vector_vertex_to_cell_center !}}}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you bring over this function too?

! output variables
real (kind=RKIND), dimension(:,:), pointer, intent(out) :: uvReconstructX !< Output: Vertex Reconstructed X Velocity Component
real (kind=RKIND), dimension(:,:), pointer, intent(out) :: uvReconstructY !< Output: Vertex Reconstructed Y Velocity Component
real (kind=RKIND), dimension(:,:), pointer, intent(out) :: uvReconstructZ !< Output: Vertex Reconstructed Z Velocity Component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intent here needs to be inout to prevent issues for Theta.


end subroutine mpas_particle_horizontal_movement!}}}

real (kind=RKIND) function old_ocn_spherical_area(ax, ay, az, bx, by, bz, cx, cy, cz, radius)!{{{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header needed

<var name="ucReconstructZonal" type="real" dimensions="nVertLevels nCells" units="m s^{-1}"
description="reconstructed cell center velocity- zonal component"
/>
<var name="boundaryVertexGlobal" type="integer" dimensions="nVertLevels nVertices" units="unitless"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boundaryVertexGlobal can stay here, rest should be duplicated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only add fields you need for CDG

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have your own scratchpool for CDG.

! outputs
type (field2DReal), pointer, intent(out) :: uvReconstructX !< Output: X Component of velocity reconstructed to vertices
type (field2DReal), pointer, intent(out) :: uvReconstructY !< Output: Y Component of velocity reconstructed to vertices
type (field2DReal), pointer, intent(out) :: uvReconstructZ !< Output: Z Component of velocity reconstructed to vertices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May need intents inout.

…lagrangian particles scratch pool,

and also adding a meshInterpolation package (on if cdg or light is active)

!AB = old_ocn_arc_length(ax,ay,az , bx,by,bz, radius) / radius
!BC = old_ocn_arc_length(bx,by,bz , cx,cy,cz, radius) / radius
!CA = old_ocn_arc_length(cx,cy,cz , ax,ay,az, radius) / radius
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented lines

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants