Changeset 3794
- Timestamp:
- Jun 5, 2025, 3:39:30 PM (2 days ago)
- Location:
- trunk/LMDZ.VENUS/libf/phyvenus
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/optcv.F90
r2560 r3794 11 11 use radinc_h, only: L_NLAYRAD, L_NLEVRAD, L_LEVELS, L_NSPECTV, L_NGAUSS, L_REFVAR, NAERKIND 12 12 use radcommon_h, only: gasv, tlimit, tgasref, pfgasref,wnov,scalep,indv 13 use gases_h, only: gfrac, ngasmx, igas_H2, igas_H2O, igas_He, igas_N2 13 use gases_h, only: gfrac, ngasmx, igas_H2O, igas_CO2 14 use interpolate_continuum_mod, only: interpolate_continuum 14 15 15 16 implicit none … … 72 73 real*8 DRAYAER 73 74 double precision wn_cont, p_cont, p_air, T_cont, dtemp, dtempc 74 double precision p_cross75 75 76 76 ! variable species mixing ratio variables … … 166 166 ! if(continuum)then 167 167 ! include continua if necessary 168 wn_cont = dble(wnov(nw))169 168 T_cont = dble(TMID(k)) 170 169 do igas=1,ngasmx … … 178 177 dtemp=0.0 179 178 180 ! For Venus: only H2O, using CKD 181 if(igas.eq.igas_H2O.and.T_cont.gt.200.0)then 182 183 p_air = dble(PMID(k)*scalep) - p_cont ! note assumes background is air! 184 ! if(H2Ocont_simple)then 185 ! call interpolateH2Ocont_PPC(wn_cont,T_cont,p_cont,p_air,dtemp,.false.) 186 ! else 187 interm = indv(nw,igas,igas) 188 call interpolateH2Ocont_CKD(wn_cont,T_cont,p_cont,p_air,dtemp,.false.,interm) 189 indv(nw,igas,igas) = interm 190 ! endif 191 192 endif 179 ! For Venus: only H2O and CO2 180 do jgas=1,ngasmx 181 if ( ((igas .eq. igas_H2O) .and. (jgas .eq. igas_H2O)) .or. & 182 ((igas .eq. igas_H2O) .and. (jgas .eq. igas_CO2)) .or. & 183 ((igas .eq. igas_CO2) .and. (jgas .eq. igas_CO2)) ) then 184 call interpolate_continuum('',igas,jgas,'VI',nw,T_cont,p_cont,p_cont,dtemp,.false.) 185 endif 186 enddo 193 187 194 188 DCONT = DCONT + dtemp -
trunk/LMDZ.VENUS/libf/phyvenus/radcommon_h.F90
r3775 r3794 1 1 module radcommon_h 2 use radinc_h, only: L_NSPECT V, NTstart, NTstop, &2 use radinc_h, only: L_NSPECTI, L_NSPECTV, NTstart, NTstop, & 3 3 naerkind, nsizemax 4 4 implicit none … … 13 13 ! some or all of this common data set 14 14 ! 15 ! WNOI - Array of wavenumbers at the spectral interval 16 ! centers for the infrared. Array is NSPECTI 17 ! elements long. 18 ! DWNI - Array of "delta wavenumber", i.e., the width, 19 ! in wavenumbers (cm^-1) of each IR spectral 20 ! interval. NSPECTI elements long. 21 ! WAVEI - Array (NSPECTI elements long) of the wavelenght 22 ! (in microns) at the center of each IR spectral 23 ! interval. 15 24 ! WNOV - Array of wavenumbers at the spectral interval 16 25 ! center for the VISUAL. Array is NSPECTV … … 29 38 ! TAURAYVAR - Array (NSPECTV elements) of the pressure-independent 30 39 ! part of Rayleigh scattering optical depth for the variable gas. 40 ! FZEROI - Fraction of zeros in the IR CO2 k-coefficients, for 41 ! each temperature, pressure, and spectral interval 31 42 ! FZEROV - Fraction of zeros in the VISUAL CO2 k-coefficients, for 32 43 ! each temperature, pressure, and spectral interval … … 42 53 ! gvis : assymetry factor 43 54 ! 55 ! Longwave 56 ! ~~~~~~~~ 57 ! 58 ! For the "naerkind" kind of aerosol radiative properties : 59 ! QIRsQREF : Qext / Qext("longrefir") 60 ! omegaIR : mean single scattering albedo 61 ! gIR : mean assymetry factor 62 ! 63 ! 64 ! Note - QIRsQREF in the martian model was scaled to longrefvis, 65 ! here it is scaled to longrefir, which is actually a dummy parameter, 66 ! as we do not output scaled aerosol opacity ... 67 ! 44 68 69 REAL*8 BWNI(L_NSPECTI+1), WNOI(L_NSPECTI), DWNI(L_NSPECTI), WAVEI(L_NSPECTI) !BWNI read by master in setspi 45 70 REAL*8 BWNV(L_NSPECTV+1), WNOV(L_NSPECTV), DWNV(L_NSPECTV), WAVEV(L_NSPECTV) !BWNV read by master in setspv 46 71 REAL*8 STELLARF(L_NSPECTV), TAURAY(L_NSPECTV), TAURAYVAR(L_NSPECTV) 47 !$OMP THREADPRIVATE(WNOV,DWNV,WAVEV,& 72 !$OMP THREADPRIVATE(WNOI,DWNI,WAVEI,& 73 !$OMP WNOV,DWNV,WAVEV,& 48 74 !$OMP STELLARF,TAURAY,TAURAYVAR) 49 75 76 REAL*8 blami(L_NSPECTI+1) 50 77 REAL*8 blamv(L_NSPECTV+1) ! these are needed by suaer.F90 51 !$OMP THREADPRIVATE(blam v)78 !$OMP THREADPRIVATE(blami,blamv) 52 79 53 80 !! AS: introduced to avoid doing same computations again for continuum 81 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indi 54 82 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indv 55 !$OMP THREADPRIVATE(ind v)83 !$OMP THREADPRIVATE(indi,indv) 56 84 57 85 !!! ALLOCATABLE STUFF SO THAT DIMENSIONS ARE READ in *.dat FILES -- AS 12/2011 58 REAL*8, DIMENSION(:,:,:,:,:), ALLOCATABLE :: gas v86 REAL*8, DIMENSION(:,:,:,:,:), ALLOCATABLE :: gasi, gasv 59 87 REAL*8, DIMENSION(:), ALLOCATABLE :: PGASREF, TGASREF, PFGASREF, GWEIGHT 88 real*8 FZEROI(L_NSPECTI) 60 89 real*8 FZEROV(L_NSPECTV) 61 90 real*8 pgasmin, pgasmax 62 91 real*8 tgasmin, tgasmax 63 !$OMP THREADPRIVATE(gas v,& !pgasref,tgasref,pfgasref read by master in sugas_corrk64 !$OMP FZERO V) !pgasmin,pgasmax,tgasmin,tgasmax read by master in sugas_corrk92 !$OMP THREADPRIVATE(gasi,gasv,& !pgasref,tgasref,pfgasref read by master in sugas_corrk 93 !$OMP FZEROI,FZEROV) !pgasmin,pgasmax,tgasmin,tgasmax read by master in sugas_corrk 65 94 66 95 real QVISsQREF(L_NSPECTV,naerkind,nsizemax) 67 96 real omegavis(L_NSPECTV,naerkind,nsizemax) 68 97 real gvis(L_NSPECTV,naerkind,nsizemax) 69 !$OMP THREADPRIVATE(QVISsQREF,omegavis,gvis) 98 real QIRsQREF(L_NSPECTV,naerkind,nsizemax) 99 real omegair(L_NSPECTV,naerkind,nsizemax) 100 real gir(L_NSPECTV,naerkind,nsizemax) 101 !$OMP THREADPRIVATE(QVISsQREF,omegavis,gvis,QIRsQREF,omegair,gir) 70 102 71 103 … … 73 105 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 74 106 75 REAL lamref vis(naerkind)107 REAL lamrefir(naerkind),lamrefvis(naerkind) 76 108 77 109 ! Actual number of grain size classes in each domain for a … … 87 119 88 120 ! Extinction coefficient at reference wavelengths; 89 ! These wavelengths are defined in aeroptproperties, and called longrefvis 121 ! These wavelengths are defined in aeroptproperties, and called longrefvis and longrefir 90 122 91 123 REAL :: QREFvis(naerkind,nsizemax) 124 REAL :: QREFir(naerkind,nsizemax) 125 REAL :: omegaREFir(naerkind,nsizemax) 92 126 93 127 REAL,SAVE :: tstellar ! Stellar brightness temperature (SW) 94 128 REAL*8,SAVE :: planckir(naerkind,nsizemax) 95 129 real*8,save :: PTOP 96 130 97 131 real*8,parameter :: UBARI = 0.5D0 98 132 99 !$OMP THREADPRIVATE(QREFvis, & ! gweight read by master in sugas_corrk100 !$OMP tstellar, PTOP)133 !$OMP THREADPRIVATE(QREFvis,QREFir,omegaREFir,& ! gweight read by master in sugas_corrk 134 !$OMP tstellar,planckir,PTOP) 101 135 102 136 ! If the gas optical depth (top to the surface) is less than -
trunk/LMDZ.VENUS/libf/phyvenus/radinc_h.F90
r2560 r3794 79 79 80 80 integer, parameter :: L_NSPECTV = NBvisible 81 integer, parameter :: L_NSPECTI = NBinfrared 81 82 82 83 integer, parameter :: NAERKIND = 5 -
trunk/LMDZ.VENUS/libf/phyvenus/sfluxv.F
r2560 r3794 1 1 SUBROUTINE SFLUXV(DTAUV,TAUV,TAUCUMV,RSFV,DWNV,WBARV,COSBV, 2 2 * UBAR0,STEL,NFLUXTOPV,FLUXTOPVDN, 3 * NFLUX OUTV_nu,NFLUXGNDV_nu,3 * NFLUXV_nu,NFLUXGNDV_nu, 4 4 * FMNETV,FLUXUPV,FLUXDNV,FZEROV,taugsurf) 5 5 … … 19 19 real*8 FLUXUPV(L_NLAYRAD), FLUXDNV(L_NLAYRAD) 20 20 real*8 NFLUXTOPV, FLUXUP, FLUXDN,FLUXTOPVDN 21 real*8 NFLUX OUTV_nu(L_NSPECTV)21 real*8 NFLUXV_nu(L_NLAYRAD,L_NSPECTV) 22 22 real*8 NFLUXGNDV_nu(L_NSPECTV) 23 23 … … 40 40 41 41 DO NW=1,L_NSPECTV 42 NFLUX OUTV_nu(NW)=0.042 NFLUXV_nu(:,NW)=0.0 43 43 NFLUXGNDV_nu(NW)=0.0 44 44 END DO … … 115 115 END DO 116 116 117 c band-resolved flux leaving TOA (RDW)118 NFLUX OUTV_nu(NW) = NFLUXOUTV_nu(NW)119 * + FLUXUP*GWEIGHT(NG)*(1.0-FZEROV(NW))117 c band-resolved net flux 118 NFLUXV_nu(:,NW) = NFLUXV_nu(:,NW) 119 * +(FMUPV-FMDV)*GWEIGHT(NG)*(1.0-FZEROV(NW)) 120 120 121 121 c band-resolved flux at ground (RDW) … … 173 173 END DO 174 174 175 c band-resolved flux leaving TOA (RDW)176 NFLUX OUTV_nu(NW) = NFLUXOUTV_nu(NW)177 * + FLUXUP*FZERO175 c band-resolved net flux 176 NFLUXV_nu(:,NW) = NFLUXV_nu(:,NW) 177 * +(FMUPV-FMDV)*FZERO 178 178 179 179 c band-resolved flux at ground (RDW) -
trunk/LMDZ.VENUS/libf/phyvenus/su_gases.F90
r2560 r3794 39 39 igas_OCS=5 40 40 41 ! We don't care about the others 42 ! but initialized in order to avoid problems in interpolate_continuum.F90 43 igas_H2=99 44 igas_He=99 45 igas_N2=99 46 igas_CH4=99 47 igas_O2=99 48 41 49 vgas=0 42 50 if(.not.allocated(gfrac)) allocate(gfrac(ngasmx)) -
trunk/LMDZ.VENUS/libf/phyvenus/sugas_corrk.F90
r2560 r3794 27 27 use radcommon_h, only : WNOV 28 28 use datafile_mod, only: datadir,corrkdir,banddir 29 use gases_h, only: gnom, ngasmx, igas_H2O 29 use gases_h, only: gnom, ngasmx, igas_H2O, igas_CO2 30 use interpolate_continuum_mod, only: interpolate_continuum 30 31 implicit none 31 32 #include "YOMCST.h" … … 124 125 'match that in gases.def (',trim(gnom(igas)),'). You should compare ', & 125 126 'gases.def with Q.dat in your radiative transfer directory.' 127 print*,'For Venus, no gases.def, but su_gases.F90 hardcoded... Should be identical ', & 128 'to Q.dat in your radiative transfer directory.' 126 129 message='exiting.' 127 130 call abort_physic(subname,message,1) … … 452 455 !======================================================================= 453 456 ! Initialise the continuum absorption data 454 ! if(continuum)then 455 do igas=1,ngasmx 456 457 ! For Venus: only H2O, using CKD 458 if (igas .eq. igas_H2O) then 459 460 ! H2O is special 461 ! if(H2Ocont_simple)then 462 ! call interpolateH2Ocont_PPC(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.) 463 ! else 464 dummy = -9999 465 call interpolateH2Ocont_CKD(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.,dummy) 466 ! endif 467 468 endif 469 470 enddo 471 ! endif 457 ! if(continuum)then 458 do igas=1,ngasmx ! we loop on all pairs of molecules that have data available 459 ! data can be downloaded from https://web.lmd.jussieu.fr/~lmdz/planets/generic/datagcm/continuum_data/ 460 461 ! For Venus: only H2O and CO2 462 if (igas .eq. igas_H2O) then 463 file_id='/continuum_data/' // 'H2O-H2O_2022.cia' 464 ! H2O-H2O_2022.cia = H2O-H2O_continuum_100-2000K_2025.dat 465 file_path=TRIM(datadir)//TRIM(file_id) 466 call interpolate_continuum(file_path,igas_H2O,igas_H2O,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 467 do jgas=1,ngasmx 468 if (jgas .eq. igas_CO2) then 469 file_id='/continuum_data/' // 'H2O-CO2_2022.cia' 470 ! H2O-CO2_2022.cia = H2O-CO2_continuum_100-800K_2025.dat 471 file_path=TRIM(datadir)//TRIM(file_id) 472 call interpolate_continuum(file_path,igas_H2O,igas_CO2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 473 endif 474 enddo 475 elseif (igas .eq. igas_CO2) then 476 file_id='/continuum_data/' // 'CO2-CO2_2025.cia' 477 ! CO2-CO2_2025.cia = CO2-CO2_continuum_100-800K_2025.dat 478 file_path=TRIM(datadir)//TRIM(file_id) 479 call interpolate_continuum(file_path,igas_CO2,igas_CO2,'IR',1,300.D+0,10000.D+0,20000.D+0,testcont,.true.) 480 endif 481 enddo ! igas=1,ngasmx 482 ! endif 472 483 473 484 ! print*,'----------------------------------------------------' -
trunk/LMDZ.VENUS/libf/phyvenus/sw_venus_corrk.F90
r2560 r3794 9 9 gweight, pfgasref, pgasmax, pgasmin, & 10 10 pgasref, tgasmax, tgasmin, tgasref, scalep, & 11 stellarf, dwnv, tauray 11 stellarf, dwnv, tauray, wavev, wnov 12 12 use datafile_mod, only: datadir,banddir,corrkdir 13 13 use ioipsl_getin_p_mod, only: getin_p … … 99 99 REAL*8 tauaero(L_LEVELS,naerkind) 100 100 REAL*8 nfluxtopv,fluxtopvdn 101 REAL*8 nfluxoutv_nu(L_NSPECTV) ! Outgoing band-resolved VI flux at TOA (W/m2). 101 REAL*8 nfluxv_nu(L_NLAYRAD,L_NSPECTV) ! vertical profil, band-resolved VI net flux (W/m2) 102 REAL*8 heatrate_nu(L_NLAYRAD,L_NSPECTV) ! vertical profil, band-resolved VI heating rate (K/s/micron) 102 103 REAL*8 fmnetv(L_NLAYRAD) 103 104 REAL*8 fluxupv(L_NLAYRAD) … … 504 505 call sfluxv(dtauv,tauv,taucumv,albv,dwnv,wbarv,cosbv, & 505 506 acosz,stel_fract, & 506 nfluxtopv,fluxtopvdn,nflux outv_nu,nfluxgndv_nu,&507 nfluxtopv,fluxtopvdn,nfluxv_nu,nfluxgndv_nu, & 507 508 fmnetv,fluxupv,fluxdnv,fzerov,taugsurf) 508 509 … … 510 511 nfluxtopv = 0.0d0 511 512 fluxtopvdn = 0.0d0 512 nflux outv_nu(:)= 0.0d0513 nfluxv_nu(:,:) = 0.0d0 513 514 nfluxgndv_nu(:) = 0.0d0 514 515 do l=1,L_NLAYRAD … … 564 565 *RG/(cpdet(tmid(1))*scalep*(plevrad(3)-plevrad(2))) 565 566 567 566 568 !----------------------------------------------------------------------- 567 569 !----------------------------------------------------------------------- … … 570 572 !----------------------------------------------------------------------- 571 573 574 ! Diagnostic in 1D: 575 ! output the vertical profil of band-resolved heating rates, in K/s/microns 576 if ((1.eq.1).and.is_master.and.(ngrid.eq.1).and.firstcall) then 577 open(unit=11,file="nfluxnu.dat") 578 write(11,*) "lambda(microns)",wavev(:) 579 write(11,*) "dlbda(microns)",1.e4*dwnv(:)/wnov(:)**2 580 write(11,*) "pressure(Pa) dT_nu(K/s/micron)" 581 DO l=2,L_NLAYRAD 582 heatrate_nu(L_NLAYRAD+1-l,:)=(nfluxv_nu(l,:)-nfluxv_nu(l-1,:)) & 583 *RG/(cpdet(tmid(l))*scalep*(plevrad(2*l+1)-plevrad(2*l-1))) & 584 ! dlbda(microns)=-dnu(cm-1)*1E4/nu(cm-1)^2 585 / (1.e4*dwnv(:)/wnov(:)**2) 586 write(11,*) pplay(1,L_NLAYRAD+1-l),heatrate_nu(L_NLAYRAD+1-l,:) 587 END DO 588 close(11) 589 endif 590 572 591 end subroutine sw_venus_corrk 573 592
Note: See TracChangeset
for help on using the changeset viewer.