74 |
integer mythid |
integer mythid |
75 |
integer myiter |
integer myiter |
76 |
_RL mytime |
_RL mytime |
77 |
|
#ifdef EXACT_CONSERV |
78 |
INTEGER bi,bj |
INTEGER bi,bj |
79 |
|
#endif /* EXACT_CONSERV */ |
80 |
|
|
81 |
CEOP |
CEOP |
82 |
|
|
83 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
84 |
C-- Reset the model iteration counter and the model time. |
C-- Reset the model iteration counter and the model time. |
85 |
myiter = nIter0 + (iloop-1) |
myiter = nIter0 + (iloop-1) |
86 |
mytime = startTime + float(iloop-1)*deltaTclock |
mytime = startTime + float(iloop-1)*deltaTclock |
87 |
#endif |
#endif |
88 |
|
|
89 |
#if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_AUTODIFF_MONITOR)) |
#if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_AUTODIFF_MONITOR)) |
90 |
C Include call to a dummy routine. Its adjoint will be |
C Include call to a dummy routine. Its adjoint will be |
91 |
C called at the proper place in the adjoint code. |
C called at the proper place in the adjoint code. |
92 |
C The adjoint routine will print out adjoint values |
C The adjoint routine will print out adjoint values |
93 |
C if requested. The location of the call is important, |
C if requested. The location of the call is important, |
94 |
C it has to be after the adjoint of the exchanges |
C it has to be after the adjoint of the exchanges |
95 |
C (DO_GTERM_BLOCKING_EXCHANGES). |
C (DO_GTERM_BLOCKING_EXCHANGES). |
96 |
CALL DUMMY_IN_STEPPING( myTime, myIter, myThid ) |
CALL DUMMY_IN_STEPPING( myTime, myIter, myThid ) |
97 |
CALL DO_FIELDS_BLOCKING_EXCHANGES( myThid ) |
CALL DO_FIELDS_BLOCKING_EXCHANGES( myThid ) |
98 |
#endif |
#endif |
99 |
|
|
100 |
#ifdef EXACT_CONSERV |
#ifdef EXACT_CONSERV |
113 |
|
|
114 |
#ifdef NONLIN_FRSURF |
#ifdef NONLIN_FRSURF |
115 |
C-- compute the future surface level thickness |
C-- compute the future surface level thickness |
116 |
C according to etaH(n+1) |
C according to etaH(n+1) |
117 |
IF ( nonlinFreeSurf.GT.0) THEN |
IF ( nonlinFreeSurf.GT.0) THEN |
118 |
CALL CALC_SURF_DR(etaH, myTime, myIter, myThid ) |
CALL CALC_SURF_DR(etaH, myTime, myIter, myThid ) |
119 |
ENDIF |
ENDIF |
120 |
#endif /* NONLIN_FRSURF */ |
#endif /* NONLIN_FRSURF */ |
121 |
|
|
122 |
C-- Load forcing/external data fields. |
C-- Load forcing/external data fields. |
123 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
124 |
c************************************** |
c************************************** |
125 |
#include "checkpoint_lev1_directives.h" |
#include "checkpoint_lev1_directives.h" |
126 |
c************************************** |
c************************************** |
127 |
#endif |
#endif |
128 |
#ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE |
#ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE |
129 |
C NOTE, that although the exf package is part of the |
C NOTE, that although the exf package is part of the |
130 |
C distribution, it is not currently maintained, i.e. |
C distribution, it is not currently maintained, i.e. |
131 |
C exf is disabled by default in genmake. |
C exf is disabled by default in genmake. |
132 |
IF ( .not. useSEAICE ) THEN |
CALL TIMER_START('EXF_GETFORCING [FORWARD_STEP]',mythid) |
133 |
CALL TIMER_START('EXF_GETFORCING [FORWARD_STEP]',mythid) |
CALL EXF_GETFORCING( mytime, myiter, mythid ) |
134 |
CALL EXF_GETFORCING( mytime, myiter, mythid ) |
CALL TIMER_STOP ('EXF_GETFORCING [FORWARD_STEP]',mythid) |
|
CALL TIMER_STOP ('EXF_GETFORCING [FORWARD_STEP]',mythid) |
|
|
ENDIF |
|
135 |
#else |
#else |
136 |
IF ( .not. useSEAICE ) THEN |
IF ( .NOT. useSEAICE ) THEN |
137 |
CALL TIMER_START('EXTERNAL_FIELDS_LOAD[FORWARD_STEP]',mythid) |
CALL TIMER_START('EXTERNAL_FIELDS_LOAD[FORWARD_STEP]',mythid) |
138 |
CALL EXTERNAL_FIELDS_LOAD( mytime, myiter, mythid ) |
CALL EXTERNAL_FIELDS_LOAD( mytime, myiter, mythid ) |
139 |
CALL TIMER_STOP ('EXTERNAL_FIELDS_LOAD[FORWARD_STEP]',mythid) |
CALL TIMER_STOP ('EXTERNAL_FIELDS_LOAD[FORWARD_STEP]',mythid) |
140 |
ENDIF |
ENDIF |
141 |
#endif /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
#endif /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
142 |
|
|
143 |
#ifdef ALLOW_SEAICE |
#ifdef ALLOW_SEAICE |
151 |
C term. Because this call precedes model thermodynamics, temperature |
C term. Because this call precedes model thermodynamics, temperature |
152 |
C under sea-ice may not be "exactly" at the freezing point by the time |
C under sea-ice may not be "exactly" at the freezing point by the time |
153 |
C theta is dumped or time-averaged. |
C theta is dumped or time-averaged. |
154 |
IF ( useSEAICE ) THEN |
IF ( useSEAICE ) THEN |
155 |
CALL TIMER_START('SEAICE_MODEL [FORWARD_STEP]',myThid) |
CALL TIMER_START('SEAICE_MODEL [FORWARD_STEP]',myThid) |
156 |
CALL SEAICE_MODEL( myTime, myIter, myThid ) |
CALL SEAICE_MODEL( myTime, myIter, myThid ) |
157 |
CALL TIMER_STOP ('SEAICE_MODEL [FORWARD_STEP]',myThid) |
CALL TIMER_STOP ('SEAICE_MODEL [FORWARD_STEP]',myThid) |
158 |
ENDIF |
ENDIF |
159 |
#endif ALLOW_SEAICE |
#endif ALLOW_SEAICE |
160 |
|
|
161 |
C-- Step forward fields and calculate time tendency terms. |
C-- Step forward fields and calculate time tendency terms. |
162 |
CALL TIMER_START('THERMODYNAMICS [FORWARD_STEP]',mythid) |
CALL TIMER_START('THERMODYNAMICS [FORWARD_STEP]',mythid) |
163 |
CALL THERMODYNAMICS( myTime, myIter, myThid ) |
CALL THERMODYNAMICS( myTime, myIter, myThid ) |
164 |
CALL TIMER_STOP ('THERMODYNAMICS [FORWARD_STEP]',mythid) |
CALL TIMER_STOP ('THERMODYNAMICS [FORWARD_STEP]',mythid) |
165 |
|
|
166 |
#ifdef ALLOW_SHAP_FILT |
#ifdef ALLOW_SHAP_FILT |
167 |
IF (useSHAP_FILT .AND. |
IF (useSHAP_FILT .AND. |
168 |
& staggerTimeStep .AND. shap_filt_TrStagg ) THEN |
& staggerTimeStep .AND. shap_filt_TrStagg ) THEN |
169 |
CALL TIMER_START('SHAP_FILT [FORWARD_STEP]',myThid) |
CALL TIMER_START('SHAP_FILT [FORWARD_STEP]',myThid) |
170 |
CALL SHAP_FILT_APPLY_TS( gT, gS, myTime, myIter, myThid ) |
CALL SHAP_FILT_APPLY_TS( gT, gS, myTime, myIter, myThid ) |
171 |
CALL TIMER_STOP ('SHAP_FILT [FORWARD_STEP]',myThid) |
CALL TIMER_STOP ('SHAP_FILT [FORWARD_STEP]',myThid) |
172 |
ENDIF |
ENDIF |
173 |
#endif |
#endif |
174 |
#ifdef ALLOW_ZONAL_FILT |
#ifdef ALLOW_ZONAL_FILT |
175 |
IF (useZONAL_FILT .AND. |
IF (useZONAL_FILT .AND. |
176 |
& staggerTimeStep .AND. zonal_filt_TrStagg ) THEN |
& staggerTimeStep .AND. zonal_filt_TrStagg ) THEN |
177 |
CALL TIMER_START('ZONAL_FILT_APPLY [FORWARD_STEP]',myThid) |
CALL TIMER_START('ZONAL_FILT_APPLY [FORWARD_STEP]',myThid) |
178 |
CALL ZONAL_FILT_APPLY_TS( gT, gS, myThid ) |
CALL ZONAL_FILT_APPLY_TS( gT, gS, myThid ) |
180 |
ENDIF |
ENDIF |
181 |
#endif |
#endif |
182 |
|
|
183 |
C-- Step forward fields and calculate time tendency terms. |
C-- Step forward fields and calculate time tendency terms. |
184 |
IF ( momStepping ) THEN |
IF ( momStepping ) THEN |
185 |
CALL TIMER_START('DYNAMICS [FORWARD_STEP]',mythid) |
CALL TIMER_START('DYNAMICS [FORWARD_STEP]',mythid) |
186 |
CALL DYNAMICS( myTime, myIter, myThid ) |
CALL DYNAMICS( myTime, myIter, myThid ) |
187 |
CALL TIMER_STOP ('DYNAMICS [FORWARD_STEP]',mythid) |
CALL TIMER_STOP ('DYNAMICS [FORWARD_STEP]',mythid) |
188 |
ENDIF |
ENDIF |
189 |
|
|
190 |
#ifdef ALLOW_NONHYDROSTATIC |
#ifdef ALLOW_NONHYDROSTATIC |
191 |
C-- Step forward W field in N-H algorithm |
C-- Step forward W field in N-H algorithm |
192 |
IF ( momStepping .AND. nonHydrostatic ) THEN |
IF ( momStepping .AND. nonHydrostatic ) THEN |
193 |
CALL TIMER_START('CALC_GW [FORWARD_STEP]',myThid) |
CALL TIMER_START('CALC_GW [FORWARD_STEP]',myThid) |
194 |
CALL CALC_GW(myThid) |
CALL CALC_GW(myThid) |
195 |
CALL TIMER_STOP ('CALC_GW [FORWARD_STEP]',myThid) |
CALL TIMER_STOP ('CALC_GW [FORWARD_STEP]',myThid) |
196 |
ENDIF |
ENDIF |
197 |
#endif |
#endif |
198 |
|
|
199 |
#ifdef NONLIN_FRSURF |
#ifdef NONLIN_FRSURF |