ClimaLand.jl icon indicating copy to clipboard operation
ClimaLand.jl copied to clipboard

allocations in canopy surface fluxes I

Open kmdeck opened this issue 4 months ago • 0 comments

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 avatar Oct 10 '24 22:10 kmdeck