/[MITgcm]/MITgcm/pkg/profiles/active_file_profiles_g.F
ViewVC logotype

Contents of /MITgcm/pkg/profiles/active_file_profiles_g.F

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


Revision 1.4 - (show annotations) (download)
Fri Jul 14 22:12:23 2006 UTC (17 years, 11 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58m_post
Changes since 1.3: +0 -0 lines
adding ptracer and ssh

1 C $Header: /u/gcmpack/MITgcm/pkg/profiles/active_file_profiles_g.F,v 1.2 2006/05/06 14:33:53 heimbach Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 c ==================================================================
6 c
7 c active_file_g.F: Routines to handle the I/O of the active file for
8 c the tangent linear calculations. All files are
9 c direct access files.
10 c
11 c Routines
12 c
13 c o g_active_read_profile - Read an active 1D variable from file.
14 c o g_active_write_profile - Write an active 1D variable to a file.
15 c
16 c changed: gforget@ocean.mit.edu 23-Mar-2006
17 c
18 c ==================================================================
19
20 subroutine g_active_read_profile(
21 I active_num_file,
22 I nactive_var,
23 O active_var,
24 I active_varnum,
25 I irec,
26 I lAdInit,
27 I myOptimIter,
28 I bi,
29 I bj,
30 I mythid,
31 I dummy,
32 I g_active_var
33 & )
34
35 C !DESCRIPTION: \bv
36 c ==================================================================
37 c SUBROUTINE g_active_read_profile
38 c ==================================================================
39 c o Read an active 1D record from an profile data file.
40 c ==================================================================
41
42 implicit none
43
44 c == global variables ==
45 #include "EEPARAMS.h"
46 #include "SIZE.h"
47 #ifdef ALLOW_PROFILES
48 #include "profiles.h"
49 #endif
50
51 c == routine arguments ==
52 c active_var_file: filename
53 c nactive_var: integer size of active_var
54 c active_var: array
55 c irec: record number
56 c myOptimIter: number of optimization iteration (default: 0)
57 c mythid: thread number for this instance
58 c doglobalread: flag for global or local read/write
59 c (default: .false.)
60 c lAdInit: initialisation of corresponding adjoint
61 c variable and write to active file
62 integer nactive_var
63 _RL active_var(nactive_var)
64 _RL g_active_var(nactive_var)
65 integer irec,active_varnum,active_num_file
66 integer myOptimIter
67 integer bi,bj,mythid
68 logical lAdInit
69 _RL dummy
70
71 #ifdef ALLOW_PROFILES
72
73 call active_read_profile_rl( fidforward(active_num_file,bi,bj),
74 & active_num_file,
75 & nactive_var, active_var, active_varnum, lAdInit,
76 & irec, prof_ind_glob(active_num_file,irec,bi,bj),
77 & TANGENT_SIMULATION, myOptimIter,bi,bj, mythid)
78
79 call active_read_profile_rl( fidtangent(active_num_file,bi,bj),
80 & active_num_file,
81 & nactive_var, g_active_var,active_varnum, lAdInit,
82 & irec, prof_ind_glob(active_num_file,irec,bi,bj),
83 & TANGENT_SIMULATION, myOptimIter,bi,bj, mythid)
84
85 #endif
86
87 return
88 end
89
90
91 c ==================================================================
92 c ==================================================================
93 c ==================================================================
94
95 subroutine g_active_write_profile(
96 I active_num_file,
97 I nactive_var,
98 I active_var,
99 I active_varnum,
100 I irec,
101 I myOptimIter,
102 I bi,
103 I bj,
104 I mythid,
105 I dummy,
106 I g_active_var,
107 I g_dummy
108 & )
109
110 c ==================================================================
111 c SUBROUTINE g_active_write_profile
112 c ==================================================================
113 c
114 c o Write an active 1D variable to a file.
115 c ==================================================================
116
117 implicit none
118
119 c == global variables ==
120 #include "EEPARAMS.h"
121 #include "SIZE.h"
122 #ifdef ALLOW_PROFILES
123 #include "profiles.h"
124 #endif
125
126 c == routine arguments ==
127 c active_var_file: filename
128 c nactive_var: integer size of active_var
129 c active_var: array
130 c irec: record number
131 c myOptimIter: number of optimization iteration (default: 0)
132 c mythid: thread number for this instance
133 integer nactive_var,active_num_file
134 _RL active_var(nactive_var)
135 _RL g_active_var(nactive_var)
136 integer irec,active_varnum
137 integer myOptimIter
138 integer bi,bj,mythid
139 _RL dummy
140 _RL g_dummy
141
142 #ifdef ALLOW_PROFILES
143
144 call active_write_profile_rl( fidforward(active_num_file,bi,bj) ,
145 & active_num_file,
146 & nactive_var, active_var, active_varnum,
147 & irec, prof_ind_glob(active_num_file,irec,bi,bj),
148 & TANGENT_SIMULATION, myOptimIter,bi,bj, mythid)
149
150 call active_write_profile_rl( fidtangent(active_num_file,bi,bj) ,
151 & active_num_file,
152 & nactive_var, g_active_var, active_varnum,
153 & irec, prof_ind_glob(active_num_file,irec,bi,bj),
154 & TANGENT_SIMULATION, myOptimIter,bi,bj, mythid)
155
156 #endif
157
158 return
159 end
160
161 c ==================================================================
162
163
164

  ViewVC Help
Powered by ViewVC 1.1.22