source: trunk/LMDZ.TITAN/libf/phytitan/heating.F @ 1453

Last change on this file since 1453 was 1356, checked in by slebonnois, 11 years ago

SL: update to newstart/start2archive tools in Venus+Titan / additional diagnostics in radiative fluxes for Titan

File size: 3.4 KB
Line 
1       SUBROUTINE heating(dist,rmu0,fract,falbe,sol_htg,zswup,zswdn,
2     .                    icld)
3
4
5c=======================================================================
6c
7c   Object:  Computation of the solar heating rate
8c                    SOL_HTG(klon,klev)
9c
10c   Arguments:
11c   ----------
12c
13c      Input:
14c      ------
15c
16c dist-----input-R- distance astronomique terre-soleil
17c rmu0-----input-R- cosinus de l'angle zenithal
18c fract----input-R- duree d'ensoleillement normalisee
19c falbe----input-R- surface albedo
20c icld-----input-I- calcul avec nuages.
21c        p(klon,nl)    pressure (level)
22c
23c      Output:
24c      -------
25c sol_htg-----output-R- echauffement atmospherique (visible) (K/s)
26c zswup-------output-R- flux solaire upward  (+ vers le haut)     (W/m2)
27c zswdn-------output-R- flux solaire downward (+ vers le bas)     (W/m2)
28c
29c=======================================================================
30c-----------------------------------------------------------------------
31c   Declarations:
32c   -------------
33
34      use dimphy
35      IMPLICIT NONE
36#include "dimensions.h"
37
38      INTEGER NLEVEL,NLAYER,NSPECV
39      PARAMETER(NLAYER=llm,NLEVEL=NLAYER+1)
40      PARAMETER (NSPECV=24)
41c
42c  ASTUCE POUR EVITER klon... EN ATTENDANT MIEUX
43      INTEGER   ngrid
44      PARAMETER (ngrid=(jjm-1)*iim+2)  ! = klon
45c
46
47c   Arguments:
48c   ----------
49
50
51      real dist, rmu0(klon), fract(klon), falbe(klon)
52      integer icld
53
54      real sol_htg(klon,klev)
55      real zswup(klon,klev+1)
56      real zswdn(klon,klev+1)
57     
58c   Local:
59c   ------
60
61      INTEGER I,J,IG,K,IPRINT,ilat,nq
62 
63c   COMMONS for interface with local subroutines:
64c   ---------------------------------------------
65
66      REAL UBARI,UBARV,UBAR0
67      REAL  CH4(NLEVEL),XN2(NLEVEL),H2(NLEVEL),AR(NLEVEL)
68      REAL  XMU(NLEVEL),GAS1(NLAYER),COLDEN(NLAYER)
69      REAL FNETV(ngrid,NLEVEL),FUPV(ngrid,NLEVEL,NSPECV) 
70      REAL FDV(ngrid,NLEVEL,NSPECV),FMNETV(ngrid,NLEVEL)
71      REAL CSUBP,F0PI
72
73      COMMON /UBARED/ UBARI,UBARV,UBAR0
74
75      COMMON /GASS/ CH4,XN2
76     &              ,H2,AR
77     &              ,XMU,GAS1
78     &              ,COLDEN
79
80      COMMON /FLUXvV/ FNETV,     
81     &               FUPV,
82     &               FDV,
83     &               FMNETV
84
85      COMMON /PLANT/ CSUBP,F0PI
86
87
88c==================================================================
89
90         fnetv  = 0.0
91         sol_htg= 0.0
92         zswup  = 0.0
93         zswdn  = 0.0
94c pour sorties dans gfluxv...
95         iprint = 0
96
97         DO ig=1,klon
98            IF(fract(ig).LT.1.e-5) THEN
99               DO j=1,nlayer
100                  sol_htg(ig,j)=0.
101               ENDDO
102            ELSE
103               ubar0=rmu0(ig)
104
105               CALL sfluxv(iprint,ig,dist,falbe,icld)      ! #3
106
107               do K=1,NSPECV
108                 zswup(ig,:) = zswup(ig,:)+FUPV(ig,:,K)*fract(ig) ! >0 up
109                 zswdn(ig,:) = zswdn(ig,:)+FDV(ig,:,K) *fract(ig) ! >0 down
110               enddo
111               fnetv(ig,:) = fnetv(ig,:) *fract(ig)   ! >0 up
112
113c conversion en W/m2:
114               zswup(ig,:) = 1.e-3*zswup(ig,:)
115               zswdn(ig,:) = 1.e-3*zswdn(ig,:)
116               
117               DO j=1,nlayer
118                  sol_htg(ig,j)=                           ! K/s
119     s            (fnetv(ig,j+1)-fnetv(ig,j))
120     s                              /(colden(j)*csubp)
121               ENDDO
122            ENDIF
123         ENDDO
124
125      RETURN
126 191  FORMAT(F8.2,1P10E10.2)
127 192  FORMAT(a8,1P10E10.2)
128      END
Note: See TracBrowser for help on using the repository browser.