Changeset 2133
- Timestamp:
- Apr 30, 2019, 10:34:11 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2131 r2133 1479 1479 1480 1480 == 29/04/2019 == JVO 1481 + Add diagnostics of optical thickness, i n 1D, if 'diagdtau' key is activated, it1481 + Add diagnostics of optical thickness, if 'diagdtau' key is activated, it 1482 1482 outputs dtaui/v(altitude) in diagfi.nc for every narrowband (could be done with one var 1483 1483 but would require to be able to have writediag in 5D) -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r2051 r2133 12 12 fluxabs_sw,fluxtop_dn, & 13 13 OLR_nu,OSR_nu, & 14 int_dtaui,int_dtauv, & 14 15 tau_col,cloudfrac,totcloudfrac, & 15 16 clearsky,firstcall,lastcall) … … 94 95 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 95 96 REAL,INTENT(OUT) :: totcloudfrac(ngrid) ! Column Fraction of clouds (%). 97 REAL,INTENT(OUT) :: int_dtaui(ngrid,nlayer,L_NSPECTI) ! VI optical thickness of layers within narrowbands for diags (). 98 REAL,INTENT(OUT) :: int_dtauv(ngrid,nlayer,L_NSPECTV) ! IR optical thickness of layers within narrowbands for diags (). 96 99 97 100 … … 925 928 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad(2))) 926 929 930 ! Optical thickness diagnostics (added by JVO) 931 if (diagdtau) then 932 do l=1,L_NLAYRAD 933 do nw=1,L_NSPECTV 934 int_dtauv(ig,l,nw) = 0.0d0 935 DO k=1,L_NGAUSS 936 int_dtauv(ig,l,nw)= int_dtauv(ig,l,nw) + dtauv(l,nw,k)*gweight(k) 937 ENDDO 938 enddo 939 do nw=1,L_NSPECTI 940 int_dtaui(ig,l,nw) = 0.0d0 941 DO k=1,L_NGAUSS 942 int_dtaui(ig,l,nw)= int_dtaui(ig,l,nw) + dtaui(l,nw,k)*gweight(k) 943 ENDDO 944 enddo 945 enddo 946 endif 947 927 948 928 949 !----------------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2131 r2133 331 331 call getin_p("diagdtau",diagdtau) 332 332 write(*,*)" diagdtau = ",diagdtau 333 ! sanity check334 if (diagdtau.and.(ngrid.ne.1)) then335 print*,"Diagnostic optical thickness can be output in 1D only !"336 print*,"Start again with diagdtau=.false."337 stop338 endif339 333 340 334 write(*,*)"Operate in kastprof mode?" -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r2131 r2133 11 11 use radinc_h, only: L_LEVELS, L_NLAYRAD, L_NSPECTI, L_NGAUSS, & 12 12 L_NLEVRAD, L_REFVAR, naerkind 13 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi,glat_ig ,gweight13 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi,glat_ig 14 14 use gases_h, only: gfrac, ngasmx, igas_N2, igas_He, igas_H2O, igas_H2 15 15 use comcstfi_mod, only: g, r, mugaz 16 use callkeys_mod, only: kastprof,continuum,graybody,H2Ocont_simple ,diagdtau16 use callkeys_mod, only: kastprof,continuum,graybody,H2Ocont_simple 17 17 implicit none 18 18 … … 25 25 ! and COSBAR. For each level it calculates TAU. 26 26 ! 27 ! TAU I(L,LW) is the cumulative optical depth at level L (or alternatively27 ! TAUCUMI(L,LW) is the cumulative optical depth at level L (or alternatively 28 28 ! at the *bottom* of layer L), LW is the spectral wavelength interval. 29 29 ! … … 83 83 real*8 dz(L_LEVELS) 84 84 !real*8 rho !! see test below 85 86 ! variables for diags of optical depth87 real *8 INT_DTAU(L_NLAYRAD,L_NSPECTI)88 character*2 str289 85 90 86 integer igas, jgas … … 454 450 ! call abort 455 451 456 457 ! Optical thickness for 1D diagnostics (added by JVO)458 if (diagdtau) then ! diagtau can be true only if 1D459 do l=1,L_NLAYRAD460 do nw=1,L_NSPECTI461 INT_DTAU(L,NW) = 0.0d+0462 DO NG=1,L_NGAUSS463 INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtaui(L,nw,ng)*gweight(NG)464 enddo465 enddo466 enddo467 do nw=1,L_NSPECTI468 write(str2,'(i2.2)') nw469 call writediagfi(1,'dtaui'//str2,'Layer optical thickness in IR band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))470 enddo471 endif472 473 474 475 452 end subroutine optci 476 453 -
trunk/LMDZ.GENERIC/libf/phystd/optcv.F90
r2131 r2133 10 10 11 11 use radinc_h, only: L_NLAYRAD, L_NLEVRAD, L_LEVELS, L_NSPECTV, L_NGAUSS, L_REFVAR, NAERKIND 12 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv,glat_ig ,gweight12 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv,glat_ig 13 13 use gases_h, only: gfrac, ngasmx, igas_H2, igas_H2O, igas_He, igas_N2 14 14 use comcstfi_mod, only: g, r, mugaz 15 use callkeys_mod, only: kastprof,continuum,graybody,H2Ocont_simple,callgasvis ,diagdtau15 use callkeys_mod, only: kastprof,continuum,graybody,H2Ocont_simple,callgasvis 16 16 17 17 implicit none … … 92 92 real*8 dz(L_LEVELS) 93 93 94 ! variables for diags of optical depth95 real*8 INT_DTAU(L_NLAYRAD,L_NSPECTV)96 character*2 str297 94 98 95 integer igas, jgas … … 379 376 380 377 381 ! Optical thickness for 1D diagnostics (added by JVO)382 if (diagdtau) then ! diagtau can be true only if 1D383 do l=1,L_NLAYRAD384 do nw=1,L_NSPECTV385 INT_DTAU(L,NW) = 0.0d+0386 DO NG=1,L_NGAUSS387 INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtauv(L,nw,ng)*gweight(NG)388 enddo389 enddo390 enddo391 do nw=1,L_NSPECTV392 write(str2,'(i2.2)') nw393 call writediagfi(1,'dtauv'//str2,'Layer optical thickness in VI band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))394 enddo395 endif396 378 397 379 -
trunk/LMDZ.GENERIC/libf/phystd/phys_state_var_mod.F90
r1883 r2133 64 64 !real,dimension(:),allocatable,save :: sensibFlux ! Turbulent flux given by the atmosphere to the surface (W.m-2). 65 65 !$OMP THREADPRIVATE(OLR_nu,OSR_nu,zdtlw,zdtsw) 66 67 real,dimension(:,:,:),allocatable,save :: int_dtauv ! VI optical thickness of layers within narrowbands for diags (). 68 real,dimension(:,:,:),allocatable,save :: int_dtaui ! IR optical thickness of layers within narrowbands for diags (). 69 !$OMP THREADPRIVATE(int_dtaui,int_dtauv) 66 70 67 71 real,allocatable,dimension(:),save :: tau_col ! Total Aerosol Optical Depth. … … 146 150 ALLOCATE(OLR_nu(klon,L_NSPECTI)) 147 151 ALLOCATE(OSR_nu(klon,L_NSPECTV)) 152 ALLOCATE(int_dtaui(klon,klev,L_NSPECTI)) 153 ALLOCATE(int_dtauv(klon,klev,L_NSPECTV)) 148 154 ALLOCATE(sensibFlux(klon)) 149 155 ALLOCATE(zdtlw(klon,klev)) … … 217 223 DEALLOCATE(OLR_nu) 218 224 DEALLOCATE(OSR_nu) 225 DEALLOCATE(int_dtaui) 226 DEALLOCATE(int_dtauv) 219 227 DEALLOCATE(sensibFlux) 220 228 DEALLOCATE(zdtlw) -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2132 r2133 412 412 real tau_col1(ngrid) ! For aerosol optical depth diagnostic. 413 413 real OLR_nu1(ngrid,L_NSPECTI), OSR_nu1(ngrid,L_NSPECTV) ! For Outgoing Radiation diagnostics. 414 real int_dtaui1(ngrid,nlayer,L_NSPECTI),int_dtauv1(ngrid,nlayer,L_NSPECTV) ! For optical thickness diagnostics. 414 415 real tf, ntf 415 416 … … 435 436 #endif 436 437 438 ! Misc 439 character*2 :: str2 437 440 !================================================================================================== 438 441 … … 901 904 fluxsurfabs_sw,fluxtop_lw, & 902 905 fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu, & 906 int_dtaui,int_dtauv, & 903 907 tau_col,cloudfrac,totcloudfrac, & 904 908 clearsky,firstcall,lastcall) … … 915 919 fluxsurfabs_sw1,fluxtop_lw1, & 916 920 fluxabs_sw1,fluxtop_dn,OLR_nu1,OSR_nu1, & 921 int_dtaui1,int_dtauv1, & 917 922 tau_col1,cloudfrac,totcloudfrac, & 918 923 clearsky,firstcall,lastcall) … … 936 941 OSR_nu(ig,1:L_NSPECTV) = ntf*OSR_nu1(ig,1:L_NSPECTV) + tf*OSR_nu(ig,1:L_NSPECTV) 937 942 OLR_nu(ig,1:L_NSPECTI) = ntf*OLR_nu1(ig,1:L_NSPECTI) + tf*OLR_nu(ig,1:L_NSPECTI) 943 int_dtauv(ig,:,1:L_NSPECTV) = ntf*int_dtauv1(ig,:,1:L_NSPECTV) + tf*int_dtauv(ig,:,1:L_NSPECTV) 944 int_dtaui(ig,:,1:L_NSPECTI) = ntf*int_dtaui1(ig,:,1:L_NSPECTI) + tf*int_dtaui(ig,:,1:L_NSPECTI) 938 945 enddo 939 946 … … 2186 2193 endif ! end of 'enertest' 2187 2194 2195 ! Diagnostics of optical thickness 2196 if (diagdtau) then 2197 do nw=1,L_NSPECTV 2198 write(str2,'(i2.2)') nw 2199 call writediagfi(ngrid,'dtauv'//str2,'Layer optical thickness in VI band '//str2,'',1,int_dtauv(:,nlayer:1:-1,nw)) 2200 enddo 2201 do nw=1,L_NSPECTI 2202 write(str2,'(i2.2)') nw 2203 call writediagfi(ngrid,'dtaui'//str2,'Layer optical thickness in IR band '//str2,'',1,int_dtaui(:,nlayer:1:-1,nw)) 2204 enddo 2205 endif 2206 2188 2207 2189 2208 ! Temporary inclusions for heating diagnostics. -
trunk/LMDZ.GENERIC/libf/phystd/radcommon_h.F90
r2033 r2133 1 1 module radcommon_h 2 use radinc_h, only: L_NSPECTI, L_NSPECTV, L_NGAUSS,NTstar, NTstop, &2 use radinc_h, only: L_NSPECTI, L_NSPECTV, NTstar, NTstop, & 3 3 naerkind, nsizemax 4 4 implicit none -
trunk/LMDZ.TITAN/README
r2131 r2133 1559 1559 1560 1560 == 29/04/2019 == JVO 1561 + Add diagnostics of optical thickness, i n 1D, if 'diagdtau' key is activated, it1561 + Add diagnostics of optical thickness, if 'diagdtau' key is activated, it 1562 1562 outputs dtaui/v(altitude) in diagfi.nc for every narrowband (could be done with one var 1563 1563 but would require to be able to have writediag in 5D) -
trunk/LMDZ.TITAN/libf/phytitan/callcorrk.F90
r2050 r2133 6 6 fluxabs_sw,fluxtop_dn, & 7 7 OLR_nu,OSR_nu, & 8 int_dtaui,int_dtauv, & 8 9 lastcall) 9 10 … … 16 17 use comcstfi_mod, only: pi, mugaz, cpp 17 18 use callkeys_mod, only: diurnal,tracer,seashaze,corrk_recombin, & 18 strictboundcorrk,specOLR 19 strictboundcorrk,specOLR,diagdtau 19 20 use geometry_mod, only: latitude 20 21 … … 74 75 REAL,INTENT(OUT) :: OSR_nu(ngrid,L_NSPECTV) ! Outgoing SW radition in each band (Normalized to the band width (W/m2/cm-1). 75 76 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 77 REAL,INTENT(OUT) :: int_dtaui(ngrid,nlayer,L_NSPECTI) ! VI optical thickness of layers within narrowbands for diags (). 78 REAL,INTENT(OUT) :: int_dtauv(ngrid,nlayer,L_NSPECTV) ! IR optical thickness of layers within narrowbands for diags (). 76 79 77 80 … … 534 537 535 538 539 ! Optical thickness diagnostics (added by JVO) 540 if (diagdtau) then 541 do l=1,L_NLAYRAD 542 do nw=1,L_NSPECTV 543 int_dtauv(ig,l,nw) = 0.0d0 544 DO k=1,L_NGAUSS 545 int_dtauv(ig,l,nw)= int_dtauv(ig,l,nw) + dtauv(l,nw,k)*gweight(k) 546 ENDDO 547 enddo 548 do nw=1,L_NSPECTI 549 int_dtaui(ig,l,nw) = 0.0d0 550 DO k=1,L_NGAUSS 551 int_dtaui(ig,l,nw)= int_dtaui(ig,l,nw) + dtaui(l,nw,k)*gweight(k) 552 ENDDO 553 enddo 554 enddo 555 endif 556 557 536 558 !----------------------------------------------------------------------- 537 559 end do ! End of big loop over every GCM column. 538 560 !----------------------------------------------------------------------- 539 540 561 541 562 -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
r2131 r2133 341 341 call getin_p("diagdtau",diagdtau) 342 342 write(*,*)" diagdtau = ",diagdtau 343 ! sanity check344 if (diagdtau.and.(ngrid.ne.1)) then345 print*,"Diagnostic optical thickness can be output in 1D only !"346 print*,"Start again with diagdtau=.false."347 stop348 endif349 350 343 351 344 write(*,*)"Uniform absorption in radiative transfer?" -
trunk/LMDZ.TITAN/libf/phytitan/optci.F90
r2131 r2133 4 4 use radinc_h 5 5 use radcommon_h, only: gasi,gasi_recomb,tlimit,Cmk,gzlat_ig, & 6 tgasref,pfgasref,wnoi,scalep,indi ,gweight6 tgasref,pfgasref,wnoi,scalep,indi 7 7 use gases_h 8 8 use comcstfi_mod, only: r 9 use callkeys_mod, only: continuum,graybody,corrk_recombin, diagdtau,&9 use callkeys_mod, only: continuum,graybody,corrk_recombin, & 10 10 callclouds,callmufi,seashaze,uncoupl_optic_haze 11 11 use tracer_h, only : nmicro,nice 12 use MMP_OPTICS 12 13 13 14 implicit none … … 59 60 real*8 SSA_T(L_LEVELS,L_NSPECTI) 60 61 real*8 ASF_T(L_LEVELS,L_NSPECTI) 61 real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI)62 63 CHARACTER*2 str264 62 ! ========================== 65 63 … … 409 407 ! ascending ray with angle theta = 0. 410 408 411 412 ! Optical thickness for 1D diagnostics (added by JVO)413 if (diagdtau) then ! diagtau can be true only if 1D414 do l=1,L_NLAYRAD415 do nw=1,L_NSPECTI416 INT_DTAU(L,NW) = 0.0d+0417 DO NG=1,L_NGAUSS418 INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtaui(L,nw,ng)*gweight(NG)419 enddo420 enddo421 enddo422 do nw=1,L_NSPECTI423 write(str2,'(i2.2)') nw424 call writediagfi(1,'dtaui'//str2,'Layer optical thickness in IR band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))425 enddo426 endif427 428 429 409 if(firstcall) firstcall = .false. 430 410 -
trunk/LMDZ.TITAN/libf/phytitan/optcv.F90
r2131 r2133 4 4 use radinc_h 5 5 use radcommon_h, only: gasv,gasv_recomb,tlimit,Cmk,gzlat_ig, & 6 tgasref,pfgasref,wnov,scalep,indv ,gweight6 tgasref,pfgasref,wnov,scalep,indv 7 7 use gases_h 8 8 use comcstfi_mod, only: r 9 use callkeys_mod, only: continuum,graybody,callgasvis,corrk_recombin, diagdtau,&9 use callkeys_mod, only: continuum,graybody,callgasvis,corrk_recombin, & 10 10 callclouds,callmufi,seashaze,uncoupl_optic_haze 11 11 use tracer_h, only: nmicro,nice … … 68 68 real*8 SSA_T(L_LEVELS,L_NSPECTI) 69 69 real*8 ASF_T(L_LEVELS,L_NSPECTI) 70 real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI)71 72 CHARACTER*2 str273 70 ! ========================== 74 71 … … 390 387 391 388 392 ! Optical thickness for 1D diagnostics (added by JVO)393 if (diagdtau) then ! diagtau can be true only if 1D394 do l=1,L_NLAYRAD395 do nw=1,L_NSPECTV396 INT_DTAU(L,NW) = 0.0d+0397 DO NG=1,L_NGAUSS398 INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtauv(L,nw,ng)*gweight(NG)399 enddo400 enddo401 enddo402 do nw=1,L_NSPECTV403 write(str2,'(i2.2)') nw404 call writediagfi(1,'dtauv'//str2,'Layer optical thickness in VI band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))405 enddo406 endif407 408 409 389 if(firstcall) firstcall = .false. 410 390 -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r2117 r2133 252 252 real,dimension(:,:),allocatable,save :: zdtsw ! SW heating tendencies (K/s). 253 253 real,dimension(:),allocatable,save :: sensibFlux ! Turbulent flux given by the atmosphere to the surface (W.m-2). 254 255 !$OMP THREADPRIVATE(fluxsurf_lw,fluxsurf_sw,fluxsurfabs_sw,fluxtop_lw,fluxabs_sw,fluxtop_dn,fluxdyn,OLR_nu,OSR_nu,& 256 257 !$OMP zdtlw,zdtsw,sensibFlux) 254 real,dimension(:,:,:),allocatable,save :: int_dtauv ! VI optical thickness of layers within narrowbands for diags (). 255 real,dimension(:,:,:),allocatable,save :: int_dtaui ! IR optical thickness of layers within narrowbands for diags (). 256 257 !$OMP THREADPRIVATE(fluxsurf_lw,fluxsurf_sw,fluxsurfabs_sw,fluxtop_lw,fluxabs_sw,fluxtop_dn,fluxdyn,OLR_nu,OSR_nu,& 258 !$OMP zdtlw,zdtsw,sensibFlux,int_dtauv,int_dtaui)) 258 259 259 260 real zls ! Solar longitude (radians). … … 368 369 character(len=10) :: tmp1 369 370 character(len=10) :: tmp2 371 372 character*2 :: str2 370 373 371 374 ! Local variables for Titan chemistry and microphysics … … 468 471 ALLOCATE(zdtlw(ngrid,nlayer)) 469 472 ALLOCATE(zdtsw(ngrid,nlayer)) 473 ALLOCATE(int_dtaui(ngrid,nlayer,L_NSPECTI)) 474 ALLOCATE(int_dtauv(ngrid,nlayer,L_NSPECTV)) 470 475 471 476 ! This is defined in comsaison_h … … 501 506 call sugas_corrk ! Set up gaseous absorption properties. 502 507 503 OLR_nu(:,:) = 0. 504 OSR_nu(:,:) = 0. 508 OLR_nu(:,:) = 0.D0 509 OSR_nu(:,:) = 0.D0 510 511 int_dtaui(:,:,:) = 0.D0 512 int_dtauv(:,:,:) = 0.D0 505 513 506 514 endif … … 855 863 fluxsurfabs_sw,fluxtop_lw, & 856 864 fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu, & 857 lastcall)865 int_dtaui,int_dtauv,lastcall) 858 866 859 867 ! Radiative flux from the sky absorbed by the surface (W.m-2). … … 1509 1517 1510 1518 endif ! end of 'enertest' 1519 1520 ! Diagnostics of optical thickness 1521 if (diagdtau) then 1522 do nw=1,L_NSPECTV 1523 write(str2,'(i2.2)') nw 1524 call writediagfi(ngrid,'dtauv'//str2,'Layer optical thickness in VI band '//str2,'',1,int_dtauv(:,nlayer:1:-1,nw)) 1525 enddo 1526 do nw=1,L_NSPECTI 1527 write(str2,'(i2.2)') nw 1528 call writediagfi(ngrid,'dtaui'//str2,'Layer optical thickness in IR band '//str2,'',1,int_dtaui(:,nlayer:1:-1,nw)) 1529 enddo 1530 endif 1511 1531 1512 1532 ! Temporary inclusions for winds diagnostics. -
trunk/LMDZ.TITAN/libf/phytitan/radcommon_h.F90
r2050 r2133 1 1 module radcommon_h 2 use radinc_h, only: L_NSPECTI, L_NSPECTV, L_NGAUSS,NTstar, NTstop2 use radinc_h, only: L_NSPECTI, L_NSPECTV, NTstar, NTstop 3 3 implicit none 4 4 … … 81 81 82 82 real*8,save :: PTOP 83 real*8,save,allocatable :: TAUREF(:)83 !$OMP THREADPRIVATE(tstellar,planckir,PTOP) 84 84 85 85 real*8,parameter :: UBARI = 0.5D0 86 87 !$OMP THREADPRIVATE(QREFvis,QREFir,omegaREFvis,omegaREFir,&88 !$OMP tstellar,planckir,PTOP)89 86 90 87 ! If the gas optical depth (top to the surface) is less than
Note: See TracChangeset
for help on using the changeset viewer.