wiki:Intro to ADCIRC


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 file, 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 variable ICS in the fort.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, the fort.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 to fort.62.
    • NOUTGE, TOUTSGE, TOUTFGE, NSPOOLGE: this is for global elevation data, the so-called fort.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. Type adcirc and the code should start running.
  • Let's look at the output files:
    • fort.61 -- contains the station data for elevation
    • fort.62 -- contains the station data for velocity
    • fort.63 -- contains global elevation data
    • maxele.63 --contains the maximum elevation at each node over the entire simulation (useful mainly for storm surge applications).
    • fort.67 and fort.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. Type 1 enter number of stations. This is the number of stations specified in the fort.15 file. In this example we have 8 stations. Type 8. enter fname Enter the file name fort.61. scalar=0 or vector=1 This is scalar data so enter 0. Once this is done, you will see files statxxxx.dat for each station. This is in the format of time 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 is fort.62 and it is vector data. It will also write the data to statxxxx.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 and fort.68. See which one was last written. Open the fort.15 file, and change the parameter IHOT from 0 to either 67 or 68. Change RNDAY to 10.0 and run adcirc again. It should pick up where it left off, it will include all of the output written up to the point of the hotstart.

Note: In the trunk_130423/work directory, check the file 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 6 years ago Last modified on 01/24/14 17:03:42