/[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.6 - (show annotations) (download)
Wed Aug 29 01:59:36 2012 UTC (11 years, 9 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, checkpoint63s, checkpoint64, checkpoint65, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.5: +45 -58 lines
- fix previous modif (EXF_PARAM.h was missing)
- comment out the very nasty "writeBinaryPrec = writeStatePrec" line

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_adjoint_snapshots__g.F,v 1.5 2012/08/28 19:17:46 gforget Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5 #include "AD_CONFIG.h"
6
7 CBOP
8 C !ROUTINE: g_exf_adjoint_snapshots
9 C !INTERFACE:
10 subroutine g_exf_adjoint_snapshots(
11 & iwhen, myTime, myIter, myThid )
12
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE g_exf_adjoint_snapshots |
16 C *==========================================================*
17 C Extract tangent linear variable from TAMC/TAF-generated
18 C tangent linear common blocks, contained in g_common.h
19 C and write fields to file;
20 C Make sure common blocks in g_common.h are up-to-date
21 C w.r.t. current adjoint code.
22 C *==========================================================*
23 C | SUBROUTINE g_exf_adjoint_snapshots |
24 C *==========================================================*
25 C \ev
26
27 C !USES:
28 IMPLICIT NONE
29
30 C == Global variables ===
31 #include "SIZE.h"
32 #include "EEPARAMS.h"
33 #include "PARAMS.h"
34 #include "EXF_PARAM.h"
35 #ifdef ALLOW_AUTODIFF_MONITOR
36 # include "g_common.h"
37 #endif
38
39 C !INPUT/OUTPUT PARAMETERS:
40 C == Routine arguments ==
41 C myIter :: iteration counter for this thread
42 C myTime :: time counter for this thread
43 C myThid :: Thread number for this instance of the routine.
44 INTEGER iwhen
45 _RL myTime
46 INTEGER myIter
47 INTEGER myThid
48
49 #ifdef ALLOW_TANGENTLINEAR_RUN
50 #ifdef ALLOW_AUTODIFF_MONITOR
51
52 C !FUNCTIONS:
53 LOGICAL DIFFERENT_MULTIPLE
54 EXTERNAL DIFFERENT_MULTIPLE
55
56 C !LOCAL VARIABLES:
57 C == local variables ==
58 C suff :: Hold suffix part of a filename
59 C msgBuf :: Error message buffer
60 CHARACTER*(MAX_LEN_FNAM) suff
61 c CHARACTER*(MAX_LEN_MBUF) msgBuf
62 CEOP
63
64 IF (useEXF) THEN
65 IF (
66 & DIFFERENT_MULTIPLE(adjDumpFreq,myTime,deltaTClock)
67 & ) THEN
68
69 CALL TIMER_START('I/O (WRITE) [TLM LOOP]', myThid )
70
71 C-- Set suffix for this set of data files.
72 WRITE(suff,'(I10.10)') myIter
73 C ==>> Resetting run-time parameter writeBinaryPrec in the middle of a run
74 C ==>> is very very very nasty !!!
75 c writeBinaryPrec = writeStatePrec
76 C <<== If you really want to mess-up with this at your own risk,
77 C <<== uncomment the line above
78
79 IF ( iwhen .EQ.1 ) THEN
80
81 CALL WRITE_FLD_XY_RL ( 'G_Justress.',
82 & suff, g_ustress, myIter, myThid )
83 CALL WRITE_FLD_XY_RL ( 'G_Jvstress.',
84 & suff, g_vstress, myIter, myThid )
85 CALL WRITE_FLD_XY_RL ( 'G_Jhflux.',
86 & suff, g_hflux, myIter, myThid )
87 CALL WRITE_FLD_XY_RL ( 'G_Jsflux.',
88 & suff, g_sflux, myIter, myThid )
89
90 ELSEIF ( iwhen .EQ.2 ) THEN
91
92 # ifdef ALLOW_ATM_TEMP
93 CALL WRITE_FLD_XY_RL ( 'G_Jatemp.',
94 & suff, g_atemp, myIter, myThid )
95 CALL WRITE_FLD_XY_RL ( 'G_Jaqh.',
96 & suff, g_aqh, myIter, myThid )
97 CALL WRITE_FLD_XY_RL ( 'G_Jprecip.',
98 & suff, g_precip, myIter, myThid )
99 # endif
100 IF ( useAtmWind ) THEN
101 CALL WRITE_FLD_XY_RL ( 'G_Juwind.',
102 & suff, g_uwind, myIter, myThid )
103 CALL WRITE_FLD_XY_RL ( 'G_Jvwind.',
104 & suff, g_vwind, myIter, myThid )
105 ENDIF
106 # ifdef ALLOW_DOWNWARD_RADIATION
107 CALL WRITE_FLD_XY_RL ( 'G_Jswdown.',
108 & suff, g_swdown, myIter, myThid )
109 # endif
110 # ifdef ALLOW_CLIMSST_RELAXATION
111 CALL WRITE_FLD_XY_RL ( 'G_Jclimsst.',
112 & suff, g_climsst, myIter, myThid )
113 # endif
114 # ifdef ALLOW_CLIMSSS_RELAXATION
115 CALL WRITE_FLD_XY_RL ( 'G_Jclimsss.',
116 & suff, g_climsss, myIter, myThid )
117 # endif
118
119 ENDIF
120
121 CALL TIMER_STOP( 'I/O (WRITE) [TLM LOOP]', myThid )
122
123 ENDIF
124 ENDIF
125
126 #endif /* ALLOW_AUTODIFF_MONITOR */
127 #endif /* ALLOW_TANGENTLINEAR_RUN */
128
129 RETURN
130 END

  ViewVC Help
Powered by ViewVC 1.1.22