-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly calculate relative humidity
See DrylandEcology/SOILWAT2#435 1) Updates to rSW2_set_weather_hist() are reflecting the changes in SOILWAT2's read_weather_hist() * rSW2_set_weather_hist() now uses relativeHumidity1() to calculate relative humidity from vapor pressure -- fixing first part of SOILWAT2 bug #435 * rSW2_set_weather_hist() gained argument "elevation" and now uses relativeHumidity2() to calculate relative humidity from specific humidity inputs and elevation -- fixing second part of bug #435 ** the conversion from specific to relative humidity is not exact, the code snaps estimated values within 100-150% to 100% relative humidity (with a warning) Consequently, * rSW2_setAllWeather() gained argument "elevation" which is passed to rSW2_set_weather_hist() * onSet_WTH_DATA() calls rSW2_setAllWeather(): thus, functions that call onSet_WTH_DATA() are now required to previously set "elevation". These are ** rSW_CTL_obtain_inputs() calls onSet_WTH_DATA(): now, obtaining weather data occurs after obtaining "site" data that includes elevation ** rSW2_processAllWeather() calls onSet_WTH_DATA(): now, copies "elevation" from inputData argument to global object that is utilized by onSet_WTH_DATA() *** dbW_generateWeather() calls rSW2_processAllWeather(): gained argument "elevation" **** dbW_imputeWeather() calls dbW_generateWeather(): gained argument "elevation" * rSW2_calc_SiteClimate() calls rSW2_setAllWeather(): gained argument "elevation" ** calc_SiteClimate() calls rSW2_calc_SiteClimate(): gained argument "elevation" 2) SOILWAT2's SW_WTH_read() now passes elevation as argument to readAllWeather(): thus, functions that call SW_WTH_read() are now required to previously set "elevation". These are * rSW2_readAllWeatherFromDisk() calls SW_WTH_read(): gained argument "elevation" ** getWeatherData_folders() calls rSW2_readAllWeatherFromDisk(): gained argument "elevation" *** dbW_addWeatherData() calls getWeatherData_folders(): gained argument "elevation" **** dbW_addFromFolders() calls dbW_addWeatherData(): argument "MetaData" gained new column "elevation" 3) Update "extdata/example1" from SOILWAT2, i.e., "data_weather_maca" was renamed to "data_weather_maca-type1", "data_weather_maca-type2" is a new dataset * update tests "Weather data sources" to handle new and renamed weather data sources
- Loading branch information
Showing
21 changed files
with
921 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.