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

allocations in canopy surface fluxes I #846

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

kmdeck
Copy link
Member

@kmdeck kmdeck commented Oct 10, 2024

Purpose

Allocations in canopy surface fluxes. We return a NamedTuple from a function, with SHF, LHF, etc. This function is broadcasted, so we get a field of NamedTuples. We then unpack the named tuple to set cache (scalar fields). e.g.

canopy_sf = turbulent_fluxes.(....)
p.canopy.shf = canopy_sf.shf
p.canopy.lhf = canopy_sf.lhf

Now we do:

@. p.canopy.sf =turbulent_fluxes(...)
shf = p.canopy.sf.shf
lhf = p.canopy.sf.lhf

Lots of files change since we make plots of these quantities

To-do

Rebase after #819 is merged
Propagate/fix docs, climaland simulations
Benchmark

Content


  • I have read and checked the items on the review checklist.

@kmdeck kmdeck added the Run benchmarks Add this label to run benchmarks on clima label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run benchmarks Add this label to run benchmarks on clima
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant