[Dart-dev] [4193] DART/trunk/models/bgrid_solo/model_mod.f90: You cannot set the second arg of pert_model_state() to junk;

nancy at ucar.edu nancy at ucar.edu
Tue Dec 8 12:58:01 MST 2009


Revision: 4193
Author:   nancy
Date:     2009-12-08 12:58:01 -0700 (Tue, 08 Dec 2009)
Log Message:
-----------
You cannot set the second arg of pert_model_state() to junk;
in at least one place the caller is passing in the real state
vector as both arg 1 and arg 2 - overwriting it with junk
corrupts the actual state vector data.  we'll just have to put
up with a compiler warning about not setting an intent(out)
argument  (or we could set pert_state to state - unnecessary work
but at least safe).

Modified Paths:
--------------
    DART/trunk/models/bgrid_solo/model_mod.f90

-------------- next part --------------
Modified: DART/trunk/models/bgrid_solo/model_mod.f90
===================================================================
--- DART/trunk/models/bgrid_solo/model_mod.f90	2009-12-08 18:55:54 UTC (rev 4192)
+++ DART/trunk/models/bgrid_solo/model_mod.f90	2009-12-08 19:58:01 UTC (rev 4193)
@@ -2040,8 +2040,14 @@
 logical,  intent(out) :: interf_provided
 
 interf_provided = .false.
-pert_state = MISSING_R8 ! Just to satisfy INTENT(OUT)
 
+! you *cannot* set this to junk. in at least one
+! location the caller is passing the same
+! array into the first arg as the second.  doing this
+! corrupts the state vector completely. we'll just have 
+! to put up with the compiler warning.
+!pert_state = MISSING_R8 ! Just to satisfy INTENT(OUT)
+
 end subroutine pert_model_state
 
 


More information about the Dart-dev mailing list