rchlumsk / RavenR

R package for handling Raven hydrologic modelling framework inputs, outputs, and diagnostics
36 stars 16 forks source link

rvn_rvt_met cleanup & addition to rvn_utilities #78

Closed aviolinist closed 3 years ago

aviolinist commented 3 years ago

NEW USER NOTES

Once these are approved, we can supply more details in the documentation.

user-supplied data frame should have following column names:

"lat" - latitude
"lon" - longitude
"elev" - elevation of met station (masl)
"date" - in YYYY-MM-DD format

supported data types, each in its own named column: WEATHERCAN columns:

"total_snow"  -  mm/d
"max_temp"  -  C
"min_temp"  -  C
"total_precip"  - mm/d

RAVEN columns (based on table C.2 in manual - # not implemented yet):

#"PRECIP_DAILY_AVE" - mm/d
#"PRECIP_5DAY" - mm/d
"SNOW_FRAC" - [0..1]
"SNOWFALL" - mm/d
"RAINFALL" - mm/d
#"RECHARGE" - mm/d

"TEMP_AVE" - C
#"TEMP_DAILY_AVE" - C
"TEMP_MIN" OR "TEMP_DAILY_MIN" - C
"TEMP_MAX" OR "TEMP_DAILY_MAX" - C
#"TEMP_MONTH_MAX" - C
#"TEMP_MONTH_MIN" - C
#"TEMP_MONTH_AVE" - C
#"TEMP_AVE_UNC" - C
#"TEMP_MAX_UNC" - C
#"TEMP_MIN_UNC" - C
#"AIR_DENS" - kg/m3
#"AIR_PRES" - kPa
"REL_HUMIDITY" - [0..1]

"ET_RADIA" - MJ/m2/d
"SHORTWAVE" OR "SW_RADIA" - MJ/m2/d
#"SW_RADIA_NET" - MJ/m2/d
#"LW_RADIA_NET" - MJ/m2/d
"LW_INCOMING" - MJ/m2/d
#"CLOUD_COVER" - [0..1]

"WIND_VEL" - m/s
"PET" - mm/d
"OW_PET" - mm/d
#"PET_MONTH_AVE" - mm/d
"POTENTIAL_MELT" - mm/d
#"SUBDAILY_CORR" - [-]

ADDITIONAL NOTES

OUTSTANDING TASKS

PATCH NOTES

Function now supports writing generic met data with 1 or more parameters - Fixes #63

.rvt writing mechanics now decoupled from rvn_rvt_write:

Added two mapping lists in rvn_utilities:

Function now ignores extra columns of data for unsupported met data types (e.g., QC flags)

Constrained unique identifier for multiple weather stations to only "station_name" (previously included "station_id", which may not exist for non-EC datasets)

Minor adjustments to improve display and specifics of error messages: