1 |
ksnow |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/shelfice/shelfice_step_icemass.F,v 1.5 2015/04/22 21:33:58 dgoldberg Exp $ |
2 |
dgoldberg |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "SHELFICE_OPTIONS.h" |
5 |
|
|
#ifdef ALLOW_STREAMICE |
6 |
|
|
# include "STREAMICE_OPTIONS.h" |
7 |
|
|
#endif |
8 |
|
|
|
9 |
|
|
CBOP |
10 |
|
|
C !ROUTINE: SHELFICE_U_DRAG |
11 |
|
|
|
12 |
|
|
C !INTERFACE: ========================================================== |
13 |
|
|
SUBROUTINE SHELFICE_STEP_ICEMASS( |
14 |
|
|
I myTime, myIter, myThid ) |
15 |
|
|
|
16 |
|
|
! myTime, myIter, myThid |
17 |
|
|
|
18 |
|
|
C !DESCRIPTION: |
19 |
|
|
C Serves as a "stub" for ice dynamics |
20 |
|
|
C will later be used to |
21 |
|
|
|
22 |
|
|
C !USES: =============================================================== |
23 |
|
|
IMPLICIT NONE |
24 |
|
|
#include "SIZE.h" |
25 |
|
|
#include "EEPARAMS.h" |
26 |
|
|
#include "PARAMS.h" |
27 |
|
|
#include "GRID.h" |
28 |
|
|
#include "SHELFICE.h" |
29 |
|
|
#ifdef ALLOW_STREAMICE |
30 |
|
|
# include "STREAMICE.h" |
31 |
|
|
#endif |
32 |
|
|
|
33 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
34 |
|
|
C === Routine arguments === |
35 |
|
|
C myIter :: iteration counter for this thread |
36 |
|
|
C myTime :: time counter for this thread |
37 |
|
|
C myThid :: thread number for this instance of the routine. |
38 |
|
|
_RL myTime |
39 |
|
|
INTEGER myIter |
40 |
|
|
INTEGER myThid |
41 |
|
|
CEOP |
42 |
|
|
|
43 |
|
|
#ifdef ALLOW_SHELFICE |
44 |
|
|
C !LOCAL VARIABLES : ==================================================== |
45 |
|
|
C i,j :: loop indices |
46 |
|
|
INTEGER bi,bj,i,j |
47 |
|
|
|
48 |
|
|
IF ( SHELFICEMassStepping ) THEN |
49 |
|
|
|
50 |
|
|
#ifdef ALLOW_STREAMICE |
51 |
|
|
IF (useStreamIce) THEN |
52 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
53 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
54 |
|
|
DO j=1-OLy,sNy+OLy-1 |
55 |
|
|
DO i=1-OLx+1,sNx+OLx-1 |
56 |
ksnow |
1.3 |
if (streamice_hmask(i,j,bi,bj).eq.1) then |
57 |
|
|
shelficeMass(i,j,bi,bj) = |
58 |
|
|
& H_streamice(I,J,bi,bj) * streamice_density |
59 |
|
|
elseif (streamice_hmask(i,j,bi,bj).eq.2) then |
60 |
dgoldberg |
1.1 |
shelficeMass(i,j,bi,bj) = |
61 |
|
|
& H_streamice(I,J,bi,bj) * streamice_density |
62 |
ksnow |
1.3 |
& * area_shelf_streamice(i,j,bi,bj)*recip_rA(i,j,bi,bj) |
63 |
dgoldberg |
1.1 |
endif |
64 |
|
|
ENDDO |
65 |
|
|
ENDDO |
66 |
|
|
ENDDO |
67 |
|
|
ENDDO |
68 |
|
|
ENDIF |
69 |
|
|
#endif /* ALLOW_STREAMICE */ |
70 |
|
|
|
71 |
|
|
IF (.NOT.useStreamIce) THEN |
72 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
73 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
74 |
|
|
DO j=1-OLy,sNy+OLy |
75 |
|
|
DO i=1-OLx,sNx+OLx |
76 |
|
|
|
77 |
|
|
IF (.NOT. SHELFICEDynMassOnly) then |
78 |
|
|
shelficeMass(i,j,bi,bj) = shelficeMass(i,j,bi,bj) |
79 |
|
|
& + shelfIceFreshWaterFlux(I,J,bi,bj) * deltaT |
80 |
|
|
ENDIF |
81 |
|
|
|
82 |
|
|
shelficeMass(i,j,bi,bj) = shelficeMass(i,j,bi,bj) |
83 |
|
|
& + shelfIceMassDynTendency(I,J,bi,bj)*deltaT |
84 |
ksnow |
1.3 |
|
85 |
dgoldberg |
1.1 |
ENDDO |
86 |
|
|
ENDDO |
87 |
|
|
ENDDO |
88 |
|
|
ENDDO |
89 |
|
|
ENDIF |
90 |
|
|
|
91 |
|
|
_EXCH_XY_RL( shelficeMass, myThid ) |
92 |
|
|
|
93 |
|
|
ENDIF |
94 |
|
|
|
95 |
|
|
#ifdef ALLOW_DIAGNOSTICS |
96 |
|
|
IF (useDiagnostics) THEN |
97 |
|
|
CALL DIAGNOSTICS_FILL( shelficeMass, 'SHI_mass', |
98 |
|
|
I 0, 1, 0, 1, 1, myThid ) |
99 |
|
|
ENDIF |
100 |
|
|
#endif /* ALLOW_DIAGNOSTICS */ |
101 |
|
|
#endif /* ALLOW_SHELFICE */ |
102 |
|
|
|
103 |
|
|
RETURN |
104 |
|
|
END |