| 1 |
jmc |
1.3 |
C $Header: /u/gcmpack/MITgcm_contrib/nesting_sannino/nest_child/nest_child_setmemo.F,v 1.2 2009/10/23 19:44:02 sannino Exp $ |
| 2 |
heimbach |
1.1 |
C $Name: $ |
| 3 |
|
|
|
| 4 |
jmc |
1.3 |
#include "NEST_CHILD_OPTIONS.h" |
| 5 |
heimbach |
1.1 |
|
| 6 |
|
|
CBOP |
| 7 |
|
|
C !ROUTINE: NEST_CHILD_SETMEMO |
| 8 |
|
|
C !INTERFACE: |
| 9 |
|
|
SUBROUTINE NEST_CHILD_SETMEMO( myTime, myIter, myThid ) |
| 10 |
|
|
|
| 11 |
|
|
C !DESCRIPTION: \bv |
| 12 |
|
|
C *================================================================== |
| 13 |
|
|
C | SUBROUTINE nest_child_setmemo |
| 14 |
|
|
C | o Run the ocean model and, optionally, evaluate a cost function. |
| 15 |
|
|
C *================================================================== |
| 16 |
|
|
C \ev |
| 17 |
|
|
|
| 18 |
|
|
C !USES: |
| 19 |
|
|
IMPLICIT NONE |
| 20 |
|
|
C == Global variables == |
| 21 |
|
|
#include "SIZE.h" |
| 22 |
|
|
#include "EEPARAMS.h" |
| 23 |
|
|
#include "PARAMS.h" |
| 24 |
|
|
#include "DYNVARS.h" |
| 25 |
jmc |
1.3 |
#include "SURFACE.h" |
| 26 |
|
|
#include "NEST_CHILD.h" |
| 27 |
heimbach |
1.1 |
|
| 28 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
| 29 |
|
|
C == Routine arguments == |
| 30 |
|
|
C myTime :: time counter for this thread |
| 31 |
|
|
C myIter :: iteration counter for this thread |
| 32 |
|
|
C myThid :: thread number for this instance of the routine. |
| 33 |
|
|
_RL myTime |
| 34 |
|
|
INTEGER myIter |
| 35 |
|
|
INTEGER myThid |
| 36 |
|
|
|
| 37 |
|
|
C !LOCAL VARIABLES: |
| 38 |
|
|
C == Local variables == |
| 39 |
|
|
CEOP |
| 40 |
|
|
|
| 41 |
|
|
#ifdef ALLOW_DEBUG |
| 42 |
jmc |
1.3 |
IF (debugMode) CALL DEBUG_ENTER('NEST_CHILD_SETMEMO',myThid) |
| 43 |
heimbach |
1.1 |
#endif |
| 44 |
sannino |
1.2 |
c--------------------------------------------------------- |
| 45 |
|
|
c Reset to zero the forward step (PASSI) for the CHILD |
| 46 |
|
|
c---------------------------------------------------------- |
| 47 |
jmc |
1.3 |
IF (PASSI.EQ.3) THEN |
| 48 |
heimbach |
1.1 |
PASSI = 0 |
| 49 |
|
|
ENDIF |
| 50 |
|
|
c---------------------------------------------------- |
| 51 |
sannino |
1.2 |
c Wait the signal from driver |
| 52 |
heimbach |
1.1 |
c---------------------------------------------------- |
| 53 |
|
|
IF (PASSI.eq.0) then |
| 54 |
sannino |
1.2 |
guNm1_MEMO (:,:,:,:,:) = 0. |
| 55 |
|
|
gvNm1_MEMO (:,:,:,:,:) = 0. |
| 56 |
|
|
gtNm1_MEMO (:,:,:,:,:) = 0. |
| 57 |
|
|
gsNm1_MEMO (:,:,:,:,:) = 0. |
| 58 |
|
|
gsNm1_MEMO (:,:,:,:,:) = 0. |
| 59 |
|
|
dEtaHdt_MEMO(:,:,:,:) = 0. |
| 60 |
heimbach |
1.1 |
ENDIF |
| 61 |
jmc |
1.3 |
|
| 62 |
heimbach |
1.1 |
PASSI = PASSI + 1 |
| 63 |
jmc |
1.3 |
|
| 64 |
heimbach |
1.1 |
guNm1_MEMO (:,:,:,:,:)=guNm1_MEMO (:,:,:,:,:)+ guNm1 (:,:,:,:,:) |
| 65 |
|
|
gvNm1_MEMO (:,:,:,:,:)=gvNm1_MEMO (:,:,:,:,:)+ gvNm1 (:,:,:,:,:) |
| 66 |
|
|
gtNm1_MEMO (:,:,:,:,:)=gtNm1_MEMO (:,:,:,:,:)+ gtNm1 (:,:,:,:,:) |
| 67 |
|
|
gsNm1_MEMO (:,:,:,:,:)=gsNm1_MEMO (:,:,:,:,:)+ gsNm1 (:,:,:,:,:) |
| 68 |
|
|
dEtaHdt_MEMO (:,:,:,:)=dEtaHdt_MEMO (:,:,:,:)+ dEtaHdt (:,:,:,:) |
| 69 |
|
|
|
| 70 |
|
|
#ifdef ALLOW_DEBUG |
| 71 |
jmc |
1.3 |
IF (debugMode) CALL DEBUG_LEAVE('NEST_CHILD_SETMEMO',myThid) |
| 72 |
heimbach |
1.1 |
#endif |
| 73 |
|
|
|
| 74 |
|
|
RETURN |
| 75 |
|
|
END |