예제 #1
0
# Code for the paper: Using the Wasserstein distance to compare fields of pollutants:
# Application to the radionuclide atmospheric dispersion of the Fukushima-Daiichi accident
# by A. Farchi, M. Bocquet, Y. Roustan, A. Mathieu and A. Querel

#__________________________________________________
#==================================================

from OT.utils.sys.run                              import runCommand
from OT.utils.sys.argv                             import extractArgv
from OT.OTObjects1D.plotting.plottingConfiguration import PlottingConfiguration

# Extract Arguments
arguments   = extractArgv()
configFile  = arguments['CONFIG_FILE']

try:
    printIO = ( arguments['PRINT_IO'] == 'True' )
except:
    printIO = False

# Builds configuration
config      = PlottingConfiguration(configFile)

# Creates figDir
runCommand('mkdir -p '+config.figDir, printIO)

# Plots
plotter     = config.plotter()
plotter.plot()
except:
    outputDir    = arguments['OUTPUT_DIR']
    config       = extractConfig(outputDir) 

config.initial   = 1
config.iterCount = 0

try:
    printIO      = ( arguments['PRINT_IO'] == 'True' )
except:
    printIO      = False

try:
    newIterTarget     = arguments['NEW_ITER_TARGET']
    config.iterTarget = newIterTarget
except:
    pass

# Creates ouputdir
runCommand('mkdir -p '+config.outputDir, printIO)

# Runs algorithm 
algorithm  = config.algorithm()
result     = algorithm.run()

# Saves results
saveResult(config.outputDir, result)

# Analyse
applyAllOperators(config.outputDir)
예제 #3
0
# Code for the paper: Using the Wasserstein distance to compare fields of pollutants:
# Application to the radionuclide atmospheric dispersion of the Fukushima-Daiichi accident
# by A. Farchi, M. Bocquet, Y. Roustan, A. Mathieu and A. Querel

#__________________________________________________
#==================================================

from OT.utils.sys.run import runCommand
from OT.utils.sys.argv import extractArgv
from OT.OTObjects2D.plotting.plottingConfiguration import PlottingConfiguration

# Extract Arguments
arguments = extractArgv()
configFile = arguments['CONFIG_FILE']

try:
    printIO = (arguments['PRINT_IO'] == 'True')
except:
    printIO = False

# Builds configuration
config = PlottingConfiguration(configFile)

# Creates figDir
runCommand('mkdir -p ' + config.figDir, printIO)

# Plots
plotter = config.plotter()
plotter.plot()
from OT.utils.sys.run                        import runCommand
from OT.utils.sys.argv                       import extractArgv
from OT.utils.io.saveResult                  import saveResult
from OT.OTObjects1D.configuration            import Configuration
from OT.OTObjects1D.analyse.computeOperators import applyAllOperators

# Extract Arguments
arguments   = extractArgv()
configFile  = arguments['CONFIG_FILE']

try:
    printIO = ( arguments['PRINT_IO'] == 'True' )
except:
    printIO = False

# Builds configuration
config      = Configuration(configFile)

# Creates ouputdir
runCommand('mkdir -p '+config.outputDir, printIO)

# Runs algorithm 
algorithm   = config.algorithm()
result      = algorithm.run()

# Saves results
saveResult(config.outputDir, result)

# Analyse
applyAllOperators(config.outputDir)