{"id":16277157,"url":"https://github.com/eliocamp/rcmip6","last_synced_at":"2025-03-20T01:32:58.339Z","repository":{"id":53882683,"uuid":"434620843","full_name":"eliocamp/rcmip6","owner":"eliocamp","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-06T01:22:34.000Z","size":139,"stargazers_count":22,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-28T22:13:19.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliocamp.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-03T14:16:12.000Z","updated_at":"2025-02-06T01:22:38.000Z","dependencies_parsed_at":"2024-01-23T19:28:57.171Z","dependency_job_id":"0daec321-a24a-4f4b-9561-9cad850692c1","html_url":"https://github.com/eliocamp/rcmip6","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":"0.032786885245901676","last_synced_commit":"c04bbcec81177899d3cc90df5949c0984d05912e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frcmip6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frcmip6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frcmip6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frcmip6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliocamp","download_url":"https://codeload.github.com/eliocamp/rcmip6/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244039099,"owners_count":20387832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T18:52:55.222Z","updated_at":"2025-03-20T01:32:58.061Z","avatar_url":"https://github.com/eliocamp.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# rcmip6\n\n\u003c!-- badges: start --\u003e\n[![Codecov test coverage](https://codecov.io/gh/eliocamp/rcmip6/branch/main/graph/badge.svg)](https://app.codecov.io/gh/eliocamp/rcmip6?branch=main)\n[![R-CMD-check](https://github.com/eliocamp/rcmip6/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/eliocamp/rcmip6/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThe goal of rcmip6 is to search and download data from the CMIP6 project. \n\n## Installation\n\nYou can install the development version of rcmip6 like so:\n\n``` r\nremotes::install_github(\"eliocamp/rcmip6\")\n```\n\n## Example\n\nSearch models, variables, etc... using `cmip_search()`\n\n```{r example}\nlibrary(rcmip6)\n\nquery \u003c- list(\n  type               = \"Dataset\",\n  replica            = \"false\",\n  latest             = \"true\",\n  variable_id        = \"tas\",\n  project            = \"CMIP6\",\n  frequency          = \"mon\",                          \n  table_id           = \"Amon\",\n  experiment_id      = \"historical\",\n  source_id          = \"CanESM5\"\n)\n\nresults \u003c- cmip_search(query)\ncmip_info(results)\n```\n\nSumary of results:\n\n```{r}\nresults |\u003e \n  cmip_simplify() |\u003e   # To keep only the most informative columns\n  subset(, select = -full_info) |\u003e \n  head(10) |\u003e \n  knitr::kable()\n```\n\nThe, download the data.\nJust as a demonstration, download only the first result\n\n```{r include=FALSE}\nsink \u003c- unlink(\"readme_example\", recursive = TRUE)\n```\n\n```{r}\ncmip_root_set(\"readme_example\")   # Set the root folder where to save files \ndir.create(cmip_root_get())\nfiles \u003c- cmip_download(results[1])\n```\n\nThe files are saved mirroring the source file structure to ensure that each file is unique. \n\n```{r}\nfs::dir_tree(cmip_root_get())\n```\n\nThis structure can be parsed with `cmip_available()`\n\n```{r}\ncmip_available()\n```\n\nWe can obtain the urls that *would* be downloaded.  \n\nNote that these are the *file server* URLs, in at lease some cases we can substitute \"/fileServer/\" with \"/dodsC/\" for the OpenDAP server URLs, which will work remotely with the NetCDF API. \n\n```{r urls}\nurls \u003c- cmip_urls(results)\nurls[[1]]\nbasename(unlist(urls[1:3]))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Frcmip6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliocamp%2Frcmip6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Frcmip6/lists"}