def __init__(self, **kwargs):
        '''Closely following SPEEDY / MITgcm longwave model
        band 0 is window region (between 8.5 and 11 microns)
        band 1 is CO2 channel (the band of strong absorption by CO2 around 15 microns)
        band 2 is weak H2O channel (aggregation of spectral regions with weak to moderate absorption by H2O)
        band 3 is strong H2O channel (aggregation of regions with strong absorption by H2O)
        '''
        super(FourBandLW, self).__init__(**kwargs)
        #  SPEEDY uses an approximation to the Planck function
        #  and the band fraction for every emission is calculated from
        #  its current temperature
        #  Here for simoplicity we'll just set an average band_fraction
        #  and hold it fixed
        Tarray = np.linspace(-30, 30) + 273.15
        self.band_fraction = np.mean(SPEEDY_band_fraction(Tarray), axis=1)

        # defaults from MITgcm/aim:
        # these are layer absorptivities per dp = 10^5 Pa
        # the water vapor terms are expressed for dq = 1 g/kg
        ABLWIN = 0.7
        ABLCO2 = 4.0
        ABLWV1 = 0.7
        ABLWV2 = 50.0
        #  I'm going to assume that the absorption in window region is by O3.
        #   not sure if this makes any sense... maybe it should be zero
        O3 = np.array([ABLWIN, 0., 0., 0.]) / 1E5 * const.g / 5E-6
        self.absorption_cross_section['O3'] = np.reshape(O3,
            (self.num_channels, 1))
        # the CO2 mixing ratio for which SPEEDY / MITgcm is tuned...
        #   not clear what this number should be
        AIMCO2 = 380E-6
        CO2 = np.array([0., ABLCO2, 0., 0.]) / 1E5 * const.g / AIMCO2
        #self.absorption_cross_section['CO2'] = np.reshape(CO2,
        #    (self.num_channels, 1))
        # Need to multiply by 1E3 for H2O fields because we use kg/kg for mixing ratio
        H2O = np.array([0., 0., ABLWV1, ABLWV2]) / 1E5 * const.g * 1E3
        #self.absorption_cross_section['H2O'] = np.reshape(H2O,
        #    (self.num_channels, 1))
        for n in range(self.Tatm.domain.numdims):
            CO2 = CO2[:, np.newaxis]
            O3 = O3[:, np.newaxis]
            H2O = H2O[:, np.newaxis]
        self.absorption_cross_section.update({'CO2': CO2, 'H2O': H2O, 'O3': O3})
        if 'CO2' not in self.absorber_vmr:
            self.absorber_vmr['CO2'] = 380.E-6 * np.ones_like(self.Tatm)
        if 'O3' not in self.absorber_vmr:
            self.absorber_vmr['O3'] = np.zeros_like(self.Tatm)
        if 'H2O' not in self.absorber_vmr:
            self.absorber_vmr['H2O'] = self.q
def __init__ ( self , ** kwargs ) : super ( FourBandLW , self ) . __init__ ( ** kwargs ) Tarray = np . linspace ( - 30 , 30 ) + 273.15 self . band_fraction = np . mean ( SPEEDY_band_fraction ( Tarray ) , axis = 1 ) ABLWIN = 0.7 ABLCO2 = 4.0 ABLWV1 = 0.7 ABLWV2 = 50.0 O3 = np . array ( [ ABLWIN , 0. , 0. , 0. ] ) / 1E5 * const . g / 5E-6 self . absorption_cross_section [ 'O3' ] = np . reshape ( O3 , ( self . num_channels , 1 ) ) AIMCO2 = 380E-6 CO2 = np . array ( [ 0. , ABLCO2 , 0. , 0. ] ) / 1E5 * const . g / AIMCO2 H2O = np . array ( [ 0. , 0. , ABLWV1 , ABLWV2 ] ) / 1E5 * const . g * 1E3 for n in range ( self . Tatm . domain . numdims ) : CO2 = CO2 [ : , np . newaxis ] O3 = O3 [ : , np . newaxis ] H2O = H2O [ : , np . newaxis ] self . absorption_cross_section . update ( { 'CO2' : CO2 , 'H2O' : H2O , 'O3' : O3 } ) if 'CO2' not in self . absorber_vmr : self . absorber_vmr [ 'CO2' ] = 380.E-6 * np . ones_like ( self . Tatm ) if 'O3' not in self . absorber_vmr : self . absorber_vmr [ 'O3' ] = np . zeros_like ( self . Tatm ) if 'H2O' not in self . absorber_vmr : self . absorber_vmr [ 'H2O' ] = self . q
Closely following SPEEDY / MITgcm longwave model
        band 0 is window region (between 8.5 and 11 microns)
        band 1 is CO2 channel (the band of strong absorption by CO2 around 15 microns)
        band 2 is weak H2O channel (aggregation of spectral regions with weak to moderate absorption by H2O)
        band 3 is strong H2O channel (aggregation of regions with strong absorption by H2O)