/[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.2 - (hide annotations) (download)
Wed Jul 25 17:56:31 2012 UTC (13 years ago) by torge
Branch: MAIN
Changes since 1.1: +6 -5 lines
change seaice_itd_sum and seaice_itd_redist to exclude bi,bj loops;
both routines must now be called within bi,bj loops;
this is required in seaice_growth

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     I myTime, myIter, myThid )
11    
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     C myTime :: current time
48     C myIter :: iteration number
49     C myThid :: Thread no. that called this routine.
50     _RL myTime
51     INTEGER myIter
52     INTEGER myThid
53     CEndOfInterface
54    
55     #ifdef SEAICE_ITD
56    
57     C !LOCAL VARIABLES: ====================================================
58     C === Local variables ===
59     C i,j,bi,bj,k :: Loop counters
60     C nITD :: number of sea ice thickness categories
61     C
62     INTEGER i, j, bi, bj, k
63     #ifdef ALLOW_AUTODIFF_TAMC
64     INTEGER itmpkey
65     #endif /* ALLOW_AUTODIFF_TAMC */
66     #ifdef SEAICE_AGE
67     INTEGER iTracer
68     #endif
69    
70     C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
71    
72 torge 1.2 c DO bj=myByLo(myThid),myByHi(myThid)
73     c DO bi=myBxLo(myThid),myBxHi(myThid)
74     C must now be called within bi,bj loop
75 dimitri 1.1
76     DO j=1-OLy,sNy+OLy
77     DO i=1-OLx,sNx+OLx
78     AREA (i,j,bi,bj)=AREAITD (i,j,1,bi,bj)
79     HEFF (i,j,bi,bj)=HEFFITD (i,j,1,bi,bj)
80     HSNOW(i,j,bi,bj)=HSNOWITD(i,j,1,bi,bj)
81     ENDDO
82     ENDDO
83    
84     DO k=2,nITD
85     DO j=1-OLy,sNy+OLy
86     DO i=1-OLx,sNx+OLx
87     AREA (i,j,bi,bj) = AREA (i,j,bi,bj) + AREAITD (i,j,k,bi,bj)
88     HEFF (i,j,bi,bj) = HEFF (i,j,bi,bj) + HEFFITD (i,j,k,bi,bj)
89     HSNOW(i,j,bi,bj) = HSNOW(i,j,bi,bj) + HSNOWITD(i,j,k,bi,bj)
90     ENDDO
91     ENDDO
92     ENDDO
93    
94 torge 1.2 c ENDDO
95     c ENDDO
96 dimitri 1.1
97     C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
98     #endif /* SEAICE_ITD */
99     RETURN
100     END SUBROUTINE SEAICE_ITD_SUM
101    

  ViewVC Help
Powered by ViewVC 1.1.22