-
Notifications
You must be signed in to change notification settings - Fork 237
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
Uninitialized variables in the Baltic test case #149
Comments
- Reported by @nicjhan in issue mom-ocean/MOM6#149. - Following the use of G%first_direction in MOM6, I add a get_param() for the SIS2 parameter FIRST_DIRECTION. - This does change all the SIS_parameter_doc.all files. - No answer changes.
mom-ocean/MOM6@9dd6497 Bugfix: uninitialized variable dS in midas_vertmap mom-ocean/MOM6@b7ffdc9 Bugfix: uninitialized variable debug_ in midas_vertmap mom-ocean/MOM6@719c885 Bugfix: uninitialized variable CS%Henyey_IGW_background_new mom-ocean/MOM6@c11e836 Bugfix: uninitialized variable CS%Decay_scale_factor_lee - mom-ocean/MOM6@719c885 changed all the MOM_parameter_doc.all files. - No answer changes.
NOAA-GFDL/SIS2@67a04e5 Bugfix: uninitialized variables domore_u, domore_v NOAA-GFDL/SIS2@eb1d222 Bugfix: uninitialized variable G%first_direction - NOAA-GFDL/SIS2@eb1d222 changed all the SIS_parameter_doc.all files. - No answer changes.
- Reported by @nicjhan in issue #149. - The get_param() that set this parameter was inside an if-block so the parameter was not always set. - I set it to a nonsense value to make sure it is NOT used unintentionally. - No answer changes.
- Reported by @nicjhan in issue #149. - There was no get_param() for the parameter HENYEY_IGW_BACKGROUND_NEW. - I added one and made it mutually exclusive with HENYEY_IGW_BACKGROUND. - It would appear we have not been using the new Henyey scheme! - This did change the MOM_parameter_doc.all files. - No answer changes.
- Reported by @nicjhan in issue #149. - debug_ was meant to be set to the state of an optional argument but if the optional argument was not present debug_ was never set. - i_debug and j_debug were also reported as uninitialized but I think initializating debug_ will avoid those references. - No answer changes.
- Reported by @nicjhan in issue #149. - A maxval(abs(dS)) is using all of the array and yet only a sub-array is meant to be used. I simply initialized dS(:,:)=0 - No answer changes.
I have not addressed
because the diagnostic is registered, allocated and posted but not actually calculated. I'm not sure whether @Hallberg-NOAA meant to add a diagnostic here (or had one when developing MOM_baratropc.F90) or whether he meant to delete it. |
I have fixed this so that it doesn't show up in valgrind checks. The fact that the diagnostic is unfinished will get picked up by the diagnostic tests and fixed from there. |
Add tidal diffusivities into Kd_int
Added the overloaded interface set_initialized() to the MOM_restart module, to record that fields have been initialized, despite not appearing in a restart file. This will allow for a second call to set_initialized() after a call to query_initialized() to replicate the existing behavior of query_initialized() after MOM6 PR mom-ocean#149 (NOAA-GFDL#149) has been accepted. All answers are bitwise identical, but there is a new public interface.
Added the overloaded interface set_initialized() to the MOM_restart module, to record that fields have been initialized, despite not appearing in a restart file. This will allow for a second call to set_initialized() after a call to query_initialized() to replicate the existing behavior of query_initialized() after MOM6 PR mom-ocean#149 (NOAA-GFDL#149) has been accepted. All answers are bitwise identical, but there is a new public interface.
I ran valgrind on the Baltic test case and found use of uninitialized variables:
Valgrind has shown itself to be a useful tool to find use of uninitialized variables. I have created an issue #148 to extend the valgrind testing.
The text was updated successfully, but these errors were encountered: