[Dart-dev] [5977] DART/trunk/models/POP/dart_pop_mod.f90: same fix as on the development branch:

nancy at ucar.edu nancy at ucar.edu
Tue Feb 26 14:02:26 MST 2013


Revision: 5977
Author:   nancy
Date:     2013-02-26 14:02:25 -0700 (Tue, 26 Feb 2013)
Log Message:
-----------
same fix as on the development branch:
set the TLON and TLAT arrays to an initial value of 0 before
doing anything else.  the subsequent code uses a where() clause 
before one set of columns in those arrays have been given a value.  
the previous code did not generate any wrong values, but testing 
uninitialized memory could cause FPEs depending on what happened 
to be at those memory locations.

Modified Paths:
--------------
    DART/trunk/models/POP/dart_pop_mod.f90

-------------- next part --------------
Modified: DART/trunk/models/POP/dart_pop_mod.f90
===================================================================
--- DART/trunk/models/POP/dart_pop_mod.f90	2013-02-26 21:00:38 UTC (rev 5976)
+++ DART/trunk/models/POP/dart_pop_mod.f90	2013-02-26 21:02:25 UTC (rev 5977)
@@ -519,6 +519,14 @@
 pih    = p5*pi
 radian = 180.0_r8/pi
 
+! initialize these arrays to 0. in the code below there is
+! a column that is referenced by a where() construct before 
+! those values are set.  make sure that it doesn't cause a
+! floating point exception from random memory bits which aren't
+! valid floating point numbers.
+TLAT(:,:) = c0
+TLON(:,:) = c0
+
 do j=2,ny
 do i=2,nx
 


More information about the Dart-dev mailing list