/[MITgcm]/MITgcm/pkg/exf/exf_radiation.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_radiation.F

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


Revision 1.5 - (show annotations) (download)
Mon Nov 17 23:09:35 2008 UTC (15 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62d, checkpoint61f, checkpoint61g, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +105 -84 lines
- add parameters to extrapolate temp from level 1 & 2 up to surface ;
- comment out derivation of downward flux from net flux (was not used).

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_radiation.F,v 1.4 2007/09/27 09:41:13 mlosch Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6 SUBROUTINE EXF_RADIATION(myTime, myIter, myThid)
7
8 C ==================================================================
9 C SUBROUTINE exf_radiation
10 C ==================================================================
11 C
12 C o Set radiative fluxes at the surface.
13 C
14 C ==================================================================
15 C SUBROUTINE exf_radiation
16 C ==================================================================
17
18 IMPLICIT NONE
19
20 C == global variables ==
21
22 #include "EEPARAMS.h"
23 #include "SIZE.h"
24 #include "PARAMS.h"
25 #include "DYNVARS.h"
26 #include "GRID.h"
27
28 #include "EXF_PARAM.h"
29 #include "EXF_FIELDS.h"
30 #include "EXF_CONSTANTS.h"
31
32 C == routine arguments ==
33
34 _RL myTime
35 INTEGER myIter
36 INTEGER myThid
37
38 #ifdef ALLOW_DOWNWARD_RADIATION
39 C == local variables ==
40
41 INTEGER bi,bj
42 INTEGER i,j
43 #ifdef ALLOW_ATM_TEMP
44 INTEGER k
45 _RL Tsf, SSTtmp, TsfSq
46 #endif
47
48 C == end of interface ==
49
50 C-- Use atmospheric state to compute surface fluxes.
51
52 C-- Compute net from downward and downward from net longwave and
53 C shortwave radiation, IF needed.
54 C lwflux = Stefan-Boltzmann constant * emissivity * SST - lwdown
55 C swflux = - ( 1 - albedo ) * swdown
56
57 #ifdef ALLOW_ATM_TEMP
58 k = 1
59
60 IF ( lwfluxfile .EQ. ' ' .AND. lwdownfile .NE. ' ' ) THEN
61 C Loop over tiles.
62 DO bj = myByLo(myThid),myByHi(myThid)
63 DO bi = myBxLo(myThid),myBxHi(myThid)
64
65 IF ( sstExtrapol.GT.0. _d 0 ) THEN
66 DO j = 1,sNy
67 DO i = 1,sNx
68 Tsf = theta(i,j,1,bi,bj) + cen2kel
69 SSTtmp = sstExtrapol
70 & *( theta(i,j,1,bi,bj)-theta(i,j,2,bi,bj) )
71 & * maskC(i,j,2,bi,bj)
72 Tsf = Tsf + MAX( SSTtmp, 0. _d 0 )
73 TsfSq = Tsf*Tsf
74 lwflux(i,j,bi,bj) =
75 & ocean_emissivity*stefanBoltzmann*TsfSq*TsfSq
76 & - lwdown(i,j,bi,bj)
77 ENDDO
78 ENDDO
79 ELSE
80 DO j = 1,sNy
81 DO i = 1,sNx
82 lwflux(i,j,bi,bj) =
83 & ocean_emissivity*stefanBoltzmann*
84 & ((theta(i,j,k,bi,bj)+cen2kel)**4)
85 & - lwdown(i,j,bi,bj)
86 ENDDO
87 ENDDO
88 ENDIF
89
90 C-- end bi,bj loops
91 ENDDO
92 ENDDO
93 ENDIF
94
95 C-jmc: commented out: no need to compute Downward-LW (not used) from Net-LW
96 c IF ( lwfluxfile .NE. ' ' .AND. lwdownfile .EQ. ' ' ) THEN
97 C Loop over tiles.
98 c DO bj = myByLo(myThid),myByHi(myThid)
99 c DO bi = myBxLo(myThid),myBxHi(myThid)
100 c DO j = 1,sNy
101 c DO i = 1,sNx
102 c lwdown(i,j,bi,bj) =
103 c & ocean_emissivity*stefanBoltzmann*
104 c & ((theta(i,j,k,bi,bj)+cen2kel)**4)
105 c & - lwflux(i,j,bi,bj)
106 c ENDDO
107 c ENDDO
108 c ENDDO
109 c ENDDO
110 c ENDIF
111 #endif /* ALLOW_ATM_TEMP */
112
113 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
114 IF ( swfluxfile .EQ. ' ' .AND. swdownfile .NE. ' ' ) THEN
115 DO bj = myByLo(myThid),myByHi(myThid)
116 DO bi = myBxLo(myThid),myBxHi(myThid)
117 DO j = 1,sNy
118 DO i = 1,sNx
119 swflux(i,j,bi,bj) = -(1.0-exf_albedo) * swdown(i,j,bi,bj)
120 ENDDO
121 ENDDO
122 ENDDO
123 ENDDO
124 ENDIF
125 C-jmc: commented out: no need to compute Downward-SW (not used) from Net-SW
126 c IF ( swfluxfile .NE. ' ' .AND. swdownfile .EQ. ' ' ) THEN
127 c DO bj = myByLo(myThid),myByHi(myThid)
128 c DO bi = myBxLo(myThid),myBxHi(myThid)
129 c DO j = 1,sNy
130 c DO i = 1,sNx
131 c swdown(i,j,bi,bj) = -swflux(i,j,bi,bj) / (1.0-exf_albedo)
132 c ENDDO
133 c ENDDO
134 c ENDDO
135 c ENDDO
136 c ENDIF
137 #endif
138
139 #endif /* ALLOW_DOWNWARD_RADIATION */
140
141 RETURN
142 END

  ViewVC Help
Powered by ViewVC 1.1.22