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

Convert vegetation type related variables to arrays #135

Closed
dschlaep opened this issue Jan 22, 2018 · 0 comments · Fixed by #136
Closed

Convert vegetation type related variables to arrays #135

dschlaep opened this issue Jan 22, 2018 · 0 comments · Fixed by #136

Comments

@dschlaep
Copy link
Member

Currently, each combination of vegetation type and process has its own set of variables, e.g.,

hydred_tree[MAX_LAYERS], /* hydraulic redistribution cm/layer */
		hydred_forb[MAX_LAYERS], hydred_shrub[MAX_LAYERS], hydred_grass[MAX_LAYERS]

This makes it impossible to loop over vegetation types.

==> Use NVEGTYPES to create appropriately long array, e.g., hydred[NVEGTYPES][MAX_LAYERS]
==> define vegetation type indicators to access correct values

@dschlaep dschlaep added this to the Clean code milestone Jan 22, 2018
dschlaep added a commit that referenced this issue Jan 22, 2018
- start addressing #135

- all complete except those defined in SW_VegProd.h
dschlaep added a commit that referenced this issue Jan 22, 2018
- address #135

- convert vegetation variables defined in SW_VegProd.h
@dschlaep dschlaep self-assigned this Jan 23, 2018
dschlaep added a commit that referenced this issue Jan 23, 2018
dschlaep added a commit that referenced this issue Jan 23, 2018
- address #135

- convert local vegetation variables defined in SW_Flow.c and SW_Site.c

- use pre-defined loop 'ForEachVegType' whenever possible
- define loop 'ForEachVegTypeBottomUp' for use by, e.g., hydraulic
redistribution

- SW_Flow_lib: collapsed all (identical) functions
* 'XXX_intercepted_water' into 'veg_intercepted_water'
* 'XXX_EsT_partitioning' into 'EsT_partitioning'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant