MPAS-Dev / MPAS

Repository for private MPAS development prior to the MPAS v6.0 release.
Other
4 stars 0 forks source link

Fixes an uninitialized variable error #1435

Closed vanroekel closed 7 years ago

vanroekel commented 7 years ago

For RRS18to6 there are a few columns where refIndex can be uninitialized in the mixed layer depths AM. This fixes that error.

vanroekel commented 7 years ago

@mark-petersen this bug came up with the new 18to6 80 layer configuration where we made the minimum depth smaller. It is now at the 10m threshold for the mixed layer depth calculation, resulting in an unitialized variable. here is output from a test on grizzly with intel, debug mode

forrtl: severe (194): Run-Time Check Failure. The variable 'ocn_mixed_layer_depths_mp_ocn_compute_mixed_layer_depths_$REFINDEX' is being used in 'mpas_ocn_mixed_layer_depths.F(258,16)' without being defined
Image              PC                Routine            Line        Source
ocean_model        0000000002D35844  ocn_mixed_layer_d         258  mpas_ocn_mixed_layer_depths.F
ocean_model        00000000026F74B7  ocn_analysis_driv        1192  mpas_ocn_analysis_driver.F
ocean_model        00000000026EC14B  ocn_analysis_driv         593  mpas_ocn_analysis_driver.F
ocean_model        00000000026E2A8A  ocn_forward_mode_         481  mpas_ocn_forward_mode.F
ocean_model        000000000276FD87  ocn_core_mp_ocn_c         111  mpas_ocn_core.F
ocean_model        0000000000414460  mpas_subdriver_mp         338  mpas_subdriver.F

Stack trace terminated abnormally.
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[50981,1],394]
  Exit code:    194
--------------------------------------------------------------------------

With this PR, the problem is fixed and the error does not occur.

mark-petersen commented 7 years ago

Looks good. I compiled to be safe.