/[MITgcm]/MITgcm/model/src/tracers_correction_step.F
ViewVC logotype

Contents of /MITgcm/model/src/tracers_correction_step.F

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


Revision 1.18 - (show annotations) (download)
Thu Aug 7 17:32:03 2014 UTC (9 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.17: +8 -72 lines
move CYCLE_TRACER calls from tracers_correction_step.F to temp/salt/ptracer_integrate.F
 so that theta,salt and pTracers arrays are already updated when leaving
 S/R THERMODYANMICS while adjustments (filters, conv.adjustment) are still
 applied later, in S/R TRACERS_CORRECTION_STEP.

1 C $Header: /u/gcmpack/MITgcm/model/src/tracers_correction_step.F,v 1.17 2014/07/22 12:04:09 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: TRACERS_CORRECTION_STEP
9 C !INTERFACE:
10 SUBROUTINE TRACERS_CORRECTION_STEP(myTime, myIter, myThid)
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE TRACERS_CORRECTION_STEP
14 C *==========================================================*
15 C |1rst Part : Update T,S.
16 C |part2: Adjustments & Diagnostics
17 C | o Filter T,S (Shapiro Filter, Zonal_Filter)
18 C | o Convective Adjustment
19 C | o Diagmnostic of state variables (Time average)
20 C *==========================================================*
21 C \ev
22
23 C !USES:
24 IMPLICIT NONE
25 C == Global variables ===
26 #include "SIZE.h"
27 #include "EEPARAMS.h"
28 #include "PARAMS.h"
29 #include "DYNVARS.h"
30 #ifdef ALLOW_GENERIC_ADVDIFF
31 # include "GAD.h"
32 #endif
33
34 C !INPUT/OUTPUT PARAMETERS:
35 C == Routine arguments ==
36 C myTime :: Current time in simulation
37 C myIter :: Current iteration number in simulation
38 C myThid :: my Thread Id number
39 _RL myTime
40 INTEGER myIter
41 INTEGER myThid
42
43 #ifdef ALLOW_GENERIC_ADVDIFF
44 C !LOCAL VARIABLES:
45 C == Local variables
46 INTEGER iMin,iMax
47 INTEGER jMin,jMax
48 INTEGER bi, bj
49 CEOP
50
51 #ifdef ALLOW_NONHYDROSTATIC
52 IF ( implicitIntGravWave ) THEN
53 DO bj=myByLo(myThid),myByHi(myThid)
54 DO bi=myBxLo(myThid),myBxHi(myThid)
55 CALL TRACERS_IIGW_CORRECTION(bi,bj, myTime,myIter,myThid)
56 ENDDO
57 ENDDO
58 ENDIF
59 #endif /* ALLOW_NONHYDROSTATIC */
60
61 C--- 2nd Part : Adjustment.
62 C
63 C Static stability is calculated and the tracers are
64 C convective adjusted where statically unstable.
65
66 C-- Filter (and exchange)
67 #ifdef ALLOW_SHAP_FILT
68 IF (useSHAP_FILT) THEN
69 CALL TIMER_START('SHAP_FILT_TS [TRC_CORR_STEP]',myThid)
70 CALL SHAP_FILT_APPLY_TS( theta,salt, myTime, myIter, myThid )
71 CALL TIMER_STOP ('SHAP_FILT_TS [TRC_CORR_STEP]',myThid)
72 ENDIF
73 #endif
74 #ifdef ALLOW_ZONAL_FILT
75 IF (useZONAL_FILT) THEN
76 CALL TIMER_START('ZONAL_FILT_TS [TRC_CORR_STEP]',myThid)
77 CALL ZONAL_FILT_APPLY_TS( theta, salt, myThid )
78 CALL TIMER_STOP ('ZONAL_FILT_TS [TRC_CORR_STEP]',myThid)
79 # ifdef ALLOW_PTRACERS
80 C- apply to passive tracer fields
81 IF (usePTRACERS) THEN
82 CALL PTRACERS_ZONAL_FILT_APPLY( myThid )
83 ENDIF
84 # endif
85 ENDIF
86 #endif /* ALLOW_ZONAL_FILT */
87 C -- Fill negative tracer values (for now, only if Fizhi is running)
88 #ifdef ALLOW_FIZHI
89 IF (useFIZHI .and. saltAdvScheme.eq.2) THEN
90 CALL TIMER_START('SALT_FILL [TRC_CORR_STEP]',myThid)
91 CALL SALT_FILL( uVel,vVel,salt,1,myTime,myIter,myThid )
92 CALL TIMER_STOP ('SALT_FILL [TRC_CORR_STEP]',myThid)
93 ENDIF
94 #endif
95
96 DO bj=myByLo(myThid),myByHi(myThid)
97 DO bi=myBxLo(myThid),myBxHi(myThid)
98
99 C-- Convectively adjust new fields to be statically stable
100 iMin = 1
101 iMax = sNx
102 jMin = 1
103 jMax = sNy
104 #ifdef ALLOW_OPPS
105 IF ( useOPPS ) THEN
106 CALL OPPS_INTERFACE(
107 I bi, bj, iMin, iMax, jMin, jMax,
108 I myTime, myIter, myThid )
109 ELSEIF ( cAdjFreq .NE. 0. ) THEN
110 #else /* ALLOW_OPPS */
111 IF ( cAdjFreq .NE. 0. ) THEN
112 #endif /* ALLOW_OPPS */
113 CALL CONVECTIVE_ADJUSTMENT(
114 I bi, bj, myTime, myIter, myThid )
115 ENDIF
116
117 #ifdef ALLOW_MATRIX
118 IF (useMATRIX)
119 & CALL MATRIX_STORE_TENDENCY_IMP( bi, bj, myTime, myIter, myThid )
120 #endif
121
122 C-- End of 2nd bi,bj loop
123 ENDDO
124 ENDDO
125
126 #endif /* ALLOW_GENERIC_ADVDIFF */
127
128 RETURN
129 END

  ViewVC Help
Powered by ViewVC 1.1.22