Changeset 2831 for trunk/LMDZ.GENERIC
- Timestamp:
- Nov 23, 2022, 4:41:34 PM (2 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2810 r2831 1754 1754 was tested although not defined; using tests on "aerogeneric" (number 1755 1755 of generic aerosols) works better. 1756 1757 == 17/11/2022 == LT 1758 Removed extrapolations in tpindex. If above Tmax or Pmax use the max value. 1759 1760 == 23/11/2022 == GG 1761 Add the possibility to include Venus-like aerosols (triggered by option 1762 aerovenus=.true. in callphys.def); baseline is to use 5 distinct scatterers 1763 but each may be turned on/off (via aerovenus1, aerovenus2, aerovenus2p, 1764 aerovenus3, aerovenusUV flags which may be specified in callphys.def). 1765 -
trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
r2810 r2831 1 Subroutine aeropacity(ngrid,nlayer,nq,pplay,pplev,pq, & 2 aerosol,reffrad,QREFvis3d,QREFir3d,tau_col,cloudfrac,totcloudfrac,clearsky) 1 Subroutine aeropacity(ngrid,nlayer,nq,pplay,pplev,pt, pq, & 2 aerosol,reffrad,nueffrad, QREFvis3d,QREFir3d,tau_col, & 3 cloudfrac,totcloudfrac,clearsky) 3 4 4 5 use radinc_h, only : L_TAUMAX,naerkind … … 6 7 iaero_aurora, iaero_back2lay, iaero_co2, & 7 8 iaero_dust, iaero_h2o, iaero_h2so4, & 8 iaero_nh3, i_rgcs_ice, noaero 9 iaero_nh3, i_rgcs_ice, noaero, & 10 iaero_venus1, iaero_venus2, iaero_venus2p, & 11 iaero_venus3, iaero_venusUV 9 12 USE tracer_h, only: noms,rho_co2,rho_ice,rho_q,mmol 10 13 use comcstfi_mod, only: g, pi, mugaz, avocado … … 60 63 REAL,INTENT(IN) :: pplev(ngrid,nlayer+1) ! inter-layer pressure (Pa) 61 64 REAL,INTENT(IN) :: pq(ngrid,nlayer,nq) ! tracers (.../kg_of_air) 65 REAL,INTENT(IN) :: pt(ngrid,nlayer) ! mid-layer temperature (K) 62 66 REAL,INTENT(OUT) :: aerosol(ngrid,nlayer,naerkind) ! aerosol optical depth 63 67 REAL,INTENT(IN) :: reffrad(ngrid,nlayer,naerkind) ! aerosol effective radius 68 REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind) ! aerosol effective variance 64 69 REAL,INTENT(IN) :: QREFvis3d(ngrid,nlayer,naerkind) ! extinction coefficient in the visible 65 70 REAL,INTENT(IN) :: QREFir3d(ngrid,nlayer,naerkind) … … 98 103 logical dummy_bool ! dummy boolean just in case we need one 99 104 ! integer i_rgcs_ice(aerogeneric) 105 ! for venus clouds 106 real :: p_bot,p_top,h_bot,h_top,mode_dens,h_lay 107 100 108 ! identify tracers 101 109 IF (firstcall) THEN … … 148 156 print*,'iaero_aurora= ',iaero_aurora 149 157 endif 158 159 if (iaero_venus1.ne.0) then 160 print*,'iaero_venus1= ',iaero_venus1 161 endif 162 if (iaero_venus2.ne.0) then 163 print*,'iaero_venus2= ',iaero_venus2 164 endif 165 if (iaero_venus2p.ne.0) then 166 print*,'iaero_venus2p= ',iaero_venus2p 167 endif 168 if (iaero_venus3.ne.0) then 169 print*,'iaero_venus3= ',iaero_venus3 170 endif 171 if (iaero_venusUV.ne.0) then 172 print*,'iaero_venusUV= ',iaero_venusUV 173 endif 174 150 175 if (aerogeneric .ne. 0) then 151 176 print*,"iaero_generic= ",iaero_generic(:) … … 679 704 endif !aerogeneric .ne. 0 680 705 706 !================================================================== 707 ! Venus clouds (4 modes) 708 ! S. Lebonnois (jan 2016) 709 !================================================================== 710 ! distributions from Haus et al, 2013 711 ! mode 1 2 2p 3 712 ! r (microns) 0.30 1.05 1.40 3.65 713 ! sigma 1.56 1.29 1.23 1.28 714 ! reff (microns) 0.49 1.23 1.56 4.25 715 ! nueff 0.21 0.067 0.044 0.063 716 ! (nueff=exp(ln^2 sigma)-1) 717 ! 718 ! p_bot <=> zb ; p_top <=> zb+zc ; h_bot <=> Hlo ; h_top <=> Hup 719 ! p<p_top: N=No*(p/p_top)**(h_lay/h_top) h_lay=RT/g (in m) 720 ! p>p_bot: N=No*(p_bot/p)**(h_lay/h_bot) R=8.31/mu (mu in kg/mol) 721 ! N is in m-3 722 ! 723 ! dTau = Qext*[pi*reff**2*exp(-3*ln(1+nueff))]*N*h_lay*(-dp)/p 724 725 ! Mode 1 726 if (iaero_venus1 .ne.0) then 727 iaer=iaero_venus1 728 729 ! 1. Initialization 730 aerosol(1:ngrid,1:nlayer,iaer)=0.0 731 p_bot = 1.e5 732 p_top = 1.e4 733 h_bot = 1.0e3 ! m 734 h_top = 5.0e3 735 736 ! 2. Opacity calculation 737 738 DO ig=1,ngrid 739 DO l=1,nlayer-1 740 741 h_lay=8.31*pt(ig,l)/(g*0.044) 742 743 !! 1. below 2e5 Pa: no aerosols 744 IF (pplay(ig,l) .gt. 2.e5) THEN 745 mode_dens = 0. 746 747 !! 2. cloud layer 748 ELSEIF (pplay(ig,l) .le. 2.e5 .and. pplay(ig,l) .gt. p_bot) THEN 749 mode_dens = 1.81e8*(p_bot/pplay(ig,l))**(h_lay/h_bot) 750 751 ELSEIF (pplay(ig,l) .le. p_bot .and. pplay(ig,l) .gt. p_top) THEN 752 mode_dens = 1.81e8 ! m-3 753 754 ELSEIF (pplay(ig,l) .le. p_top .and. pplay(ig,l) .gt. 1.e2) THEN 755 mode_dens = 1.81e8*(pplay(ig,l)/p_top)**(h_lay/h_top) 756 757 !! 3. above 1.e2 Pa: no aerosols 758 ELSEIF (pplay(ig,l) .le. 1.e2) THEN 759 mode_dens = 0. 760 ENDIF 761 762 aerosol(ig,l,iaer) = QREFvis3d(ig,l,iaer)* & 763 pi*(reffrad(ig,l,iaer))**2*exp(-3.*log(1+nueffrad(ig,l,iaer)))* & 764 mode_dens*h_lay*(pplev(ig,l)-pplev(ig,l+1))/pplay(ig,l) 765 766 ENDDO 767 ENDDO 768 769 end if ! mode 1 770 771 ! Mode 2 772 if (iaero_venus2 .ne.0) then 773 iaer=iaero_venus2 774 775 ! 1. Initialization 776 aerosol(1:ngrid,1:nlayer,iaer)=0.0 777 p_bot = 1.1e4 778 p_top = 1.e4 779 h_bot = 3.0e3 780 h_top = 3.5e3 781 782 ! 2. Opacity calculation 783 784 DO ig=1,ngrid 785 DO l=1,nlayer-1 786 787 h_lay=8.31*pt(ig,l)/(g*0.044) 788 789 !! 1. below 2e5 Pa: no aerosols 790 IF (pplay(ig,l) .gt. 2.e5) THEN 791 mode_dens = 0. 792 793 !! 2. cloud layer 794 ELSEIF (pplay(ig,l) .le. 2.e5 .and. pplay(ig,l) .gt. p_bot) THEN 795 mode_dens = 1.00e8*(p_bot/pplay(ig,l))**(h_lay/h_bot) 796 797 ELSEIF (pplay(ig,l) .le. p_bot .and. pplay(ig,l) .gt. p_top) THEN 798 mode_dens = 1.00e8 799 800 ELSEIF (pplay(ig,l) .le. p_top .and. pplay(ig,l) .gt. 1.e2) THEN 801 mode_dens = 1.00e8*(pplay(ig,l)/p_top)**(h_lay/h_top) 802 803 !! 3. above 1.e2 Pa: no aerosols 804 ELSEIF (pplay(ig,l) .le. 1.e2) THEN 805 mode_dens = 0. 806 ENDIF 807 808 aerosol(ig,l,iaer) = QREFvis3d(ig,l,iaer)* & 809 pi*(reffrad(ig,l,iaer))**2*exp(-3.*log(1+nueffrad(ig,l,iaer)))* & 810 mode_dens*h_lay*(pplev(ig,l)-pplev(ig,l+1))/pplay(ig,l) 811 812 ENDDO 813 ENDDO 814 815 end if ! mode 2 816 817 ! Mode 2p 818 if (iaero_venus2p .ne.0) then 819 iaer=iaero_venus2p 820 821 ! 1. Initialization 822 aerosol(1:ngrid,1:nlayer,iaer)=0.0 823 p_bot = 1.e5 824 p_top = 2.3e4 825 h_bot = 0.1e3 826 h_top = 1.0e3 827 828 ! 2. Opacity calculation 829 830 DO ig=1,ngrid 831 DO l=1,nlayer-1 832 833 h_lay=8.31*pt(ig,l)/(g*0.044) 834 835 !! 1. below 2e5 Pa: no aerosols 836 IF (pplay(ig,l) .gt. 2.e5) THEN 837 mode_dens = 0. 838 839 !! 2. cloud layer 840 ELSEIF (pplay(ig,l) .le. 2.e5 .and. pplay(ig,l) .gt. p_bot) THEN 841 mode_dens = 5.00e7*(p_bot/pplay(ig,l))**(h_lay/h_bot) 842 843 ELSEIF (pplay(ig,l) .le. p_bot .and. pplay(ig,l) .gt. p_top) THEN 844 mode_dens = 5.00e7 845 846 ELSEIF (pplay(ig,l) .le. p_top .and. pplay(ig,l) .gt. 1.e2) THEN 847 mode_dens = 5.00e7*(pplay(ig,l)/p_top)**(h_lay/h_top) 848 849 !! 3. above 1.e2 Pa: no aerosols 850 ELSEIF (pplay(ig,l) .le. 1.e2) THEN 851 mode_dens = 0. 852 ENDIF 853 854 aerosol(ig,l,iaer) = QREFvis3d(ig,l,iaer)* & 855 pi*(reffrad(ig,l,iaer))**2*exp(-3.*log(1+nueffrad(ig,l,iaer)))* & 856 mode_dens*h_lay*(pplev(ig,l)-pplev(ig,l+1))/pplay(ig,l) 857 858 ENDDO 859 ENDDO 860 861 end if ! mode 2p 862 863 ! Mode 3 864 if (iaero_venus3 .ne.0) then 865 iaer=iaero_venus3 866 867 ! 1. Initialization 868 aerosol(1:ngrid,1:nlayer,iaer)=0.0 869 p_bot = 1.e5 870 p_top = 4.e4 871 h_bot = 0.5e3 872 h_top = 1.0e3 873 874 ! 2. Opacity calculation 875 876 DO ig=1,ngrid 877 DO l=1,nlayer-1 878 879 h_lay=8.31*pt(ig,l)/(g*0.044) 880 881 !! 1. below 2e5 Pa: no aerosols 882 IF (pplay(ig,l) .gt. 2.e5) THEN 883 mode_dens = 0. 884 885 !! 2. cloud layer 886 ELSEIF (pplay(ig,l) .le. 2.e5 .and. pplay(ig,l) .gt. p_bot) THEN 887 mode_dens = 1.40e7*(p_bot/pplay(ig,l))**(h_lay/h_bot) 888 889 ELSEIF (pplay(ig,l) .le. p_bot .and. pplay(ig,l) .gt. p_top) THEN 890 mode_dens = 1.40e7 891 892 ELSEIF (pplay(ig,l) .le. p_top .and. pplay(ig,l) .gt. 1.e2) THEN 893 mode_dens = 1.40e7*(pplay(ig,l)/p_top)**(h_lay/h_top) 894 895 !! 3. above 1.e2 Pa: no aerosols 896 ELSEIF (pplay(ig,l) .le. 1.e2) THEN 897 mode_dens = 0. 898 ENDIF 899 900 aerosol(ig,l,iaer) = QREFvis3d(ig,l,iaer)* & 901 pi*(reffrad(ig,l,iaer))**2*exp(-3.*log(1+nueffrad(ig,l,iaer)))* & 902 mode_dens*h_lay*(pplev(ig,l)-pplev(ig,l+1))/pplay(ig,l) 903 904 ENDDO 905 ENDDO 906 907 end if ! mode 3 908 909 ! UV absorber 910 if (iaero_venusUV .ne.0) then 911 iaer=iaero_venusUV 912 913 ! 1. Initialization 914 aerosol(1:ngrid,1:nlayer,iaer)=0.0 915 p_bot = 3.3e4 ! 58 km 916 p_top = 3.7e3 ! 70 km 917 h_bot = 1.0e3 918 h_top = 1.0e3 919 920 ! 2. Opacity calculation 921 922 DO ig=1,ngrid 923 DO l=1,nlayer-1 924 925 h_lay=8.31*pt(ig,l)/(g*0.044) 926 927 !! 1. below 7e4 Pa: no aerosols 928 IF (pplay(ig,l) .gt. 7.e4) THEN 929 mode_dens = 0. 930 931 !! 2. cloud layer 932 ELSEIF (pplay(ig,l) .le. 7.e4 .and. pplay(ig,l) .gt. p_bot) THEN 933 mode_dens = 1.00e7*(p_bot/pplay(ig,l))**(h_lay/h_bot) 934 935 ELSEIF (pplay(ig,l) .le. p_bot .and. pplay(ig,l) .gt. p_top) THEN 936 mode_dens = 1.00e7 937 938 ELSEIF (pplay(ig,l) .le. p_top .and. pplay(ig,l) .gt. 1.e3) THEN 939 mode_dens = 1.00e7*(pplay(ig,l)/p_top)**(h_lay/h_top) 940 941 !! 3. above 1.e3 Pa: no aerosols 942 ELSEIF (pplay(ig,l) .le. 1.e3) THEN 943 mode_dens = 0. 944 ENDIF 945 946 ! normalized to 0.35 microns (peak of absorption) 947 aerosol(ig,l,iaer) = QREFvis3d(ig,l,iaer)*mode_dens 948 949 ENDDO 950 ENDDO 951 952 ! 3. Re-normalize to Haus et al 2015 total column optical depth 953 tau_col(:)=0.0 954 DO l=1,nlayer 955 DO ig=1,ngrid 956 tau_col(ig) = tau_col(ig) & 957 + aerosol(ig,l,iaer) 958 ENDDO 959 ENDDO 960 DO ig=1,ngrid 961 DO l=1,nlayer-1 962 aerosol(ig,l,iaer)=aerosol(ig,l,iaer)*0.205/tau_col(ig) 963 ENDDO 964 ENDDO 965 966 end if ! UV absorber 967 968 !================================================================== 969 ! ig=10 970 ! do l=1,nlayer 971 ! print*,8.31*pt(ig,l)/(g*0.044),pplay(ig,l),aerosol(ig,l,1),aerosol(ig,l,2),aerosol(ig,l,3),aerosol(ig,l,4) 972 ! print*,l,pplay(ig,l),aerosol(ig,l,5) 973 ! enddo 974 ! stop 975 !================================================================== 976 977 681 978 ! -------------------------------------------------------------------------- 682 979 ! Column integrated visible optical depth in each point (used for diagnostic) … … 713 1010 ! endif 714 1011 ! end do 715 return 1012 716 1013 end subroutine aeropacity 717 1014 -
trunk/LMDZ.GENERIC/libf/phystd/aerosol_mod.F90
r2804 r2831 13 13 integer :: iaero_h2so4 = 0 14 14 logical :: noaero = .false. 15 !$OMP THREADPRIVATE(iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4,noaero) 15 16 16 17 ! two-layer simple aerosol model … … 22 23 ! Auroral aerosols 23 24 integer :: iaero_aurora = 0 25 !$OMP THREADPRIVATE(iaero_back2lay,iaero_nh3,iaero_nlay,iaero_aurora) 26 24 27 ! Generic aerosols 25 28 integer, dimension(:),allocatable,save :: iaero_generic 26 29 integer,dimension(:),allocatable,save :: i_rgcs_ice 27 !$OMP THREADPRIVATE(iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4,noaero,iaero_back2lay,iaero_nh3,iaero_nlay,iaero_aurora,iaero_generic,i_rgcs_ice) 30 !$OMP THREADPRIVATE(iaero_generic,i_rgcs_ice) 31 32 ! Venus clouds 33 integer :: iaero_venus1 = 0 34 integer :: iaero_venus2 = 0 35 integer :: iaero_venus2p = 0 36 integer :: iaero_venus3 = 0 37 integer :: iaero_venusUV = 0 38 !$OMP THREADPRIVATE(iaero_venus1,iaero_venus2,iaero_venus2p) 39 !$OMP THREADPRIVATE(iaero_venus3,iaero_venusUV) 40 28 41 29 42 !================================================================== -
trunk/LMDZ.GENERIC/libf/phystd/calc_cpp_mugaz.F90
r2635 r2831 24 24 implicit none 25 25 26 character(len=20),parameter :: myname="calc_cpp_mugaz" 26 27 real cpp_c 27 28 real mugaz_c … … 64 65 ! C2H2 http://encyclopedia.airliquide.com/Encyclopedia.asp?GasID=1 65 66 mugaz_c = mugaz_c + 26.04*gfrac(igas) 67 ! GG MODIF JAN2019 68 elseif(igas.eq.igas_CO)then 69 mugaz_c = mugaz_c + 28.01*gfrac(igas) 70 elseif(igas.eq.igas_OCS)then 71 ! https://pubchem.ncbi.nlm.nih.gov/compound/carbonyl_sulfide 72 mugaz_c = mugaz_c + 60.0751*gfrac(igas) 73 elseif(igas.eq.igas_HCl)then 74 mugaz_c = mugaz_c + 36.46*gfrac(igas) 75 elseif(igas.eq.igas_HF)then 76 mugaz_c = mugaz_c + 20.01*gfrac(igas) 66 77 else 78 if (is_master) then 67 79 print*,'Error in calc_cpp_mugaz: Gas species not recognised!' 68 call abort 80 endif 81 call abort_physic(myname,'Gas species not recognised!',1) 69 82 endif 70 83 endif … … 108 121 ! http://encyclopedia.airliquide.com/Encyclopedia.asp?GasID=1 109 122 cpp_c = cpp_c + 1.575*gfrac(igas)*26.04/mugaz_c 123 !!!!! MODIF GG JAN 2019 (check source values !!) 124 elseif(igas.eq.igas_CO)then 125 cpp_c = cpp_c + 1.0425*gfrac(igas)*28.01/mugaz_c 126 elseif(igas.eq.igas_OCS)then 127 cpp_c = cpp_c + 0.6909*gfrac(igas)*60.07/mugaz_c 128 elseif(igas.eq.igas_HCl)then 129 cpp_c = cpp_c + 1.7087*gfrac(igas)*36.46/mugaz_c 130 elseif(igas.eq.igas_HF)then 131 cpp_c = cpp_c + 1.4553*gfrac(igas)*20.01/mugaz_c 110 132 else 133 if (is_master) then 111 134 print*,'Error in calc_cpp_mugaz: Gas species not recognised!' 112 call abort 135 endif 136 call abort_physic(myname,'Gas species not recognised!',1) 113 137 endif 114 138 endif … … 122 146 cpp_c = 1000.0*cpp_c 123 147 124 print*,'Cp in calc_cpp_mugaz is ',cpp_c,'J kg^-1 K^-1' 125 print*,'Mg in calc_cpp_mugaz is ',mugaz_c,'amu' 148 if (is_master) then 149 print*,'Cp in calc_cpp_mugaz is ',cpp_c,'J kg^-1 K^-1' 150 print*,'Mg in calc_cpp_mugaz is ',mugaz_c,'amu' 151 endif 126 152 127 153 if(((abs(1.-cpp/cpp_c).gt.1.e-6) .or. & … … 146 172 147 173 148 return149 174 end subroutine calc_cpp_mugaz -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r2804 r2831 28 28 use gases_h, only: ngasmx 29 29 use radii_mod, only : su_aer_radii,co2_reffrad,h2o_reffrad,dust_reffrad,h2so4_reffrad,back2lay_reffrad 30 use aerosol_mod, only : iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4, iaero_back2lay, iaero_aurora 30 use aerosol_mod, only : iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4, & 31 iaero_back2lay, iaero_aurora, & 32 iaero_venus1,iaero_venus2,iaero_venus2p, & 33 iaero_venus3,iaero_venusUV 31 34 use tracer_h 32 35 use comcstfi_mod, only: pi, mugaz, cpp 33 use callkeys_mod, only: varactive,diurnal,tracer,water,varfixed,satval,diagdtau, & 34 kastprof,strictboundcorrk,specOLR,CLFvarying, & 35 tplanckmin,tplanckmax,global1d,generic_condensation 36 use callkeys_mod, only: varactive,diurnal,tracer,water,varfixed,satval, & 37 diagdtau,kastprof,strictboundcorrk,specOLR, & 38 CLFvarying,tplanckmin,tplanckmax,global1d, & 39 generic_condensation, aerovenus 36 40 use optcv_mod, only: optcv 37 41 use optci_mod, only: optci … … 294 298 295 299 #ifndef MESOSCALE 296 call system('rm -f surf_vals_long.out')300 if (is_master) call system('rm -f surf_vals_long.out') 297 301 #endif 298 302 299 ! if(naerkind.gt.4)then300 ! message='Code not general enough to deal with naerkind > 4 yet.'301 ! call abort_physic(subname,message,1)302 ! endif303 303 call su_aer_radii(ngrid,nlayer,reffrad,nueffrad) 304 304 … … 498 498 499 499 ! Get aerosol optical depths. 500 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pq,aerosol, &501 reffrad, QREFvis3d,QREFir3d, &500 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq,aerosol, & 501 reffrad,nueffrad,QREFvis3d,QREFir3d, & 502 502 tau_col,cloudfrac,totcloudfrac,clearsky) 503 503 … … 904 904 plevrad(1) = 0. 905 905 ! plevrad(2) = 0. !! JL18 enabling this line puts the radiative top at p=0 which was the idea before, but does not seem to perform best after all. 906 if (aerovenus) then 907 !! GG19 modified below after SL routines 908 plevrad(2) = 0. 909 endif 906 910 907 911 tlevrad(1) = tlevrad(2) 908 912 tlevrad(2*nlayer+1)=tsurf(ig) 909 913 910 pmid(1) = pplay(ig,nlayer)/scalep 914 pmid(1) = pplay(ig,nlayer)/scalep 915 if (aerovenus) then 916 !! GG19 modified below after SL routines 917 pmid(1) = max(pgasmin,0.0001*plevrad(3)) 918 endif 911 919 pmid(2) = pmid(1) 912 920 -
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r2810 r2831 48 48 logical,save :: aeronh3, aeronlay, aeroaurora 49 49 !$OMP THREADPRIVATE(aeronh3,aeronlay,aeroaurora) 50 51 logical,save :: aerovenus ! master flag for "Venus-like" aerosol additions 52 !$OMP THREADPRIVATE(aerovenus) 53 ! detailed sub-options when with "Venus-like" aerosol additions 54 logical,save :: aerovenus1,aerovenus2,aerovenus2p,aerovenus3,aerovenusUV 55 !$OMP THREADPRIVATE(aerovenus1,aerovenus2,aerovenus2p,aerovenus3,aerovenusUV) 56 50 57 logical,save :: aerofixco2,aerofixh2o 51 58 !$OMP THREADPRIVATE(aerofixco2,aerofixh2o) -
trunk/LMDZ.GENERIC/libf/phystd/gases_h.F90
r1315 r2831 31 31 integer :: igas_C2H2 32 32 integer :: igas_C2H6 33 !! GG MODIF Jan 2019 34 integer :: igas_OCS 35 integer :: igas_HCl 36 integer :: igas_HF 33 37 !!$OMP THREADPRIVATE(ngasmx,vgas,gnom,gfrac,& 34 38 ! !$OMP igas_H2,igas_He,igas_H2O,igas_CO2,igas_CO,igas_N2,& 35 39 ! !$OMP igas_O2,igas_SO2,igas_H2S,igas_CH4,igas_NH3,igas_C2H2,igas_C2H6) 36 40 ! The saved variables here are not OMP THREADPRIVATE because loaded by 41 ! the OMP master only (see su_gases.F90) and thus shared by all threads 37 42 end module gases_h -
trunk/LMDZ.GENERIC/libf/phystd/iniaerosol.F
r2804 r2831 2 2 3 3 4 use mod_phys_lmdz_para, only : is_master 4 5 use radinc_h, only: naerkind 5 6 use aerosol_mod … … 7 8 use callkeys_mod, only: aeroco2,aeroh2o,dusttau,aeroh2so4, 8 9 & aeroback2lay,aeronh3, nlayaero, aeronlay, aeroaurora, 9 & aerogeneric 10 & aerogeneric, 11 & aerovenus1,aerovenus2,aerovenus2p,aerovenus3,aerovenusUV 12 10 13 11 14 IMPLICIT NONE … … 56 59 iaero_co2=ia 57 60 endif 58 write(*,*) '--- CO2 aerosol = ', iaero_co261 if (is_master) write(*,*) '--- CO2 aerosol = ', iaero_co2 59 62 60 63 if (aeroh2o) then … … 62 65 iaero_h2o=ia 63 66 endif 64 write(*,*) '--- H2O aerosol = ', iaero_h2o67 if (is_master) write(*,*) '--- H2O aerosol = ', iaero_h2o 65 68 66 69 if (dusttau.gt.0) then … … 68 71 iaero_dust=ia 69 72 endif 70 write(*,*) '--- Dust aerosol = ', iaero_dust73 if (is_master) write(*,*) '--- Dust aerosol = ', iaero_dust 71 74 72 75 if (aeroh2so4) then … … 74 77 iaero_h2so4=ia 75 78 endif 76 write(*,*) '--- H2SO4 aerosol = ', iaero_h2so479 if (is_master) write(*,*) '--- H2SO4 aerosol = ', iaero_h2so4 77 80 78 81 if (aeroback2lay) then … … 80 83 iaero_back2lay=ia 81 84 endif 82 write(*,*) '--- Two-layer aerosol = ', iaero_back2lay 85 if (is_master) write(*,*) '--- Two-layer aerosol = ', 86 & iaero_back2lay 83 87 84 88 if (aeronh3) then … … 86 90 iaero_nh3=ia 87 91 endif 88 write(*,*) '--- NH3 Cloud = ', iaero_nh392 if (is_master) write(*,*) '--- NH3 Cloud = ', iaero_nh3 89 93 90 94 if (aeronlay) then … … 94 98 enddo 95 99 endif 96 write(*,*) '--- N-layer aerosol = ', iaero_nlay100 if (is_master) write(*,*) '--- N-layer aerosol = ', iaero_nlay 97 101 98 102 if (aeroaurora) then … … 100 104 iaero_aurora=ia 101 105 endif 102 write(*,*) '--- Auroral aerosols = ', iaero_aurora 106 if (is_master) write(*,*) '--- Auroral aerosols = ', iaero_aurora 107 108 if (aerovenus1) then 109 ia=ia+1 110 iaero_venus1=ia 111 endif 112 if (is_master) write(*,*) '--- Venus cloud, mode 1 aerosol = ', 113 & iaero_venus1 114 115 if (aerovenus2) then 116 ia=ia+1 117 iaero_venus2=ia 118 endif 119 if (is_master) write(*,*) '--- Venus cloud, mode 2 aerosol = ', 120 & iaero_venus2 121 122 if (aerovenus2p) then 123 ia=ia+1 124 iaero_venus2p=ia 125 endif 126 if (is_master) write(*,*) '--- Venus cloud, mode 2p aerosol = ', 127 & iaero_venus2p 128 129 if (aerovenus3) then 130 ia=ia+1 131 iaero_venus3=ia 132 endif 133 if (is_master) write(*,*) '--- Venus cloud, mode 3 aerosol = ', 134 & iaero_venus3 135 136 if (aerovenusUV) then 137 ia=ia+1 138 iaero_venusUV=ia 139 endif 140 if (is_master) write(*,*) '--- Venus cloud, UV absorber = ', 141 & iaero_venusUV 142 103 143 104 144 if (aerogeneric .ne. 0) then … … 108 148 enddo 109 149 endif 110 write(*,*)'--- Radiative Generic Condensable Species = ' 150 151 if (is_master) then 152 write(*,*)'--- Radiative Generic Condensable Species = ' 111 153 &,iaero_generic 112 write(*,*) '=== Number of aerosols= ', ia 154 155 write(*,*) '=== Number of aerosols= ', ia 156 endif ! of is_master 113 157 114 158 ! For the zero aerosol case, we currently make a dummy co2 aerosol which is zero everywhere. … … 123 167 124 168 if (ia.ne.naerkind) then 169 if (is_master) then 125 170 print*, 'Aerosols counted not equal to naerkind' 126 171 print*, 'Compile with tag -s',ia,'to run' 127 172 print*, 'or change options in callphys.def' 128 173 print*, 'Abort in iniaerosol.F' 129 call abort 174 endif 175 call abort_physic("iniaerosl", 176 & 'wrong number of aerosols',1) 130 177 endif 131 178 -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2803 r2831 687 687 endif 688 688 689 if (is_master) write(*,*)"Radiatively active Venus clouds ?" 690 aerovenus=.false. ! default value 691 call getin_p("aerovenus",aerovenus) 692 if (aerovenus) then 693 aerovenus1=.true. ! default value 694 aerovenus2=.true. ! default value 695 aerovenus2p=.true. ! default value 696 aerovenus3=.true. ! default value 697 aerovenusUV=.true. ! default value 698 else 699 aerovenus1=.false. ! default value 700 aerovenus2=.false. ! default value 701 aerovenus2p=.false. ! default value 702 aerovenus3=.false. ! default value 703 aerovenusUV=.false. ! default value 704 endif 705 ! in case the user wants to specifically set/unset sub-options 706 call getin_p("aerovenus1",aerovenus1) 707 if (is_master) write(*,*)" aerovenus1 = ",aerovenus1 708 call getin_p("aerovenus2",aerovenus2) 709 if (is_master) write(*,*)" aerovenus2 = ",aerovenus2 710 call getin_p("aerovenus2p",aerovenus2p) 711 if (is_master) write(*,*)" aerovenus2p= ",aerovenus2p 712 call getin_p("aerovenus3",aerovenus3) 713 if (is_master) write(*,*)" aerovenus3 = ",aerovenus3 714 call getin_p("aerovenusUV",aerovenusUV) 715 if (is_master) write(*,*)" aerovenusUV= ",aerovenusUV 716 ! Sanity check: if any of the aerovenus* is set to true 717 ! then aeronovenus should also be set to true 718 if ((.not.aerovenus).and.(aerovenus1.or.aerovenus2.or.aerovenus2p.or.& 719 aerovenus3.or.aerovenusUV)) then 720 if(is_master) then 721 write(*,*)" Error, if you set some of the aerovenus* to true" 722 write(*,*)" then flag aerovenus should be set to true as well!" 723 endif 724 call abort_physic("inifis"," aerovenus* flags mismatch!",1) 725 endif 726 689 727 if (is_master) write(*,*)trim(rname)//& 690 728 ": TWOLAY AEROSOL: total optical depth "//& -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2803 r2831 985 985 clearsky,firstcall,lastcall) 986 986 987 !GG (feb2021): Option to "artificially" decrease the raditive time scale in 988 !the deep atmosphere press > 0.1 bar. Suggested by MT. 989 !! COEFF_RAD to be "tuned" to facilitate convergence of tendency 990 991 !coeff_rad=0. ! 0 values, it doesn't accelerate the convergence 992 !coeff_rad=0.5 993 !coeff_rad=1. 994 !do l=1, nlayer 995 ! do ig=1,ngrid 996 ! if(pplay(ig,l).ge.1.d4) then 997 ! zdtsw(ig,l)=zdtsw(ig,l)*(pplay(ig,l)/1.d4)**coeff_rad 998 ! zdtlw(ig,l)=zdtlw(ig,l)*(pplay(ig,l)/1.d4)**coeff_rad 999 ! endif 1000 ! enddo 1001 !enddo 1002 987 1003 ! Option to call scheme once more for clear regions 988 1004 if(CLFvarying)then … … 2467 2483 2468 2484 ! Temporary inclusions for heating diagnostics. 2469 !call writediagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw)2470 !call writediagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw)2485 call writediagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw) 2486 call writediagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw) 2471 2487 call writediagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad) 2472 !call writediagfi(ngrid,"zdtdyn","Dyn. heating","T s-1",3,zdtdyn)2488 call writediagfi(ngrid,"zdtdyn","Dyn. heating","T s-1",3,zdtdyn) 2473 2489 2474 2490 ! For Debugging. -
trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90
r2804 r2831 38 38 ! 39 39 !================================================================== 40 use mod_phys_lmdz_para, only : is_master 40 41 use ioipsl_getin_p_mod, only: getin_p 41 42 use radinc_h, only: naerkind 42 43 use aerosol_mod, only: iaero_back2lay, iaero_co2, iaero_dust, & 43 iaero_h2o, iaero_h2so4, iaero_nh3, iaero_nlay, iaero_aurora, & 44 iaero_generic, i_rgcs_ice 45 use callkeys_mod, only: size_nh3_cloud, nlayaero, aeronlay_size, aeronlay_nueff,aerogeneric 44 iaero_h2o, iaero_h2so4, iaero_nh3, iaero_nlay, & 45 iaero_aurora, iaero_generic, i_rgcs_ice, & 46 iaero_venus1, iaero_venus2, iaero_venus2p, & 47 iaero_venus3, iaero_venusUV 48 use callkeys_mod, only: size_nh3_cloud, nlayaero, aeronlay_size, & 49 aeronlay_nueff,aerogeneric 46 50 use tracer_h, only: radius, nqtot, is_rgcs 47 51 Implicit none … … 90 94 91 95 92 96 if(iaer.eq.iaero_nh3)then ! Nh3 cloud 93 97 reffrad(1:ngrid,1:nlayer,iaer) = size_nh3_cloud 94 98 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 … … 102 106 enddo 103 107 104 108 if(iaer.eq.iaero_aurora)then ! Auroral aerosols 105 109 reffrad(1:ngrid,1:nlayer,iaer) = 3.e-7 106 110 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 111 endif 112 113 if(iaer.eq.iaero_venus1)then ! Venus cloud, mode 1, Haus13 model 114 reffrad(1:ngrid,1:nlayer,iaer) = 0.49e-6 115 nueffrad(1:ngrid,1:nlayer,iaer) = 0.21 116 endif 117 118 if(iaer.eq.iaero_venus2)then ! Venus cloud, mode 2, Haus13 model 119 reffrad(1:ngrid,1:nlayer,iaer) = 1.23e-6 120 nueffrad(1:ngrid,1:nlayer,iaer) = 0.067 121 endif 122 123 if(iaer.eq.iaero_venus2p)then ! Venus cloud, mode 2p, Haus13 model 124 reffrad(1:ngrid,1:nlayer,iaer) = 1.56e-6 125 nueffrad(1:ngrid,1:nlayer,iaer) = 0.044 126 endif 127 128 if(iaer.eq.iaero_venus3)then ! Venus cloud, mode 3, Haus13 model 129 reffrad(1:ngrid,1:nlayer,iaer) = 4.25e-6 130 nueffrad(1:ngrid,1:nlayer,iaer) = 0.062 131 endif 132 133 if(iaer.eq.iaero_venusUV)then ! Venus cloud, UV abs, 1 val as in table 134 reffrad(1:ngrid,1:nlayer,iaer) = 0.5e-6 135 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 107 136 endif 108 137 … … 115 144 enddo ! generic radiative condensable aerosols 116 145 117 if(iaer.gt.5)then ! I think this could be commented out by this needs testing. It works with 5 aerosols (LT 2022)118 print*,'Error in callcorrk, naerkind is too high (>5).'119 print*,'The code still needs generalisation to arbitrary'120 print*,'aerosol kinds and number.'121 call abort122 endif123 146 enddo ! iaer=1,naerkind 124 147 … … 126 149 if (radfixed) then 127 150 128 write(*,*)"radius of H2O water particles:"151 if (is_master) write(*,*)"radius of H2O water particles:" 129 152 rad_h2o=13. ! default value 130 153 call getin_p("rad_h2o",rad_h2o) 131 write(*,*)" rad_h2o = ",rad_h2o132 133 write(*,*)"radius of H2O ice particles:"154 if (is_master) write(*,*)" rad_h2o = ",rad_h2o 155 156 if (is_master) write(*,*)"radius of H2O ice particles:" 134 157 rad_h2o_ice=35. ! default value 135 158 call getin_p("rad_h2o_ice",rad_h2o_ice) 136 write(*,*)" rad_h2o_ice = ",rad_h2o_ice159 if (is_master) write(*,*)" rad_h2o_ice = ",rad_h2o_ice 137 160 138 161 else 139 162 140 write(*,*)"Number mixing ratio of H2O water particles:"163 if (is_master) write(*,*)"Number mixing ratio of H2O water particles:" 141 164 Nmix_h2o=1.e6 ! default value 142 165 call getin_p("Nmix_h2o",Nmix_h2o) 143 write(*,*)" Nmix_h2o = ",Nmix_h2o144 145 write(*,*)"Number mixing ratio of H2O ice particles:"166 if (is_master) write(*,*)" Nmix_h2o = ",Nmix_h2o 167 168 if (is_master) write(*,*)"Number mixing ratio of H2O ice particles:" 146 169 Nmix_h2o_ice=Nmix_h2o ! default value 147 170 call getin_p("Nmix_h2o_ice",Nmix_h2o_ice) 148 write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice171 if (is_master) write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice 149 172 endif 150 173 -
trunk/LMDZ.GENERIC/libf/phystd/setspv.F90
r1397 r2831 130 130 sum = sum+STELLARF(N) 131 131 end do 132 write(6,'("setspv: Stellar flux at 1 AU = ",f 7.2," W m-2")') sum132 write(6,'("setspv: Stellar flux at 1 AU = ",f9.2," W m-2")') sum 133 133 print*,' ' 134 134 -
trunk/LMDZ.GENERIC/libf/phystd/su_gases.F90
r1315 r2831 109 109 igas_C2H2=igas 110 110 count=count+1 111 !! GG MODIF 11 Jan 2019 112 elseif (trim(gnom(igas)).eq."OCS") then 113 igas_OCS=igas 114 count=count+1 115 elseif (trim(gnom(igas)).eq."HCl") then 116 igas_HCl=igas 117 count=count+1 118 elseif (trim(gnom(igas)).eq."HF") then 119 igas_HF=igas 120 count=count+1 111 121 endif 112 122 enddo -
trunk/LMDZ.GENERIC/libf/phystd/suaer_corrk.F90
r2804 r2831 232 232 ! added by SG 233 233 endif 234 235 ! VENUS CLOUDS 236 237 if (iaer.eq.iaero_venus1) then 238 print*, 'naerkind= venus1', iaer 239 240 ! visible 241 file_id(iaer,1) = 'optprop_h2so4vis_n50.dat' 242 lamrefvis(iaer)=1.5E-6 ! no idea, must find 243 ! infrared 244 file_id(iaer,2) = 'optprop_h2so4ir_n50.dat' 245 lamrefir(iaer)=9.3E-6 ! no idea, must find 246 ! added by SL 247 endif 248 249 if (iaer.eq.iaero_venus2) then 250 print*, 'naerkind= venus2', iaer 251 252 ! visible 253 file_id(iaer,1) = 'optprop_h2so4vis_n50.dat' 254 lamrefvis(iaer)=1.5E-6 ! no idea, must find 255 ! infrared 256 file_id(iaer,2) = 'optprop_h2so4ir_n50.dat' 257 lamrefir(iaer)=9.3E-6 ! no idea, must find 258 ! added by SL 259 endif 260 261 if (iaer.eq.iaero_venus2p) then 262 print*, 'naerkind= venus2p', iaer 263 264 ! visible 265 file_id(iaer,1) = 'optprop_h2so4vis_n50.dat' 266 lamrefvis(iaer)=1.5E-6 ! no idea, must find 267 ! infrared 268 file_id(iaer,2) = 'optprop_h2so4ir_n50.dat' 269 lamrefir(iaer)=9.3E-6 ! no idea, must find 270 ! added by SL 271 endif 272 273 if (iaer.eq.iaero_venus3) then 274 print*, 'naerkind= venus3', iaer 275 276 ! visible 277 file_id(iaer,1) = 'optprop_h2so4vis_n50.dat' 278 lamrefvis(iaer)=1.5E-6 ! no idea, must find 279 ! infrared 280 file_id(iaer,2) = 'optprop_h2so4ir_n50.dat' 281 lamrefir(iaer)=9.3E-6 ! no idea, must find 282 ! added by SL 283 endif 284 285 if (iaer.eq.iaero_venusUV) then 286 print*, 'naerkind= venusUV', iaer 287 288 ! visible 289 file_id(iaer,1) = 'optprop_venusUVvis.dat' 290 lamrefvis(iaer)=3.5E-7 ! Haus et al. 2015 291 ! infrared 292 file_id(iaer,2) = 'optprop_venusUVir.dat' 293 lamrefir(iaer)=9.3E-6 ! not used anyway 294 ! added by SL 295 endif 296 297 ! END VENUS CLOUDS 298 234 299 ! the following was added by LT 235 300 do ia=1,aerogeneric ! Read Radiative Generic Condensable Species data … … 265 330 endif 266 331 enddo ! ia=1,aerogeneric 267 enddo 332 enddo ! of do iaer=1,naerkind 268 333 269 334 !------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.