Giter Site home page Giter Site logo

ropensci / getcrucldata Goto Github PK

View Code? Open in Web Editor NEW
17.0 5.0 4.0 17.23 MB

CRU CL v. 2.0 Climatology Client for R

Home Page: https://docs.ropensci.org/getCRUCLdata

License: Other

R 98.03% TeX 1.97%
cru climate-data cru-cl2 temperature rainfall elevation r data-access wind relative-humidity solar-radiation diurnal-temperature frost rstats r-package peer-reviewed

getcrucldata's Introduction

getCRUCLdata: Use and Explore CRU CL v. 2.0 Climatology Elements in R

Codecov test coverage Project Status: Active – The project has reached a stable, usable state and is being actively developed. DOI CRAN_Status_Badge JOSS status R-CMD-check

Author/Maintainer: Adam Sparks

Introduction to {getCRUCLdata}

The {getCRUCLdata} package provides functions that automate importing CRU CL v. 2.0 climatology data into R, facilitate the calculation of minimum temperature and maximum temperature, and formats the data into a data frame or a [base::list()] of [terra::rast()] objects for use.

CRU CL v. 2.0 data are a gridded climatology of 1961-1990 monthly means released in 2002 and cover all land areas (excluding Antarctica) at 10 arc minutes (0.1666667 degree) resolution. For more information see the description of the data provided by the University of East Anglia Climate Research Unit (CRU), https://crudata.uea.ac.uk/cru/data/hrg/tmc/readme.txt.

Changes to original CRU CL v. 2.0 data

This package automatically converts elevation values from kilometres to metres.

This package crops all spatial outputs to an extent of ymin = -60, ymax = 85, xmin = -180, xmax = 180. Note that the original wind data include land area for parts of Antarctica.

Quick Start

Install

{getCRUCLdata} is not available from CRAN. You can install it from GitHub as follows.

if (!require("remotes")) {
  install.packages("remotes")
}

install_github("ropensci/getCRUCLdata", build_vignettes = TRUE)

Or you can install it from the rOpenSci Universe.

# Enable the rOpenSci universe
options(repos = c(
    rOpenSci = "https://ropensci.r-universe.dev",
    CRAN = "https://cloud.r-project.org""))
# Install the package
install.packages("getCRUCLdata")

Documentation

For complete documentation see the package website: https://docs.ropensci.org/getCRUCLdata/.

Meta

CRU CL v. 2.0 reference and abstract

Mark New (1,*), David Lister (2), Mike Hulme (3), Ian Makin (4)

A high-resolution data set of surface climate over global land areas Climate Research, 2000, Vol 21, pg 1-25

  1. School of Geography and the Environment, University of Oxford, Mansfield Road, Oxford OX1 3TB, United Kingdom
  2. Climatic Research Unit, and (3) Tyndall Centre for Climate Change Research, both at School of Environmental Sciences, University of East Anglia, Norwich NR4 7TJ, United Kingdom
  3. International Water Management Institute, PO Box 2075, Colombo, Sri Lanka

ABSTRACT: We describe the construction of a 10-minute latitude/longitude data set of mean monthly surface climate over global land areas, excluding Antarctica. The climatology includes 8 climate elements - precipitation, wet-day frequency, temperature, diurnal temperature range, relative humidity,sunshine duration, ground frost frequency and windspeed - and was interpolated from a data set of station means for the period centred on 1961 to 1990. Precipitation was first defined in terms of the parameters of the Gamma distribution, enabling the calculation of monthly precipitation at any given return period. The data are compared to an earlier data set at 0.5 degrees latitude/longitude resolution and show added value over most regions. The data will have many applications in applied climatology, biogeochemical modelling, hydrology and agricultural meteorology and are available through the School of Geography Oxford (http://www.geog.ox.ac.uk), the International Water Management Institute “World Water and Climate Atlas” (https://www.iwmi.cgiar.org/) and the Climatic Research Unit (https://www.uea.ac.uk/groups-and-centres/climatic-research-unit).

Contributors

Other

  • Please report any issues or bugs.

  • License: MIT

  • Get citation information for getCRUCLdata in R typing citation(package = "getCRUCLdata")

  • Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

getcrucldata's People

Contributors

adamhsparks avatar jeroen avatar karthik avatar sckott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

getcrucldata's Issues

travis badge just links to travis-ci.org

screen shot 2018-04-12 at 11 08 36 am

the badge on the far left for travis just links to travis

can it link to the travis page instead?

[![Build Status](https://travis-ci.org/ropensci/getCRUCLdata.svg?branch=master)](https://travis-ci.org/ropensci/getCRUCLdata)

R session crash get_CRU_stack

Hello again,

I am currently trying to run the get_CRU_stack() function, however, my entire R session keeps crashing. Thus, this is a bit hard to debug for me, but it seems like the following line in .create_stack() causes the crash

cells <- raster::cellFromXY(wrld, wvar[, c(2, 1)])

I am not sure why this is happening, because outside the function call everything runs (i.e., if I create wrld and wvar "by hand"). Attached is my R session info.

Thank you so much for your work and help on this package.

sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.2.1 (2022-06-23)
#>  os       macOS Big Sur ... 10.16
#>  system   x86_64, darwin17.0
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/Detroit
#>  date     2022-08-15
#>  pandoc   2.19 @ /usr/local/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  cli           3.3.0   2022-04-25 [1] CRAN (R 4.1.3)
#>  digest        0.6.29  2021-12-01 [1] CRAN (R 4.1.0)
#>  evaluate      0.16    2022-08-09 [1] CRAN (R 4.2.0)
#>  fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.1.0)
#>  fs            1.5.2   2021-12-08 [1] CRAN (R 4.1.0)
#>  glue          1.6.2   2022-02-24 [1] CRAN (R 4.1.2)
#>  highr         0.9     2021-04-16 [1] CRAN (R 4.1.0)
#>  htmltools     0.5.3   2022-07-18 [1] CRAN (R 4.2.0)
#>  knitr         1.39    2022-04-26 [1] CRAN (R 4.1.3)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.1.2)
#>  reprex        2.0.1   2021-08-05 [1] CRAN (R 4.1.0)
#>  rlang         1.0.4   2022-07-12 [1] CRAN (R 4.2.0)
#>  rmarkdown     2.14    2022-04-25 [1] CRAN (R 4.1.3)
#>  rstudioapi    0.13    2020-11-12 [1] CRAN (R 4.1.0)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.1.0)
#>  stringi       1.7.8   2022-07-11 [1] CRAN (R 4.2.0)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.1.0)
#>  withr         2.5.0   2022-03-03 [1] CRAN (R 4.1.2)
#>  xfun          0.32    2022-08-10 [1] CRAN (R 4.2.1)
#>  yaml          2.3.5   2022-02-21 [1] CRAN (R 4.1.2)
#> 
#>  [1] /Users/mhessel/R-libraries
#>  [2] /Library/Frameworks/R.framework/Versions/4.2/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

Created on 2022-08-15 by the reprex package (v2.0.1)

"Error in full_join_impl" Warning Running under: Ubuntu 15.10

Hi @adamhsparks
Good to see you have this package. I tested on R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

and get this warning

> devtools::install_github("adamhsparks/getCRUCLdata", build_vignettes = TRUE)
> library(getCRUCLdata)
> CRU_data <- create_CRU_df(pre = TRUE,
+                           pre_cv = TRUE,
+                           rd0 = TRUE,
+                           tmp = TRUE,
+                           dtr = TRUE,
+                           reh = TRUE,
+                           tmn = TRUE,
+                           tmx = TRUE,
+                           sunp = TRUE,
+                           frs = TRUE,
+                           wnd = TRUE,
+                           elv = TRUE)
 
Downloading requested data files.
 
  |==================================================================================================================================| 100%
Error in full_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) : 
  'month' column not found in lhs, cannot join
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C               LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8     LC_MONETARY=en_AU.UTF-8   
 [6] LC_MESSAGES=en_AU.UTF-8    LC_PAPER=en_AU.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] getCRUCLdata_0.1.3

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.9     tidyr_0.6.1     digest_0.6.12   dplyr_0.5.0     withr_1.0.2     assertthat_0.1  plyr_1.8.4      R6_2.2.0       
 [9] DBI_0.5-1       git2r_0.18.0    magrittr_1.5    httr_1.2.1      lazyeval_0.2.0  curl_2.3        devtools_1.12.0 tools_3.3.1    
[17] purrr_0.2.2     memoise_1.0.0   knitr_1.15.1    tibble_1.2  

how to run the get_CRU_df

Hi, could you tell me how to get_CRU_df? I tried to use the code, but it seemed not to work.Thank you

gth)

  •                    frs = TRUE,    # ground-frost records (number of days with ground-frost per month)
    
  •                    wnd = TRUE,    # 10m wind speed (m/s)
    
  •                    elv = TRUE)    # elevation (and convert to m from km)
    

Error in get_CRU_df(pre = TRUE, pre_cv = TRUE, rd0 = TRUE, tmp = TRUE, :
could not find function "get_CRU_df"

Removed from CRAN

Hey,

It seems like the package was recently remove from CRAN. Are there any plans to fix the errors and resubmit the package?

Thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.