Changeset 1722 for trunk/LMDZ.TITAN/libf/phytitan
- Timestamp:
- Jul 18, 2017, 4:15:23 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/phytitan
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/bilinearbig.F90
r1526 r1722 56 56 ! ... and for y within the temperature range 57 57 if ((y.lt.y_arr(1)).or.(y.gt.y_arr(nY))) then 58 write(*,*) 'Warning from bilinearbig routine:' 59 write(*,*) 'Outside continuum temperature range!' 58 print*,y_arr(1),y_arr(nY) 59 !write(*,*) 'Warning from bilinearbig routine:' 60 !write(*,*) 'Outside continuum temperature range!' 60 61 if(y.lt.y_arr(1))then 61 62 y=y_arr(1)+0.01 63 b=1 64 y1=y_arr(b) 65 y2=y_arr(b+1) 62 66 endif 63 67 if(y.gt.y_arr(nY))then 64 68 y=y_arr(nY)-0.01 69 b=nY-1 70 y1=y_arr(b) 71 y2=y_arr(b+1) 65 72 endif 66 73 else -
trunk/LMDZ.TITAN/libf/phytitan/callcorrk.F90
r1648 r1722 8 8 tau_col,firstcall,lastcall) 9 9 10 use mod_phys_lmdz_para, only : is_master 10 11 use radinc_h 11 12 use radcommon_h … … 17 18 USE tracer_h 18 19 use comcstfi_mod, only: pi, mugaz, cpp 19 use callkeys_mod, only: diurnal,tracer, nosurf,&20 use callkeys_mod, only: diurnal,tracer, & 20 21 strictboundcorrk,specOLR 21 22 … … 75 76 REAL,INTENT(OUT) :: OSR_nu(ngrid,L_NSPECTV) ! Outgoing SW radition in each band (Normalized to the band width (W/m2/cm-1). 76 77 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aeropacity. 77 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 78 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 78 79 79 80 … … 113 114 REAL*8 taucumi(L_LEVELS,L_NSPECTI,L_NGAUSS) 114 115 115 REAL*8 tauaero(L_LEVELS +1,naerkind)116 REAL*8 tauaero(L_LEVELS,naerkind) 116 117 REAL*8 nfluxtopv,nfluxtopi,nfluxtop,fluxtopvdn 117 118 REAL*8 nfluxoutv_nu(L_NSPECTV) ! Outgoing band-resolved VI flux at TOA (W/m2). … … 167 168 168 169 ! test on allocated necessary because of CLFvarying (two calls to callcorrk in physiq) 169 if(.not.allocated(QXVAER)) allocate(QXVAER(L_LEVELS +1,L_NSPECTV,naerkind))170 if(.not.allocated(QSVAER)) allocate(QSVAER(L_LEVELS +1,L_NSPECTV,naerkind))171 if(.not.allocated(GVAER)) allocate(GVAER(L_LEVELS +1,L_NSPECTV,naerkind))172 if(.not.allocated(QXIAER)) allocate(QXIAER(L_LEVELS +1,L_NSPECTI,naerkind))173 if(.not.allocated(QSIAER)) allocate(QSIAER(L_LEVELS +1,L_NSPECTI,naerkind))174 if(.not.allocated(GIAER)) allocate(GIAER(L_LEVELS +1,L_NSPECTI,naerkind))170 if(.not.allocated(QXVAER)) allocate(QXVAER(L_LEVELS,L_NSPECTV,naerkind)) 171 if(.not.allocated(QSVAER)) allocate(QSVAER(L_LEVELS,L_NSPECTV,naerkind)) 172 if(.not.allocated(GVAER)) allocate(GVAER(L_LEVELS,L_NSPECTV,naerkind)) 173 if(.not.allocated(QXIAER)) allocate(QXIAER(L_LEVELS,L_NSPECTI,naerkind)) 174 if(.not.allocated(QSIAER)) allocate(QSIAER(L_LEVELS,L_NSPECTI,naerkind)) 175 if(.not.allocated(GIAER)) allocate(GIAER(L_LEVELS,L_NSPECTI,naerkind)) 175 176 176 177 !!! ALLOCATED instances are necessary because of CLFvarying (strategy to call callcorrk twice in physiq...) … … 376 377 ! Test / Correct for freaky s. s. albedo values. 377 378 do iaer=1,naerkind 378 do k=1,L_LEVELS +1379 do k=1,L_LEVELS 379 380 380 381 do nw=1,L_NSPECTV … … 419 420 ! boundary conditions 420 421 tauaero(1,iaer) = tauaero(2,iaer) 421 tauaero(L_LEVELS+1,iaer) = tauaero(L_LEVELS,iaer)422 422 !tauaero(1,iaer) = 0. 423 !tauaero(L_LEVELS+1,iaer) = 0.424 423 425 424 end do ! naerkind … … 430 429 albv(nw)=albedo(ig,nw) 431 430 ENDDO 432 433 if (nosurf) then ! Case with no surface.434 DO nw=1,L_NSPECTV435 if(albv(nw).gt.0.0) then436 print*,'For open lower boundary in callcorrk must'437 print*,'have spectral surface band albedos all set to zero!'438 call abort439 endif440 ENDDO441 endif442 431 443 432 if ((ngrid.eq.1).and.(global1d)) then ! Fixed zenith angle 'szangle' in 1D simulations w/ globally-averaged sunlight. -
trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90
r1672 r1722 71 71 real,save :: MassPlanet 72 72 !$OMP THREADPRIVATE(flatten,Rmean,J2,MassPlanet) 73 real,save :: surfalbedo 74 real,save :: surfemis 75 !$OMP THREADPRIVATE(surfalbedo,surfemis) 73 76 74 77 logical,save :: iscallphys=.false.!existence of callphys.def -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
r1672 r1722 10 10 11 11 use radinc_h, only: ini_radinc_h, naerkind 12 use radcommon_h, only: ini_radcommon_h13 12 use datafile_mod, only: datadir 14 13 use comdiurn_h, only: sinlat, coslat, sinlon, coslon … … 543 542 ENDDO 544 543 544 ! initialize variables in radinc_h 545 545 call ini_radinc_h(nlayer) 546 546 547 ! allocate "radcommon_h" arrays548 call ini_radcommon_h()549 550 547 ! allocate "comsoil_h" arrays 551 548 call ini_comsoil_h(ngrid) -
trunk/LMDZ.TITAN/libf/phytitan/optci.F90
r1648 r1722 32 32 33 33 real*8 DTAUI(L_NLAYRAD,L_NSPECTI,L_NGAUSS) 34 real*8 DTAUKI(L_LEVELS +1,L_NSPECTI,L_NGAUSS)34 real*8 DTAUKI(L_LEVELS,L_NSPECTI,L_NGAUSS) 35 35 real*8 TAUI(L_NLEVRAD,L_NSPECTI,L_NGAUSS) 36 36 real*8 TAUCUMI(L_LEVELS,L_NSPECTI,L_NGAUSS) … … 42 42 43 43 ! for aerosols 44 real*8 QXIAER(L_LEVELS +1,L_NSPECTI,NAERKIND)45 real*8 QSIAER(L_LEVELS +1,L_NSPECTI,NAERKIND)46 real*8 GIAER(L_LEVELS +1,L_NSPECTI,NAERKIND)47 real*8 TAUAERO(L_LEVELS +1,NAERKIND)48 real*8 TAUAEROLK(L_LEVELS +1,L_NSPECTI,NAERKIND)44 real*8 QXIAER(L_LEVELS,L_NSPECTI,NAERKIND) 45 real*8 QSIAER(L_LEVELS,L_NSPECTI,NAERKIND) 46 real*8 GIAER(L_LEVELS,L_NSPECTI,NAERKIND) 47 real*8 TAUAERO(L_LEVELS,NAERKIND) 48 real*8 TAUAEROLK(L_LEVELS,L_NSPECTI,NAERKIND) 49 49 real*8 TAEROS(L_LEVELS,L_NSPECTI,NAERKIND) 50 50 … … 52 52 ! J. Vatant d'Ollone (2016) 53 53 real*8 GWEIGHT(L_NGAUSS) 54 real*8 DHAZE_T(L_LEVELS +1,L_NSPECTI)55 real*8 DHAZES_T(L_LEVELS +1,L_NSPECTI)56 real*8 SSA_T(L_LEVELS +1,L_NSPECTI)57 real*8 ASF_T(L_LEVELS +1,L_NSPECTI)54 real*8 DHAZE_T(L_LEVELS,L_NSPECTI) 55 real*8 DHAZES_T(L_LEVELS,L_NSPECTI) 56 real*8 SSA_T(L_LEVELS,L_NSPECTI) 57 real*8 ASF_T(L_LEVELS,L_NSPECTI) 58 58 real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI) 59 59 real*8 K_HAZE(L_NLAYRAD,L_NSPECTI) … … 115 115 end do ! levels 116 116 117 117 ! Spectral dependance of aerosol absorption 118 118 do iaer=1,naerkind 119 119 DO NW=1,L_NSPECTI … … 127 127 128 128 do K=2,L_LEVELS 129 129 130 130 ilay = k / 2 ! int. arithmetic => gives the gcm layer index 131 131 132 ! continuum absorption 133 DCONT = 0.0d0 132 DAERO=SUM(TAEROS(K,NW,1:naerkind)) ! aerosol absorption 133 134 !================= Titan customisation ======================================== 135 call disr_haze(dz(k),plev(k),wnoi(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw)) 136 ! ============================================================================= 137 138 DCONT = 0.0d0 ! continuum absorption 134 139 135 140 if(continuum.and.(.not.graybody))then … … 207 212 endif 208 213 209 ! aerosol absorption210 DAERO=SUM(TAEROS(K,NW,1:naerkind))211 212 !================= Titan customisation ========================================213 call disr_haze(dz(k),plev(k),wnoi(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw))214 ! =============================================================================215 216 217 214 do ng=1,L_NGAUSS-1 218 215 … … 251 248 end do 252 249 253 DTAUKI(L_LEVELS+1,1:L_NSPECTI,1:L_NGAUSS)=0.d0254 255 256 250 !======================================================================= 257 251 ! Now the full treatment for the layers, where besides the opacity … … 261 255 do iaer=1,naerkind 262 256 DO NW=1,L_NSPECTI 263 DO K=2,L_LEVELS +1264 TAUAEROLK(K,NW,IAER) = TAUAERO(K,IAER)*QSIAER(K,NW,IAER) 257 DO K=2,L_LEVELS 258 TAUAEROLK(K,NW,IAER) = TAUAERO(K,IAER)*QSIAER(K,NW,IAER) ! effect of scattering albedo 265 259 ENDDO 266 260 ENDDO … … 269 263 ! Haze scattering 270 264 DO NW=1,L_NSPECTI 271 DO K=2,L_LEVELS +1265 DO K=2,L_LEVELS 272 266 DHAZES_T(K,NW) = DHAZE_T(K,NW) * SSA_T(K,NW) 273 267 ENDDO … … 281 275 END DO ! L vertical loop 282 276 283 !last level 284 L = L_NLAYRAD 285 K = 2*L+1 286 277 ! Last level 278 L = L_NLAYRAD 279 K = 2*L+1 287 280 btemp(L,NW) = SUM(TAUAEROLK(K,NW,1:naerkind)) + DHAZES_T(K,NW) 288 281 289 282 END DO ! NW spectral loop 290 283 291 ! ======================================================================292 284 293 285 DO NW=1,L_NSPECTI … … 296 288 297 289 K = 2*L+1 298 299 290 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG) + DTAUKI(K+1,NW,NG)! + 1.e-50 300 291 … … 306 297 GIAER(K+1,NW,IAER) * TAUAEROLK(K+1,NW,IAER) 307 298 end do 308 atemp = atemp + ASF_T(K,NW)*DHAZES_T(K,NW) 299 atemp = atemp + & 300 ASF_T(K,NW)*DHAZES_T(K,NW) + & 301 ASF_T(K+1,NW)*DHAZES_T(K+1,NW) 302 309 303 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 310 304 else … … 321 315 END DO ! L vertical loop 322 316 323 ! No vertical averaging on bottom layer 324 325 L = L_NLAYRAD 326 K = 2*L+1 327 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG) 317 ! Last level 328 318 329 atemp = 0. 330 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 331 do iaer=1,naerkind 332 atemp = atemp + & 333 GIAER(K,NW,IAER) * TAUAEROLK(K,NW,IAER) 334 end do 335 atemp = atemp + ASF_T(K,NW)*DHAZES_T(K,NW) 336 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 337 else 338 WBARI(L,nw,ng) = 0.0D0 339 DTAUI(L,NW,NG) = 1.0D-9 340 endif 341 342 if(btemp(L,nw) .GT. 0.0d0) then 343 cosbi(L,NW,NG) = atemp/btemp(L,nw) 344 else 345 cosbi(L,NW,NG) = 0.0D0 346 end if 319 L = L_NLAYRAD 320 K = 2*L+1 321 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG) ! + 1.e-50 322 323 atemp = 0. 324 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 325 do iaer=1,naerkind 326 atemp = atemp + GIAER(K,NW,IAER) * TAUAEROLK(K,NW,IAER) 327 end do 328 atemp = atemp + ASF_T(K,NW)*DHAZES_T(K,NW) 329 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 330 else 331 WBARI(L,nw,ng) = 0.0D0 332 DTAUI(L,NW,NG) = 1.0D-9 333 endif 334 335 if(btemp(L,nw) .GT. 0.0d0) then 336 cosbi(L,NW,NG) = atemp/btemp(L,nw) 337 else 338 cosbi(L,NW,NG) = 0.0D0 339 end if 340 347 341 348 342 ! Now the other Gauss points, if needed. 349 343 350 344 DO NG=1,L_NGAUSS-1 351 352 345 IF(TAUGSURF(NW,NG) .gt. TLIMIT) THEN 353 346 … … 357 350 358 351 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 359 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 352 353 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 354 360 355 else 361 356 WBARI(L,nw,ng) = 0.0D0 … … 366 361 END DO ! L vertical loop 367 362 368 ! No vertical averaging on bottom layer 369 370 L = L_NLAYRAD 371 K = 2*L+1 372 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG) 373 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 363 ! Last level 364 L = L_NLAYRAD 365 K = 2*L+1 366 DTAUI(L,nw,ng) = DTAUKI(K,NW,NG)! + 1.e-50 367 368 if(DTAUI(L,NW,NG) .GT. 1.0D-9) then 369 374 370 WBARI(L,nw,ng) = btemp(L,nw) / DTAUI(L,NW,NG) 375 else 376 WBARI(L,nw,ng) = 0.0D0 377 DTAUI(L,NW,NG) = 1.0D-9 378 endif 379 cosbi(L,NW,NG) = cosbi(L,NW,L_NGAUSS) 371 372 else 373 WBARI(L,nw,ng) = 0.0D0 374 DTAUI(L,NW,NG) = 1.0D-9 375 endif 376 377 cosbi(L,NW,NG) = cosbi(L,NW,L_NGAUSS) 380 378 381 379 END IF -
trunk/LMDZ.TITAN/libf/phytitan/optcv.F90
r1648 r1722 24 24 ! 25 25 ! THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISUAL 26 ! IT CALCU ALTES FOR EACH LAYER, FOR EACH SPECRAL INTERVAL IN THE VISUAL26 ! IT CALCULATES FOR EACH LAYER, FOR EACH SPECTRAL INTERVAL IN THE VISUAL 27 27 ! LAYER: WBAR, DTAU, COSBAR 28 28 ! LEVEL: TAU … … 39 39 40 40 real*8 DTAUV(L_NLAYRAD,L_NSPECTV,L_NGAUSS) 41 real*8 DTAUKV(L_LEVELS +1,L_NSPECTV,L_NGAUSS)41 real*8 DTAUKV(L_LEVELS,L_NSPECTV,L_NGAUSS) 42 42 real*8 TAUV(L_NLEVRAD,L_NSPECTV,L_NGAUSS) 43 43 real*8 TAUCUMV(L_LEVELS,L_NSPECTV,L_NGAUSS) … … 48 48 49 49 ! for aerosols 50 real*8 QXVAER(L_LEVELS +1,L_NSPECTV,NAERKIND)51 real*8 QSVAER(L_LEVELS +1,L_NSPECTV,NAERKIND)52 real*8 GVAER(L_LEVELS +1,L_NSPECTV,NAERKIND)53 real*8 TAUAERO(L_LEVELS +1,NAERKIND)54 real*8 TAUAEROLK(L_LEVELS +1,L_NSPECTV,NAERKIND)50 real*8 QXVAER(L_LEVELS,L_NSPECTV,NAERKIND) 51 real*8 QSVAER(L_LEVELS,L_NSPECTV,NAERKIND) 52 real*8 GVAER(L_LEVELS,L_NSPECTV,NAERKIND) 53 real*8 TAUAERO(L_LEVELS,NAERKIND) 54 real*8 TAUAEROLK(L_LEVELS,L_NSPECTV,NAERKIND) 55 55 real*8 TAEROS(L_LEVELS,L_NSPECTV,NAERKIND) 56 56 … … 58 58 ! J. Vatant d'Ollone (2016) 59 59 real*8 GWEIGHT(L_NGAUSS) 60 real*8 DHAZE_T(L_LEVELS +1,L_NSPECTI)61 real*8 DHAZES_T(L_LEVELS +1,L_NSPECTI)62 real*8 SSA_T(L_LEVELS +1,L_NSPECTI)63 real*8 ASF_T(L_LEVELS +1,L_NSPECTI)60 real*8 DHAZE_T(L_LEVELS,L_NSPECTI) 61 real*8 DHAZES_T(L_LEVELS,L_NSPECTI) 62 real*8 SSA_T(L_LEVELS,L_NSPECTI) 63 real*8 ASF_T(L_LEVELS,L_NSPECTI) 64 64 real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI) 65 65 real*8 K_HAZE(L_NLAYRAD,L_NSPECTI) … … 73 73 real*8 TAURAY(L_NSPECTV) 74 74 real*8 TRAY(L_LEVELS,L_NSPECTV) 75 real*8 TRAYAER76 75 real*8 DPR(L_LEVELS), U(L_LEVELS) 77 76 real*8 LCOEF(4), LKCOEF(L_LEVELS,4) … … 79 78 real*8 taugsurf(L_NSPECTV,L_NGAUSS-1) 80 79 real*8 DCONT,DAERO 80 real*8 DRAYAER 81 81 double precision wn_cont, p_cont, p_air, T_cont, dtemp, dtempc 82 82 double precision p_cross … … 127 127 end do ! levels 128 128 129 129 ! Spectral dependance of aerosol absorption 130 130 do iaer=1,naerkind 131 131 do NW=1,L_NSPECTV … … 135 135 end do 136 136 end do 137 138 ! Rayleigh scattering 137 139 do NW=1,L_NSPECTV 138 140 do K=2,L_LEVELS … … 140 142 end do ! levels 141 143 end do 142 144 143 145 ! we ignore K=1... 144 146 do K=2,L_LEVELS … … 148 150 do NW=1,L_NSPECTV 149 151 150 TRAYAER = TRAY(K,NW) 151 ! TRAYAER is Tau RAYleigh scattering, plus AERosol opacity 152 !================= Titan customisation ======================================== 153 call disr_haze(dz(k),plev(k),wnov(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw)) 154 ! ============================================================================= 155 156 DRAYAER = TRAY(K,NW) 157 ! DRAYAER is Tau RAYleigh scattering, plus AERosol opacity 152 158 do iaer=1,naerkind 153 TRAYAER = TRAYAER + TAEROS(K,NW,IAER)159 DRAYAER = DRAYAER + TAEROS(K,NW,IAER) 154 160 end do 161 162 DRAYAER = DRAYAER + DHAZE_T(K,NW) ! Titan's aerosol 155 163 156 164 DCONT = 0.0 ! continuum absorption … … 221 229 endif 222 230 223 !================= Titan customisation ========================================224 call disr_haze(dz(k),plev(k),wnov(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw))225 ! =============================================================================226 227 231 do ng=1,L_NGAUSS-1 228 232 … … 239 243 LKCOEF(K,3)*KCOEF(3) + LKCOEF(K,4)*KCOEF(4) 240 244 245 241 246 TAUGAS = U(k)*ANS 242 247 243 248 TAUGSURF(NW,NG) = TAUGSURF(NW,NG) + TAUGAS + DCONT 244 249 DTAUKV(K,nw,ng) = TAUGAS & 245 + TRAYAER & ! TRAYAER includes all scattering contributions 246 + DCONT & ! For parameterized continuum aborption 247 + DHAZE_T(K,NW) ! For Titan haze 250 + DRAYAER & ! DRAYAER includes all scattering contributions 251 + DCONT ! For parameterized continuum aborption 248 252 249 253 end do … … 253 257 254 258 NG = L_NGAUSS 255 DTAUKV(K,nw,ng) = TRAY(K,NW) + DCONT & ! For parameterized continuum absorption 256 + DHAZE_T(K,NW) ! For Titan haze 257 258 do iaer=1,naerkind 259 DTAUKV(K,nw,ng) = DTAUKV(K,nw,ng) + TAEROS(K,NW,IAER) 260 end do ! a bug was here! 259 DTAUKV(K,nw,ng) = DRAYAER + DCONT ! Scattering + parameterized continuum absorption, including Titan's haze 261 260 262 261 end do … … 267 266 ! Now the full treatment for the layers, where besides the opacity 268 267 ! we need to calculate the scattering albedo and asymmetry factors 269 ! ====================================================================== 270 268 271 269 do iaer=1,naerkind 272 270 DO NW=1,L_NSPECTV 273 DO K=2,L_LEVELS ! AS: shouldn't this be L_LEVELS+1 ? (see optci)274 TAUAEROLK(K,NW,IAER) = TAUAERO(K,IAER) * QSVAER(K,NW,IAER) 271 DO K=2,L_LEVELS 272 TAUAEROLK(K,NW,IAER) = TAUAERO(K,IAER) * QSVAER(K,NW,IAER) ! effect of scattering albedo 275 273 ENDDO 276 274 ENDDO … … 279 277 ! Haze scattering 280 278 DO NW=1,L_NSPECTV 281 DO K=2,L_LEVELS +1282 DHAZES_T(K,NW) = DHAZE_T(K,NW) * SSA_T(K,NW) 279 DO K=2,L_LEVELS 280 DHAZES_T(K,NW) = DHAZE_T(K,NW) * SSA_T(K,NW) ! effect of scattering albedo on haze 283 281 ENDDO 284 282 ENDDO … … 288 286 DO L=1,L_NLAYRAD-1 289 287 K = 2*L+1 290 291 atemp(L,NW) = SUM(GVAER(K,NW,1:naerkind) * TAUAEROLK(K,NW,1:naerkind)) & 292 + SUM(GVAER(K+1,NW,1:naerkind) * TAUAEROLK(K+1,NW,1:naerkind)) & 293 + ASF_T(K,NW)*DHAZES_T(K,NW) 294 288 atemp(L,NW) = SUM(GVAER(K,NW,1:naerkind) * TAUAEROLK(K,NW,1:naerkind))+SUM(GVAER(K+1,NW,1:naerkind) * TAUAEROLK(K+1,NW,1:naerkind)) & 289 + ASF_T(K,NW)*DHAZES_T(K,NW) + ASF_T(K+1,NW)*DHAZES_T(K+1,NW) 295 290 btemp(L,NW) = SUM(TAUAEROLK(K,NW,1:naerkind)) + SUM(TAUAEROLK(K+1,NW,1:naerkind)) & 296 + DHAZES_T(K,NW) 297 298 ctemp(L,NW) = btemp(L,NW) + 0.9999*(TRAY(K,NW) + TRAY(K+1,NW)) 291 + DHAZES_T(K,NW) + DHAZES_T(K+1,NW) 292 ctemp(L,NW) = btemp(L,NW) + 0.9999*(TRAY(K,NW) + TRAY(K+1,NW)) ! JVO 2017 : does this 0.999 is really meaningful ? 299 293 btemp(L,NW) = btemp(L,NW) + TRAY(K,NW) + TRAY(K+1,NW) 300 294 COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW) 301 295 END DO ! L vertical loop 302 296 303 !last level 304 L = L_NLAYRAD 305 K = 2*L+1 306 297 ! Last level 298 L = L_NLAYRAD 299 K = 2*L+1 307 300 atemp(L,NW) = SUM(GVAER(K,NW,1:naerkind) * TAUAEROLK(K,NW,1:naerkind)) & 308 301 + ASF_T(K,NW)*DHAZES_T(K,NW) 309 302 btemp(L,NW) = SUM(TAUAEROLK(K,NW,1:naerkind)) & 310 303 + DHAZES_T(K,NW) 311 ctemp(L,NW) = btemp(L,NW) + 0.9999*TRAY(K,NW) 304 ctemp(L,NW) = btemp(L,NW) + 0.9999*TRAY(K,NW) ! JVO 2017 : does this 0.999 is really meaningful ? 312 305 btemp(L,NW) = btemp(L,NW) + TRAY(K,NW) 313 306 COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW) … … 316 309 END DO ! NW spectral loop 317 310 318 ! ===========================================================================================319 320 311 DO NG=1,L_NGAUSS 321 312 DO NW=1,L_NSPECTV … … 328 319 END DO ! L vertical loop 329 320 330 ! No vertical averaging on bottom layer321 ! Last level 331 322 332 323 L = L_NLAYRAD … … 356 347 357 348 358 ! Titan's outputs (J .V.O, 2016)===============================================349 ! Titan's outputs (JVO, 2016)=============================================== 359 350 ! do l=1,L_NLAYRAD 360 351 ! do nw=1,L_NSPECTV -
trunk/LMDZ.TITAN/libf/phytitan/phyetat0_mod.F90
r1670 r1722 10 10 emis,q2,qsurf) 11 11 12 ! to use 'getin_p' 13 use ioipsl_getin_p_mod, only: getin_p 12 14 13 15 use tabfi_mod, only: tabfi … … 17 19 get_field, get_var, inquire_field, & 18 20 inquire_dimension, inquire_dimension_length 21 use callkeys_mod, only: surfalbedo,surfemis 19 22 20 23 implicit none … … 106 109 endif 107 110 else 108 phisfi(:)=0 111 phisfi(:)=0. 109 112 endif ! of if (startphy_file) 110 113 write(*,*) "phyetat0: surface geopotential <phisfi> range:", & … … 118 121 endif 119 122 else 120 albedodat(:)=0.5 ! would be better to read value from def file... 123 ! If no startfi file, use parameter surfalbedo in def file 124 surfalbedo=0.5 125 call getin_p("surfalbedo",surfalbedo) 126 print*,"surfalbedo",surfalbedo 127 albedodat(:)=surfalbedo 121 128 endif ! of if (startphy_file) 122 129 write(*,*) "phyetat0: Bare ground albedo <albedodat> range:", & … … 130 137 endif 131 138 else 132 zmea(:)=0 139 zmea(:)=0. 133 140 endif ! of if (startphy_file) 134 141 write(*,*) "phyetat0: <ZMEA> range:", & … … 142 149 endif 143 150 else 144 zstd(:)=0 151 zstd(:)=0. 145 152 endif ! of if (startphy_file) 146 153 write(*,*) "phyetat0: <ZSTD> range:", & … … 154 161 endif 155 162 else 156 zsig(:)=0 163 zsig(:)=0. 157 164 endif ! of if (startphy_file) 158 165 write(*,*) "phyetat0: <ZSIG> range:", & … … 166 173 endif 167 174 else 168 zgam(:)=0 175 zgam(:)=0. 169 176 endif ! of if (startphy_file) 170 177 write(*,*) "phyetat0: <ZGAM> range:", & … … 178 185 endif 179 186 else 180 zthe(:)=0 187 zthe(:)=0. 181 188 endif ! of if (startphy_file) 182 189 write(*,*) "phyetat0: <ZTHE> range:", & … … 190 197 endif 191 198 else 192 tsurf(:)=0 ! will be updated afterwards in physiq !199 tsurf(:)=0. ! will be updated afterwards in physiq ! 193 200 endif ! of if (startphy_file) 194 201 write(*,*) "phyetat0: Surface temperature <tsurf> range:", & … … 202 209 endif 203 210 else 204 emis(:)=1 ! would be better to read value from def file... 211 ! If no startfi file, use parameter surfemis in def file 212 surfemis=1.0 213 call getin_p("surfemis",surfemis) 214 print*,"surfemis",surfemis 215 emis(:)=surfemis 205 216 endif ! of if (startphy_file) 206 217 write(*,*) "phyetat0: Surface emissivity <emis> range:", & … … 214 225 endif 215 226 else 216 q2(:,:)=0 227 q2(:,:)=0. 217 228 endif ! of if (startphy_file) 218 229 write(*,*) "phyetat0: PBL wind variance <q2> range:", & … … 231 242 endif 232 243 else 233 qsurf(:,iq)=0 244 qsurf(:,iq)=0. 234 245 endif ! of if (startphy_file) 235 246 write(*,*) "phyetat0: Surface tracer <",trim(txt),"> range:", & -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r1672 r1722 1186 1186 if(callsoil)then 1187 1187 TsS = SUM(cell_area(:)*tsoil(:,nsoilmx))/totarea ! mean temperature at bottom soil layer 1188 print*,' ave[Tsurf] min[Tsurf] max[Tsurf] ave[Tdeep]' 1189 print*,Ts1,Ts2,Ts3,TsS 1188 if (is_master) then 1189 print*,' ave[Tsurf] min[Tsurf] max[Tsurf] ave[Tdeep]' 1190 print*,Ts1,Ts2,Ts3,TsS 1191 end if 1190 1192 else 1191 1192 print*,' ave[Tsurf] min[Tsurf]max[Tsurf]'1193 if (is_master) then 1194 print*,' ave[Tsurf] min[Tsurf] max[Tsurf]' 1193 1195 print*,Ts1,Ts2,Ts3 1194 1196 endif … … 1279 1281 1280 1282 1281 print*,'--> Ls =',zls*180./pi1283 if (is_master) print*,'--> Ls =',zls*180./pi 1282 1284 1283 1285 -
trunk/LMDZ.TITAN/libf/phytitan/radcommon_h.F90
r1648 r1722 7 7 ! 8 8 ! radcommon.h 9 ! v9 ! 10 10 !----------------------------------------------------------------------C 11 11 ! … … 130 130 real*8,save :: gweight(L_NGAUSS) 131 131 !$OMP THREADPRIVATE(QREFvis,QREFir,omegaREFvis,omegaREFir,& ! gweight read by master in sugas_corrk 132 !$OMP tstellar,planckir,PTOP ,TAUREF)132 !$OMP tstellar,planckir,PTOP) 133 133 134 134 ! If the gas optical depth (top to the surface) is less than … … 154 154 !$OMP THREADPRIVATE(glat,eclipse) 155 155 156 contains157 158 subroutine ini_radcommon_h159 use radinc_h, only: L_LEVELS160 implicit none161 162 allocate(TAUREF(L_LEVELS+1))163 164 end subroutine ini_radcommon_h165 166 156 end module radcommon_h -
trunk/LMDZ.TITAN/libf/phytitan/wstats.F90
r1565 r1722 219 219 start=(/1,1,indx,0/) 220 220 if (klon_glo>1) then !general case 221 sizes=(/nbp_lon+1,nbp_l ev,1,0/)221 sizes=(/nbp_lon+1,nbp_lat,1,0/) 222 222 else 223 223 sizes=(/1,1,1,0/)
Note: See TracChangeset
for help on using the changeset viewer.