/[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.8 - (show annotations) (download)
Tue Nov 16 05:42:12 2004 UTC (19 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint59, checkpoint58, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint58w_post, checkpoint57h_post, checkpoint57y_pre, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, checkpoint57c_pre, checkpoint58r_post, checkpoint58n_post, checkpoint57e_post, checkpoint59a, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint58v_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, checkpoint58x_post, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post
Changes since 1.7: +1 -12 lines
More on dsvd vs. MITgcm interfacing
o handling of g_, ad, via admtlm_vector (mds...vector)
o use ctrl_pack/unpack for admtlm_vector I/O
o use optimcycle for dsvd iteration
o make sure norm is w.r.t. derived quantities

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

  ViewVC Help
Powered by ViewVC 1.1.22