Changeset 2989


Ignore:
Timestamp:
May 27, 2006, 11:28:10 AM (19 years ago)
Author:
ole
Message:

Ready to run parallel stochastic study (I hope)

Location:
development/stochastic_study
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • development/stochastic_study/project.py

    r2984 r2989  
    2727
    2828# Stats (Suresh ?)
    29 number_of_realisations = 16000
     29number_of_realisations = 8000
    3030#std_dev = 0.0026  #Range is 26.035 cm
    3131#std_dev = 0.0013  #Range is 26.035 cm
    3232std_dev = 0.0006  #Range is 26.035 cm
    3333mean = 0.0
    34 blocksize = 100 #How many realisations to fit at a time
     34blocksize = 10 #How many realisations to fit at a time
    3535
    3636number_of_bins = 10
  • development/stochastic_study/run_model.py

    r2984 r2989  
    9494for filename in os.listdir(project.working_dir):
    9595    if filename.startswith(project.basename) and filename.endswith('.pck'):
    96         #print 'Reading %s' %filename
     96        #print 'P%d: Reading %s' %(myid, filename)
    9797        fid = open(filename)
    9898        V = cPickle.load(fid)
    9999        fid.close()
    100100
     101        #if myid == 0:
     102        #    print 'V', V[6:7,:]
     103           
    101104        # For each column (each realisation)
    102105        for i in range(V.shape[1]):
     
    108111                domain.set_name(name)                     #Output name
    109112                domain.set_quantity('elevation', V[:,i])  #Assign bathymetry
     113
     114                print 'P%d: Setting quantity %d: %s' %(myid, i, str(V[:4,i]))
     115               
    110116                domain.set_time(0.0)                      #Reset time
    111117
     
    132138                # Now extract the 3 timeseries (Ch 5-7-9) and store them
    133139                # 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')
    134143                f = file_function(project.working_dir + domain.filename + '.sww',
    135144                                  quantities='stage',
     
    140149                simulation_name = project.working_dir + \
    141150                                  project.basename + '_realisation_%d' %realisation
     151
     152                print 'P%d: Writing to file %s'\
     153                      %(myid, simulation_name + '_' + name + '.txt')
    142154
    143155                for k, name in enumerate(project.gauge_names):
Note: See TracChangeset for help on using the changeset viewer.