NCAR / CARMA_dev

Discussions on CARMA development and descriptions of model simulations
3 stars 0 forks source link

WACCM-MA CARMA #12 nudged 2deg 22 bins for Pinatubo #28

Open ilaria-quaglia opened 1 year ago

ilaria-quaglia commented 1 year ago

The test is a clone of /glade/p/cesm/chwg_dev/tilmes/cases/carma/FWmaCARMAnudged.f19_f19_mg17.carma_trop_strat.fixall.1990_2000.region.5TgS.Zhao run from 1990 to (?) with codebase#12. Here the number of particle bins for the mixed aerosol and pure sulfate group is changed from 20 to 22 without changing the minimum radius and the volume ratio.

Code base: /glade/work/fvitt/camdev/carma_trop_strat12/ Case directory: /glade/work/iquaglia/cases/FWmaCARMAnudged.f19_f19_mg17.carma_trop_strat.fixall.1990_2000.region.5TgS.Zhao_22bins Output: /glade/scratch/iquaglia/archive/FWmaCARMAnudged.f19_f19_mg17.carma_trop_strat.fixall.1990_2000.region.5TgS.Zhao_22bins

dan-visioni commented 1 year ago

Trying to add the two more bins, we run into a problem: In /glade/p/cesmdata/cseg/inputdata/atm/cam/chem/carma/rrtmg there are lookup tables for 20 bins, but not for any other. Is there code somewhere to produce the information for the two new bins? @tilmes

tilmes commented 1 year ago

@cbardeen It seems to be time to learn how to create new lookup tables with CARMA (I have not done this at this point). Could you help with this? @dan-visioni Did you use Chuck's ncl program to decide on the bins (in particular for the mixed bins)? I would be interested to see what bins you decided on.

ilaria-quaglia commented 1 year ago

@tilmes as a first test we wanted to leave rmin and rmrat as they were and add 2 more bins

cbardeen commented 1 year ago

You need to get the code from Pengfei. You are basically going to have to repeat a bunch of calculations done in the code to determing 4 things for the Mie calculation:

1) core radus 2) shell radius 3) core refractive index 4) shell refractive index

NOTE: 3 & 4 change with wavelength

For the table you have to determine these for things based upon the bin you are in (which determines the particle mass) and the composition implied by the lookup table entries. These calculations will be different for the different groups.

For the pure sulfates, the table is just based upon wegiht percent and there is no core. So based on the bin and the weight percent you can determine the size of the particle and the amounts of H2SO4 and H2O. You can determine the refractive index and then from there the optical properties. For each bin, you need to do this calculation for the range of wieght percents in the table.

             pext(i) = table_interp( tbl_wgtpct, h_ext_wtp(:,isw), wgtpct(i,k) )
             pabs(i) = (1._r8 - table_interp( tbl_wgtpct, h_ssa_wtp(:,isw), wgtpct(i,k) ) ) * pext(i)
             pasm(i) = table_interp( tbl_wgtpct, h_asm_wtp(:,isw), wgtpct(i,k) )

For the fixed sulfates it is more complicated. The table is based upon relative humidity, core fraction, bc/dust ratio, and kappa. To build the table you will need to be able to take those parameters for each bin and determine the 4 things listed above to calculate the optical properties. This requires having some of the code that is already in the model to determine how much water goes on the particle for a given kappa, ... I am not sure why Pengfei chose the columns he did for the lookup table. You could conceivably have a look table based on the 4 things above, but you would need to have a set of values that span the range of interest.

            pext(i) = table_interp( tbl_relh, tbl_corefrac, tbl_bcdust, tbl_kap, &
                                     h_ext_coreshell(:,isw,:,:,:), &
                                     relh(i,k), corefrac(i), bcdust(i), crkappa(i,k) )
             pabs(i) = (1._r8 - table_interp( tbl_relh, tbl_corefrac, tbl_bcdust, tbl_kap, &
                                     h_ssa_coreshell(:,isw,:,:,:), &
                                     relh(i,k), corefrac(i), bcdust(i), crkappa(i,k) ) ) * pext(i)
             pasm(i) = table_interp( tbl_relh, tbl_corefrac, tbl_bcdust, tbl_kap, &
                                     h_asm_coreshell(:,isw,:,:,:), &
                                     relh(i,k), corefrac(i), bcdust(i), crkappa(i,k) )

P.S. When you add bins, you need to add to the number of advected species. Since everything in CARMA has the same number of bins, you will need to add NELEM*add_bins to the number of advected species that you currently have. You can either specify this in build-namelist or in env_build.xml as part of CAM_CONFIG_OPTS.

On Apr 11, 2023, at 8:22 AM, tilmes @.***> wrote:

@cbardeen https://github.com/cbardeen It seems to be time to learn how to create new lookup tables with CARMA (I have not done this at this point). Could you help with this? @dan-visioni https://github.com/dan-visioni Did you use Chuck's ncl program to decide on the bins (in particular for the mixed bins)? I would be interested to see what bins you decided on.

— Reply to this email directly, view it on GitHub https://github.com/NCAR/CARMA_dev/issues/28#issuecomment-1503459747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLRNRB4S6MJTKEC6MAMB2TXAVSLFANCNFSM6AAAAAAWZOD2FM. You are receiving this because you were mentioned.

tilmes commented 1 year ago

@zywshoon do you have the code that creates the lookup tables for Pengfei's model? If so, can you share this? Simone

zywshoon commented 1 year ago

@tilmes is this what you are looking for? /glade/u/home/yunqian/cesm/case/Pengfeimodel1990_2000_volc/SourceMods/src.cam/carma_intr.F90

search "for 5-D core-shell optical properties"

tilmes commented 1 year ago

@zywshoon yes, I think, this is what we need. @cbardeen I assume our carma_intr should be updated for the Mie calculation.