- Timestamp:
- 07/16/14 18:05:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/phystd/aeropacity.F90
r222 r227 30 30 ! pq Aerosol mixing ratio 31 31 ! reffrad(ngrid,nlayer,naerkind) Aerosol effective radius 32 ! QREFvis3d(ngrid,nlayer mx,naerkind) \ 3d extinction coefficients33 ! QREFir3d(ngrid,nlayer mx,naerkind) / at reference wavelengths32 ! QREFvis3d(ngrid,nlayer,naerkind) \ 3d extinction coefficients 33 ! QREFir3d(ngrid,nlayer,naerkind) / at reference wavelengths 34 34 ! 35 35 ! Output … … 40 40 !======================================================================= 41 41 42 #include "dimensions.h"43 #include "dimphys.h"42 !#include "dimensions.h" 43 !#include "dimphys.h" 44 44 #include "callkeys.h" 45 45 #include "comcstfi.h" 46 #include "comvert.h"46 !#include "comvert.h" 47 47 48 48 INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns … … 54 54 REAL,INTENT(OUT) :: aerosol(ngrid,nlayer,naerkind) ! aerosol optical depth 55 55 REAL,INTENT(IN) :: reffrad(ngrid,nlayer,naerkind) ! aerosol effective radius 56 REAL,INTENT(IN) :: QREFvis3d(ngrid,nlayer mx,naerkind) ! extinction coefficient in the visible57 REAL,INTENT(IN) :: QREFir3d(ngrid,nlayer mx,naerkind)56 REAL,INTENT(IN) :: QREFvis3d(ngrid,nlayer,naerkind) ! extinction coefficient in the visible 57 REAL,INTENT(IN) :: QREFir3d(ngrid,nlayer,naerkind) 58 58 REAL,INTENT(OUT):: tau_col(ngrid) !column integrated visible optical depth 59 59 ! BENJAMIN MODIFS 60 real,intent(in) :: cloudfrac(ngrid,nlayer mx) ! cloud fraction60 real,intent(in) :: cloudfrac(ngrid,nlayer) ! cloud fraction 61 61 real,intent(out) :: totcloudfrac(ngrid) ! total cloud fraction 62 62 logical,intent(in) :: clearsky … … 67 67 68 68 LOGICAL,SAVE :: firstcall=.true. 69 !$OMP THREADPRIVATE(firstcall) 69 70 REAL CBRT 70 71 EXTERNAL CBRT … … 72 73 INTEGER,SAVE :: i_co2ice=0 ! co2 ice 73 74 INTEGER,SAVE :: i_h2oice=0 ! water ice 75 !$OMP THREADPRIVATE(i_co2ice,i_h2oice) 74 76 CHARACTER(LEN=20) :: tracername ! to temporarily store text 75 77 … … 135 137 iaer=iaero_co2 136 138 ! 1. Initialization 137 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0139 aerosol(1:ngrid,1:nlayer,iaer)=0.0 138 140 ! 2. Opacity calculation 139 141 if (noaero) then ! aerosol set to zero 140 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0142 aerosol(1:ngrid,1:nlayer,iaer)=0.0 141 143 elseif (aerofixco2.or.(i_co2ice.eq.0)) then ! CO2 ice cloud prescribed 142 aerosol(1:ngrid,1:nlayer mx,iaer)=1.e-9144 aerosol(1:ngrid,1:nlayer,iaer)=1.e-9 143 145 !aerosol(1:ngrid,12,iaer)=4.0 ! single cloud layer option 144 146 else … … 172 174 iaer=iaero_h2o 173 175 ! 1. Initialization 174 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0176 aerosol(1:ngrid,1:nlayer,iaer)=0.0 175 177 ! 2. Opacity calculation 176 178 if (aerofixh2o.or.(i_h2oice.eq.0).or.clearsky) then 177 aerosol(1:ngrid,1:nlayer mx,iaer) =1.e-9179 aerosol(1:ngrid,1:nlayer,iaer) =1.e-9 178 180 179 181 ! put cloud at cloudlvl … … 226 228 227 229 if(CLFvarying)then 228 call totalcloudfrac(ngrid,n q,cloudfrac,totcloudfrac,pplev,pq,aerosol(1:ngrid,1:nlayermx,iaer))230 call totalcloudfrac(ngrid,nlayer,nq,cloudfrac,totcloudfrac,pplev,pq,aerosol(1,1,iaer)) 229 231 do ig=1, ngrid 230 232 do l=1,nlayer-1 ! to stop the rad tran bug … … 253 255 iaer=iaero_dust 254 256 ! 1. Initialization 255 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0257 aerosol(1:ngrid,1:nlayer,iaer)=0.0 256 258 257 259 topdust=30.0 ! km (used to be 10.0 km) LK … … 264 266 ! Typical mixing ratio profile 265 267 266 zp=(p reff/pplay(ig,l))**(70./topdust)268 zp=(pplev(ig,1)/pplay(ig,l))**(70./topdust) 267 269 expfactor=max(exp(0.007*(1.-max(zp,1.))),1.e-3) 268 270 … … 277 279 ! Rescaling each layer to reproduce the choosen (or assimilated) 278 280 ! dust extinction opacity at visible reference wavelength, which 279 ! is scaled to the "preff" reference surface pressure available in comvert.h 280 ! and stored in startfi.nc 281 ! is scaled to the surface pressure pplev(ig,1) 281 282 282 283 taudusttmp(1:ngrid)=0. … … 291 292 aerosol(ig,l,iaer) = max(1E-20, & 292 293 dusttau & 293 * pplev(ig,1) / p reff&294 * pplev(ig,1) / pplev(ig,1) & 294 295 * aerosol(ig,l,iaer) & 295 296 / taudusttmp(ig)) … … 307 308 308 309 ! 1. Initialization 309 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0310 aerosol(1:ngrid,1:nlayer,iaer)=0.0 310 311 311 312 … … 317 318 ! Typical mixing ratio profile 318 319 319 zp=(p reff/pplay(ig,l))**(70./30) !emulating topdust320 zp=(pplev(ig,1)/pplay(ig,l))**(70./30) !emulating topdust 320 321 expfactor=max(exp(0.007*(1.-max(zp,1.))),1.e-3) 321 322 … … 335 336 aerosol(ig,l,iaer) = max(1E-20, & 336 337 1 & 337 * pplev(ig,1) / p reff&338 * pplev(ig,1) / pplev(ig,1) & 338 339 * aerosol(ig,l,iaer) & 339 340 / tauh2so4tmp(ig)) … … 367 368 iaer=iaero_back2lay 368 369 ! 1. Initialization 369 aerosol(1:ngrid,1:nlayer mx,iaer)=0.0370 aerosol(1:ngrid,1:nlayer,iaer)=0.0 370 371 ! 2. Opacity calculation 371 372 DO ig=1,ngrid
Note: See TracChangeset
for help on using the changeset viewer.