Commit 75f227fe authored by Carl Schreck's avatar Carl Schreck

Automated Daily Commit - Fri Jun 12 12:00:12 EDT 2020

parent 08467677
......@@ -19,12 +19,11 @@ cjs.tstamp('Here we go!')
basins = ['NA', 'EP']
# basins = ['WMOSI']
parser = argparse.ArgumentParser()
parser.add_argument('--year', default=2019)
parser.add_argument('--year', default=2020)
parser.add_argument('--month', default=(datetime.today().month - 1))
args = parser.parse_args()
end_year = int(args.year)
end_month = int(args.month)
end_month = 12
end_month = np.where(end_month < 1, end_month+12, end_month)
do_ytd = True
......@@ -119,17 +118,21 @@ for basin in basins:
print()
cjs.tstamp("Global Category 5s")
is_eligible = is_in_months & ibt.find_tropical(137)
any_eligible = np.any(is_eligible, axis=1)
for storm in ibt.ds.storm[any_eligible]:
is_cat5 = is_in_months & ibt.find_tropical(137)
is_tropical = ibt.find_tropical(35)
any_cat5 = np.any(is_cat5, axis=1)
for storm in ibt.ds.storm[any_cat5]:
print(f'name: {ibt.ds.name[storm].item().decode().title()}')
print(f'id: {ibt.ds.sid[storm].item().decode().title()}')
max_wind = ibt.ds.usa_wind[storm, is_eligible[storm, :]].max().values
min_pres = ibt.ds.usa_pres[storm, is_eligible[storm, :]].min().values
max_wind = ibt.ds.usa_wind[storm, is_cat5[storm, :]].max().values
min_pres = ibt.ds.usa_pres[storm, is_cat5[storm, :]].min().values
max_wind_ind = np.argmax(ibt.ds.usa_wind[storm])
basin = ibt.ds.basin[storm,max_wind_ind].item().decode()
print(f'max wind: {max_wind*1.15} mph')
print(f'min pressure: {min_pres}')
min_time_ind = np.where(is_eligible[storm, :])[0].min()
max_time_ind = np.where(is_eligible[storm, :])[0].max()
print(f'basin: {basin}')
min_time_ind = np.where(is_tropical[storm, :])[0].min()
max_time_ind = np.where(is_tropical[storm, :])[0].max()
min_time_str = pd.to_datetime(
ibt.ds.time[storm, min_time_ind].values).strftime('%b %-d')
max_time_str = pd.to_datetime(
......
......@@ -17,9 +17,9 @@ import numpy as np
# These are some parameters that could be useful to have up top
year = 2020
month = 5
first_day = 1
first_day = 25
last_day = 31
clobber = True
clobber = False
time_range = slice(f'{year}-{month:02}-{first_day:02}',
f'{year}-{month:02}-{last_day:02}')
......
......@@ -17,8 +17,8 @@ from datetime import datetime
# These are some parameters that could be useful to have up top
year = 2020
month = 5
first_day = 6
last_day = 14
first_day = 25
last_day = 31
clobber = False
time_range = slice(f'{year}-{month:02}-{first_day:02}',
......
......@@ -19,8 +19,8 @@ from datetime import datetime
# These are some parameters that could be useful to have up top
year = 2020
month = 5
first_day = 6
last_day = 14
first_day = 25
last_day = 31
clobber = False
time_range = slice(f'{year}-{month:02}-{first_day:02}',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment