Changeset 3353 for trunk/LMDZ.PLUTO/libf/phypluto
- Timestamp:
- May 31, 2024, 10:03:40 PM (6 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/aeroptproperties.F90
r3196 r3353 178 178 INTEGER :: ngrid,nlayer 179 179 ! Aerosol effective radius used for radiative transfer (meter) 180 REAL ,INTENT(IN):: reffrad(ngrid,nlayer,naerkind)180 REAL :: reffrad(ngrid,nlayer,naerkind) 181 181 ! Aerosol effective variance used for radiative transfer (n.u.) 182 182 REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind) … … 324 324 minrad=min(MINVAL(radiustab(1,1,1:nsize(1,1))),MINVAL(radiustab(1,2,1:nsize(1,2)))) 325 325 maxrad=min(MAXVAL(radiustab(1,1,1:nsize(1,1))),MAXVAL(radiustab(1,2,1:nsize(1,2)))) 326 IF ((MINVAL(reffrad).L E.minrad).OR.(MAXVAL(reffrad).GE.maxrad)) then326 IF ((MINVAL(reffrad).LT.minrad).OR.(MAXVAL(reffrad).GT.maxrad)) then 327 327 WRITE(*,*) 'Warning: particle size in grid box #' 328 WRITE(*,*) ig,' is too large to be used by the ' 329 WRITE(*,*) 'radiative transfer; please extend the ' 330 WRITE(*,*) 'interpolation grid to larger grain sizes.' 328 WRITE(*,*) ig,' is larger than optical properties. ' 329 WRITE(*,*) 'reffrad=',MINVAL(reffrad),'-',MAXVAL(reffrad) 331 330 WRITE(*,*) 'radiustab=',minrad,'-',maxrad 332 WRITE(*,*) 'reffrad=',MINVAL(reffrad),'-',MAXVAL(reffrad) 333 stop 331 332 ! ensure reffrad is within bounds of radiustab 333 WHERE(reffrad.LT.minrad) 334 reffrad=minrad 335 ENDWHERE 336 WHERE(reffrad.GT.maxrad) 337 reffrad=maxrad 338 ENDWHERE 339 WRITE(*,*) 'Truncated reffrad within radiustab bounds:' 340 WRITE(*,*) 'New reffrad=',MINVAL(reffrad),'-',MAXVAL(reffrad) 334 341 ENDIF 335 342 -
trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90
r3329 r3353 67 67 parameter(Nfine=701) 68 68 character(len=100) :: file_path 69 character(len=100) :: file_name 69 70 real,save :: levdat(Nfine),densdat(Nfine) 70 71 … … 74 75 IF (firstcall) then 75 76 firstcall=.false. 76 file_path=trim(datadir)//'/haze_prop/'//hazemmr_file 77 78 if (hazemmr_file/='None')then 79 file_name = hazemmr_file 80 print*, 'Read Haze MMR file: ',hazemmr_file 81 else if(hazedens_file/='None')then 82 file_name = hazedens_file 83 print*, 'Read Haze density: ',hazedens_file 84 else 85 STOP "No filename given for haze profile. Either set hazemmr_file or hazedens_file" 86 endif 87 88 file_path=trim(datadir)//'/haze_prop/'//file_name 77 89 open(224,file=file_path,form='formatted') 78 90 do ifine=1,Nfine … … 80 92 enddo 81 93 close(224) 82 print*, ' TB22 read Haze MMR profile'94 print*, 'Read Haze profile: ',file_path 83 95 ENDIF 84 96 … … 91 103 ! --> kg m-3 --> kg/kg 92 104 do iaer=1,naerkind 93 if(iaer.eq.iaero_haze.and. 1.eq.2) then !TB22activate/deactivate mmr or part density105 if(iaer.eq.iaero_haze.and.hazedens_file/='None') then !AF24 activate/deactivate mmr or part density 94 106 !print*, 'Haze profile is fixed' 95 107 do ig=1,ngrid … … 97 109 !from number density in cm-3 98 110 profmmr(ig,l)=profmmr(ig,l)*1.e6*4./3.*pi*reffrad(ig,l,iaer)**3*rho_q(i_haze)/(pplay(ig,l)/(r*pt(ig,l))) 111 ! print*, profmmr(ig,l) 99 112 enddo 100 113 enddo -
trunk/LMDZ.PLUTO/libf/phypluto/calc_cpp_mugaz.F90
r3184 r3353 11 11 ! 12 12 ! Authors 13 ! ------- 13 ! ------- 14 14 ! Robin Wordsworth (2009) 15 15 ! A. Spiga: make the routine OK with latest changes in rcm1d … … 25 25 26 26 character(len=20),parameter :: myname="calc_cpp_mugaz" 27 real cpp_c 27 real cpp_c 28 28 real mugaz_c 29 29 … … 41 41 else 42 42 ! all values at 300 K from Engineering Toolbox 43 if(igas.eq.igas_ N2)then43 if(igas.eq.igas_CO2)then 44 44 mugaz_c = mugaz_c + 44.01*gfrac(igas) 45 45 elseif(igas.eq.igas_N2)then … … 59 59 elseif(igas.eq.igas_NH3)then 60 60 mugaz_c = mugaz_c + 17.03*gfrac(igas) 61 elseif(igas.eq.igas_C2H6)then 61 elseif(igas.eq.igas_C2H6)then 62 62 ! C2H6 http://encyclopedia.airliquide.com/Encyclopedia.asp?GasID=28 63 63 mugaz_c = mugaz_c + 30.07*gfrac(igas) … … 92 92 else 93 93 ! all values at 300 K from Engineering Toolbox 94 if(igas.eq.igas_ N2)then94 if(igas.eq.igas_CO2)then 95 95 !cpp_c = cpp_c + 0.744*gfrac(igas) ! @ ~210 K (better for 96 !Mars conditions) 96 !Mars conditions) 97 97 cpp_c = cpp_c + 0.846*gfrac(igas)*44.01/mugaz_c 98 98 elseif(igas.eq.igas_N2)then -
trunk/LMDZ.PLUTO/libf/phypluto/calc_rayleigh.F90
r3184 r3353 2 2 3 3 !================================================================== 4 ! 4 ! 5 5 ! Purpose 6 6 ! ------- 7 ! Average the Rayleigh scattering in each band, weighting the 7 ! Average the Rayleigh scattering in each band, weighting the 8 8 ! average by the blackbody function at temperature tstellar. 9 ! Works for an arbitrary mix of gases (currently N2, N2 and 9 ! Works for an arbitrary mix of gases (currently N2, N2 and 10 10 ! H2 are possible). 11 ! 11 ! 12 12 ! Authors 13 ! ------- 13 ! ------- 14 14 ! Robin Wordsworth (2010) 15 15 ! Jeremy Leconte (2012): Added option for variable gas. Improved water rayleigh (Bucholtz 1995). … … 19 19 ! --------- 20 20 ! setspv.F 21 ! 21 ! 22 22 ! Calls 23 23 ! ----- 24 24 ! none 25 ! 25 ! 26 26 !================================================================== 27 27 28 28 use radinc_h, only: L_NSPECTV 29 29 use radcommon_h, only: WAVEV, BWNV, DWNV, tstellar, tauray, taurayvar, scalep 30 use gases_h, only: ngasmx, vgas, gnom, gfrac, igas_ N2, igas_H2, &30 use gases_h, only: ngasmx, vgas, gnom, gfrac, igas_CO2, igas_H2, & 31 31 igas_H2O, igas_He, igas_N2, igas_CH4, igas_CO 32 32 use comcstfi_mod, only: g, mugaz, pi … … 37 37 integer N,Nfine,ifine,igas 38 38 parameter(Nfine=500.0) 39 real*8 :: P0 = 9.423D+6 ! Rayleigh scattering reference pressure in pascals. P0 = 93*101325 Pa 39 real*8 :: P0 = 9.423D+6 ! Rayleigh scattering reference pressure in pascals. P0 = 93*101325 Pa 40 40 41 41 logical typeknown … … 70 70 if((igas/=vgas).and.(gfrac(igas).lt.5.e-2))then 71 71 print*,'Ignoring ',trim(gnom(igas)),' in Rayleigh scattering '// & 72 'as its mixing ratio is less than 0.05.' 72 'as its mixing ratio is less than 0.05.' 73 73 ! ignore variable gas in Rayleigh calculation 74 74 ! ignore gases of mixing ratio < 0.05 in Rayleigh calculation 75 75 tauconsti(igas) = 0.0 76 76 else 77 if(igas.eq.igas_ N2) then77 if(igas.eq.igas_CO2) then 78 78 ! Hansen 1974 : equation (2.32) 79 79 tauconsti(igas) = (8.7/g)*1.527*scalep/P0 … … 82 82 tauconsti(igas) = (9.81/g)*8.569E-3*scalep/(P0/93.0) 83 83 elseif(igas.eq.igas_H2O)then 84 ! tauconsti(igas) = (10.0/g)*9.22E-3*scalep/101325.0 84 ! tauconsti(igas) = (10.0/g)*9.22E-3*scalep/101325.0 85 85 tauconsti(igas) = 1.98017E-10*scalep/(g*mugaz*1E4) 86 86 elseif(igas.eq.igas_H2)then … … 103 103 ! 16.04*1.6726*1E-27 is CH4 molecular mass 104 104 tauconsti(igas) = 24.*pi**3/(1E5/(1.380648813E-23*273.15))**2 * 4./9. * 1E24 * (1/( g *16.04*1.6726*1E-27)) * scalep 105 105 106 106 elseif(igas.eq.igas_CO)then 107 107 ! see above for explanation … … 127 127 endif 128 128 129 129 130 130 do N=1,L_NSPECTV 131 131 132 132 tausum = 0.0 133 133 tauwei = 0.0 … … 147 147 tauvari(igas) = 0.0 148 148 else 149 if(igas.eq.igas_ N2)then149 if(igas.eq.igas_CO2)then 150 150 tauvari(igas) = (1.0+0.013/wl**2)/wl**4 151 151 elseif(igas.eq.igas_N2)then … … 153 153 elseif(igas.eq.igas_H2O)then 154 154 ! tauvari(igas) = 1.0/wl**4 ! to be improved... 155 tauvari(igas) = (5.7918E6/(2.38E2-1/wl**2)+1.679E5/(57.36E0-1/wl**2))**2/wl**4 155 tauvari(igas) = (5.7918E6/(2.38E2-1/wl**2)+1.679E5/(57.36E0-1/wl**2))**2/wl**4 156 156 elseif(igas.eq.igas_H2)then 157 tauvari(igas) = 1.0/wl**4 157 tauvari(igas) = 1.0/wl**4 158 158 159 159 ! below is exo_k formula : this tauvari is consistent with commented tauconsti for H2 above 160 160 ! tauvari(igas) = (8.14E-49+1.28E-50/wl**2+1.61E-51/wl**4) / wl**4 161 161 elseif(igas.eq.igas_He)then 162 tauvari(igas) = 1.0/wl**4 162 tauvari(igas) = 1.0/wl**4 163 163 elseif(igas.eq.igas_CH4)then 164 164 tauvari(igas) = (4.6662E-4+4.02E-6/wl**2)**2 / wl**4 … … 186 186 tauweivar=tauweivar+df 187 187 tausumvar=tausumvar+tauvarvar*df 188 188 189 189 enddo 190 190 TAURAY(N)=tausum/tauwei -
trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90
r3329 r3353 345 345 CALL cooling_hcn_c2h2(ngrid,nlayer,pplay, & 346 346 pt,dtlw_hcn_c2h2) 347 ! write(*,*) "Not supported yet"348 STOP349 347 endif 350 348 -
trunk/LMDZ.PLUTO/libf/phypluto/callkeys_mod.F90
r3258 r3353 197 197 logical,save :: oldplutocorrk 198 198 !$OMP THREADPRIVATE(oldplutocorrk) 199 199 logical,save :: oldplutosedim 200 !$OMP THREADPRIVATE(oldplutosedim) 200 201 logical,save :: global1d 201 202 real,save :: szangle -
trunk/LMDZ.PLUTO/libf/phypluto/datafile_mod.F90
r3329 r3353 25 25 character(len=300),save :: hazerad_file 26 26 character(len=300),save :: hazemmr_file 27 character(len=300),save :: hazedens_file 28 27 29 28 30 end module datafile_mod -
trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
r3329 r3353 13 13 use radcommon_h, only: ini_radcommon_h 14 14 use radii_mod, only: radfixed, Nmix_n2 15 use datafile_mod, only: datadir, hazeprop_file, hazerad_file, hazemmr_file15 use datafile_mod, only: datadir,hazeprop_file,hazerad_file,hazemmr_file,hazedens_file 16 16 use comdiurn_h, only: sinlat, coslat, sinlon, coslon 17 17 use comgeomfi_h, only: totarea, totarea_planet … … 148 148 149 149 if (is_master) write(*,*) "Haze mmr datafile" 150 hazemmr_file=" hazemmr.txt" ! default file150 hazemmr_file="None" ! default file 151 151 call getin_p("hazemmr_file",hazemmr_file) 152 152 if (is_master) write(*,*) trim(rname)//" hazemmr_file = ",trim(hazemmr_file) 153 153 if (is_master) write(*,*) "Haze density datafile" 154 hazedens_file="None" ! default file 155 call getin_p("hazedens_file",hazedens_file) 156 if (is_master) write(*,*) trim(rname)//" hazedens_file = ",trim(hazedens_file) 154 157 155 158 if (is_master) write(*,*) trim(rname)//& … … 312 315 call getin_p("UseTurbDiff",UseTurbDiff) 313 316 if (is_master) write(*,*) trim(rname)//": UseTurbDiff = ",UseTurbDiff 314 315 if (is_master) write(*,*) trim(rname)//": use vdifc from old Pluto ?"316 oldplutovdifc=.true. ! default value317 call getin_p("oldplutovdifc",oldplutovdifc)318 if (is_master) write(*,*) trim(rname)//": oldplutovdifc = ",oldplutovdifc319 320 if (is_master) write(*,*) trim(rname)//&321 ": call pluto.old correlated-k radiative transfer ?"322 oldplutocorrk=.true. ! default value323 call getin_p("oldplutocorrk",oldplutocorrk)324 if (is_master) write(*,*) trim(rname)//": oldplutocorrk = ",oldplutocorrk325 326 317 327 318 if (is_master) write(*,*) trim(rname)//": call convective adjustment ?" … … 636 627 " thresh_non2 = ",thresh_non2 637 628 629 ! use Pluto.old routines 630 if (is_master) write(*,*) trim(rname)//": use vdifc from old Pluto ?" 631 oldplutovdifc=.true. ! default value 632 call getin_p("oldplutovdifc",oldplutovdifc) 633 if (is_master) write(*,*) trim(rname)//": oldplutovdifc = ",oldplutovdifc 634 635 if (is_master) write(*,*) trim(rname)//& 636 ": call pluto.old correlated-k radiative transfer ?" 637 oldplutocorrk=.true. ! default value 638 call getin_p("oldplutocorrk",oldplutocorrk) 639 if (is_master) write(*,*) trim(rname)//": oldplutocorrk = ",oldplutocorrk 640 641 if (is_master) write(*,*) trim(rname)//& 642 ": call pluto.old sedimentation ?" 643 oldplutosedim=.true. ! default value 644 call getin_p("oldplutosedim",oldplutosedim) 645 if (is_master) write(*,*) trim(rname)//": oldplutosedim = ",oldplutosedim 646 638 647 !*************************************************************** 639 648 !! Haze options … … 707 716 if (is_master)write(*,*)trim(rname)//& 708 717 "nb_monomer = ",nb_monomer 718 719 if (is_master)write(*,*)trim(rname)//& 720 "fixed gaseous CH4 mixing ratio for rad transfer ?" 721 ch4fix=.false. ! default value 722 call getin_p("ch4fix",ch4fix) 723 if (is_master)write(*,*)trim(rname)//& 724 " ch4fix = ",ch4fix 725 if (is_master)write(*,*)trim(rname)//& 726 "fixed gaseous CH4 mixing ratio for rad transfer ?" 727 vmrch4fix=0.5 ! default value 728 call getin_p("vmrch4fix",vmrch4fix) 729 if (is_master)write(*,*)trim(rname)//& 730 " vmrch4fix = ",vmrch4fix 731 vmrch4_proffix=.false. ! default value 732 call getin_p("vmrch4_proffix",vmrch4_proffix) 733 if (is_master)write(*,*)trim(rname)//& 734 " vmrch4_proffix = ",vmrch4_proffix 735 736 if (is_master)write(*,*)trim(rname)//& 737 "call specific cooling for radiative transfer ?" 738 cooling=.false. ! default value 739 call getin_p("cooling",cooling) 740 if (is_master)write(*,*)trim(rname)//& 741 " cooling = ",cooling 742 743 if (is_master)write(*,*)trim(rname)//& 744 "NLTE correction for methane heating rates?" 745 nlte=.false. ! default value 746 call getin_p("nlte",nlte) 747 if (is_master)write(*,*)trim(rname)//& 748 " nlte = ",nlte 749 strobel=.false. ! default value 750 call getin_p("strobel",strobel) 751 if (is_master)write(*,*)trim(rname)//& 752 " strobel = ",strobel 709 753 710 754 if (is_master)write(*,*)trim(rname)//& -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3329 r3353 55 55 n2cond,nearn2cond,noseason_day,conservn2, & 56 56 convergeps,kbo,triton,paleo,paleoyears, & 57 carbox, methane, oldplutovdifc, oldplutocorrk, & 58 aerohaze,haze_proffix,source_haze, & 57 carbox, methane,& 58 oldplutovdifc,oldplutocorrk,oldplutosedim, & 59 aerohaze,haze_proffix,source_haze,& 59 60 season, sedimentation,generic_condensation, & 60 61 specOLR, & … … 979 980 cloudfrac,totcloudfrac,.false., & 980 981 firstcall,lastcall) 982 albedo_equivalent(1:ngrid)=albedo(1:ngrid,1) 981 983 else 982 984 call callcorrk(ngrid,nlayer,pq,nq,qsurf, & … … 1480 1482 end if 1481 1483 1482 ! if (.not. water) then1483 ! Compute GCS (Generic Condensable Specie) cloud fraction. For now we can not have both water cloud fraction and GCS cloud fraction1484 ! Water is the priority1485 ! If you have set water and generic_condensation, then cloudfrac will be water cloudfrac1486 !1487 ! If you have set generic_condensation (and not water) and you have set several GCS1488 ! then cloudfrac will be only the cloudfrac of the last generic tracer1489 ! (Because it is rewritten every tracer in the loop)1490 !1491 ! Maybe one should create a cloudfrac_generic(ngrid,nlayer,nq) with 3 dimensions, the last one for tracers1492 1493 1484 ! Let's loop on tracers 1494 1485 cloudfrac(:,:)=0.0 … … 1507 1498 endif !generic_condensation 1508 1499 1509 !Generic Rain !AF24: removed1510 1511 1500 ! Sedimentation. 1512 1501 if (sedimentation) then … … 1515 1504 zdqssed(1:ngrid,1:nq) = 0.0 1516 1505 1517 ! if(watertest)then !AF24: removed 1518 1519 call callsedim(ngrid,nlayer,ptimestep, & 1506 if (oldplutosedim)then 1507 call callsedim_pluto(ngrid,nlayer,ptimestep, & 1508 pplev,zzlev,pt,pdt,rice_ch4,rice_co, & 1509 pq,pdq,zdqsed,zdqssed,nq,pphi) 1510 1511 else 1512 call callsedim(ngrid,nlayer,ptimestep, & 1520 1513 pplev,zzlev,pt,pdt,pq,pdq, & 1521 1514 zdqsed,zdqssed,nq) 1522 1523 ! if(watertest)then !AF24: removed 1515 endif 1524 1516 1525 1517 ! Whether it falls as rain or snow depends only on the surface temperature … … 1527 1519 dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq) 1528 1520 1529 !! call writediagfi(ngrid,"callsedim_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))1530 1531 ! ! Test water conservation !AF24: removed1532 1533 1521 end if ! end of 'sedimentation' 1534 1535 !! call writediagfi(ngrid,"mass_redist_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))1536 !! call writediagfi(ngrid,"mass_redist_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))1537 1522 1538 1523 ! --------------- … … 2096 2081 !call wstats(ngrid,"ALB_1st","First Band Surface albedo"," ",2,albedo(:,1)) 2097 2082 call wstats(ngrid,"p","Pressure","Pa",3,pplay) 2083 call wstats(ngrid,"emis","Emissivity","",2,emis) 2098 2084 call wstats(ngrid,"temp","Atmospheric temperature","K",3,zt) 2099 2085 call wstats(ngrid,"u","Zonal (East-West) wind","m.s-1",3,zu) … … 2157 2143 endif 2158 2144 2145 call writediagfi(ngrid,"emis","Emissivity","",2,emis) 2159 2146 call writediagfi(ngrid,"temp","temperature","K",3,zt) 2160 2147 call writediagfi(ngrid,"teta","potential temperature","K",3,zh) -
trunk/LMDZ.PLUTO/libf/phypluto/radii_mod.F90
r3329 r3353 106 106 enddo 107 107 close(223) 108 print*, ' TB22 READ HAZERAD'108 print*, 'Read hazerad from ',file_path 109 109 ENDIF 110 110
Note: See TracChangeset
for help on using the changeset viewer.