Skip to content

Commit

Permalink
Merge branch 'develop' into feature/land_snodl
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaruidong2017 committed Jun 15, 2023
2 parents d8bd951 + f568d19 commit 5e7a2c2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions scripts/exgdas_global_marine_analysis_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function clean_yaml()

################################################################################
# run 3DVAR FGAT
cp var.yaml var_original.yaml
clean_yaml var.yaml
$APRUN_OCNANAL $JEDI_BIN/soca_var.x var.yaml
export err=$?; err_chk
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_global_marine_analysis_vrfy.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def plot_zonal_slice(config):

evadir = os.path.join(HOMEgfs, 'sorc', f'{RUN}.cd', 'ush', 'eva')
marinetemplate = os.path.join(evadir, 'marine_gdas_plots.yaml')
varyaml = os.path.join(comout, 'yaml', 'var.yaml')
varyaml = os.path.join(comout, 'yaml', 'var_original.yaml')

# it would be better to refrence the dirs explicitly with the comout path
# but eva doesn't allow for specifying output directories
Expand Down
4 changes: 2 additions & 2 deletions test/soca/gw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ set(jjob_list "JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP"
# "JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_RUN"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_POST")
# "JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY")
"JGDAS_GLOBAL_OCEAN_ANALYSIS_POST"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY")

set(setup "")
foreach(jjob ${jjob_list})
Expand Down
9 changes: 7 additions & 2 deletions ush/diag_statistics.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ def get_diag_stats():
zipfilename = diagfilename + '.gz'
outfilename = 'cnvstat.' + var + '.gdas.' + pdy + cyc + '.csv'

with tarfile.open(os.path.join(comout, tarfilename), "r") as tf:
tf.extract(member=zipfilename)
try:
with tarfile.open(os.path.join(comout, tarfilename), "r") as tf:
tf.extract(member=zipfilename)
except FileNotFoundError:
print('WARNING: file', os.path.join(comout, tarfilename),
'not found, this is expected in GDASApp ctests')
return
with gzip.open(zipfilename, 'rb') as f_in:
with open(diagfilename, 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
Expand Down
6 changes: 4 additions & 2 deletions ush/soca/run_jjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ def _conda_envs(self, jjob):
"""
if self.machine != "container":
if jjob in ENVS:
# TODO: This does nothing for now. Make the conda activate work!
self.f.write(f"# conda activate {ENVS[jjob]} \n")
# set +/-u is a workaround for an apparent conda bug
self.f.write(f"set +u \n")
self.f.write(f"conda activate {ENVS[jjob]} \n")
self.f.write(f"set -u \n")

def precom(self, com, tmpl):
cmd = f"RUN={self.RUN} YMD={self.gPDY} HH={self.gcyc} generate_com -xr {com}:{tmpl}"
Expand Down

0 comments on commit 5e7a2c2

Please sign in to comment.