/[MITgcm]/MITgcm/pkg/exf/exf_adjoint_snapshots__g.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_adjoint_snapshots__g.F

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


Revision 1.3 - (show annotations) (download)
Tue Oct 9 00:04:05 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, 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.2: +3 -1 lines
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: g_exf_adjoint_snapshots
8 C !INTERFACE:
9 subroutine g_exf_adjoint_snapshots(
10 & iwhen, mytime, myiter, myThid )
11
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE g_exf_adjoint_snapshots |
15 C *==========================================================*
16 C Extract tangent linear variable from TAMC/TAF-generated
17 C tangent linear common blocks, contained in g_common.h
18 C and write fields to file;
19 C Make sure common blocks in g_common.h are up-to-date
20 C w.r.t. current adjoint code.
21 C *==========================================================*
22 C | SUBROUTINE g_exf_adjoint_snapshots |
23 C *==========================================================*
24 C \ev
25
26 C !USES:
27 IMPLICIT NONE
28
29 C == Global variables ===
30 #include "SIZE.h"
31 #include "EEPARAMS.h"
32 #include "PARAMS.h"
33 #ifdef ALLOW_AUTODIFF_MONITOR
34 # include "g_common.h"
35 #endif
36
37 LOGICAL DIFFERENT_MULTIPLE
38 EXTERNAL DIFFERENT_MULTIPLE
39 INTEGER IO_ERRCOUNT
40 EXTERNAL IO_ERRCOUNT
41
42 C !INPUT/OUTPUT PARAMETERS:
43 C == Routine arguments ==
44 C myIter - iteration counter for this thread
45 C myTime - time counter for this thread
46 C myThid - Thread number for this instance of the routine.
47 integer iwhen
48 integer myThid
49 integer myiter
50 _RL mytime
51
52 #ifdef ALLOW_TANGENTLINEAR_RUN
53 #ifdef ALLOW_AUTODIFF_MONITOR
54
55 C !LOCAL VARIABLES:
56 c == local variables ==
57 C suff - Hold suffix part of a filename
58 C beginIOErrCount - Begin and end IO error counts
59 C endIOErrCount
60 C msgBuf - Error message buffer
61 CHARACTER*(MAX_LEN_FNAM) suff
62 INTEGER beginIOErrCount
63 INTEGER endIOErrCount
64 CHARACTER*(MAX_LEN_MBUF) msgBuf
65
66 c == end of interface ==
67 CEOP
68
69 call TIMER_START('I/O (WRITE) [TLM LOOP]', myThid )
70
71 IF (useEXF) THEN
72
73 IF (
74 & DIFFERENT_MULTIPLE(adjDumpFreq,mytime,deltaTClock)
75 & ) THEN
76
77 _BEGIN_MASTER( myThid )
78
79 C-- Set suffix for this set of data files.
80 WRITE(suff,'(I10.10)') myIter
81 writeBinaryPrec = writeStatePrec
82
83 C-- Read IO error counter
84 beginIOErrCount = IO_ERRCOUNT(myThid)
85
86 IF ( iwhen .EQ.1 ) THEN
87
88 CALL WRITE_FLD_XY_RL ( 'G_Justress.',
89 & suff, g_ustress, myIter, myThid)
90 CALL WRITE_FLD_XY_RL ( 'G_Jvstress.',
91 & suff, g_vstress, myIter, myThid)
92 CALL WRITE_FLD_XY_RL ( 'G_Jhflux.',
93 & suff, g_hflux, myIter, myThid)
94 CALL WRITE_FLD_XY_RL ( 'G_Jsflux.',
95 & suff, g_sflux, myIter, myThid)
96
97 ELSEIF ( iwhen .EQ.2 ) THEN
98
99 # ifdef ALLOW_ATM_TEMP
100 CALL WRITE_FLD_XY_RL ( 'G_Jatemp.',
101 & suff, g_atemp, myIter, myThid)
102 CALL WRITE_FLD_XY_RL ( 'G_Jaqh.',
103 & suff, g_aqh, myIter, myThid)
104 CALL WRITE_FLD_XY_RL ( 'G_Jprecip.',
105 & suff, g_precip, myIter, myThid)
106 # endif
107 # ifdef ALLOW_ATM_WIND
108 CALL WRITE_FLD_XY_RL ( 'G_Juwind.',
109 & suff, g_uwind, myIter, myThid)
110 CALL WRITE_FLD_XY_RL ( 'G_Jvwind.',
111 & suff, g_vwind, myIter, myThid)
112 # endif
113 # ifdef ALLOW_DOWNWARD_RADIATION
114 CALL WRITE_FLD_XY_RL ( 'G_Jswdown.',
115 & suff, g_swdown, myIter, myThid)
116 # endif
117 # ifdef ALLOW_CLIMSST_RELAXATION
118 CALL WRITE_FLD_XY_RL ( 'G_Jclimsst.',
119 & suff, g_climsst, myIter, myThid)
120 # endif
121 # ifdef ALLOW_CLIMSSS_RELAXATION
122 CALL WRITE_FLD_XY_RL ( 'G_Jclimsss.',
123 & suff, g_climsss, myIter, myThid)
124 # endif
125
126 ENDIF
127
128 _END_MASTER( myThid )
129 _BARRIER
130
131
132 ENDIF
133
134 ENDIF
135
136 call TIMER_STOP( 'I/O (WRITE) [TLM LOOP]', myThid )
137
138 #endif /* ALLOW_AUTODIFF_MONITOR */
139 #endif /* ALLOW_TANGENTLINEAR_RUN */
140
141 end
142
143
144
145
146
147
148
149
150

  ViewVC Help
Powered by ViewVC 1.1.22