Skip to content

Commit

Permalink
added switch for cycling type
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres committed Apr 24, 2024
1 parent ee2b266 commit e8569c9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions scripts/exgdas_global_marine_analysis_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ def find_clim_ens(input_date):
staticsoca_dir = os.getenv('SOCA_INPUT_FIX_DIR')
nmem_ens = 0
nmem_ens = int(os.getenv('NMEM_ENS'))
if os.getenv('DOHYBVAR') == "YES":
dohybvar = True
else:
dohybvar = False

# create analysis directories
diags = os.path.join(anl_dir, 'diags') # output dir for soca DA obs space
Expand All @@ -89,12 +85,25 @@ def find_clim_ens(input_date):
window_begin = datetime.strptime(os.getenv('PDY')+os.getenv('cyc'), '%Y%m%d%H') - half_assim_freq
window_begin_iso = window_begin.strftime('%Y-%m-%dT%H:%M:%SZ')
window_middle_iso = window_middle.strftime('%Y-%m-%dT%H:%M:%SZ')
fcst_begin = datetime.strptime(os.getenv('PDY')+os.getenv('cyc'), '%Y%m%d%H')
RUN = os.getenv('RUN')
cyc = os.getenv('cyc')
gcyc = os.getenv('gcyc')
PDY = os.getenv('PDY')

# hybrid-envar switch
if os.getenv('DOHYBVAR') == "YES":
dohybvar = True
else:
dohybvar = False

# switch for the cycling type
if os.getenv('DOIAU') == "YES":
# forecast initialized at the begining of the DA window
fcst_begin = window_begin
else:
# forecast initialized at the middle of the DA window
fcst_begin = datetime.strptime(os.getenv('PDY')+os.getenv('cyc'), '%Y%m%d%H')

################################################################################
# fetch observations

Expand Down

0 comments on commit e8569c9

Please sign in to comment.