Creating a grid with bottom temperature data #293
-
Hi all, I'm trying to incorporate environmental covariates, particularly bottom temperature, into my sdmTMB model. I have bottom temperature data for every coordinate within the survey area. However, I am facing challenges in creating an entire survey grid that has the bottom temperature data for every point for conducting predictions on the grid. I am wondering if you have some resources or advice to offer regarding the process of creating such a grid with bottom temperature data. Thank you in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, thanks for the question. First, see this example: #151 If that doesn't clarify and you have more questions about how to sample or interpolate from a bathymetry file, let us know. Generally, it is better to essentially coarse-grain an existing high-resolution bathymetry, but if none is available then you could use more naive interpolation methods like bilinear interpolation. |
Beta Was this translation helpful? Give feedback.
-
There are several possible solutions here. Ideally both your fitted data temperature and survey grid temperature would come from the same datasource to avoid the potential issue of one data source being biased with respect to the other. So, you might start with some oceanographic model of temperature (say a ROMS model) and interpolate that both to your fitted data locations and to your grid using something like bilinear interpolation, or nearest value, or some smoother (even sdmTMB itself). The raster package is often useful for this. There are probably also functions within sf. If no such other data source exists, I have seen it done where the environmental data source from the fitted data is extrapolated to the grid first using some model like from mgcv or sdmTMB, although that's probably not ideal because that data source is probably coarser and introduces a source of error that's not propagated. |
Beta Was this translation helpful? Give feedback.
There are several possible solutions here. Ideally both your fitted data temperature and survey grid temperature would come from the same datasource to avoid the potential issue of one data source being biased with respect to the other.
So, you might start with some oceanographic model of temperature (say a ROMS model) and interpolate that both to your fitted data locations and to your grid using something like bilinear interpolation, or nearest value, or some smoother (even sdmTMB itself). The raster package is often useful for this. There are probably also functions within sf.
If no such other data source exists, I have seen it done where the environmental data source from the fitted da…