/[MITgcm]/MITgcm/verification/OpenAD/code_oad_all/openad_dumpAdjoint.F
ViewVC logotype

Contents of /MITgcm/verification/OpenAD/code_oad_all/openad_dumpAdjoint.F

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


Revision 1.2 - (show annotations) (download)
Tue May 24 20:59:04 2011 UTC (13 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64a, checkpoint62z, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint62y, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint63
Changes since 1.1: +6 -3 lines
split "OBCS.h" into 4 separated header files (OBCS_PARAMS,GRID,FIELDS,SEAICE):
 do not know if all are needed but put them all.

1 C $Header: /u/gcmpack/MITgcm/verification/OpenAD/code_oad_all/openad_dumpAdjoint.F,v 1.1 2009/01/29 21:46:50 utke Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_OBCS
7 # include "OBCS_OPTIONS.h"
8 #endif
9 #ifdef ALLOW_SEAICE
10 # include "SEAICE_OPTIONS.h"
11 #endif
12 #ifdef ALLOW_GMREDI
13 # include "GMREDI_OPTIONS.h"
14 #endif
15
16 C start with a copy of THE_MAIN_LOOP
17 C and remove some the obvious extras
18 SUBROUTINE openad_dumpAdjoint(myTime, myIter, myThid )
19 IMPLICIT NONE
20
21 C == Global variables ==
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25
26 c**************************************
27 #ifdef ALLOW_AUTODIFF_TAMC
28
29 c These includes are needed for
30 c AD-checkpointing.
31 c They provide the fields to be stored.
32
33 # include "GRID.h"
34 # include "DYNVARS.h"
35 # include "FFIELDS.h"
36 # include "EOS.h"
37 # include "GAD.h"
38 # ifdef ALLOW_CD_CODE
39 # include "CD_CODE_VARS.h"
40 # endif
41 # ifdef ALLOW_PTRACERS
42 # include "PTRACERS_SIZE.h"
43 # include "PTRACERS.h"
44 # endif
45 # ifdef EXACT_CONSERV
46 # include "SURFACE.h"
47 # endif
48 # ifdef ALLOW_OBCS
49 # include "OBCS_PARAMS.h"
50 # include "OBCS_GRID.h"
51 # include "OBCS_FIELDS.h"
52 # include "OBCS_SEAICE.h"
53 # endif
54 # ifdef ALLOW_EXF
55 # include "EXF_FIELDS.h"
56 # include "EXF_PARAM.h"
57 # ifdef ALLOW_BULKFORMULAE
58 # include "EXF_CONSTANTS.h"
59 # endif
60 # endif /* ALLOW_EXF */
61 # ifdef ALLOW_SEAICE
62 # include "SEAICE.h"
63 # endif
64 # ifdef ALLOW_EBM
65 # include "EBM.h"
66 # endif
67 # ifdef ALLOW_KPP
68 # include "KPP.h"
69 # include "KPP_DIAGS.h"
70 # include "KPP_PARAMS.h"
71 # endif
72 # ifdef ALLOW_DIVIDED_ADJOINT_MPI
73 # include "mpif.h"
74 # endif
75
76 # include "tamc.h"
77 # include "ctrl.h"
78 # include "ctrl_dummy.h"
79 # include "cost.h"
80
81 #endif /* ALLOW_AUTODIFF_TAMC */
82
83 INTEGER myThid
84 INTEGER myIter
85 _RL myTime
86
87 double precision foo5(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
88 double precision foo4(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
89
90 CHARACTER*(10) suff
91
92 if (Mod(myiter,360).eq.0) then
93 WRITE(suff,'(I10.10)') myIter
94 foo5=theta%d
95 call write_fld_xyz_rl('adjtheta.',suff,foo5,myiter,1)
96 foo5=salt%d
97 call write_fld_xyz_rl('adjsalt.',suff,foo5,myiter,1)
98 foo5=uvel%d
99 call write_fld_xyz_rl('adjuvel.',suff,foo5,myiter,1)
100 foo5=vvel%d
101 call write_fld_xyz_rl('adjvvel.',suff,foo5,myiter,1)
102 foo5=wvel%d
103 call write_fld_xyz_rl('adjwvel.',suff,foo5,myiter,1)
104 foo4=etan%d
105 call write_fld_xy_rl('adjetan.',suff,foo4,myiter,1)
106 # ifdef ALLOW_DIFFKR_CONTROL
107 foo5=diffkr%d
108 call write_fld_xy_rl('adjdiffkr.',suff,foo5,myiter,1)
109 # endif
110 # ifdef ALLOW_HFLUX0_CONTROL
111 foo4=qnet%d
112 call write_fld_xy_rl('adjqnet.',suff,foo4,myiter,1)
113 # endif
114 # ifdef ALLOW_SFLUX0_CONTROL
115 foo4=empmr%d
116 call write_fld_xy_rl('adjempmr.',suff,foo4,myiter,1)
117 # endif
118 # ifdef ALLOW_TAUU0_CONTROL
119 foo4=fu%d
120 call write_fld_xy_rl('adjfu.',suff,foo4,myiter,1)
121 # endif
122 # ifdef ALLOW_TAUV0_CONTROL
123 foo4=fv%d
124 call write_fld_xy_rl('adjfv.',suff,foo4,myiter,1)
125 # endif
126 endif
127 END
128

  ViewVC Help
Powered by ViewVC 1.1.22