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

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

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


Revision 1.5 - (show annotations) (download)
Thu Oct 23 04:41:40 2003 UTC (20 years, 6 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51o_pre, checkpoint51n_post, checkpoint51n_pre, checkpoint51o_post, checkpoint51p_post
Branch point for: checkpoint51n_branch
Changes since 1.4: +5 -0 lines
 o added the [#include "AD_CONFIG.h"] statement to all files that need
   it for adjoint/tl #defines
 o re-worked the build logic in genmake2 to support AD_CONFIG.h
 o removed tools/genmake since it no longer works

1 C
2 C $Header: $
3 C $Name: $
4
5 #include "AD_CONFIG.h"
6 #include "CTRL_CPPOPTIONS.h"
7
8
9 subroutine ctrl_set_globfld_xyz(
10 I fname, ivartype, mythid )
11
12 c ==================================================================
13 c SUBROUTINE ctrl_set_globfld_xyz
14 c ==================================================================
15 c
16 c o initialise field
17 c
18 c started: heimbach@mit.edu, 16-Aug-2001
19 c
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "PARAMS.h"
29 #include "GRID.h"
30
31 #include "ctrl.h"
32 #include "cost.h"
33
34 #ifdef ALLOW_ECCO_OPTIMIZATION
35 #include "optim.h"
36 #endif
37
38 c == routine arguments ==
39
40 character*( 80) fname
41 integer ivartype
42 integer mythid
43
44 c == local variables ==
45
46 #ifndef ALLOW_ECCO_OPTIMIZATION
47 integer optimcycle
48 #endif
49
50 integer bi,bj
51 integer ip,jp
52 integer i,j,k
53 integer itlo,ithi
54 integer jtlo,jthi
55 integer jmin,jmax
56 integer imin,imax
57 integer irec
58
59 _RL globfld3d( snx,nsx,npx,sny,nsy,npy,nr )
60
61 c == external ==
62
63 c == end of interface ==
64
65 jtlo = 1
66 jthi = nsy
67 itlo = 1
68 ithi = nsx
69 jmin = 1
70 jmax = sny
71 imin = 1
72 imax = snx
73
74 c Initialise temporary file
75 do k = 1,nr
76 do jp = 1,nPy
77 do bj = jtlo,jthi
78 do j = jmin,jmax
79 do ip = 1,nPx
80 do bi = itlo,ithi
81 do i = imin,imax
82 globfld3d(i,bi,ip,j,bj,jp,k) = 0. _d 0
83 enddo
84 enddo
85 enddo
86 enddo
87 enddo
88 enddo
89 enddo
90
91 #ifndef ALLOW_ECCO_OPTIMIZATION
92 optimcycle = 0
93 #endif
94
95 c-- Only the master thread will do I/O.
96 _BEGIN_MASTER( mythid )
97
98 do irec = 1, ncvarrecs(ivartype)
99 call MDSWRITEFIELD_3D_GL( fname, ctrlprec, 'RL',
100 & Nr, globfld3d,
101 & irec, optimcycle, mythid)
102 enddo
103
104 _END_MASTER( mythid )
105
106 end

  ViewVC Help
Powered by ViewVC 1.1.22