/[MITgcm]/MITgcm/pkg/autodiff/g_dummy_in_dynamics.F
ViewVC logotype

Contents of /MITgcm/pkg/autodiff/g_dummy_in_dynamics.F

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


Revision 1.5 - (show annotations) (download)
Fri Mar 24 23:34:13 2017 UTC (7 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, HEAD
Changes since 1.4: +7 -3 lines
use new S/R RW_GET_SUFFIX to get file suffix (according to "rwSuffixType")

1 C $Header: /u/gcmpack/MITgcm/pkg/autodiff/g_dummy_in_dynamics.F,v 1.4 2014/04/04 23:03:59 jmc Exp $
2 C $Name: $
3
4 #include "AUTODIFF_OPTIONS.h"
5 #ifdef ALLOW_CTRL
6 # include "CTRL_OPTIONS.h"
7 #endif
8 #include "AD_CONFIG.h"
9
10 CBOP
11 C !ROUTINE: g_dummy_in_dynamics
12 C !INTERFACE:
13 subroutine g_dummy_in_dynamics( myTime, myIter, myThid )
14
15 C !DESCRIPTION: \bv
16 C *==========================================================*
17 C | SUBROUTINE g_dummy_in_dynamics |
18 C *==========================================================*
19 C Extract tangent linear variable from TAMC/TAF-generated
20 C tangent linear common blocks, contained in g_common.h
21 C and write fields to file;
22 C Make sure common blocks in g_common.h are up-to-date
23 C w.r.t. current adjoint code.
24 C *==========================================================*
25 C | SUBROUTINE g_dummy_in_dynamics |
26 C *==========================================================*
27 C \ev
28
29 C !USES:
30 IMPLICIT NONE
31
32 C == Global variables ===
33 #include "SIZE.h"
34 #include "EEPARAMS.h"
35 #include "PARAMS.h"
36 #ifdef ALLOW_AUTODIFF_MONITOR
37 # include "g_common.h"
38 #endif
39
40 C !INPUT/OUTPUT PARAMETERS:
41 C == Routine arguments ==
42 C myTime :: time counter for this thread
43 C myIter :: iteration counter for this thread
44 C myThid :: Thread number for this instance of the routine.
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*(10) suff
61 c CHARACTER*(MAX_LEN_MBUF) msgBuf
62 CEOP
63
64 IF (
65 & DIFFERENT_MULTIPLE(adjDumpFreq,myTime,deltaTClock)
66 & ) THEN
67
68 CALL TIMER_START('I/O (WRITE) [ADJOINT LOOP]', myThid )
69 c write(*,*) 'myIter= ',myIter
70
71 C-- Set suffix for this set of data files.
72 IF ( rwSuffixType.EQ.0 ) THEN
73 WRITE(suff,'(I10.10)') myIter
74 ELSE
75 CALL RW_GET_SUFFIX( suff, myTime, myIter, myThid )
76 ENDIF
77 C ==>> Resetting run-time parameter writeBinaryPrec in the middle of a run
78 C ==>> is very very very nasty !!!
79 c writeBinaryPrec = writeStatePrec
80 C <<== If you really want to mess-up with this at your own risk,
81 C <<== uncomment the line above
82
83 #ifdef ALLOW_AUTODIFF_MONITOR_DIAG
84 CALL WRITE_FLD_XYZ_RL(
85 & 'G_Jrhoinsitu.',suff, g_rhoinsitu, myIter, myThid)
86 CALL WRITE_FLD_XYZ_RL(
87 & 'G_Jtotphihyd.',suff, g_totphihyd, myIter, myThid)
88 #endif
89
90 CALL TIMER_STOP( 'I/O (WRITE) [ADJOINT LOOP]', myThid )
91
92 ENDIF
93
94 #endif /* ALLOW_AUTODIFF_MONITOR */
95 #endif /* ALLOW_TANGENTLINEAR_RUN */
96
97 RETURN
98 END

  ViewVC Help
Powered by ViewVC 1.1.22