示例#1
0
# Dictionary with settings
settings = {
    'central_lat': 51.971,
    'central_lon': 4.927,
    'area_size': 1,
    'case_name': 'cabauw',
    'base_path': env['era5_path'],
    'start_date': start,
    'end_date': end,
    'write_log': False,
    'data_source': 'MARS',
    'ntasks': 1
}

header('Creating LES input')

# Download the ERA5 data (or check whether it is available local).
download_ERA5(settings)

# Read ERA5 data, and calculate LES forcings, using +/-`n_av` grid point averages in ERA5.
e5 = Read_ERA(settings)
e5.calculate_forcings(n_av=0, method='4th')

# Read MicroHH namelist and create stretched vertical grid
grid = Grid_stretched(kmax=228,
                      dz0=20,
                      nloc1=100,
                      nbuf1=20,
                      dz1=100,
                      nloc2=210,
示例#2
0
muscle_inst = muscle.check()
if muscle_inst == False:
    print(
        "\nERROR. Muscle is not installed. Pease install it before using this program.\n"
    )
    exit()

prosite_inst = prosite.check()
if prosite_inst != []:
    print(
        "\nERROR. Prosite file(s) missing: %s. Please place them on the program folder again.\n"
        % ', '.join(prosite_inst))
    exit()

messages.header()

# Prepare directories, log file and data and result filenames.
run_id = starter.organizer()

log_filename = "./logs/log" + str(run_id) + ".txt"
q_filename = "./data/" + str(run_id) + "_query.fasta"
gb_filename = "./data/" + str(run_id) + "_gbsequences.fasta"

now = datetime.now()
now = now.strftime("%m/%d %H:%M:%S")

# Create log file.
log = open(log_filename, "w")
log.write("PROCESS ID: %d. Time of start (day/month h:m:s): %s.\n" %
          (run_id, now))