James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
122 stars 53 forks source link

Extrapolating mesh grids for data that occur in both Northern and Southern hemispheres #83

Closed HaikunXu closed 6 years ago

HaikunXu commented 6 years ago

I use VAST to evaluate the spatiotemporal dynamics of yellowfin tuna in the Eastern Pacific Ocean. When fitting the data to VAST, the "Extrapolation_List" that is generated by Grid_Fn is problematic because it extrapolates the mesh grids solely based on the setting for the Northern hemisphere. I solved this issue by manually editing Grid_Fn to first separately extrapolate the mesh grids for the Northern and Southern hemisphere and then combine the two mesh fields as one that covers both hemispheres. Is it possible to allow VAST automatically detecting this issue and doing the extrapolation for those data which across the Equator?

James-Thorson commented 6 years ago

Could you try grid_in_UTM=FALSE in Prepare_Extrapolation_Grid_Fn...? I think this avoids any UTM conversion but I don't remember testing it at all...

peterkuriyama commented 6 years ago

I'm working through the code using grid_in_UTM=FALSE in Prepare_Extrapolation_Grid_Fun. When grid_in_UTM = FALSE, the Extrapolation_List$zone = NA, which then causes errors in Convert_LL_to_EastNorth_Fn. Specifically in the CRS.new call of the Convert_LL_to_EastNorth_Fn.

Hard coding CRS.new <- CRS("+proj=utm +zone=13 +datum=WGS84") results in a plot like: conversion_check

which I think looks good? I have pretty minimal GIS experience/intuition

James-Thorson commented 6 years ago

Yes please make a branch, commit a change to your branch and then submit a pull request.

I think you should be able to use grid_in_UTM=FALSE without using Convert_LL_to_EastNorth_Fn so perhaps see I'd there's a way to make a small change that allows this

On Mar 9, 2018 4:31 PM, "Peter Kuriyama" notifications@github.com wrote:

I'm working through the code using grid_in_UTM=FALSE in Prepare_Extrapolation_Grid_Fun. When grid_in_UTM = FALSE, the Extrapolation_List$zone = NA, which then causes errors in Convert_LL_to_EastNorth_Fn. Specifically in the CRS.new call of the LL to Eastnorth.

Jim - What's the best way to incorporate the code changes (once I get things working). Make a new branch and then merge in?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/James-Thorson/VAST/issues/83#issuecomment-371983860, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnqTentVxBhXgs57BDhtYxxFTTvDJ_6ks5tcx7lgaJpZM4Sg2I7 .