/[MITgcm]/MITgcm/pkg/layers/layers_init_varia.F
ViewVC logotype

Annotation of /MITgcm/pkg/layers/layers_init_varia.F

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


Revision 1.3 - (hide annotations) (download)
Wed Sep 19 18:48:18 2012 UTC (11 years, 8 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint64
Changes since 1.2: +15 -7 lines
- added layers_maxNum dimension, to allow for multiple layers
  computations at once (if layers_maxNum >1 in LAYERS_SIZE.h).
- added/replaced new run time parameters :
  layers_bounds (repl. layers_G), layers_bolus (repl. useBOLUS),
  layers_num (repl. LAYER_nb; set by run time layers_name),
  layers_name ('TH', 'SLT' or 'RHO'), layers_krho (repl. layers_kref)
- The old way of specifying LAYER_nb, layers_G, etc. is kept
  for backward compatibility, and superseeds the new way. For now.
- layers_G.data output is replaced with layers1SLT.data
  where '1' is the layers set index (.LE.layers_maxNum)
  and 'SLT' is layers_name (i.e. the type of layers).
- Typical diagnostics names : 'LaUH1SLT','LaHw1SLT'.
- bug fix : previous commit was missing a pair of bi,bj loops.
- added ALLOW_LAYERS_OUTPUT cpp option : if undef then comment
  out the old fashion way of output (that still works for the
  first set of layers). Prefered way now is via pkg/diagnostics.

1 gforget 1.3 C $Header: /u/gcmpack/MITgcm/pkg/layers/layers_init_varia.F,v 1.2 2009/12/28 02:39:11 jmc Exp $
2 rpa 1.1 C $Name: $
3    
4     #include "LAYERS_OPTIONS.h"
5    
6     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7    
8     SUBROUTINE LAYERS_INIT_VARIA( myThid )
9    
10     C ===================================================================
11     C Initialize LAYERS variables.
12     C ===================================================================
13    
14     IMPLICIT NONE
15     #include "EEPARAMS.h"
16     #include "SIZE.h"
17     #include "PARAMS.h"
18     #include "LAYERS_SIZE.h"
19     #include "LAYERS.h"
20    
21     C INPUT/OUTPUT PARAMETERS:
22     C myThid :: my Thread Id number
23     INTEGER myThid
24    
25     #ifdef ALLOW_LAYERS
26    
27     C === Local variables ===
28 gforget 1.3 INTEGER i,j,kg,bi,bj,iLa
29 rpa 1.1
30 gforget 1.3 DO iLa=1,layers_maxNum
31    
32 rpa 1.1 DO bj = myByLo(myThid), myByHi(myThid)
33     DO bi = myBxLo(myThid), myBxHi(myThid)
34    
35     C Loop through 3D variables:
36     DO kg=1,Nlayers
37     DO j=1-Oly,sNy+OLy
38     DO i=1-Olx,sNx+Olx
39    
40     #ifdef LAYERS_UFLUX
41 gforget 1.3 layers_UFlux(i,j,kg,bi,bj,iLa) = 0. _d 0
42 rpa 1.1 #ifdef LAYERS_THICKNESS
43 gforget 1.3 layers_HU(i,j,kg,bi,bj,iLa) = 0. _d 0
44 rpa 1.1 #endif /* LAYERS_THICKNESS */
45     #endif /* LAYERS_UFLUX */
46    
47     #ifdef LAYERS_VFLUX
48 gforget 1.3 layers_VFlux(i,j,kg,bi,bj,iLa) = 0. _d 0
49 rpa 1.1 #ifdef LAYERS_THICKNESS
50 gforget 1.3 layers_HV(i,j,kg,bi,bj,iLa) = 0. _d 0
51 rpa 1.1 #endif /* LAYERS_THICKNESS */
52     #endif /* LAYERS_VFLUX */
53    
54     ENDDO
55     ENDDO
56     ENDDO
57    
58 gforget 1.3 #ifdef ALLOW_LAYERS_OUTPUT
59 rpa 1.1 #ifdef ALLOW_TIMEAVE
60 gforget 1.3 cgf layers_maxNum loop and dimension would be needed for
61     cgf the following and tave output to work beyond iLa.EQ.1
62     IF ( iLa.EQ.1 ) THEN
63 rpa 1.1 C Initialize averages to zero
64 jmc 1.2 layers_TimeAve(bi,bj) = 0. _d 0
65 rpa 1.1
66     #ifdef LAYERS_UFLUX
67     CALL TIMEAVE_RESET(layers_UFlux_T,Nlayers,bi,bj,myThid)
68     #ifdef LAYERS_THICKNESS
69     CALL TIMEAVE_RESET(layers_HU_T,Nlayers,bi,bj,myThid)
70     #endif /* LAYERS_THICKNESS */
71     #endif /* LAYERS_UFLUX */
72    
73     #ifdef LAYERS_VFLUX
74     CALL TIMEAVE_RESET(layers_VFlux_T,Nlayers,bi,bj,myThid)
75     #ifdef LAYERS_THICKNESS
76     CALL TIMEAVE_RESET(layers_HV_T,Nlayers,bi,bj,myThid)
77     #endif /* LAYERS_THICKNESS */
78     #endif /* LAYERS_VFLUX */
79 gforget 1.3 ENDIF !IF ( iLa.EQ.1 ) THEN
80 rpa 1.1 #endif /* ALLOW_TIMEAVE */
81 gforget 1.3 #endif /* ALLOW_LAYERS_OUTPUT */
82 rpa 1.1
83     C- end bi,bj loops
84     ENDDO
85     ENDDO
86 gforget 1.3 ENDDO !DO iLa=1,layers_maxNum
87 rpa 1.1
88     #endif /* ALLOW_LAYERS */
89    
90     RETURN
91     END

  ViewVC Help
Powered by ViewVC 1.1.22