Changeset 4077 for trunk/LMDZ.GENERIC/libf/phygeneric/rad_correlatedk.F90
- Timestamp:
- Feb 18, 2026, 10:28:23 AM (6 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phygeneric/rad_correlatedk.F90
r4076 r4077 1 MODULE callcorrk_mod1 MODULE rad_correlatedk_mod 2 2 3 3 IMPLICIT NONE … … 5 5 CONTAINS 6 6 7 subroutine callcorrk(ngrid,nlayer,pq,nq,qsurf,zls, &7 subroutine rad_correlatedk(ngrid,nlayer,pq,nq,qsurf,zls, & 8 8 albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt, & 9 9 tsurf,fract,dist_star,aerosol,muvar, & … … 27 27 use ioipsl_getin_p_mod, only: getin_p 28 28 use gases_h, only: ngasmx 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, & 29 use aerosol_radius, only : aerosol_radius_init,aerosol_radius_co2,h2o_reffrad, & 30 aerosol_radius_dust,aerosol_radius_h2so4,aerosol_radius_back2lay 31 use aerosol_global_variables , only : iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4, & 31 32 iaero_back2lay, iaero_aurora, & 32 33 iaero_venus1,iaero_venus2,iaero_venus2p, & 33 34 iaero_venus3,iaero_venusUV 34 use aero pacity_mod, only: aeropacity35 use aero ptproperties_mod, only: aeroptproperties35 use aerosol_opacity_mod, only: aerosol_opacity 36 use aerosol_optical_properties_mod, only: aerosol_optical_properties 36 37 use tracer_h, only: igcm_h2o_ice, igcm_h2o_vap, igcm_co2_ice 37 38 use tracer_h, only: constants_epsi_generic … … 41 42 CLFvarying,tplanckmin,tplanckmax,global1d, & 42 43 generic_condensation, aerovenus, nvarlayer, varspec 43 use optcv_mod, only: optcv 44 use optci_mod, only: optci 45 use sfluxi_mod, only: sfluxi 46 use sfluxv_mod, only: sfluxv 47 use recombin_corrk_mod, only: corrk_recombin, call_recombin 44 use rad_correlatedk_opacities_stellar_mod, & 45 only: rad_correlatedk_opacities_stellar 46 use rad_correlatedk_opacities_thermal_mod, & 47 only: rad_correlatedk_opacities_thermal 48 use rad_correlatedk_fluxes_thermal_mod, & 49 only: rad_correlatedk_fluxes_thermal 50 use rad_correlatedk_fluxes_stellar_mod, & 51 only: rad_correlatedk_fluxes_stellar 52 use rad_correlatedk_online_recombination_mod, & 53 only: corrk_recombin, & 54 rad_correlatedk_recombination_main 48 55 use pindex_mod, only: pindex 49 56 use generic_cloud_common_h, only: Psat_generic, epsi_generic … … 111 118 REAL,INTENT(OUT) :: OSR_nu(ngrid,L_NSPECTV) ! Outgoing SW radiation in each band (Normalized to the band width (W/m2/cm-1). 112 119 REAL,INTENT(OUT) :: GSR_nu(ngrid,L_NSPECTV) ! Surface SW radiation in each band (Normalized to the band width (W/m2/cm-1). 113 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aero pacity.120 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aerosol_opacity. 114 121 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 115 122 REAL,INTENT(OUT) :: totcloudfrac(ngrid) ! Column Fraction of clouds (%). … … 148 155 REAL*8 tlevrad(L_LEVELS),plevrad(L_LEVELS) 149 156 150 ! Optical values for the optci/cv subroutines157 ! Optical values for the rad_correlatedk_opacities_thermal/cv subroutines 151 158 REAL*8 stel(L_NSPECTV),stel_fract(L_NSPECTV) 152 159 ! NB: Arrays below are "save" to avoid reallocating them at every call … … 200 207 character(len=10) :: tmp2 201 208 character(len=100) :: message 202 character(len=10),parameter :: subname=" callcorrk"209 character(len=10),parameter :: subname="rad_correlatedk" 203 210 204 211 ! For fixed water vapour profiles. … … 242 249 if(firstcall) then 243 250 244 ! test on allocated necessary because of CLFvarying (two calls to callcorrk in physiq)251 ! test on allocated necessary because of CLFvarying (two calls to rad_correlatedk in physiq) 245 252 if(.not.allocated(QVISsQREF3d)) then 246 253 allocate(QVISsQREF3d(ngrid,nlayer,L_NSPECTV,naerkind)) … … 308 315 endif 309 316 310 !!! ALLOCATED instances are necessary because of CLFvarying (strategy to call callcorrk twice in physiq...)317 !!! ALLOCATED instances are necessary because of CLFvarying (strategy to call rad_correlatedk twice in physiq...) 311 318 IF(.not.ALLOCATED(QREFvis3d))THEN 312 319 ALLOCATE(QREFvis3d(ngrid,nlayer,naerkind), stat=ok) … … 343 350 #endif 344 351 345 call su_aer_radii(ngrid,nlayer,reffrad,nueffrad)352 call aerosol_radius_init(ngrid,nlayer,reffrad,nueffrad) 346 353 347 354 … … 351 358 352 359 !this block is now done at firstcall of physiq_mod 353 ! print*, " callcorrk: Correlated-k data base folder:",trim(datadir)360 ! print*, "rad_correlatedk: Correlated-k data base folder:",trim(datadir) 354 361 ! call getin_p("corrkdir",corrkdir) 355 362 ! print*, "corrkdir = ",corrkdir … … 359 366 ! banddir=trim(adjustl(corrkdir))//'/'//trim(adjustl(banddir)) 360 367 361 ! call setspi! Basic infrared properties.362 ! call setspv! Basic visible properties.363 ! call sugas_corrk! Set up gaseous absorption properties.364 ! call suaer_corrk! Set up aerosol optical properties.368 ! call rad_correlatedk_init_thermal ! Basic infrared properties. 369 ! call rad_correlatedk_init_stellar ! Basic visible properties. 370 ! call rad_correlatedk_read_opacity_tables ! Set up gaseous absorption properties. 371 ! call rad_correlatedk_ini_aerosol ! Set up aerosol optical properties. 365 372 366 373 367 ! now that L_NGAUSS has been initialized (by sugas_corrk)374 ! now that L_NGAUSS has been initialized (by rad_correlatedk_read_opacity_tables ) 368 375 ! allocate related arrays 369 376 if(.not.allocated(dtaui)) then … … 446 453 447 454 if((igcm_h2o_vap.eq.0) .and. varactive .and. water)then 448 message='varactive in callcorrk but no h2o_vap tracer.'455 message='varactive in rad_correlatedk but no h2o_vap tracer.' 449 456 call abort_physic(subname,message,1) 450 457 endif … … 485 492 486 493 if ((iaer.eq.iaero_co2).and.tracer.and.(igcm_co2_ice.gt.0)) then ! Treat condensed co2 particles. 487 call co2_reffrad(ngrid,nlayer,nq,pq,reffrad(1,1,iaero_co2))494 call aerosol_radius_co2(ngrid,nlayer,nq,pq,reffrad(1,1,iaero_co2)) 488 495 489 496 call planetwide_maxval(reffrad(:,:,iaero_co2),maxvalue) … … 517 524 518 525 if(iaer.eq.iaero_dust)then 519 call dust_reffrad(ngrid,nlayer,reffrad(1,1,iaero_dust))526 call aerosol_radius_dust(ngrid,nlayer,reffrad(1,1,iaero_dust)) 520 527 if (is_master) then 521 528 print*,'Dust particle size = ',reffrad(1,1,iaer)/1.e-6,' um' … … 524 531 525 532 if(iaer.eq.iaero_h2so4)then 526 call h2so4_reffrad(ngrid,nlayer,reffrad(1,1,iaero_h2so4))533 call aerosol_radius_h2so4(ngrid,nlayer,reffrad(1,1,iaero_h2so4)) 527 534 if (is_master) then 528 535 print*,'H2SO4 particle size =',reffrad(1,1,iaer)/1.e-6,' um' … … 531 538 532 539 if(iaer.eq.iaero_back2lay)then 533 call back2lay_reffrad(ngrid,reffrad(1,1,iaero_back2lay),nlayer,pplev)534 endif 535 536 ! For n-layer aerosol size set once for all at firstcall in su_aer_radii540 call aerosol_radius_back2lay(ngrid,reffrad(1,1,iaero_back2lay),nlayer,pplev) 541 endif 542 543 ! For n-layer aerosol size set once for all at firstcall in aerosol_radius_init 537 544 538 545 ! if(iaer.eq.iaero_aurora)then … … 549 556 550 557 ! Get 3D aerosol optical properties. 551 call aero ptproperties(ngrid,nlayer,reffrad,nueffrad, &558 call aerosol_optical_properties(ngrid,nlayer,reffrad,nueffrad, & 552 559 QVISsQREF3d,omegaVIS3d,gVIS3d, & 553 560 QIRsQREF3d,omegaIR3d,gIR3d, & … … 555 562 556 563 ! Get aerosol optical depths. 557 call aero pacity(ngrid,nlayer,nq,pplay,pplev,pt,pq,zls,aerosol, &564 call aerosol_opacity(ngrid,nlayer,nq,pplay,pplev,pt,pq,zls,aerosol, & 558 565 reffrad,nueffrad,QREFvis3d,QREFir3d, & 559 566 tau_col,cloudfrac,totcloudfrac,clearsky) … … 692 699 (pplev(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1)) 693 700 ! As 'aerosol' is at reference (visible) wavelenght we scale it as 694 ! it will be multplied by qxi/v in optci/v701 ! it will be multplied by qxi/v in rad_correlatedk_opacities_thermal/v 695 702 temp=aerosol(ig,L_NLAYRAD-k,iaer)/QREFvis3d(ig,L_NLAYRAD-k,iaer) 696 703 tauaero(2*k+2,iaer)=max(temp*pweight,0.d0) … … 918 925 qvar(1)=qvar(2) 919 926 920 write(*,*)trim(subname),' :Warning: reducing qvar in callcorrk.'927 write(*,*)trim(subname),' :Warning: reducing qvar in rad_correlatedk.' 921 928 write(*,*)trim(subname),' :Temperature profile no longer consistent ', & 922 929 'with saturated H2O. qsat=',satval … … 1018 1025 ! -- JVO 20 : Also add a sanity test checking that tlevrad is 1019 1026 ! within Planck function temperature boundaries, 1020 ! which would cause gfluxi/sfluxito crash.1027 ! which would cause rad_correlatedk_fluxes_solver_thermal/rad_correlatedk_fluxes_thermal to crash. 1021 1028 do k=1,L_LEVELS 1022 1029 … … 1127 1134 ! Recombine reference corrk tables if needed - Added by JVO, 2020. 1128 1135 if (corrk_recombin) then 1129 call call_recombin(ig,nlayer,pq(ig,:,:),pplay(ig,:),pt(ig,:),qvar(:),tmid(:),pmid(:))1136 call rad_correlatedk_recombination_main(ig,nlayer,pq(ig,:,:),pplay(ig,:),pt(ig,:),qvar(:),tmid(:),pmid(:)) 1130 1137 endif 1131 1138 ! ---------------------------------------------------------------- … … 1149 1156 endif 1150 1157 1151 call optcv(dtauv,tauv,taucumv,plevrad, & 1152 qxvaer,qsvaer,gvaer,wbarv,cosbv,tauaero, & 1158 call rad_correlatedk_opacities_stellar(dtauv, & 1159 tauv,taucumv,plevrad, & 1160 qxvaer,qsvaer,gvaer,wbarv,cosbv,tauaero, & 1153 1161 tmid,pmid,taugsurf,qvar,muvarrad,fracvari) 1154 1162 1155 call sfluxv(dtauv,tauv,taucumv,albv,dwnv,wbarv,cosbv, & 1156 acosz,stel_fract, & 1157 nfluxtopv,fluxtopvdn,nfluxoutv_nu,nfluxgndv_nu, & 1163 call rad_correlatedk_fluxes_stellar(dtauv,tauv, & 1164 taucumv,albv,dwnv,wbarv,cosbv, & 1165 acosz,stel_fract, & 1166 nfluxtopv,fluxtopvdn, & 1167 nfluxoutv_nu,nfluxgndv_nu, & 1158 1168 fmnetv,fluxupv,fluxdnv,fzerov,taugsurf) 1159 1169 … … 1192 1202 !----------------------------------------------------------------------- 1193 1203 1194 call optci(plevrad,tlevrad,dtaui,taucumi, & 1195 qxiaer,qsiaer,giaer,cosbi,wbari,tauaero,tmid,pmid, & 1204 call rad_correlatedk_opacities_thermal(plevrad, & 1205 tlevrad,dtaui,taucumi, & 1206 qxiaer,qsiaer,giaer,cosbi,wbari,tauaero,tmid,pmid, & 1196 1207 taugsurfi,qvar,muvarrad,fracvari) 1197 1208 1198 call sfluxi(plevrad,tlevrad,dtaui,taucumi,ubari,albi, & 1199 wnoi,dwni,cosbi,wbari,nfluxtopi,nfluxtopi_nu, & 1209 call rad_correlatedk_fluxes_thermal(plevrad, & 1210 tlevrad,dtaui,taucumi,ubari,albi, & 1211 wnoi,dwni,cosbi,wbari,nfluxtopi,nfluxtopi_nu, & 1200 1212 fmneti,fluxupi,fluxdni,fluxupi_nu,fzeroi,taugsurfi) 1201 1213 … … 1346 1358 1347 1359 1348 end subroutine callcorrk1349 1350 END MODULE callcorrk_mod1360 end subroutine rad_correlatedk 1361 1362 END MODULE rad_correlatedk_mod
Note: See TracChangeset
for help on using the changeset viewer.
