<p><b>duda</b> 2010-01-06 17:14:40 -0700 (Wed, 06 Jan 2010)</p><p>Only initialize second tracer field if nTracers > 1.<br>
<br>
M swmodel/src/module_test_cases.F<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/swmodel/src/module_test_cases.F
===================================================================
--- trunk/swmodel/src/module_test_cases.F        2010-01-06 22:43:15 UTC (rev 108)
+++ trunk/swmodel/src/module_test_cases.F        2010-01-07 00:14:40 UTC (rev 109)
@@ -368,13 +368,15 @@
r = sqrt(min(rr**2.0, (grid % lonCell % array(iCell) - lambda_c)**2.0 + (grid % latCell % array(iCell) - theta_c)**2.0))
state % tracers % array(1,1,iCell) = 1.0 - r/rr
end do
- do iCell=1,grid % nCells
- r = sqrt(min(rr**2.0, (grid % lonCell % array(iCell) - lambda_c)**2.0 + &
- (grid % latCell % array(iCell) - theta_c - pii/6.0)**2.0 &
- ) &
- )
- state % tracers % array(2,1,iCell) = 1.0 - r/rr
- end do
+ if (grid%nTracers > 1) then
+ do iCell=1,grid % nCells
+ r = sqrt(min(rr**2.0, (grid % lonCell % array(iCell) - lambda_c)**2.0 + &
+ (grid % latCell % array(iCell) - theta_c - pii/6.0)**2.0 &
+ ) &
+ )
+ state % tracers % array(2,1,iCell) = 1.0 - r/rr
+ end do
+ end if
!
! Initialize height field (actually, fluid thickness field)
</font>
</pre>