climlab / climlab-rrtmg

MIT License
5 stars 3 forks source link

Expose the internal two-stream model options in RRTMG_SW #20

Open brian-rose opened 1 week ago

brian-rose commented 1 week ago

There is an internal parameter in RRTMG_SW called kmodts that determines which two-stream model option is used:

!      standard delta-eddington, p.i.f.m., or d.o.m. layer calculations.
!      kmodts  = 1 eddington (joseph et al., 1976)
!              = 2 pifm (zdunkowski et al., 1980)
!              = 3 discrete ordinates (liou, 1973)

However the parameter is hard-coded to kmodts = 2 in subroutine reftra_sw.

A straightforward modification is to expose this parameter to the Python layer and set a default value of 2.

I propose to rename the Python parameter something more verbose like twostream_option.

brian-rose commented 1 week ago

To be consistent with the existing design of this module -- which is set up to be a thin-as-possible wrapper to the RRTMG fortran code, I think the parameter should be called kmodts here.

It can happily have a different name in the climlab code that interacts with this module.