How do I mask out the ocean in m_map?

I am plotting data that is over both land and ocean using m_map, but I only want the data over land to show up. Is there a way I can mask out the ocean (maybe by color filling everything outside of m_coastline instead of inside m_coastline)? I know there has to be a way to do this but I cannot figure it out. I've even tried using m_shaperead and using a shapefile of the ocean but couldn't get it that way either.

Answers (1)

KSSV
KSSV on 12 Oct 2016

4 Comments

KSSV The link does not work :/
yes it's no longer available :(
The Mathworks shutdown their newsreader. Try Google or Google Groups.
The way i did is
Download the land-ocean-mask martix, lile land.nc from NCEPRI.
Then set land grid = 1 and ocean grid = NaN.
Finally, multiply the matrix to the data.

Sign in to comment.

Categories

Find more on Oceanography and Hydrology in Help Center and File Exchange

Products

Asked:

on 11 Oct 2016

Commented:

on 24 Aug 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!