Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_epw() should respect validate_level option #520

Closed
hongyuanjia opened this issue May 1, 2022 · 0 comments · Fixed by #521
Closed

read_epw() should respect validate_level option #520

hongyuanjia opened this issue May 1, 2022 · 0 comments · Fixed by #521
Assignees

Comments

@hongyuanjia
Copy link
Owner

hongyuanjia commented May 1, 2022

library(eplusr)
download_weather("CHN_XJ_Kashi.517090_CSWD", ask = FALSE)
#> One matched results found. Start downloading:
#> ── CHN_XJ_Kashi.517090_CSWD ────────────────────────────────────────────────────
#>  * Country: China
#>  * State or Province: Xinjiang
#>  * Location: Kashi
#>  * WMO number: 517090
#>  * Source type: CSWD
#>  * Longitude: 75.98333
#>  * Latitude: 39.46667
#>  * Provider: Climate.OneBuilding.Org
#> [1] "C:\\Users\\hongy\\AppData\\Local\\Temp\\RtmpMBZ7qp\\reprex-c842e8c7b3c-full-husky\\CHN_XJ_Kashi.517090_CSWD.zip"
unzip("CHN_XJ_Kashi.517090_CSWD.zip")

eplusr_option(validate_level = "none")
#> $validate_level
#> [1] "none"

read_epw("CHN_XJ_Kashi.517090_CSWD.epw")
#> Error:  ✖ [4] Errors found during validation.
#> ══════════════════════════════════════════════════════════════════════════════
#> 
#> ── [2] Invalid Number ────────────────────────────────────────────────────────
#>    Fields below should be numbers but are not:
#> 
#>     Header: <DESIGN CONDITIONS>
#>     └─ Object [ID:2]
#>        ├─ 21: Cooling,       !- Condition 1 Hottest Month
#>        └─ 54: Extremes;      !- Condition 1 1.0% Extreme Wind Speed {m/s}
#>        
#> 
#> ── [2] Invalid Choice ────────────────────────────────────────────────────────
#>    Fields below are not one of prescribed choices:
#> 
#>     Header: <DESIGN CONDITIONS>
#>     └─ Object [ID:2]
#>        ├─ 20: "0.469",       !- Condition 1 Cooling Design Condition Type
#>        └─ 53: "25.8";        !- Condition 1 Extreme Design Condition Type
#> 

Created on 2022-05-01 by the reprex package (v2.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant