frank0434 / Master

repo for the master project - water stress for APSIMX lucerne model
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

implment reset sw in single slurp #49

Closed frank0434 closed 3 years ago

frank0434 commented 3 years ago

this has been implemented.

steps:

frank0434 commented 3 years ago

in ch4, ad-hoc SW_initials was hacked via change sowing dates

sowingDates[SowingDate%in% paste0("SD", 1:5), 
            Clock.Today := as.Date(magicDate)]

this way the initialSWC function will treat the magicDate as the initial soil water content dates

frank0434 commented 3 years ago

SW_initials are identical to SW_initals_reset the TARGET SW_sub already filtered by the magicDate

function filter_SW had argument to filter by date.

frank0434 commented 3 years ago

x error target met_AshleyDene_SD1

when using future and future,callr data.table subset by [] is not supported. suspect that pkgs needs to be loaded in each callr session or define the pkgs in targets set up. x error target data_SW

frank0434 commented 3 years ago
tar_option_set(
  packages = c("data.table", "here", "magrittr"), # `...` is for other packages.
  # imports = c("package1", "package2")
)

made improvement

frank0434 commented 3 years ago

sorted if not using future callr plan