RSQSim Restart and Processing Instructions

From SCECpedia
Revision as of 20:53, 22 February 2019 by Jacquig (talk | contribs) (Created page with "'''Instructions for restarting an RSQSim simulation in order to extend a catalog from where it ended:''' Note: You'll need some of the R scripts from RSQSimPostProcess 1. C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Instructions for restarting an RSQSim simulation in order to extend a catalog from where it ended:

Note: You'll need some of the R scripts from RSQSimPostProcess

1. Create a new directory for the simulation you are setting up, and copy over the cat1.in, cat1.pbs, UCERF3.flt, UCERF3.KZero, and UCERF3.neighbors files.

2. Rename cat1.in and cat1.pbs to match the new catalog name.

3. Update the catalog name and input file name in the new cat2.pbs, and the outNameInfix in the new cat2.in files.

4. Read in catalog 1:

eqs = readEqs("home/user/name/catalog/eqs.catalog1.out")

5. Create the new input files for shear stress, normal stress, and theta from the end of catalog 1 and fill those in for the variables initTauFname, initSigmaFname, and initThetaFname in your cat2.in file:

tmp = mkInitTauSigmaThetaSlipSpeed(eqs, Inf, 
writeTau = "final", writeSlipSpeed = 0,   
				initTauFile="cat2.initTau",
				initSigmaFile="cat2.initSigma",
				initThetaFile = "cat2.initTheta")
  • If the final snapshots (.out.final files) weren’t written out for cat1, but snapshots were written out during the simulations, you can change writeTau = “final” to writeTau = 2 in order to use those snapshots (out.2 files). If no snapshots were written then you’re out of luck and can’t restart that simulation.

6. Get the start time for cat2 and copy the whole number (all 22 digits) into the variable tStart in the new cat2.in file:

tStart = format(tmp$t, digits=22) 	 

7. Read or create a list of pinned patches using the variable pin:

If there is a pin file for cat1:

pin = scan("../cat1.pin") 

Otherwise, the pinned file is just a list of 0's (not pinned) or 1's (pinned) for each patch in the fault model, so if there isn't one, you can just create one of 0's:

pin = rep(0, eqs$fault$np)

8. Update pin from the list of patches that got locked in cat1 and write out the new pin file for cat2:

				
system("grep Eliminating ../*e | awk '{print $4}' > ../cat1.locked")
pin2 = scan(file="../cat1.locked")			
pin[pin2] = 1						
write(pin, file="cat2.pin", ncol=1)				

9. Update the pinnedFname in your cat2.in file to cat2.pin

10. Update maxT in your cat2.in file to the length you want the extended catalog to be (in seconds).