Skip to content

Instantly share code, notes, and snippets.

@robwschlegel
Created July 17, 2017 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwschlegel/5e58b8237e22dc09576e95afa3c9188e to your computer and use it in GitHub Desktop.
Save robwschlegel/5e58b8237e22dc09576e95afa3c9188e to your computer and use it in GitHub Desktop.
# Devide the reanalysis data
sea_temp <- filter(all_jan1_0.5, variable == "BRAN/temp")
air_temp <- filter(all_jan1_0.5, variable == "ERA/temp")
currents <- filter(all_jan1_0.5, variable == "BRAN/u" | variable == "BRAN/v") %>%
select(-date, -index) %>%
spread(key = variable, value = value) %>%
rename(u = "BRAN/u", v = "BRAN/v")
winds <- filter(all_jan1_0.5, variable == "ERA/u" | variable == "ERA/v") %>%
select(-date, -index) %>%
spread(key = variable, value = value) %>%
rename(u = "ERA/u", v = "ERA/v")
# Reduce wind/ current vectors
lon_sub <- seq(10, 40, by = 1)
lat_sub <- seq(-40, -15, by = 1)
# currents <- currents[(currents$lon %in% lon_sub & currents$lat %in% lat_sub),]
winds <- winds[(winds$lon %in% lon_sub & winds$lat %in% lat_sub),]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment