[3] | 1 | ! |
---|
| 2 | ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/radlwsw.F,v 1.2 2004/10/27 10:14:46 lmdzadmin Exp $ |
---|
| 3 | ! |
---|
| 4 | SUBROUTINE radlwsw(dist, rmu0, fract, |
---|
| 5 | . paprs, pplay,tsol, t, |
---|
| 6 | . heat,cool,radsol, |
---|
| 7 | . topsw,toplw,solsw,sollw, |
---|
| 8 | . sollwdown, |
---|
| 9 | . lwnet, swnet) |
---|
| 10 | c |
---|
| 11 | c====================================================================== |
---|
| 12 | c Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
| 13 | c Objet: interface entre le modele et les rayonnements |
---|
| 14 | c Arguments: |
---|
| 15 | c dist-----input-R- distance astronomique terre-soleil |
---|
| 16 | c rmu0-----input-R- cosinus de l'angle zenithal |
---|
| 17 | c fract----input-R- duree d'ensoleillement normalisee |
---|
| 18 | c solaire--input-R- constante solaire (W/m**2) (dans clesphys.h) |
---|
| 19 | c paprs----input-R- pression a inter-couche (Pa) |
---|
| 20 | c pplay----input-R- pression au milieu de couche (Pa) |
---|
| 21 | c tsol-----input-R- temperature du sol (en K) |
---|
| 22 | c t--------input-R- temperature (K) |
---|
| 23 | c heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
| 24 | c cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
| 25 | c radsol---output-R- bilan radiatif net au sol (W/m**2) (+ vers le bas) |
---|
| 26 | c topsw----output-R- flux solaire net au sommet de l'atm. (+ vers le bas) |
---|
| 27 | c toplw----output-R- ray. IR net au sommet de l'atmosphere (+ vers le haut) |
---|
| 28 | c solsw----output-R- flux solaire net a la surface (+ vers le bas) |
---|
| 29 | c sollw----output-R- ray. IR net a la surface (+ vers le bas) |
---|
| 30 | c sollwdown-output-R- ray. IR descendant a la surface (+ vers le bas) |
---|
| 31 | c lwnet____output-R- flux IR net (+ vers le haut) |
---|
| 32 | c swnet____output-R- flux solaire net (+ vers le bas) |
---|
| 33 | c |
---|
| 34 | |
---|
| 35 | c MODIFS pour multimatrices ksi SPECIFIQUE VENUS |
---|
| 36 | c S. Lebonnois 20/12/2006 |
---|
| 37 | c corrections 13/07/2007 |
---|
| 38 | |
---|
| 39 | c====================================================================== |
---|
[101] | 40 | use dimphy |
---|
| 41 | USE comgeomphy |
---|
| 42 | IMPLICIT none |
---|
[3] | 43 | #include "dimensions.h" |
---|
| 44 | #include "YOMCST.h" |
---|
| 45 | #include "clesphys.h" |
---|
| 46 | #include "comcstVE.h" |
---|
| 47 | c |
---|
| 48 | real rmu0(klon), fract(klon), dist |
---|
| 49 | c |
---|
| 50 | real paprs(klon,klev+1), pplay(klon,klev) |
---|
| 51 | real tsol(klon) |
---|
| 52 | real t(klon,klev) |
---|
| 53 | real heat(klon,klev), cool(klon,klev) |
---|
| 54 | real radsol(klon), topsw(klon), toplw(klon) |
---|
| 55 | real solsw(klon), sollw(klon) |
---|
| 56 | real sollwdown(klon) |
---|
[892] | 57 | REAL swnet(klon,klev+1),lwnet(klon,klev+1) |
---|
[3] | 58 | c |
---|
| 59 | INTEGER k, kk, i, j, nb_gr |
---|
| 60 | c |
---|
[892] | 61 | REAL PPB(klev+1) |
---|
[3] | 62 | c |
---|
| 63 | REAL zfract, zrmu0 |
---|
| 64 | c |
---|
[892] | 65 | REAL zheat(klev), zcool(klev) |
---|
| 66 | REAL ZFSNET(klev+1),ZFLNET(klev+1) |
---|
[3] | 67 | REAL ztopsw, ztoplw |
---|
| 68 | REAL zsolsw, zsollw |
---|
| 69 | cIM BEG |
---|
| 70 | REAL zsollwdown |
---|
| 71 | cIM END |
---|
[101] | 72 | real,save,allocatable :: ksive(:,:,:,:) ! ksi matrixes in Vincent's file |
---|
[892] | 73 | real psimap(0:klev+1,0:klev+1,klon) |
---|
| 74 | real deltapsimap(0:klev+1,0:klev+1,klon) |
---|
| 75 | real psi(0:klev+1,0:klev+1) |
---|
| 76 | real deltapsi(0:klev+1,0:klev+1) |
---|
[101] | 77 | real latdeg |
---|
[892] | 78 | real pt0(klon,0:klev+1) |
---|
[101] | 79 | real,save,allocatable :: ztop(:) ! in km |
---|
[3] | 80 | |
---|
| 81 | logical firstcall |
---|
| 82 | data firstcall/.true./ |
---|
| 83 | save firstcall |
---|
| 84 | |
---|
| 85 | c------------------------------------------- |
---|
| 86 | nb_gr = klon |
---|
| 87 | c------------------------------------------- |
---|
| 88 | c Initialisations |
---|
| 89 | c----------------- |
---|
| 90 | |
---|
| 91 | if (firstcall) then |
---|
[101] | 92 | |
---|
| 93 | c ---------- ksive -------------- |
---|
[892] | 94 | allocate(ksive(0:klev+1,0:klev+1,nnuve,nbmat)) |
---|
[3] | 95 | call load_ksi(ksive) |
---|
| 96 | c ---------- ztop -------------- |
---|
[101] | 97 | allocate(ztop(klon)) |
---|
[3] | 98 | DO i = 1, klon |
---|
| 99 | ztop(i) = 70. |
---|
| 100 | ENDDO !i |
---|
| 101 | c ztop: d'apres fit à figure 16 du papier Zavosa et al (tmp) traitant des |
---|
| 102 | c donnees Venera |
---|
| 103 | c DO i = 1, klon |
---|
| 104 | c latdeg = abs(rlatd(i)) |
---|
| 105 | c if (latdeg.lt.15) then |
---|
| 106 | c ztop(i) = 70. |
---|
| 107 | c elseif (latdeg.lt.50) then |
---|
| 108 | c ztop(i) = 63.95+6*cos((latdeg-15)*RPI/2./50.) |
---|
| 109 | c else |
---|
| 110 | c ztop(i) = min(63.95+6*cos((latdeg-15)*RPI/2./50.), |
---|
| 111 | c . 63.95-5.9*sin((latdeg-60)*RPI/2/30)) |
---|
| 112 | c endif |
---|
| 113 | c print*,'lat(',i,')=',latdeg,' ztop=',ztop(i) |
---|
| 114 | c ENDDO !i |
---|
| 115 | c ---------- ztop -------------- |
---|
| 116 | |
---|
| 117 | endif ! firstcall |
---|
| 118 | |
---|
| 119 | DO i = 1, klon |
---|
| 120 | pt0(i,0) = tsol(i) |
---|
| 121 | DO k = 1, klev |
---|
| 122 | pt0(i,k) = t(i,k) |
---|
| 123 | ENDDO |
---|
[892] | 124 | pt0(i,klev+1) = 0. |
---|
[3] | 125 | ENDDO !i |
---|
| 126 | |
---|
| 127 | call load_psi(paprs(:,1),ztop,ksive,pt0,psimap,deltapsimap) |
---|
| 128 | |
---|
| 129 | DO k = 1, klev |
---|
| 130 | DO i = 1, klon |
---|
| 131 | heat(i,k)=0. |
---|
| 132 | cool(i,k)=0. |
---|
| 133 | ENDDO |
---|
| 134 | ENDDO |
---|
| 135 | c |
---|
| 136 | c+++++++ BOUCLE SUR LA GRILLE +++++++++++++++++++++++++ |
---|
| 137 | DO 99999 j = 1, nb_gr |
---|
| 138 | |
---|
| 139 | DO k = 1, klev |
---|
| 140 | zheat(k) = 0.0 |
---|
| 141 | zcool(k) = 0.0 |
---|
| 142 | ENDDO |
---|
| 143 | DO k = 1, klev+1 |
---|
| 144 | ZFLNET(k) = 0.0 |
---|
| 145 | ZFSNET(k) = 0.0 |
---|
| 146 | ENDDO |
---|
| 147 | ztopsw = 0.0 |
---|
| 148 | ztoplw = 0.0 |
---|
| 149 | zsolsw = 0.0 |
---|
| 150 | zsollw = 0.0 |
---|
| 151 | zsollwdown = 0.0 |
---|
| 152 | |
---|
| 153 | zfract = fract(j) |
---|
| 154 | zrmu0 = rmu0(j) |
---|
| 155 | |
---|
[892] | 156 | DO k = 1, klev+1 |
---|
[3] | 157 | PPB(k) = paprs(j,k)/1.e5 |
---|
| 158 | ENDDO |
---|
| 159 | |
---|
[892] | 160 | DO k = 0,klev+1 |
---|
| 161 | DO i = 0,klev+1 |
---|
[3] | 162 | psi(i,k) = psimap(i,k,j) |
---|
| 163 | deltapsi(i,k) = deltapsimap(i,k,j) |
---|
| 164 | ENDDO |
---|
| 165 | ENDDO |
---|
| 166 | |
---|
| 167 | c====================================================================== |
---|
| 168 | c LW call |
---|
| 169 | c--------- |
---|
| 170 | CALL LW_venus_ve( |
---|
| 171 | . PPB,t(j,:),psi,deltapsi, |
---|
| 172 | . zcool, |
---|
| 173 | . ztoplw,zsollw, |
---|
| 174 | . zsollwdown,ZFLNET) |
---|
| 175 | |
---|
| 176 | c--------- |
---|
| 177 | c SW call |
---|
| 178 | c--------- |
---|
| 179 | CALL SW_venus_dc(zrmu0, zfract, |
---|
| 180 | S PPB,t(j,:), |
---|
| 181 | S zheat, |
---|
| 182 | S ztopsw,zsolsw,ZFSNET) |
---|
| 183 | |
---|
| 184 | c====================================================================== |
---|
| 185 | radsol(j) = zsolsw - zsollw ! + vers bas |
---|
| 186 | topsw(j) = ztopsw ! + vers bas |
---|
| 187 | toplw(j) = ztoplw ! + vers haut |
---|
| 188 | solsw(j) = zsolsw ! + vers bas |
---|
| 189 | sollw(j) = -zsollw ! + vers bas |
---|
| 190 | sollwdown(j) = zsollwdown ! + vers bas |
---|
| 191 | |
---|
[892] | 192 | DO k = 1, klev+1 |
---|
[3] | 193 | lwnet (j,k) = ZFLNET(k) |
---|
| 194 | swnet (j,k) = ZFSNET(k) |
---|
| 195 | ENDDO |
---|
| 196 | |
---|
[892] | 197 | DO k = 1, klev |
---|
[3] | 198 | heat (j,k) = zheat(k) |
---|
| 199 | cool (j,k) = zcool(k) |
---|
| 200 | ENDDO |
---|
| 201 | c |
---|
| 202 | 99999 CONTINUE |
---|
| 203 | c+++++++ FIN BOUCLE SUR LA GRILLE +++++++++++++++++++++++++ |
---|
| 204 | |
---|
| 205 | c tests |
---|
| 206 | |
---|
| 207 | c j = klon/2 |
---|
| 208 | c j = 1 |
---|
| 209 | c print*,'mu0=',rmu0(j) |
---|
| 210 | c print*,' net flux vis HEAT(K/day)' |
---|
[892] | 211 | c do k=1,klev |
---|
[3] | 212 | c print*,k,ZFSNET(k),heat(j,k)*8.56548e-3 |
---|
| 213 | c enddo |
---|
| 214 | c print*,' net flux IR COOL(K/day)' |
---|
[892] | 215 | c do k=1,klev |
---|
[3] | 216 | c print*,k,ZFLNET(k),cool(j,k)*8.56548e-3 |
---|
| 217 | c enddo |
---|
| 218 | |
---|
| 219 | firstcall = .false. |
---|
| 220 | RETURN |
---|
| 221 | END |
---|
| 222 | |
---|