GEOS-ESM / GOCART

GOCART Aerosol model including process library and framework interfaces (MAPL, NUOPC, and CCPP)
Apache License 2.0
15 stars 14 forks source link

Avoid hardwired frequencies #91

Closed tclune closed 2 years ago

tclune commented 2 years ago

From @amdasilva

... there were several aspects that were left kind of unfinished. For example, hardwiring wavelengths:"

!   Get wavelength index for Mie Table
!   Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively.
    if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then
       mieTable_index = 1.
    else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then
       mieTable_index = 2.
    else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then
       mieTable_index = 3.
    else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then
       mieTable_index = 4.
    else
       print*,trim(Iam),' : wavelength of ',wavelength,' is an invalid value.'
       return
    end if

Further guidance is needed from @amdasilva for his preferred approach for this. Presumably the bounds would be derived from frequencies obtained in a resource file and a loop used to compute the table index. (And also to compute the size of the array in that dimension.)

weiyuan-jiang commented 2 years ago

I found many places have that piece of code. Maybe we can create a subroutine get_MieTable_index in the module Chem_MieTableMod2G ?

tclune commented 2 years ago

Presumably these are all fixed in PR #102?

tclune commented 2 years ago

@weiyuan-jiang can you confirm that these have all been eliminated in your existing PR? If so, close this issue.

weiyuan-jiang commented 2 years ago

Yes, I think those blocks disappear