I guess the procedure maybe similar with ROMSTOOLS such as "grid --->forcing--->climatology--->initial condition and boundary". I tried to realize the Benguela example in ROMSTOOLS Documentation with the Arango 's matlab scripts.
A lot of problems appeared when I prepared the grid and making force files.
1.
When preparing the grid file, I write the script like this:
%---------make_grid-----------------
% edit extract_coast_XXX.m
extract_coast_Benguela
% edit extract_bath_XXX.m
extract_bath_Benguela
% edit boundary.dat
seagrid
nameit = 'Benguela';
grdfile=[nameit,'-grid.nc']
seagrid2roms('seagrid.mat',grdfile);
hmin = 75;
hmax = 5000;
h = nc_read(grdfile, 'h');
% contour(h(:,end
% contour(rvalue(h(:,end
rmask = nc_read(grdfile, 'mask_rho');
h( h<hmin) = hmin;
h( h>hmax) = hmax;
[hout]=smooth_bath(h,rmask,4,0.35,50);
%contour(rvalue(hout(:,end
%contour(hout(:,end
ncwrite(grdfile,'hraw',h);
nc_write(grdfile,'h',hout);
coastfile='Benguela_coast.mat';
editmask(grdfile, coastfile);
%---------end--------------------------
But I find the bathymetry and mask turn right for 90 degree. It seems seagrid2roms does not work correctly. I also wonder whether the script " c_grid .m" will prepare the grid and whether it can interpolate the bathymetry on the grid. 2.
I followed the "d_ecmwf2roms.m" to prepare the forcing files. But I found the variables like 'sustr', 'svstr', 'shflux' , 'shflux' etc. were not interpolated on the grid. That is to say, the grid of forcing files and grid file do not match. Should I add an interpolate procedure after this? How?
I will appreciate if anyone who can answer me or if tell me where I can find a more detailed document for Arango 's scripts.
Sorry for my poor English. I am not a native speaker. Thank you guys.