/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_common/openad_dumpAdjoint.F
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_common/openad_dumpAdjoint.F

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


Revision 1.3 - (hide annotations) (download)
Wed Dec 18 20:19:09 2013 UTC (11 years, 7 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
removed duplicates

1 utke 1.3 C $Header: /u/gcmpack/MITgcm_contrib/heimbach/OpenAD/code_common/openad_dumpAdjoint.F,v 1.2 2008/11/19 20:50:10 utke Exp $
2 utke 1.1 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.h"
50     # endif
51     # ifdef ALLOW_EXF
52 utke 1.2 # include "EXF_FIELDS.h"
53     # include "EXF_PARAM.h"
54 utke 1.1 # ifdef ALLOW_BULKFORMULAE
55 utke 1.2 # include "EXF_CONSTANTS.h"
56 utke 1.1 # endif
57     # endif /* ALLOW_EXF */
58     # ifdef ALLOW_SEAICE
59     # include "SEAICE.h"
60     # endif
61     # ifdef ALLOW_EBM
62     # include "EBM.h"
63     # endif
64 utke 1.2 # ifdef ALLOW_KPP
65     # include "KPP.h"
66     # include "KPP_DIAGS.h"
67     # include "KPP_PARAMS.h"
68     # endif
69 utke 1.1 # ifdef ALLOW_DIVIDED_ADJOINT_MPI
70     # include "mpif.h"
71     # endif
72    
73     # include "tamc.h"
74     # include "ctrl.h"
75     # include "ctrl_dummy.h"
76     # include "cost.h"
77    
78     #endif /* ALLOW_AUTODIFF_TAMC */
79    
80     INTEGER myThid
81     INTEGER myIter
82     _RL myTime
83    
84     double precision foo5(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
85     double precision foo4(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
86    
87     CHARACTER*(10) suff
88    
89     if (Mod(myiter,360).eq.0) then
90     WRITE(suff,'(I10.10)') myIter
91     foo5=theta%d
92     call write_fld_xyz_rl('adjtheta.',suff,foo5,myiter,1)
93     foo5=salt%d
94     call write_fld_xyz_rl('adjsalt.',suff,foo5,myiter,1)
95     foo5=uvel%d
96     call write_fld_xyz_rl('adjuvel.',suff,foo5,myiter,1)
97     foo5=vvel%d
98     call write_fld_xyz_rl('adjvvel.',suff,foo5,myiter,1)
99     foo5=wvel%d
100     call write_fld_xyz_rl('adjwvel.',suff,foo5,myiter,1)
101     foo4=etan%d
102     call write_fld_xy_rl('adjetan.',suff,foo4,myiter,1)
103     # ifdef ALLOW_DIFFKR_CONTROL
104     foo5=diffkr%d
105     call write_fld_xy_rl('adjdiffkr.',suff,foo5,myiter,1)
106     # endif
107     # ifdef ALLOW_HFLUX0_CONTROL
108     foo4=qnet%d
109     call write_fld_xy_rl('adjqnet.',suff,foo4,myiter,1)
110     # endif
111     # ifdef ALLOW_SFLUX0_CONTROL
112     foo4=empmr%d
113     call write_fld_xy_rl('adjempmr.',suff,foo4,myiter,1)
114     # endif
115     # ifdef ALLOW_TAUU0_CONTROL
116     foo4=fu%d
117     call write_fld_xy_rl('adjfu.',suff,foo4,myiter,1)
118     # endif
119     # ifdef ALLOW_TAUV0_CONTROL
120     foo4=fv%d
121     call write_fld_xy_rl('adjfv.',suff,foo4,myiter,1)
122     # endif
123     endif
124     END
125    

  ViewVC Help
Powered by ViewVC 1.1.22