Ignore:
Timestamp:
Feb 21, 2023, 9:08:49 AM (21 months ago)
Author:
emillour
Message:

Generic PCM:
Some cleanup in aerosol_mod.F90 : integrate "iniaerosol" in the module.
Also adapted kcm1d to follow up on recent code updates.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90

    r2785 r2898  
    1010  use callkeys_mod, only: pceil, tstrat, tracer, global1d
    1111  use inifis_mod, only: inifis
     12  use aerosol_mod, only: iniaerosol
     13  use callcorrk_mod, only: callcorrk
    1214  use comcstfi_mod
    1315  use mod_grid_phy_lmdz, only : regular_lonlat
     
    5658  real,allocatable :: vmr(:,:) ! tracer mixing ratio [mol/mol]
    5759  real,allocatable :: qsurf(:)        ! tracer surface budget [kg/kg] ????
    58   real psurf,psurf_n,tsurf     
    59 
    60   real emis, albedo, albedo_equivalent
     60  real psurf,psurf_n,tsurf(1)     
     61
     62  real emis(1), albedo(1), albedo_equivalent(1)
    6163  real albedo_wv(1,L_NSPECTV)
    6264
     
    6567  real dtsw(llm) ! heating rate (K/s) due to SW
    6668  real dtlw(llm) ! heating rate (K/s) due to LW
    67   real fluxsurf_lw   ! incident LW flux to surf (W/m2)
    68   real fluxtop_lw    ! outgoing LW flux to space (W/m2)
    69   real fluxsurf_sw   ! incident SW flux to surf (W/m2)
    70   real fluxsurfabs_sw ! absorbed SW flux by the surf (W/m2)
    71   real fluxabs_sw    ! SW flux absorbed by planet (W/m2)
    72   real fluxtop_dn    ! incident top of atmosphere SW flux (W/m2)
     69  real fluxsurf_lw(1)   ! incident LW flux to surf (W/m2)
     70  real fluxtop_lw(1)    ! outgoing LW flux to space (W/m2)
     71  real fluxsurf_sw(1)   ! incident SW flux to surf (W/m2)
     72  real fluxsurfabs_sw(1) ! absorbed SW flux by the surf (W/m2)
     73  real fluxabs_sw(1)    ! SW flux absorbed by planet (W/m2)
     74  real fluxtop_dn(1)    ! incident top of atmosphere SW flux (W/m2)
    7375
    7476  ! not used
    75   real cloudfrac(llm)
    76   real totcloudfrac
    77   real tau_col
     77  real cloudfrac(1,llm)
     78  real totcloudfrac(1)
     79  real tau_col(1)
    7880
    7981  real dTstrat
     
    8183  real OLR_nu(1,L_NSPECTI)
    8284  real OSR_nu(1,L_NSPECTV)
     85  real GSR_nu(1,L_NSPECTV)
     86  real int_dtaui(1,llm,L_NSPECTI)
     87  real int_dtauv(1,llm,L_NSPECTV)
    8388  real Eatmtot
    8489
     
    100105  pi=2.E+0*asin(1.E+0)
    101106
    102   cloudfrac(:)  = 0.0
    103   totcloudfrac  = 0.0
     107  cloudfrac(1,:)  = 0.0
     108  totcloudfrac(1)  = 0.0
    104109
    105110
     
    254259  write(*,*) " albedo = ",albedo
    255260  do iw=1,L_NSPECTV
    256      albedo_wv(1,iw)=albedo
     261     albedo_wv(1,iw)=albedo(1)
    257262  enddo
    258263
     
    360365         
    361366               
    362      call iniaerosol()
     367     call iniaerosol
    363368     
    364369
     
    372377          dtlw,dtsw,fluxsurf_lw,fluxsurf_sw,              &
    373378          fluxsurfabs_sw,fluxtop_lw,                      &
    374           fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,tau_col,    &
    375           cloudfrac,totcloudfrac,.false.,firstcall,lastcall)
     379          fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu,     &
     380          int_dtaui,int_dtauv,                            &
     381          tau_col,cloudfrac,totcloudfrac,                 &
     382          .false.,firstcall,lastcall)
    376383
    377384     !write(*,*) 'BASE 3'
     
    397404     ! skin temperature (gray approx.) using analytic pure H2 expression
    398405     !Tstrat  = (fluxabs_sw/(2*sigma))**0.25 ! skin temperature (gray approx.)
    399      Tstrat  = (fluxtop_lw/(2*sigma))**0.25 ! skin temperature (gray approx.)
     406     Tstrat  = (fluxtop_lw(1)/(2*sigma))**0.25 ! skin temperature (gray approx.)
    400407     dTstrat = dTstrat-Tstrat
    401408
     
    422429       tsurf,fract,dist_star,aerosol,muvar,                    &
    423430       dtlw,dtsw,fluxsurf_lw,fluxsurf_sw,fluxsurfabs_sw,       &
    424        fluxtop_lw, fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,        &
    425        tau_col,                                                &
    426        cloudfrac,totcloudfrac,.false.,firstcall,lastcall)
     431       fluxtop_lw, fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu, &
     432       int_dtaui,int_dtauv,                                    &
     433       tau_col,cloudfrac,totcloudfrac,                         &
     434       .false.,firstcall,lastcall)
    427435
    428436
Note: See TracChangeset for help on using the changeset viewer.