1 |
jmc |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_get_precip.F,v 1.2 2007/05/31 15:19:49 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "THSICE_OPTIONS.h" |
5 |
|
|
#ifdef ALLOW_BULK_FORCE |
6 |
|
|
#include "BULK_FORCE_OPTIONS.h" |
7 |
|
|
#endif |
8 |
|
|
|
9 |
|
|
CBOP |
10 |
|
|
C !ROUTINE: THSICE_GET_PRECIP |
11 |
|
|
C !INTERFACE: |
12 |
|
|
SUBROUTINE THSICE_GET_PRECIP( |
13 |
jmc |
1.3 |
I iceMsk, locSST, |
14 |
|
|
O precip, snowPrc, qPrcRnO, flxSW, |
15 |
jmc |
1.1 |
I iMin,iMax,jMin,jMax, bi,bj, myThid ) |
16 |
|
|
C !DESCRIPTION: \bv |
17 |
|
|
C *==========================================================* |
18 |
|
|
C | S/R THSICE_GET_PRECIP |
19 |
jmc |
1.2 |
C | Interface S/R : get Precip, Snow-precip |
20 |
|
|
C | and downward short-wave |
21 |
|
|
C | from pkg BULK_FORCE |
22 |
jmc |
1.1 |
C *==========================================================* |
23 |
|
|
C *==========================================================* |
24 |
|
|
C \ev |
25 |
|
|
|
26 |
|
|
C !USES: |
27 |
|
|
IMPLICIT NONE |
28 |
|
|
|
29 |
|
|
C == Global data == |
30 |
|
|
#include "SIZE.h" |
31 |
|
|
#include "EEPARAMS.h" |
32 |
jmc |
1.3 |
#include "PARAMS.h" |
33 |
jmc |
1.1 |
#ifdef ALLOW_BULK_FORCE |
34 |
|
|
#include "BULKF_PARAMS.h" |
35 |
|
|
#include "BULKF.h" |
36 |
|
|
#endif |
37 |
|
|
|
38 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
39 |
|
|
C === Routine arguments === |
40 |
|
|
C iceMsk :: sea-ice fraction: no ice=0, grid all ice 1 [] |
41 |
jmc |
1.3 |
C locSST :: local Sea-Surface Temperature [deg.C] |
42 |
jmc |
1.1 |
C precip :: Total Precipitation (including run-off) [kg/m2/s] |
43 |
|
|
C snowPrc :: Snow Precipitation [kg/m2/s] |
44 |
jmc |
1.3 |
C qPrcRnO :: Energy content of Precip+RunOff (+=down) [W/m2] |
45 |
jmc |
1.2 |
C flxSW :: Downward short-wave surface flux (+=down) [W/m2] |
46 |
jmc |
1.1 |
C iMin,iMax :: range of indices of computation domain |
47 |
|
|
C jMin,jMax :: range of indices of computation domain |
48 |
|
|
C bi,bj :: current tile indices |
49 |
|
|
C myThid :: Thread no. that called this routine. |
50 |
|
|
_RL iceMsk (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
51 |
jmc |
1.3 |
_RL locSST (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
52 |
jmc |
1.1 |
_RL precip (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
53 |
|
|
_RL snowPrc(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
54 |
jmc |
1.3 |
_RL qPrcRnO(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
55 |
jmc |
1.1 |
_RL flxSW (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
56 |
|
|
INTEGER iMin,iMax |
57 |
|
|
INTEGER jMin,jMax |
58 |
|
|
INTEGER bi,bj |
59 |
|
|
INTEGER myThid |
60 |
|
|
CEOP |
61 |
|
|
|
62 |
|
|
#ifdef ALLOW_THSICE |
63 |
|
|
#ifdef ALLOW_BULK_FORCE |
64 |
|
|
|
65 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
66 |
|
|
C === Local variables === |
67 |
|
|
C i,j :: current grid point indices |
68 |
|
|
INTEGER i,j |
69 |
|
|
|
70 |
|
|
DO j = jMin, jMax |
71 |
|
|
DO i = iMin, iMax |
72 |
jmc |
1.3 |
precip(i,j) = ( rain(i,j,bi,bj)+runoff(i,j,bi,bj) )*rhofw |
73 |
|
|
flxSW (i,j) = solar(i,j,bi,bj) |
74 |
|
|
ENDDO |
75 |
|
|
ENDDO |
76 |
|
|
|
77 |
|
|
c IF ( SnowFile .NE. ' ' ) THEN |
78 |
|
|
c ELSE |
79 |
|
|
C If specific snow precipitiation is not available, use |
80 |
|
|
C precipitation when ever the air temperature is below 0 degC |
81 |
|
|
DO j = jMin, jMax |
82 |
|
|
DO i = iMin, iMax |
83 |
|
|
IF ( iceMsk(i,j,bi,bj).GT.0. _d 0 |
84 |
|
|
& .AND. Tair(i,j,bi,bj).LE.Tf0kel ) THEN |
85 |
jmc |
1.1 |
snowPrc(i,j) = rain(i,j,bi,bj)*rhofw |
86 |
jmc |
1.3 |
ENDIF |
87 |
|
|
ENDDO |
88 |
jmc |
1.1 |
ENDDO |
89 |
jmc |
1.3 |
c ENDIF |
90 |
|
|
|
91 |
|
|
IF ( temp_EvPrRn .NE. UNSET_RL ) THEN |
92 |
|
|
C-- Account for energy content of Precip + RunOff : |
93 |
|
|
C assume 1) rain has same temp as Air (higher altitude, e.g., 850.mb would |
94 |
|
|
C be better); 2) Snow has no heat capacity (+ is counted separately) |
95 |
|
|
C 3) no distinction between sea-water Cp and fresh-water Cp |
96 |
|
|
C 4) Run-Off comes at the temp of surface water (with same Cp) |
97 |
|
|
DO j = jMin, jMax |
98 |
|
|
DO i = iMin, iMax |
99 |
|
|
qPrcRnO(i,j) = HeatCapacity_Cp*( |
100 |
|
|
& ( Tair(i,j,bi,bj) - Tf0kel - temp_EvPrRn ) |
101 |
|
|
& *( rain(i,j,bi,bj)*rhofw - snowPrc(i,j) ) |
102 |
|
|
& + ( locSST(i,j,bi,bj) - temp_EvPrRn ) |
103 |
|
|
& *runoff(i,j,bi,bj)*rhofw ) |
104 |
|
|
ENDDO |
105 |
|
|
ENDDO |
106 |
|
|
ENDIF |
107 |
jmc |
1.1 |
|
108 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
109 |
|
|
|
110 |
|
|
#endif /* ALLOW_BULK_FORCE */ |
111 |
|
|
#endif /* ALLOW_THSICE */ |
112 |
|
|
|
113 |
|
|
RETURN |
114 |
|
|
END |