MargaretSiple-NOAA / goa-ai-data-reports

Automate data reports for GOA and AI surveys
1 stars 1 forks source link

Plots of SST and bottom temp from gear (GAM for data collection with collection date) - Cecilia currently has the code for this #8

Closed MargaretSiple-NOAA closed 1 year ago

MargaretSiple-NOAA commented 1 year ago

@Ned-Laman-NOAA can you remind me what this plot is going to be? Do we want corrected SST over time for each region? Where are those values stored? I feel like we talked about this a long time ago but I don't remember where they come from.

@vszalay maybe we can start with the temperatures shown in figs D-1 and D-2. Are those maps showing the SST values corrected by date, like the estimated SST values from the GAM?

Ned-Laman-NOAA commented 1 year ago

Simplest thing would be to have this plot be the one Cecilia (https://github.com/coleary-noaa) created for the Plan Team presentation found here (G:\AI-GOA\Plan Team\Joint Groundfish Plan Team\2022\September). If we wanted to get fancy, we still produced the waterfall plot for the Aleutians and Cecilia also produced that this year. Double check with Cecilia if using the Plan Team plots that her code reflects the comment we received from the PT about the proper calculation of the long term average.

MargaretSiple-NOAA commented 1 year ago

Hi Ned-- sorry for the delay on this one. I want to confirm that this is the plot you're talking about: image

If these temps just come straight from the HAUL table, I can easily plot them. I was under the impression that the values of SST are somehow corrected for DOY, since otherwise we'll get a fake spatial pattern of colder temps in the Western AI because we survey there first. But I just realized, after one cup of coffee, that I can plot these means myself and just see if they match with Cecilia's plot. Ha! ☕ One moment please.

MargaretSiple-NOAA commented 1 year ago

Almost have the same values. I did a quick and dirty version of slide 11 and everything looks really similar except the year 2000, which has a lower sst in Cecilia's plot than mine. I will investigate.


sstdat <- haul %>%
  mutate(YEAR = stringr::str_extract(CRUISE, "^\\d{4}") ) %>%
  filter(YEAR >=1994& REGION==SRVY & YEAR !=1997) %>%
  group_by(YEAR) %>%
  dplyr::summarize(bottom = mean(GEAR_TEMPERATURE,na.rm=TRUE),
            surface = mean(SURFACE_TEMPERATURE, na.rm=TRUE)) %>%
  ungroup() %>%
  mutate(bottom_stz = bottom - mean(bottom,na.rm=T),
         surface_stz = surface - mean(surface,na.rm=T)) %>%
  pivot_longer(cols = bottom:surface_stz)

sstdat %>%
  filter(grepl("_stz",name)) %>%
  ggplot(aes(YEAR,value,color = name)) +
  geom_point(size=2) +
  scale_color_manual(values = c('purple','orange'))

image

Ned-Laman-NOAA commented 1 year ago

Yes to the anomaly plot for the data report, Probably side by side with actual mean temps if you think the two together are complementary. We provided both in the Plan Team. Interested to hear if you identify what's different between yours and Cecilia's plots.

The DOY corrected temperatures are part of the waterfall plot we've used in past years and are still getting requests for in the AI from Ivonne in the ESR chapter. For the data report, I'd like to avoid reproducing the waterfall and it's methodology. TempDepthLatPlot

Ned-Laman-NOAA commented 1 year ago

One more thing and you'll want to confirm with Cecilia. After the Plan Team and based on their request we adjusted the long term averages to not include the last 5 surveys (basically last decade).

MargaretSiple-NOAA commented 1 year ago

Cecilia is currently working up her code to post on a private repo-- her temp stuff was for the ESRs, which she says includes corrections for upcast and downcast. I haven't looked at her code but temperature_summary in the script below comes from an ESR function:

mean_temp <- temperature_summary   %>%
  group_by(year,inpfc_area) %>%
  summarise(mean_SST = mean(surface_temp , na.rm = TRUE),
            mean_BT = mean(temp200m, na.rm=TRUE),
            mean_SST_SD = mean(surface_temp_sd, na.rm=TRUE),
            mean_BT_SD = mean(temp200m_sd, na.rm=TRUE),
            SST_anomaly = mean_SST - total_mean_SST,  
            BT_anomaly = mean_BT - total_mean_BT)

Those values are included in the ESR reports, so I'm wondering if we want to put the raw data in the data report (as with some of the other values) and refer the reader to the ESR for the corrected anomaly values? With the raw gear temp data, I can add something like this, which I like because it shows the spread of the data and the variance as well as the averages. What do you think? : bottomtempexample

Ned-Laman-NOAA commented 1 year ago

That's pretty darn cool, honestly! I could be very happy with that view of temperature (surface and bottom). Question, would surface be either/or (start of downcast/end of upcast) or just pick one? I also like referring to the corrected values in the ESR. That avoids duplication of products and keeps the processed report as empirical as we can. Finally, bear in mind that we are creating new content not previously provided in our processed reports so we have latitude to be creative when deciding what we think is useful to report. Re-iterating. I think the plot you've shared looks very informative and we should go with it if you still agree.

We need to include methods text in the processed report for how temps are collected, how temps were summarized, and acknowledging that we know there is a temporal warming trend over the course of the summer survey and that we try to account for that in the ESRs. This will help us with the distinct between this empirical look and that highly processed look at temperature.

Ned-Laman-NOAA commented 1 year ago

Data thoughts on those 0 bottom temps.

In 2014, that value comes from a PNE net efficiency study (cruise = 201402). I don't want to include those temperatures with the bottom trawl temps since that study was done in Makushin Bay if I remember correctly and isn't representative of the regular survey data. I would hope that that cruise could be excised from the analysis set using the descriptions in the RACE_DATA.SURVEY_DEFINITIONS table and keeping to just the regular bottom trawl surveys.

In 2018, that 0 should be a null because the BT died early on the downcast (unless someone wants to make the time to recover a temperature from the MK9 or the Trawl Explorer, not critical at this time). I'll get with Heather so she can explain to me (again) how I can assign myself privileges to edit those data and fix that temp.

MargaretSiple-NOAA commented 1 year ago

In 2014, that value comes from a PNE net efficiency study (cruise = 201402). I don't want to include those temperatures with the bottom trawl temps since that study was done in Makushin Bay if I remember correctly and isn't representative of the regular survey data. I would hope that that cruise could be excised from the analysis set using the descriptions in the RACE_DATA.SURVEY_DEFINITIONS table and keeping to just the regular bottom trawl surveys.

OK cool I will remove cruise 201402 from the dataset before I summarize.

In 2018, that 0 should be a null because the BT died early on the downcast (unless someone wants to make the time to recover a temperature from the MK9 or the Trawl Explorer, not critical at this time). I'll get with Heather so she can explain to me (again) how I can assign myself privileges to edit those data and fix that temp.

Sweet. OK I will change that one value. And I just got the methods for how the temp data in HAUL are calculated from sensor data, so I will include that in the Methods section. Stay tuned...

Ned-Laman-NOAA commented 1 year ago

Hopefully not long and I can fix that 2018 value in the database so we don't have to put the one-off-hex on it!

MargaretSiple-NOAA commented 1 year ago

Added plots to markdown file, refs to plots in google drive chapter sections, and reference to cold pool tech memo (Rohan et al. 2022) to .bib.