Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres committed Nov 21, 2024
1 parent 6f00478 commit abf06ae
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ci/cases/gfsv17/marinehyb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ base:
DO_JEDIOCNVAR: "YES"
DO_JEDISNOWDA: "NO"
DO_MERGENSST: "NO"
DOHYBVAR: "YES"
DOHYBVAR_OCN: "YES"
DO_FIT2OBS: "YES"
DO_VERFOZN: "YES"
DO_VERFRAD: "YES"
Expand Down
9 changes: 5 additions & 4 deletions ci/cases/pr/C48mx500_3DVarAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ arguments:
resdetocean: 5.0
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
idate: 2021032412
edate: 2021032418
# TODO: Stage IC's on HPC
#icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
icsdir: /work/noaa/da/gvernier/ensda/ictest
idate: 2021032418
edate: 2021032500
nens: 0
interval: 0
start: warm
Expand All @@ -21,4 +23,3 @@ skip_ci_on_hosts:
- wcoss2
- gaea
- orion

4 changes: 2 additions & 2 deletions ci/cases/pr/C48mx500_hybAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ arguments:
#icsdir: /scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/prepics/ictest/
idate: 2021032418
edate: 2021032500
nens: 3
nens: 2
interval: 0
start: warm
yaml: {{ HOMEgfs }}/ci/cases/yamls/soca_gfs_defaults_ci.yaml
yaml: {{ HOMEgfs }}/ci/cases/yamls/soca_hyb_gfs_defaults_ci.yaml

skip_ci_on_hosts:
- wcoss2
Expand Down
3 changes: 3 additions & 0 deletions ci/cases/yamls/soca_gfs_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ defaults:
base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_JEDIOCNVAR: "YES"
marineanl:
SOCA_NINNER: 1

8 changes: 8 additions & 0 deletions ci/cases/yamls/soca_hyb_gfs_defaults_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defaults:
!INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml
base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_JEDIOCNVAR: "YES"
DOHYBVAR_OCN: "YES"
marineanl:
SOCA_NINNER: 1
2 changes: 1 addition & 1 deletion parm/archive/gdas.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gdas:
- "logs/{{ cycle_YMDH }}/{{ RUN }}_marineanlvar.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}_marineanlfinal.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}_marineanlchkpt.log"
{% if DOHYBVAR %}
{% if DOHYBVAR_OCN %}
- "logs/{{ cycle_YMDH }}/{{ RUN }}_ocnanalecen.log"
{% endif %}
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ export DO_STARTMEM_FROM_JEDIICE="@DO_STARTMEM_FROM_JEDIICE@"

# Hybrid related
export DOHYBVAR="@DOHYBVAR@"
export DOHYBVAR_OCN="@DOHYBVAR_OCN@"
export NMEM_ENS=@NMEM_ENS@
export SMOOTH_ENKF="NO"
export l4densvar=".true."
Expand Down Expand Up @@ -471,7 +472,7 @@ export ARCH_FCSTICFREQ=1 # Archive frequency in days for gdas and gfs foreca

# The monitor jobs are not yet supported for JEDIATMVAR.
if [[ ${DO_JEDIATMVAR} = "YES" ]]; then
export DO_FIT2OBS="NO" # Run fit to observations package
export DO_FIT2OBS="NO" # Run fit to observations package
export DO_VERFOZN="NO" # Ozone data assimilation monitoring
export DO_VERFRAD="NO" # Radiance data assimilation monitoring
export DO_VMINMON="NO" # GSI minimization monitoring
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ base:
GSI_SOILANAL: "NO"
EUPD_CYC: "gdas"
FHMAX_ENKF_GFS: 12
DOHYBVAR_OCN: "NO"

atmanl:
JCB_ALGO_YAML_VAR: "${PARMgfs}/gdas/atm/jcb-prototype_3dvar.yaml.j2"
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/marine_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def initialize(self: Task) -> None:
os.symlink('../staticb', 'staticb')

# hybrid EnVAR case
if self.task_config.DOHYBVAR == "YES" or self.task_config.NMEM_ENS >= 3:
if self.task_config.DOHYBVAR_OCN == "YES" or self.task_config.NMEM_ENS >= 2:
# stage the ensemble weights
logger.debug(f"Stage ensemble weights for the hybrid background error")
FileHandler({'copy': [[os.path.join(self.task_config.COMIN_OCEAN_BMATRIX, f'{self.task_config.APREFIX}ocean.ens_weights.nc'),
Expand Down
13 changes: 4 additions & 9 deletions ush/python/pygfs/task/marine_bmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ def initialize(self: Task) -> None:
self.jedi_dict['soca_parameters_diffusion_vt'].initialize(self.task_config)
self.jedi_dict['soca_setcorscales'].initialize(self.task_config)
self.jedi_dict['soca_parameters_diffusion_hz'].initialize(self.task_config)
if self.task_config.DOHYBVAR == "YES" or self.task_config.NMEM_ENS > 2:
if self.task_config.DOHYBVAR_OCN == "YES" or self.task_config.NMEM_ENS >= 2:
self.jedi_dict['soca_ensb'].initialize(self.task_config)
self.jedi_dict['soca_ensweights'].initialize(self.task_config)

# stage ensemble members for the hybrid background error
if self.task_config.DOHYBVAR == "YES" or self.task_config.NMEM_ENS > 2:
if self.task_config.DOHYBVAR_OCN == "YES" or self.task_config.NMEM_ENS >= 2:
logger.debug(f"Stage ensemble members for the hybrid background error")
mdau.stage_ens_mem(self.task_config)

Expand Down Expand Up @@ -182,7 +182,7 @@ def execute(self) -> None:
self.jedi_dict['soca_parameters_diffusion_vt'].execute()

# hybrid EnVAR case
if self.task_config.DOHYBVAR == "YES" or self.task_config.NMEM_ENS > 2:
if self.task_config.DOHYBVAR_OCN == "YES" or self.task_config.NMEM_ENS >= 2:
self.jedi_dict['soca_ensb'].execute()
self.jedi_dict['soca_ensweights'].execute()

Expand Down Expand Up @@ -221,11 +221,6 @@ def finalize(self: Task) -> None:
f"{self.task_config.APREFIX}{diff_type}_ocean.nc")
diffusion_coeff_list.append([src, dest])

src = os.path.join(self.task_config.DATAstaticb, f"hz_ice.nc")
dest = os.path.join(self.task_config.COMOUT_ICE_BMATRIX,
f"{self.task_config.APREFIX}hz_ice.nc")
diffusion_coeff_list.append([src, dest])

FileHandler({'copy': diffusion_coeff_list}).sync()

# Copy diag B files to ROTDIR
Expand All @@ -252,7 +247,7 @@ def finalize(self: Task) -> None:
FileHandler({'copy': diagb_list}).sync()

# Copy the ensemble perturbation diagnostics to the ROTDIR
if self.task_config.DOHYBVAR == "YES" or self.task_config.NMEM_ENS >= 3:
if self.task_config.DOHYBVAR_OCN == "YES" or self.task_config.NMEM_ENS >= 2:
window_middle_iso = self.task_config.MARINE_WINDOW_MIDDLE.strftime('%Y-%m-%dT%H:%M:%SZ')
weight_list = []
src = os.path.join(self.task_config.DATA, f"ocn.ens_weights.incr.{window_middle_iso}.nc")
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/marine_letkf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def initialize(self):
# TODO(AFE) - this should be removed when the obs config yamls are jinjafied
if 'distribution' not in ob['obs space']:
ob['obs space']['distribution'] = {'name': 'Halo', 'halo size': self.task_config['DIST_HALO_SIZE']}
obs_filename = f"{self.task_config.RUN}.t{self.task_config.cyc}z.{obs_name}.{to_YMDH(self.task_config.current_cycle)}.nc4"
obs_filename = f"{self.task_config.OPREFIX}{obs_name}.{to_YMDH(self.task_config.current_cycle)}.nc4"
obs_files.append((obs_filename, ob))

obs_files_to_copy = []
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def marinebmat(self):
dep_dict = {'type': 'data', 'data': data, 'offset': f"-{timedelta_to_HMS(self._base['interval_gdas'])}"}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_hybvar:
dep_dict = {'type': 'metatask', 'name': 'enkfgdas_fcst', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
dep_dict = {'type': 'metatask', 'name': 'enkfgdas_fcst', 'offset': f"-{timedelta_to_HMS(self._base['interval_gdas'])}"}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
Expand Down

0 comments on commit abf06ae

Please sign in to comment.