forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zero_adj.F
97 lines (83 loc) · 2.51 KB
/
zero_adj.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
C $Header: /u/gcmpack/MITgcm/pkg/autodiff/zero_adj.F,v 1.7 2012/08/12 18:46:20 jmc Exp $
C $Name: $
#include "CPP_EEOPTIONS.h"
C-- File zero_adj.F:
C-- Contents
C-- o ZERO_ADJ_1D
C-- o ZERO_ADJ_LOC
C-- o ZERO_ADJ
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ZERO_ADJ_1D
C !INTERFACE:
SUBROUTINE ZERO_ADJ_1D(
I NrIn, fieldFwd, myThid )
C !DESCRIPTION: \bv
C *==========================================================*
C | o zero out a one dimensional adjoint field
C | ... nothing happens in forward mode
C | author: Gael Forget
C *==========================================================*
C \ev
C !USES:
IMPLICIT NONE
C === Global variables ===
#include "SIZE.h"
#include "EEPARAMS.h"
C !INPUT/OUTPUT PARAMETERS:
C myThid :: my Thread Id number
INTEGER NrIn, myThid
_RL fieldFwd(NrIn)
CEOP
RETURN
END
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ZERO_ADJ_LOC
C !INTERFACE:
SUBROUTINE ZERO_ADJ_LOC(
I NrIn, fieldFwd, myThid )
C !DESCRIPTION: \bv
C *==========================================================*
C | o zero out a local (no nsx,nsy dims.) adjoint field
C | ... nothing happens in forward mode
C | author: Gael Forget
C *==========================================================*
C \ev
C !USES:
IMPLICIT NONE
C === Global variables ===
#include "SIZE.h"
#include "EEPARAMS.h"
C !INPUT/OUTPUT PARAMETERS:
C myThid :: my Thread Id number
INTEGER NrIn, myThid
_RL fieldFwd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NrIn)
CEOP
RETURN
END
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ZERO_ADJ
C !INTERFACE:
SUBROUTINE ZERO_ADJ(
I NrIn, fieldFwd, myThid )
C !DESCRIPTION: \bv
C *==========================================================*
C | o zero out a full (incl. nsx,nsy dims.) adjoint field
C | ... nothing happens in forward mode
C | author: Gael Forget
C *==========================================================*
C \ev
C !USES:
IMPLICIT NONE
C === Global variables ===
#include "SIZE.h"
#include "EEPARAMS.h"
C !INPUT/OUTPUT PARAMETERS:
C myThid :: my Thread Id number
INTEGER NrIn, myThid
_RL fieldFwd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NrIn,nSx,nSy)
CEOP
RETURN
END