Hi everybody!
I'm trying to model an estuary up to the tidal limit and, as the subject of the message says, my Courant number is infinity. I read in the forum about this and the problem seems to be solved reducing the time step. I reduced it to 0.03125 s and the problem persists. I'm almost sure that it is related to the bathymetry or the grid, because I've run a different bathimetry and it works. My grid is irregular (161x682) and the minimum step is around 20 m (0.0002 degrees). This is my Grid Generator file:
OUTPUT_FILE : grid.grd
ORIGIN_X : -3.0
ORIGIN_Y : 53.0
GRID_ANGLE : 0.
COORD_TIP : 4
ZONE : 30
<begin_grid_xx>
NUMBER_OF_SEGMENTS : 4
NODES : 0. 0.0598 0.0777 0.1312 0.227135
RESOLUTION : 0.003 0.001 0.0006 0.0002 0.0002
<end_grid_xx>
<begin_grid_yy>
NUMBER_OF_SEGMENTS : 3
NODES : 0. 0.01795 0.08000 0.11633
RESOLUTION : 0.0002 0.0002 0.003 0.003
<end_grid_yy>
I also smoothed the bathymetry with the .exe we can download in the website. The courant number is infinity in the first cell that is defined as water. Do you have any clue why my model becomes instable?
Thanks a lot!!
Isabel
Courant number: Infinity
-
- MOHID Beginner
- Posts: 5
- Joined: Thu Jan 01, 1970 00:00
Irregular vs Regular grids
Hi!
As I had no answer yet, I'd like to reformulate my question. I've checked that my Mohid works with regular grids but no with irregular grids having both more or less the same resolution. If I build a regular grid with a grid step of 0.0005 or 0.0004 degrees, the model runs with Courant number around 2-3 for a time step of 2 sec. When I run a irregular grid like this:
<begin_grid_xx>
NUMBER_OF_SEGMENTS : 4
NODES : 0. 0.0598 0.0777 0.1312 0.227135
RESOLUTION : 0.0005 0.00047 0.00045 0.00043 0.0004
<end_grid_xx>
<begin_grid_yy>
NUMBER_OF_SEGMENTS : 3
NODES : 0. 0.01795 0.08000 0.11633
RESOLUTION : 0.0004 0.00044 0.00048 0.0005
<end_grid_yy>
the Courant number is infinity even for time steps of 0.5 s. Does anyone know why this is happening to me?
As I had no answer yet, I'd like to reformulate my question. I've checked that my Mohid works with regular grids but no with irregular grids having both more or less the same resolution. If I build a regular grid with a grid step of 0.0005 or 0.0004 degrees, the model runs with Courant number around 2-3 for a time step of 2 sec. When I run a irregular grid like this:
<begin_grid_xx>
NUMBER_OF_SEGMENTS : 4
NODES : 0. 0.0598 0.0777 0.1312 0.227135
RESOLUTION : 0.0005 0.00047 0.00045 0.00043 0.0004
<end_grid_xx>
<begin_grid_yy>
NUMBER_OF_SEGMENTS : 3
NODES : 0. 0.01795 0.08000 0.11633
RESOLUTION : 0.0004 0.00044 0.00048 0.0005
<end_grid_yy>
the Courant number is infinity even for time steps of 0.5 s. Does anyone know why this is happening to me?
-
- Site Admin
- Posts: 349
- Joined: Thu Jan 01, 1970 00:00
- Location: Instituto Superior Tecnico - Lisbon - Portugal
- Contact:
-
- MOHID Beginner
- Posts: 5
- Joined: Thu Jan 01, 1970 00:00
Hi!
I don't know very well what do you want me to show you. I don't have an url site to where the images can be uploaded, so I'm sending them to you by mail. My bathymetry file looks like this:
ILB_IUB : 1 270
JLB_JUB : 1 479
COORD_TIP : 4
ORIGIN : -3.045500 53.84950
GRID_ANGLE : 0.0000000E+00
LATITUDE : -9.8999995E+15
LONGITUDE : -9.8999995E+15
FILL_VALUE : -99.00000
<BeginXX>
0.0000000E+00
5.9510616E-04
1.1897059E-03
1.7837998E-03
2.3773883E-03
2.9704717E-03
...
0.2263348
0.2267350
0.2271349
<EndXX>
<BeginYY>
0.0000000E+00
3.9798394E-04
7.9642795E-04
1.1953283E-03
1.5946850E-03
...
0.1158714
0.1163300
<EndYY>
<BeginGridData2D>
-99.00000
-99.00000
-99.00000
...
-99.00000
-99.00000
-99.00000
<EndGridData2D>
One of my tests was to build a regular bathymetry with the Grid Generator, same x,y step that the one that works and that was built with Mohid Gis, but it didn't work.
This made me think that it was a problem with decimals, but it isn't. I have rounded every number to 4 decimals in irregular grids and it's still not working (while it did work for the regular grid built with the Grid Generator). Therefore, I don't know if my problem is really related to the bathymetry or the way that the Grid Generator builds the grids.
Anyway, can you send me the Mohid double precision executable?
Thanks,
Isabel
I don't know very well what do you want me to show you. I don't have an url site to where the images can be uploaded, so I'm sending them to you by mail. My bathymetry file looks like this:
ILB_IUB : 1 270
JLB_JUB : 1 479
COORD_TIP : 4
ORIGIN : -3.045500 53.84950
GRID_ANGLE : 0.0000000E+00
LATITUDE : -9.8999995E+15
LONGITUDE : -9.8999995E+15
FILL_VALUE : -99.00000
<BeginXX>
0.0000000E+00
5.9510616E-04
1.1897059E-03
1.7837998E-03
2.3773883E-03
2.9704717E-03
...
0.2263348
0.2267350
0.2271349
<EndXX>
<BeginYY>
0.0000000E+00
3.9798394E-04
7.9642795E-04
1.1953283E-03
1.5946850E-03
...
0.1158714
0.1163300
<EndYY>
<BeginGridData2D>
-99.00000
-99.00000
-99.00000
...
-99.00000
-99.00000
-99.00000
<EndGridData2D>
One of my tests was to build a regular bathymetry with the Grid Generator, same x,y step that the one that works and that was built with Mohid Gis, but it didn't work.
This made me think that it was a problem with decimals, but it isn't. I have rounded every number to 4 decimals in irregular grids and it's still not working (while it did work for the regular grid built with the Grid Generator). Therefore, I don't know if my problem is really related to the bathymetry or the way that the Grid Generator builds the grids.
Anyway, can you send me the Mohid double precision executable?
Thanks,
Isabel
-
- Site Admin
- Posts: 349
- Joined: Thu Jan 01, 1970 00:00
- Location: Instituto Superior Tecnico - Lisbon - Portugal
- Contact:
Hi,
I could not understand if you were able to open and view the grid file generated by GridGenerator (with irregular grid size spacing) in MOHID GIS?
Can you send me an image of the grid plotted in MOHID GIS by mail (luis_at_mohid.com -> replace the _at_ by @).
In your bathymetry file sample you've posted, in the GridData2D section:
Are all the values equal to -99?
Cheers,
Luis
I could not understand if you were able to open and view the grid file generated by GridGenerator (with irregular grid size spacing) in MOHID GIS?
Can you send me an image of the grid plotted in MOHID GIS by mail (luis_at_mohid.com -> replace the _at_ by @).
In your bathymetry file sample you've posted, in the GridData2D section:
<BeginGridData2D>
-99.00000
-99.00000
-99.00000
...
-99.00000
-99.00000
-99.00000
<EndGridData2D>
Are all the values equal to -99?
Cheers,
Luis
-
- MOHID Beginner
- Posts: 5
- Joined: Thu Jan 01, 1970 00:00
-
- Site Admin
- Posts: 349
- Joined: Thu Jan 01, 1970 00:00
- Location: Instituto Superior Tecnico - Lisbon - Portugal
- Contact:
Hi Isabel,
I found out what is the problem, which is a bit tricky because it has not been properly documented.
In the current version of MOHID, the grid definition when using simple geographical coordinates (COORD_TIP : 4) the keywords LATITUDE and LONGITUDE must correspond to a coordinate of a point inside your domain.
Because in the irregular grid file you had:
this caused the model to not being able to properly convert from geographical coordinates to metric coordinates which eventually caused the for the dimensions of the grid assume infinity values and the model to calculate a infinity courant and crash.
To solve the problem, simply define the LATITUDE and LONGITUDE keywords with a coordinate of a point inside your domain. (it may also be a point outside the domain but is has to be near). This is because the projection that it is computed uses this reference point. Actually this point should be automatically computed by the model in order to avoid errors like yours.
Hope to have helped,
Luis
I found out what is the problem, which is a bit tricky because it has not been properly documented.
In the current version of MOHID, the grid definition when using simple geographical coordinates (COORD_TIP : 4) the keywords LATITUDE and LONGITUDE must correspond to a coordinate of a point inside your domain.
Because in the irregular grid file you had:
LATITUDE : -9.8999995E+15
LONGITUDE : -9.8999995E+15
this caused the model to not being able to properly convert from geographical coordinates to metric coordinates which eventually caused the for the dimensions of the grid assume infinity values and the model to calculate a infinity courant and crash.
To solve the problem, simply define the LATITUDE and LONGITUDE keywords with a coordinate of a point inside your domain. (it may also be a point outside the domain but is has to be near). This is because the projection that it is computed uses this reference point. Actually this point should be automatically computed by the model in order to avoid errors like yours.
Hope to have helped,
Luis
Return to “MOHID GUI (discontinued)”
Who is online
Users browsing this forum: No registered users and 1 guest