# The commands below were used to successfully install this project # on a new Ubuntu system. # Prerequisites include fortran, Python 3, netCDF4 python module # The conda environment defined in environment_geomin.yml provides the # minimum needed for GeoClaw and should suffice, along for fortran. # Note that this is now set up to run with Clawpack v5.6.1, with a # few minor changes from the pre-release version used for the production runs. # Get Clawpack version 5.6.1 if you don't already have it: # See http://www.clawpack.org/installing.html for other installation options mkdir -p $HOME/clawpack_src cd $HOME/clawpack_src wget https://github.com/clawpack/clawpack/files/3781620/clawpack-v5.6.1.tar.gz tar -xzf clawpack-v5.6.1.tar.gz export CLAW=$HOME/clawpack_src/clawpack-v5.6.1 # install using pip if you want, otherwise add to PYTHONPATH: export PYTHONPATH=$PYTHONPATH:$CLAW # Adjust these environment variables as desired: export FC=gfortran # fortran compiler export FFLAGS='-fopenmp -O2' # gfortran flags for OpenMP and optimization export OMP_NUM_THREADS=8 # how many threads to use # Get the files for this project: cd $HOME # or whereever you want to put the IslandSkagitTHA_2019_code directory wget http://depts.washington.edu/ptha/IslandSkagitTHA_2019/IslandSkagitTHA_2019_code.tar.gz tar -zxf IslandSkagitTHA_2019_code.tar.gz cd IslandSkagitTHA_2019_code # set environment variable required by some Python scripts export WA_EMD_2019=`pwd` # should point to top level of project directories wget http://depts.washington.edu/ptha/IslandSkagitTHA_2019/IslandSkagitTHA_2019_big_files.tar.gz tar -zxf IslandSkagitTHA_2019_big_files.tar.gz # move these big files to the expected places: cd IslandSkagitTHA_2019_big_files mv dtopofiles ../dtopo/ mv topofiles ../topo/ mv fgmax_regions ../info/ mv figs ../report/ # Generate topofiles/PTPS_merged_13s.nc, used in some scripts cd $WA_EMD_2019/topo python convert_PTPS_merged_asc2nc.py # To compile the executable # This only needs to be done once, the same execuatable is used in each # run directory. # First make sure $CLAW points to version 5.6.1 of Clawpack, then: cd $WA_EMD_2019/new_code_561 make xgeoclaw_561 -f Makefile_common_561 # This should create $WA_EMD_2019/xgeoclaw_561 # To run an example: # As a first test, try the code in Runs/SW_Whidbey/SFL # (the Seattle fault event in the SW Whidbey region, which is relatively small) # make the required input files: cd $WA_EMD_2019/Runs/SW_Whidbey/input_files python make_input_files.py # if this script fails, you may need to install more python modules or # use the conda environment described above # go to the run directory: cd $WA_EMD_2019/Runs/SW_Whidbey/SFL # Copy the latest Makefile in to replace the one in this directory, # so that it will use the executable generated above: cp $WA_EMD_2019/new_code_561/Makefile_common_561 Makefile # edit the Makefile if you want the output to go somewhere other than ./_output # edit params.py, in particular: # - replace the etopo1 file referenced by etopo1_-163_-122_38_63_1min.asc # since this is the etopo archived in big_files # - shorten tfinal for the first test so it runs quickly. # making the .data files, running the code, making plots are all done by: make all # See the Makefile for the individual steps performed. # With luck, this created _output and _plots directories # Process the fgmax results and make plots, .nc files, and kml files: python $WA_EMD_2019/new_code/process_fgmax_common.py # The above script also makes a directory `gauges` of gauge plots and .nc files