Changeset 1186 for trunk


Ignore:
Timestamp:
Feb 18, 2014, 1:05:14 PM (11 years ago)
Author:
aslmd
Message:

UTIL PYTHON exapi, save a sh file to keep track of interpolations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/api/exapi.py

    r1008 r1186  
    44from optparse import OptionParser ### TBR by argparse
    55import numpy as np
     6import sys
    67# -----------------------------------------------------------------------
    78# A simple script to call the API program to interpolate mesoscale files
     
    100101    print "EXAPI: OK. done with this file."
    101102   
    102 
    103 
     103####################################
     104# save a .sh file with the command #
     105####################################
     106command = ""
     107if opt.output is None:
     108    opt.output = "exapi"
     109for arg in sys.argv: command = command + arg + ' '
     110try:
     111    f = open(opt.output+'.sh','w')
     112    f.write(command)
     113except IOError:
     114    print "!! WARNING !! pp.py command not saved. Probably do not have permission to write here."
Note: See TracChangeset for help on using the changeset viewer.