Changeset 959 for trunk/LMDZ.GENERIC/libf/phystd
- Timestamp:
- May 15, 2013, 5:39:25 PM (12 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/blackl.F
r253 r959 4 4 5 5 ! physical constants 6 sigma=5.6 693d-086 sigma=5.67032D-8 7 7 pi=datan(1.d0)*4.d0 8 8 c0=2.9979d+08 -
trunk/LMDZ.GENERIC/libf/phystd/gfluxi.F
r804 r959 75 75 ! endif 76 76 ! Prevent this with an if statement: 77 if (W0(L).eq.1. ) then78 W0(L) = 0.99999 77 if (W0(L).eq.1.D0) then 78 W0(L) = 0.99999D0 79 79 endif 80 80 !---------------------------------------------------- 81 81 82 ALPHA(L) = SQRT( (1.0-W0(L))/(1.0-W0(L)*COSBAR(L)) ) 83 LAMDA(L) = ALPHA(L)*(1.0-W0(L)*COSBAR(L))/UBARI 84 85 !NT2 = TLEV(2*L+2)*10.0D0-499 86 !NT = TLEV(2*L)*10.0D0-499 82 ALPHA(L) = SQRT( (1.0D0-W0(L))/(1.0D0-W0(L)*COSBAR(L)) ) 83 LAMDA(L) = ALPHA(L)*(1.0D0-W0(L)*COSBAR(L))/UBARI 84 87 85 NT = int(TLEV(2*L)*NTfac) - NTstar+1 88 86 NT2 = int(TLEV(2*L+2)*NTfac) - NTstar+1 … … 97 95 98 96 if (W0(L).eq.1.) then 99 W0(L) = 0.99999 97 W0(L) = 0.99999D0 100 98 end if 101 99 102 ALPHA(L) = SQRT( (1.0-W0(L))/(1.0-W0(L)*COSBAR(L)) ) 103 LAMDA(L) = ALPHA(L)*(1.0-W0(L)*COSBAR(L))/UBARI 104 105 !NT = TLEV(2*L+1)*10.0D0-499 106 !NT2 = TLEV(2*L)*10.0D0-499 100 ALPHA(L) = SQRT( (1.0D0-W0(L))/(1.0D0-W0(L)*COSBAR(L)) ) 101 LAMDA(L) = ALPHA(L)*(1.0D0-W0(L)*COSBAR(L))/UBARI 102 107 103 NT = int(TLEV(2*L+1)*NTfac) - NTstar+1 108 104 NT2 = int(TLEV(2*L)*NTfac) - NTstar+1 … … 111 107 112 108 DO L=1,L_NLAYRAD 113 GAMA(L) = (1.0 -ALPHA(L))/(1.0+ALPHA(L))114 TERM = UBARI/(1.0 -W0(L)*COSBAR(L))109 GAMA(L) = (1.0D0-ALPHA(L))/(1.0D0+ALPHA(L)) 110 TERM = UBARI/(1.0D0-W0(L)*COSBAR(L)) 115 111 116 112 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE … … 137 133 138 134 EP = EXP( MIN((LAMDA(L)*DTAU(L)),TAUMAX)) 139 EM = 1.0 /EP135 EM = 1.0D0/EP 140 136 E1(L) = EP+GAMA(L)*EM 141 137 E2(L) = EP-GAMA(L)*EM … … 159 155 DTAUK = TAUCUM(2*L+1)-TAUCUM(2*L) 160 156 EP = EXP(MIN(LAMDA(L)*DTAUK,TAUMAX)) ! CLIPPED EXPONENTIAL 161 EM = 1.0 /EP157 EM = 1.0D0/EP 162 158 TERM = UBARI/(1.-W0(L)*COSBAR(L)) 163 159 … … 181 177 182 178 EP = EXP(MIN((LAMDA(L)*DTAU(L)),TAUMAX)) ! CLIPPED EXPONENTIAL 183 EM = 1.0 /EP184 TERM = UBARI/(1. -W0(L)*COSBAR(L))179 EM = 1.0D0/EP 180 TERM = UBARI/(1.D0-W0(L)*COSBAR(L)) 185 181 186 182 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE … … 199 195 C FLUX AT THE PTOP LEVEL 200 196 201 EP = 1.0 202 EM = 1.0 203 TERM = UBARI/(1.0 -W0(1)*COSBAR(1))197 EP = 1.0D0 198 EM = 1.0D0 199 TERM = UBARI/(1.0D0-W0(1)*COSBAR(1)) 204 200 205 201 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r955 r959 326 326 real mass(ngrid,nlayermx),massarea(ngrid,nlayermx) 327 327 real dEtot, dEtots, AtmToSurf_TurbFlux 328 real dEtotSW, dEtotsSW, dEtotLW, dEtotsLW328 real,save :: dEtotSW, dEtotsSW, dEtotLW, dEtotsLW 329 329 real dEzRadsw(ngrid,nlayermx),dEzRadlw(ngrid,nlayermx),dEzdiff(ngrid,nlayermx) 330 330 real dEdiffs(ngrid),dEdiff(ngrid) … … 816 816 dEtotSW = cpp*SUM(massarea(:,:)*zdtsw(:,:))/totarea 817 817 dEtotLW = cpp*SUM(massarea(:,:)*zdtlw(:,:))/totarea 818 dEtotsSW = SUM(fluxsurf_sw(:)*(1.-albedo(:))*area(:))/totarea 818 dEtotsSW = SUM(fluxsurf_sw(:)*(1.-albedo(:))*area(:))/totarea !JL13 carefull, albedo can have changed since the last time we called corrk 819 819 dEtotsLW = SUM((fluxsurf_lw(:)*emis(:)-zplanck(:))*area(:))/totarea 820 820 dEzRadsw(:,:)=cpp*mass(:,:)*zdtsw(:,:) … … 1189 1189 ! find qtot 1190 1190 if(watertest)then 1191 iq= 31191 iq=igcm_h2o_ice 1192 1192 dWtot = SUM(massarea(:,:)*pq(:,:,iq))*ptimestep/totarea 1193 1193 dWtots = SUM(massarea(:,:)*pdq(:,:,iq))*ptimestep/totarea … … 1203 1203 ! find qtot 1204 1204 if(watertest)then 1205 iq= 31205 iq=igcm_h2o_ice 1206 1206 dWtot = SUM(massarea(:,:)*pq(:,:,iq))*ptimestep/totarea 1207 1207 dWtots = SUM(massarea(:,:)*pdq(:,:,iq))*ptimestep/totarea … … 1397 1397 print*,Ts1,Ts2,Ts3,TsS 1398 1398 endif 1399 endif 1399 else 1400 if (cursor == 1) then 1401 print*,' ave[Tsurf] min[Tsurf] max[Tsurf]' 1402 print*,Ts1,Ts2,Ts3 1403 endif 1404 end if 1400 1405 1401 1406 ! --------------------------------------------------------- … … 1426 1431 endif 1427 1432 1433 print*,' ISR ASR OLR GND DYN [W m^-2]' 1434 print*, ISR,ASR,OLR,GND,DYN 1428 1435 if(enertest)then 1429 print*,' ISR ASR OLR GND DYN [W m^-2]'1430 print*, ISR,ASR,OLR,GND,DYN1431 1436 print*,'SW flux/heating difference SW++ - ASR = ',dEtotSW+dEtotsSW-ASR,' W m-2' 1432 1437 print*,'LW flux/heating difference LW++ - OLR = ',dEtotLW+dEtotsLW+OLR,' W m-2' … … 1765 1770 do ig=1,ngrid 1766 1771 if(tau_col(ig).gt.1.e3)then 1767 print*,'WARNING: tau_col=',tau_col(ig)1768 print*,'at ig=',ig,'in PHYSIQ'1772 ! print*,'WARNING: tau_col=',tau_col(ig) 1773 ! print*,'at ig=',ig,'in PHYSIQ' 1769 1774 endif 1770 1775 end do -
trunk/LMDZ.GENERIC/libf/phystd/radcommon_h.F90
r878 r959 128 128 real*8, parameter :: SCALEP = 1.00D+2 129 129 130 real*8, parameter :: sigma = 5.67032 e-8130 real*8, parameter :: sigma = 5.67032D-8 131 131 132 132 real*8 Cmk -
trunk/LMDZ.GENERIC/libf/phystd/setspi.F90
r789 r959 68 68 mm=0 69 69 70 forceEC=. false.70 forceEC=.true. 71 71 planckcheck=.true. 72 72 -
trunk/LMDZ.GENERIC/libf/phystd/sfluxi.F
r600 r959 43 43 C ZERO THE NET FLUXES 44 44 45 NFLUXTOPI = 0.0 45 NFLUXTOPI = 0.0D0 46 46 47 47 DO NW=1,L_NSPECTI 48 NFLUXTOPI_nu(NW) = 0.0 48 NFLUXTOPI_nu(NW) = 0.0D0 49 49 DO L=1,L_NLAYRAD 50 FLUXUPI_nu(L,NW) = 0.0 51 52 fup_tmp(nw)=0.0 53 fdn_tmp(nw)=0.0 50 FLUXUPI_nu(L,NW) = 0.0D0 51 52 fup_tmp(nw)=0.0D0 53 fdn_tmp(nw)=0.0D0 54 54 55 55 END DO … … 57 57 58 58 DO L=1,L_NLAYRAD 59 FMNETI(L) = 0.0 60 FLUXUPI(L) = 0.0 61 FLUXDNI(L) = 0.0 59 FMNETI(L) = 0.0D0 60 FLUXUPI(L) = 0.0D0 61 FLUXDNI(L) = 0.0D0 62 62 END DO 63 63 … … 102 102 103 103 if(TAUGSURF(NW,NG).lt. TLIMIT) then 104 fzero = fzero + (1.0 -FZEROI(NW))*GWEIGHT(NG)104 fzero = fzero + (1.0D0-FZEROI(NW))*GWEIGHT(NG) 105 105 goto 30 106 106 end if … … 111 111 112 112 TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 113 BTOP = (1.0 -EXP(-TAUTOP/UBARI))*PLTOP113 BTOP = (1.0D0-EXP(-TAUTOP/UBARI))*PLTOP 114 114 115 115 C WE CAN NOW SOLVE FOR THE COEFFICIENTS OF THE TWO STREAM … … 127 127 128 128 NFLUXTOPI = NFLUXTOPI+FTOPUP*DWNI(NW)*GWEIGHT(NG)* 129 * (1.0 -FZEROI(NW))129 * (1.0D0-FZEROI(NW)) 130 130 131 131 c and same thing by spectral band... (RDW) 132 132 NFLUXTOPI_nu(NW) = NFLUXTOPI_nu(NW) 133 * +FTOPUP*DWNI(NW)*GWEIGHT(NG)*(1.0 -FZEROI(NW))133 * +FTOPUP*DWNI(NW)*GWEIGHT(NG)*(1.0D0-FZEROI(NW)) 134 134 135 135 … … 139 139 140 140 FMNETI(L) = FMNETI(L)+(FMUPI(L)-FMDI(L))*DWNI(NW)* 141 * GWEIGHT(NG)*(1.0 -FZEROI(NW))141 * GWEIGHT(NG)*(1.0D0-FZEROI(NW)) 142 142 FLUXUPI(L) = FLUXUPI(L) + FMUPI(L)*DWNI(NW)*GWEIGHT(NG)* 143 * (1.0 -FZEROI(NW))143 * (1.0D0-FZEROI(NW)) 144 144 FLUXDNI(L) = FLUXDNI(L) + FMDI(L)*DWNI(NW)*GWEIGHT(NG)* 145 * (1.0 -FZEROI(NW))145 * (1.0D0-FZEROI(NW)) 146 146 147 147 c and same thing by spectral band... (RW) 148 148 FLUXUPI_nu(L,NW) = FLUXUPI_nu(L,NW) + 149 * FMUPI(L)*DWNI(NW)*GWEIGHT(NG)*(1.0 -FZEROI(NW))149 * FMUPI(L)*DWNI(NW)*GWEIGHT(NG)*(1.0D0-FZEROI(NW)) 150 150 151 151 END DO … … 162 162 163 163 TAUTOP = DTAUI(1,NW,NG)*PLEV(2)/(PLEV(4)-PLEV(2)) 164 BTOP = (1.0 -EXP(-TAUTOP/UBARI))*PLTOP164 BTOP = (1.0D0-EXP(-TAUTOP/UBARI))*PLTOP 165 165 166 166 C WE CAN NOW SOLVE FOR THE COEFFICIENTS OF THE TWO STREAM
Note: See TracChangeset
for help on using the changeset viewer.