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

Contents 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.5 - (show annotations) (download)
Wed Mar 27 18:59:52 2013 UTC (12 years, 4 months ago) by torge
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
updating my MITgcm_contrib directory to include latest changes on main branch;
settings are to run a 1D test szenario with ITD code and 7 categories

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_itd_sum.F,v 1.2 2012/10/23 13:20:49 jmc Exp $
2 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 bi, bj, 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 bi,bj :: outer loop counters
48 C myTime :: current time
49 C myIter :: iteration number
50 C myThid :: Thread no. that called this routine.
51 _RL myTime
52 INTEGER bi, bj
53 INTEGER myIter
54 INTEGER myThid
55 CEndOfInterface
56
57 #ifdef SEAICE_ITD
58
59 C !LOCAL VARIABLES: ====================================================
60 C === Local variables ===
61 C i,j,k :: inner loop counters
62 C nITD :: number of sea ice thickness categories
63 C
64 INTEGER i, j, k
65 #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 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
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 c ENDDO
97 c ENDDO
98
99 C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
100 #endif /* SEAICE_ITD */
101 RETURN
102 END

  ViewVC Help
Powered by ViewVC 1.1.22