alaska-groundfish-efh / product-requests

Empty repo mainly for storing and tracking data requests from other teams (see Issues/Projects)
1 stars 0 forks source link

Data for adult walleye pollock #7

Open mszulcz-mitre opened 1 month ago

mszulcz-mitre commented 1 month ago

This request is for data to reproduce the plots for adult walleye pollock in Fig.154 in Advancing Model-Based Essential Fish Habitat Descriptions for North Pacific Species in the Bering Sea by E. A. Laman et al.

image

According to Table 42 in the report, the data should include the following covariates:

Species: walleye pollock

Lifestage(s): adult

Region(s) Bering Sea

Format:

If raster and shapefile are the only choices, I'd like shapefiles. But ideally, the data would be in the same format as the data for the the vignette, which seems to be in RDA format.

Research team making the request MITRE Transparent Oceans Team. PIs: Stephen Lynch, Michael Szulczewski, Tom Weber

What will this EFH product be used for?: We'll use the data for verification of a modeling pipeline.

MargaretSiple-NOAA commented 4 weeks ago

Thank you Mike. Marking this as cross-listed with https://github.com/afsc-gap-products/data-requests/issues/102 (and I should note that this is the correct place for making EFH product requests!) So we will discuss / post here. I will be a little delayed in responding to this request because I'm at a WG meeting all day today.

masonsmith-noaa commented 4 weeks ago

Hello Mike, for part of your request (the covariates) I've placed an RDS file in this folder that contains a raster stack in SpatRaster (terra) format for all of the Eastern Bering Sea covariates - it can be opened using readRDS("raster.stack.rds"). Please let us know if it doesn't work! If you'd rather create the raster stack yourself (as in the vignette), there is also a subfolder containing each raster file. Mason

sean-rohan-NOAA commented 4 weeks ago

Sent an .rda file for the EBS via email. Please let us know if you have any questions.

Sean

MargaretSiple-NOAA commented 2 weeks ago

Hi Mike-- Just checking back in on this. Did the .rda file Sean sent fulfill your need?

mszulcz-mitre commented 2 weeks ago

Hi Margaret and Sean,

Thanks for checking in! I’m not sure if the data you kindly provided meets our needs yet. We’ve been trying to run a version of the BasicsOfFiveYearReview.Rmdhttps://github.com/alaska-groundfish-efh/EFHSDM/blob/main/vignettes/BasicsOfFiveYearReview.Rmd vignette for adult walleye pollock using the data, but we’re getting a lot of warnings and the code crashes. We sent an email to Jodi Pirtle and Mason Smith about the issues Wednesday night. I’d like to forward the email to you if you don’t mind.

For the data Sean sent, could I ask a question? What's the relationship between the data in raster.stack.rds and EFH_EBS_data_2021.rda? EFH_EBS_data_2021.rda has species data and seems to contain the data used to train the SDMs. Both have fields for the following covariates: "lon" "lat" "bdepth" "slope" "aspectE" "aspectN" "curve" "btemp" "bcurrentU" "bcurrentV" "bcurrentUSD" "bcurrentVSD" "tmax" "phi" "BPI" "sponge" "coral" "pen" but raster.stack.rds doesn’t seem to contain temporal information (maybe I’m missing it). Is raster.stack.rds a snapshot in time of the same data in EFH_EBS_data_2021.rda? If not, what’s their relationship?

Best regards, Mike

From: Margaret Siple @.> Date: Thursday, November 7, 2024 at 2:35 PM To: alaska-groundfish-efh/product-requests @.> Cc: Dr. Michael L. Szulczewski @.>, Author @.> Subject: [EXT] Re: [alaska-groundfish-efh/product-requests] Data for adult walleye pollock (Issue #7) Hi Mike-- Just checking back in on this. Did the .rda file Sean sent fulfill your need? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread. Message ID: alaska-groundfish-efh/product-requests/issues/7/2463059419@ github. com

Hi Mike-- Just checking back in on this. Did the .rda file Sean sent fulfill your need?

— Reply to this email directly, view it on GitHubhttps://urldefense.us/v2/url?u=https-3A__github.com_alaska-2Dgroundfish-2Defh_product-2Drequests_issues_7-23issuecomment-2D2463059419&d=DwMFaQ&c=Al8V6E3U0yBSSEuVtdZbGtsvjPA49U3WmtZAsdW0D_Q&r=uKkaqqIz0UiteYWGISoWTSfZ_yZ8p8GPKOg9DOFPJ68&m=w2KKHeJQAvL1CFpVaXmxlmq6lKE1nDZLbCx0Jms22QWooii2JANoxmlEOt6H7Zvz&s=Qfmk_W906q5_toSb-kqnhjpq9Xv6opyCuSBXMlL-BgY&e=, or unsubscribehttps://urldefense.us/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AYMG7RNVGNRDQP7LGBU2TIDZ7O6INAVCNFSM6AAAAABQK7K5SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRTGA2TSNBRHE&d=DwMFaQ&c=Al8V6E3U0yBSSEuVtdZbGtsvjPA49U3WmtZAsdW0D_Q&r=uKkaqqIz0UiteYWGISoWTSfZ_yZ8p8GPKOg9DOFPJ68&m=w2KKHeJQAvL1CFpVaXmxlmq6lKE1nDZLbCx0Jms22QWooii2JANoxmlEOt6H7Zvz&s=fGTbwK2p-jEXaHciYpHsEkYCiynlI0ImnnTJBOkS7Kc&e=. You are receiving this because you authored the thread.Message ID: @.***>

MargaretSiple-NOAA commented 2 weeks ago

Hi Mike -- sorry for not elaborating this better. The covariate data in that csv are by year (i.e., covariate data are distinct among years, based on data from the surveys). raster.stack contains combined environmental covariates that were used to fit all the models in the 2023 EFH review. For many reasons (many of them at higher decision-making levels than us!), the single maps produced in that review are based on combined data from the full survey time series. This means that in the model fits, year is not included as a factor. There is ongoing research to compare 'static' and 'dynamic' models for EFH, as clearly some of these covariates are very dynamic.

If you wanted to, from the csv, you could fit an adult pollock SDM for each year by including year as a factor, or you could subset to one specific year by subsetting the data. I hope that helps.

mszulcz-mitre commented 2 weeks ago

  Hi Margaret,

Thank you for the explanation! Could I follow up?

raster.stack contains combined environmental covariates that were used to fit all the models in the 2023 EFH review.

In the vignette in the repo, a dataframe derived from the region_data_all dataframe is used to fit the models:

region.data <- region_data_all

skipping some steps…

start.year <- 2012 species.data <- subset(region.data, year >= start.year)

skipping some steps…

maxnet.model <- FitMaxnet( data = species.data, species = species, vars = c("lon", "lat", "btemp", "bdepth", "slope"), facs = "sponge", regmult = 1, reduce = T )

raster.stack appears to be used for inference from the trained model:

maxnet.abund <- MakeMaxEntAbundance( model = maxnet.model, maxent.stack = raster.stack, scale.fac = maxnet.scale, type = "cloglog" )

However, what I’m understanding from your comment is that raster.stack was used to train the models for the 2023 EFH review. Is that correct?

raster.stack contains combined environmental covariates

What’s the process by which the covariates are combined? Is there code in the repo that does the combining? I’d love to run it but I searched and couldn’t find it.

Best regards, Mike

From: Margaret Siple @.> Date: Friday, November 8, 2024 at 7:23 PM To: alaska-groundfish-efh/product-requests @.> Cc: Dr. Michael L. Szulczewski @.>, Author @.> Subject: [EXT] Re: [alaska-groundfish-efh/product-requests] Data for adult walleye pollock (Issue #7) Hi Mike -- sorry for not elaborating this better. The covariate data in that csv are by year (i. e. , covariate data are distinct among years, based on data from the surveys). raster. stack contains combined environmental covariates that were used

Hi Mike -- sorry for not elaborating this better. The covariate data in that csv are by year (i.e., covariate data are distinct among years, based on data from the surveys). raster.stack contains combined environmental covariates that were used to fit all the models in the 2023 EFH review. For many reasons (many of them at higher decision-making levels than us!), the single maps produced in that review are based on combined data from the full survey time series. This means that in the model fits, year is not included as a factor. There is ongoing research to compare 'static' and 'dynamic' models for EFH, as clearly some of these covariates are very dynamic.

If you wanted to, from the csv, you could fit an adult pollock SDM for each year by including year as a factor, or you could subset to one specific year by subsetting the data. I hope that helps.

— Reply to this email directly, view it on GitHubhttps://urldefense.us/v2/url?u=https-3A__github.com_alaska-2Dgroundfish-2Defh_product-2Drequests_issues_7-23issuecomment-2D2465933929&d=DwMFaQ&c=Al8V6E3U0yBSSEuVtdZbGtsvjPA49U3WmtZAsdW0D_Q&r=uKkaqqIz0UiteYWGISoWTSfZ_yZ8p8GPKOg9DOFPJ68&m=El_e91nNHwWwjNxk3uVt30gFPHae4G2-N7janpZSj7BGzRKl45xAXMbeH9C2QXtw&s=R8NYJb67k72s6L8futPASnu-4dbBRQ7W91IEVb-09lM&e=, or unsubscribehttps://urldefense.us/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AYMG7RID3IQRLN52FKTS6GDZ7VIWTAVCNFSM6AAAAABQK7K5SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRVHEZTGOJSHE&d=DwMFaQ&c=Al8V6E3U0yBSSEuVtdZbGtsvjPA49U3WmtZAsdW0D_Q&r=uKkaqqIz0UiteYWGISoWTSfZ_yZ8p8GPKOg9DOFPJ68&m=El_e91nNHwWwjNxk3uVt30gFPHae4G2-N7janpZSj7BGzRKl45xAXMbeH9C2QXtw&s=aK8qrBSxzawsBm0AdwdzJlp9Y17GBEtxAYfIqf5ol1I&e=. You are receiving this because you authored the thread.Message ID: @.***>