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

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

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


Revision 1.3 - (show annotations) (download)
Mon Sep 16 18:11:58 2002 UTC (21 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, c49_ctrl, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint48i_post, checkpoint46l_pre, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48b_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint48d_post, checkpoint48f_post, checkpoint46j_pre, checkpoint48h_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, checkpoint48c_post, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint50g_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint50d_pre, checkpoint47, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint48g_post, checkpoint47h_post, checkpoint50b_post
Branch point for: branch-exfmods-curt
Changes since 1.2: +1 -1 lines
Enable tangent linear (forward mode) gradient checks:
o extended active file handling to g_... files
o added TANGENT_SIMULATION to theSimulationMode
o extended grdchk package accordingly

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

  ViewVC Help
Powered by ViewVC 1.1.22