Script for download and stitching of ERA5 atmospheric data

This commit is contained in:
Marcel Christian Frommelt 2021-06-23 10:48:36 +09:00
parent 0b006304e0
commit 39d28ee39d

View File

@ -36,17 +36,17 @@ south_lim = -90
"""
Start and end time for atmospheric data:
"""
startdate = '2012-12-08' # also acts as launch data of ERA5 data for ascent
startdate = '2012-12-08' # also acts as start date of atmospheric ERA5 data for ascent
enddate = '2013-02-01'
ascent_window = 10 # time length of ERA5 data for ascent phase in (full) days from start date
ascent_window = 10 # time length of ERA5 data for ascent phase in (full!) days from start date
"""
Operations you want to be performed:
"""
ascent_only = False # True # get only ERA5 data for ascent (e. g. for new location or time within same region)
download = True # True # download raw ERA5 files
stitch = False # False # create stitched files
download = True # True # download raw ERA5 files
stitch = True # False # create stitched files
delete = False # False # delete original files
@ -215,8 +215,8 @@ if download == True:
endascent = [str(i + 1).zfill(2) for i in range(ascent_window - len(startdays) + 1)]
else:
short_ascent = 1
startdays = [str(startday + i).zfill(2) for i in range(
(date(year2, next_month, 1) - date(start.year, start.month, 1)).days - startday + 1)]
startdays = [str(start.day + i).zfill(2) for i in range(
(date(year2, next_month, 1) - date(start.year, start.month, 1)).days - start.day + 1)]
ascentdays = [str(start.day + i).zfill(2) for i in range(ascent_window)]
if end.year == start.year:
@ -276,7 +276,7 @@ if download == True:
for m in range(12 - start.month):
ERAsingle(start.year, start.month + 1 + m, days, north_lim, south_lim, east_lim, west_lim,
os.path.join(folder, "single" + str(m + 2) + ".nc"))
ERAlevelFloat(, start.month + 1 + m, days, north_lim, south_lim, east_lim, west_lim,
ERAlevelFloat(start.year, start.month + 1 + m, days, north_lim, south_lim, east_lim, west_lim,
os.path.join(folder, "float" + str(m + 2) + ".nc"))
count1 = m + 2
for m in range(end.month - 1):