Changeset 7621


Ignore:
Timestamp:
Feb 11, 2010, 4:44:49 PM (14 years ago)
Author:
griffin
Message:

updated geraldton staging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DVD_images/update_DVD_images.py

    r7515 r7621  
    282282 # paths to various source directories
    283283 'data_src_path':   'data/western_australia/geraldton_tsunami_scenario/anuga',
    284  'arcgis_src_path': 'data/western_australia/geraldton_tsunami_scenario/ArcGIS',
    285  'viz_src_path':    'data/western_australia/geraldton_tsunami_scenario/visualisations',
    286284 'proj_src_path':   'sandpits/jgriffin/ANUGA/anuga_work/production/wa/geraldton_2009',
    287  'report_src_path': 'data/four_east_coast_communities_reporting/Professional_opinions_final',
     285 'report_src_path': 'data/western_australia/documents', #need to update this
     286 'arcgis_src_path': 'data/western_australia/geraldton_tsunami_scenario/anuga',
     287 'observation_src_path': '/nas/gemd/georisk/tsunami/WA_tsunami_validation/observations',
     288 'viz_src_path':    'data/western_australia/geraldton_tsunami_scenario/anuga',
    288289 
    289290 # paths to destination directories (under 'jurisdiction' root)
    290291 'data_dst_path':   'data/western_australia/geraldton_tsunami_scenario/anuga',
    291292 'proj_dst_path':   'project',
    292  'viz_dst_path':    'documents',
    293  'arcgis_dst_path': 'data/western_australia/geraldton_tsunami_scenario/ArcGIS',
    294293 'report_dst_path': 'documents',
    295  
     294 'viz_dst_path':    'figures',
     295 'arcgis_dst_path': 'gis',
     296 'observation_dst_path': 'field_observations',
    296297 # copy or create whole directories
    297  'make_dst_dirs':   ['boundaries', 'meshes', 'outputs', 'topographies'],
    298  'copy_data_dirs':  ['polygons',  'gauges'],
     298 'make_dst_dirs':   [ 'boundaries','meshes', 'outputs', 'topographies','polygons',  'gauges'],
     299 'copy_data_dirs':  [],
    299300
    300301 # copy 'data' files or directories
     
    302303                     #'topographies/Data_lineage.doc',
    303304                     'outputs/2004_tsunami_validation',
     305                     'gauges/geraldton_validation_gauges.csv',
    304306                     'boundaries/wa04_val',
    305307                     'boundaries/landward_boundary.csv',
    306                      'boundaries/urs_order.csv'
     308                     'boundaries/urs_order.csv',
     309                     'boundaries/URSGA_gauges_All_WA.csv',
     310                     #'boundaries/URSGA_gauges_WA',
     311                     'polygons/buffer_20m.csv',
     312                     'polygons/ocean_initial_condition.csv',
     313                     'polygons/land_initial_condition.csv',
     314                     'polygons/poly_all.csv',
     315                     'polygons/harbour.csv',
     316                     'polygons/CBD_500m.csv',
     317                     'polygons/CBD_1km.csv',
     318                     'polygons/island_wallabi_poly2.csv',
     319                     'polygons/island_dingiville_poly.csv',
     320                     'polygons/island_pelsaert_poly.csv',
     321                     'polygons/land_initial_condition.csv',
     322                     'polygons/ocean_initial_condition.csv',
     323                     'meshes/CBD.csv',
     324                     'meshes/wall.csv'
    307325                    ],
    308326
     
    320338 'copy_arc_files':  [],
    321339
     340 # copy 'observation' files or directories
     341 'copy_observation_files':  ['PostTsunamiSurveyData_RunUp.xls'],
     342
    322343 # copy 'report' file
    323  'copy_report_files':  ['GA_record_WA_tsunami_validation.pdf']
     344 'copy_report_files': ['Horspool_et_al_GA_record_2009_XX.pdf']
    324345}
    325346
     
    350371    '''Copy a file or complete directory.'''
    351372
     373##    os.system('cp -R %s %s' % (src, dst))
     374
     375    #print('copy_file_or_dir: %s -> %s' % (src, dst))
     376   
    352377    # could be a file or directory being copied
    353378    try:
    354379        shutil.copyfile(src, dst)
    355380    except IOError, e:
     381        print 'str(e)=%s' % str(e)
    356382        if 'Is a directory' in str(e):
    357383            shutil.copytree(src, dst)
     
    378404    arcgis_src_path = os.path.join(main_path, j_dict['arcgis_src_path'])
    379405    arcgis_dst_path = os.path.join(os.getcwd(), j_name, j_dict['arcgis_dst_path'])
     406    observation_src_path = j_dict['observation_src_path']
     407    observation_dst_path = os.path.join(os.getcwd(), j_name, j_dict['observation_dst_path'])
    380408    report_src_path = os.path.join(main_path, j_dict['report_src_path'])
    381409    report_dst_path = os.path.join(os.getcwd(), j_name, j_dict['report_dst_path'])
     
    385413    log('Getting project from: %s' % proj_src_path)
    386414    log('Getting ArcGIS from: %s' % arcgis_src_path)
     415    log('Getting Observations from: %s' % observation_src_path)
    387416    log('Getting report from: %s' % report_src_path)
    388417    log('')
     
    442471        copy_file_or_dir(src_file, new_file)
    443472
     473     # copy required observational files
     474    log('Creating directory: %s' % observation_dst_path)
     475    os.makedirs(observation_dst_path)
     476    for copy_file in j_dict['copy_observation_files']:
     477        src_file = os.path.join(observation_src_path, copy_file)
     478        new_file = os.path.join(observation_dst_path, copy_file)
     479        log('Copying: %s' % copy_file)
     480        copy_file_or_dir(src_file, new_file)
     481
    444482    # copy report
    445483    log('Creating directory: %s' % report_dst_path)
     
    447485        src_file = os.path.join(report_src_path, copy_file)
    448486        new_file = os.path.join(report_dst_path, copy_file)
     487        print 'src', src_file
     488        print 'new', new_file
    449489        log('Copying: %s' % copy_file)
    450490        copy_file_or_dir(src_file, new_file)
Note: See TracChangeset for help on using the changeset viewer.