mikejohnson51 / climateR

An R 📦 for getting point and gridded climate data by AOI
https://mikejohnson51.github.io/climateR/
MIT License
165 stars 40 forks source link

ClimateR freezes #96

Open Rapsodia86 opened 3 months ago

Rapsodia86 commented 3 months ago

Hi @mikejohnson51, I wanted to answer #94 but looks like I am not able to get the data downloaded. It just runs and never finishes. I tried on #93 and #94 examples, but no success.

system.time({
  cdat = terra::ext(c(-98.90219, -65.21105, 28.12502, 50.43962)) |>
    vect(crs = '+proj=longlat +ellps=WGS84 +no_defs') |>
    getTerraClimNormals(
      varname = "tmin",
      scenario = "19812010",
      month = 5:9)
})

Here is the session info:

sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] terra_1.7-74   climateR_0.3.4

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.12         pillar_1.9.0        compiler_4.2.2     
 [4] viridis_0.6.5       tools_4.2.2         digest_0.6.35      
 [7] bit_4.0.5           lifecycle_1.0.4     tibble_3.2.1       
[10] gtable_0.3.4        viridisLite_0.4.2   RNetCDF_2.9-1      
[13] pkgconfig_2.0.3     rlang_1.1.3         cli_3.6.2          
[16] rstudioapi_0.15.0   parallel_4.2.2      ncmeta_0.3.6       
[19] gridExtra_2.3       dplyr_1.1.4         globals_0.16.3     
[22] generics_0.1.3      vctrs_0.6.5         hms_1.1.3          
[25] bit64_4.0.5         grid_4.2.2          tidyselect_1.2.1   
[28] glue_1.7.0          listenv_0.9.1       R6_2.5.1           
[31] gifski_1.12.0-2     parallelly_1.37.1   future.apply_1.11.1
[34] fansi_1.0.6         ggplot2_3.4.4       readr_2.1.5        
[37] tzdb_0.4.0          purrr_1.0.2         magrittr_2.0.3     
[40] scales_1.3.0        codetools_0.2-18    assertthat_0.2.1   
[43] future_1.33.1       colorspace_2.1-0    arrow_15.0.1       
[46] utf8_1.2.4          munsell_0.5.0  

Maybe I need some updates? Thanks!

Originally posted by @Rapsodia86 in https://github.com/mikejohnson51/climateR/issues/94#issuecomment-2004584463

acrunyon commented 3 days ago

I'm having this same problem. getMACA() worked yesterday, but when I try it today, even just downloading one day for one point, it hangs. I also updated both ClimateR and AOI (and associated packages), but issue persists. Could it be a problem with the MACA THREDDS server?

    future1 = getMACA(AOI, 
                      model = gcms[1], varname = vars[1], scenario  = "rcp45",
                      startDate = "2023-01-01", endDate = "2023-01-02")
acrunyon commented 3 days ago

I'm having this same problem. getMACA() worked yesterday, but when I try it today, even just downloading one day for one point, it hangs. I also updated both ClimateR and AOI (and associated packages), but issue persists. Could it be a problem with the MACA THREDDS server?

    future1 = getMACA(AOI, 
                      model = gcms[1], varname = vars[1], scenario  = "rcp45",
                      startDate = "2023-01-01", endDate = "2023-01-02")

Update:: I believe the freezing is due to a firewall or security setting on my government computer because the function works fine on a personal comp. Not surprise that a bulk download would be blocked...