You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently tracer_local is dimension(tracer_cnt, km). Is this what we want? In some subroutines, such as compute_autotroph_elemental_ratios() it would be advantageous to have have km be the inner-most dimension, while that might not be the case for other subroutines.
As I work through #53 and #316 I'll keep an eye out for examples of subroutines where the current ordering is preferable and update this issue accordingly.
The text was updated successfully, but these errors were encountered:
@klindsay28 a starting point could be to keep both tracer_local and its transpose in memory and pass the optimal dimension ordering to each routine. This can help us track which routines are better-suited for each memory layout
@matt-long suggests this will be easier to test once we have a stand-alone driver testing interior_tendency_compute() because it will be faster to build / run
With the changes from #318 in place, we should swap the dimensions of all the PFT-specific variables as well. For example, compute_Pprime() would be more efficient with the following change:
! Compute Pprime for all autotrophs, used for loss terms
do auto_ind = 1, autotroph_cnt
where (temperature < autotroph_settings(auto_ind)%temp_thres)
C_loss_thres = f_loss_thres * autotroph_settings(auto_ind)%loss_thres2
else where
C_loss_thres = f_loss_thres * autotroph_settings(auto_ind)%loss_thres
end where
- Pprime(auto_ind,:) = max(autotroph_local%C(auto_ind,:) - C_loss_thres, c0)
+ Pprime(:,auto_ind) = max(autotroph_local%C(:,auto_ind) - C_loss_thres, c0)
end do
This specific example would require changing the constructor for both autotroph_local_type and autotroph_derived_terms_type.
Currently
tracer_local
isdimension(tracer_cnt, km)
. Is this what we want? In some subroutines, such ascompute_autotroph_elemental_ratios()
it would be advantageous to have havekm
be the inner-most dimension, while that might not be the case for other subroutines.As I work through #53 and #316 I'll keep an eye out for examples of subroutines where the current ordering is preferable and update this issue accordingly.
The text was updated successfully, but these errors were encountered: