Land Sea Masking Scripts
From WikiROMS
Jump to navigationJump to search
Matlab: Land/Sea Masking Scripts
This page describes several Matlab scripts in the matlab/landmask repository sub-directory, which are used to process ROMS Land/Sea mask.
- add_coastline.m
- Adds coastline data to ROMS Grid NetCDF file. This is the coastline data is used to facilitate Land/Sea masking editing.
- add_coastline (ncfile, Clon, Clat)
- On Input:
- ncfile: ROMS Grid NetCDF file name (string)
- Clon : Coastline longitude (1D array, degree_east)
- Clat : Coastline latitude (1D array, degree_north)
- editmask.m
- GUI for manual editing of ROMS Land/Sea mask on RHO-points. To accelerate the processing, the Land/Sea mask is edited in (I,J) grid coordinates. If the (I,J) coordinates are not provided, it compute and write them into file. If called without, one or both arguments, it will prompt for the needed file name(s). If the coastline data is in grid_file, it will read it and convert to (I,J) fractional coordinates.
- editmask (grid_file, coast_file)
- On Input:
- grid_file : ROMS Grid NetCDF file name containing the grid and mask arrays (string)
- coast_file: Matlab file name containing the coastline (lon, lat) or (I,J) fractional coordinates (string; optional)
- Mouse shortcuts:
- double click, zoom in
- right click, zoom out
- middle click, change editing mode
- editscope.m
- GUI for manual editing of ROMS adjoint sensitivity scope mask on RHO-points. To accelerate the processing, the Land/Sea mask is edited in (I,J) grid coordinates. If the (I,J) coordinates are not provided, it compute and write them into file. If called without, one or both arguments, it will prompt for the needed file name(s). If the coastline data is in grid_file, it will read it and convert to (I,J) fractional coordinates.
- editscope (grid_file, coast_file)
- On Input:
- grid_file : ROMS Grid NetCDF file name containing the grid and mask arrays (string)
- coast_file: Matlab file name containing the coastline (lon, lat) or (I,J) fractional coordinates (string; optional)
- Mouse shortcuts:
- double click, zoom in
- right click, zoom out
- middle click, change editing mode