
Assemble LANDIS-II Climate Library wide-format table from a monthly BioSIM Arrow dataset
assemble_climate_library_file_monthly.RdReads the partitioned Arrow CSV dataset written by get_clim_monthly(),
summarizes the requested variables by (Year, Month, EcoID), applies unit
conversions to match LANDIS-II conventions, and pivots to the wide format
ingested by LandisClimateConfig. The result has the same shape that
prep_monthly_weather() returns and is suitable for writeClimateData().
Arguments
- dataset_path
character. Path to the
Climatic_MonthlyArrow dataset directory (containingYEAR=.../BatchID=.../part-0.csvpartitions).- vars
character vector of BioSIM column names to retain (e.g.
c("TotalPrcp", "MeanTmin", "MeanTmax", "WndS", "WndD")).- id_col
character. Name of the ecoregion-id column in the dataset. Default
"EcoID".
Details
Unit conversions applied:
TotalPrcp(mm) \(\to\) cm (\(\div 10\))WndS(km/h) \(\to\) m/s (\(\div 3.6\))
BioSIM WndD is reported as the wind from-direction (degrees), which
is what the LANDIS-II Climate Library expects. The monthly value here is a
frequency-weighted circular mean across the model's 36 direction bins (see
get_clim_monthly()); when summarising across cells within an ecoregion
the same arithmetic-mean convention as the daily pipeline is applied.