/[MITgcm]/MITgcm/pkg/mnc/mnc_reshape.template
ViewVC logotype

Contents of /MITgcm/pkg/mnc/mnc_reshape.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Fri Mar 19 03:28:37 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
 o edit all MNC subroutines so that myThid is the _last_ argument

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_reshape.template,v 1.4 2004/01/27 05:47:32 edhill Exp $
2 C $Name: $
3
4 #include "MNC_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 SUBROUTINE MNC_RESHAPE_RX_YY( ni,nj,nk, istart,iend, din,dout )
9
10 implicit none
11
12 C Arguments
13 integer ni,nj,nk, istart(3), iend(3)
14 _RX din(ni,nj,nk)
15 #define mnc_rtype_YY
16 #ifdef mnc_rtype_D
17 REAL*8 dout(*)
18 #endif
19 #ifdef mnc_rtype_R
20 REAL*4 dout(*)
21 #endif
22 #undef mnc_rtype_YY
23
24 C Locals
25 integer i,j,k, n
26
27 n = 0
28 IF (nk .GT. 1) THEN
29 C print *, ni,nj,nk,
30 C & ' istart = ', istart(1), ',', istart(2), ',', istart(3),
31 C & ' iend = ', iend(1), ',', iend(2), ',', iend(3)
32 DO k = istart(3),iend(3)
33 DO j = istart(2),iend(2)
34 DO i = istart(1),iend(1)
35 n = n + 1
36 dout(n) = din(i,j,k)
37 ENDDO
38 ENDDO
39 ENDDO
40 ELSEIF (nj .GT. 1) THEN
41 C print *, ni,nj,
42 C & ' istart = ', istart(1), ',', istart(2),
43 C & ' iend = ', iend(1), ',', iend(2)
44 k = 1
45 DO j = istart(2),iend(2)
46 DO i = istart(1),iend(1)
47 n = n + 1
48 dout(n) = din(i,j,k)
49 ENDDO
50 ENDDO
51 ELSE
52 C print *, ni,
53 C & ' istart = ', istart(1),
54 C & ' iend = ', iend(1)
55 k = 1
56 j = 1
57 DO i = istart(1),iend(1)
58 n = n + 1
59 dout(n) = din(i,j,k)
60 ENDDO
61 ENDIF
62
63 RETURN
64 END
65
66 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
67
68 CEH3 ;;; Local Variables: ***
69 CEH3 ;;; mode:fortran ***
70 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22