Skip to content

Commit

Permalink
Determine IC structure based on start type NOAA-EMC#1783
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Sep 22, 2023
1 parent d1dcad9 commit 5a65ac5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion workflow/setup_expt.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ def fill_COMROT_cycled(host, inputs):
rdatestr = datetime_to_YMDH(inputs.idate - to_timedelta('T06H'))
idatestr = datetime_to_YMDH(inputs.idate)

if os.path.isdir(os.path.join(inputs.icsdir, f'{inputs.cdump}.{rdatestr[:8]}', rdatestr[8:], 'model_data', 'atmos')):
# Test if we are using the new COM structure or the old flat one for ICs
if(inputs.start in ['warm']):
pathstr = os.path.join(inputs.icsdir, f'{inputs.cdump}.{rdatestr[:8]}',
rdatestr[8:], 'model_data', 'atmos')
else:
pathstr = os.path.join(inputs.icsdir, f'{inputs.cdump}.{idatestr[:8]}',
idatestr[8:], 'model_data', 'atmos')

if os.path.isdir(pathstr):
flat_structure = False
else:
flat_structure = True
Expand Down

0 comments on commit 5a65ac5

Please sign in to comment.