Changeset 8787


Ignore:
Timestamp:
Mar 28, 2013, 10:42:14 PM (12 years ago)
Author:
steve
Message:

Getting the validate script to work in Okushiri validation tests

Location:
trunk/anuga_core/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/file_function.py

    r8780 r8787  
    189189    fid.close()
    190190
    191     # FIXME SR: This test doesn't seem to work with netcdf4
    192191    if line[:3] == 'CDF':
    193192        return get_netcdf_file_function(filename,
     
    305304    # Get variables
    306305    # if verbose: log.critical('Get variables'    )
    307     time = fid.variables['time'][:]   
     306    time = fid.variables['time'][:]
     307
    308308    # FIXME(Ole): Is time monotoneous?
    309309
  • trunk/anuga_core/source/anuga/utilities/compile.py

    r8753 r8787  
    1414
    1515import os, string, sys
     16
    1617
    1718NETCDF_LIB_DIR = os.getenv('NETCDF_LIB_DIR', '')
  • trunk/anuga_core/source/anuga_validation_tests/Case_studies/Okushiri/compare_timeseries_with_measures.py

    r8780 r8787  
    1919from anuga.shallow_water.sww_interrogate import get_maximum_inundation_location
    2020
    21 if sys.platform == 'win32':
    22     # Windows has a problem when this module is run through
    23     # os.system as done by validate_okushiri.
    24     # See https://datamining.anu.edu.au/anuga/ticket/235
    25 
    26     # If you want to see the plots from this validation,
    27     # run this module by itself with this if clause removed.
     21##if sys.platform == 'win32':
     22##    # Windows has a problem when this module is run through
     23##    # os.system as done by validate_okushiri.
     24##    # See https://datamining.anu.edu.au/anuga/ticket/235
     25##
     26##    # If you want to see the plots from this validation,
     27##    # run this module by itself with this if clause removed.
     28##    plotting = False
     29##   
     30##else:
     31try:
     32    from pylab import ion, hold, plot, title, legend
     33    from pylab import xlabel, ylabel, savefig
     34    hold(False)  # Check if this command can be issued
     35except:
     36    print 'Could not import pylab'
    2837    plotting = False
    29    
    3038else:
    31     try:
    32         from pylab import ion, hold, plot, title, legend
    33         from pylab import xlabel, ylabel, savefig
    34         hold(False)  # Check if this command can be issued
    35     except:
    36         print 'Could not import pylab'
    37         plotting = False
    38     else:
    39         # Create plots as png files
    40         plotting = True
     39    # Create plots as png files
     40    plotting = True
    4141   
    4242
     
    168168# Windows tolerances
    169169rtol = 1.0e-2
    170 atol = 1.0e-3
     170atol = 1.0e-2
    171171print 'Precisions used: rtol=%e, atol=%e' %(rtol, atol)
    172172
     173
     174#print reference_time
    173175for k, name in enumerate(gauge_names):
    174176
  • trunk/anuga_core/source/anuga_validation_tests/Case_studies/Okushiri/run_okushiri.py

    r8786 r8787  
    7373    domain.set_flow_algorithm(alg)
    7474    domain.set_CFL(cfl)
     75       
    7576
     77    #------------------------------------------------------------------------------
     78    # Produce a documentation of parameters
     79    #------------------------------------------------------------------------------
     80    parameter_file=open('parameters.tex', 'w')
     81    parameter_file.write('\\begin{verbatim}\n')
     82    from pprint import pprint
     83    pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)
     84    parameter_file.write('\\end{verbatim}\n')
     85    parameter_file.close()
     86       
    7687    #-------------------------
    7788    # Boundary Conditions
Note: See TracChangeset for help on using the changeset viewer.