Ask Your Question
0

Loading a mask into croco tools

asked 2019-08-02 04:40:37 +0200

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-08-05 10:05:34 +0200

Rachid gravatar image

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)

edit flag offensive delete link more

Comments

Excellent, thank you!

Beaufort gravatar imageBeaufort ( 2019-08-05 10:25:07 +0200 )edit
0

answered 2019-08-02 14:02:41 +0200

Rachid gravatar image

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)

edit flag offensive delete link more

Comments

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!

Beaufort gravatar imageBeaufort ( 2019-08-05 09:27:11 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-02 04:40:37 +0200

Seen: 17,353 times

Last updated: Aug 05 '19