Skip to content

Commit

Permalink
nothing much
Browse files Browse the repository at this point in the history
  • Loading branch information
stineb committed May 4, 2024
1 parent 237af6d commit 2318366
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions analysis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cwd_global: Apply CWD algorithm to global files

## Workflow

1. `make_tidy_cmip6.R`: Make original global files tidy
17 changes: 14 additions & 3 deletions analysis/make_tidy_cmip6.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ library(dplyr)
library(ggplot2)

# list demo file path
path <- "/data/scratch/CMIP6ng/cmip6-ng/pr/day/native/"
path_cmip6 <- "~/data/cmip6-ng/"

## Precipitation ---------------
files <- list.files(path, pattern = "pr_day", full.names = TRUE)
## Evapotranspiration
varnam <- "evspsbl"
res <- "mon"
files <- list.files(
paste0(path_cmip6, varnam, "/", res, "/native/"),
pattern = ".nc",
full.names = TRUE
)

# load and convert
df <- map2tidy(
Expand All @@ -21,4 +27,9 @@ df <- map2tidy(
fileprefix = "pr_day_CESM2_historical_r1i1p1f1_native"
)

## Precipitation ---------------
files <- list.files(path, pattern = "pr_day", full.names = TRUE)




0 comments on commit 2318366

Please sign in to comment.