PartMC 2.1.3
mosaic.F90
Go to the documentation of this file.
00001 ! Copyright (C) 2007-2011 Matthew West
00002 ! Licensed under the GNU General Public License version 2 or (at your
00003 ! option) any later version. See the file COPYING for details.
00004 
00005 !> \file
00006 !> The pmc_mosaic module.
00007 
00008 !> Interface to the MOSAIC aerosol and gas phase chemistry code.
00009 module pmc_mosaic
00010   
00011   use pmc_aero_data
00012   use pmc_aero_state
00013   use pmc_bin_grid 
00014   use pmc_constants
00015   use pmc_env_state
00016   use pmc_gas_data
00017   use pmc_gas_state
00018   use pmc_util
00019   
00020 contains
00021   
00022 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00023 
00024   !> Whether MOSAIC support is compiled in.
00025   logical function mosaic_support()
00026 
00027 #ifdef PMC_USE_MOSAIC
00028     mosaic_support = .true.
00029 #else
00030     mosaic_support = .false.
00031 #endif
00032 
00033   end function mosaic_support
00034 
00035 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00036 
00037   !> Initialize all MOSAIC data-structures.
00038   subroutine mosaic_init(bin_grid, env_state, del_t, do_optical)
00039     
00040 #ifdef PMC_USE_MOSAIC
00041     use module_data_mosaic_aero, only: alpha_ASTEM, rtol_eqb_ASTEM, &
00042          ptol_mol_ASTEM, mGAS_AER_XFER, mDYNAMIC_SOLVER
00043     
00044     use module_data_mosaic_main, only: tbeg_sec, dt_sec, rlon, rlat, &
00045          zalt_m, RH, te, pr_atm, cair_mlc, cair_molm3, ppb, avogad, &
00046          mmode, mgas, maer, mcld, maeroptic, mshellcore, &
00047          msolar, mphoto, lun_aeroptic, naerbin
00048 #endif
00049     
00050     !> Bin grid.
00051     type(bin_grid_t), intent(in) :: bin_grid
00052     !> Environment state.
00053     type(env_state_t), intent(inout) :: env_state
00054     !> Timestep for coagulation.
00055     real(kind=dp), intent(in) :: del_t
00056     !> Whether to compute optical properties.
00057     logical, intent(in) :: do_optical
00058 
00059 #ifdef PMC_USE_MOSAIC
00060     ! MOSAIC function interfaces
00061     interface
00062        subroutine LoadPeroxyParameters()
00063        end subroutine LoadPeroxyParameters
00064        subroutine init_data_modules()
00065        end subroutine init_data_modules
00066        subroutine AllocateMemory()
00067        end subroutine AllocateMemory
00068     end interface
00069 
00070     call init_data_modules  ! initialize indices and vars
00071 
00072     ! allocate one aerosol bin
00073     naerbin = 1
00074     call AllocateMemory()
00075     
00076     ! parameters
00077     mmode = 1               ! 1 = time integration, 2 = parametric analysis
00078     mgas = 1                ! 1 = gas chem on, 0 = gas chem off
00079     maer = 1                ! 1 = aer chem on, 0 = aer chem off
00080     mcld = 0                ! 1 = cld chem on, 0 = cld chem off
00081     if (do_optical) then
00082        maeroptic = 1        ! 1 = aer_optical on, 0 = aer_optical off
00083     else
00084        maeroptic = 0
00085     end if
00086     mshellcore = 1          ! 0 = no shellcore, 1 = core is BC only
00087                             ! 2 = core is BC and DUST
00088     msolar = 1              ! 1 = diurnally varying phot, 2 = fixed phot
00089     mphoto = 2              ! 1 = Rick's param, 2 = Yang's param
00090     mGAS_AER_XFER = 1       ! 1 = gas-aerosol partitioning, 0 = no partition
00091     mDYNAMIC_SOLVER = 1     ! 1 = astem, 2 = lsodes
00092     alpha_ASTEM = 0.5d0     ! solver parameter. range: 0.01 - 1.0
00093     rtol_eqb_ASTEM = 0.01d0 ! relative eqb tolerance. range: 0.01 - 0.03
00094     ptol_mol_ASTEM = 0.01d0 ! percent mol tolerance.  range: 0.01 - 1.0
00095     
00096     ! time variables
00097     dt_sec = del_t                                 ! time-step (s)
00098     tbeg_sec = env_state%start_day*24*3600 + &     ! time since the beg of
00099          nint(env_state%start_time)                ! year 00:00, UTC (s)
00100     
00101     ! geographic location
00102     rlon = deg2rad(env_state%longitude)            ! longitude
00103     rlat = deg2rad(env_state%latitude)             ! latitude
00104     zalt_m = env_state%altitude                    ! altitude (m)
00105  
00106     ! environmental parameters: map PartMC -> MOSAIC
00107     RH = env_state%rel_humid * 100.d0              ! relative humidity (%)
00108     te = env_state%temp                            ! temperature (K)
00109     pr_atm = env_state%pressure / const%air_std_press ! pressure (atm)
00110     cair_mlc = avogad*pr_atm/(82.056d0*te)         ! air conc [molec/cc]
00111     cair_molm3 = 1d6*pr_atm/(82.056d0*te)          ! air conc [mol/m^3]
00112     ppb = 1d9
00113 
00114     call LoadPeroxyParameters ! Aperox and Bperox only once
00115     
00116     ! get unit for aerosol optical output
00117     if (lun_aeroptic <= 0 ) lun_aeroptic = get_unit()
00118 
00119 #endif
00120     
00121   end subroutine mosaic_init
00122 
00123 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00124 
00125   !> Clean-up after running MOSAIC, deallocating memory.
00126   subroutine mosaic_cleanup()
00127     
00128 #ifdef PMC_USE_MOSAIC
00129     ! MOSAIC function interfaces
00130     interface
00131        subroutine DeallocateMemory()
00132        end subroutine DeallocateMemory
00133     end interface
00134 
00135     call DeallocateMemory()
00136 #endif
00137     
00138   end subroutine mosaic_cleanup
00139 
00140 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00141 
00142   !> Map all data PartMC -> MOSAIC.
00143   subroutine mosaic_from_partmc(bin_grid, env_state, aero_data, &
00144        aero_weight, aero_state, gas_data, gas_state)
00145     
00146 #ifdef PMC_USE_MOSAIC
00147     use module_data_mosaic_aero, only: nbin_a, aer, num_a, jhyst_leg, &
00148          jtotal, water_a
00149     
00150     use module_data_mosaic_main, only: tbeg_sec, tcur_sec, tmid_sec, &
00151          dt_sec, dt_min, dt_aeroptic_min, RH, te, pr_atm, cnn, cair_mlc, &
00152          cair_molm3, ppb, avogad, msolar, naerbin
00153 #endif
00154     
00155     !> Bin grid.
00156     type(bin_grid_t), intent(in) :: bin_grid
00157     !> Environment state.
00158     type(env_state_t), intent(in) :: env_state
00159     !> Aerosol data.
00160     type(aero_data_t), intent(in) :: aero_data
00161     !> Aerosol weight.
00162     type(aero_weight_t), intent(in) :: aero_weight
00163     !> Aerosol state.
00164     type(aero_state_t), intent(in) :: aero_state
00165     !> Gas data.
00166     type(gas_data_t), intent(in) :: gas_data
00167     !> Gas state.
00168     type(gas_state_t), intent(in) :: gas_state
00169 
00170 #ifdef PMC_USE_MOSAIC
00171     ! local variables
00172     real(kind=dp) :: time_UTC    ! 24-hr UTC clock time (hr).
00173     real(kind=dp) :: tmar21_sec  ! Time at noon, march 21, UTC (s).
00174     real(kind=dp) :: conv_fac(aero_data%n_spec), dum_var
00175     integer :: i_bin, i_part, i_spec, i_mosaic, i_spec_mosaic
00176     type(aero_particle_t), pointer :: particle
00177     real(kind=dp) :: weight
00178 
00179     ! MOSAIC function interfaces
00180     interface
00181        subroutine AllocateMemory()
00182        end subroutine AllocateMemory
00183        subroutine DeallocateMemory()
00184        end subroutine DeallocateMemory
00185     end interface
00186 
00187     ! update time variables
00188     tmar21_sec = real((79*24 + 12)*3600, kind=dp)    ! noon, mar 21, UTC
00189     tcur_sec = real(tbeg_sec, kind=dp) + env_state%elapsed_time
00190     ! current (old) time since the beg of year 00:00, UTC (s)
00191 
00192     time_UTC = env_state%start_time/3600d0  ! 24-hr UTC clock time (hr)
00193     time_UTC = time_UTC + dt_sec/3600d0
00194 
00195     do while (time_UTC >= 24d0)
00196        time_UTC = time_UTC - 24d0
00197     end do
00198 
00199     tmid_sec = tcur_sec + 0.5d0*dt_sec
00200     if(tmid_sec .ge. tmar21_sec)then
00201        tmid_sec = tmid_sec - tmar21_sec     ! seconds since noon, march 21
00202     else
00203        tmid_sec = tmid_sec &
00204             + dble(((365-79)*24 - 12)*3600) ! seconds since noon, march 21
00205     endif
00206 
00207     ! transport timestep (min)
00208     dt_min = dt_sec/60d0
00209     ! aerosol optics timestep (min)
00210     dt_aeroptic_min = 0d0
00211 
00212     ! compute aerosol conversion factors
00213     do i_spec = 1,aero_data%n_spec
00214        ! converts m^3(species) to nmol(species)/m^3(air)
00215        conv_fac(i_spec) = 1.D9 * aero_data%density(i_spec) &
00216             / (aero_data%molec_weight(i_spec) * aero_state%comp_vol)
00217     enddo
00218 
00219     ! environmental parameters: map PartMC -> MOSAIC
00220     RH = env_state%rel_humid * 100.d0              ! relative humidity (%)
00221     te = env_state%temp                            ! temperature (K)
00222     pr_atm = env_state%pressure / const%air_std_press ! pressure (atm)
00223     cair_mlc = avogad*pr_atm/(82.056d0*te)   ! air conc [molec/cc]
00224     cair_molm3 = 1d6*pr_atm/(82.056d0*te)    ! air conc [mol/m^3]
00225     ppb = 1d9
00226     
00227     ! aerosol data: map PartMC -> MOSAIC
00228     nbin_a = aero_state_total_particles(aero_state)
00229     if (nbin_a > naerbin) then
00230        call DeallocateMemory()
00231        naerbin = nbin_a
00232        call AllocateMemory()
00233     end if
00234     i_mosaic = 0 ! MOSAIC bin number
00235     aer = 0d0    ! initialize to zero
00236     do i_bin = 1,bin_grid%n_bin
00237        ! work backwards for consistency with mosaic_to_partmc(), which
00238        ! has specific ordering requirements
00239        do i_part = aero_state%bin(i_bin)%n_part,1,-1
00240           particle => aero_state%bin(i_bin)%particle(i_part)
00241           weight = aero_weight_value(aero_weight, &
00242                aero_particle_radius(particle))
00243           i_mosaic = i_mosaic + 1
00244           do i_spec = 1,aero_data%n_spec
00245              i_spec_mosaic = aero_data%mosaic_index(i_spec)
00246              if (i_spec_mosaic > 0) then
00247                 ! convert m^3(species) to nmol(species)/m^3(air)
00248                 aer(i_spec_mosaic, 3, i_mosaic) &   ! nmol/m^3(air)
00249                      = particle%vol(i_spec) * conv_fac(i_spec) * weight
00250              end if
00251           end do
00252           ! handle water specially
00253           ! convert m^3(water) to kg(water)/m^3(air)
00254           water_a(i_mosaic) = particle%vol(aero_data%i_water) &
00255                * aero_data%density(aero_data%i_water) &
00256                / (aero_state%comp_vol / weight)
00257           num_a(i_mosaic) = 1d-6 &
00258                / (aero_state%comp_vol / weight) ! num conc (#/cc(air))
00259           jhyst_leg(i_mosaic) = particle%water_hyst_leg
00260        end do
00261     end do
00262 
00263     ! gas chemistry: map PartMC -> MOSAIC
00264     cnn = 0d0
00265     do i_spec = 1,gas_data%n_spec
00266        i_spec_mosaic = gas_data%mosaic_index(i_spec)
00267        if (i_spec_mosaic > 0) then
00268           ! convert ppbv to molec/cc
00269           cnn(i_spec_mosaic) = gas_state%mix_rat(i_spec) * cair_mlc / ppb
00270        end if
00271     end do
00272 #endif
00273 
00274   end subroutine mosaic_from_partmc
00275 
00276 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00277   
00278   !> Map all data MOSAIC -> PartMC.
00279   subroutine mosaic_to_partmc(bin_grid, env_state, aero_data, &
00280        aero_weight, aero_state, gas_data, gas_state)
00281     
00282 #ifdef PMC_USE_MOSAIC
00283     use module_data_mosaic_aero, only: nbin_a, aer, num_a, jhyst_leg, &
00284          jtotal, water_a
00285     
00286     use module_data_mosaic_main, only: tbeg_sec, tcur_sec, tmid_sec, &
00287          dt_sec, dt_min, dt_aeroptic_min, RH, te, pr_atm, cnn, cair_mlc, &
00288          cair_molm3, ppb, avogad, msolar, cos_sza
00289 #endif
00290     
00291     !> Bin grid.
00292     type(bin_grid_t), intent(in) :: bin_grid
00293     !> Environment state.
00294     type(env_state_t), intent(inout) :: env_state
00295     !> Aerosol data.
00296     type(aero_data_t), intent(in) :: aero_data
00297     !> Aerosol weight.
00298     type(aero_weight_t), intent(in) :: aero_weight
00299     !> Aerosol state.
00300     type(aero_state_t), intent(inout) :: aero_state
00301     !> Gas data.
00302     type(gas_data_t), intent(in) :: gas_data
00303     !> Gas state.
00304     type(gas_state_t), intent(inout) :: gas_state
00305 
00306 #ifdef PMC_USE_MOSAIC
00307     ! local variables
00308     real(kind=dp) :: conv_fac(aero_data%n_spec), dum_var
00309     integer :: i_bin, i_part, i_spec, i_mosaic, i_spec_mosaic
00310     type(aero_particle_t), pointer :: particle
00311     type(aero_particle_t) :: new_particle
00312     type(aero_info_t) :: aero_info
00313     real(kind=dp) :: old_weight, new_weight
00314     integer :: n_copies, i_dup
00315 
00316     ! compute aerosol conversion factors
00317     do i_spec = 1,aero_data%n_spec
00318        ! converts m^3(species) to nmol(species)/m^3(air)
00319        conv_fac(i_spec) = 1.D9 * aero_data%density(i_spec) &
00320             / (aero_data%molec_weight(i_spec) * aero_state%comp_vol)
00321     enddo
00322 
00323     ! environmental parameters: map MOSAIC -> PartMC
00324     env_state%rel_humid = RH / 100d0
00325     env_state%temp = te
00326     env_state%pressure = pr_atm * const%air_std_press
00327     if (msolar == 1) then
00328        env_state%solar_zenith_angle = acos(cos_sza)
00329     end if
00330     cair_mlc = avogad*pr_atm/(82.056d0*te)   ! air conc [molec/cc]
00331     cair_molm3 = 1d6*pr_atm/(82.056d0*te)    ! air conc [mol/m^3]
00332     ppb = 1d9
00333 
00334     call aero_particle_allocate(new_particle)
00335     call aero_info_allocate(aero_info)
00336 
00337     ! aerosol data: map MOSAIC -> PartMC
00338     i_mosaic = 0 ! MOSAIC bin number
00339     do i_bin = 1,bin_grid%n_bin
00340        ! work backwards so any additions and removals will only affect
00341        ! particles that we've already dealt with
00342        do i_part = aero_state%bin(i_bin)%n_part,1,-1
00343           i_mosaic = i_mosaic + 1
00344           particle => aero_state%bin(i_bin)%particle(i_part)
00345           old_weight = aero_weight_value(aero_weight, &
00346                aero_particle_radius(particle))
00347           do i_spec = 1,aero_data%n_spec
00348              i_spec_mosaic = aero_data%mosaic_index(i_spec)
00349              if (i_spec_mosaic > 0) then
00350                 particle%vol(i_spec) = &
00351                      ! convert nmol(species)/m^3(air) to m^3(species)
00352                      aer(i_spec_mosaic, 3, i_mosaic) &
00353                      / (conv_fac(i_spec) * old_weight)
00354              end if
00355           end do
00356           particle%water_hyst_leg = jhyst_leg(i_mosaic)
00357           ! handle water specially
00358           ! convert kg(water)/m^3(air) to m^3(water)
00359           particle%vol(aero_data%i_water) = water_a(i_mosaic) &
00360                / aero_data%density(aero_data%i_water) &
00361                * (aero_state%comp_vol / old_weight)
00362 
00363           ! adjust particle number to account for weight changes
00364           if (aero_weight%type /= AERO_WEIGHT_TYPE_NONE) then
00365              new_weight = aero_weight_value(aero_weight, &
00366                   aero_particle_radius(particle))
00367              n_copies = prob_round(old_weight / new_weight)
00368              if (n_copies == 0) then
00369                 aero_info%id = particle%id
00370                 aero_info%action = AERO_INFO_WEIGHT
00371                 aero_info%other_id = 0
00372                 call aero_state_remove_particle_with_info(aero_state, &
00373                      i_bin, i_part, aero_info)
00374              elseif (n_copies > 1) then
00375                 do i_dup = 1,(n_copies - 1)
00376                    call aero_particle_copy(particle, new_particle)
00377                    call aero_particle_new_id(new_particle)
00378                    ! this might be adding into the wrong bin, but
00379                    ! that's necessary as we might not have processed
00380                    ! the correct bin yet.
00381                    call aero_state_add_particle(aero_state, i_bin, &
00382                         new_particle)
00383                    ! re-get the particle pointer, which may have
00384                    ! changed due to reallocations caused by adding
00385                    particle => aero_state%bin(i_bin)%particle(i_part)
00386                 end do
00387              end if
00388           end if
00389        end do
00390     end do
00391     call aero_state_resort(bin_grid, aero_state)
00392 
00393     ! gas chemistry: map MOSAIC -> PartMC
00394     do i_spec = 1,gas_data%n_spec
00395        i_spec_mosaic = gas_data%mosaic_index(i_spec)
00396        if (i_spec_mosaic > 0) then
00397           ! convert molec/cc to ppbv
00398           gas_state%mix_rat(i_spec) = cnn(i_spec_mosaic) / cair_mlc * ppb
00399        end if
00400     end do
00401 
00402     call aero_particle_deallocate(new_particle)
00403     call aero_info_deallocate(aero_info)
00404 #endif
00405 
00406   end subroutine mosaic_to_partmc
00407 
00408 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00409 
00410   !> Do one timestep with MOSAIC.
00411   !!
00412   !! We currently also compute aerosol optical properties within this
00413   !! subroutine. In principle this could be done at data analysis
00414   !! time, rather than inside the timestepper. It's not clear if this
00415   !! really matters, however. Because of this mosaic_aero_optical() is
00416   !! currently disabled.
00417   subroutine mosaic_timestep(bin_grid, env_state, aero_data, &
00418        aero_weight, aero_state, gas_data, gas_state, do_optical)
00419     
00420 #ifdef PMC_USE_MOSAIC
00421     use module_data_mosaic_main, only: msolar
00422 #endif
00423     
00424     !> Bin grid.
00425     type(bin_grid_t), intent(in) :: bin_grid
00426     !> Environment state.
00427     type(env_state_t), intent(inout) :: env_state
00428     !> Aerosol data.
00429     type(aero_data_t), intent(in) :: aero_data
00430     !> Aerosol weight.
00431     type(aero_weight_t), intent(in) :: aero_weight
00432     !> Aerosol state.
00433     type(aero_state_t), intent(inout) :: aero_state
00434     !> Gas data.
00435     type(gas_data_t), intent(in) :: gas_data
00436     !> Gas state.
00437     type(gas_state_t), intent(inout) :: gas_state
00438     !> Whether to compute optical properties.
00439     logical, intent(in) :: do_optical
00440 
00441 #ifdef PMC_USE_MOSAIC
00442     ! MOSAIC function interfaces
00443     interface
00444        subroutine SolarZenithAngle()
00445        end subroutine SolarZenithAngle
00446        subroutine IntegrateChemistry()
00447        end subroutine IntegrateChemistry
00448        subroutine aerosol_optical()
00449        end subroutine aerosol_optical
00450     end interface
00451     
00452     ! map PartMC -> MOSAIC
00453     call mosaic_from_partmc(bin_grid, env_state, aero_data, aero_weight, &
00454          aero_state, gas_data, gas_state)
00455 
00456     if (msolar == 1) then
00457       call SolarZenithAngle
00458     end if
00459 
00460     call IntegrateChemistry
00461 
00462     ! map MOSAIC -> PartMC
00463     if (do_optical) then
00464        ! must do optical properties first, as mosaic_to_partmc() may
00465        ! change the number of particles
00466        call aerosol_optical
00467        call mosaic_aero_optical(bin_grid, env_state, aero_data, &
00468             aero_state, gas_data, gas_state)
00469     end if
00470 
00471     call mosaic_to_partmc(bin_grid, env_state, aero_data, aero_weight, &
00472          aero_state, gas_data, gas_state)
00473 #endif
00474 
00475   end subroutine mosaic_timestep
00476 
00477 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00478 
00479   !> Compute the optical properties of each aerosol particle.
00480   !> FIXME: currently disabled.
00481   !!
00482   !! At the moment we are computing the aerosol optical properties
00483   !! every timestep from withing mosaic_timestep. This decision should
00484   !! be re-evaluated at some point in the future.
00485   subroutine mosaic_aero_optical(bin_grid, env_state, aero_data, &
00486        aero_state, gas_data, gas_state)
00487     
00488 #ifdef PMC_USE_MOSAIC
00489     use module_data_mosaic_aero, only: ri_shell_a, ri_core_a, &
00490          ext_cross, scat_cross, asym_particle
00491 #endif
00492     
00493     !> Bin grid.
00494     type(bin_grid_t), intent(in) :: bin_grid
00495     !> Environment state.
00496     type(env_state_t), intent(in) :: env_state
00497     !> Aerosol data.
00498     type(aero_data_t), intent(in) :: aero_data
00499     !> Aerosol state.
00500     type(aero_state_t), intent(inout) :: aero_state
00501     !> Gas data.
00502     type(gas_data_t), intent(in) :: gas_data
00503     !> Gas state.
00504     type(gas_state_t), intent(in) :: gas_state
00505 
00506 #ifdef PMC_USE_MOSAIC
00507     ! MOSAIC function interfaces
00508     interface
00509        subroutine aerosol_optical()
00510        end subroutine aerosol_optical
00511     end interface
00512 
00513     integer :: i_bin, i_part, i_mosaic
00514     type(aero_particle_t), pointer :: particle
00515     
00516     ! map PartMC -> MOSAIC
00517 !    call mosaic_from_partmc(bin_grid, env_state, aero_data, aero_state, &
00518 !         gas_data, gas_state)
00519 
00520 !    call aerosol_optical
00521 
00522     ! map MOSAIC -> PartMC
00523     i_mosaic = 0 ! MOSAIC bin number
00524     do i_bin = 1,bin_grid%n_bin
00525        ! work backwards for consistency with mosaic_to_partmc(), which
00526        ! has specific ordering requirements
00527        do i_part = aero_state%bin(i_bin)%n_part,1,-1
00528           i_mosaic = i_mosaic + 1
00529           particle => aero_state%bin(i_bin)%particle(i_part)
00530           particle%absorb_cross_sect = (ext_cross(i_mosaic) &
00531                - scat_cross(i_mosaic)) / 1d4                       ! (m^2)
00532           particle%scatter_cross_sect = scat_cross(i_mosaic) / 1d4 ! (m^2)
00533           particle%asymmetry = asym_particle(i_mosaic)             ! (1)
00534           particle%refract_shell = cmplx(ri_shell_a(i_mosaic), kind=dc) ! (1)
00535           particle%refract_core = cmplx(ri_core_a(i_mosaic), kind=dc)   ! (1)
00536           ! FIXME: how do we get core_vol?
00537           !particle%core_vol = diam2vol(dp_core_a(i_mosaic))        ! (m^3)
00538           particle%core_vol = 0d0
00539         end do
00540     end do
00541 #endif
00542 
00543   end subroutine mosaic_aero_optical
00544 
00545 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00546 
00547 end module pmc_mosaic