bug message reminder

When adressing a model crash or bug, please remember to include an entire model setup in your post that reproduces the crash or exposes the bug. Also add the XBlog.txt file. This is necessary information for people that are trying to help you. Including your model setup can be achieved by adding the zipped run directory (excluding output) as an attachment to the post.

Forum

RE: Getting Started Tutorial - Generating Model

JW
Jessica Wilson, modified 5 Years ago.

Getting Started Tutorial - Generating Model

Capillary Posts: 3 Join Date: 7/25/14 Recent Posts
Hi,
I am trying to get started using XBeach and I am struggeling a bit. I am having a couple problems and have several questions.

Firstly, when I attempt to view the simple/first model a blank viewing screen comes up and several errors pop up. Here is what I have written and the errors:

>> xb_view(xbr)
Error using xb_read_dims (line 185)
directory or file "C:\XBeach\Matlab Toolbox\xb_20140728111828\params.txt" does not
exist

Error in xb_view>ui_read (line 500)
info.dims = xb_read_dims(info.fpath{i});

Error in xb_view>ui_build (line 134)
ui_read(obj);

Error in xb_view (line 127)
ui_build(fig);



Secondly, if I attempt to generate a non-default model (as in the "Altering My Frist XBeach Model Tutorial), I get an error saying that I have an "Undefined function or variable 'x' ", as shown below:

xbi = xb_generate_model( ...
'bathy', {'x', x, 'z', z}, ...
'waves', {'Hm0', 9, 'Tp', 18}, ...
'tide', {'front', 5, 'back', 0}, ...
'wavegrid', {'nbins', 5}, ...
'settings', {'tstop', 7200, 'morfac', 5});
Undefined function or variable 'x'. <-Error


I am not sure what the problem is in either of these cases, though I am suspecting I may to download a debugged version of a few files...
I am working with the latest zipped file versions of matlab and xbeach. I have also downloaded the seperate netcdfAll .jar file as it didn't seem to be included and was giving me errors. however I cannot find anything in the generate_bathy file that would give me the second error, nor can I understand what is giving me the first viewing error. I would really appreciate your help!
Cheers,

Jessica
Arnold van Rooijen, modified 5 Years ago.

RE: Getting Started Tutorial - Generating Model (Answer)

Swell Posts: 239 Join Date: 11/7/11 Recent Posts
Hi Jessica,

To me it seems these errors are more related to Matlab and/or the toolbox than to Xbeach.

In your first error it says that the params.txt does not exist, is this really the case? You can check if the file is there by using your windows explorer (or any other file browser).

For the second error it seems that your Matlab does not have a variable called 'x' loaded. When you create your grid, there should be an x and a y matrix visible in your workspace. If you don't see that, could you maybe upload the full matlab code you used to generate your model?

Cheers,
Arnold
JW
Jessica Wilson, modified 5 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 3 Join Date: 7/25/14 Recent Posts
Hi Arnold,

I have now solved these problems, it seems as though there are some errors in the tutorials, but I have managed to work through most of them. Thanks for your help!
Cheers,

Jessica
HH
Hanlu Huang, modified 5 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 1 Join Date: 1/29/15 Recent Posts
Hi Jessica, I am now walking through the tutorial.

And I have encountered the same situation as you in problem 2.

Where matlab will say "Undefined function or variable 'z' ".

Can you shed some light on me.

Best.
Arnold van Rooijen, modified 4 Years ago.

RE: Getting Started Tutorial - Generating Model

Swell Posts: 239 Join Date: 11/7/11 Recent Posts
Hi Hanlu, Jessica,

I think this was a bug that is fixed in the last versions. If you are still facing these problems, could you check if it works with the Kingsday Release?

Cheers
Arnold
JH
Jorrit Horst, modified 3 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 2 Join Date: 2/4/15 Recent Posts
Hello,

I am new to Xbeach and i have the same two problems as Jessica mentioned.

I use the kings day release: 2015-10-22_XBeach_v1.22.4867_Kingsday_x64_netcdf_MPI. And the matlab toolbox: xbeach_release_10May2013.

I generate a basic model but when i try to use xb_view it tells me that the directory does not exist. Hoever, all files are in this folder.


>> xbi = xb_generate_model;
>> xbr = xb_run(xbi, 'path','C:\Users\jorrit\Desktop\xbeach_new', 'name', 'MyFirstXBeachModel');
Warning: Warning: the automatic retrieval of XBeach executables depend on daily builds that come from a build
server. Currently, the default XBeach build server is out of order. Therefore, executable obtained using this
function may be from ancient Rome.
> In xb_get_bin (line 89)
In xb_run (line 123)


>> xb_view(xbr)

Error using xb_read_dims (line 185)
directory or file "C:\Users\jorrit\Desktop\xbeach_new\MyFirstXBeachModel\params.txt" does not exist

Error in xb_view>ui_read (line 500)
info.dims = xb_read_dims(info.fpath{i});

Error in xb_view>ui_build (line 134)
ui_read(obj);

Error in xb_view (line 127)
ui_build(fig);



Also, when i add this code from the tutorial I also get the same error as Jessica saying Undefined function or variable 'x':

xbi = xb_generate_model( ...
'bathy', { 'x', x, 'z', z, 'xgrid', {'vardx', 0} }, ...
'waves', { 'Hm0', 9, 'Tp', 18 }, ...
'tide', { 'front', 5, 'back', 0 }, ...
'wavegrid', { 'nbins', 5 }, ...
'settings', { 'tstop', 7200, 'morfac', 5 });



I see this issue coming up a lot in the forum but I cannot find a clear solution.
I hope you can help me out,

Jorrit Horst
AU
Antonio Urti, modified 3 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 5 Join Date: 11/7/14 Recent Posts
Hello,


It is my first experience with xbeach and met the same Jessica and Jorrit problems. Do you have any solution?

thanks a lot, Antonio Urti.
AU
Antonio Urti, modified 3 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 5 Join Date: 11/7/14 Recent Posts
Hello Jessica,

I would like to know how you solved the problems you had with Matlab.
thank you.
Arnold van Rooijen, modified 3 Years ago.

RE: Getting Started Tutorial - Generating Model

Swell Posts: 239 Join Date: 11/7/11 Recent Posts
Hi all,

We have been having a few messages from people with similar errors. It seems related to the Matlab toolbox rather than XBeach. The tutorials you are referring to are pretty much outdated and we have started the process of renewing them.

That may still take a few weeks/months so for now I would recommend to use the manual (http://oss.deltares.nl/documents/48999/49476/XBeach_manual_Kingsday.pdf) for information/inspiration and try to set up a simple simulation for your case, rather than trying to reproduce the tutorials.

Apologies for the confusion.

Cheers,
Arnold
JW
Jessica Wilson, modified 5 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 3 Join Date: 7/25/14 Recent Posts
Hi Arnold,

I have another question for you.
I am attempting to run a simple model in 2D. I have a variable grid size with x.grd, y.grd, and bed.dep files. I have specified all of these in the params.txt file. I also have varying wave boundary conditions and am using instat=4 (jons) for this. The model runs, but one error and several warnings appear. The errors say:
" Error reading file 'filelist.txt'
Check file for incorrect decimal format, line breaks and tab characters"

Do you have any insight into these matters; it seems to me that the filelist is writeen properly and the outputs look reasonable.
I have attached the params, filelist, and one of the 5 jonswap text files. Also, the Error and warning texts are included.
Again, thank you for your help.
Cheers,

Jess
RZ
Rolf Ziel, modified 4 Years ago.

RE: Getting Started Tutorial - Generating Model

Capillary Posts: 3 Join Date: 1/19/16 Recent Posts
Hi all,

I have the same problem regarding Jessica's second problem. Anyone knows how to solve it? I'm new to using XBeach (and new into modelling in general) and haven't found out to run an altered version of the default model.

When I enter the code from the tutorial i also get the error:
"Undefined function or variable 'x'."

When i specified my variables 'x' and 'z' by
x=load('x.grd')
z=load('bed.dep')

Matlab gave an error saying:
"Out of memory. The likely cause is an infinite recursion within the program"

I used the Kingsday release of XBeach


cheers,

Rolf