Changeset 3756 for LMDZ6/trunk/libf/phylmd/radlwsw_m.F90
- Timestamp:
- Jul 10, 2020, 11:50:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/radlwsw_m.F90
r3666 r3756 26 26 heat,heat0,cool,cool0,albpla,& 27 27 heat_volc, cool_volc,& 28 topsw,toplw,solsw,sol lw,&28 topsw,toplw,solsw,solswfdiff,sollw,& 29 29 sollwdown,& 30 30 topsw0,toplw0,solsw0,sollw0,& … … 117 117 ! toplw----output-R- ray. IR montant au sommet de l'atmosphere 118 118 ! solsw----output-R- flux solaire net a la surface 119 ! solswfdiff----output-R- fraction de rayonnement diffus pour le flux solaire descendant a la surface 119 120 ! sollw----output-R- ray. IR montant a la surface 120 121 ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) … … 188 189 REAL, INTENT(in) :: tsol(KLON) 189 190 REAL, INTENT(in) :: alb_dir(KLON,NSW),alb_dif(KLON,NSW) 190 real, intent(in) :: SFRWL(6)191 REAL, INTENT(in) :: SFRWL(6) 191 192 !albedo SB <<< 192 193 REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) … … 235 236 REAL, INTENT(out) :: heat_volc(KLON,KLEV), cool_volc(KLON,KLEV) !NL 236 237 REAL, INTENT(out) :: topsw(KLON), toplw(KLON) 237 REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON) 238 REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON) 238 239 REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) 239 240 REAL, INTENT(out) :: sollwdown(KLON) … … 286 287 REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) 287 288 288 real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone289 REAL(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone 289 290 ! "POZON(:, :, 1)" is for the average day-night field, 290 291 ! "POZON(:, :, 2)" is for daylight time. … … 302 303 REAL(KIND=8) zheat_volc(kdlon,kflev), zcool_volc(kdlon,kflev) !NL 303 304 REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) 304 REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon) 305 REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon), zsolswfdiff(kdlon) 305 306 REAL(KIND=8) zsollwdown(kdlon) 306 307 REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) … … 329 330 !MPL input supplementaires pour RECMWFL 330 331 ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) 331 332 REAL(KIND=8) GEMU(klon) 332 333 !MPL input RECMWFL: 333 334 ! Tableaux aux niveaux inverses pour respecter convention Arpege 334 335 335 REAL(KIND=8) ref_liq_i(klon,klev) ! cloud droplet radius present-day from newmicro (inverted) 336 REAL(KIND=8) ref_ice_i(klon,klev) ! ice crystal radius present-day from newmicro (inverted) 336 337 !--OB 337 338 338 REAL(KIND=8) ref_liq_pi_i(klon,klev) ! cloud droplet radius pre-industrial from newmicro (inverted) 339 REAL(KIND=8) ref_ice_pi_i(klon,klev) ! ice crystal radius pre-industrial from newmicro (inverted) 339 340 !--end OB 340 341 342 343 341 REAL(KIND=8) paprs_i(klon,klev+1) 342 REAL(KIND=8) pplay_i(klon,klev) 343 REAL(KIND=8) cldfra_i(klon,klev) 344 REAL(KIND=8) POZON_i(kdlon,kflev, size(wo, 3)) ! mass fraction of ozone 344 345 ! "POZON(:, :, 1)" is for the average day-night field, 345 346 ! "POZON(:, :, 2)" is for daylight time. 346 347 !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 347 348 349 350 348 REAL(KIND=8) PAER_i(kdlon,kflev,6) 349 REAL(KIND=8) PDP_i(klon,klev) 350 REAL(KIND=8) t_i(klon,klev),q_i(klon,klev),qsat_i(klon,klev) 351 REAL(KIND=8) flwc_i(klon,klev),fiwc_i(klon,klev) 351 352 !MPL output RECMWFL: 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 353 REAL(KIND=8) ZEMTD (klon,klev+1),ZEMTD_i (klon,klev+1) 354 REAL(KIND=8) ZEMTU (klon,klev+1),ZEMTU_i (klon,klev+1) 355 REAL(KIND=8) ZTRSO (klon,klev+1),ZTRSO_i (klon,klev+1) 356 REAL(KIND=8) ZTH (klon,klev+1),ZTH_i (klon,klev+1) 357 REAL(KIND=8) ZCTRSO(klon,2) 358 REAL(KIND=8) ZCEMTR(klon,2) 359 REAL(KIND=8) ZTRSOD(klon) 360 REAL(KIND=8) ZLWFC (klon,2) 361 REAL(KIND=8) ZLWFT (klon,klev+1),ZLWFT_i (klon,klev+1) 362 REAL(KIND=8) ZSWFC (klon,2) 363 REAL(KIND=8) ZSWFT (klon,klev+1),ZSWFT_i (klon,klev+1) 364 REAL(KIND=8) ZFLUCDWN_i(klon,klev+1),ZFLUCUP_i(klon,klev+1) 365 REAL(KIND=8) PPIZA_TOT(klon,klev,NSW) 366 REAL(KIND=8) PCGA_TOT(klon,klev,NSW) 367 REAL(KIND=8) PTAU_TOT(klon,klev,NSW) 368 REAL(KIND=8) PPIZA_NAT(klon,klev,NSW) 369 REAL(KIND=8) PCGA_NAT(klon,klev,NSW) 370 REAL(KIND=8) PTAU_NAT(klon,klev,NSW) 370 371 #ifdef CPP_RRTM 371 372 372 REAL(KIND=8) PTAU_LW_TOT(klon,klev,NLW) 373 REAL(KIND=8) PTAU_LW_NAT(klon,klev,NLW) 373 374 #endif 374 375 376 377 375 REAL(KIND=8) PSFSWDIR(klon,NSW) 376 REAL(KIND=8) PSFSWDIF(klon,NSW) 377 REAL(KIND=8) PFSDNN(klon) 378 REAL(KIND=8) PFSDNV(klon) 378 379 !MPL On ne redefinit pas les tableaux ZFLUX,ZFLUC, 379 380 !MPL ZFSDWN,ZFCDWN,ZFSUP,ZFCUP car ils existent deja 380 381 !MPL sous les noms de ZFLDN,ZFLDN0,ZFLUP,ZFLUP0, 381 382 !MPL ZFSDN,ZFSDN0,ZFSUP,ZFSUP0 382 383 384 385 386 387 388 389 390 391 383 REAL(KIND=8) ZFLUX_i (klon,2,klev+1) 384 REAL(KIND=8) ZFLUC_i (klon,2,klev+1) 385 REAL(KIND=8) ZFSDWN_i (klon,klev+1) 386 REAL(KIND=8) ZFCDWN_i (klon,klev+1) 387 REAL(KIND=8) ZFCCDWN_i (klon,klev+1) 388 REAL(KIND=8) ZFSUP_i (klon,klev+1) 389 REAL(KIND=8) ZFCUP_i (klon,klev+1) 390 REAL(KIND=8) ZFCCUP_i (klon,klev+1) 391 REAL(KIND=8) ZFLCCDWN_i (klon,klev+1) 392 REAL(KIND=8) ZFLCCUP_i (klon,klev+1) 392 393 ! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412) 393 394 ! REAL(KIND=8) RSUN(3,2) 394 395 ! REAL(KIND=8) SUN(3) 395 396 ! REAL(KIND=8) SUN_FRACT(2) 396 real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2397 REAL, PARAMETER:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 397 398 CHARACTER (LEN=80) :: abort_message 398 399 CHARACTER (LEN=80) :: modname='radlwsw_m' 399 400 400 call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") 401 REAL zdir, zdif 402 403 CALL assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") 401 404 ! initialisation 402 405 ist=1 … … 414 417 zsolsw0_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 415 418 416 417 ZTOPSWADAERO(:) = 0. !ym missing init 418 ZSOLSWADAERO(:) = 0. !ym missing init 419 ZTOPSWAD0AERO(:) = 0. !ym missing init 420 ZSOLSWAD0AERO(:) = 0. !ym missing init 421 ZTOPSWAIAERO(:) = 0. !ym missing init 422 ZSOLSWAIAERO(:) = 0. !ym missing init 423 ZTOPSWCF_AERO(:,:)= 0.!ym missing init 424 ZSOLSWCF_AERO(:,:) =0. !ym missing init 419 ZTOPSWADAERO(:) = 0. !ym missing init 420 ZSOLSWADAERO(:) = 0. !ym missing init 421 ZTOPSWAD0AERO(:) = 0. !ym missing init 422 ZSOLSWAD0AERO(:) = 0. !ym missing init 423 ZTOPSWAIAERO(:) = 0. !ym missing init 424 ZSOLSWAIAERO(:) = 0. !ym missing init 425 ZTOPSWCF_AERO(:,:)= 0.!ym missing init 426 ZSOLSWCF_AERO(:,:) =0. !ym missing init 425 427 426 428 ! … … 454 456 #ifdef REPROBUS 455 457 IF (iflag_rrtm==0) THEN 456 if(ok_SUNTIME) PSCT = solaireTIME/zdist/zdist458 IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist 457 459 print*,'Constante solaire: ',PSCT*zdist*zdist 458 END 460 ENDIF 459 461 #endif 460 END 462 ENDIF 461 463 462 464 DO j = 1, nb_gr … … 541 543 CALL RAD_INTERACTIF(POZON,iof) 542 544 #endif 543 END IF 544 545 ENDIF 545 546 ! 546 547 DO k = 1, kflev+1 … … 568 569 ENDDO 569 570 ENDDO 570 571 571 ! 572 572 !===== iflag_rrtm ================================================ 573 573 ! 574 574 IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm 575 ! 575 576 !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- 576 577 DO k = 1, kflev+1 … … 651 652 zsolswaiaero(i)=0. 652 653 ENDDO 654 655 !--fraction of diffuse radiation in surface SW downward radiation 656 !--not computed with old radiation scheme 657 zsolswfdiff(:) = -999.999 658 653 659 ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract 654 660 ! daylight ozone, if we have it, for short wave … … 676 682 DO i=1,kdlon 677 683 DO k=1,kflev+1 678 ! print *,'iof i k klon klev=',iof,i,k,klon,klev679 684 lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) 680 685 lwdn ( iof+i,k) = ZFLDN ( i,k) … … 687 692 ENDDO 688 693 ENDDO 689 ! print*,'SW_AR4 ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) 690 ! print*,'SW_AR4 swdn0 1 , klev:',swdn0(1:klon,1),swdn0(1:klon,klev) 691 ! print*,'SW_AR4 ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) 692 ! print*,'SW_AR4 swup0 1 , klev:',swup0(1:klon,1),swup0(1:klon,klev) 693 ! print*,'SW_AR4 ZFSDN 1 , klev:',ZFSDN(1:klon,1) ,ZFSDN(1:klon,klev) 694 ! print*,'SW_AR4 ZFSUP 1 , klev:',ZFSUP(1:klon,1) ,ZFSUP(1:klon,klev) 694 ! 695 695 ELSE 696 696 #ifdef CPP_RRTM … … 700 700 DO k = 1, kflev+1 701 701 DO i = 1, kdlon 702 ZEMTD_i(i,k)=0.703 ZEMTU_i(i,k)=0.704 ZTRSO_i(i,k)=0.705 ZTH_i(i,k)=0.706 ZLWFT_i(i,k)=0.707 ZSWFT_i(i,k)=0.708 ZFLUX_i(i,1,k)=0.709 ZFLUX_i(i,2,k)=0.710 ZFLUC_i(i,1,k)=0.711 ZFLUC_i(i,2,k)=0.712 ZFSDWN_i(i,k)=0.713 ZFCDWN_i(i,k)=0.714 ZFCCDWN_i(i,k)=0.715 ZFSUP_i(i,k)=0.716 ZFCUP_i(i,k)=0.717 ZFCCUP_i(i,k)=0.718 ZFLCCDWN_i(i,k)=0.719 ZFLCCUP_i(i,k)=0.702 ZEMTD_i(i,k)=0. 703 ZEMTU_i(i,k)=0. 704 ZTRSO_i(i,k)=0. 705 ZTH_i(i,k)=0. 706 ZLWFT_i(i,k)=0. 707 ZSWFT_i(i,k)=0. 708 ZFLUX_i(i,1,k)=0. 709 ZFLUX_i(i,2,k)=0. 710 ZFLUC_i(i,1,k)=0. 711 ZFLUC_i(i,2,k)=0. 712 ZFSDWN_i(i,k)=0. 713 ZFCDWN_i(i,k)=0. 714 ZFCCDWN_i(i,k)=0. 715 ZFSUP_i(i,k)=0. 716 ZFCUP_i(i,k)=0. 717 ZFCCUP_i(i,k)=0. 718 ZFLCCDWN_i(i,k)=0. 719 ZFLCCUP_i(i,k)=0. 720 720 ENDDO 721 721 ENDDO … … 771 771 PFSDNV(i)=0. 772 772 DO kk = 1, NSW 773 PSFSWDIR(i,kk)=0.774 PSFSWDIF(i,kk)=0.773 PSFSWDIR(i,kk)=0. 774 PSFSWDIF(i,kk)=0. 775 775 ENDDO 776 776 ENDDO … … 779 779 ! On met les donnees dans l'ordre des niveaux arpege 780 780 paprs_i(:,1)=paprs(:,klev+1) 781 dok=1,klev781 DO k=1,klev 782 782 paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) 783 783 pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) … … 794 794 ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) 795 795 ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) 796 enddo797 dok=1,kflev796 ENDDO 797 DO k=1,kflev 798 798 POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) 799 799 !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top 800 800 ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) 801 801 !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 802 doi=1,6802 DO i=1,6 803 803 PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) 804 enddo805 enddo804 ENDDO 805 ENDDO 806 806 ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 807 807 … … 832 832 ! s 'RECMWF ') 833 833 ! 834 if(lldebug) then834 IF (lldebug) THEN 835 835 CALL writefield_phy('paprs_i',paprs_i,klev+1) 836 836 CALL writefield_phy('pplay_i',pplay_i,klev) … … 846 846 CALL writefield_phy('palbd_new',PALBD_NEW,NSW) 847 847 CALL writefield_phy('palbp_new',PALBP_NEW,NSW) 848 endif848 ENDIF 849 849 850 850 ! Nouvel appel a RECMWF (celui du cy32t0) … … 876 876 877 877 ! print *,'RADLWSW: apres RECMWF' 878 if(lldebug) then878 IF (lldebug) THEN 879 879 CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) 880 880 CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) … … 901 901 CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) 902 902 CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) 903 endif903 ENDIF 904 904 ! --------- output RECMWFL 905 905 ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY … … 952 952 ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1) 953 953 ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1) 954 IF (ok_volcan) THEN954 IF (ok_volcan) THEN 955 955 ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL 956 956 ENDIF … … 992 992 ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de 993 993 ! LW_LMDAR4 et SW_LMDAR4 994 995 !--fraction of diffuse radiation in surface SW downward radiation 996 DO i = 1, kdlon 997 IF (fract(i).GT.0.0) THEN 998 zdir=SUM(PSFSWDIR(i,:)) 999 zdif=SUM(PSFSWDIF(i,:)) 1000 zsolswfdiff(i) = zdif/(zdir+zdif) 1001 ELSE !--night 1002 zsolswfdiff(i) = 1.0 1003 ENDIF 1004 ENDDO 1005 ! 994 1006 DO i = 1, kdlon 995 1007 zsolsw(i) = ZSWFT(i,1) … … 1009 1021 ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) 1010 1022 ! 1011 1023 IF (fract(i) == 0.) THEN 1012 1024 !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 1013 1025 ! pas plus que dans le sw_AR4 … … 1030 1042 ! ZLWFT(klon,k),ZSWFT 1031 1043 1032 dok=1,kflev1033 doi=1,kdlon1044 DO k=1,kflev 1045 DO i=1,kdlon 1034 1046 zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) 1035 1047 zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) 1036 1048 zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) 1037 1049 zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) 1038 IF (ok_volcan) THEN1050 IF (ok_volcan) THEN 1039 1051 zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL 1040 1052 zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL … … 1043 1055 ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) 1044 1056 ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) 1045 enddo1046 enddo1057 ENDDO 1058 ENDDO 1047 1059 #else 1048 1060 abort_message="You should compile with -rrtm if running with iflag_rrtm=1" … … 1056 1068 toplw(iof+i) = ztoplw(i) 1057 1069 solsw(iof+i) = zsolsw(i) 1070 solswfdiff(iof+i) = zsolswfdiff(i) 1058 1071 sollw(iof+i) = zsollw(i) 1059 1072 sollwdown(iof+i) = zsollwdown(i)
Note: See TracChangeset
for help on using the changeset viewer.