예제 #1
0
# --------------------------------------------------

release_path = request['release_path']

# make sure dataset path given in request exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)

# =============================================================================
# =============================================================================

# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR()

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + ' (' +
          str(int(time.time())) + ')')
    print 'Starting MSR'
    print '\n'

# --------------------------------------------------
# load shapefiles

# must start at and inlcude ADM0
예제 #2
0

# make sure release path exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)

if release_preamble not in config.release_iso3:
    quit("release premable not found in config: " + release_preamble)

iso3 = config.release_iso3[release_preamble]


# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR(config)

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
           ' ('+ str(int(time.time())) +')')
    print 'Starting MSR'
    print '\n'


# set pixel size
if not 'resolution' in request['options']:
    quit("missing pixel size input from request")