dear all
i want to use seagrid.this program has not smoothing step.
but reading most post in roms forum shows smoothing importance
to get rx0 in appropriate limit. what make me confused is serialization of grid generation by seagrid.
(1) should smoothing be first done on bathymetry (h(x,y)) and then smoothed bathymetry given to seagrid program?
(2) so computed r-factor is base on bathymetry's dx and dy not grid's dx and dy?
Also base on seagrid tutorial after making grid, user can compute depths and land maks on grid with one click on compute bar.
Therefore it seems that seagrid steps divide to smoothing, making grid and then land sea masking. ((If my understanding is wrong please tell me)).
after that i want to use smoothgrid.m script (in matlab/utility path) as function
function [hout]=smooth_bath(hinp,rmask,order,rlim,npass)
for smoothing my real bathymetry that contains positive value for sea and negative value for land.
but it needs rmask which is Land/Sea masking at RHO-points. What happen .
(3)does it say that before smoothing, land/sea masking at RHO should be done .what is different between this RHO land/sea masking and last step on seagrid?
(4) Also please tell me how i can provide rmask for this function.
I know that i have several questions but i really need experienced people's guidance.
I hope to your kindness
thanke so mush in advance
fereshte
grid making serialization
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
Re: grid making serialization
Dear user
last question of mine showed that my mind was mixed with different concepts(sorry )
I have tried to manage my questions as below:
1-infact smoothing and land/sea masking process should be done after
creating grid (by Seagrid). isnot it?
2- are dx and dy for computing r-factor grid's properties?
3-i become so much grateful for your guidance(even a little)
to how i can prepare hinp and rmask in smooth_bath.m (in matlab/utility folder)
that i want to use it for smoothing step
function [hout]=smooth_bath(hinp,rmask,order,rlim,npass)
hinp Input bathymetry to be smoothed (2D array)
rmask Land/Sea masking at RHO-points (2D array)
thanks in advance
fereshte
last question of mine showed that my mind was mixed with different concepts(sorry )
I have tried to manage my questions as below:
1-infact smoothing and land/sea masking process should be done after
creating grid (by Seagrid). isnot it?
2- are dx and dy for computing r-factor grid's properties?
3-i become so much grateful for your guidance(even a little)
to how i can prepare hinp and rmask in smooth_bath.m (in matlab/utility folder)
that i want to use it for smoothing step
function [hout]=smooth_bath(hinp,rmask,order,rlim,npass)
hinp Input bathymetry to be smoothed (2D array)
rmask Land/Sea masking at RHO-points (2D array)
thanks in advance
fereshte
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: grid making serialization
Yes, the bathymetry and the land/sea masking can be computed after the grid is created. I always ignore the bathymetry created by SeaGrid. It is very trivial to interpolate a new bathymetry once that the grid is created. You need to determine what is the minimum and maximum values for the bathymetry (hmin, hmax) to use in ROMS. The bathymetry (h) used in ROMS is always positive and h>0 because we divide by h in couple of places, hmin .le. h .le. hmax. Once that you limit (clipping) the bathymetry range values, you can proceed to smooth it.
SeaGrid can compute the land/sea masking for you but you always have to hand edit it using the editmask.m script provided in the matlab repository (see matlab/landmask sub-directory).
Use the Matlab script hslope.m to compute the r-factor and another quantities. This is also in the matlab repository, see matlab/utility sub-directory.
SeaGrid can compute the land/sea masking for you but you always have to hand edit it using the editmask.m script provided in the matlab repository (see matlab/landmask sub-directory).
Use the Matlab script hslope.m to compute the r-factor and another quantities. This is also in the matlab repository, see matlab/utility sub-directory.
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
Re: grid making serialization
Dear arango
thanks so much for your reply and attention
would you please tell me that computed the land/sea masking by SeaGrid is just Land/Sea masking at RHO-points (2D array) or it Compute Land/Sea U-, V- and PSI-mask too?
Thanks in advance
cheers
thanks so much for your reply and attention
would you please tell me that computed the land/sea masking by SeaGrid is just Land/Sea masking at RHO-points (2D array) or it Compute Land/Sea U-, V- and PSI-mask too?
Thanks in advance
cheers
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: grid making serialization
It really doesn't matter if the other masks at U-, V-, and PSI-points is computed or not. Those masks can be computed from the RHO-mask using the Matlab script landmask/uvp_masks.m. The updated masks can be written to the GRID NetCDF files using landmask/write_mask.m.
Anyway, any landmask generated by SeaGrid needs to be hand-edited using the Matlab GUI landmask/editmask.m always I mentioned this above. The reason for this is because there is not way for an automatic program or GUI to get the land/sea masking representation correctly to the grid and coastline resolution that you are using. You need to use your brain and modeling knowledge to adjust that. We cannot teach you this in this forum.
When hand-editing, you just need to follow some guidelines when adjusting the land/sea mask (RHO-points):
Anyway, any landmask generated by SeaGrid needs to be hand-edited using the Matlab GUI landmask/editmask.m always I mentioned this above. The reason for this is because there is not way for an automatic program or GUI to get the land/sea masking representation correctly to the grid and coastline resolution that you are using. You need to use your brain and modeling knowledge to adjust that. We cannot teach you this in this forum.
When hand-editing, you just need to follow some guidelines when adjusting the land/sea mask (RHO-points):
- We will never be able to perfectly represent the coastline with a fine-difference grid. So you need to make compromises. We usually sink features of the coastline and islands that we cannot represent in our applications.
- You cannot represent all the islands in an application. You choose only the important ones that affect the regional circulation.
- We cannot have 1-point bays or lakes.
- All lakes on land need to be masked to land.
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
Re: grid making serialization
dear arango
would like to offer my heartfelt appreciation for your attention and complite reply.
best regard
fereshte
would like to offer my heartfelt appreciation for your attention and complite reply.
best regard
fereshte