The metGeneratoR package disaggregates daily NetCDF data to subdaily data. This can be hourly, 3hourly, 6hourly, etc. If needed it converts data to the proper output unit.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Set the latlonbox
mgsetLonlatbox(c(92.25, 110.25, 7.25, 36.25))
## Set the period to run
mgsetPeriod(startdate = "1950-1-1", enddate = "1950-1-31")
## Set the output timesteps in hours
mgsetInDt(24) # 24 hourly input
mgsetOutDt(6) # 6 hourly output
## Set the input variables
mgsetInVars(list(
pr = list(ncname = "pr", filename = metGen$internal$ncFileNamePr),
tasmin = list(ncname = "tasmin", filename = metGen$internal$ncFileNameTasmin),
tasmax = list(ncname = "tasmax", filename = metGen$internal$ncFileNameTasmax),
wind = list(ncname = "sfcWind", filename = metGen$internal$ncFileNameWind),
swdown = list(ncname = "rsds", filename = metGen$internal$ncFileNameswdown),
lwdown = list(ncname = "rlds", filename = metGen$internal$ncFileNamelwdown),
relhum = list(ncname = "hurs", filename = metGen$internal$ncFileNameRelhum),
psurf = list(ncname = "ps", filename = metGen$internal$ncFileNamePs)
))
## Set the output variables
mgsetOutVars(c("tas", "pr", "wind", "vp", "psurf", "swdown", "lwdown"))
## Set the output filename(s) structure and path(s)
mgsetOutName("output/<VAR>/<VAR>_<SYEAR><SMONTH><SDAY>_<EYEAR><EMONTH><EDAY>.nc", message = TRUE)
## Run the metGeneratoR based on the settings above
metGenRun()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.