Skip to content

Commit

Permalink
adapted to std dev
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres committed Jun 20, 2023
2 parents bcb1d48 + f568d19 commit cfb5fb4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if(BUILD_GDASBUNDLE)
endif()
ecbuild_bundle( PROJECT gsw GIT "https://github.com/jcsda-internal/GSW-Fortran.git" BRANCH develop )
ecbuild_bundle( PROJECT mom6 GIT "https://github.com/jcsda-internal/MOM6.git" BRANCH main-ecbuild RECURSIVE )
ecbuild_bundle( PROJECT soca GIT "https://github.com/jcsda-internal/soca.git" BRANCH feature/hybrid-B )
ecbuild_bundle( PROJECT soca GIT "https://github.com/jcsda-internal/soca.git" BRANCH develop )

# Build IODA converters
option(BUILD_IODA_CONVERTERS "Build IODA Converters" ON)
Expand Down
1 change: 1 addition & 0 deletions parm/soca/berror/saber_blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ components:
cicen_max: 0.5
hicen_min: 0.0
hicen_max: 0.0
standard deviation: true

- linear variable change name: BalanceSOCA
# kst:
Expand Down
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
5 changes: 2 additions & 3 deletions test/soca/gw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +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 cfb5fb4

Please sign in to comment.