/[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.6 - (show annotations) (download)
Tue Oct 9 00:07:59 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.5: +3 -2 lines
add missing cvs $Header:$ or $Name:$

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

  ViewVC Help
Powered by ViewVC 1.1.22