Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow N tracers to be advected #4

Open
1 task
FlorianDeconinck opened this issue Mar 5, 2024 · 5 comments
Open
1 task

Allow N tracers to be advected #4

FlorianDeconinck opened this issue Mar 5, 2024 · 5 comments
Assignees

Comments

@FlorianDeconinck
Copy link
Collaborator

FlorianDeconinck commented Mar 5, 2024

GEOS-FP advects 28 tracers. DSL port does 9 hard coded tracers.

Parent: GEOS-ESM/SMT-Nebulae#55


  • ndsl dynamical core can advect N tracers
@FlorianDeconinck FlorianDeconinck changed the title PyFV3: allow N tracers to be advected Allow N tracers to be advected Mar 5, 2024
@FlorianDeconinck
Copy link
Collaborator Author

GEOS breakdown:

  • Bundle of tracers, some are flagged friendly to dynamics, the flagged are all advected
    • Within the dynamics tracers, FV_State mode singles out the water/cloud species
    • AdvCore is a standalone advection, which borrows some (how much?) code from FV and is used to
      • Do offline advection for Chemistry
      • Do advection of the non-water species on a separate DT
  • nwat is used. ncnst is not

@FlorianDeconinck
Copy link
Collaborator Author

pyFV3 breakdown:

  • Code is split between TracerAdvection and Remapping:mapn_tracers.
  • The "advectable" tracers are denoted by NQ in constants.py, which means order of tracers in the array matters (sic)
  • TracerAdvection actually names the tracers in its code, NQ is passed but unused
  • Mapn_tracers uses NQ to loop over the tracers and remap them

@FlorianDeconinck
Copy link
Collaborator Author

Potential solutions:

  • Replicate the "bundle" of tracers via DataClass/Register combo, with a way to show water species and non-water species on top of names
  • Allow the initialization of stencils by name of species so that we can do a simple for q_name in advectable_tracers: stencil[q_name](). That way on orchestration we will be able to use the nounroll and have a clean and faster SDFG

@FlorianDeconinck FlorianDeconinck self-assigned this Nov 27, 2024
@FlorianDeconinck
Copy link
Collaborator Author

PR: NOAA-GFDL#37

@FlorianDeconinck
Copy link
Collaborator Author

Orchestration remain an issue.

Two main problems:

  • The dict solution sported in the PR is very anti-DaCe, which doesn't allow any complex structure like that. It will work but the code will be unrolled. Fine with 7 tracers, painful with 31, unthinkable with 200+
  • The newly implemented reduction over all nodes (MPI.Allreduce) are not DaCe friendly. Though there's a DaCe MPI it doesn't work out of the box. Callbacking might be a way out, but we need much stronger callbacks.

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

No branches or pull requests

1 participant