/[MITgcm]/MITgcm/pkg/thsice/thsice_map_exf.F
ViewVC logotype

Contents of /MITgcm/pkg/thsice/thsice_map_exf.F

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


Revision 1.7 - (show annotations) (download)
Thu Apr 4 16:44:34 2013 UTC (11 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64g, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.6: +28 -3 lines
In case Energy-Reference-Level is used (temp_EvPrRn=0), account for
 energy content of Precip + RunOff. Assumes: 1) Rain has same temp as Air
 2) Snow has no heat capacity (consistent with seaice & thsice & exf pkgs)
 3) No distinction between sea-water Cp and fresh-water Cp
 4) Run-Off comes at the temp of surface water (with same Cp)
Note: since variations of Lf+Lv with Tsurf are neglected in Evap over ice
 and  snow (since snow has no Cp); this means that water vapor is considered
 to be released to Atmos @ 0^oC (=ERL).

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_map_exf.F,v 1.6 2008/11/07 20:43:16 jmc Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5 #ifdef ALLOW_EXF
6 #include "EXF_OPTIONS.h"
7 #endif
8
9 CBOP
10 C !ROUTINE: THSICE_MAP_EXF
11 C !INTERFACE:
12 SUBROUTINE THSICE_MAP_EXF(
13 I iceMsk, locSST,
14 O totPrc, snowPrc, qPrcRnO, flxSW,
15 I iMin,iMax,jMin,jMax, bi,bj, myThid )
16 C !DESCRIPTION: \bv
17 C *==========================================================*
18 C | S/R THSICE_MAP_EXF
19 C | Interface S/R : map Precip, Snow and shortwave fluxes
20 C | from pkg EXF to thsice variables
21 C *==========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26
27 C == Global data ==
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "FFIELDS.h"
32 #ifdef ALLOW_EXF
33 # include "EXF_CONSTANTS.h"
34 # include "EXF_PARAM.h"
35 # include "EXF_FIELDS.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 C locSST :: local Sea-Surface Temperature [deg.C]
42 C totPrc :: Total Precipitation (including run-off) [kg/m2/s]
43 C snowPrc :: Snow Precipitation [kg/m2/s]
44 C qPrcRnO :: Energy content of Precip+RunOff (+=down) [W/m2]
45 C flxSW :: Downward short-wave surface flux (+=down) [W/m2]
46 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 _RL locSST (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
52 _RL totPrc (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RL snowPrc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54 _RL qPrcRnO(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
55 _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_EXF
63
64 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
65 C === Local variables ===
66 C i,j :: current grid point indices
67 INTEGER i,j
68
69 DO j = jMin, jMax
70 DO i = iMin, iMax
71 #ifdef ALLOW_ATM_TEMP
72 totPrc(i,j) = precip(i,j,bi,bj)*rhoConstFresh
73 #endif
74 #ifdef ALLOW_RUNOFF
75 totPrc(i,j) = totPrc(i,j) + runoff(i,j,bi,bj)*rhoConstFresh
76 #else
77 STOP 'ABNORMAL END: S/R THSICE_MAP_EXF: ALLOW_RUNOFF undef'
78 #endif
79 #ifdef ALLOW_DOWNWARD_RADIATION
80 flxSW (i,j) = swdown(i,j,bi,bj)
81 #else
82 STOP 'ABNORMAL END: S/R THSICE_MAP_EXF: DOWNWARD_RADIATION undef'
83 #endif
84 ENDDO
85 ENDDO
86
87 #ifdef ALLOW_ATM_TEMP
88 IF ( snowPrecipFile .NE. ' ' ) THEN
89 DO j = jMin, jMax
90 DO i = iMin, iMax
91 snowPrc(i,j) = snowPrecip(i,j,bi,bj)*rhoConstFresh
92 ENDDO
93 ENDDO
94 ELSE
95 C If specific snow precipitiation is not available, use
96 C precipitation when ever the air temperature is below 0 degC
97 DO j = jMin, jMax
98 DO i = iMin, iMax
99 IF ( iceMsk(i,j,bi,bj).GT.0. _d 0
100 & .AND. atemp(i,j,bi,bj).LE.cen2kel ) THEN
101 cML & .AND. atemp(i,j,bi,bj).LE.Tf0kel ) THEN
102 snowPrc(i,j) = precip(i,j,bi,bj)*rhoConstFresh
103 ENDIF
104 ENDDO
105 ENDDO
106 ENDIF
107 IF ( temp_EvPrRn .NE. UNSET_RL ) THEN
108 C-- Account for energy content of Precip + RunOff :
109 C assume 1) rain has same temp as Air (higher altitude, e.g., 850.mb would
110 C be better); 2) Snow has no heat capacity (+ is counted separately)
111 C 3) no distinction between sea-water Cp and fresh-water Cp
112 C 4) Run-Off comes at the temp of surface water (with same Cp)
113 DO j = jMin, jMax
114 DO i = iMin, iMax
115 qPrcRnO(i,j) = HeatCapacity_Cp
116 & *( atemp(i,j,bi,bj) - cen2kel - temp_EvPrRn )
117 & *( precip(i,j,bi,bj)*rhoConstFresh - snowPrc(i,j) )
118 &
119 #ifdef ALLOW_RUNOFF
120 qPrcRnO(i,j) = qPrcRnO(i,j)
121 & + HeatCapacity_Cp
122 & *( locSST(i,j,bi,bj) - temp_EvPrRn )
123 & *runoff(i,j,bi,bj)*rhoConstFresh
124 #endif
125 ENDDO
126 ENDDO
127 ENDIF
128 #else /* ALLOW_ATM_TEMP */
129 STOP 'ABNORMAL END: S/R THSICE_MAP_EXF: ATM_TEMP undef'
130 #endif /* ALLOW_ATM_TEMP */
131
132 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
133
134 #endif /* ALLOW_EXF */
135
136 RETURN
137 END

  ViewVC Help
Powered by ViewVC 1.1.22