Changeset 3008 for development/stochastic_study
- Timestamp:
- May 29, 2006, 2:09:54 PM (19 years ago)
- Location:
- development/stochastic_study
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
development/stochastic_study/project.py
r3006 r3008 3 3 4 4 # Working dir 5 working_dir = '/mnt/store/stochastic /'5 working_dir = '/mnt/store/stochastic3/' 6 6 import os 7 7 try: … … 27 27 28 28 # Stats (Suresh ?) 29 number_of_realisations = 8000 29 number_of_realisations = 1000 30 #number_of_realisations = 16000 31 30 32 #std_dev = 0.0026 #Range is 26.035 cm 31 #std_dev = 0.0013 #Range is 26.035 cm32 std_dev = 0.0006 #Range is 26.035 cm33 std_dev = 0.0013 #Range is 26.035 cm 34 #std_dev = 0.0006 #Range is 26.035 cm 33 35 mean = 0.0 34 36 blocksize = 10 #How many realisations to fit at a time -
development/stochastic_study/run_model.py
r2989 r3008 32 32 from pyvolution.util import file_function 33 33 from caching.caching import cache 34 import pypar35 34 36 35 # Application specific imports … … 42 41 #----------------------------------------------------------------------------- 43 42 44 myid = pypar.rank() 45 numprocs = pypar.size() 46 processor_name = pypar.Get_processor_name() 43 try: 44 import pypar 45 except: 46 print 'Could not import pypar' 47 myid = 0 48 numprocs = 1 49 processor_name = 'nautilus' 50 else: 51 myid = pypar.rank() 52 numprocs = pypar.size() 53 processor_name = pypar.Get_processor_name() 47 54 48 55 print 'I am process %d of %d running on %s' %(myid, numprocs, processor_name) … … 91 98 92 99 93 realisation = 0100 realisation = 100 94 101 for filename in os.listdir(project.working_dir): 95 102 if filename.startswith(project.basename) and filename.endswith('.pck'): 96 #print 'P%d: Reading %s' %(myid, filename)97 fid = open( filename)103 print 'P%d: Reading %s' %(myid, filename) 104 fid = open(project.working_dir + filename) 98 105 V = cPickle.load(fid) 99 106 fid.close() … … 110 117 name = project.basename + '_P%d' %myid 111 118 domain.set_name(name) #Output name 119 print 'V', V.shape 112 120 domain.set_quantity('elevation', V[:,i]) #Assign bathymetry 113 121
Note: See TracChangeset
for help on using the changeset viewer.