Skip to content

2D decompision - #265

Open
weiyuan-jiang wants to merge 4 commits into
feature/wjiang/refactor_ldas_setupfrom
feature/wjiang/2d_decompose
Open

weiyuan-jiang wants to merge 4 commits into
feature/wjiang/refactor_ldas_setupfrom
feature/wjiang/2d_decompose

Conversation

@weiyuan-jiang

Copy link
Copy Markdown
Contributor

Added 2d layout feature (NX by NY). It is also a bug fix. (ObsFcstAna output and EnKF observation oder depended on the processor layout for cubed-sphere grid )

weiyuan-jiang and others added 4 commits November 10, 2026 08:41
- preprocess_ldas_routines.F90: new optimize_latlon_2d() that cuts the
  domain into NX i stripes and NY j stripes (each >= 2 grid cells) and
  minimizes the max no. of tiles per process:
  * exact min-max (painter's partition) of one direction given the other,
    generalized to per-process (block) loads and min stripe width
  * cube-sphere: same IMS on all faces (MAPL), no process across faces,
    optimal no. of j stripes per face, NY must be a multiple of 6
  * local search on i/j stripe boundaries and reproducible random restarts
  * writes IMS.rc/JMS.rc (EASE) or GEOSldas.IMS and JMS.rc (cube-sphere)
- preprocess_ldas.F90: new option "optimize_2d"
- ldas.py, setup_utils.py: optional batinp inputs NX and NY
  (ntasks_model = NX*NY); 1d layouts still use "optimize"
- lenkf_j_template.py: re-optimize the decomposition when NX/NY in LDAS.rc
  differ from the stored layout, and update LDAS.rc, IMS.rc, JMS.rc
- ldas_setup: set the stack limit to the hard limit (unlimited at NCCS/NAS)
  instead of RLIM_INFINITY; if python cannot change the stack limit (macOS),
  print a warning to stderr and keep the current limit
- mock_regression.py:
  * patch the legacy setrlimit call in ref installs the same way
  * normalize temporary file names under $TMPDIR (macOS), not only /tmp
  * compare 'ldas_setup sample' stdout only (stderr has python warnings
    with install-specific paths)
  * set PERTURBATIONS=1 for offline ensemble cases (required for
    NUM_LDAS_ENSEMBLE>1 since 27d63bc)
@weiyuan-jiang
weiyuan-jiang requested a review from a team as a code owner December 1, 2026 19:17
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled, github_actions. Please add one so that the PR can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant