NetCDF mask files can be created from GIS shapefiles with the gdal_rasterize command.
This command creates very quickly a raster image from a vector layer and is
smart enough to generate also a netcdf file.
So the different steps will be:
1) Identify a shapefile from a referenced source.
For example, http://www.marineregions.org/downloads.php#iho
for the Sea Areas defined by the International Hydrographic Organization.
2) Inspect the downloaded shapefile file with a GIS software like gqis to identify the attribute you want to export.
(show attribute table interface as described in https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html)
--> will create a global netCDF file from the ID attribute at 0.5 resolution, the output variable will be named 'band1'
Then open the netCDF file from ferret:
yes? use IHO_Sea_Areas.nc
yes? shade/pal=thirty_by_levels/lev=1d band1 ; go land
The version used is:
$ gdal_rasterize --version
GDAL 1.11.3, released 2015/09/16