Skip to content

Auto-generate initial conditions and improve grid-input staging#17

Open
alperaltuntas wants to merge 3 commits into
mainfrom
input_data_fixes
Open

Auto-generate initial conditions and improve grid-input staging#17
alperaltuntas wants to merge 3 commits into
mainfrom
input_data_fixes

Conversation

@alperaltuntas
Copy link
Copy Markdown
Member

@alperaltuntas alperaltuntas commented Jun 2, 2026

Generate WW3 initial conditions at build time via ww3_strt instead of
pre-staging per-grid restart files, and harden grid-input staging.

Changes

  • Auto-generate the calm-start IC (calm_strt.ww3) via ww3_strt; a
    user-supplied WW3_MODDEF now requires an explicit initfile.
  • Guard buildnml against missing WW3_GRID_INP_DIR/inputs, warning
    instead of crashing and deferring generation past the build phase.
  • Add grid input entries for wgx3v7, ww3a, and wtx2_3v2.
  • Add domain_percent_iostyp namelist entry (default 1).
  • Bump wgx3v7 grid_inp data and the WW3 submodule (always build
    ww3_strt; IOSTYP restart-gather deadlock fix).

This PR is in conjunction with ESCOMP/WW3#39

Fixes: #16

Testing: aux_ww3. all b4b.

buildnml: Guard against a missing/empty WW3_GRID_INP_DIR, and warn (instead of crashing)
when ww3_grid.inp or the ww3_grid executable aren't present yet before attempting mod_def generation.

namelist_definition_ww3.xml: Add six individual grid input file entries
(g37_mapsta.inp, g37_bottom.inp, g37_y.inp, g37_x.inp, ww3_grid.inp, ww3_strt.inp)
for the wgx3v7 grid so check_input_data can download them automatically.
Generate the calm-start initial condition file at build time via the
ww3_strt tool instead of pre-staging per-grid restart files. buildnml
now copies the ww3_strt executable alongside ww3_grid, runs it to
produce restart.ww3, and stages it to rundir as calm_strt.ww3. The
initfile namelist default points to calm_strt.ww3 for auto-generated
grids; supplying a custom WW3_MODDEF now requires an explicit initfile.

Also:
  - Add domain_percent_iostyp (DOMAIN%IOSTYP) namelist entry, default 1
  - Add grid input files (mapsta/bottom/x/y/grid/strt) for ww3a and
    wtx2_3v2 grids
  - Bump grid_inp data for wgx3v7 to .260527. This is to update IC4METHOD
    from 8 to 10.
  - Updates in tests.
@alperaltuntas
Copy link
Copy Markdown
Member Author

@mvertens Please let us know if you'd like review this PR and/or ESCOMP/WW3#39.

@mvertens
Copy link
Copy Markdown
Collaborator

mvertens commented Jun 4, 2026

@alperaltuntas - sorry for my slow response to this. Thanks for this update. Can we chat about this? I'd like to bring these changes back to NorESMHub and coordinate this with what you have done.

@billsacks
Copy link
Copy Markdown
Member

@alperaltuntas - thank you for calling this to my attention. Are there particular aspects you'd like my review on? If not, I'm happy to defer to you and others with more familiarity with ww3 operation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure in ww3 buildnml when running on a machine without ww3 inputdata present

3 participants