-
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
New HDD/CDD calculation added #23
Conversation
R/calcHDDCDD.R
Outdated
|
||
|
||
# prepare input for calcBAIT() | ||
calcBaitInput <- function(frsds=NULL, fsfc=NULL, fhuss=NULL, baitInput=NULL, mean=FALSE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe avoid this kind of function name to avoid confusion with madrat calc functions?
R/calcHDDCDD.R
Outdated
# swap ambient temperature values with corresponding DD values | ||
hddcdd <- classify(temp, factors) | ||
|
||
terra::time(hddcdd) <- as.Date(dates) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you that have another function called time
? If not, drop the package name.
terra::time(hddcdd) <- as.Date(dates) | |
time(hddcdd) <- as.Date(dates) |
Very impressive work so far, @hagento ! I mainly looked at
|
Co-authored-by: Robin Hasse <76682203+robinhasse@users.noreply.github.com>
Co-authored-by: Robin Hasse <76682203+robinhasse@users.noreply.github.com>
Great update, @hagento ! Documentation is so much better now. Please rename all functions starting with |
A new approach for calculating HDD/CDD's has been added -
calcHDDCDD
,calcBAITpars
- that bases upon the bias-adjusted internal temperature (BAIT). The calculation relies on processing raster data from the ISIMIP repository which are defined in theinst/extdata/sectoral/filemappings
directory. These are read in using the functionsreadISIMIPbuildings
andconvertISIMIPbuildings
which are tailored for pre-processing the raster data optimally for the above named purposes.The code is working but partially throws memory conflicts that still need to be resolved with further development.