Changeset 961 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- May 16, 2013, 11:07:35 AM (12 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r952 r961 113 113 114 114 REAL*8 tauaero(L_LEVELS+1,naerkind) 115 REAL*8 nfluxtopv,nfluxtopi,nfluxtop 115 REAL*8 nfluxtopv,nfluxtopi,nfluxtop,fluxtopvdn 116 116 real*8 nfluxoutv_nu(L_NSPECTV) ! outgoing band-resolved VI flux at TOA (W/m2) 117 117 real*8 nfluxtopi_nu(L_NSPECTI) ! net band-resolved IR flux at TOA (W/m2) … … 125 125 INTEGER icount 126 126 127 real fluxtoplanet128 127 real szangle 129 128 logical global1d … … 291 290 292 291 ! how much light we get 293 fluxtoplanet=0294 292 do nw=1,L_NSPECTV 295 293 stel(nw)=stellarf(nw)/(dist_star**2) 296 fluxtoplanet=fluxtoplanet + stel(nw)297 294 end do 298 295 … … 657 654 if(fract(ig) .ge. 1.0e-4) then ! only during daylight! 658 655 659 fluxtoplanet=0.660 661 656 if((ngrid.eq.1).and.(global1d))then 662 657 do nw=1,L_NSPECTV 663 658 stel_fract(nw)= stel(nw) * 0.25 / acosz 664 fluxtoplanet=fluxtoplanet + stel_fract(nw)665 659 ! globally averaged = divide by 4 666 660 ! but we correct for solar zenith angle … … 669 663 do nw=1,L_NSPECTV 670 664 stel_fract(nw)= stel(nw) * fract(ig) 671 fluxtoplanet=fluxtoplanet + stel_fract(nw)672 665 end do 673 666 endif … … 679 672 call sfluxv(dtauv,tauv,taucumv,albv,dwnv,wbarv,cosbv, & 680 673 acosz,stel_fract,gweight, & 681 nfluxtopv, nfluxoutv_nu,nfluxgndv_nu, &674 nfluxtopv,fluxtopvdn,nfluxoutv_nu,nfluxgndv_nu, & 682 675 fmnetv,fluxupv,fluxdnv,fzerov,taugsurf) 683 676 … … 709 702 710 703 ! Flux incident at the top of the atmosphere 711 fluxtop_dn(ig)=flux dnv(1)704 fluxtop_dn(ig)=fluxtopvdn 712 705 713 706 fluxtop_lw(ig) = real(nfluxtopi) -
trunk/LMDZ.GENERIC/libf/phystd/gfluxi.F
r959 r961 156 156 EP = EXP(MIN(LAMDA(L)*DTAUK,TAUMAX)) ! CLIPPED EXPONENTIAL 157 157 EM = 1.0D0/EP 158 TERM = UBARI/(1. -W0(L)*COSBAR(L))158 TERM = UBARI/(1.D0-W0(L)*COSBAR(L)) 159 159 160 160 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE -
trunk/LMDZ.GENERIC/libf/phystd/inifis.F
r952 r961 549 549 write(*,*) "cpp=",cpp 550 550 ENDIF 551 else552 mugaz=8.314*1000./pr551 ! else 552 ! mugaz=8.314*1000./pr 553 553 endif 554 554 call su_gases -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r918 r961 120 120 ! if we have continuum opacities, we need dz 121 121 if(kastprof)then 122 dz(k) = dpr(k)*(1000.0 *8.3145/muvar(k))*TMID(K)/(g*PMID(K))122 dz(k) = dpr(k)*(1000.0d0*8.3145d0/muvar(k))*TMID(K)/(g*PMID(K)) 123 123 U(k) = (Cmk*mugaz/(muvar(k)))*DPR(k) 124 124 else … … 149 149 150 150 ! continuum absorption 151 DCONT = 0.0 151 DCONT = 0.0d0 152 152 153 153 if(continuum.and.(.not.graybody))then … … 163 163 endif 164 164 165 dtemp=0.0 165 dtemp=0.0d0 166 166 if(igas.eq.igas_N2)then 167 167 … … 180 180 do jgas=1,ngasmx 181 181 p_cross = dble(PMID(k)*scalep*gfrac(jgas)*(1.-QVAR(k))) 182 dtempc = 0.0 182 dtempc = 0.0d0 183 183 if(jgas.eq.igas_N2)then 184 184 interm = indi(nw,igas,jgas) … … 286 286 end do 287 287 288 288 DTAUKI(L_LEVELS+1,1:L_NSPECTI,1:L_NGAUSS)=0.d0 289 289 !======================================================================= 290 290 ! Now the full treatment for the layers, where besides the opacity … … 315 315 316 316 atemp = 0. 317 if(DTAUI(L,NW,NG) .GT. 1.0 E-9) then317 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 318 318 do iaer=1,naerkind 319 319 atemp = atemp + & … … 324 324 else 325 325 WBARI(L,nw,ng) = 0.0D0 326 DTAUI(L,NW,NG) = 1.0 E-9326 DTAUI(L,NW,NG) = 1.0D-9 327 327 endif 328 328 329 if(btemp(L,nw) .GT. 0.0 ) then329 if(btemp(L,nw) .GT. 0.0d0) then 330 330 cosbi(L,NW,NG) = atemp/btemp(L,nw) 331 331 else … … 344 344 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG)+DTAUKI(K+1,NW,NG)! + 1.e-50 345 345 346 if(DTAUI(L,NW,NG) .GT. 1.0 E-9) then346 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 347 347 348 348 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) … … 350 350 else 351 351 WBARI(L,nw,ng) = 0.0D0 352 DTAUI(L,NW,NG) = 1.0 E-9352 DTAUI(L,NW,NG) = 1.0D-9 353 353 endif 354 354 -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r959 r961 1433 1433 print*,' ISR ASR OLR GND DYN [W m^-2]' 1434 1434 print*, ISR,ASR,OLR,GND,DYN 1435 1435 1436 if(enertest)then 1436 1437 print*,'SW flux/heating difference SW++ - ASR = ',dEtotSW+dEtotsSW-ASR,' W m-2' -
trunk/LMDZ.GENERIC/libf/phystd/setspi.F90
r959 r961 127 127 128 128 do M=1,L_NSPECTI 129 WNOI(M) = 0.5 *(BWNI(M+1)+BWNI(M))129 WNOI(M) = 0.5D0*(BWNI(M+1)+BWNI(M)) 130 130 DWNI(M) = BWNI(M+1)-BWNI(M) 131 WAVEI(M) = 1.0 E+4/WNOI(M)132 BLAMI(M) = 0.01 /BWNI(M)133 end do 134 BLAMI(M) = 0.01 /BWNI(M)131 WAVEI(M) = 1.0D+4/WNOI(M) 132 BLAMI(M) = 0.01D0/BWNI(M) 133 end do 134 BLAMI(M) = 0.01D0/BWNI(M) 135 135 ! note M=L_NSPECTI+1 after loop due to Fortran bizarreness 136 136 … … 148 148 a = 1.0D-2/BWNI(NW+1) 149 149 b = 1.0D-2/BWNI(NW) 150 bpa = (b+a)/2.0 151 bma = (b-a)/2.0 150 bpa = (b+a)/2.0D0 151 bma = (b-a)/2.0D0 152 152 do nt=NTstar,NTstop 153 153 T = dble(NT)/NTfac … … 167 167 print*,'setspi: Force F=sigma*eps*T^4 for all values of T!' 168 168 do nt=NTstar,NTstop 169 plancksum=0.0 169 plancksum=0.0D0 170 170 T=dble(NT)/NTfac 171 171 … … 185 185 if(planckcheck)then 186 186 ! check energy conservation at lower temperature boundary 187 plancksum=0.0 187 plancksum=0.0D0 188 188 nt=NTstar 189 189 do NW=1,L_NSPECTI … … 195 195 196 196 ! check energy conservation at upper temperature boundary 197 plancksum=0.0 197 plancksum=0.0D0 198 198 nt=NTstop 199 199 do NW=1,L_NSPECTI -
trunk/LMDZ.GENERIC/libf/phystd/sfluxi.F
r959 r961 70 70 NTS = int(TSURF*NTfac)-NTstar+1 71 71 NTT = int(TTOP *NTfac)-NTstar+1 72 ! NTS = TSURF*10.0D0-49973 ! NTT = TTOP *10.0D0-49974 72 75 73 !JL12 corrects the surface planck function so that its integral is equal to sigma Tsurf^4 … … 110 108 C OR THE TOP LAYER WILL COOL TO SPACE UNPHYSICALLY 111 109 112 TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 110 ! TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 111 TAUTOP = TAUCUMI(2,NW,NG) 113 112 BTOP = (1.0D0-EXP(-TAUTOP/UBARI))*PLTOP 114 113 … … 161 160 NG = L_NGAUSS 162 161 163 TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 162 ! TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 163 TAUTOP = TAUCUMI(2,NW,NG) 164 164 BTOP = (1.0D0-EXP(-TAUTOP/UBARI))*PLTOP 165 165 -
trunk/LMDZ.GENERIC/libf/phystd/sfluxv.F
r366 r961 1 1 SUBROUTINE SFLUXV(DTAUV,TAUV,TAUCUMV,RSFV,DWNV,WBARV,COSBV, 2 * UBAR0,STEL,GWEIGHT,NFLUXTOPV, NFLUXOUTV_nu,3 * NFLUX GNDV_nu,2 * UBAR0,STEL,GWEIGHT,NFLUXTOPV,FLUXTOPVDN, 3 * NFLUXOUTV_nu,NFLUXGNDV_nu, 4 4 * FMNETV,FLUXUPV,FLUXDNV,FZEROV,taugsurf) 5 5 … … 18 18 real*8 STEL(L_NSPECTV) 19 19 real*8 FLUXUPV(L_NLAYRAD), FLUXDNV(L_NLAYRAD) 20 real*8 NFLUXTOPV, FLUXUP, FLUXDN 20 real*8 NFLUXTOPV, FLUXUP, FLUXDN,FLUXTOPVDN 21 21 real*8 NFLUXOUTV_nu(L_NSPECTV) 22 22 real*8 NFLUXGNDV_nu(L_NSPECTV) … … 37 37 38 38 NFLUXTOPV = 0.0 39 FLUXTOPVDN = 0.0 39 40 40 41 DO NW=1,L_NSPECTV … … 100 101 NFLUXTOPV = NFLUXTOPV+(FLUXUP-FLUXDN)*GWEIGHT(NG)* 101 102 * (1.0-FZEROV(NW)) 103 FLUXTOPVDN = FLUXTOPVDN+FLUXDN*GWEIGHT(NG)* 104 * (1.0-FZEROV(NW)) 102 105 DO L=1,L_NLAYRAD 103 106 FMNETV(L)=FMNETV(L)+( FMUPV(L)-FMDV(L) )* … … 156 159 157 160 NFLUXTOPV = NFLUXTOPV+(FLUXUP-FLUXDN)*FZERO 161 FLUXTOPVDN = FLUXTOPVDN+FLUXDN*FZERO 158 162 DO L=1,L_NLAYRAD 159 163 FMNETV(L)=FMNETV(L)+( FMUPV(L)-FMDV(L) )*FZERO -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r879 r961 372 372 373 373 do nw=1,L_NSPECTI 374 fzeroi(nw) = 0. 374 fzeroi(nw) = 0.d0 375 375 ! do nt=1,L_NTREF 376 376 ! do np=1,L_NPREF … … 378 378 ! do ng = 1,L_NGAUSS 379 379 ! if(gasi8(nt,np,nh,nw,ng).lt.1.0e-25)then 380 ! fzeroi(nw)=fzeroi(nw)+1. 380 ! fzeroi(nw)=fzeroi(nw)+1.d0 381 381 ! endif 382 382 ! end do … … 388 388 389 389 do nw=1,L_NSPECTV 390 fzerov(nw) = 0. 390 fzerov(nw) = 0.d0 391 391 ! do nt=1,L_NTREF 392 392 ! do np=1,L_NPREF … … 394 394 ! do ng = 1,L_NGAUSS 395 395 ! if(gasv8(nt,np,nh,nw,ng).lt.1.0e-25)then 396 ! fzerov(nw)=fzerov(nw)+1. 396 ! fzerov(nw)=fzerov(nw)+1.d0 397 397 ! endif 398 398 ! end do
Note: See TracChangeset
for help on using the changeset viewer.