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
Conversation
…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.
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds capability to ADCIRCPy to support additional ADCIRC capabilities and provide users with warnings for partially implemented features.
file_deckandadvisoriesas 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.adcircpy/warnings.pywhich 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 whenNTIP=2but no self-attraction/loading (fort.24) data is present).adcircpy/forcing/waves/swan.py: Adds SWAN wave model forcing as a type of forcing.Notes