/[MITgcm]/MITgcm/pkg/thsice/thsice_diagnostics_state.F
ViewVC logotype

Contents of /MITgcm/pkg/thsice/thsice_diagnostics_state.F

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


Revision 1.4 - (show annotations) (download)
Thu Jan 17 23:11:22 2013 UTC (11 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64c, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint65, 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, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.3: +37 -33 lines
move bi,bj loops inside S/R THSICE_DIAGNOSTICS_STATE and remove
 bi,bj from argument list.

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_diagnostics_state.F,v 1.3 2011/11/17 12:44:20 mlosch Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: THSICE_DIAGNOSTICS_STATE
8 C !INTERFACE:
9 SUBROUTINE THSICE_DIAGNOSTICS_STATE(
10 I myTime, myIter, myThid )
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | S/R THSICE_DIAGNOSTICS_STATE
14 C | o fill-in diagnostics array for THSICE state variables
15 C *==========================================================*
16 C \ev
17
18 C !USES:
19 IMPLICIT NONE
20
21 C == Global variables ==
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 c #include "FFIELDS.h"
26 #include "THSICE_PARAMS.h"
27 #include "THSICE_VARS.h"
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine Arguments ==
31 C myTime :: time counter for this thread
32 C myIter :: iteration counter for this thread
33 C myThid :: thread number for this instance of the routine.
34 _RL myTime
35 INTEGER myIter
36 INTEGER myThid
37 CEOP
38
39 #ifdef ALLOW_DIAGNOSTICS
40 C !FUNCTIONS:
41 LOGICAL DIAGNOSTICS_IS_ON
42 EXTERNAL DIAGNOSTICS_IS_ON
43
44 C !LOCAL VARIABLES:
45 C == Local variables ==
46 C bi,bj :: tile indices
47 INTEGER bi,bj
48 INTEGER i,j
49 _RL tmpFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50 _RL tmpFac
51
52 IF ( useDiagnostics ) THEN
53
54 CALL DIAGNOSTICS_FILL( iceMask,'SI_Fract', 0,1, 0,1,1,myThid )
55 CALL DIAGNOSTICS_FILL( snowAge,'SIsnwAge', 0,1, 0,1,1,myThid )
56
57 C- Ice-fraction weighted quantities:
58 tmpFac = 1. _d 0
59 CALL DIAGNOSTICS_FRACT_FILL(
60 I iceHeight, iceMask,tmpFac,1,'SI_Thick',
61 I 0,1, 0,1,1,myThid )
62 CALL DIAGNOSTICS_FRACT_FILL(
63 I snowHeight,iceMask,tmpFac,1,'SI_SnowH',
64 I 0,1, 0,1,1,myThid )
65 CALL DIAGNOSTICS_FRACT_FILL(
66 I Tsrf, iceMask,tmpFac,1,'SI_Tsrf ',
67 I 0,1, 0,1,1,myThid )
68 CALL DIAGNOSTICS_FRACT_FILL(
69 I Tice1, iceMask,tmpFac,1,'SI_Tice1',
70 I 0,1, 0,1,1,myThid )
71 CALL DIAGNOSTICS_FRACT_FILL(
72 I Tice2, iceMask,tmpFac,1,'SI_Tice2',
73 I 0,1, 0,1,1,myThid )
74
75 C- Ice-Volume weighted quantities:
76 IF ( DIAGNOSTICS_IS_ON('SI_Qice1',myThid) .OR.
77 & DIAGNOSTICS_IS_ON('SI_Qice2',myThid) ) THEN
78 DO bj=myByLo(myThid),myByHi(myThid)
79 DO bi=myBxLo(myThid),myBxHi(myThid)
80 C Initialise the entire tmpFld to avoid surprises in
81 C S/R diagstats_calc with TARGET_NEC_SX defined
82 DO j=1-OLy,sNy+OLy
83 DO i=1-OLx,sNx+OLx
84 c DO j=1,sNy
85 c DO i=1,sNx
86 tmpFld(i,j) = iceMask(i,j,bi,bj)*iceHeight(i,j,bi,bj)
87 ENDDO
88 ENDDO
89 CALL DIAGNOSTICS_FRACT_FILL(
90 I Qice1(1-OLx,1-OLy,bi,bj),
91 I tmpFld, tmpFac, 1, 'SI_Qice1',
92 I 0,1, 2,bi,bj, myThid )
93 CALL DIAGNOSTICS_FRACT_FILL(
94 I Qice2(1-OLx,1-OLy,bi,bj),
95 I tmpFld, tmpFac, 1, 'SI_Qice2',
96 I 0,1, 2,bi,bj, myThid )
97 ENDDO
98 ENDDO
99 ENDIF
100
101 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
102
103 C-- Ocean Mixed-Layer temp. & salinity
104 IF ( stepFwd_oceMxL ) THEN
105 CALL DIAGNOSTICS_FILL( tOceMxL,'SItOcMxL', 0,1, 0,1,1,myThid )
106 CALL DIAGNOSTICS_FILL( sOceMxL,'SIsOcMxL', 0,1, 0,1,1,myThid )
107 ENDIF
108
109 ENDIF
110 #endif /* ALLOW_DIAGNOSTICS */
111
112 RETURN
113 END

  ViewVC Help
Powered by ViewVC 1.1.22