- Timestamp:
- Jul 19, 2024, 5:41:58 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_lmd_ipsl_stats.F90
r3233 r5082 148 148 do ic = 1, ncol 149 149 pnorm_c = pnorm(:,ic,:) 150 where ((pnorm_c .lt.xmax) .and. (pmol.lt.xmax) .and. (pmol.gt.0.0 ))150 where ((pnorm_c<xmax) .and. (pmol<xmax) .and. (pmol> 0.0 )) 151 151 x3d_c = pnorm_c/pmol 152 152 elsewhere … … 247 247 ! c 0- Initializations 248 248 ! c ------------------------------------------------------- 249 if ( Nbins .lt.6) return249 if ( Nbins < 6) return 250 250 251 251 srbval(1) = S_att … … 275 275 do i = 1, Npoints 276 276 if (x(i,k,j) /= undef) then 277 if ((x(i,k,j) .gt.srbval_ext(ib-1)).and.(x(i,k,j).le.srbval_ext(ib))) &277 if ((x(i,k,j)>srbval_ext(ib-1)).and.(x(i,k,j)<=srbval_ext(ib))) & 278 278 cfad(i,ib,j) = cfad(i,ib,j) + 1.0 279 279 else … … 285 285 enddo 286 286 287 where (cfad .ne.undef) cfad = cfad / float(Ncolumns)287 where (cfad /= undef) cfad = cfad / float(Ncolumns) 288 288 289 289 ! c ------------------------------------------------------- … … 373 373 ! --------------------------------------------------------------- 374 374 375 if ( Ncat .ne.4 ) then375 if ( Ncat /= 4 ) then 376 376 print *,'Error in lmd_ipsl_stats.cosp_cldfrac, Ncat must be 4, not',Ncat 377 377 stop … … 423 423 424 424 ! cloud detection at subgrid-scale: 425 where ( (x(:,:,k) .gt.S_cld) .and. (x(:,:,k).ne.undef) )425 where ( (x(:,:,k)>S_cld) .and. (x(:,:,k)/= undef) ) 426 426 cldy(:,:,k)=1.0 427 427 elsewhere … … 430 430 431 431 ! number of usefull sub-columns: 432 where ( (x(:,:,k) .gt.S_att) .and. (x(:,:,k).ne.undef) )432 where ( (x(:,:,k)>S_att) .and. (x(:,:,k)/= undef) ) 433 433 srok(:,:,k)=1.0 434 434 elsewhere … … 513 513 ! Computation of the cloud fraction as a function of the temperature 514 514 ! instead of height, for ice,liquid and all clouds 515 if(srok(ip,ic,k) .gt.0.)then515 if(srok(ip,ic,k)>0.)then 516 516 do itemp=1,Ntemp 517 if( (tmp(ip,k) .ge.tempmod(itemp)).and.(tmp(ip,k).lt.tempmod(itemp+1)) )then517 if( (tmp(ip,k)>=tempmod(itemp)).and.(tmp(ip,k)<tempmod(itemp+1)) )then 518 518 lidarcldtempind(ip,itemp)=lidarcldtempind(ip,itemp)+1. 519 519 endif … … 521 521 endif 522 522 523 if(cldy(ip,ic,k) .eq.1.)then523 if(cldy(ip,ic,k)==1.)then 524 524 do itemp=1,Ntemp 525 if( (tmp(ip,k) .ge.tempmod(itemp)).and.(tmp(ip,k).lt.tempmod(itemp+1)) )then525 if( (tmp(ip,k)>=tempmod(itemp)).and.(tmp(ip,k)<tempmod(itemp+1)) )then 526 526 lidarcldtemp(ip,itemp,1)=lidarcldtemp(ip,itemp,1)+1. 527 527 endif … … 532 532 iz=1 533 533 p1 = pplay(ip,k) 534 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high clouds534 if ( p1>0. .and. p1<(440.*100.)) then ! high clouds 535 535 iz=3 536 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid clouds536 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid clouds 537 537 iz=2 538 538 endif … … 554 554 ! -- grid-box 3D cloud fraction 555 555 556 where ( nsub(:,:) .gt.0.0 )556 where ( nsub(:,:)>0.0 ) 557 557 lidarcld(:,:) = lidarcld(:,:)/nsub(:,:) 558 558 elsewhere … … 573 573 enddo 574 574 enddo 575 where ( nsublayer(:,:) .gt.0.0 )575 where ( nsublayer(:,:)>0.0 ) 576 576 cldlayer(:,:) = cldlayer(:,:)/nsublayer(:,:) 577 577 elsewhere … … 593 593 594 594 ! Avoid zero values 595 if( (cldy(i,ncol,nlev) .eq.1.) .and. (ATBperp(i,ncol,nlev).gt.0.) )then595 if( (cldy(i,ncol,nlev)==1.) .and. (ATBperp(i,ncol,nlev)>0.) )then 596 596 ! Computation of the ATBperp along the phase discrimination line 597 597 ATBperp_tmp = (ATB(i,ncol,nlev)**5)*alpha50 + (ATB(i,ncol,nlev)**4)*beta50 + & … … 604 604 !____________________________________________________________________________________________________ 605 605 ! 606 if( (ATBperp(i,ncol,nlev)-ATBperp_tmp) .ge.0. )then ! Ice clouds606 if( (ATBperp(i,ncol,nlev)-ATBperp_tmp)>=0. )then ! Ice clouds 607 607 ! ICE with temperature above 273,15°K = Liquid (false ice) 608 if(tmp(i,nlev) .gt.273.15)then ! Temperature above 273,15 K608 if(tmp(i,nlev)>273.15)then ! Temperature above 273,15 K 609 609 ! Liquid: False ice corrected by the temperature to Liquid 610 610 lidarcldphase(i,nlev,2)=lidarcldphase(i,nlev,2)+1. ! false ice detection ==> added to Liquid … … 613 613 ! to classify the phase cloud 614 614 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 615 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud615 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 616 616 cldlayphase(i,ncol,3,2) = 1. 617 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud617 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 618 618 cldlayphase(i,ncol,2,2) = 1. 619 619 else ! low cloud … … 621 621 endif 622 622 cldlayphase(i,ncol,4,5) = 1. ! tot cloud 623 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud623 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 624 624 cldlayphase(i,ncol,3,5) = 1. 625 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud625 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 626 626 cldlayphase(i,ncol,2,5) = 1. 627 627 else ! low cloud … … 634 634 tmpi(i,ncol,nlev)=tmp(i,nlev) 635 635 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 636 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud636 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 637 637 cldlayphase(i,ncol,3,1) = 1. 638 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud638 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 639 639 cldlayphase(i,ncol,2,1) = 1. 640 640 else ! low cloud … … 651 651 else ! Liquid clouds 652 652 ! Liquid with temperature above 231,15°K 653 if(tmp(i,nlev) .gt.231.15)then653 if(tmp(i,nlev)>231.15)then 654 654 lidarcldphase(i,nlev,2)=lidarcldphase(i,nlev,2)+1. 655 655 tmpl(i,ncol,nlev)=tmp(i,nlev) 656 656 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 657 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud657 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 658 658 cldlayphase(i,ncol,3,2) = 1. 659 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud659 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 660 660 cldlayphase(i,ncol,2,2) = 1. 661 661 else ! low cloud … … 670 670 ! to classify the phase cloud 671 671 cldlayphase(i,ncol,4,4) = 1. ! tot cloud 672 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud672 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 673 673 cldlayphase(i,ncol,3,4) = 1. 674 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud674 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 675 675 cldlayphase(i,ncol,2,4) = 1. 676 676 else ! low cloud … … 678 678 endif 679 679 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 680 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud680 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 681 681 cldlayphase(i,ncol,3,1) = 1. 682 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud682 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 683 683 cldlayphase(i,ncol,2,1) = 1. 684 684 else ! low cloud … … 702 702 p1 = pplay(i,nlev) 703 703 704 if( (cldy(i,ncol,nlev) .eq.1.) .and. (ATBperp(i,ncol,nlev).gt.0.) )then704 if( (cldy(i,ncol,nlev)==1.) .and. (ATBperp(i,ncol,nlev)>0.) )then 705 705 ! Phase discrimination line : ATBperp = ATB^5*alpha50 + ATB^4*beta50 + ATB^3*gamma50 + ATB^2*delta50 706 706 ! + ATB*epsilon50 + zeta50 … … 715 715 ! 716 716 ! ICE with temperature above 273,15°K = Liquid (false ice) 717 if( (ATBperp(i,ncol,nlev)-ATBperp_tmp) .ge.0. )then ! Ice clouds718 if(tmp(i,nlev) .gt.273.15)then717 if( (ATBperp(i,ncol,nlev)-ATBperp_tmp)>=0. )then ! Ice clouds 718 if(tmp(i,nlev)>273.15)then 719 719 lidarcldphase(i,nlev,2)=lidarcldphase(i,nlev,2)+1. ! false ice ==> liq 720 720 tmpl(i,ncol,nlev)=tmp(i,nlev) … … 722 722 723 723 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 724 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud724 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 725 725 cldlayphase(i,ncol,3,2) = 1. 726 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud726 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 727 727 cldlayphase(i,ncol,2,2) = 1. 728 728 else ! low cloud … … 731 731 732 732 cldlayphase(i,ncol,4,5) = 1. ! tot cloud 733 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud733 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 734 734 cldlayphase(i,ncol,3,5) = 1. 735 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud735 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 736 736 cldlayphase(i,ncol,2,5) = 1. 737 737 else ! low cloud … … 745 745 746 746 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 747 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud747 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 748 748 cldlayphase(i,ncol,3,1) = 1. 749 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud749 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 750 750 cldlayphase(i,ncol,2,1) = 1. 751 751 else ! low cloud … … 762 762 else 763 763 ! Liquid with temperature above 231,15°K 764 if(tmp(i,nlev) .gt.231.15)then764 if(tmp(i,nlev)>231.15)then 765 765 lidarcldphase(i,nlev,2)=lidarcldphase(i,nlev,2)+1. 766 766 tmpl(i,ncol,nlev)=tmp(i,nlev) 767 767 768 768 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 769 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud769 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 770 770 cldlayphase(i,ncol,3,2) = 1. 771 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud771 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 772 772 cldlayphase(i,ncol,2,2) = 1. 773 773 else ! low cloud … … 782 782 783 783 cldlayphase(i,ncol,4,4) = 1. ! tot cloud 784 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud784 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 785 785 cldlayphase(i,ncol,3,4) = 1. 786 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud786 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 787 787 cldlayphase(i,ncol,2,4) = 1. 788 788 else ! low cloud … … 791 791 792 792 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 793 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud793 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 794 794 cldlayphase(i,ncol,3,1) = 1. 795 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud795 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 796 796 cldlayphase(i,ncol,2,1) = 1. 797 797 else ! low cloud … … 805 805 806 806 ! Find the level of the highest cloud with SR>30 807 if(x(i,ncol,nlev) .gt.S_cld_att)then ! SR > 30.807 if(x(i,ncol,nlev)>S_cld_att)then ! SR > 30. 808 808 toplvlsat=nlev-1 809 809 goto 99 … … 821 821 !____________________________________________________________________________________________________ 822 822 ! 823 if(toplvlsat .ne.0)then823 if(toplvlsat/=0)then 824 824 do nlev=toplvlsat,1,-1 825 825 p1 = pplay(i,nlev) 826 if(cldy(i,ncol,nlev) .eq.1.)then826 if(cldy(i,ncol,nlev)==1.)then 827 827 lidarcldphase(i,nlev,3)=lidarcldphase(i,nlev,3)+1. 828 828 tmpu(i,ncol,nlev)=tmp(i,nlev) 829 829 830 830 cldlayphase(i,ncol,4,3) = 1. ! tot cloud 831 if ( p1 .gt.0. .and. p1.lt.(440.*100.)) then ! high cloud831 if ( p1>0. .and. p1<(440.*100.)) then ! high cloud 832 832 cldlayphase(i,ncol,3,3) = 1. 833 else if(p1 .ge.(440.*100.) .and. p1.lt.(680.*100.)) then ! mid cloud833 else if(p1>=(440.*100.) .and. p1<(680.*100.)) then ! mid cloud 834 834 cldlayphase(i,ncol,2,3) = 1. 835 835 else ! low cloud … … 857 857 ! of the occurrences 858 858 lidarcldphasetmp(:,:)=lidarcldphase(:,:,1)+lidarcldphase(:,:,2); 859 WHERE (lidarcldphasetmp(:,:) .gt.0.)859 WHERE (lidarcldphasetmp(:,:)> 0.) 860 860 lidarcldphase(:,:,6)=lidarcldphase(:,:,1)/lidarcldphasetmp(:,:) 861 861 ELSEWHERE … … 864 864 865 865 ! Compute Phase 3D Cloud Fraction 866 WHERE ( nsub(:,:) .gt.0.0 )866 WHERE ( nsub(:,:)>0.0 ) 867 867 lidarcldphase(:,:,1)=lidarcldphase(:,:,1)/nsub(:,:) 868 868 lidarcldphase(:,:,2)=lidarcldphase(:,:,2)/nsub(:,:) … … 899 899 ! Compute the Ice percentage in cloud = ice/(ice+liq) 900 900 cldlayerphasetmp(:,:)=cldlayerphase(:,:,1)+cldlayerphase(:,:,2) 901 WHERE (cldlayerphasetmp(:,:) .gt.0.)901 WHERE (cldlayerphasetmp(:,:)> 0.) 902 902 cldlayerphase(:,:,6)=cldlayerphase(:,:,1)/cldlayerphasetmp(:,:) 903 903 ELSEWHERE … … 906 906 907 907 do i=1,Nphase-1 908 WHERE ( cldlayerphasesum(:,:) .gt.0.0 )908 WHERE ( cldlayerphasesum(:,:)>0.0 ) 909 909 cldlayerphase(:,:,i) = (cldlayerphase(:,:,i)/cldlayerphasesum(:,:)) * cldlayer(:,:) 910 910 ENDWHERE … … 917 917 checkcldlayerphase2=0. 918 918 919 if (cldlayerphasesum(i,iz) .gt.0.0 )then919 if (cldlayerphasesum(i,iz)>0.0 )then 920 920 do ic=1,Nphase-3 921 921 checkcldlayerphase=checkcldlayerphase+cldlayerphase(i,iz,ic) 922 922 enddo 923 923 checkcldlayerphase2=cldlayer(i,iz)-checkcldlayerphase 924 if( (checkcldlayerphase2 .gt.0.01).or.(checkcldlayerphase2.lt.-0.01) ) print *, checkcldlayerphase,cldlayer(i,iz)924 if( (checkcldlayerphase2>0.01).or.(checkcldlayerphase2<-0.01) ) print *, checkcldlayerphase,cldlayer(i,iz) 925 925 926 926 endif … … 930 930 931 931 do i=1,Nphase-1 932 WHERE ( nsublayer(:,:) .eq.0.0 )932 WHERE ( nsublayer(:,:)==0.0 ) 933 933 cldlayerphase(:,:,i) = undef 934 934 ENDWHERE … … 942 942 do i=1,Npoints 943 943 do itemp=1,Ntemp 944 if(tmpi(i,ncol,nlev) .gt.0.)then945 if( (tmpi(i,ncol,nlev) .ge.tempmod(itemp)).and.(tmpi(i,ncol,nlev).lt.tempmod(itemp+1)) )then944 if(tmpi(i,ncol,nlev)>0.)then 945 if( (tmpi(i,ncol,nlev)>=tempmod(itemp)).and.(tmpi(i,ncol,nlev)<tempmod(itemp+1)) )then 946 946 lidarcldtemp(i,itemp,2)=lidarcldtemp(i,itemp,2)+1. 947 947 endif 948 elseif(tmpl(i,ncol,nlev) .gt.0.)then949 if( (tmpl(i,ncol,nlev) .ge.tempmod(itemp)).and.(tmpl(i,ncol,nlev).lt.tempmod(itemp+1)) )then948 elseif(tmpl(i,ncol,nlev)>0.)then 949 if( (tmpl(i,ncol,nlev)>=tempmod(itemp)).and.(tmpl(i,ncol,nlev)<tempmod(itemp+1)) )then 950 950 lidarcldtemp(i,itemp,3)=lidarcldtemp(i,itemp,3)+1. 951 951 endif 952 elseif(tmpu(i,ncol,nlev) .gt.0.)then953 if( (tmpu(i,ncol,nlev) .ge.tempmod(itemp)).and.(tmpu(i,ncol,nlev).lt.tempmod(itemp+1)) )then952 elseif(tmpu(i,ncol,nlev)>0.)then 953 if( (tmpu(i,ncol,nlev)>=tempmod(itemp)).and.(tmpu(i,ncol,nlev)<tempmod(itemp+1)) )then 954 954 lidarcldtemp(i,itemp,4)=lidarcldtemp(i,itemp,4)+1. 955 955 endif … … 965 965 checktemp=lidarcldtemp(i,itemp,2)+lidarcldtemp(i,itemp,3)+lidarcldtemp(i,itemp,4) 966 966 967 if(checktemp .NE.lidarcldtemp(i,itemp,1))then967 if(checktemp/=lidarcldtemp(i,itemp,1))then 968 968 print *, i,itemp 969 969 print *, lidarcldtemp(i,itemp,1:4) … … 984 984 985 985 do i=1,4 986 WHERE(lidarcldtempind(:,:) .gt.0.)986 WHERE(lidarcldtempind(:,:)>0.) 987 987 lidarcldtemp(:,:,i) = lidarcldtemp(:,:,i)/lidarcldtempind(:,:) 988 988 ELSEWHERE … … 1046 1046 do k=1,Nlevels 1047 1047 ! Cloud detection at subgrid-scale: 1048 where ( (x(:,:,k) .gt. S_cld) .and. (x(:,:,k) .ne.undef) )1048 where ( (x(:,:,k) > S_cld) .and. (x(:,:,k) /= undef) ) 1049 1049 cldy(:,:,k)=1.0 1050 1050 elsewhere … … 1052 1052 endwhere 1053 1053 ! Fully attenuated layer detection at subgrid-scale: 1054 where ( (x(:,:,k) .gt. 0.0) .and. (x(:,:,k) .lt. S_att_opaq) .and. (x(:,:,k) .ne.undef) )1054 where ( (x(:,:,k) > 0.0) .and. (x(:,:,k) < S_att_opaq) .and. (x(:,:,k) /= undef) ) 1055 1055 cldyopaq(:,:,k)=1.0 1056 1056 elsewhere … … 1059 1059 1060 1060 ! Number of useful sub-column layers: 1061 where ( (x(:,:,k) .gt. S_att) .and. (x(:,:,k) .ne.undef) )1061 where ( (x(:,:,k) > S_att) .and. (x(:,:,k) /= undef) ) 1062 1062 srok(:,:,k)=1.0 1063 1063 elsewhere … … 1065 1065 endwhere 1066 1066 ! Number of useful sub-columns layers for z_opaque 3D fraction: 1067 where ( (x(:,:,k) .gt. 0.0) .and. (x(:,:,k) .ne.undef) )1067 where ( (x(:,:,k) > 0.0) .and. (x(:,:,k) /= undef) ) 1068 1068 srokopaq(:,:,k)=1.0 1069 1069 elsewhere … … 1098 1098 1099 1099 ! Declaring non-opaque cloudy profiles as thin cloud profiles 1100 if ( (cldlay(ip,ic,4) .eq. 1.0) .and. (cldlay(ip,ic,1) .eq.0.0) ) then1100 if ( (cldlay(ip,ic,4) == 1.0) .and. (cldlay(ip,ic,1) == 0.0) ) then 1101 1101 cldlay(ip,ic,2) = 1.0 1102 1102 endif … … 1105 1105 1106 1106 ! Opaque cloud profiles 1107 if ( cldlay(ip,ic,1) .eq.1.0 ) then1107 if ( cldlay(ip,ic,1) == 1.0 ) then 1108 1108 zopac = 0.0 1109 1109 do k=2,Nlevels 1110 1110 ! Declaring opaque cloud fraction and z_opaque altitude for 3D and 2D variables 1111 if ( (cldy(ip,ic,k) .eq. 1.0) .and. (zopac .eq.0.0) ) then1111 if ( (cldy(ip,ic,k) == 1.0) .and. (zopac == 0.0) ) then 1112 1112 lidarcldtype(ip,k-1,3) = lidarcldtype(ip,k-1,3) + 1.0 1113 1113 cldlay(ip,ic,3) = vgrid_z(k-1) !z_opaque altitude … … 1115 1115 zopac = 1.0 1116 1116 endif 1117 if ( cldy(ip,ic,k) .eq.1.0 ) then1117 if ( cldy(ip,ic,k) == 1.0 ) then 1118 1118 lidarcldtype(ip,k,1) = lidarcldtype(ip,k,1) + 1.0 1119 1119 endif … … 1122 1122 1123 1123 ! Thin cloud profiles 1124 if ( cldlay(ip,ic,2) .eq.1.0 ) then1124 if ( cldlay(ip,ic,2) == 1.0 ) then 1125 1125 do k=1,Nlevels 1126 1126 ! Declaring thin cloud fraction for 3D variable 1127 if ( cldy(ip,ic,k) .eq.1.0 ) then1127 if ( cldy(ip,ic,k) == 1.0 ) then 1128 1128 lidarcldtype(ip,k,2) = lidarcldtype(ip,k,2) + 1.0 1129 1129 endif … … 1135 1135 1136 1136 ! 3D cloud types fraction (opaque=1 and thin=2) 1137 where ( nsub(:,:) .gt.0.0 )1137 where ( nsub(:,:) > 0.0 ) 1138 1138 lidarcldtype(:,:,1) = lidarcldtype(:,:,1)/nsub(:,:) 1139 1139 lidarcldtype(:,:,2) = lidarcldtype(:,:,2)/nsub(:,:) … … 1143 1143 endwhere 1144 1144 ! 3D z_opaque fraction (=3) 1145 where ( nsubopaq(:,:) .gt.0.0 )1145 where ( nsubopaq(:,:) > 0.0 ) 1146 1146 lidarcldtype(:,:,3) = lidarcldtype(:,:,3)/nsubopaq(:,:) 1147 1147 elsewhere … … 1152 1152 do ip = 1, Npoints 1153 1153 do k = Nlevels-1, 1, -1 1154 if ( lidarcldtype(ip,k,3) .ne.undef ) then1154 if ( lidarcldtype(ip,k,3) /= undef ) then 1155 1155 lidarcldtype(ip,k,4) = lidarcldtype(ip,k+1,4) + lidarcldtype(ip,k,3) 1156 1156 endif 1157 1157 enddo 1158 1158 enddo 1159 where ( nsubopaq(:,:) .eq.0.0 )1159 where ( nsubopaq(:,:) == 0.0 ) 1160 1160 lidarcldtype(:,:,4) = undef 1161 1161 endwhere … … 1169 1169 enddo 1170 1170 enddo 1171 where (nsublayer(:,:) .gt.0.0)1171 where (nsublayer(:,:) > 0.0) 1172 1172 cldtype(:,:) = cldtype(:,:)/nsublayer(:,:) 1173 1173 elsewhere
Note: See TracChangeset
for help on using the changeset viewer.