Skip to content

Commit

Permalink
Merge branch 'develop' into feature/iodaconv_trim
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres authored Oct 23, 2023
2 parents 28d1937 + 6725734 commit 21c8ea5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/exgdas_global_marine_analysis_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ def gen_bkg_list(bkg_path, out_path, window_begin=' ', yaml_name='bkg.yaml', ice
bkg_date = window_begin

# Construct list of background file names
RUN = os.getenv('RUN')
GDUMP = os.getenv('GDUMP')
cyc = str(os.getenv('cyc')).zfill(2)
gcyc = str((int(cyc) - 6) % 24).zfill(2) # previous cycle
fcst_hrs = list(range(3, 10, dt_pseudo))
files = []
for fcst_hr in fcst_hrs:
files.append(os.path.join(bkg_path, f'{RUN}.t'+gcyc+'z.ocnf'+str(fcst_hr).zfill(3)+'.nc'))
files.append(os.path.join(bkg_path, f'{GDUMP}.t'+gcyc+'z.ocnf'+str(fcst_hr).zfill(3)+'.nc'))

# Identify the ocean background that will be used for the vertical coordinate remapping
ocn_filename_ic = os.path.splitext(os.path.basename(files[0]))[0]+'.nc'
Expand Down Expand Up @@ -506,13 +506,14 @@ def find_clim_ens(input_date):
################################################################################
# Copy initial condition
ics_list = []
GDUMP = os.getenv('GDUMP')
# ocean IC's
mom_ic_src = glob.glob(os.path.join(bkg_dir, f'{RUN}.*.ocnf003.nc'))[0]
mom_ic_src = glob.glob(os.path.join(bkg_dir, f'{GDUMP}.*.ocnf003.nc'))[0]
mom_ic_dst = os.path.join(anl_dir, 'INPUT', 'MOM.res.nc')
ics_list.append([mom_ic_src, mom_ic_dst])

# seaice IC's
cice_ic_src = glob.glob(os.path.join(bkg_dir, f'{RUN}.*.agg_icef003.nc'))[0]
cice_ic_src = glob.glob(os.path.join(bkg_dir, f'{GDUMP}.*.agg_icef003.nc'))[0]
cice_ic_dst = os.path.join(anl_dir, 'INPUT', 'cice.res.nc')
ics_list.append([cice_ic_src, cice_ic_dst])
FileHandler({'copy': ics_list}).sync()
Expand Down

0 comments on commit 21c8ea5

Please sign in to comment.