Skip to content

Clipping in Antarctica #278

Answered by carocamargo
carocamargo asked this question in Q&A
Discussion options

You must be logged in to vote

Finally got it working.. I think the issue was with the shapefile data itself. The coordinates of the shapefile were in '3031' projection, and just switching the proj=3031 in clipping wasn't working, so I had to reproject the shapefiles before hand.
not sure if it's the best solution, but it's working.

import pandas as pd
# import geopandas as gpd
import numpy as np
import rioxarray
import xarray as xr
from cartopy import crs as ccrs#, feature as cfeature
from matplotlib import pyplot as plt
import matplotlib.path as mpath

from pyproj import Transformer
import shapefile 
#%% Open 1 degree mask
path='/Users/ANT_basins_shp/'
ifile='LAND_MASK_CRI-JPL_180x360_conservative.nc'
ds=xr.open_data…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@carocamargo
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by carocamargo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants