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

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

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


Revision 1.1 - (show annotations) (download)
Mon Aug 20 17:37:53 2007 UTC (16 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint59g, checkpoint59f, checkpoint59h
routine to reset an ajoint variable to zero

1
2 #include "CPP_OPTIONS.h"
3
4 C !ROUTINE: ADZERO_ADJ_3D
5 C !INTERFACE:
6 SUBROUTINE ADZERO_ADJ_3D(
7 I bi, bj,myThid,adFieldFwd)
8 C !DESCRIPTION: \bv
9 C *==========================================================*
10 C | o zero out a 3D adjoint field
11 C | author: Gael Forget
12 C *==========================================================*
13
14 #include "SIZE.h"
15 #include "EEPARAMS.h"
16 #include "PARAMS.h"
17
18 C == Routine arguments ==
19 C myThid - Thread number for this instance of the routine.
20 integer myThid,bi,bj,i,j,k
21 _RL adFieldFwd(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
22
23 DO k=1,Nr
24 DO j=1-Oly,sNy+Oly
25 DO i=1-Olx,sNx+Olx
26 adFieldFwd(i,j,k) = 0.
27 ENDDO
28 ENDDO
29 ENDDO
30
31 end
32
33 C !ROUTINE: ADZERO_ADJ_2D
34 C !INTERFACE:
35 SUBROUTINE ADZERO_ADJ_2D(
36 I bi, bj,myThid,adFieldFwd)
37 C !DESCRIPTION: \bv
38 C *==========================================================*
39 C | o zero out a 2D adjoint field
40 C | author: Gael Forget
41 C *==========================================================*
42
43 #include "SIZE.h"
44 #include "EEPARAMS.h"
45 #include "PARAMS.h"
46
47 C == Routine arguments ==
48 C myThid - Thread number for this instance of the routine.
49 integer myThid,bi,bj,i,j
50 _RL adFieldFwd(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
51
52 DO j=1-Oly,sNy+Oly
53 DO i=1-Olx,sNx+Olx
54 adFieldFwd(i,j) = 0.
55 ENDDO
56 ENDDO
57
58 end
59

  ViewVC Help
Powered by ViewVC 1.1.22