Skip to content

fix(pacific): keep ATL, SECOFS and AK behaviour unchanged by the Pacific features (into #74) - #80

Open
mansurjisan wants to merge 2 commits into
feature/pacificfrom
fix/pacific-74-regressions
Open

mansurjisan wants to merge 2 commits into
feature/pacificfrom
fix/pacific-74-regressions

Conversation

@mansurjisan

Copy link
Copy Markdown
Collaborator

Description

Fixes on top of #74 (feature/pacific) so the Pacific ops features do not change the systems that already run (STOFS-3D-ATL, SECOFS, SECOFS-WW3, STOFS-3D-AK), while keeping the Pacific settings. For merging into feature/pacific; please use "Create a merge commit" (not squash), so the nos-workflow #238 submodule pointer to this commit stays valid.

What #74 changed for existing systems, and the fix:

  • ATL ADT datum offset cancelled (+0.45 m on elev2D versus ops). The -0.45 m was moved to an in-memory copy of ssh, where it cancels in ssh(t) - ssh(0). Restored per day in _regrid_esmf / _read_adt (float32 before the mean, as main), and _apply_adt_blend writes the real ssh variable again. The Pacific uses its own -0.4715517 through the same path. from_yaml now defaults adt.datum_offset to -0.45 like the dataclass.
  • ATL TSUV_1.nc lost depth. In _stofs_prepare_tsuv a one-file group left ds unassigned; the exception was swallowed, so depth was never written and the datasets were never closed. The Fortran OBC and nudging tools read level depths from it. Fixed with a finally close; TSUV_1.nc matches main bit for bit again.
  • ATL RTOFS slots 23 -> 22. New obc_min_slots (default 23; yaml obc.min_slots); obc_min_timesteps is the QC threshold again. The Pacific sets 4.
  • OPS_OBC_DT NameError on the opt-in Fortran path (rtofs.py): uses config.obc_dt.
  • ADT region: the fixed ops ROI again for -180/180 systems; the SSH_1 extent for the 0-360 Pacific.
  • ATL rerun archive: back to main's four entries; temnu/salnu/surface restore/elev2dth only with the new obc_archive_extended (yaml obc.archive_extended), set by the Pacific presets.
  • SECOFS, SECOFS-WW3, STOFS-3D-AK nudging 3 h -> 6 h. nudging_dt defaults to 10800 again (their param.nml keep step_nu_tr = 10800); the ATL ops timeline stays 21600; the Pacific sets 86400 explicitly.
  • Surface restore: off in the presets and from_yaml; process() refuses to run unless NOS_SURFACE_RESTORE_EXPERIMENTAL=1 (it reads T and S from one file though the daily files split them, uses the boundary nodes, and has a placeholder time axis). The code is kept; it needed a find_input_files to be instantiable.
  • Pacific values: forecast_hours 48 (ops rnday 3.0 = 24 h nowcast + 48 h forecast); elevation segments [0, 1, 9] unchanged.
  • from_yaml tolerates null forcing.ocean, nudging and surface_restore blocks again.

Guard tests (tests/test_stofs_config.py): ATL offset -0.45 with and without the yaml key, 23 slots, QC 21, obc_dt 21600, archive off, surface restore off; SECOFS/SECOFS-UFS/unspecified yaml nudging 10800; the ATL archive map; from_yaml parsing of the new keys; _stofs_prepare_tsuv run unmocked keeps depth and logs no failure; the Pacific values.

Still for the Pacific (not changed here): obc_dt, obc_min_slots and the daily_3z discovery only act under the ops timeline, which the Pacific yaml leaves off; the TSUV_1.nc time axis is fixed at 21600 s; the ADT method and the smoothing time axis need checking against ops; surface restore needs a rewrite before it is enabled. The branch is behind main (#75-#79) and should take main before #74 merges.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Change characteristics

  • Changes outputs (values, COMOUT files or names, archives)? NO relative to main: ATL, SECOFS and AK outputs return to main's. YES relative to the current Enable STOFS Pacific System #74 head, which this corrects.
  • Breaking change to existing functionality? NO
  • Requires a nos-utils submodule bump (nos-workflow) or a paired nos-workflow change (nos-utils)? YES: nos-workflow #238 bumps its pointer to this commit (paired PR into feature/pacific_mvp).
  • Requires new or regenerated fix files on the machine? NO
  • Requires a re-prep or a new hotstart before the next cycle? NO
  • Machines affected: both

How has this been tested?

  • Full nos-utils suite: 1289 passed, 9 skipped (the Enable STOFS Pacific System #74 head had 31 failures; 1309 on main, the difference is two test files main has and this branch does not yet).
  • Every preset and every nos-workflow yaml resolves to the same configuration as on main outside the Pacific (only new fields, at defaults that keep the old behaviour).
  • TSUV_1.nc for a synthetic ATL case matches main bit for bit.
  • Not yet run on a machine.

Checklist

  • Dependent PRs merged and published (nos-utils before any submodule bump)
  • pytest suite passes
  • Existing operational behavior preserved, or the change is called out above
  • No edits to a shared FIXofs while it is cycling
  • Self-review done; yaml comments and docstrings updated where behavior changed
  • No markdown files added to the repo (this template is the only exception)

…c ops features

ADT datum offset applied per day again (ATL -0.45 via adt_datum_offset), ops ADT ROI kept for -180/180 systems, 23 RTOFS ops slots (obc_min_slots), OPS_OBC_DT NameError, 3-hourly SECOFS/AK nudging (nudging_dt default 10800), rerun archive extras opt-in (obc_archive_extended), surface restore off and refusing to run unless explicitly forced, Pacific forecast_hours 48. Adds guard tests.
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.

1 participant