/[MITgcm]/MITgcm_contrib/torge/itd/code/seaice_itd_sum.F
ViewVC logotype

Annotation of /MITgcm_contrib/torge/itd/code/seaice_itd_sum.F

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


Revision 1.3 - (hide annotations) (download)
Wed Sep 26 17:36:00 2012 UTC (12 years, 10 months ago) by torge
Branch: MAIN
Changes since 1.2: +5 -3 lines
remove declaration of outer loop counters bi,bj

1 torge 1.2 C $Header: /u/gcmpack/MITgcm_contrib/torge/itd/code/seaice_itd_sum.F,v 1.1 2012/04/27 22:25:23 dimitri Exp $
2 dimitri 1.1 C $Name: $
3    
4     #include "SEAICE_OPTIONS.h"
5    
6     C !ROUTINE: SEAICE_ITD_SUM
7    
8     C !INTERFACE: ==========================================================
9     SUBROUTINE SEAICE_ITD_SUM(
10 torge 1.3 I bi, bj, myTime, myIter, myThid )
11 dimitri 1.1
12     C !DESCRIPTION: \bv
13     C *===========================================================*
14     C | SUBROUTINE SEAICE_ITD_SUM
15     C | o sum ice area and volume over all ITD categories
16     C | and write into AREA and HEFF
17     C |
18     C | Torge Martin, Mar. 2012, torge@mit.edu
19     C *===========================================================*
20     C \ev
21    
22     C !USES: ===============================================================
23     IMPLICIT NONE
24    
25     C === Global variables ===
26     C AREA :: sea ice area total
27     C AREAITD :: sea ice area by category
28     C HEFF :: sea ice volume total
29     C HEFFITD :: sea ice volume by category
30     C HSNOW :: snow volume total
31     C HSNOWITD :: snow volume by category
32     C
33     #include "SIZE.h"
34     #include "EEPARAMS.h"
35     #include "PARAMS.h"
36     #include "GRID.h"
37     #include "SEAICE_SIZE.h"
38     #include "SEAICE_PARAMS.h"
39     #include "SEAICE.h"
40    
41     #ifdef ALLOW_AUTODIFF_TAMC
42     # include "tamc.h"
43     #endif
44    
45     C !INPUT PARAMETERS: ===================================================
46     C === Routine arguments ===
47 torge 1.3 C bi,bj :: outer loop counters
48 dimitri 1.1 C myTime :: current time
49     C myIter :: iteration number
50     C myThid :: Thread no. that called this routine.
51     _RL myTime
52 torge 1.3 INTEGER bi, bj
53 dimitri 1.1 INTEGER myIter
54     INTEGER myThid
55     CEndOfInterface
56    
57     #ifdef SEAICE_ITD
58    
59     C !LOCAL VARIABLES: ====================================================
60     C === Local variables ===
61 torge 1.3 C i,j,k :: inner loop counters
62 dimitri 1.1 C nITD :: number of sea ice thickness categories
63     C
64 torge 1.3 INTEGER i, j, k
65 dimitri 1.1 #ifdef ALLOW_AUTODIFF_TAMC
66     INTEGER itmpkey
67     #endif /* ALLOW_AUTODIFF_TAMC */
68     #ifdef SEAICE_AGE
69     INTEGER iTracer
70     #endif
71    
72     C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
73    
74 torge 1.2 c DO bj=myByLo(myThid),myByHi(myThid)
75     c DO bi=myBxLo(myThid),myBxHi(myThid)
76     C must now be called within bi,bj loop
77 dimitri 1.1
78     DO j=1-OLy,sNy+OLy
79     DO i=1-OLx,sNx+OLx
80     AREA (i,j,bi,bj)=AREAITD (i,j,1,bi,bj)
81     HEFF (i,j,bi,bj)=HEFFITD (i,j,1,bi,bj)
82     HSNOW(i,j,bi,bj)=HSNOWITD(i,j,1,bi,bj)
83     ENDDO
84     ENDDO
85    
86     DO k=2,nITD
87     DO j=1-OLy,sNy+OLy
88     DO i=1-OLx,sNx+OLx
89     AREA (i,j,bi,bj) = AREA (i,j,bi,bj) + AREAITD (i,j,k,bi,bj)
90     HEFF (i,j,bi,bj) = HEFF (i,j,bi,bj) + HEFFITD (i,j,k,bi,bj)
91     HSNOW(i,j,bi,bj) = HSNOW(i,j,bi,bj) + HSNOWITD(i,j,k,bi,bj)
92     ENDDO
93     ENDDO
94     ENDDO
95    
96 torge 1.2 c ENDDO
97     c ENDDO
98 dimitri 1.1
99     C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
100     #endif /* SEAICE_ITD */
101     RETURN
102     END SUBROUTINE SEAICE_ITD_SUM
103    

  ViewVC Help
Powered by ViewVC 1.1.22