Is there an existing way to load a mask you’ve already manually produced (e.g. in the mask editor) back into the mask editor?
Not sure it answers your question, if the idea is to modify a mask in an existing grid file, you should be able to launch the mask editor alone (without launching make_grid):
editmask(grid_file,coast_file)
Thank you for your reply. The problem is that I wanted to be able to re-use the same custom mask (generated in the mask editor or otherwise) on multiple grids (differing only in the slope parameter target). A lot of fine-tuning is required to adjust the automatically generated mask!
You can edit the script croco_tools/Preprocessing/make_grid.m and around line 158 replace:
maskr=h>0
by something like
ncm=netcdf(‘mycustommask.nc’)
maskr=ncm{‘mask_rho’}(:,
close(ncm)
Excellent, thank you!