diff --git a/2024_cold_pool_index.Rmd b/2024_cold_pool_index.Rmd index 5f0e56b..5eaf5c0 100644 --- a/2024_cold_pool_index.Rmd +++ b/2024_cold_pool_index.Rmd @@ -891,7 +891,7 @@ dev.off() ``` ```{r maps_by_year, message=FALSE, warning=FALSE, include=FALSE} -year_vec <- c(1982:2019, 2021:2023) +year_vec <- c(1982:2019, 2021:2024) nbs_years <- c(2010, 2017, 2019, 2021:2023) @@ -1043,42 +1043,14 @@ for(ii in 1:length(year_vec)) { } ``` -Contributed by Sean Rohan^1^ and Lewis Barnett^1^ -^1^ Resource Assessment and Conservation Engineering Division, Alaska Fisheries Science Center, National Marine Fisheries Service, NOAA -**Contact**: sean.rohan@noaa.gov -**Last updated**: September 2023 +```{r cpa_table message=FALSE, warning=FALSE, echo=FALSE} +coldpool::cold_pool_index |> + dplyr::select(YEAR, EBS_AREA_LTE2_KM2 = AREA_LTE2_KM2) |> + dplyr::full_join(coldpool::nbs_mean_temperature |> + dplyr::select(YEAR, NBS_AREA_LTE2_KM2 = AREA_LTE2_KM2)) |> + write.csv(file = here::here("plots", "cpa_table.csv"), row.names = FALSE) +``` ```{r fig.height=3,fig.width=6,fig.cap="\\label{fig:figs}Figure 1. Area of the cold pool in the eastern Bering Sea (EBS) shelf bottom trawl survey area, as measured using observations from the EBS bottom trawl survey (including northwest strata 82 and 90) from 1982–2022. Dashed line denotes the grand mean of the time series and dotted lines show ±1 standard deviation.", message=FALSE, warning=FALSE, echo=FALSE} print(plot_cpi_timeseries) ``` - -Summer SST and Bottom Temperatures -Contributed by Sean Rohan, sean.rohan@noaa.gov, and Lewis Barnett, lewis.barnett@noaa.gov -Mean surface and bottom temperatures are calculated from spatially interpolated data collected during AFSC summer bottom trawl surveys of the EBS shelf (1982-2023, except 2020) and NBS (2010, 2017–2019, 2021–2023). Temperature data are not adjusted for effects of seasonal heating. Temperature data are interpolated using ordinary kriging with Stein's parameterization of the Matern semivariogram model (Rohan et al., 2022). Code, figures, and data products presented in this contribution are provided in the coldpool R package [https://github.com/afsc-gap-products/coldpool](https://github.com/afsc-gap-products/coldpool). - -In the EBS, the mean surface temperature (6.34°C) was near the time series average (6.75°C) and 1.12°C colder than in 2022. The 2023 mean bottom temperature in the EBS (2.28°C) was near the time series mean of 2.49°C and 0.28°C colder than the mean bottom temperature in 2022 (Figure 24). The near-average bottom temperatures in 2022 and 2023 are a departure from extremely warm conditions in 2016-2021 that had four of the five warmest years in the times series. In the NBS, the mean surface temperature (8.05oC) was slightly below the time series average (9.18oC) and the mean bottom temperature (3.92oC) was near the time series average (3.94oC). However, the time series for the NBS is extremely short compared to the EBS. - -In 2023, bottom temperatures $\leq$ -1°C were observed south of St. Matthew Island for the first time since 2015 (Figure 25). The average bottom temperature in the inner domain of the EBS survey area (2.17°C) was the coldest observed since 2013 (1.64°C). The coldest bottom temperatures ($\leq$ -1°C) within the combined EBS shelf and NBS survey areas were in the middle shelf (between 50 and 100 m isobaths), extending from south of St. Matthew Island at ~61.5°N to the U.S.-Russia maritime boundary. This area of cold water was considerably larger than in 2019 and 2021, when bottom temperatures $\leq$ 0°C were confined to a small area along the U.S.-Russia Convention Line. - -The warmest bottom temperatures were along the coast of the Alaska mainland between Nunivak Island and Norton Sound. However, the area north of Nunivak Island at 60.5°N is sampled at the end of the survey and reflects seasonal warming since sampling occurs 35-45 days later than in the area directly south. - - -Cold Pool Extent - AFSC Bottom Trawl Survey -Contributed by Sean Rohan, sean.rohan@noaa gov, and Lewis Barnett, lewis.barnett@noaa gov -The cold pool extent is calculated from spatially interpolated bottom temperature data collected during AFSC summer bottom trawl surveys of the EBS shelf (1982-2023, except 2020). See 'Summer SST and Bottom Temperatures' contribution above for more details. - -The spatial footprint of the cold pool in 2023 was similar to the most recent near-average years in 2011, 2017, and 2022 (Figure 33). North of ∼57.5°N, the cold pool covered nearly the entire middle domain of the survey area between the 50m and 100m isobaths. The extents of the $\leq$ -1°C (26,550 km^2^) and $\leq$ 0°C (62,400 km^2^) isotherms were larger than they have been since the 2015 survey. The extent of the $\leq$ 1°C isotherm (110,875 km^2^) was the largest it’s been since 2013. The extents of the $\leq$ -1°C, $\leq$ 0°C, and $\leq$ 1°C isotherms were all larger than their time series averages of 23,579 km^2^, 54,158 km^2^, and 102,906 km^2^, respectively. - - -```{r fig.cap="\\label{fig:figs}Figure 2. Cold pool extent in the eastern Bering Sea (EBS), as measured using observations from the EBS bottom trawl survey. Upper panels: Maps of cold pool extent in the EBS shelf survey area from 2002–2021. Lower panel: Extent of the cold pool in proportion to the total EBS shelf survey area from 1982–2022. Fill colors denote bottom temperatures $\\leq$ 2°C, $\\leq$ 1°C, $\\leq$ 0°C, and $\\leq$ -1°C.", fig.height=8, fig.width=6, message=FALSE, warning=FALSE, echo=FALSE} -print(coldpool_with_area) -``` - - -```{r fig.height=3,fig.width=6,fig.cap="\\label{fig:figs}Figure 3. Average summer surface (green triangles) and bottom (blue circles) temperatures (°C) on the eastern Bering Sea (EBS) shelf based on data collected during standardized summer bottom trawl surveys from 1982–2022. Dashed lines represent the time series mean.", message=FALSE, warning=FALSE, echo=FALSE} -print(plot_sebs_average_temperature) -``` - -```{r fig.height=6,fig.width=6,fig.cap="\\label{fig:figs}Figure 4. Contour maps of bottom temperatures from the 2018, 2019, 2021, and 2022 eastern Bering Sea shelf and northern Bering Sea bottom trawl surveys.", message=FALSE, warning=FALSE, echo=FALSE} -print(ebs_nbs_bt_map_grid) -``` diff --git a/analysis/Compare_interpolation_methods.Rmd b/analysis/Compare_interpolation_methods.Rmd new file mode 100644 index 0000000..8a2f4e5 --- /dev/null +++ b/analysis/Compare_interpolation_methods.Rmd @@ -0,0 +1,502 @@ +--- +title: "Estimating mean temperatures and cold pool are from AFSC bottom trawl surveys of the eastern Bering Sea" +author: "Sean Rohan, Lewis Barnett, and Nicole Charriere" +date: "3/4/2022" +output: html_document +--- + +# Get data + +Get temperature data from racebase and survey tables. + +```{r setup, warning=FALSE, message=FALSE, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +library(coldpool) +library(cowplot) + +# Setup directories +if(!dir.exists(here::here("data"))) { + dir.create(here::here("data")) +} + +# Plotting ---- +fig_res <- 300 + +# CRS +proj_crs <- coldpool:::ebs_proj_crs + +# Retrieve area-weighted surface and bottom temperatures +channel <- coldpool:::get_connected(schema = "AFSC") + +# PlusNW strata +area_weighted_plusnw_df <- RODBC::sqlQuery(channel = channel, + query = "select * from HAEHNR.BTTEMP_EBS_PLUSNW_LT200M") |> + saveRDS(file = here::here("data", "ebs_bttemp_plus_nw_lt200m.rds")) + +# Standard strata +area_weighted_standard_df <- RODBC::sqlQuery(channel = channel, + query = "select * from HAEHNR.EBS_BTTEMP_LT200M_STANDARD") |> + saveRDS(file = here::here("data", "ebs_bttemp_standard_lt200m.rds")) + +# Get temperature data +# Writes: +# -- /data/ebs_nbs_temperature_full_area.csv +# -- /data/index_hauls_temperature_data.csv +coldpool::get_data(channel = channel) +``` + +# Conduct cross-validation on gear temperature + +Perform leave-one-out cross validation (LOOCV) on gear temperature (i.e., bottom temperature) and write results to csv files. + +```{r loocv, warning=FALSE, message=FALSE, results='hide'} +# Leave one out cross-validation to compare interpolation methods ---- +# Writes: +# -- /plots/RSPE_violin_GEAR_TEMPERATURE_[n].png: Plots of root square prediction error for interpolation methods. +# -- /output/[date]_rmse_loocv_GEAR_TEMPERATURE_[year].csv: Results of leave-one-out cross validation. +coldpool::loocv_gear_temp(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), # update file name to specify data file + proj_crs = proj_crs, + interp_variable = "surface_temperature") + +coldpool::loocv_gear_temp(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), # update file name to specify data file + proj_crs = proj_crs, + interp_variable = "gear_temperature") + +# Generate rasters using interpolation methods ---- +# Writes: +# -- /output/raster/[method]_[year]_gear_temperature.tiff: GeoTIFF raster files for each interpolation method and year +interpolation_wrapper(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), + proj_crs = coldpool:::ebs_proj_crs, + cell_resolution = 5000, # In meters + select_years = 1982:2021, + interp_variable = "gear_temperature", + select_region = "sebs") + +interpolation_wrapper(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), + proj_crs = coldpool:::ebs_proj_crs, + cell_resolution = 5000, # In meters + select_years = 1982:2021, + interp_variable = "surface_temperature", + select_region = "sebs") + +interpolation_wrapper(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), + proj_crs = coldpool:::ebs_proj_crs, + cell_resolution = 5000, # In meters + select_years = 1982:2021, + interp_variable = "gear_temperature", + select_region = "ebs") + +interpolation_wrapper(temp_data_path = here::here("data", "index_hauls_temperature_data.csv"), + proj_crs = coldpool:::ebs_proj_crs, + cell_resolution = 5000, # In meters + select_years = 1982:2021, + interp_variable = "surface_temperature", + select_region = "ebs") +``` + +# Compare interpolation methods + +Create plots and table output showing results of LOOCV. + +```{r make_summaries} +# Estimates of mean bottom temperature, surface temperature, and temperature by area (incl. cold pool area). By year and interpolation method. +coldpool:::make_var_by_method(method_prefix = c("ste_", "tps_", "mat_", "sph_", "cir_", "gau_", "bes_", "idw_", "exp_", "idwnmax4_", "nn_"), + temp_dir = here::here("output", "raster", "sebs"), + region = "sebs") + +coldpool:::make_var_by_method(method_prefix = c("ste_", "tps_", "mat_", "sph_", "cir_", "gau_", "bes_", "idw_", "exp_", "idwnmax4_", "nn_"), + temp_dir = here::here("output", "raster", "ebs"), + region = "ebs") + +# Make summary tables +coldpool:::make_loocv_summary(sel_paths = list.files("./output/loocv", full.names = TRUE), + interp_variable = "surface_temperature") +coldpool:::make_loocv_summary(sel_paths = list.files("./output/loocv", full.names = TRUE), + interp_variable = "gear_temperature") +``` + +# Generate CPA plots + +```{r compare_cpa} +# Set up method labels for plots +method_labels_df <- data.frame(method = c("BES", + "CIR", + "EXP", + "IDW", + "IDWNMAX4", + "MAT", + "NN", + "SPH", + "STE", + "TPS", + "OLD IDW", + "BT[AW]", + "SST[AW]"), + label = c("OK-BES", + "OK-CIR", + "OK-EXP", + "IDW", + "IDW (Max 4)", + "OK-MAT", + "NN", + "OK-SPH", + "OK-STE", + "TPS", + "Historical", + "AW", + "AW")) + +# Set up colors for plots +color_vec <- c("OK-BES" = "#4E79A7", + "OK-CIR" = "#A0CBE8", + "OK-EXP" = "#F28E2B", + "IDW" = "#B6992D", + "IDW (Max 4)" = "#F1CE63", + "OK-MAT" = "#8CD17D", + "NN" = "#499894", + "OK-SPH" = "#FFBE7D", + "OK-STE" = "#59A14F", + "TPS" = "#E15759", + "Historical" = "black", + "AW" = "black", + "AW" = "black") + +# Load cold pool calculations from Bob Lauth ---- +lauth_cpa_df <- coldpool:::cpa_pre2021 |> + dplyr::select(YEAR, + AREA_SUM_KM2_LTE2) |> + dplyr::rename(year = YEAR, + `Old IDW` = AREA_SUM_KM2_LTE2) + +annual_cpa_df <- read.csv(file = here::here("output", + "sebs_variable_est_by_method.csv"), + stringsAsFactors = FALSE) + +# Select cold pool area calculations for less than or equal to to 2 degrees +annual_cpa_df <- annual_cpa_df[,c(1, which(stringr::str_detect(names(annual_cpa_df), "_area_lte2_km2")))] + +combined_cpa_df <- annual_cpa_df |> + reshape2::melt(id.vars = "year") |> + dplyr::bind_rows(lauth_cpa_df |> + reshape2::melt(id.vars = "year")) |> + dplyr::mutate(method = stringr::str_remove(variable, "_area_lte2_km2") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +cpa_change_df <- annual_cpa_df |> + reshape2::melt(id.vars = "year") |> + dplyr::inner_join(lauth_cpa_df) |> + dplyr::mutate(rel_diff = 100*(value - `Old IDW`)/`Old IDW`, + abs_diff = value - `Old IDW`) |> + dplyr::mutate(method = stringr::str_remove(variable, "_area_lte2_km2") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +plot_cpa_by_year <- ggplot() + + geom_line(data = combined_cpa_df, + aes(x = year, + y = value, + color = label)) + + geom_point(data = combined_cpa_df, + aes(x = year, + y = value, + color = label)) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(combined_cpa_df$label)]) + + scale_y_continuous(name = expression("Cold Pool Area"~(km^2))) + + theme_tm_no_legend() + +plot_cpa_rel_diff <- ggplot(data = cpa_change_df, + aes(x = year, + y = rel_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = "Relative Difference (%)") + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(cpa_change_df$label)]) + + theme_tm_no_legend() + +plot_cpa_abs_diff <- ggplot(data = cpa_change_df, + aes(x = year, + y = abs_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = expression(CPA[method]-CPA[old]~(km^2))) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(cpa_change_df$label)]) + + theme_tm_no_legend() + +png(file = here::here("plots", "cpa_by_year.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_cpa_by_year) +dev.off() + +png(file = here::here("plots", "cpa_by_year_methods_rel_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_cpa_rel_diff) +dev.off() + +png(file = here::here("plots", "cpa_by_year_methods_abs_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_cpa_abs_diff) +dev.off() +``` + +# Compare BT and SST from candidate spatial interpolation methods to stratum-weighted method + +Historically, mean bottom and surface temperatures were calculated using a mean stratum-weighting approach, where temperature data from survey stations were averaged within strata then weighted in proportion to stratum area within the survey domain. However, this approach does not account for the spatial structure of samples within strata and leads to variation in spatial coverage of samples within strata among years due to instances where equipment malfunctions led to spatially autocorrelated gaps in coverage. + +Calculating mean temperature from spatially interpolated rasters of bottom and surface temperatures better accounts for the spatial structure of samples and helps account for temperature at locations where data are missing. + + +```{r load_area_weighted_temp} +compare_temp_df <- readRDS(file = here::here("data", "ebs_bttemp_plus_nw_lt200m.rds")) |> + dplyr::select(YEAR, AVGBSBT, AVGBSST) |> + dplyr::rename(`BT[aw]` = AVGBSBT, + `SST[aw]` = AVGBSST) |> + dplyr::full_join(coldpool:::cold_pool_index) |> + dplyr::select(-AREA_LTE2_KM2, -AREA_LTE1_KM2, -AREA_LTE0_KM2, -AREA_LTEMINUS1_KM2) |> + dplyr::rename(`SST[int]` = MEAN_SURFACE_TEMPERATURE, + `BT[int]` = MEAN_GEAR_TEMPERATURE) +``` + +# Generate BT plots + +```{r compare_bt} +annual_bt_df <- read.csv(file = here::here("output", + "sebs_variable_est_by_method.csv"), + stringsAsFactors = FALSE) + +# Select cold pool area calculations for less than or equal to to 2 degrees +annual_bt_df <- annual_bt_df[,c(1, which(stringr::str_detect(names(annual_bt_df), "_mean_gear_temperature")))] + +combined_bt_df <- annual_bt_df |> + reshape2::melt(id.vars = "year") |> + dplyr::bind_rows(compare_temp_df |> + dplyr::select(YEAR, `BT[aw]`) |> + dplyr::rename(year = YEAR) |> + reshape2::melt(id.vars = "year")) |> + dplyr::mutate(method = stringr::str_remove(variable, "_mean_gear_temperature") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +bt_change_df <- annual_bt_df |> + reshape2::melt(id.vars = "year") |> + dplyr::inner_join(compare_temp_df |> + dplyr::select(YEAR, `BT[aw]`) |> + dplyr::rename(year = YEAR)) |> + dplyr::mutate(rel_diff = 100*(value - `BT[aw]`)/`BT[aw]`, + abs_diff = value - `BT[aw]`) |> + dplyr::mutate(method = stringr::str_remove(variable, "_mean_gear_temperature") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +plot_bt_by_year <- ggplot() + + geom_line(data = combined_bt_df, + aes(x = year, + y = value, + color = label)) + + geom_point(data = combined_bt_df, + aes(x = year, + y = value, + color = label)) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(combined_bt_df$label)]) + + scale_y_continuous(name = expression("Mean bottom temperature"~(degree*C))) + + theme_tm_no_legend() + +plot_bt_rel_diff <- ggplot(data = bt_change_df, + aes(x = year, + y = rel_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = "Relative Difference (%)") + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(bt_change_df$label)]) + + theme_tm_no_legend() + +plot_bt_abs_diff <- ggplot(data = bt_change_df, + aes(x = year, + y = abs_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = expression(BT[method]-BT[AW]~(degree*C))) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(bt_change_df$label)]) + + theme_tm_no_legend() + +png(file = here::here("plots", "bt_by_year.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_bt_by_year) +dev.off() + +png(file = here::here("plots", "bt_by_year_methods_rel_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_bt_rel_diff) +dev.off() + +png(file = here::here("plots", "bt_by_year_methods_abs_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_bt_abs_diff) +dev.off() +``` + +# Generate SST plots + +```{r compare_sst} +annual_sst_df <- read.csv(file = here::here("output", + "sebs_variable_est_by_method.csv"), + stringsAsFactors = FALSE) + +# Select cold pool area calculations for less than or equal to to 2 degrees +annual_sst_df <- annual_sst_df[,c(1, which(stringr::str_detect(names(annual_sst_df), "_mean_surface_temperature")))] + +combined_sst_df <- annual_sst_df |> + reshape2::melt(id.vars = "year") |> + dplyr::bind_rows(compare_temp_df |> + dplyr::select(YEAR, `SST[aw]`) |> + dplyr::rename(year = YEAR) |> + reshape2::melt(id.vars = "year")) |> + dplyr::mutate(method = stringr::str_remove(variable, "_mean_surface_temperature") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +sst_change_df <- annual_sst_df |> + reshape2::melt(id.vars = "year") |> + dplyr::inner_join(compare_temp_df |> + dplyr::select(YEAR, `SST[aw]`) |> + dplyr::rename(year = YEAR)) |> + dplyr::mutate(rel_diff = 100*(value - `SST[aw]`)/`SST[aw]`, + abs_diff = value - `SST[aw]`) |> + dplyr::mutate(method = stringr::str_remove(variable, "_mean_surface_temperature") |> + toupper()) |> + dplyr::inner_join(method_labels_df) + +plot_sst_by_year <- ggplot() + + geom_line(data = combined_sst_df, + aes(x = year, + y = value, + color = label)) + + geom_point(data = combined_sst_df, + aes(x = year, + y = value, + color = label)) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(combined_sst_df$label)]) + + scale_y_continuous(name = expression("Mean surface temperature"~(degree*C))) + + theme_tm_no_legend() + +plot_sst_rel_diff <- ggplot(data = sst_change_df, + aes(x = year, + y = rel_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = "Relative Difference (%)") + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(sst_change_df$label)]) + + theme_tm_no_legend() + +plot_sst_abs_diff <- ggplot(data = sst_change_df, + aes(x = year, + y = abs_diff, + color = label)) + + geom_line() + + geom_point() + + scale_y_continuous(name = expression(SST[method]-SST[AW]~(degree*C))) + + scale_x_continuous(name = "Year", limits = c(1982, 2021)) + + scale_color_manual(name = "Method", + values = color_vec[names(color_vec) %in% unique(sst_change_df$label)]) + + theme_tm_no_legend() + +png(file = here::here("plots", "sst_by_year.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_sst_by_year) +dev.off() + +png(file = here::here("plots", "sst_by_year_methods_rel_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_sst_rel_diff) +dev.off() + +png(file = here::here("plots", "sst_by_year_methods_abs_diff.png"), width = 169, height = 81, units = "mm", res = fig_res) +print(plot_sst_abs_diff) +dev.off() +``` + +# Make multipanel plots + +```{r multipanel_plots} +png(filename = here::here("plots", "bt_methods_multipanel.png"), width = 6, height = 6, units = "in", res = 600) +print( +cowplot::plot_grid(plot_bt_by_year, + plot_bt_abs_diff, + nrow = 2, + ncol = 1, + labels = LETTERS[1:2])) +dev.off() + +png(filename = here::here("plots", "sst_methods_multipanel.png"), width = 6, height = 6, units = "in", res = 600) +print( +cowplot::plot_grid(plot_sst_by_year, + plot_sst_abs_diff, + nrow = 2, + ncol = 1, + labels = LETTERS[1:2])) +dev.off() + +png(filename = here::here("plots", "cpa_methods_multipanel.png"), width = 6, height = 6, units = "in", res = 600) +print( +cowplot::plot_grid(plot_cpa_by_year, + plot_cpa_abs_diff, + nrow = 2, + ncol = 1, + labels = LETTERS[1:2])) +dev.off() +``` + +# Kendall's Tau correlations among methods + +Kendall's Tau correlations among interpolation methods for BT, SST, and CPA. + +```{r kendalls_tau} +# Make Kendall's tau ranking tables +combined_sst_df |> + dplyr::filter(year > 1986) |> + coldpool:::make_rank_table() |> + write.csv(file = here::here("output", "kendall_tau_method_sst.csv"), + row.names = FALSE) + +combined_bt_df |> + dplyr::filter(year > 1986) |> + coldpool:::make_rank_table() |> + write.csv(file = here::here("output", "kendall_tau_method_bt.csv"), + row.names = FALSE) + +combined_cpa_df |> + dplyr::filter(year < 2020) |> + coldpool:::make_rank_table() |> + write.csv(file = here::here("output", "kendall_tau_method_cpa.csv"), + row.names = FALSE) +``` + +# Sampling day of year + +Make a map of sampling day of year, by station. + +```{r} +# Make a map showing the average day of year stations were sampled. +coldpool:::plot_stn_doy() +``` + +# Data product figures for TM + +Data product figures with ESR-style formatting. + +```{r data_product_figs} +coldpool:::make_tm_product_figs(fig_res = 600) +``` diff --git a/analysis/resample_probability/fit_col1516_temp.png b/analysis/resample_probability/fit_col1516_temp.png index 31f330a..c46adc5 100644 Binary files a/analysis/resample_probability/fit_col1516_temp.png and b/analysis/resample_probability/fit_col1516_temp.png differ diff --git a/analysis/resample_probability/fit_cpa.png b/analysis/resample_probability/fit_cpa.png index 93e2ecc..d70dbd1 100644 Binary files a/analysis/resample_probability/fit_cpa.png and b/analysis/resample_probability/fit_cpa.png differ diff --git a/analysis/resample_probability/timeseries_col1516_temp.png b/analysis/resample_probability/timeseries_col1516_temp.png index 387b439..dc23784 100644 Binary files a/analysis/resample_probability/timeseries_col1516_temp.png and b/analysis/resample_probability/timeseries_col1516_temp.png differ diff --git a/analysis/resample_probability/timeseries_cpa.png b/analysis/resample_probability/timeseries_cpa.png index b8992a1..e1faa1e 100644 Binary files a/analysis/resample_probability/timeseries_cpa.png and b/analysis/resample_probability/timeseries_cpa.png differ diff --git a/plots/annual_bt/1982_ebs_bt_map.png b/plots/annual_bt/1982_ebs_bt_map.png index a762586..52558af 100644 Binary files a/plots/annual_bt/1982_ebs_bt_map.png and b/plots/annual_bt/1982_ebs_bt_map.png differ diff --git a/plots/annual_bt/1983_ebs_bt_map.png b/plots/annual_bt/1983_ebs_bt_map.png index 574128d..10f7094 100644 Binary files a/plots/annual_bt/1983_ebs_bt_map.png and b/plots/annual_bt/1983_ebs_bt_map.png differ diff --git a/plots/annual_bt/1984_ebs_bt_map.png b/plots/annual_bt/1984_ebs_bt_map.png index 7e979aa..4c8c079 100644 Binary files a/plots/annual_bt/1984_ebs_bt_map.png and b/plots/annual_bt/1984_ebs_bt_map.png differ diff --git a/plots/annual_bt/1985_ebs_bt_map.png b/plots/annual_bt/1985_ebs_bt_map.png index f7338a6..80091c0 100644 Binary files a/plots/annual_bt/1985_ebs_bt_map.png and b/plots/annual_bt/1985_ebs_bt_map.png differ diff --git a/plots/annual_bt/1986_ebs_bt_map.png b/plots/annual_bt/1986_ebs_bt_map.png index 78d27fd..eb169d4 100644 Binary files a/plots/annual_bt/1986_ebs_bt_map.png and b/plots/annual_bt/1986_ebs_bt_map.png differ diff --git a/plots/annual_bt/1987_ebs_bt_map.png b/plots/annual_bt/1987_ebs_bt_map.png index 39433b2..6dc0648 100644 Binary files a/plots/annual_bt/1987_ebs_bt_map.png and b/plots/annual_bt/1987_ebs_bt_map.png differ diff --git a/plots/annual_bt/1988_ebs_bt_map.png b/plots/annual_bt/1988_ebs_bt_map.png index 8f1237f..d512e96 100644 Binary files a/plots/annual_bt/1988_ebs_bt_map.png and b/plots/annual_bt/1988_ebs_bt_map.png differ diff --git a/plots/annual_bt/1989_ebs_bt_map.png b/plots/annual_bt/1989_ebs_bt_map.png index c1a58a3..2bd031f 100644 Binary files a/plots/annual_bt/1989_ebs_bt_map.png and b/plots/annual_bt/1989_ebs_bt_map.png differ diff --git a/plots/annual_bt/1990_ebs_bt_map.png b/plots/annual_bt/1990_ebs_bt_map.png index 9859502..29aab21 100644 Binary files a/plots/annual_bt/1990_ebs_bt_map.png and b/plots/annual_bt/1990_ebs_bt_map.png differ diff --git a/plots/annual_bt/1991_ebs_bt_map.png b/plots/annual_bt/1991_ebs_bt_map.png index eec673e..d0e0ada 100644 Binary files a/plots/annual_bt/1991_ebs_bt_map.png and b/plots/annual_bt/1991_ebs_bt_map.png differ diff --git a/plots/annual_bt/1992_ebs_bt_map.png b/plots/annual_bt/1992_ebs_bt_map.png index 078d888..e449674 100644 Binary files a/plots/annual_bt/1992_ebs_bt_map.png and b/plots/annual_bt/1992_ebs_bt_map.png differ diff --git a/plots/annual_bt/1993_ebs_bt_map.png b/plots/annual_bt/1993_ebs_bt_map.png index 886cbf8..cddaca8 100644 Binary files a/plots/annual_bt/1993_ebs_bt_map.png and b/plots/annual_bt/1993_ebs_bt_map.png differ diff --git a/plots/annual_bt/1994_ebs_bt_map.png b/plots/annual_bt/1994_ebs_bt_map.png index 649224e..9c3e46f 100644 Binary files a/plots/annual_bt/1994_ebs_bt_map.png and b/plots/annual_bt/1994_ebs_bt_map.png differ diff --git a/plots/annual_bt/1995_ebs_bt_map.png b/plots/annual_bt/1995_ebs_bt_map.png index 164d3f5..bb6e68a 100644 Binary files a/plots/annual_bt/1995_ebs_bt_map.png and b/plots/annual_bt/1995_ebs_bt_map.png differ diff --git a/plots/annual_bt/1996_ebs_bt_map.png b/plots/annual_bt/1996_ebs_bt_map.png index c2e2197..349c11f 100644 Binary files a/plots/annual_bt/1996_ebs_bt_map.png and b/plots/annual_bt/1996_ebs_bt_map.png differ diff --git a/plots/annual_bt/1997_ebs_bt_map.png b/plots/annual_bt/1997_ebs_bt_map.png index 955425f..8d65ac1 100644 Binary files a/plots/annual_bt/1997_ebs_bt_map.png and b/plots/annual_bt/1997_ebs_bt_map.png differ diff --git a/plots/annual_bt/1998_ebs_bt_map.png b/plots/annual_bt/1998_ebs_bt_map.png index 03edf9c..c52cbdd 100644 Binary files a/plots/annual_bt/1998_ebs_bt_map.png and b/plots/annual_bt/1998_ebs_bt_map.png differ diff --git a/plots/annual_bt/1999_ebs_bt_map.png b/plots/annual_bt/1999_ebs_bt_map.png index 30af89d..62a587f 100644 Binary files a/plots/annual_bt/1999_ebs_bt_map.png and b/plots/annual_bt/1999_ebs_bt_map.png differ diff --git a/plots/annual_bt/2000_ebs_bt_map.png b/plots/annual_bt/2000_ebs_bt_map.png index 985e121..16aa527 100644 Binary files a/plots/annual_bt/2000_ebs_bt_map.png and b/plots/annual_bt/2000_ebs_bt_map.png differ diff --git a/plots/annual_bt/2001_ebs_bt_map.png b/plots/annual_bt/2001_ebs_bt_map.png index 9dfb62b..5c256cf 100644 Binary files a/plots/annual_bt/2001_ebs_bt_map.png and b/plots/annual_bt/2001_ebs_bt_map.png differ diff --git a/plots/annual_bt/2002_ebs_bt_map.png b/plots/annual_bt/2002_ebs_bt_map.png index 12e5e4d..b09d180 100644 Binary files a/plots/annual_bt/2002_ebs_bt_map.png and b/plots/annual_bt/2002_ebs_bt_map.png differ diff --git a/plots/annual_bt/2003_ebs_bt_map.png b/plots/annual_bt/2003_ebs_bt_map.png index 2b6cbd1..57d8c67 100644 Binary files a/plots/annual_bt/2003_ebs_bt_map.png and b/plots/annual_bt/2003_ebs_bt_map.png differ diff --git a/plots/annual_bt/2004_ebs_bt_map.png b/plots/annual_bt/2004_ebs_bt_map.png index 4192613..747acee 100644 Binary files a/plots/annual_bt/2004_ebs_bt_map.png and b/plots/annual_bt/2004_ebs_bt_map.png differ diff --git a/plots/annual_bt/2005_ebs_bt_map.png b/plots/annual_bt/2005_ebs_bt_map.png index ea77a78..324c848 100644 Binary files a/plots/annual_bt/2005_ebs_bt_map.png and b/plots/annual_bt/2005_ebs_bt_map.png differ diff --git a/plots/annual_bt/2006_ebs_bt_map.png b/plots/annual_bt/2006_ebs_bt_map.png index 4bca33d..3aabed0 100644 Binary files a/plots/annual_bt/2006_ebs_bt_map.png and b/plots/annual_bt/2006_ebs_bt_map.png differ diff --git a/plots/annual_bt/2007_ebs_bt_map.png b/plots/annual_bt/2007_ebs_bt_map.png index d67d84d..6e96fd6 100644 Binary files a/plots/annual_bt/2007_ebs_bt_map.png and b/plots/annual_bt/2007_ebs_bt_map.png differ diff --git a/plots/annual_bt/2008_ebs_bt_map.png b/plots/annual_bt/2008_ebs_bt_map.png index 22b5a37..71c129d 100644 Binary files a/plots/annual_bt/2008_ebs_bt_map.png and b/plots/annual_bt/2008_ebs_bt_map.png differ diff --git a/plots/annual_bt/2009_ebs_bt_map.png b/plots/annual_bt/2009_ebs_bt_map.png index cbac690..2e161d3 100644 Binary files a/plots/annual_bt/2009_ebs_bt_map.png and b/plots/annual_bt/2009_ebs_bt_map.png differ diff --git a/plots/annual_bt/2010_ebs_bt_map.png b/plots/annual_bt/2010_ebs_bt_map.png index a2800da..31b356f 100644 Binary files a/plots/annual_bt/2010_ebs_bt_map.png and b/plots/annual_bt/2010_ebs_bt_map.png differ diff --git a/plots/annual_bt/2011_ebs_bt_map.png b/plots/annual_bt/2011_ebs_bt_map.png index 7b79ab2..f5c3b4e 100644 Binary files a/plots/annual_bt/2011_ebs_bt_map.png and b/plots/annual_bt/2011_ebs_bt_map.png differ diff --git a/plots/annual_bt/2012_ebs_bt_map.png b/plots/annual_bt/2012_ebs_bt_map.png index 2df87a1..06671d7 100644 Binary files a/plots/annual_bt/2012_ebs_bt_map.png and b/plots/annual_bt/2012_ebs_bt_map.png differ diff --git a/plots/annual_bt/2013_ebs_bt_map.png b/plots/annual_bt/2013_ebs_bt_map.png index 75e38ae..15689fc 100644 Binary files a/plots/annual_bt/2013_ebs_bt_map.png and b/plots/annual_bt/2013_ebs_bt_map.png differ diff --git a/plots/annual_bt/2014_ebs_bt_map.png b/plots/annual_bt/2014_ebs_bt_map.png index fa78d05..0e8a09b 100644 Binary files a/plots/annual_bt/2014_ebs_bt_map.png and b/plots/annual_bt/2014_ebs_bt_map.png differ diff --git a/plots/annual_bt/2015_ebs_bt_map.png b/plots/annual_bt/2015_ebs_bt_map.png index fce6e11..a5c99be 100644 Binary files a/plots/annual_bt/2015_ebs_bt_map.png and b/plots/annual_bt/2015_ebs_bt_map.png differ diff --git a/plots/annual_bt/2016_ebs_bt_map.png b/plots/annual_bt/2016_ebs_bt_map.png index 89ce413..49acd2f 100644 Binary files a/plots/annual_bt/2016_ebs_bt_map.png and b/plots/annual_bt/2016_ebs_bt_map.png differ diff --git a/plots/annual_bt/2017_ebs_bt_map.png b/plots/annual_bt/2017_ebs_bt_map.png index 0af3822..c69a132 100644 Binary files a/plots/annual_bt/2017_ebs_bt_map.png and b/plots/annual_bt/2017_ebs_bt_map.png differ diff --git a/plots/annual_bt/2018_ebs_bt_map.png b/plots/annual_bt/2018_ebs_bt_map.png index 6691d6b..f760133 100644 Binary files a/plots/annual_bt/2018_ebs_bt_map.png and b/plots/annual_bt/2018_ebs_bt_map.png differ diff --git a/plots/annual_bt/2019_ebs_bt_map.png b/plots/annual_bt/2019_ebs_bt_map.png index 48b20ec..df8cd4e 100644 Binary files a/plots/annual_bt/2019_ebs_bt_map.png and b/plots/annual_bt/2019_ebs_bt_map.png differ diff --git a/plots/annual_bt/2021_ebs_bt_map.png b/plots/annual_bt/2021_ebs_bt_map.png index a0825b1..596c648 100644 Binary files a/plots/annual_bt/2021_ebs_bt_map.png and b/plots/annual_bt/2021_ebs_bt_map.png differ diff --git a/plots/annual_bt/2022_ebs_bt_map.png b/plots/annual_bt/2022_ebs_bt_map.png index d6080c7..488adb0 100644 Binary files a/plots/annual_bt/2022_ebs_bt_map.png and b/plots/annual_bt/2022_ebs_bt_map.png differ diff --git a/plots/annual_bt/2023_ebs_bt_map.png b/plots/annual_bt/2023_ebs_bt_map.png index 3164662..dc8a1d8 100644 Binary files a/plots/annual_bt/2023_ebs_bt_map.png and b/plots/annual_bt/2023_ebs_bt_map.png differ diff --git a/plots/annual_bt/2024_ebs_bt_map.png b/plots/annual_bt/2024_ebs_bt_map.png new file mode 100644 index 0000000..a6a4bbf Binary files /dev/null and b/plots/annual_bt/2024_ebs_bt_map.png differ diff --git a/plots/cpa_table.csv b/plots/cpa_table.csv new file mode 100644 index 0000000..e6db5af --- /dev/null +++ b/plots/cpa_table.csv @@ -0,0 +1,43 @@ +"YEAR","EBS_AREA_LTE2_KM2","NBS_AREA_LTE2_KM2" +1982,211175,NA +1983,161525,NA +1984,207575,NA +1985,205000,NA +1986,257925,NA +1987,94475,NA +1988,205925,NA +1989,106025,NA +1990,177500,NA +1991,174350,NA +1992,242025,NA +1993,133375,NA +1994,259900,NA +1995,274275,NA +1996,99325,NA +1997,173125,NA +1998,100625,NA +1999,385975,NA +2000,236925,NA +2001,175550,NA +2002,101575,NA +2003,46900,NA +2004,89500,NA +2005,85700,NA +2006,244375,NA +2007,281100,NA +2008,345200,NA +2009,320075,NA +2010,269125,123953.83887372 +2011,167875,NA +2012,368825,NA +2013,258450,NA +2014,128100,NA +2015,122600,NA +2016,89225,NA +2017,169150,67759.4549824042 +2018,6150,NA +2019,26625,59431.6153292057 +2021,58975,88690.2567220455 +2022,178625,80090.5884748257 +2023,179550,83797.3420296618 +2024,156800,NA