# Modify the complex refractive index in CMAQv5.3.2

**URL:** <https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115>\
**Category:** CMAQ\
**Tags:** cmaq\
**Created:** [July 30, 2024, 9:28am UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115 "2024-07-30T09:28:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fortuna](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Fortuna](https://forum.cmascenter.org/u/Fortuna)\
**Post date:** [July 30, 2024, 9:28am UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115/1 "2024-07-30T09:28:51Z")

</div>

Dear all,  
I’m using CMAQv5.3.2 now and want to test a relationship between RH and complex refractive index of sea spray aerosol which means I will do some modification in related module.

What confused me was that there were so many subroutines about calling complex variables that I could not find the module and location that was originally used to calculate the complex refractive index .

I have found the setting of the relationship between wavelength and complex refractive index in 5 different species at `/CMAQv532/UTIL/inline_phot_preproc/water_clouds/ssam00` which included SSA. But I still haven’t found the computation for complex refractive index. Maybe I missed some key parts about them.

I will be grateful if you can give me some advice.

Liu  
2024.7.30

---

<div class="post-metadata">

**Author:** ![slfarrell](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@slfarrell](https://forum.cmascenter.org/u/slfarrell)\
**Post date:** [July 31, 2024, 2:28pm UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115/2 "2024-07-31T14:28:10Z")

</div>

Hi Liu,

I just wanted to reach out and let you know that I am on this - I just need to consult with a few others about approaches you could take. Seems like a very interesting research effort!

-Sara

---

<div class="post-metadata">

**Author:** ![Fortuna](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Fortuna](https://forum.cmascenter.org/u/Fortuna)\
**Post date:** [August 1, 2024, 4:21am UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115/3 "2024-08-01T04:21:35Z")

</div>

Hi Sara,

Very Glad to see your reply. Maybe what I need to do is to create a new relationship between RH and complex refractive index of sea spray aerosol to instead the wavelength - complex refractive index. And hope to find out where the `nr` variable in `twoway_rrtmg_aero_optics.F90` comes from.

Liu

---

<div class="post-metadata">

**Author:** ![slfarrell](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@slfarrell](https://forum.cmascenter.org/u/slfarrell)\
**Post date:** [August 2, 2024, 6:20pm UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115/4 "2024-08-02T18:20:32Z")

</div>

Hi Liu,

Just to try and help you better, are you trying to calculate the complex refractive index of SSA in a way that all of the individual aerosol components’ refractive indices are aggregated up to calculate that of total SSA?

As far as encoding optical properties of RH+SSA, this might be a little involved but not impossible. One “simple” approach:  
- You could look aerosol liquid water (ALW) + SSA and create additional optical surrogates for varying ratios of SSA:ALW (See Marley et al., 1993; Fig. 3 for guidance on how to envision how optical properties can change with increasing ALW, granted this is with respect to hydrating sulfate, so you would need to find literature values for SSA+ALW). You can think of each level of hydration as having its own set of complex refractive index for each wavelength, which can be calculated with respect to the wavelength bands used in CMAQ. Once you have your SSA+ALW wavelength dependent refractive indices (for your different ratios of SSA+ALW), you can use the inline\_phot\_preproc to make sure those refractive indices get aggregated into the correct bands used in CMAQ for photolysis calculations.

In variable tracking of refractive indices (real/nr and imaginary/ni) (and I am new to this myself):  
- Band (which is an interval of wavelength) dependent (and there are 7 considered currently) refractive indices are calculated from the inline\_phot\_preproc and stored in the PHOT\_OPTICS.dat file  
- These refractive indices are read in in the CSQY\_DATA.F LOAD\_OPTICS\_DATA subroutine and set up into the REFRACTIVE\_INDEX array  
- This array is then used by AERO\_PHOTDATA.F GET\_AERO\_DATA subroutince which uses the refractive indices in the REFRACTIVE\_INDEX array along with aerosol size pulled in from other subroutines/modules and aggregated into wavelength-size bins  
- The AERO\_PHOTDATA.F GET\_AERO\_DATA subroutine calls on the AERO\_OPTICAL\_CS and AERO\_OPTICAL2 subroutines that are pulled from CMAQ\_RRTMG\_AERO\_OPTICAL\_UTIL\_MODULE which are then pulled from the twoway\_rrtmg\_aero\_optics.F90 to calculate the scattering, extinction, and asymmetry parameters  
- These parameters are then pulled back into the AERO\_PHOTDATA.F GET\_AERO\_DATA to create arrays 2-d arrays of scattering, extinction, and asymmetry parameters that are (altitudinal layer,wavelength) dependent which then gets used for calculating photolysis rates….

I’m not sure what you are interested in looking at with respect to SSA+RH/ALW (photolysis, aerosol-radiative properties, etc.) but in offline/stand-alone CMAQ optical properties of aerosols are used solely for photolysis rates. If you wanted to look at aerosol-radiative feedbacks you could build WRF-CMAQ and turn on aerosol-radiative two-way feedbacks.

---

<div class="post-metadata">

**Author:** ![Fortuna](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Fortuna](https://forum.cmascenter.org/u/Fortuna)\
**Post date:** [August 3, 2024, 10:08am UTC](https://forum.cmascenter.org/t/modify-the-complex-refractive-index-in-cmaqv5-3-2/5115/5 "2024-08-03T10:08:09Z")

</div>

Hi Sara,

Big thanks for your generous reply. It helps me understand the mechanism of refractive index in CMAQ modules and subroutines a lot.

I notice that some of the responses mentioned `module_ra_rrtmg_aero_optical_util_cmaq.F` module in the two-way model WRF-CMAQ, but for me, modifying the real part of refractive index in file `/UTIL/inline_phot_preproc/water_clouds/ssam00` maybe can achieve similar results. This may involve the content of Cauchy dispersion, which is used to obtain nr at different wavelengths. The problem is I only have observations based on a fixed wavelength, maybe this part is my next to work on.

Thank you again for your kindness.

Liu
