Hi,
I want to plot my Roms output with matlab tool Rslice.
In Rslice the default start variable is bathymetry h; but in my Roms application my bathymetry can change with time and so it is a 3D variable calls 'bath'. If I want to use as the startup variable 'bath' rather than h, I type:
f = /home/michele/Desktop/ocean_his.nc
rslice ( 'file', f, 'variable', 'bath' )
WARNING: Classified as XY
??? Undefined function or variable "h".
Error in ==> rslice/private/snc_roms_get_grid at 140
hmin=min(min(h));
Error in ==> rslice/private/rslice_initialize>rslice_init_grid at 660
roms_grid = snc_roms_get_grid ( gdata.ncfile_list{1} );
Error in ==> rslice/private/rslice_initialize at 187
gdata.rslice_grid = rslice_init_grid ( hObject, gdata );
Error in ==> rslice>rslice_OpeningFcn at 480
rslice_initialize ( hObject, options );
Error in ==> gui_mainfcn at 166
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in ==> rslice at 324
gui_mainfcn(gui_State, varargin{:});
It doesn't work as above if I use any variables of my netcdf file as startup variable.
I use ncview to view quickly my Netcdf output file.But It doesn't plot in vertical coordinate. Is there a software like ncview or any tool for Matlab for beginners?
I'm novice in modelling.I'm student and I need to plot my Roms output for my graduate thesis.
I need your help!
Thank so much for advice!
Michele
Problem plotting with Rslice
Thanks Kate for your advices (here and in my question about wave_time)!!
Well, in my application (for my graduate thesis on december) I want to study sediment trasport in a bathymetry with a trench dredged perpendicular to the shoreline. Because I'm a very beginner in modelling and so in Roms, I started to look some Roms 'canned application' and I thinked that Shoreface was a good application for my case.
So I created my Netcdf files: a rectangular grid (xlen=300 and ylen=2000, with tile partition 59x202x20) and a forcing file with waves informations as in Shoreface.But in shoreface there is only one value of wave_time; I create my forcing file with wave data from a previous Swan run; as I write in my post about wave_time, I have a lot of values of Hwave,Dwave,Ubot,ecc and every Netcdf variables change along wave_time dimension.
Then in my header file I add
#ifdef SEDIMENT
# define SED_MORPH
so I can study how bathymetry changes with sediments trasport; when I add SED_MORPH in header file, in my netcdf output there isn't h (that is a 2D variable) but there is 'bath' (that is a 3D variable,with dimension ocean_time).
Some suggestions or advices?
IDV is 'UNAVCO GEON IDV'?
Thanks so much Kate!
Michele.
Well, in my application (for my graduate thesis on december) I want to study sediment trasport in a bathymetry with a trench dredged perpendicular to the shoreline. Because I'm a very beginner in modelling and so in Roms, I started to look some Roms 'canned application' and I thinked that Shoreface was a good application for my case.
So I created my Netcdf files: a rectangular grid (xlen=300 and ylen=2000, with tile partition 59x202x20) and a forcing file with waves informations as in Shoreface.But in shoreface there is only one value of wave_time; I create my forcing file with wave data from a previous Swan run; as I write in my post about wave_time, I have a lot of values of Hwave,Dwave,Ubot,ecc and every Netcdf variables change along wave_time dimension.
Then in my header file I add
#ifdef SEDIMENT
# define SED_MORPH
so I can study how bathymetry changes with sediments trasport; when I add SED_MORPH in header file, in my netcdf output there isn't h (that is a 2D variable) but there is 'bath' (that is a 3D variable,with dimension ocean_time).
Some suggestions or advices?
IDV is 'UNAVCO GEON IDV'?
Thanks so much Kate!
Michele.
That's cool that SED_MORPH does that - I'll have to try it someday.
IDV is http://www.unidata.ucar.edu/software/idv/
But now that I think of it, telling it we have ROMS s-coordinates will probably make it too go looking for h instead of bath. Maybe the USGS gang will pipe up about what to use - or advise you to hack the Matlab code.
IDV is http://www.unidata.ucar.edu/software/idv/
But now that I think of it, telling it we have ROMS s-coordinates will probably make it too go looking for h instead of bath. Maybe the USGS gang will pipe up about what to use - or advise you to hack the Matlab code.
sed_morph activates the time dependent bathymetry, so that the changes in "h" feed back to the momentum, etc. When activated, the netcdf file contains the variable "bath" instead of h, as you found out.
So I just wanted to say that you are experiencing a correct behavior from the model.
Let us know how it goes.
-j
So I just wanted to say that you are experiencing a correct behavior from the model.
Let us know how it goes.
-j
Thanks!
Indeed I solved the problem by modifying snc_roms_getgrid.m
a) line 33; <I>
b) line 140; h=x_rho*0; h(1,1)=20; h(2,2)=-20;
%these command are placed before before hmin=min(min(h));
%20 and -20 are the upper and lower limits of our bathymetry
c) line 172; <comment>; <replece>;
It is possible that some steps are useless or redundant but rslice.m worked.
I actually needed also to produce movies and other kind of fancy plots.
Therefore I ended up with doing some files from scratch that load the ROMS output with MEXCDF routines.
ciao. michele.
Indeed I solved the problem by modifying snc_roms_getgrid.m
a) line 33; <I>
b) line 140; h=x_rho*0; h(1,1)=20; h(2,2)=-20;
%these command are placed before before hmin=min(min(h));
%20 and -20 are the upper and lower limits of our bathymetry
c) line 172; <comment>; <replece>;
It is possible that some steps are useless or redundant but rslice.m worked.
I actually needed also to produce movies and other kind of fancy plots.
Therefore I ended up with doing some files from scratch that load the ROMS output with MEXCDF routines.
ciao. michele.