% Rough diary of the steps fpr setting up a simple % cartesian grid for the Mullica river. define grid lat/lon limits enter in file boundary1.dat configure coastline file tmp = load('north_mask.txt'); latn = tmp(:,1:3)*[1 1/60 1/3600]'; lonn = tmp(:,4:6)*[1 1/60 1/3600]'; tmp = load('south_mask.txt'); lats = tmp(:,1:3)*[1 1/60 1/3600]'; lons = tmp(:,4:6)*[1 1/60 1/3600]'; lon = [lonn; NaN; lons]; lat = [latn; NaN; lats]; save mullica_coast lon lat load coastline file mullica_coast.mat click 4 times to make any old grid load boundary points boundary1.dat rubber band to zoom (if necessary) cells edge 1 32 cells edge 2 64 seagrid.mat grd_title = 'Mullica 1' grd_file = 'mullica_grid_1.nc' seagrid2roms('seagrid',grd_file,grd_title); Create the Land/sea mask with editmask.m addpath /home/wilkin.new/roms/nena/mat/rmask -end % Need to meddle with editmask.m and ijcoast.m % There is a precision issue with the griddata triangulation % failing for such small grid spacing. Applying an offset % solves the problem. Tnis could be applied routinely in % ijcoast to make the code robust C.Icst = griddata(rlon+74,rlat-39,x,C.lon+74,C.lat-39) C.Jcst = griddata(rlon+74,rlat-39,y,C.lon+74,C.lat-39) interactively edit the mask, then save bathy = load('bathymlw.txt'); lonb = bathy(:,2); latb = bathy(:,1); hb = bathy(:,3);