Changeset 3572 for trunk/LMDZ.PLUTO/libf
- Timestamp:
- Jan 13, 2025, 2:52:33 PM (2 weeks ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/aeropacity.F90
r3275 r3572 6 6 7 7 Subroutine aeropacity(ngrid,nlayer,nq,pplay,pplev,pt, pq, & 8 aerosol,reffrad,nueffrad, QREFvis3d,QREFir3d,tau_col, & 9 cloudfrac,totcloudfrac,clearsky) 8 aerosol,reffrad,nueffrad, QREFvis3d,QREFir3d,tau_col) 10 9 11 10 use radinc_h, only : L_TAUMAX,naerkind 12 use aerosol_mod, only: iaero_haze, i_haze, iaero_generic, & 13 noaero 11 use aerosol_mod, only: iaero_haze, i_haze 14 12 USE tracer_h, only: noms,rho_n2,rho_ice,rho_q,mmol 15 13 use comcstfi_mod, only: g, pi, mugaz, avocado 16 14 use geometry_mod, only: latitude 17 use callkeys_mod, only: aerofixn2,kastprof,cloudlvl, & 18 pres_bottom_tropo,pres_top_tropo,obs_tau_col_tropo, & 19 pres_bottom_strato,pres_top_strato,obs_tau_col_strato, & 20 nlayaero, aeronlay_tauref, aeronlay_choice, & 21 aeronlay_pbot, aeronlay_ptop, aeronlay_sclhght, & 22 aerogeneric 23 use generic_tracer_index_mod, only: generic_tracer_index 15 use callkeys_mod, only: kastprof 24 16 implicit none 25 17 … … 70 62 REAL,INTENT(IN) :: QREFir3d(ngrid,nlayer,naerkind) 71 63 REAL,INTENT(OUT):: tau_col(ngrid) !column integrated visible optical depth 72 ! BENJAMIN MODIFS73 real,intent(in) :: cloudfrac(ngrid,nlayer) ! cloud fraction74 real,intent(out) :: totcloudfrac(ngrid) ! total cloud fraction75 logical,intent(in) :: clearsky76 64 77 65 real aerosol0, obs_tau_col_aurora, pm … … 96 84 integer igen_ice,igen_gas ! to store the index of generic tracer 97 85 logical dummy_bool ! dummy boolean just in case we need one 98 ! integer i_rgcs_ice(aerogeneric)99 86 ! for venus clouds 100 87 real :: p_bot,p_top,h_bot,h_top,mode_dens,h_lay … … 112 99 endif 113 100 enddo 114 115 if (noaero) then116 print*, "No active aerosols found in aeropacity"117 else118 print*, "If you would like to use aerosols, make sure any old"119 print*, "start files are updated in newstart using the option"120 print*, "q=0"121 write(*,*) "Active aerosols found in aeropacity:"122 endif123 101 124 102 firstcall=.false. -
trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90
r3353 r3572 10 10 integer, save :: iaero_haze = 0 11 11 integer, save :: i_haze = 0 12 logical, save, protected :: noaero = .false. 13 !$OMP THREADPRIVATE(iaero_haze,i_haze,noaero) 14 15 ! two-layer simple aerosol model 16 integer, save, protected :: iaero_back2lay = 0 17 ! N-layer aerosol model (replaces the 2-layer and hard-coded clouds) 18 integer,dimension(:), allocatable, save, protected :: iaero_nlay 19 !$OMP THREADPRIVATE(iaero_back2lay,iaero_nlay) 20 21 ! Generic aerosols 22 integer, dimension(:), allocatable, save, protected :: iaero_generic 23 integer, dimension(:), allocatable, save, protected :: i_rgcs_ice 24 !$OMP THREADPRIVATE(iaero_generic,i_rgcs_ice) 12 !$OMP THREADPRIVATE(iaero_haze,i_haze) 25 13 26 14 !================================================================== -
trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90
r3547 r3572 13 13 OLR_nu,OSR_nu,GSR_nu, & 14 14 int_dtaui,int_dtauv, & 15 tau_col,cloudfrac,totcloudfrac, & 16 clearsky,firstcall,lastcall) 15 tau_col,firstcall,lastcall) 17 16 18 17 use mod_phys_lmdz_para, only : is_master … … 30 29 use aeropacity_mod, only: aeropacity 31 30 use aeroptproperties_mod, only: aeroptproperties 32 use tracer_h, only: constants_epsi_generic,igcm_ch4_gas,igcm_n2,mmol31 use tracer_h, only: igcm_ch4_gas,igcm_n2,mmol 33 32 use comcstfi_mod, only: pi, mugaz, cpp, r, g 34 use callkeys_mod, only: varactive,diurnal,tracer,varfixed,satval, &33 use callkeys_mod, only: diurnal,tracer,varfixed,satval, & 35 34 diagdtau,kastprof,strictboundcorrk,specOLR, & 36 35 tplanckmin,tplanckmax,global1d, & 37 generic_condensation,aerohaze,haze_radproffix,&36 optichaze,haze_radproffix,& 38 37 methane,carbox,cooling,nlte,strobel,& 39 38 ch4fix,vmrch4_proffix,vmrch4fix … … 43 42 use sfluxv_mod, only: sfluxv 44 43 use recombin_corrk_mod, only: corrk_recombin, call_recombin 45 use generic_cloud_common_h, only: Psat_generic, epsi_generic46 use generic_tracer_index_mod, only: generic_tracer_index47 44 use planetwide_mod, only: planetwide_maxval, planetwide_minval 48 45 use radcommon_h, only: wavev,wavei … … 88 85 REAL,INTENT(IN) :: dist_star ! Distance star-planet (AU). 89 86 REAL,INTENT(IN) :: muvar(ngrid,nlayer+1) 90 REAL,INTENT(IN) :: cloudfrac(ngrid,nlayer) ! Fraction of clouds (%).91 logical,intent(in) :: clearsky92 87 logical,intent(in) :: firstcall ! Signals first call to physics. 93 88 logical,intent(in) :: lastcall ! Signals last call to physics. … … 108 103 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aeropacity. 109 104 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 110 REAL,INTENT(OUT) :: totcloudfrac(ngrid) ! Column Fraction of clouds (%).111 105 REAL,INTENT(OUT) :: int_dtaui(ngrid,nlayer,L_NSPECTI) ! VI optical thickness of layers within narrowbands for diags (). 112 106 REAL,INTENT(OUT) :: int_dtauv(ngrid,nlayer,L_NSPECTV) ! IR optical thickness of layers within narrowbands for diags (). … … 200 194 character(len=10),parameter :: subname="callcorrk" 201 195 202 ! For fixed water vapour profiles.203 integer i_var204 real RH205 real*8 pq_temp(nlayer)206 ! real(KIND=r8) :: pq_temp(nlayer) ! better F90 way.. DOESNT PORT TO F77!!!207 real psat,qsat208 209 196 logical OLRz 210 197 real*8 NFLUXGNDV_nu(L_NSPECTV) … … 235 222 236 223 integer ok ! status (returned by NetCDF functions) 237 238 integer igcm_generic_gas, igcm_generic_ice! index of the vap and ice of generic_tracer239 logical call_ice_gas_generic ! to call only one time the ice/vap pair of a tracer240 real, save :: metallicity ! metallicity of planet --- is not used here, but necessary to call function Psat_generic241 !$OMP THREADPRIVATE(metallicity)242 REAL, SAVE :: qvap_deep ! deep mixing ratio of water vapor when simulating bottom less planets243 !$OMP THREADPRIVATE(qvap_deep)244 224 245 225 REAL :: maxvalue,minvalue … … 453 433 endif 454 434 455 456 if(varfixed .and. (generic_condensation .or. methane .or. carbox))then457 write(*,*) "Deep generic tracer vapor mixing ratio ? (no effect if negative) "458 qvap_deep=-1. ! default value459 call getin_p("qvap_deep",qvap_deep)460 write(*,*) " qvap_deep = ",qvap_deep461 462 metallicity=0.0 ! default value --- is not used here but necessary to call function Psat_generic463 call getin_p("metallicity",metallicity) ! --- is not used here but necessary to call function Psat_generic464 endif465 466 435 end if ! of if (firstcall) 467 436 … … 485 454 ! Effective radius and variance of the aerosols 486 455 !-------------------------------------------------- 487 if ( aerohaze) then456 if (optichaze) then 488 457 do iaer=1,naerkind 489 458 if ((iaer.eq.iaero_haze)) then … … 511 480 end do 512 481 513 if ( aerohaze) then482 if (optichaze) then 514 483 515 484 ! Get 3D aerosol optical properties. … … 522 491 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq,aerosol, & 523 492 reffrad,nueffrad,QREFvis3d,QREFir3d, & 524 tau_col ,cloudfrac,totcloudfrac,clearsky)493 tau_col) 525 494 endif 526 495 … … 578 547 579 548 ! AF24: for now only consider one aerosol (=haze) 580 if ( aerohaze) then549 if (optichaze) then 581 550 do iaer=1,naerkind 582 551 ! Shortwave. … … 685 654 end do ! L_LEVELS 686 655 end do ! naerkind 687 end if ! aerohaze656 end if ! optichaze 688 657 689 658 !----------------------------------------------------------------------- 690 659 ! Aerosol optical depths 691 660 !----------------------------------------------------------------------- 692 if ( aerohaze) then661 if (optichaze) then 693 662 do iaer=1,naerkind ! a bug was here 694 663 do k=0,nlayer-1 … … 711 680 else 712 681 tauaero(:,:)=0 713 end if ! aerohaze682 end if ! optichaze 714 683 715 684 ! Albedo and Emissivity. … … 721 690 acosz=mu0(ig) ! Cosine of sun incident angle : 3D simulations or local 1D simulations using latitude. 722 691 723 724 692 !----------------------------------------------------------------------- 725 ! GCS (Generic Condensable Specie) Vapor 726 ! If you have GCS tracers and they are : variable & radiatively active 727 ! 728 ! NC22 693 ! Methane Vapor 729 694 !----------------------------------------------------------------------- 730 731 if (generic_condensation .or. methane .or. carbox) then 732 733 ! IF (methane) then 734 735 ! do l=1,nlayer 736 ! qvar(2*l) = vmrch4(ig,nlayer+1-l)/100.* & 737 ! mmol(igcm_ch4_gas)/mmol(igcm_n2) 738 ! qvar(2*l+1) = ((vmrch4(ig,nlayer+1-l)+vmrch4(ig, & 739 ! max(nlayer-l,1)))/2.)/100.* & 740 ! mmol(igcm_ch4_gas)/mmol(igcm_n2) 741 ! end do 742 ! qvar(1)=qvar(2) 743 744 ! ELSE 745 746 ! For now, only one GCS tracer can be both variable and radiatively active 747 ! If you set two GCS tracers, that are variable and radiatively active, 748 ! the last one in tracer.def will be chosen as the one that will be vadiatively active 749 750 do iq=1,nq 751 752 call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic) 753 754 if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer 755 756 if(varactive)then 757 758 i_var=igcm_generic_gas 759 do l=1,nlayer 760 qvar(2*l) = pq(ig,nlayer+1-l,i_var) 761 qvar(2*l+1) = pq(ig,nlayer+1-l,i_var) 762 !JL13index qvar(2*l+1) = (pq(ig,nlayer+1-l,i_var)+pq(ig,max(nlayer-l,1),i_var))/2 763 !JL13index ! Average approximation as for temperature... 764 end do 765 qvar(1)=qvar(2) 766 767 elseif(varfixed .and. (qvap_deep .ge. 0))then 768 769 do l=1,nlayer ! Here we will assign fixed water vapour profiles globally. 770 771 call Psat_generic(pt(ig,l),pplay(ig,l),metallicity,psat,qsat) 772 773 if (qsat .lt. qvap_deep) then 774 pq_temp(l) = qsat ! fully saturated everywhere 775 else 776 pq_temp(l) = qvap_deep 777 end if 778 779 end do 780 781 do l=1,nlayer 782 qvar(2*l) = pq_temp(nlayer+1-l) 783 qvar(2*l+1) = (pq_temp(nlayer+1-l)+pq_temp(max(nlayer-l,1)))/2 784 end do 785 786 qvar(1)=qvar(2) 787 788 else 789 do k=1,L_LEVELS 790 qvar(k) = 1.0D-7 791 end do 792 end if ! varactive/varfixed 793 794 endif 795 796 end do ! do iq=1,nq loop on tracers 797 798 end if ! if (generic_condensation) 799 800 !----------------------------------------------------------------------- 801 ! No Water vapor and No GCS (Generic Condensable Specie) vapor 802 !----------------------------------------------------------------------- 803 804 if (.not. (generic_condensation .or. methane .or. carbox)) then 695 if (methane) then 696 do l=1,nlayer 697 qvar(2*l) = vmrch4(ig,nlayer+1-l)/100.* & 698 mmol(igcm_ch4_gas)/mmol(igcm_n2) 699 qvar(2*l+1) = ((vmrch4(ig,nlayer+1-l)+vmrch4(ig, & 700 max(nlayer-l,1)))/2.)/100.* & 701 mmol(igcm_ch4_gas)/mmol(igcm_n2) 702 end do 703 qvar(1)=qvar(2) 704 705 else 805 706 do k=1,L_LEVELS 806 707 qvar(k) = 1.0D-7 807 708 end do 808 end if ! if (.not. generic_condensation) 809 810 811 if(.not.kastprof)then 812 ! IMPORTANT: Now convert from kg/kg to mol/mol. 813 do k=1,L_LEVELS 814 if (generic_condensation .or. methane .or. carbox) then 815 do iq=1,nq 816 call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic) 817 if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer 818 if(.not. varactive .or. i_var.eq.iq)then 819 820 epsi_generic=constants_epsi_generic(iq) 821 822 qvar(k) = qvar(k)/(epsi_generic+qvar(k)*(1.-epsi_generic)) 823 endif 824 825 endif 826 end do ! do iq=1,nq loop on tracers 827 endif 828 end do 829 end if 709 end if ! end methane 830 710 831 711 !----------------------------------------------------------------------- … … 834 714 835 715 DO l=1,nlayer 836 muvarrad(2*l) = muvar(ig,nlayer+2-l) 837 716 muvarrad(2*l) = muvar(ig,nlayer+2-l) 717 muvarrad(2*l+1) = (muvar(ig,nlayer+2-l)+muvar(ig,max(nlayer+1-l,1)))/2 838 718 END DO 839 719 -
trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90
r3504 r3572 10 10 dtlw,dtsw,fluxsurf_lw, & 11 11 fluxsurf_sw,fluxtop_lw,fluxtop_sw,fluxtop_dn, & 12 reffrad,tau_col,ptime,pday,cloudfrac,totcloudfrac, & 13 clearsky,firstcall,lastcall) 12 reffrad,tau_col,ptime,pday,firstcall,lastcall) 14 13 15 14 use radinc_h … … 25 24 use tracer_h, only: igcm_n2,igcm_ch4_gas,igcm_ch4_ice,rho_ch4_ice,lw_ch4,& 26 25 mmol 27 use callkeys_mod, only: aerohaze,ch4fix,cooling,methane,nlte,&26 use callkeys_mod, only: optichaze,ch4fix,cooling,methane,nlte,& 28 27 strobel,vmrch4_proffix,specOLR,vmrch4fix,& 29 28 haze_radproffix … … 68 67 REAL zzlay(ngrid,nlayer) ! altitude at the middle of the layers 69 68 REAL pplev(ngrid,nlayer+1) ! pres. level at GCM layer boundaries 70 REAL cloudfrac(ngrid,nlayer) ! Fraction of clouds (%).71 logical clearsky72 69 73 70 REAL pt(ngrid,nlayer) ! air temperature (K) … … 104 101 REAL fluxtop_sw(ngrid) ! outgoing LW flux to space (W/m2) 105 102 REAL fluxtop_dn(ngrid) ! incident top of atmosphere SW flux (W/m2) 106 REAL totcloudfrac(ngrid) ! Column Fraction of clouds (%).107 103 108 104 !----------------------------------------------------------------------- … … 239 235 240 236 ! Radiative Hazes 241 if ( aerohaze) then237 if (optichaze) then 242 238 243 239 ! AF24: TODO check duplicate suaer_corrk called from physiq_mod 244 ! print*,' aerohaze: starting suaer_corrk'240 ! print*,'optichaze: starting suaer_corrk' 245 241 ! call suaer_corrk ! set up aerosol optical properties 246 242 ! print*,'ending suaer_corrk' … … 297 293 ! Get 3D aerosol optical properties. 298 294 ! ici on selectionne les proprietes opt correspondant a reffrad 299 if ( aerohaze) then295 if (optichaze) then 300 296 !-------------------------------------------------- 301 297 ! Effective radius and variance of the aerosols if profil non 302 ! uniform. Called only if aerohaze=true.298 ! uniform. Called only if optichaze=true. 303 299 !-------------------------------------------------- 304 300 … … 311 307 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq,aerosol, & 312 308 reffrad,nueffrad,QREFvis3d,QREFir3d, & 313 tau_col ,cloudfrac,totcloudfrac,clearsky)309 tau_col) 314 310 endif 315 311 … … 360 356 ! Aerosol optical properties Qext, Qscat and g on each band 361 357 ! The transformation in the vertical is the same as for temperature 362 if ( aerohaze) then358 if (optichaze) then 363 359 ! shortwave 364 360 do iaer=1,naerkind … … 464 460 end do ! naerkind 465 461 466 endif ! aerohaze462 endif ! optichaze 467 463 468 464 !----------------------------------------------------------------------- 469 465 ! Aerosol optical depths 470 IF ( aerohaze) THEN466 IF (optichaze) THEN 471 467 do iaer=1,naerkind ! heritage generic 472 468 do k=0,nlayer-1 -
trunk/LMDZ.PLUTO/libf/phypluto/callkeys_mod.F90
r3557 r3572 37 37 logical,save :: varfixed 38 38 logical,save :: sedimentation 39 logical,save :: generic_condensation 40 !$OMP THREADPRIVATE(varactive,varfixed,sedimentation,generic_condensation) 41 logical,save :: aeron2, aeroh2o, aeroh2so4, aeroback2lay 42 !$OMP THREADPRIVATE(aeron2, aeroh2o, aeroh2so4, aeroback2lay) 43 logical,save :: aeronh3, aeronlay, aeroaurora 44 !$OMP THREADPRIVATE(aeronh3,aeronlay,aeroaurora) 45 46 logical,save :: aerofixn2 47 !$OMP THREADPRIVATE(aerofixn2) 48 integer,save :: aerogeneric ! number of aerosols of "generic" kind 49 !$OMP THREADPRIVATE(aerogeneric) 39 !$OMP THREADPRIVATE(varactive,varfixed,sedimentation) 40 50 41 logical,save :: nosurf 51 42 !$OMP THREADPRIVATE(nosurf) … … 62 53 logical,save :: haze,haze_proffix,haze_radproffix 63 54 !$OMP THREADPRIVATE(haze,haze_proffix,haze_radproffix) 64 logical,save :: fasthaze,changeti,changetid, aerohaze,fractal65 !$OMP THREADPRIVATE(fasthaze,changeti,changetid, aerohaze,fractal)55 logical,save :: fasthaze,changeti,changetid,optichaze,fractal 56 !$OMP THREADPRIVATE(fasthaze,changeti,changetid,optichaze,fractal) 66 57 logical,save :: fast,metcloud,monoxcloud,glaflow,triton,paleo 67 58 !$OMP THREADPRIVATE(fast,metcloud,monoxcloud,glaflow,triton,paleo) … … 224 215 integer,save :: versH2H2cia 225 216 character(64),save :: H2orthopara_mixture 226 integer,save :: nlayaero 227 !$OMP THREADPRIVATE(iddist,iaervar,iradia,startype,versH2H2cia,H2orthopara_mixture,nlayaero) 228 integer,dimension(:),allocatable,save :: aeronlay_choice 229 !$OMP THREADPRIVATE(aeronlay_choice) 230 231 character(64),save :: optprop_back2lay_vis 232 character(64),save :: optprop_back2lay_ir 233 character(64),dimension(:),allocatable,save :: optprop_aeronlay_vis 234 character(64),dimension(:),allocatable,save :: optprop_aeronlay_ir 235 !$OMP THREADPRIVATE(optprop_back2lay_vis,optprop_back2lay_ir,optprop_aeronlay_vis,optprop_aeronlay_ir) 217 !$OMP THREADPRIVATE(iddist,iaervar,iradia,startype,versH2H2cia,H2orthopara_mixture) 236 218 237 219 real,save :: tplanckmin … … 246 228 real,save :: Tstrat 247 229 real,save :: tplanet 248 real,save :: obs_tau_col_tropo 249 real,save :: obs_tau_col_strato 250 !$OMP THREADPRIVATE(Tstrat,tplanet,obs_tau_col_tropo,obs_tau_col_strato) 251 real,save :: pres_bottom_tropo 252 real,save :: pres_top_tropo 253 real,save :: pres_bottom_strato 254 real,save :: pres_top_strato 255 !$OMP THREADPRIVATE(pres_bottom_tropo,pres_top_tropo,pres_bottom_strato,pres_top_strato) 256 real,save :: size_tropo 257 real,save :: size_strato 230 !$OMP THREADPRIVATE(Tstrat,tplanet) 258 231 real,save :: satval 259 232 real,save :: n2mixratio 260 !$OMP THREADPRIVATE(size_tropo,size_strato,satval,n2mixratio) 261 real,save :: size_nh3_cloud 262 real,save :: pres_nh3_cloud 263 real,save :: tau_nh3_cloud 264 !$OMP THREADPRIVATE(size_nh3_cloud, pres_nh3_cloud, tau_nh3_cloud) 265 real,dimension(:),allocatable,save :: aeronlay_tauref 266 real,dimension(:),allocatable,save :: aeronlay_lamref 267 real,dimension(:),allocatable,save :: aeronlay_ptop 268 real,dimension(:),allocatable,save :: aeronlay_pbot 269 real,dimension(:),allocatable,save :: aeronlay_sclhght 270 real,dimension(:),allocatable,save :: aeronlay_size 271 real,dimension(:),allocatable,save :: aeronlay_nueff 272 !$OMP THREADPRIVATE(aeronlay_tauref,aeronlay_lamref,aeronlay_ptop,aeronlay_pbot,aeronlay_sclhght,aeronlay_size,aeronlay_nueff) 233 !$OMP THREADPRIVATE(satval,n2mixratio) 273 234 real,save :: n2supsat 274 235 real,save :: pceil … … 279 240 real,save :: Tsaldiff 280 241 real,save :: tau_relax 281 real,save :: cloudlvl282 242 real,save :: icetstep 283 243 real,save :: intheat 284 !$OMP THREADPRIVATE(Tsaldiff,tau_relax, cloudlvl,icetstep,intheat)244 !$OMP THREADPRIVATE(Tsaldiff,tau_relax,icetstep,intheat) 285 245 real,save :: surfalbedo 286 246 real,save :: surfemis -
trunk/LMDZ.PLUTO/libf/phypluto/comm_wrf.F90
r3184 r3572 18 18 REAL,SAVE,ALLOCATABLE :: comm_RICE(:,:) 19 19 REAL,SAVE,ALLOCATABLE :: comm_GEOP(:,:) 20 REAL,SAVE,ALLOCATABLE :: comm_CLOUDFRAC(:,:)21 REAL,SAVE,ALLOCATABLE :: comm_TOTCLOUDFRAC(:)22 20 REAL,SAVE,ALLOCATABLE :: comm_RH(:,:) 23 21 REAL,SAVE,ALLOCATABLE :: comm_DQICE(:,:) … … 56 54 allocate(comm_RICE(ngrid,nlayer)) 57 55 allocate(comm_GEOP(ngrid,nlayer)) 58 allocate(comm_CLOUDFRAC(ngrid,nlayer))59 allocate(comm_TOTCLOUDFRAC(ngrid))60 56 allocate(comm_RH(ngrid,nlayer)) 61 57 allocate(comm_DQICE(ngrid,nlayer)) … … 92 88 deallocate(comm_RICE) 93 89 deallocate(comm_GEOP) 94 deallocate(comm_CLOUDFRAC)95 deallocate(comm_TOTCLOUDFRAC)96 90 deallocate(comm_RH) 97 91 deallocate(comm_DQICE) -
trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/kcm1d.F90
r3184 r3572 75 75 76 76 ! not used 77 real cloudfrac(1,llm)78 real totcloudfrac(1)79 77 real tau_col(1) 80 78 … … 104 102 105 103 pi=2.E+0*asin(1.E+0) 106 107 cloudfrac(1,:) = 0.0108 totcloudfrac(1) = 0.0109 110 104 111 105 nlayer=llm … … 385 379 fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu, & 386 380 int_dtaui,int_dtauv, & 387 tau_col,cloudfrac,totcloudfrac, & 388 .false.,firstcall,lastcall) 381 tau_col,firstcall,lastcall) 389 382 390 383 !write(*,*) 'BASE 3' … … 396 389 ! fluxsurfabs_sw,'T',fluxtop_lw,'U', & 397 390 ! fluxabs_sw,'V',fluxtop_dn,'W',OLR_nu,'X',OSR_nu,'Y',tau_col,'Z', & 398 ! cloudfrac,'A1',totcloudfrac,'A2',.false.,'A3',firstcall,'A4',lastcall391 ! .false.,'A3',firstcall,'A4',lastcall 399 392 400 393 … … 437 430 fluxtop_lw, fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu, & 438 431 int_dtaui,int_dtauv, & 439 tau_col,cloudfrac,totcloudfrac, & 440 .false.,firstcall,lastcall) 432 tau_col,firstcall,lastcall) 441 433 442 434 … … 449 441 ! fluxsurfabs_sw,'T',fluxtop_lw,'U', & 450 442 ! fluxabs_sw,'V',fluxtop_dn,'W',OLR_nu,'X',OSR_nu,'Y',tau_col,'Z', & 451 ! cloudfrac,'A1',totcloudfrac,'A2',.false.,'A3',firstcall,'A4',lastcall443 ! .false.,'A3',firstcall,'A4',lastcall 452 444 453 445 -
trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
r3557 r3572 776 776 if (is_master)write(*,*)trim(rname)//& 777 777 "Radiatively active haze ?" 778 aerohaze=.false. ! default value779 call getin_p(" aerohaze",aerohaze)780 if (is_master)write(*,*)trim(rname)//& 781 " aerohaze = ",aerohaze778 optichaze=.false. ! default value 779 call getin_p("optichaze",optichaze) 780 if (is_master)write(*,*)trim(rname)//& 781 "optichaze = ",optichaze 782 782 783 783 if (is_master)write(*,*)trim(rname)//& … … 1198 1198 1199 1199 !================================= 1200 ! TWOLAY scheme and NH3 cloudare left for retrocompatibility only,1201 ! You should now use N-LAYER scheme (see below).1202 1203 if (is_master) write(*,*)trim(rname)//&1204 ": Radiatively active two-layer aerosols?"1205 aeroback2lay=.false. ! default value1206 call getin_p("aeroback2lay",aeroback2lay)1207 if (is_master) write(*,*)trim(rname)//": aeroback2lay = ",aeroback2lay1208 1209 if (aeroback2lay.and.is_master) then1210 print*,'Warning : The TWOLAY AEROSOL scheme is deprecated and buggy...'1211 print*,'You should use the generic n-layer scheme (see aeronlay).'1212 endif1213 1214 if (is_master) write(*,*)trim(rname)//": Radiatively active ammonia cloud?"1215 aeronh3=.false. ! default value1216 call getin_p("aeronh3",aeronh3)1217 if (is_master) write(*,*)trim(rname)//": aeronh3 = ",aeronh31218 1219 if (aeronh3.and.is_master) then1220 print*,'Warning : You are using specific NH3 cloud scheme ...'1221 print*,'You should use the generic n-layer scheme (see aeronlay).'1222 endif1223 1224 if (is_master) write(*,*)trim(rname)//&1225 ": TWOLAY AEROSOL: total optical depth "//&1226 "in the tropospheric layer (visible)"1227 obs_tau_col_tropo=8.D01228 call getin_p("obs_tau_col_tropo",obs_tau_col_tropo)1229 if (is_master) write(*,*)trim(rname)//&1230 ": obs_tau_col_tropo = ",obs_tau_col_tropo1231 1232 if (is_master) write(*,*)trim(rname)//&1233 ": TWOLAY AEROSOL: total optical depth "//&1234 "in the stratospheric layer (visible)"1235 obs_tau_col_strato=0.08D01236 call getin_p("obs_tau_col_strato",obs_tau_col_strato)1237 if (is_master) write(*,*)trim(rname)//&1238 ": obs_tau_col_strato = ",obs_tau_col_strato1239 1240 if (is_master) write(*,*)trim(rname)//&1241 ": TWOLAY AEROSOL: optprop_back2lay_vis?"1242 optprop_back2lay_vis = 'optprop_saturn_vis_n20.dat'1243 call getin_p("optprop_back2lay_vis",optprop_back2lay_vis)1244 if (is_master) write(*,*)trim(rname)//&1245 ": optprop_back2lay_vis = ",trim(optprop_back2lay_vis)1246 1247 if (is_master) write(*,*)trim(rname)//&1248 ": TWOLAY AEROSOL: optprop_back2lay_ir?"1249 optprop_back2lay_ir = 'optprop_saturn_ir_n20.dat'1250 call getin_p("optprop_back2lay_ir",optprop_back2lay_ir)1251 if (is_master) write(*,*)trim(rname)//&1252 ": optprop_back2lay_ir = ",trim(optprop_back2lay_ir)1253 1254 if (is_master) write(*,*)trim(rname)//&1255 ": TWOLAY AEROSOL: pres_bottom_tropo? in pa"1256 pres_bottom_tropo=66000.01257 call getin_p("pres_bottom_tropo",pres_bottom_tropo)1258 if (is_master) write(*,*)trim(rname)//&1259 ": pres_bottom_tropo = ",pres_bottom_tropo1260 1261 if (is_master) write(*,*)trim(rname)//&1262 ": TWOLAY AEROSOL: pres_top_tropo? in pa"1263 pres_top_tropo=18000.01264 call getin_p("pres_top_tropo",pres_top_tropo)1265 if (is_master) write(*,*)trim(rname)//&1266 ": pres_top_tropo = ",pres_top_tropo1267 1268 if (is_master) write(*,*)trim(rname)//&1269 ": TWOLAY AEROSOL: pres_bottom_strato? in pa"1270 pres_bottom_strato=2000.01271 call getin_p("pres_bottom_strato",pres_bottom_strato)1272 if (is_master) write(*,*)trim(rname)//&1273 ": pres_bottom_strato = ",pres_bottom_strato1274 1275 ! Sanity check1276 if (pres_bottom_strato .gt. pres_top_tropo) then1277 if(is_master) then1278 print*,'Error : TWOLAY AEROSOL, Please ensure that in callphys.def'1279 print*,'you have pres_top_tropo > pres_bottom_strato !'1280 endif1281 call abort_physic(rname," pres_top_tropo > pres_bottom_strato!",1)1282 endif1283 1284 if (is_master) write(*,*)trim(rname)//&1285 ": TWOLAY AEROSOL: pres_top_strato? in pa"1286 pres_top_strato=100.01287 call getin_p("pres_top_strato",pres_top_strato)1288 if (is_master) write(*,*)trim(rname)//&1289 ": pres_top_strato = ",pres_top_strato1290 1291 if (is_master) write(*,*)trim(rname)//&1292 ": TWOLAY AEROSOL: particle size in the ", &1293 "tropospheric layer, in meters"1294 size_tropo=2.e-61295 call getin_p("size_tropo",size_tropo)1296 if (is_master) write(*,*)trim(rname)//": size_tropo = ",size_tropo1297 1298 if (is_master) write(*,*)trim(rname)//&1299 ": TWOLAY AEROSOL: particle size in the ", &1300 "stratospheric layer, in meters"1301 size_strato=1.e-71302 call getin_p("size_strato",size_strato)1303 if (is_master) write(*,*)trim(rname)//": size_strato = ",size_strato1304 1305 if (is_master) write(*,*)trim(rname)//&1306 ": NH3 (thin) cloud: total optical depth"1307 tau_nh3_cloud=7.D01308 call getin_p("tau_nh3_cloud",tau_nh3_cloud)1309 if (is_master) write(*,*)trim(rname)//": tau_nh3_cloud = ",tau_nh3_cloud1310 1311 if (is_master) write(*,*)trim(rname)//": NH3 (thin) cloud pressure level"1312 pres_nh3_cloud=7.D01313 call getin_p("pres_nh3_cloud",pres_nh3_cloud)1314 if (is_master) write(*,*)trim(rname)//": pres_nh3_cloud = ",pres_nh3_cloud1315 1316 if (is_master) write(*,*)trim(rname)//": NH3 (thin) cloud: particle sizes"1317 size_nh3_cloud=3.e-61318 call getin_p("size_nh3_cloud",size_nh3_cloud)1319 if (is_master) write(*,*)trim(rname)//": size_nh3_cloud = ",size_nh3_cloud1320 1321 !=================================1322 ! Generic N-LAYER aerosol scheme1323 1324 if (is_master) write(*,*)trim(rname)//&1325 ": Radiatively active generic n-layer aerosols?"1326 aeronlay=.false. ! default value1327 call getin_p("aeronlay",aeronlay)1328 if (is_master) write(*,*)trim(rname)//": aeronlay = ",aeronlay1329 1330 if (is_master) write(*,*)trim(rname)//&1331 ": Number of generic aerosols layers?"1332 nlayaero=1 ! default value1333 call getin_p("nlayaero",nlayaero)1334 ! Avoid to allocate arrays of size 01335 if (aeronlay .and. nlayaero.lt.1) then1336 if (is_master) then1337 print*, " You are trying to set no generic aerosols..."1338 print*, " Set aeronlay=.false. instead ! I abort."1339 endif1340 call abort_physic(rname,"no generic aerosols...",1)1341 endif1342 if (.not. aeronlay) nlayaero=11343 if (is_master) write(*,*)trim(rname)//": nlayaero = ",nlayaero1344 1345 ! This is necessary, we just set the number of aerosol layers1346 IF(.NOT.ALLOCATED(aeronlay_tauref)) ALLOCATE(aeronlay_tauref(nlayaero))1347 IF(.NOT.ALLOCATED(aeronlay_lamref)) ALLOCATE(aeronlay_lamref(nlayaero))1348 IF(.NOT.ALLOCATED(aeronlay_choice)) ALLOCATE(aeronlay_choice(nlayaero))1349 IF(.NOT.ALLOCATED(aeronlay_pbot)) ALLOCATE(aeronlay_pbot(nlayaero))1350 IF(.NOT.ALLOCATED(aeronlay_ptop)) ALLOCATE(aeronlay_ptop(nlayaero))1351 IF(.NOT.ALLOCATED(aeronlay_sclhght)) ALLOCATE(aeronlay_sclhght(nlayaero))1352 IF(.NOT.ALLOCATED(aeronlay_size)) ALLOCATE(aeronlay_size(nlayaero))1353 IF(.NOT.ALLOCATED(aeronlay_nueff)) ALLOCATE(aeronlay_nueff(nlayaero))1354 IF(.NOT.ALLOCATED(optprop_aeronlay_ir)) ALLOCATE(optprop_aeronlay_ir(nlayaero))1355 IF(.NOT.ALLOCATED(optprop_aeronlay_vis)) ALLOCATE(optprop_aeronlay_vis(nlayaero))1356 1357 if (is_master) write(*,*)trim(rname)//&1358 ": Generic n-layer aerosols: Optical depth at reference wavelenght"1359 aeronlay_tauref=1.0E-11360 call getin_p("aeronlay_tauref",aeronlay_tauref)1361 if (is_master) write(*,*)trim(rname)//&1362 ": aeronlay_tauref = ",aeronlay_tauref1363 1364 if (is_master) write(*,*)trim(rname)//&1365 ": Generic n-layer aerosols: Reference wavelenght for optical depths (m)"1366 aeronlay_lamref=0.6E-61367 call getin_p("aeronlay_lamref",aeronlay_lamref)1368 if (is_master) write(*,*)trim(rname)//&1369 ": aeronlay_lamref = ",aeronlay_lamref1370 1371 if (is_master) then1372 write(*,*)trim(rname)//&1373 ": Generic n-layer aerosols: Vertical profile choice : "1374 write(*,*)trim(rname)//&1375 " (1) Tau btwn ptop and pbot follows atm. scale height"1376 write(*,*)trim(rname)//&1377 " or (2) Tau above pbot follows its own scale height"1378 endif1379 aeronlay_choice=11380 call getin_p("aeronlay_choice",aeronlay_choice)1381 if (is_master) write(*,*)trim(rname)//&1382 ": aeronlay_choice = ",aeronlay_choice1383 1384 if (is_master) write(*,*)trim(rname)//&1385 ": Generic n-layer aerosols: bottom pressures (Pa)"1386 aeronlay_pbot=2000.01387 call getin_p("aeronlay_pbot",aeronlay_pbot)1388 if (is_master) write(*,*)trim(rname)//": aeronlay_pbot = ",aeronlay_pbot1389 1390 if (is_master) write(*,*)trim(rname)//&1391 ": Generic n-layer aerosols: (if choice=1) Top pressures (Pa) "1392 aeronlay_ptop=300000.01393 call getin_p("aeronlay_ptop",aeronlay_ptop)1394 if (is_master) write(*,*)trim(rname)//": aeronlay_ptop = ",aeronlay_ptop1395 1396 if (is_master) write(*,*)trim(rname)//&1397 ": Generic n-layer aerosols: (if choice=2) Scale height / atm. scale height"1398 aeronlay_sclhght=0.21399 call getin_p("aeronlay_sclhght",aeronlay_sclhght)1400 if (is_master) write(*,*)trim(rname)//&1401 ": aeronlay_sclhght = ",aeronlay_sclhght1402 1403 if (is_master) write(*,*)trim(rname)//&1404 ": Generic n-layer aerosols: particles effective radii (m)"1405 aeronlay_size=1.e-61406 call getin_p("aeronlay_size",aeronlay_size)1407 if (is_master) write(*,*)trim(rname)//": aeronlay_size = ",aeronlay_size1408 1409 if (is_master) write(*,*)trim(rname)//&1410 ": Generic n-layer aerosols: particles radii effective variance"1411 aeronlay_nueff=0.11412 call getin_p("aeronlay_nueff",aeronlay_nueff)1413 if (is_master) write(*,*)trim(rname)//": aeronlay_nueff = ",aeronlay_nueff1414 1415 if (is_master) write(*,*)trim(rname)//&1416 ": Generic n-layer aerosols: VIS optical properties file"1417 optprop_aeronlay_vis = 'optprop_saturn_vis_n20.dat'1418 call getin_p("optprop_aeronlay_vis",optprop_aeronlay_vis)1419 if (is_master) write(*,*)trim(rname)//&1420 ": optprop_aeronlay_vis = ",optprop_aeronlay_vis1421 1422 if (is_master) write(*,*)trim(rname)//&1423 ": Generic n-layer aerosols: IR optical properties file"1424 optprop_aeronlay_ir = 'optprop_saturn_ir_n20.dat'1425 call getin_p("optprop_aeronlay_ir",optprop_aeronlay_ir)1426 if (is_master) write(*,*)trim(rname)//&1427 ": optprop_aeronlay_ir = ",optprop_aeronlay_ir1428 1429 1430 !=================================1431 1200 1432 1201 if (is_master) write(*,*)trim(rname)//& … … 1460 1229 call getin_p("sedimentation",sedimentation) 1461 1230 if (is_master) write(*,*)trim(rname)//": sedimentation = ",sedimentation 1462 1463 if (is_master) write(*,*)trim(rname)//": Generic Condensation of tracers ?"1464 generic_condensation=.false. !default value1465 call getin_p("generic_condensation",generic_condensation)1466 if (is_master) write(*,*)trim(rname)//": generic_condensation = ",generic_condensation1467 1231 1468 1232 if (is_master) write(*,*)trim(rname)//": Spectral Dependant albedo ?" … … 1533 1297 call abort_physic(rname, 'if paleo is set, fast must be true', 1) 1534 1298 endif 1535 if ((haze_proffix.or.haze_radproffix).and..not. aerohaze) then1536 call abort_physic(rname, 'for now, haze/rad proffix only works w aerohaze=T', 1)1299 if ((haze_proffix.or.haze_radproffix).and..not.optichaze) then 1300 call abort_physic(rname, 'for now, haze/rad_proffix only works with optichaze=T', 1) 1537 1301 endif 1538 1302 if (carbox.and.condcosurf.and.no_n2frost) then -
trunk/LMDZ.PLUTO/libf/phypluto/initracer.F90
r3557 r3572 3 3 use surfdat_h, ONLY: dryness 4 4 USE tracer_h 5 USE callkeys_mod, only: aerohaze,nb_monomer,haze,fractal,fasthaze,rad_haze,callmufi5 USE callkeys_mod, only: optichaze,nb_monomer,haze,fractal,fasthaze,rad_haze,callmufi 6 6 USE recombin_corrk_mod, ONLY: ini_recombin 7 7 USE mod_phys_lmdz_para, only: is_master, bcast 8 use generic_cloud_common_h9 8 use aerosol_mod, only: iaero_haze,i_haze 10 9 IMPLICIT NONE … … 130 129 IF (.NOT. allocated(constants_Tref)) allocate(constants_Tref(nq)) 131 130 IF (.NOT. allocated(constants_Pref)) allocate(constants_Pref(nq)) 132 IF (.NOT. allocated(constants_epsi_generic)) allocate(constants_epsi_generic(nq))133 131 IF (.NOT. allocated(constants_RLVTT_generic)) allocate(constants_RLVTT_generic(nq)) 134 IF (.NOT. allocated(constants_metallicity_coeff)) allocate(constants_metallicity_coeff(nq))135 132 IF (.NOT. allocated(constants_RCPV_generic)) allocate(constants_RCPV_generic(nq)) 136 133 … … 160 157 constants_Tref(:)=0 161 158 constants_Pref(:)=0 162 constants_epsi_generic(:)=0163 159 constants_RLVTT_generic(:)=0 164 constants_metallicity_coeff(:)=0165 160 constants_RCPV_generic(:)=0 166 161 … … 418 413 ! constants_Tref(iq)=Tref 419 414 ! constants_Pref(iq)=Pref 420 ! constants_epsi_generic(iq)=epsi_generic421 415 ! constants_RLVTT_generic(iq)=RLVTT_generic 422 ! constants_metallicity_coeff(iq)=metallicity_coeff423 416 ! constants_RCPV_generic(iq)=RCPV_generic 424 417 else … … 477 470 478 471 ia=0 479 if ( aerohaze) then480 481 482 483 484 485 486 487 488 489 490 491 492 472 if (optichaze) then 473 ia=ia+1 474 iaero_haze=ia 475 write(*,*) '--- number of haze aerosol = ', iaero_haze 476 477 block=0 ! Only one type of haze is active : the first one set in traceur.def 478 do iq=1,nq 479 tracername=noms(iq) 480 write(*,*) "--> tracername ",iq,'/',nq,' = ',tracername 481 if (tracername(1:4).eq."haze".and.block.eq.0) then 482 i_haze=iq 483 block=1 484 write(*,*) "i_haze=",i_haze 485 write(*,*) "Careful: if you set many haze traceurs in & 493 486 traceur.def,only ",tracername," will be radiatively active & 494 487 (first one in traceur.def)" 495 496 497 endif ! end aerohaze498 endif ! end haze488 endif 489 enddo 490 endif ! end optichaze 491 endif ! end callmufi or haze 499 492 500 493 ! Output for records: -
trunk/LMDZ.PLUTO/libf/phypluto/phyetat0_mod.F90
r3506 r3572 14 14 day_ini,time,tsurf,tsoil, & 15 15 emis,q2,qsurf,therm_inertia) 16 ! , cloudfrac,totcloudfrac,hice, &16 ! ,hice, & 17 17 ! rnat,pctsrf_sic) 18 18 ! ,tslab,tsea_ice,sea_ice) !AF24 -
trunk/LMDZ.PLUTO/libf/phypluto/phys_state_var_mod.F90
r3539 r3572 75 75 real,allocatable,dimension(:),save :: tau_col ! Total Aerosol Optical Depth. 76 76 !$OMP THREADPRIVATE(tau_col) 77 78 real,allocatable,dimension(:,:),save :: cloudfrac ! Fraction of clouds (%).79 real,allocatable,dimension(:),save :: totcloudfrac ! Column fraction of clouds (%).80 !$OMP THREADPRIVATE(cloudfrac,totcloudfrac)81 82 77 83 78 real,allocatable,dimension(:,:,:),save :: nueffrad ! Aerosol effective radius variance. By RW … … 139 134 ALLOCATE(ztprevious(klon,klev)) 140 135 ALLOCATE(zuprevious(klon,klev)) 141 ALLOCATE(cloudfrac(klon,klev))142 ALLOCATE(totcloudfrac(klon))143 136 ALLOCATE(reffrad(klon,klev,naerkind)) 144 137 ALLOCATE(nueffrad(klon,klev,naerkind)) … … 216 209 DEALLOCATE(ztprevious) 217 210 DEALLOCATE(zuprevious) 218 DEALLOCATE(cloudfrac)219 DEALLOCATE(totcloudfrac)220 211 DEALLOCATE(reffrad) 221 212 DEALLOCATE(nueffrad) -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3558 r3572 18 18 use ioipsl_getin_p_mod, only: getin_p 19 19 use radinc_h, only : L_NSPECTI,L_NSPECTV,naerkind, corrkdir, banddir 20 use generic_cloud_common_h, only : epsi_generic, Psat_generic21 20 use gases_h, only: gnom, gfrac 22 21 use radcommon_h, only: sigma, glat, grav, BWNV, WNOI, DWNI, DWNV, WNOV 23 22 use suaer_corrk_mod, only: suaer_corrk 24 23 use radii_mod, only: su_aer_radii,haze_reffrad_fix 25 use aerosol_mod, only: i aero_haze, i_haze, haze_prof24 use aerosol_mod, only: i_haze, haze_prof 26 25 use surfdat_h, only: phisfi, zmea, zstd, zsig, zgam, zthe, & 27 26 dryness … … 36 35 igcm_co_gas,igcm_co_ice,igcm_prec_haze,lw_n2,lw_ch4,lw_co,& 37 36 alpha_lift, alpha_devil, qextrhor, & 38 nesp, is_chim, is_condensable ,constants_epsi_generic37 nesp, is_chim, is_condensable 39 38 use time_phylmdz_mod, only: ecritphy, iphysiq, nday 40 39 use phyetat0_mod, only: phyetat0,tab_cntrl_mod … … 50 49 callrad, callsoil, nosurf, & 51 50 callconduct,callmolvis,callmoldiff, & 52 aerohaze, corrk, diagdtau,&51 corrk, diagdtau, & 53 52 diurnal, enertest, fat1au, & 54 53 icetstep, intheat, iradia, kastprof, & … … 59 58 carbox, methane,condmetsurf,condcosurf, & 60 59 oldplutovdifc,oldplutocorrk,oldplutosedim, & 61 aerohaze,haze_proffix,haze_radproffix,&60 optichaze,haze_proffix,haze_radproffix, & 62 61 source_haze, tsurfmax, albmin_ch4, & 63 season, sedimentation, generic_condensation,&62 season, sedimentation, & 64 63 specOLR, & 65 64 startphy_file, testradtimes, & … … 67 66 global1d, szangle, & 68 67 callmufi 69 use generic_tracer_index_mod, only: generic_tracer_index70 68 use check_fields_mod, only: check_physics_fields 71 69 use conc_mod, only: rnew, cpnew, ini_conc_mod … … 78 76 use turb_mod, only : q2,sensibFlux,turb_resolved 79 77 use mass_redistribution_mod, only: mass_redistribution 80 use condensation_generic_mod, only: condensation_generic81 78 use datafile_mod, only: datadir 82 79 USE vertical_layers_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt … … 295 292 real omega(ngrid,nlayer) ! omega velocity (Pa/s, >0 when downward) 296 293 297 integer i,l,ig,ierr,iq,nw,isoil,iesp, igcm_generic_gas, igcm_generic_ice 298 logical call_ice_gas_generic ! to call only one time the ice/vap pair of a tracer 294 integer i,l,ig,ierr,iq,nw,isoil,iesp 299 295 300 296 real zls ! Solar longitude (radians). … … 316 312 ! For Atmospheric Temperatures : (K/s) 317 313 real dtlscale(ngrid,nlayer) ! Largescale routine. 318 real dt_generic_condensation(ngrid,nlayer) ! condensation_generic routine.319 314 real zdtc(ngrid,nlayer) ! Condense_n2 routine. 320 315 real zdtdif(ngrid,nlayer) ! Turbdiff/vdifc routines. … … 338 333 real zdqsed(ngrid,nlayer,nq) ! Callsedim routine. 339 334 real zdqmr(ngrid,nlayer,nq) ! Mass_redistribution routine. 340 real dqvaplscale_generic(ngrid,nlayer,nq) ! condensation_generic routine.341 real dqcldlscale_generic(ngrid,nlayer,nq) ! condensation_generic routine.342 335 REAL,allocatable,save :: zdqchim(:,:,:) ! Calchim_asis routine 343 336 REAL,allocatable,save :: zdqschim(:,:) ! Calchim_asis routine … … 466 459 real dItot, dItot_tmp, dVtot, dVtot_tmp 467 460 real dWtot, dWtot_tmp, dWtots, dWtots_tmp 468 real psat_tmp ! AF24: to remove?469 470 real qsat_generic(ngrid,nlayer,nq) ! generic condensable tracers (GCS) specific concentration at saturation (kg/kg_of_air).471 real RH_generic(ngrid,nlayer,nq) ! generic condensable tracers (GCS) Relative humidity.472 real rneb_generic(ngrid,nlayer,nq) ! GCS cloud fraction (generic condensation).473 real psat_tmp_generic474 real, save :: metallicity ! metallicity of planet --- is not used here, but necessary to call function Psat_generic475 !$OMP THREADPRIVATE(metallicity)476 477 real reffrad_generic_zeros_for_wrf(ngrid,nlayer) ! !!! this is temporary, it is only a list of zeros, it will be replaced when a generic aerosol will be implemented478 461 479 462 real nconsMAX, vdifcncons(ngrid), cadjncons(ngrid) ! Vdfic water conservation test. By RW … … 650 633 endif 651 634 652 ! Set metallicity for GCS653 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~654 metallicity=0.0 ! default value --- is not used here but necessary to call function Psat_generic655 call getin_p("metallicity",metallicity) ! --- is not used here but necessary to call function Psat_generic656 657 635 if (ngrid.ne.1) then ! Note : no need to create a restart file in 1d. 658 636 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, & … … 677 655 call setspv ! Basic visible properties. 678 656 call sugas_corrk ! Set up gaseous absorption properties. 679 if ( aerohaze) then657 if (optichaze) then 680 658 call suaer_corrk ! Set up aerosol optical properties. 681 659 endif … … 754 732 755 733 ! Get Lyman alpha flux at specific Ls 756 if ( haze) then734 if (callmufi.or.haze) then 757 735 call lymalpha(zls,zfluxuv) 758 736 print*, 'Haze lyman-alpha zls,zfluxuv=',zls,zfluxuv … … 1040 1018 call abort 1041 1019 endif 1042 ! if(water) then !AF24: removed1043 1044 if(generic_condensation) then1045 do iq=1,nq1046 1047 call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)1048 1049 if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer1050 1051 epsi_generic=constants_epsi_generic(iq)1052 1053 muvar(1:ngrid,1:nlayer)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,1:nlayer,igcm_generic_gas))1054 muvar(1:ngrid,nlayer+1)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,nlayer,igcm_generic_gas))1055 1056 endif1057 end do ! do iq=1,nq loop on tracers1058 ! take into account generic condensable specie (GCS) effect on mean molecular weight1059 1060 else1061 muvar(1:ngrid,1:nlayer+1)=mugaz1062 endif1063 1064 ! if(ok_slab_ocean) then !AF24: removed1065 1020 1066 1021 ! standard callcorrk … … 1071 1026 zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw, & 1072 1027 fluxabs_sw,fluxtop_dn,reffrad,tau_col,ptime,pday, & 1073 cloudfrac,totcloudfrac,.false., &1074 1028 firstcall,lastcall) 1075 1029 albedo_equivalent(1:ngrid)=albedo(1:ngrid,1) … … 1077 1031 fluxsurf_sw(1:ngrid)*(1.-albedo(1:ngrid,1)) 1078 1032 else 1033 muvar(1:ngrid,1:nlayer+1)=mugaz 1079 1034 call callcorrk(ngrid,nlayer,pq,nq,qsurf, & 1080 1035 albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt, & … … 1084 1039 fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu, & 1085 1040 int_dtaui,int_dtauv, & 1086 tau_col,cloudfrac,totcloudfrac, & 1087 .false.,firstcall,lastcall) 1041 tau_col,firstcall,lastcall) 1088 1042 ! Radiative flux from the sky absorbed by the surface (W.m-2). 1089 1043 GSR=0.0 … … 1227 1181 taux,tauy) 1228 1182 1229 else ! if (oldplutovdifc) .and. (UseTurbDiff)1183 else ! if .not. (oldplutovdifc) .and. (UseTurbDiff) 1230 1184 1231 1185 zdh(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)/zpopsk(1:ngrid,1:nlayer) … … 1548 1502 ! VI.1. Microphysics / Aerosol particles 1549 1503 ! ---------------------------------------- 1550 ! Production for microphysics1551 IF (callmufi .and. call_haze_prod_pCH4) THEN1552 zdqphot_prec(:,:) = 0.1553 zdqphot_ch4(:,:) = 0.1554 pdqmufi_prod(:,:,:) = 0.1555 1556 call hazecloud(ngrid,nlayer,nq,ptimestep, &1557 pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,pdqmufi_prod, &1558 zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)1559 ENDIF ! end callmufi .and. .and.call_haze_prod_pCH41560 1561 1504 ! Call of microphysics 1562 1505 IF (callmufi) THEN 1506 1507 ! Production for microphysics 1508 IF (call_haze_prod_pCH4) THEN 1509 zdqphot_prec(:,:) = 0. 1510 zdqphot_ch4(:,:) = 0. 1511 pdqmufi_prod(:,:,:) = 0. 1512 call hazecloud(ngrid,nlayer,nq,ptimestep, & 1513 pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,pdqmufi_prod, & 1514 zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin) 1515 ENDIF ! end call_haze_prod_pCH4 1563 1516 1564 1517 pdqmufi(:,:,:) = 0. … … 1567 1520 1568 1521 pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:) 1522 1523 ELSE 1524 IF (haze) THEN 1525 zdqphot_prec(:,:) = 0. 1526 zdqphot_ch4(:,:) = 0. 1527 zdqhaze(:,:,:) = 0. 1528 ! Forcing to a fixed haze profile if haze_proffix 1529 if (haze_proffix.and.i_haze.gt.0.) then 1530 call haze_prof(ngrid,nlayer,zzlay,pplay,pt, & 1531 reffrad,profmmr) 1532 zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_haze))/ptimestep 1533 else 1534 call hazecloud(ngrid,nlayer,nq,ptimestep, & 1535 pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,zdqhaze, & 1536 zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin) 1537 endif 1538 pdq(:,:,:) = pdq(:,:,:) + zdqhaze(:,:,:) ! Should be updated 1539 ENDIF ! end haze 1540 1541 IF (fast.and.fasthaze) THEN 1542 call prodhaze(ngrid,nlayer,nq,ptimestep,pplev,pq,pdq,dist_star, & 1543 mu0,declin,zdqprodhaze,zdqsprodhaze,gradflux,fluxbot, & 1544 fluxlym_sol_bot,fluxlym_ipm_bot,flym_sol,flym_ipm) 1545 DO ig=1,ngrid 1546 pdq(ig,1,igcm_ch4_gas)=pdq(ig,1,igcm_ch4_gas)+ & 1547 zdqprodhaze(ig,igcm_ch4_gas) 1548 pdq(ig,1,igcm_prec_haze)=pdq(ig,1,igcm_prec_haze)+ & 1549 zdqprodhaze(ig,igcm_prec_haze) 1550 pdq(ig,1,igcm_haze)=abs(pdq(ig,1,igcm_haze)+ & 1551 zdqprodhaze(ig,igcm_haze)) 1552 qsurf(ig,igcm_haze)= qsurf(ig,igcm_haze)+ & 1553 zdqsprodhaze(ig)*ptimestep 1554 ENDDO 1555 ENDIF ! end fast.and.fasthaze 1556 1557 ! Sedimentation. 1558 if (sedimentation) then 1559 zdqsed(1:ngrid,1:nlayer,1:nq) = 0.0 1560 zdqssed(1:ngrid,1:nq) = 0.0 1561 if (oldplutosedim)then 1562 call callsedim_pluto(ngrid,nlayer,ptimestep, & 1563 pplev,zzlev,pt,pdt,rice_ch4,rice_co, & 1564 pq,pdq,zdqsed,zdqssed,nq,pphi) 1565 else 1566 call callsedim(ngrid,nlayer,ptimestep, & 1567 pplev,zzlev,pt,pdt,pq,pdq, & 1568 zdqsed,zdqssed,nq,pphi) 1569 endif 1570 ! Whether it falls as rain or snow depends only on the surface temperature 1571 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + zdqsed(1:ngrid,1:nlayer,1:nq) 1572 dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq) 1573 end if ! end of 'sedimentation' 1574 1569 1575 ENDIF ! end callmufi 1570 1571 IF (haze) THEN1572 zdqphot_prec(:,:) = 0.1573 zdqphot_ch4(:,:) = 0.1574 zdqhaze(:,:,:) = 0.1575 1576 ! Forcing to a fixed haze profile if haze_proffix1577 if (haze_proffix.and.i_haze.gt.0.) then1578 call haze_prof(ngrid,nlayer,zzlay,pplay,pt, &1579 reffrad,profmmr)1580 zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_haze))/ptimestep1581 else1582 call hazecloud(ngrid,nlayer,nq,ptimestep, &1583 pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,zdqhaze, &1584 zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)1585 endif1586 1587 pdq(:,:,:) = pdq(:,:,:) + zdqhaze(:,:,:) ! Should be updated1588 ENDIF ! end haze1589 1590 IF (fast.and.fasthaze) THEN1591 call prodhaze(ngrid,nlayer,nq,ptimestep,pplev,pq,pdq,dist_star, &1592 mu0,declin,zdqprodhaze,zdqsprodhaze,gradflux,fluxbot, &1593 fluxlym_sol_bot,fluxlym_ipm_bot,flym_sol,flym_ipm)1594 1595 DO ig=1,ngrid1596 pdq(ig,1,igcm_ch4_gas)=pdq(ig,1,igcm_ch4_gas)+ &1597 zdqprodhaze(ig,igcm_ch4_gas)1598 pdq(ig,1,igcm_prec_haze)=pdq(ig,1,igcm_prec_haze)+ &1599 zdqprodhaze(ig,igcm_prec_haze)1600 pdq(ig,1,igcm_haze)=abs(pdq(ig,1,igcm_haze)+ &1601 zdqprodhaze(ig,igcm_haze))1602 qsurf(ig,igcm_haze)= qsurf(ig,igcm_haze)+ &1603 zdqsprodhaze(ig)*ptimestep1604 ENDDO1605 ENDIF ! end fast.and.fasthaze1606 1607 ! Generic Condensation1608 if (generic_condensation) then1609 call condensation_generic(ngrid,nlayer,nq,ptimestep,pplev,pplay, &1610 pt,pq,pdt,pdq,dt_generic_condensation, &1611 dqvaplscale_generic,dqcldlscale_generic,rneb_generic)1612 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dt_generic_condensation(1:ngrid,1:nlayer)1613 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqvaplscale_generic(1:ngrid,1:nlayer,1:nq)1614 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqcldlscale_generic(1:ngrid,1:nlayer,1:nq)1615 1616 if(enertest)then1617 do ig=1,ngrid1618 genericconddE(ig) = cpp*SUM(mass(:,:)*dt_generic_condensation(:,:))1619 enddo1620 1621 call planetwide_sumval(cpp*massarea(:,:)*dt_generic_condensation(:,:)/totarea_planet,dEtot)1622 1623 if (is_master) print*,'In generic condensation atmospheric energy change =',dEtot,' W m-2'1624 end if1625 1626 ! Let's loop on tracers1627 cloudfrac(:,:)=0.01628 do iq=1,nq1629 call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)1630 if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer1631 do l = 1, nlayer1632 do ig=1,ngrid1633 cloudfrac(ig,l)=rneb_generic(ig,l,iq)1634 enddo1635 enddo1636 endif1637 end do ! do iq=1,nq loop on tracers1638 ! endif ! .not. water1639 1640 endif !generic_condensation1641 1642 ! Sedimentation.1643 if (sedimentation) then1644 1645 zdqsed(1:ngrid,1:nlayer,1:nq) = 0.01646 zdqssed(1:ngrid,1:nq) = 0.01647 1648 if (oldplutosedim)then1649 call callsedim_pluto(ngrid,nlayer,ptimestep, &1650 pplev,zzlev,pt,pdt,rice_ch4,rice_co, &1651 pq,pdq,zdqsed,zdqssed,nq,pphi)1652 1653 else1654 call callsedim(ngrid,nlayer,ptimestep, &1655 pplev,zzlev,pt,pdt,pq,pdq, &1656 zdqsed,zdqssed,nq,pphi)1657 endif1658 1659 ! Whether it falls as rain or snow depends only on the surface temperature1660 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + zdqsed(1:ngrid,1:nlayer,1:nq)1661 dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq)1662 1663 end if ! end of 'sedimentation'1664 1576 1665 1577 ! --------------- … … 1999 1911 endif ! end of 'tracer' 2000 1912 2001 2002 2003 ! Calculate RH_generic (Generic Relative Humidity) for diagnostic.2004 if(generic_condensation)then2005 RH_generic(:,:,:)=0.02006 do iq=1,nq2007 2008 call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)2009 2010 if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer2011 2012 do l = 1, nlayer2013 do ig=1,ngrid2014 call Psat_generic(zt(ig,l),pplay(ig,l),metallicity,psat_tmp_generic,qsat_generic(ig,l,iq))2015 RH_generic(ig,l,iq) = zq(ig,l,igcm_generic_gas) / qsat_generic(ig,l,iq)2016 enddo2017 enddo2018 2019 end if2020 2021 end do ! iq=1,nq2022 2023 endif ! end of 'generic_condensation'2024 2025 2026 1913 if (methane) then 2027 1914 IF (fast) then ! zq is the mixing ratio supposingly mixed in all atmosphere … … 2064 1951 zrho_haze(:,:)=0. 2065 1952 zdqrho_photprec(:,:)=0. 2066 IF (haze.and. aerohaze) then1953 IF (haze.and.optichaze) then 2067 1954 DO ig=1,ngrid 2068 1955 DO l=1,nlayer … … 2312 2199 call write_output("dEzradlw","radiative heating","w.m^-2",dEzradlw) 2313 2200 endif 2314 2315 if (generic_condensation) then2316 call write_output("genericconddE","heat from generic condensation","W m-2",genericconddE)2317 call write_output("dt_generic_condensation","heating from generic condensation","K s-1",dt_generic_condensation)2318 endif2319 2320 2201 endif ! end of 'enertest' 2321 2202 … … 2448 2329 endif 2449 2330 2450 if ( aerohaze) then2331 if (optichaze) then 2451 2332 call write_output("tau_col",& 2452 2333 "Total aerosol optical depth","opacity",tau_col) -
trunk/LMDZ.PLUTO/libf/phypluto/radii_mod.F90
r3353 r3572 29 29 use radinc_h, only: naerkind 30 30 use datafile_mod, only: hazerad_file 31 use aerosol_mod, only: iaero_haze, i_haze, & 32 iaero_generic, i_rgcs_ice 33 use callkeys_mod, only: nlayaero, aeronlay_size, & 34 aeronlay_nueff,aerogeneric 31 use aerosol_mod, only: iaero_haze, i_haze 35 32 use tracer_h, only: radius, nqtot, is_rgcs, nmono 36 33 Implicit none -
trunk/LMDZ.PLUTO/libf/phypluto/suaer_corrk.F90
r3504 r3572 16 16 use radcommon_h, only: radiustab,nsize,tstellar 17 17 use radcommon_h, only: qrefvis,qrefir,omegarefir !,omegarefvis 18 use aerosol_mod, only: noaero,iaero_haze 19 use callkeys_mod, only: tplanet, optprop_back2lay_vis, optprop_back2lay_ir, & 20 optprop_aeronlay_vis, optprop_aeronlay_ir, & 21 aeronlay_lamref, nlayaero,aerogeneric 18 use aerosol_mod, only: iaero_haze 19 use callkeys_mod, only: tplanet 22 20 use tracer_h, only: noms 23 21 … … 130 128 ! allocate file_id, as naerkind is a variable 131 129 allocate(file_id(naerkind,2)) 132 133 ! if (noaero) then134 ! print*, 'naerkind= 0'135 ! naerkind=0136 ! endif137 138 130 139 131 do iaer=1,naerkind -
trunk/LMDZ.PLUTO/libf/phypluto/tracer_h.F90
r3557 r3572 62 62 real, save, allocatable :: constants_Tref(:) ! Ref temperature for Clausis-Clapeyron (K) 63 63 real, save, allocatable :: constants_Pref(:) ! Reference pressure for Clausius Clapeyron (Pa) 64 real, save, allocatable :: constants_epsi_generic(:) ! fractionnal molecular mass (m/mugaz)65 64 real, save, allocatable :: constants_RLVTT_generic(:) ! Latent heat of vaporization (J/kg) 66 real, save, allocatable :: constants_metallicity_coeff(:) ! Coefficient to take into account the metallicity67 65 real, save, allocatable :: constants_RCPV_generic(:) ! specific heat capacity of the tracer vapor at Tref 68 66 !$OMP THREADPRIVATE(constants_mass,constants_delta_gasH,constants_Tref) 69 !$OMP THREADPRIVATE(constants_Pref ,constants_epsi_generic)70 !$OMP THREADPRIVATE(constants_RLVTT_generic,constants_ metallicity_coeff,constants_RCPV_generic)67 !$OMP THREADPRIVATE(constants_Pref) 68 !$OMP THREADPRIVATE(constants_RLVTT_generic,constants_RCPV_generic) 71 69 72 70 ! tracer indexes: these are initialized in initracer and should be 0 if the
Note: See TracChangeset
for help on using the changeset viewer.