noaa-afsc-mace / winter_2024_bogoslof_report

Bogoslof reporting for 2024
0 stars 0 forks source link

SST woes #3

Open mike-levine opened 3 months ago

mike-levine commented 3 months ago

@darinjones thanks for digging in to all the issues in SST this year!

@nlauffenburger for the GOA winter report, we're just going to bail on the SBE-38 'primary' sensor this year. The SST-related bits of the report had a few assumptions: -SBE 38 would always be the good sensor -Mid-Seatemps/Furuno sensor would always be the backup, and we'd often use the Mid-SeaTemp-C-VALUE_1_min_avg as opposed to Mid-SeaTemp-C-Cal-VALUE_1_min_avg. This Cal version has a survey-tech applied offset that is static, and is supposed to make it closer to SBE 38.

We used to take the uncalibrated value and make our own based on the observed offset between the 'good' SBE 38 and the 'less good' uncalibrated Mid Seatemps/Furuno. Now, we're getting the Mid-SeaTemp-C-Cal-VALUE_1_min_avg one, and it is the 'good' sensor this winter as per @darinjones.

So I modified the function get_sst_data.R in two ways:

  1. Added a catch for winter 2024 that forces the Mid-SeaTemp-C-Cal-VALUE_1_min_avg to be the only accepted sensor value.
  2. Adds an argument to the function that specifies if a homebrewed calibration should be applied.

If you want to follow this approach, there's a few steps:

  1. Replace your get_sst_data.R with the one here.
  2. Go to your main_cruise_report_2024.Rmd script. Replace the primary/secondary sensor business in the setup chunk with:
# Sea surface temperatures: set the primary and backup temperature sensors you want to use
# (see clamsbase2.underway_data table for what's available)
# The Dyson SCS data has been available with "Mid-SeaTemp-C-Cal-VALUE_1_min_avg" and "Mid-SeaTemp-C-VALUE_1_min_avg"; 
# if you have the 'Cal' version, set apply_cal_to_backup_sensor to FALSE; if not, set to TRUE and we'll handle the cal 
# by comparing the TSG-SBE38 to the Mid-SeaTemp sensor and determining the offset (assumes TSG is 'correct' and makes Mid match)
# NOTE: due to data issues with the SBE 38 in 2024, we're using the usual 'backup' as the 'primary' in 2024!
primary_sensor <-  "Mid-SeaTemp-C-Cal-VALUE_1_min_avg"
backup_sensor <- "TSG-SBE38-Temp_1_min_avg"
apply_cal_to_backup_sensor <- FALSE
  1. Go into your get_macebase_data.R file and find the place where get_sst_data is called; you'll have to add an argument apply_cal there to deal with the choice to apply the calibration or not. Mine looks like:
  #######
  # Sea surface temps/ SCS data:
  # get the SST SCS data from the database
  # this will also open and update the historical SCS record
  scs_sst_list <- purrr::pmap(list(ship = current_year_query_params$ships,
                                   survey = current_year_query_params$surveys,
                                   data_set_id = current_year_query_params$data_sets,
                                   analysis_id = current_year_query_params$analyses,
                                   historical_scs_file_loc = historical_scs_sst_path,
                                   apply_cal = apply_cal_to_backup_sensor),
                         get_sst_data)
  1. If you want the Methods section to properly report what sensor was used (because this too assumed the primary would always be 'right' go to the Methods.Rmd here and see the code at lines 140-148 and L207. At 207, we switch from The SBE 38 was used`... to ` the `r primary_sensor_print_name` was used...

I apologize- lots of steps there. For a one-off case in your report, you could also just take any number of shortcuts! Let me know if you have any questions!

darinjones commented 3 months ago

Thanks Mike, I've been meaning to take an even closer look at these sensors and here it is. Below are plots of the TSG-SBE38 (teal) and Mid-SeaTemp-C-Cal-VALUE (salmon) sensors with the trawl SBE SST overlaid at trawl times as points at trawl times. What is visible is that the two SST sensors are 2-4 degrees off for most of Shumagins and Bogoslof and for the first few days of Shelikof. The two SST sensors were closer in line with what would be expected for the last 2/3 of Shelikof. Also, the trawl SBE trackvery well with the Mid_Seatemp values.

With that I agree that the Mid_Seatemp sensor should be used for all of Shumagins and Bogoslof, and at least the first few days of Shelikof. It's up to you as to whether you want to try to tease out the "good" data from the 38. I think it is fine to just go with the Mid_Seatemp for the whole winter.

Shelikof Shelikof SST and trawl SBE Shumagins Shumagins SST and Trawl SBE Bogoslof Bogoslof SST and trawl SBE

mike-levine commented 3 months ago

Thanks @darinjones! I'm just going to keep it simple for the Shelikof and keep the Mid_Seatemp for all winter, just given how odd it was. Hopefully it is not an issue this summer- looks like it was behaving by the end of the Shelikof at least?

nlauffenburger commented 3 months ago

Thanks you two. I will update the code so that I'm only using the MidSeaTemp just to be sure it isn't being contaminated by the strange behavior of the SBE. Thanks for putting the new code together, @mike-levine!

darinjones commented 3 months ago

Hi again, Looking at data from last winter here is a plot of DY2304 showing that the Mid-Seatemp and SBE 38 are only ~0.5 degree off and the trawl SBE tracks with the 38, but the 38 is lower than the Mid, as opposed to higher like it was this winter. May need to revisit this in the future if we apply our own calibration correction.

DY2304 Shelikof 2023 DY2304 SST and trawl SBE

mike-levine commented 3 months ago

Thanks @darinjones I agree- if, in the future, we can trust that the SBE38 is 'best' I think the homebrewed calibration makes sense- but it isn't very smart (it simply figures out the average difference between the SBE38 and the secondary sensor, i.e. the Furuno, and says that this should be the correction), so if the SBE38 is off, it just passes that error on if we use it to calibrate the other one.

darinjones commented 3 months ago

@patrick-ressler-NOAA above are some SST plots from this winter (2024) and one from last years (2023) winter Shelikof for comparison. Salmon colored line is Mid-SeaTemp-C-Cal-Value and Teal is TSG-SBE38. Dots are surface temps from headrope SBE at trawl times. On Shumagins and Bogoslof and the first few days of Shelikof the SBE 38 was 2-4° higher than the Mid-Seatemp. Trawl SBE's track the Mid-Seatemp sensor better. When the 38 and Mid-Seatemp did start to converge during Shelikof the 38 was slightly higher than the Mid-Seatemp sensor....last year the 38 was ~0.5° lower than the Mid-Seatemp and the trawl temps tracked better with the 38....? Will continue to monitor these this summer and beyond.