/[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.2 - (show annotations) (download)
Sat Jul 13 02:47:32 2002 UTC (21 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46b_post, checkpoint46d_pre, checkpoint46a_post, checkpoint46e_pre, checkpoint46b_pre, checkpoint46c_pre, checkpoint46, checkpoint46a_pre, checkpoint46c_post, checkpoint46e_post, checkpoint46d_post
Changes since 1.1: +103 -0 lines
Merging new ctrl package from release1_p5:
o new ctrl package
  - adopted from ECCO environment to enable optimization
  - added Eliassen Palm fluxes to controls

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) = 1. _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