Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SU_Volcanic: file path and protection for missing file #294

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

jrjoshi1
Copy link

Degassing file path is corrected. Additionally, a safeguard has been implemented to halt model execution if the specified volcanic file does not exist for the requested date.

@jrjoshi1 jrjoshi1 requested a review from a team as a code owner October 10, 2024 01:12
Copy link

Label error. Requires at least 1 of: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Found:

@jrjoshi1 jrjoshi1 added the Refactoring Code restructuring for clarity/efficiency label Oct 10, 2024
Copy link

Label error. Requires at least 1 of: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Found: Refactoring

@jrjoshi1 jrjoshi1 added the bugfix This is a bug fix label Oct 10, 2024
Copy link

Label error. Requires at least 1 of: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Found: Refactoring, bugfix

@jrjoshi1 jrjoshi1 changed the title SU_Volcanic: added protection for missing files and corrected file pa… SU_Volcanic: file path and protection for missing file Oct 10, 2024
Copy link

Label error. Requires at least 1 of: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Found: Refactoring, bugfix

Copy link

Label error. Requires at least 1 of: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Found: Refactoring

@mathomp4 mathomp4 added 0 diff The changes in this pull request have verified to be zero-diff with the target branch. bugfix This is a bug fix labels Oct 10, 2024
@mathomp4 mathomp4 linked an issue Oct 10, 2024 that may be closed by this pull request
@mathomp4 mathomp4 added 0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) and removed 0 diff The changes in this pull request have verified to be zero-diff with the target branch. labels Oct 10, 2024
@mathomp4
Copy link
Member

@jrjoshi1 I don't think we can do this. Your change does stop the model:

 Error: file not found
 ExtData/chemistry/CARN/v202401/explosive/so2_explosive_volcanic_emissions_CARN_
 v202401.20000414.rc

but we don't want that. We just want to model to handle a missing date gracefully. For example, your code means the model cannot run save on 19 days in the year 2000.

I think we just don't need the else bit. Just if the file exists, read it. If not, it should just avoid the volcano codes.

@jrjoshi1
Copy link
Author

@mathomp4 I anticipated that concern! Without the 'Else and stop,' the model might continue running, leading users to believe that all volcanic files were utilized for the simulation period, while some files, like those for 2000, may not be included. If we're confident that no files are/(will be) missing for any year except 2000, we could consider removing the 'Else/stop' part; however, users should still be aware of the issue. Just my thoughts!
Don't know what @pcolarco and others would think.

@jrjoshi1
Copy link
Author

jrjoshi1 commented Oct 10, 2024

@mathomp4 I think I see your point now, and I think we should remove the 'else/stop' part. The user will need to determine for themselves which files their experiment used.. Unless there are any other opinions, I’ll go ahead and make that change tomorrow. Thanks.

@mathomp4
Copy link
Member

This seems to work for me. I'll approve since it's it is a pretty important bugfix.

@vbuchard vbuchard merged commit 5d3eff7 into develop Oct 15, 2024
11 checks passed
@vbuchard vbuchard deleted the feature/jrjoshi1/su2gvolcF branch October 15, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) bugfix This is a bug fix Refactoring Code restructuring for clarity/efficiency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GOCART AMIP Develop only runs on certain dates: SU volcanoes
3 participants