get.grid.warm: Get gridded warm-rain properties (2x2 degree lat-lon grid)

Description Usage Examples

View source: R/get.R

Description

Get gridded warm-rain properties (2x2 degree lat-lon grid)

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
col.frac <- rev(RColorBrewer::brewer.pal(9, "RdYlBu"))[c(1:5,7,9)]
phase.breaks <- c(0, 0.05, 0.1, 0.2 * 1:5)
get.grid.warm() %>%
    mutate(sum = ice + liq + mixed) %>%
    gather(phase, frac, c(ice:mixed, sum)) %>%
    discretize(frac, phase.breaks, TRUE) %>%
    ## mutate(frac = cut(frac, phase.breaks)) %>%
    ggplot(aes(x = lon, y = lat, fill = frac)) +
    geom_raster() +
    scale_fill_manual(values = col.frac, drop = FALSE) +
    ## scale_fill_distiller(palette = "Spectral") +
    facet_grid(phase ~ denom) +
    scale_x_geo(facet = TRUE) +
    scale_y_geo() +
    geom_world_polygon() +
    theme_bw(24) + theme(legend.key.size = unit(2, "lines"))

jmuelmen/sciadv.aaz6433 documentation built on March 29, 2020, 12:58 a.m.