| 1 | program test_congvec |
|---|
| 2 | USE COSP_KINDS, ONLY: wp |
|---|
| 3 | ! *****************************COPYRIGHT**************************** |
|---|
| 4 | ! (c) British Crown Copyright 2009, the Met Office. |
|---|
| 5 | ! All rights reserved. |
|---|
| 6 | ! $Revision: 23 $, $Date: 2011-03-31 07:41:37 -0600 (Thu, 31 Mar 2011) $ |
|---|
| 7 | ! $URL: https://cfmip-obs-sim.googlecode.com/svn/devel/branches/dustinswales/icarus-scops-4.1-bsd/test_congvec.f $ |
|---|
| 8 | ! |
|---|
| 9 | ! Redistribution and use in source and binary forms, with or without |
|---|
| 10 | ! modification, are permitted provided that the |
|---|
| 11 | ! following conditions are met: |
|---|
| 12 | ! |
|---|
| 13 | ! * Redistributions of source code must retain the above |
|---|
| 14 | ! copyright notice, this list of conditions and the following |
|---|
| 15 | ! disclaimer. |
|---|
| 16 | ! * Redistributions in binary form must reproduce the above |
|---|
| 17 | ! copyright notice, this list of conditions and the following |
|---|
| 18 | ! disclaimer in the documentation and/or other materials |
|---|
| 19 | ! provided with the distribution. |
|---|
| 20 | ! * Neither the name of the Met Office nor the names of its |
|---|
| 21 | ! contributors may be used to endorse or promote products |
|---|
| 22 | ! derived from this software without specific prior written |
|---|
| 23 | ! permission. |
|---|
| 24 | ! |
|---|
| 25 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|---|
| 26 | ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|---|
| 27 | ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|---|
| 28 | ! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|---|
| 29 | ! OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|---|
| 30 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|---|
| 31 | ! LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|---|
| 32 | ! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|---|
| 33 | ! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|---|
| 34 | ! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|---|
| 35 | ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 36 | ! |
|---|
| 37 | ! *****************************COPYRIGHT******************************* |
|---|
| 38 | ! *****************************COPYRIGHT******************************* |
|---|
| 39 | |
|---|
| 40 | ! $Id: test_congvec.f,v 4.0 2009/02/13 08:12:22 hadmw Exp $ |
|---|
| 41 | |
|---|
| 42 | implicit none |
|---|
| 43 | integer, parameter :: huge32 = 2147483647, & |
|---|
| 44 | npoints = 100, & |
|---|
| 45 | niterations = 100, & |
|---|
| 46 | i2_16 = 65536 |
|---|
| 47 | |
|---|
| 48 | integer j,i,irand,overflow_32 |
|---|
| 49 | integer, dimension(npoints) :: seed |
|---|
| 50 | real(wp), dimension(npoints) :: ran |
|---|
| 51 | |
|---|
| 52 | do j=1,npoints |
|---|
| 53 | seed(j)=j*129 |
|---|
| 54 | enddo |
|---|
| 55 | |
|---|
| 56 | do i=1,100 |
|---|
| 57 | include 'congvec.f90' |
|---|
| 58 | write (6,'(f8.3)') (ran(j),j=1,npoints) |
|---|
| 59 | enddo |
|---|
| 60 | |
|---|
| 61 | end program test_congvec |
|---|