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, changing the grazing function for a particular grazer requires knowing that grazing_function = 1 refers to Michaelis-Menten and grazing_function = 2 refers to a sigmoidal function. Instead, users should specify a grazing function via a string (michaelis or sigmoidal) that is then converted to an integer to avoid string comparisons inside the computation stage. See treatment of caco3_bury_thres_opt in marbl_settings_mod.F90.
The text was updated successfully, but these errors were encountered:
Im trying to understand the MARBL code, but I have a couple of questions about the subroutine compute_grazing.
1- Why does the subroutine loop over the vertical level k? Could this subroutine be vectorized?
2- In the part of the code shown below, Im not sure if the loop is supposed to sum over the Pprime of all the three autotrophs groups. For example for prey =1 and predator =1, it has auto_ind_cnt =1 and auto_ind2 =1. So if I understand correctly, there is no sum over all the autotrophs but just the corresponding one to the prey?
!-----------------------------------------------------------------------
! compute sum of carbon in the grazee class, both autotrophs and zoop
!-----------------------------------------------------------------------
work1 = c0 ! biomass in prey class prey_ind
do auto_ind2 = 1, grazing_relationship_settings(prey_ind, pred_ind)%auto_ind_cnt
auto_ind = grazing_relationship_settings(prey_ind, pred_ind)%auto_ind(auto_ind2)
work1 = work1 + Pprime(auto_ind,k)
end do
We loop over k as part of the clean-up addressing migrate k loop inside of subroutines called from marbl_set_interior_forcing #53; we plan to investigate vectorization once MARBL v1.0.0 has been released (it is unclear if we will see much speed-up with vectorization in models that let the number of active levels vary from column to column)
This is a confusing portion of the code that will be cleaned up when we address grazing type should be a subset of zooplankton type #320. auto_ind2 is looping over all autotrophs that are preyed upon by a given grazer, but the way the code is currently written that will typically correspond to a single autotroph (because of the prey_ind dimension of grazing_relationship_settings(prey_ind, pred_ind)). But the general idea is that pred_ind grazes on auto_ind_cnt different autotrophs in a manner determined by the parameters in the grazing relationship datatype, and auto_ind is the index of autotroph_settings for each different prey. work1 is used to determine graze_rate for the given predator-prey pair, and is the sum of Pprime at a given level across all the autotrophs being grazed in a given grazing relationship. Note that each "grazing relationship" is defined by a unique entry in grazing_relationship_settings
Currently, changing the grazing function for a particular grazer requires knowing that
grazing_function = 1
refers to Michaelis-Menten andgrazing_function = 2
refers to a sigmoidal function. Instead, users should specify a grazing function via a string (michaelis
orsigmoidal
) that is then converted to an integer to avoid string comparisons inside the computation stage. See treatment ofcaco3_bury_thres_opt
inmarbl_settings_mod.F90
.The text was updated successfully, but these errors were encountered: