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

Initialization of extra restart fields #341

Closed
ukmo-juan-castillo opened this issue Mar 26, 2021 · 0 comments · Fixed by #342
Closed

Initialization of extra restart fields #341

ukmo-juan-castillo opened this issue Mar 26, 2021 · 0 comments · Fixed by #342
Labels
bug Something isn't working

Comments

@ukmo-juan-castillo
Copy link
Collaborator

Describe the bug
In a previous issue the possibility of writing extra fields in the restart file was added to the code. By default, when running a OASIS coupled configuration, the fields that are sent to other models is always written to the restart file.

The problem happens when no extra fields are requested and no coupling takes place, as in this case the flags indicating if extra restart is taking place is not explicitly initialized. It is assumed that these flags are implicitly set to .FALSE., but this is not always the case, causing that some of the oasis send variables may be initialized to zero, and generating non-reproducible results.

To Reproduce
Steps to reproduce the behavior:
This behaviour has been discovered after comparing the ww3_tp2.16/work_MPI_OMPH regtests of two branches, the WW3 develop and the fb_coupling fields. Although the results are the same, the out_pnt.ww3 file is different, containing values of 0.0 and 1000.0 (the expected value) for the variable ICEF, respectively.

Expected behavior
The flags indicating extra restart fields should be set to .FALSE. explicitly and modified only in the two cases described before: when oasis coupling takes place, or when the user specifies extra restart fields; in this way there will be no unexpected difference in the output fields and the results will always be reproducible.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@ukmo-juan-castillo ukmo-juan-castillo added the bug Something isn't working label Mar 26, 2021
ukmo-juan-castillo added a commit to ukmo-waves/WW3 that referenced this issue Mar 26, 2021
aliabdolali pushed a commit that referenced this issue Apr 1, 2021
* Changes to fix issue #341

* Fix the bug in a different way, as with the previous solution the
information read from the restart file is wrongly overwritten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant