ADCIRC Basics
Jan 15, 2014. Running the serial version of the code.
- Copy the code into one of your directories:
cp /org/groups/chg/clint/PADCIRC/trunk_130423_jcd_packed.tar
- Type
tar xvf *.tar
. This will create a bunch of directories. - The ADCIRC source code is in directory src, SWAN is in swan, and the makefiles are in work
cd work
- Type
make clean
- Type
make adcirc
. This makes the serial version of the code. The compiler options are in the filecmplrflags.mk
, but if you are on ICES machines or TACC machines you shouldn't need to change these. - Go back up one directory and make a new directory called
testcases
. We will put some files for various test cases in here. - In the testcases directory, make a new directory called
Channeltest
- cd to this directory, and type
cp /org/groups/chg/clint/PADCIRC/Projects/Channel_test/fort.14 cp /org/groups/chg/clint/PADCIRC/Projects/Channel_test/fort.15
- Let's open
fort.14
and look at it. This file is generated by SMS or some grid generation program. It contains the mesh and boundary condition information. The first number is the number of elements, and the second is the number of nodes. For each node, it reads the node number, x and y coordinates, and bathymetry. (The coordinates may be in meters or in degrees (lon/lat). This is specified by the variableICS
in thefort.15
file.ICS=1
is for meters,ICS=2
is for lon/lat or spherical coordinates. Bathymetry is always in meters). Then for each element, thefort.14
file lists the nodes attached to that element (the connectivity table). The boundary condition information is at the bottom of the file. - Open
fort.15
. It contains a lot of parameters, most of which you don't need to change. The parameters which you commonly will change are the following:DT--timestep
. Units are in seconds.RNDAY
--number of days to simulate. Units are days, gets converted to seconds in the code.NOUTE
,TOUTSE
,TOUTFE
,NSPOOLE
-- this is station information for elevation hydrographs.NOUTE = 1
means "yes, print station information".NOUTE = 0
means skip it.TOUTSE
is the first time to start printing station data,TOUTFE
is the time to stop printing station data.NSPOOLE
is the increment of time steps at which to print station data.NSPOOLE = 10
means print every 10 time steps.- The next line is the total number of elevation stations. The next xx lines are the coordinates of the stations. These may be in meters or in lon/lat, depending on whether the mesh data in fort.14 is in meters or in degrees. If it is in degrees it gets changed internally in the code to meters. The internal units in the code are seconds and meters.
- The next few lines are the same information for velocity and meteorological station data.
- Note that elevation data is written to
fort.61
and velocity data tofort.62
. NOUTGE
,TOUTSGE
,TOUTFGE
,NSPOOLGE
: this is for global elevation data, the so-calledfort.63
file.NOUTGE = 1
means write,= 0
means don't write.TOUTSGE
is the start time,TOUTFGE
is the stop time,NSPOOLGE
says how often.NOUTGV
,TOUTSGV
,TOUTFGV
,NSPOOLGV
: same as above but for velocity data.
- Given the input files as they are, cp the executable
adcirc
from the work directory. Typeadcirc
and the code should start running. - Let's look at the output files:
fort.61
-- contains the station data for elevationfort.62
-- contains the station data for velocityfort.63
-- contains global elevation datamaxele.63
--contains the maximum elevation at each node over the entire simulation (useful mainly for storm surge applications).fort.67
andfort.68
contain hot start information.
- Let's process the
fort.61
file and plot station data in matlab.- Copy the code
/org/groups/chg/clint/DG_SWEM/data_tools/extract_stations.F
- Compile the code
- Run it, it will prompt you for some input:
enter number of files to process
. Type1
enter number of stations.
This is the number of stations specified in thefort.15
file. In this example we have 8 stations. Type8
.enter fname
Enter the file namefort.61
.scalar=0 or vector=1
This is scalar data so enter0
. Once this is done, you will see filesstatxxxx.dat
for each station. This is in the format oftime vs. data
so you can load it in matlab and plot it. The velocity data can also be processed using the same program. The file name isfort.62
and it is vector data. It will also write the data tostatxxxx.dat
so it will overwrite what you have already. If you want to save the elevation data move it to a different place.HOTSTART
: say we want to go back and run this test case out to 10 days from where we left off. There are 2 hot start files,fort.67
andfort.68
. See which one was last written. Open thefort.15
file, and change the parameterIHOT
from0
to either67
or68
. ChangeRNDAY
to10.0
and runadcirc
again. It should pick up where it left off, it will include all of the output written up to the point of the hotstart.
- Copy the code
Note: In the trunk_130423/work
directory, check the file cmplrflags.mk
and look for the character string intel-lonestar
. You will see a bunch of compiler options. Make sure the -DDEBUG_WARN_ELEV
option is commented out, as so:
DA := -DREAL8 -DLINUX -DCSCA #-DDEBUG_WARN_ELEV -fpe-all=0 -check all -traceback DP := -DREAL8 -DLINUX -DCSCA -DCMPI #-DDEBUG_WARN_ELEV # -fpe-all=0 -check all -traceback
You will need to recompile.
Last modified
11 years ago
Last modified on Jan 24, 2014, 5:03:42 PM
Note:
See TracWiki
for help on using the wiki.