[Dart-dev] [5976] DART/branches/development/models/POP/dart_pop_mod.f90: set the TLON and TLAT arrays to an initial value of 0 before

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


Revision: 5976
Author:   nancy
Date:     2013-02-26 14:00:38 -0700 (Tue, 26 Feb 2013)
Log Message:
-----------
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/branches/development/models/POP/dart_pop_mod.f90

-------------- next part --------------
Modified: DART/branches/development/models/POP/dart_pop_mod.f90
===================================================================
--- DART/branches/development/models/POP/dart_pop_mod.f90	2013-02-25 22:54:32 UTC (rev 5975)
+++ DART/branches/development/models/POP/dart_pop_mod.f90	2013-02-26 21:00:38 UTC (rev 5976)
@@ -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