Skip to content

Add GEOSJEDI=2 option to call SWELL more explicitly - #467

Open
metdyn wants to merge 4 commits into
developfrom
feature/ygyu/geosjedi_eq_2
Open

metdyn wants to merge 4 commits into
developfrom
feature/ygyu/geosjedi_eq_2

Conversation

@metdyn

@metdyn metdyn commented Dec 3, 2026 •

Copy link
Copy Markdown

An idea to solve the issue:

This PR implements
GEOSJEDI=2 option to call SWELL more explicitly.

⚠️ The implementation is assisted by AI and please check the README

It is based on GEOSJEDI=1 (GEOSdas_App/jedi). All the workflow is a translation from GEOSJDI=1, the difference is

  • explicit JEDI YAML files should not exist (Use override function, need to check)
  • ENKF is never called
  • fvsetup is extended to read in more control knobs for swell and ensemble, but remains the same unless GEOSJEDI==2.

Requirement:

  • zero diff for development, except export GEOSJEDI=1 for current develop.

Note

  • ⚠️ Test is not complete yet

…served)

- fvsetup: GEOSJEDI is read once from the environment ($geosjedi; 1-4,
  else 0) and written to FVDAS_Run_Config; GEOSJEDI=3/4 abort (reserved,
  not implemented). Tests use explicit GEOSJEDI values (eq 1 / eq 2).
  set_geosjedi: GEOSJEDI=1 -> set_geosjedi_1 (the original body);
  GEOSJEDI=2 -> nothing here (set up after the GEOS-JEDI prompts).
  New option -jedistatic DIR (GEOSJEDI=1: setup_aanajedi.pl -jedistatic).
- write_FVDAS_Run_Config.pl: write "setenv GEOSJEDI <value>".
- GEOSdas.csm (JEDI_AnalysisRun_): selected by GEOSJEDI from
  FVDAS_Run_Config instead of the existence of run/jedi; experiments with
  run/jedi but no GEOSJEDI abort with a request to add "setenv GEOSJEDI 1".
- jedi/jedi_driver.csh, jedi/jedi_driver_atmens.csh: abort if GEOSJEDI is
  set to anything but 1 (unset is allowed for jedi_anasa.j/jedi_asens.j).
New layer, installed to $FVROOT/bin and $FVROOT/etc/swell; taken from
feature/ygyu/CX_v5.45.1_nov24_wai (894a3cd), with:
- no personal or site paths: swell venv, swell source, JEDI build and
  source, and JEDI static files have no defaults; swell_env.csh stops
  when one is missing
- etc/swell_config.csh holds the shared defaults only and reads the
  experiment settings from $FVHOME/run/swell/swell_exp.csh first
  (environment > swell_exp.csh > swell_config.csh)
- swell_setup.pl copies swell_config.csh unchanged to run/swell and
  writes the experiment settings (-set KEY=VALUE) to swell_exp.csh
- etc/mkiau.rc.tenv renamed etc/mkiau.rc.tmpl (as the other templates)

Scripts: swell_env.csh, swell_render.csh, swell_run.csh, swell_driver.csh
(central analysis), swell_gsi2ioda.csh, swell_ana_central.csh (3D-FGAT),
swell_mkiau.csh, swell_upd4geos.csh, swell_obs_stage.csh,
swell_obs_share.csh, swell_ana_atmens.csh (EDA/GETKF), swell_setup.pl.
- fvsetup:
  get_jedi_info (last prompts; GEOSJEDI=2 only, none for GEOSJEDI=0/1):
  GEOSJEDI is shown from the environment (not asked, not saved), then
  jedi_ens_scheme, jedi_ens_member, swell venv, swell source directory,
  JEDI build directory (no built-in defaults; checked; 3 tries). The JEDI
  source directory is read from the build's CMakeCache.txt.
  set_swell (after the prompts): requires -jedistatic DIR; writes
  run/swell/swell_exp.csh (SWELL_VENV, SWELL_SRC, SWELL_JEDI_BUILD,
  SWELL_JEDI_SRC, SWELL_STATIC_FILES, SWELL_CENTRAL_CRES, account,
  SWELL_OFFLINE_IODA_DIR with SKIPGSI), run/swell/mkiau.rc.tmpl, and the
  JEDI IAU in fcst/rst4fcst.acq (swell_setup.pl).
- GEOSdas.csm:
  JEDI_AnalysisRun_: GEOSJEDI=2 runs swell_driver.csh (first cycle:
  obsonly, the observations for the ensemble); success requires the
  driver's .DONE file.
  CoupleAnaToGcm_: GEOSJEDI=2 with SWELL_IAU_OVERWRITE=1 and DO4DIAU=1,
  after the first cycle: ana4dupd.pl without -iau; the JEDI IAU, agcm09,
  ana09 and the central analysis of the ensemble come from
  swell_mkiau.csh/swell_upd4geos.csh.
- swell/swell_ens.j (new, installed to bin): the GEOSJEDI=2 ensemble job.
  It is atm_ens.j without the GSI observer/EnKF and the GEOSJEDI=1
  ensemble; the ensemble analysis is swell_ana_atmens.csh, all other steps
  call the same NCEP_enkf scripts, unchanged. No EDAS scheduler, eanaonly
  or ensemble-only runs. NCEP_Etc is not changed.
- fvsetup:
  set_swell_atmens (GEOSJEDI=2, hyb_ens >= 3): SWELL_ENSEMBLE (eda, getkf2),
  SWELL_ENS_CRES and SWELL_ENS_NMEM in run/swell/swell_exp.csh; the cubed
  member backgrounds of the initial ensemble from the archive of the
  ensemble restarts (swell_setup.pl -ebkgx); run/swell_ens.j filled in as
  atm_ens.j. jedi_ens_member defaults to the installed members and must
  match them.
  DAS job: submits run/swell_ens.j in place of run/atm_ens.j when
  GEOSJEDI=2 (FVDAS_Run_Config).
- swell_setup.pl: -ebkgx EXPARCDIR,EXPID,YYYYMMDD,HH restores
  atmens/ensbkgx/memNNN from <src>.atmens_ebkgx.<date>.tar.
- swell_ana_atmens.csh: abort if the members differ from SWELL_ENS_NMEM.
@metdyn
metdyn requested a review from rtodling December 3, 2026 18:01
@metdyn
metdyn requested review from a team as code owners December 3, 2026 18:01
@metdyn metdyn added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Dec 3, 2026
@metdyn
metdyn requested a review from mathomp4 December 3, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 diff The changes in this pull request have verified to be zero-diff with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant