/[MITgcm]/MITgcm/pkg/ctrl/ctrl_set_globfld_xz.F
ViewVC logotype

Contents of /MITgcm/pkg/ctrl/ctrl_set_globfld_xz.F

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


Revision 1.6 - (show annotations) (download)
Thu Oct 30 19:09:05 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51t_post, checkpoint51s_post, checkpoint51q_post, checkpoint51r_post
Branch point for: branch-nonh
Changes since 1.5: +2 -3 lines
ctrl package totally restructured
o pack/unpack now optional and decoupled from
  xx_/adxx_ I/O
o ctrl_pack/unpack cleaned
  (new routines ctrl_init_ctrlvar.F, pkg/ctrl/ctrl_init_wet.F)
o confined inclusion of AD_CONFIG.h to where necessary.

1 C
2 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_set_globfld_xz.F,v 1.5 2003/10/23 04:41:40 edhill Exp $
3 C $Name: $
4
5 #include "CTRL_CPPOPTIONS.h"
6
7
8 subroutine ctrl_set_globfld_xz(
9 I fname, ivartype, mythid )
10
11 c ==================================================================
12 c SUBROUTINE ctrl_set_globfld_xz
13 c ==================================================================
14 c
15 c o initialise field
16 c
17 c started: heimbach@mit.edu, 16-Aug-2001
18 c
19 c changed: heimbach@mit.edu 17-Jun-2003
20 c merged Armin's changes to replace write of
21 c nr * globfld2d by 1 * globfld3d
22 c (ad hoc fix to speed up global I/O)
23 c
24 c ==================================================================
25
26 implicit none
27
28 c == global variables ==
29
30 #include "EEPARAMS.h"
31 #include "SIZE.h"
32 #include "PARAMS.h"
33 #include "GRID.h"
34
35 #include "ctrl.h"
36 #include "cost.h"
37
38 #ifdef ALLOW_ECCO_OPTIMIZATION
39 #include "optim.h"
40 #endif
41
42 c == routine arguments ==
43
44 character*( 80) fname
45 integer ivartype
46 integer mythid
47
48 c == local variables ==
49
50 #ifndef ALLOW_ECCO_OPTIMIZATION
51 integer optimcycle
52 #endif
53
54 integer bi,bj
55 integer ip,jp
56 integer i,j,k
57 integer itlo,ithi
58 integer jtlo,jthi
59 integer jmin,jmax
60 integer imin,imax
61 integer irec,nrec_nl
62
63 _RL globfldxz( snx,nsx,npx,nsy,npy,nr )
64 _RL globfld3d( snx,nsx,npx,sny,nsy,npy,nr )
65
66 c == external ==
67
68 c == end of interface ==
69
70 jtlo = 1
71 jthi = nsy
72 itlo = 1
73 ithi = nsx
74 jmin = 1
75 jmax = sny
76 imin = 1
77 imax = snx
78
79 c Initialise temporary file
80 do k = 1,nr
81 do jp = 1,nPy
82 do bj = jtlo,jthi
83 do ip = 1,nPx
84 do bi = itlo,ithi
85 do i = imin,imax
86 globfldxz(i,bi,ip,bj,jp,k) = 0. _d 0
87 enddo
88 enddo
89 enddo
90 enddo
91 enddo
92 enddo
93 c Initialise temporary file
94 do k = 1,nr
95 do jp = 1,nPy
96 do bj = jtlo,jthi
97 do j = jmin,jmax
98 do ip = 1,nPx
99 do bi = itlo,ithi
100 do i = imin,imax
101 globfld3d(i,bi,ip,j,bj,jp,k) = 0. _d 0
102 enddo
103 enddo
104 enddo
105 enddo
106 enddo
107 enddo
108 enddo
109
110 #ifndef ALLOW_ECCO_OPTIMIZATION
111 optimcycle = 0
112 #endif
113
114 c-- Only the master thread will do I/O.
115 _BEGIN_MASTER( mythid )
116
117 nrec_nl=int(ncvarrecs(ivartype)/sny)
118 do irec = 1, nrec_nl
119 call MDSWRITEFIELD_3D_GL( fname, ctrlprec, 'RL',
120 & Nr, globfld3d,
121 & irec, optimcycle, mythid)
122 enddo
123
124 do irec = nrec_nl*sny+1, ncvarrecs(ivartype)
125 call MDSWRITEFIELD_XZ_GL( fname, ctrlprec, 'RL',
126 & Nr, globfldxz,
127 & irec, optimcycle, mythid)
128 enddo
129
130 _END_MASTER( mythid )
131
132 end

  ViewVC Help
Powered by ViewVC 1.1.22