BC conditions

93 views
Skip to first unread message

Khaled Korichi

unread,
Jun 4, 2012, 12:35:18 PM6/4/12
to claw...@googlegroups.com
Hi all
I want to simulate flood in our watershead in 2D, there is gauge station, located at (x,y), which records time evolution of discharge.

How can I set time evolution of discharge (reading from a file (t, q)) as upstream boundary condition?
With best regards. 


--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Mr KORICHI Khaled
Université Djillali Liabes Sidi Belabbes, ALGÉRIE
Laboratoire de Modélisation et Méthodes de Calcul, Saida, ALGÉRIE
Tel : 213-793909464
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Kyle Mandli

unread,
Jun 4, 2012, 12:42:15 PM6/4/12
to claw...@googlegroups.com
You need to modify the bc.f code for this to work.  Create a local copy and modify the Makefile to use that rather than the library version and modify the particular side you want to have the boundary condition and set the boundary condition for the appropriate side to the user specified one (for instance this would be clawdata.mthbc_xlower = 0 for the left boundary).  As a first go I think I would copy the zero-order extrapolation boundary condition (method 1) and set the cell nearest your gauge to the correct height and let it go and see if it gives you what you want.

Kyle



--
You received this message because you are subscribed to the Google Groups "claw-dev" group.
To post to this group, send email to claw...@googlegroups.com.
To unsubscribe from this group, send email to claw-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/claw-dev?hl=en.

Khaled Korichi

unread,
Jun 5, 2012, 4:45:54 AM6/5/12
to claw...@googlegroups.com
Thank you very mauch. I tried these instructions. It work on 1D but in 2D I receiced thid message.

 WARNING: topotype 1 has been deprecated
 converting to topotype > 1 is encouraged
 python tools for converting files are provided

I dispose Topo file arranged in XYZ How can I convert it to topotype2.
I used this instruction but it did not work
pyclaw.geotools.topotools.converttopotype(inputfile, outputfile, topotypein=1, topotypeout=2, nodata_value=None).

Regards

2012/6/4 Kyle Mandli <kyle....@gmail.com>

Kyle Mandli

unread,
Jun 5, 2012, 12:56:00 PM6/5/12
to claw...@googlegroups.com
If you have a valid XYZ topography file (type 1) everything should work fine, it's just much slower to load at runtime.  I am not sure what state the topography tools are in honestly, I think we were in the middle of refactoring them as there were multiple versions that did slightly different things.  Someone on this list might have a better answer to you on that one.

Kyle

Khaled Korichi

unread,
Jun 6, 2012, 1:12:14 PM6/6/12
to claw...@googlegroups.com
Thank Kyle
whene I useed my XYZ file I received this error message
=
=
=
=
 Running GeoClaw2 ...

 Reading data file: setgeo.data
         first 5 lines are comments and will be skipped
 Reading data file: settsunami.data
         first 5 lines are comments and will be skipped
 Reading data file: settopo.data
         first 5 lines are comments and will be skipped

 WARNING: topotype 1 has been deprecated
 converting to topotype > 1 is encouraged
 python tools for converting files are provided

 Reading topography file  /home/clawpack-4.6.1/apps/tsunami/mekerra/bowl.topotype2                                                                             
 Reading data file: setdtopo.data
         first 5 lines are comments and will be skipped
 Reading data file: setqinit.data
         first 5 lines are comments and will be skipped
   iqinit = 0, no perturbation
 Reading data file: setregions.data
         first 5 lines are comments and will be skipped
 Reading data file: setgauges.data
         first 5 lines are comments and will be skipped
 Reading data file: setfixedgrids.data
         first 5 lines are comments and will be skipped
 Storage allocated...
there are    1 grids with     2500 cells at level   1

 == controller: *** Runtime error: return code = 139

== runclaw: *** fortran returncode =  139    aborting
== runclaw: Done executing xgeoclaw via pyclaw.runclaw.py
== runclaw: Output is in  /home/clawpack-4.6.1/apps/tsunami/mekerra/_output
C:/Python26/python.exe C:/cygwin/home/clawpack-4.6.1/python/pyclaw/plotters/plotclaw.py _output                _plots                setplot.py
Executed setplot successfully
*** No fort.q files found in directory  C:\cygwin\home\clawpack-4.6.1\apps\tsunami\mekerra\_output
make: `.htmls' is up to date.

but when I donwload the topofile from http://www.ngdc.noaa.gov/mgg/gdas/gd_designagrid.html
I received this message :

 Running GeoClaw2 ...

 Reading data file: setgeo.data
         first 5 lines are comments and will be skipped
 Reading data file: settsunami.data
         first 5 lines are comments and will be skipped
 Reading data file: settopo.data
         first 5 lines are comments and will be skipped
At line 385 of file /home/clawpack-4.6.1/geoclaw/2d/lib/topo_mod.f90 (unit = 19, file = '/home/clawpack-4.6.1/apps/tsunami/mekerra/mek.asc')
Fortran runtime error: Bad integer for item 1 in list input

 == controller: *** Runtime error: return code = 512

== runclaw: *** fortran returncode =  512    aborting
== runclaw: Done executing xgeoclaw via pyclaw.runclaw.py
== runclaw: Output is in  /home/clawpack-4.6.1/apps/tsunami/mekerra/_output
C:/Python26/python.exe C:/cygwin/home/clawpack-4.6.1/python/pyclaw/plotters/plotclaw.py _output                _plots                setplot.py
Executed setplot successfully
*** No fort.q files found in directory  C:\cygwin\home\clawpack-4.6.1\apps\tsunami\mekerra\_output
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setrun.py
  Converting  setrun.py  to  setrun.py.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setgeo.data
  Converting  setgeo.data  to  setgeo.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setgauges.data
  Converting  setgauges.data  to  setgauges.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setqinit.data
  Converting  setqinit.data  to  setqinit.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setregions.data
  Converting  setregions.data  to  setregions.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  amr2ez.data
  Converting  amr2ez.data  to  amr2ez.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setfixedgrids.data
  Converting  setfixedgrids.data  to  setfixedgrids.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  settsunami.data
  Converting  settsunami.data  to  settsunami.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  settopo.data
  Converting  settopo.data  to  settopo.data.html
python /home/clawpack-4.6.1/doc/clawcode2html.py --force  setdtopo.data
  Converting  setdtopo.data  to  setdtopo.data.html

Is it about my xyz file or what?

Please your help
Cordialy


2012/6/5 Kyle Mandli <kyle....@gmail.com>

Kyle Mandli

unread,
Jun 6, 2012, 1:17:48 PM6/6/12
to claw...@googlegroups.com
The first error is something other than the topography file although I have no idea what's wrong.  The second try is a problem with the input, probably something being incorrectly set in the setrun.py file.

Kyle
Reply all
Reply to author
Forward
0 new messages