-
Notifications
You must be signed in to change notification settings - Fork 3
Phase 1
To start phase 1 you need to generate the correct input files from the pileheight records and the uncertain input list.
For testing, I used the following pileheight records and uncertain input list
- /projects/gmfg/montserrat-2012/d_20cells/uncertain_input_list.txt
- /projects/gmfg/montserrat-2012/d_20cells/output_files_20cells/pileheight*
To generate the first two text files that are needed, a python script (extract.py) is run.
$ cd emulator/src/scripts
$ sbatch extract.slurm
Note that you will need to change some of the arguments inside the slurm script.
This will produce two output files
- phData.txt (rohit.txt)
- phMetaData.txt (meta_data.txt)
Next, run the following to create macro_resamples.tmp
$ cd emulator/src/scripts
$ module load matlab
$ matlab -nosplash -nodesktop -r "gen_random_macro_emulator_resample_inputs_Montserrat_Take2(131072,'/panasas/scratch/kmarcus2/emulator/input'); exit;"
This function takes two arguments. The first is the number of re-sample points you want to create (should be some power of two) and the second is the output directory where you want macro_resamples.tmp to go.
Next, you need to create montserrat_take2_vol_dir_bed_int.phm from the matlab scripts
$ cd emulator/src/scripts
$ module load matlab
$ matlab -nosplash -nodesktop -r "make_initial_hazard_map_Montserrat_Take2('/panasas/scratch/kmarcus2/emulator/input'); exit;"
This functions takes one argument, the output directory where the .phm file will go. Note that if you change pileheight records, you will have to change some of the variables inside this script. You will mainly need to change the variables that define the box boundary.
Once you have all of the input files, you can run the bash script to insert the data into Netezza. Note that there are some variables in emulator_netezza.sh that you will need to change.
$ emulator/src/scripts/emulator_netezza.sh &> /panasas/scratch/kmarcus2/emulator/logs/log.eo &
After this has ran, there will be 5 output files (the output directory is defined in emulator_netezza.sh)
- input.out
- phm.txt
- resamples.txt
- sample_count.txt
- uniq_coords.txt
All of these files except for input.out are needed for phase 2. Also needed for phase 2 is the uncertain_input_list.txt text file that was used through out the creating process for the input files. This file should be put in the same folder as the other output files, although it is not necessary (all file locations are declared in DEFINE statements in the mpi c++ code).