Skip to content

Add additional advisory options when using ATCF/Best Track style wind forcing, new ADCIRCPy specific warnings, user-defined namelists, and minimal SWAN support.#201

Open
cblakely97 wants to merge 5 commits intooceanmodeling:mainfrom
cblakely97:main

Conversation

@cblakely97
Copy link
Copy Markdown

@cblakely97 cblakely97 commented Nov 12, 2025

This pull request adds capability to ADCIRCPy to support additional ADCIRC capabilities and provide users with warnings for partially implemented features.

  • BestTrackForcing enhancements
    • Add file_deck and advisories as optional parameters to BestTrackForcing class. By default these parameters preserve the legacy behavior but allow the user more control if using ATCF/NHC advisories other than the best track.
  • New ADCIRCPy-specific warning system
    • Introduce adcircpy/warnings.py which creates custom classes of warnings to better notify users of issues. These new warnings are:
      • ADCIRCPyWarning: Base class forADCIRCPy-specific warnings.
      • UnsupportedFeatureWarning: Warns about features that are present in ADCIRC but are not fully supported by ADCIRCPy (e.g., Warns the user that ADCIRCPy will not (presently) write out SWAN specific input files if SWAN is activated).
      • ModelSetupWarning: Indicates that there is an issue with inputs to ADCIRCPy (e.g., Warns the user when NTIP=2 but no self-attraction/loading (fort.24) data is present).
  • Initial SWAN forcing support
    • Add adcircpy/forcing/waves/swan.py: Adds SWAN wave model forcing as a type of forcing.
    • At present ADCIRCPy will not generate SWAN input files and users will be notified if this unsupported feature.
  • Custom namelist support
    • Extend the Fort15 class to allow users to create, modify, and add custom namelists not present by default.
    • Provide flexibility without modifying core code.

Notes

  • All changes backwards compatible.
  • New warnings are non-fatal and are designed to improve user awareness of unsupported or incomplete features.

…le forcing

   - Adds additional optional arguments to BestTrackForcing that allow for file_deck and advisories other than the defaults of, respectively, "b" and "BEST". By default the previous behavior is kept.
   - Fixes what I believe is a bug in writing out summaries of BestTrackForcing
…N support.

   - Add `adcircpy/warnings.py` which creates custom classes of warnings to better notify users of issues. These new warnings are:
      - `ADCIRCPyWarning`: Base class for warnings within ADCIRCPy.
      - `UnsupportedFeatureWarning`: Warns about features that are present in ADCIRC but are not fully supported by ADCIRCPy.
         - E.g., Warns the user that ADCIRCPy will not (presently) write out SWAN specific input files if SWAN is activated.
      - `ModelSetupWarning`: Indicates that there is an issue with inputs to ADCIRCPy.
         - E.g., Warns the user when `NTIP=2` but no self-attraction/loading (fort.24) data is present.
   - Add `adcircpy/forcing/waves/swan.py`: Adds SWAN wave model forcing as a type of forcing. Note that at present ADCIRCPy will not generate SWAN input files and users will be notified if this unsupported feature.
   - Add custom namelists to `Fort15` class. This will allow users to update and add namelists that are not present in ADCIRCPy by default.
@cblakely97 cblakely97 marked this pull request as ready for review November 12, 2025 17:14
- Remove inline comments from RUNDES, RUNID, and NC metadata lines that
  caused ADCIRC parsing errors
- Reformat Fortran namelists to multi-line format with proper value quoting
- Separate WTIMINC handling for NWS=8/19 (no geofactor) vs NWS=20
- Truncate RNDAY to 1 decimal place to avoid floating-point artifacts
- Include seconds in NCDATE format string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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