How to check my Grid file?
How to check my Grid file?
Does anyone know how can I check the Grid File produced by Seagrid2roms?
I used seargrid to combine bathymetry.mat, coastline.mat and boundary.dat and thereafter I performed seagrid2roms to produce NetCDF format. In this stage how can I check the NetCDF file to be in correct format?
I am afraid something is being missed in this file and I come accross problems in running...
I used seargrid to combine bathymetry.mat, coastline.mat and boundary.dat and thereafter I performed seagrid2roms to produce NetCDF format. In this stage how can I check the NetCDF file to be in correct format?
I am afraid something is being missed in this file and I come accross problems in running...
- arango
- Site Admin
- Posts: 1356
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: How to check my Grid file?
Very simply, start plotting every field in the Grid NetCDF file. I usually use the script the hslope.m located in the matlab/utilities directory:
You need to download the matlab repository. See
WikiROMS for more information.
Code: Select all
function [x,y,dhdx,dhde,slope,r]=hslope(fname,iprint,iplot);
%
% HSLOPE: Compute and plot ROMS bathymetry slope
%
% [x,y,dhdx,dhde,slope,r]=hslope(fname,iprint,iplot)
%
% This function computes the bathymetry slope from a ROMS NetCDF file.
%
% On Input:
%
% fname NetCDF file name (character string)
% iprint Optional, flag for printing out information (integer):
% iprint = 0, do not print information
% iprint = 1, print information
% iplot Optional, flag for plotting (integer):
% iplot = 0, do not plot data
% iplot = 1, plot data
%
% On Output:
%
% x X-positions (2D array)
% y Y-positions (2D array)
% dhdx Bathymetry gradient in the XI-direction (2D array)
% dhde Bathymetry gradient in the ETA-direction (2D array)
% slope Bathymetry slope (2D array)
% r R-value (2D array)
%
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Re: How to check my Grid file?
Thanks for your help.
As you said, I have checked my grid file .Unfortunately it is not good and I think that I have some mistakes in this file.
Some part of the file does not have any value ! and some part of that has the same value!
I want to make this file again because I think that I missed some part of making grid file procedure.
Would you please say to me the steps of making bathymetry and grid file ?
I have read the forum of ROMS but maybe I can not understand well.
Would you tell me what is the most recent method ( or related links)applicabale to prepair grid file espicially in making mask?
Safoora
As you said, I have checked my grid file .Unfortunately it is not good and I think that I have some mistakes in this file.
Some part of the file does not have any value ! and some part of that has the same value!
I want to make this file again because I think that I missed some part of making grid file procedure.
Would you please say to me the steps of making bathymetry and grid file ?
I have read the forum of ROMS but maybe I can not understand well.
Would you tell me what is the most recent method ( or related links)applicabale to prepair grid file espicially in making mask?
Safoora
-
- Posts: 2
- Joined: Fri Jun 28, 2013 1:48 am
- Location: University of Malaya
Re: How to check my Grid file?
Has the seagrid2roms.m script been updated for netCDF capable matlab?
If yes can the file be made available?
seagrid2roms.m script provided earlier is giving error?
If yes can the file be made available?
seagrid2roms.m script provided earlier is giving error?
-
- Posts: 19
- Joined: Mon Nov 05, 2012 2:39 pm
- Location: National and Kapodistrian University of Athens
Re: How to check my Grid file?
I made my grid netcdf file recently using seagrid and then seagrid2roms. It worked for me (using MATLAB R2009a). Do you think that the problem is your matlab version?chandrabhushanrai wrote:seagrid2roms.m script provided earlier is giving error?
-
- Posts: 2
- Joined: Fri Jun 28, 2013 1:48 am
- Location: University of Malaya
Re: How to check my Grid file?
Yes Evridiki you may be right, the version of Matlab is 8.0.0+ (2012b).
However, I did not use SVN to download seagrid2roms.m file, which was a big mistake
(source: the matlab tar file from web page (myROMS)).
The problem was solved after I updated file from SVN.
And it works fine now.
Thanks
However, I did not use SVN to download seagrid2roms.m file, which was a big mistake
(source: the matlab tar file from web page (myROMS)).
The problem was solved after I updated file from SVN.
And it works fine now.
Thanks
Re: How to check my Grid file?
Make sure to plot all the fields say in Matlab - I usually tend to look at dx (1/pm), dy (1/pn), dmde, dndx, f (Coriolis parameter), the masks (rho-, u-, v- and phi- masks) and also the angle. I sometimes found problems with the angle and have had to compute it outside of Seagrid and overwrite it in the NetCDF file. For some reason or other, the angle field has good values mixed in with zeros in a chequerboard fashion.