79333587

Date: 2025-01-06 15:54:24
Score: 1
Natty:
Report link

As suggested by @Patrick, changing the shape coordinate from meters to degress solved this problem.

shp_file=shp_file.to_crs('EPSG:4326’)

the mask function of the regionmask package treats the meter coordinate as a degree coordinate; I think it will be good if the function tests first the type of Coordinate reference system CRS. Since the error that I got (below) makes me feel that the problem is the netcdf data file ValueError: lon has data that is larger than 180 and smaller than 0. Set `wrap_lon=False` to skip this check.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Patrick
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Kernel