Fix #3421: Guard DT_mooring validation with mooring enabled check - #3422
Open
andrew-platt wants to merge 1 commit into
Open
Fix #3421: Guard DT_mooring validation with mooring enabled check#3422andrew-platt wants to merge 1 commit into
andrew-platt wants to merge 1 commit into
Conversation
…heck - Wrap DT_mooring validation in 'if (p%MooringMod == 3)' conditional - Add file existence check for MD_FileName when mooring is enabled - Prevents fatal error when Mod_SharedMooring=0 and mooring is not used - Follows established OpenFAST pattern for module-specific validations Co-authored-by: GitHub Copilot <noreply@github.com> Co-authored-by: Claude Sonnet 4.5 <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.
Ready to merge
Feature or improvement description
This PR fixes a bug in FAST.Farm where
DT_mooringvalidation was incorrectly executed regardless of whether shared mooring was enabled, causing fatal errors for users running cases withMod_SharedMooring = 0.The fix adds conditional guards around mooring-related validations so they only execute when mooring is actually enabled (
Mod_SharedMooring = 3). Additionally, this implements the TODO for verifying that the MoorDyn input file exists.Changes made:
DT_mooringvalidation inif (p%MooringMod == 3)conditionalMD_FileNamewhen mooring is enabledfile_existslogical variable declaration to support the validationBefore:
After:
Related issue, if one exists
Fixes #3421
Impacted areas of the software
glue-codes/fast-farm/src/FAST_Farm_IO.f90)Farm_ValidateInput()subroutineAdditional supporting information
The implementation follows established OpenFAST patterns:
CompMooringchecks inFAST_Subs.f90)WaveTank_IO.f90)This is a non-breaking change that:
Mod_SharedMooring = 0to run without spurious DT_mooring validation errorsMod_SharedMooring = 3)Generative AI usage
Co-authored-by: GitHub Copilot noreply@github.com
Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com
Test results, if applicable
No r-test changes needed. This is a validation-only fix that:
Existing regression tests with mooring enabled should continue to pass. Cases with
Mod_SharedMooring = 0will no longer fail validation unnecessarily.