Changeset 2989
- Timestamp:
- May 27, 2006, 11:28:10 AM (19 years ago)
- Location:
- development/stochastic_study
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
development/stochastic_study/project.py
r2984 r2989 27 27 28 28 # Stats (Suresh ?) 29 number_of_realisations = 1600029 number_of_realisations = 8000 30 30 #std_dev = 0.0026 #Range is 26.035 cm 31 31 #std_dev = 0.0013 #Range is 26.035 cm 32 32 std_dev = 0.0006 #Range is 26.035 cm 33 33 mean = 0.0 34 blocksize = 10 0#How many realisations to fit at a time34 blocksize = 10 #How many realisations to fit at a time 35 35 36 36 number_of_bins = 10 -
development/stochastic_study/run_model.py
r2984 r2989 94 94 for filename in os.listdir(project.working_dir): 95 95 if filename.startswith(project.basename) and filename.endswith('.pck'): 96 #print ' Reading %s' %filename96 #print 'P%d: Reading %s' %(myid, filename) 97 97 fid = open(filename) 98 98 V = cPickle.load(fid) 99 99 fid.close() 100 100 101 #if myid == 0: 102 # print 'V', V[6:7,:] 103 101 104 # For each column (each realisation) 102 105 for i in range(V.shape[1]): … … 108 111 domain.set_name(name) #Output name 109 112 domain.set_quantity('elevation', V[:,i]) #Assign bathymetry 113 114 print 'P%d: Setting quantity %d: %s' %(myid, i, str(V[:4,i])) 115 110 116 domain.set_time(0.0) #Reset time 111 117 … … 132 138 # Now extract the 3 timeseries (Ch 5-7-9) and store them 133 139 # in three files for this realisation 140 141 print 'P%d: Extracting time series for realisation %d from file %s'\ 142 %(myid, realisation, project.working_dir + domain.filename + '.sww') 134 143 f = file_function(project.working_dir + domain.filename + '.sww', 135 144 quantities='stage', … … 140 149 simulation_name = project.working_dir + \ 141 150 project.basename + '_realisation_%d' %realisation 151 152 print 'P%d: Writing to file %s'\ 153 %(myid, simulation_name + '_' + name + '.txt') 142 154 143 155 for k, name in enumerate(project.gauge_names):
Note: See TracChangeset
for help on using the changeset viewer.