-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature overhaul aggregation code (part1) #268
Open
dschlaep
wants to merge
65
commits into
master
Choose a base branch
from
feature_OverhaulAggregationCode
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
dschlaep
commented
Feb 8, 2018
- introduced generalized aggregation functions
- possibility to output aggregated values for each year
- this branch will be addressing issue #18 - setting option ‘agg_funs’ allows to choose which functions will be applied to aggregate output across years (and/or to output for each year) - setting option ‘agg_years’ contains sequences of years over which will be aggregated Former-commit-id: d3124f4 Former-commit-id: 8ba1d5a
- commit 4863b65 [formerly 65ea3ce] [formerly ef0b55941bf5b0b314466a7cff8c040a17c88430 [formerly ec75e0d7130c8102bcc0f3604771568f650949ec]] introduced bug - i.e., under parallelization with ‘snow’, the code attempted the workers to connect to the weather DB before the variable ‘dbWeatherDataFile’ was exported to the workers Former-commit-id: f2ba430 Former-commit-id: f818449
- If 'return_ids', then the function returns a data.frame object with two columns ‘aggfun_id’ and 'x'. The column ‘aggfun_id’ contains the values of the identifier 'id' and the column 'x' contains the returned value(s) of the aggregating functions applied to the input argument 'x'. - If 'return_ids' is FALSE, then the function returns what would be otherwise be the column 'x' as numeric vector. Former-commit-id: 0de3fe4 Former-commit-id: add38f1
- progress: up to aggregation 23 = ‘dailyC4_TempVar’ - Adjusting field names of output DB - Applying ‘agg_fun’ or ‘agg_fun_circular’ to the requested aggregations - Some aggregations are not across years, but across different units, e.g., ‘yearlyDryWetPeriods’ and ‘monthlySPEIEvents’; ‘agg_fun’ gained a new argument ‘omit_yearly’ and ‘resAgg' is filled except for the not ‘is_yearly’ columns other changes: - replaced any(is.na(.)) with anyNA(.) and thus R v3.1.0 is required - re-coded the aggregation ‘dailySnowpack2’ for clarity and speed Former-commit-id: d1ae370 Former-commit-id: 08cd78b
- this branch will be addressing issue #18 - setting option ‘agg_funs’ allows to choose which functions will be applied to aggregate output across years (and/or to output for each year) - setting option ‘agg_years’ contains sequences of years over which will be aggregated Former-commit-id: 63ff132 Former-commit-id: 132ecc4
- If 'return_ids', then the function returns a data.frame object with two columns ‘aggfun_id’ and 'x'. The column ‘aggfun_id’ contains the values of the identifier 'id' and the column 'x' contains the returned value(s) of the aggregating functions applied to the input argument 'x'. - If 'return_ids' is FALSE, then the function returns what would be otherwise be the column 'x' as numeric vector. Former-commit-id: d8dedcb Former-commit-id: 5b3448b
…' into generalized_agg_funs
- element ‘agg_years’ added to description ‘sim_time’ - elements ‘agg_funs’ and ‘agg_fun_options’ added to description ‘req_out’ - elements ‘define_period_min_cont_days’ and ‘SPEI_tscales_months’ added to description ‘opt_agg’ - new functions ‘degree_days’, ‘soil_status’, ‘dailyRegeneration_bySWPSnow_ThisYear_YN’, and ‘season_diff_NS’ - function ‘sw_dailyC4_TempVar’ gains argument ‘return_yearly’ - new R file ‘SWSF_OutputAggregation.R’ with functions ‘create_aggregation_function’ and ‘setup_aggregations’ - outputDB gains new tables ‘Meta’, ‘aggregating_functions’, and ‘aggregating_timewindows’ - function ‘init_rSFSW2_project’ calls ‘setup_aggregations’ to prepare aggregation functions and store in variable ‘SFSW2_prj_meta’ - code for new aggregation functions and aggregation windows updated in ‘do_OneSite’, ‘dbOutput_create_Design’, ‘dbOutput_create_OverallAggregationTable’, ‘dbOutput_create_DailyAggregationTable’, and ‘make_dbOutput’ (which now checks outputDB version number) - new elements in package-level environment ‘SFSW2_glovars’: "v_dbOutput”, "minVersion_dbOutput"
- branch is now installable as package
# Conflicts: # R/Miscellaneous_Functions.R # R/OutputDatabase.R # R/Simulation_Run.R # demo/SFSW2_project_descriptions.R
…ll does not install
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.