How to check my Grid file?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
safoora.seddigh
Posts: 18
Joined: Wed Jun 06, 2012 3:17 pm
Location: Islamic Azad university

How to check my Grid file?

#1 Post by safoora.seddigh » Wed Feb 13, 2013 2:50 pm

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...

User avatar
arango
Site Admin
Posts: 1117
Joined: Wed Feb 26, 2003 4:41 pm
Location: IMCS, Rutgers University
Contact:

Re: How to check my Grid file?

#2 Post by arango » Wed Feb 13, 2013 3:43 pm

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:

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)
%
You need to download the matlab repository. See :arrow: WikiROMS for more information.

safoora.seddigh
Posts: 18
Joined: Wed Jun 06, 2012 3:17 pm
Location: Islamic Azad university

Re: How to check my Grid file?

#3 Post by safoora.seddigh » Thu Feb 14, 2013 2:28 pm

Hello
thank you so much.

safoora.seddigh
Posts: 18
Joined: Wed Jun 06, 2012 3:17 pm
Location: Islamic Azad university

Re: How to check my Grid file?

#4 Post by safoora.seddigh » Fri Feb 15, 2013 11:57 pm

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

chandrabhushanrai
Posts: 2
Joined: Fri Jun 28, 2013 1:48 am
Location: University of Malaya

Re: How to check my Grid file?

#5 Post by chandrabhushanrai » Tue Jul 02, 2013 10:09 am

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?

evridiki
Posts: 19
Joined: Mon Nov 05, 2012 2:39 pm
Location: National and Kapodistrian University of Athens

Re: How to check my Grid file?

#6 Post by evridiki » Wed Jul 03, 2013 10:16 am

chandrabhushanrai wrote:seagrid2roms.m script provided earlier is giving error?
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
Posts: 2
Joined: Fri Jun 28, 2013 1:48 am
Location: University of Malaya

Re: How to check my Grid file?

#7 Post by chandrabhushanrai » Thu Jul 04, 2013 1:53 am

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

lanerolle
Posts: 157
Joined: Mon Apr 28, 2003 5:12 pm
Location: NOAA

Re: How to check my Grid file?

#8 Post by lanerolle » Mon Jul 08, 2013 3:22 pm

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.

Post Reply