exo_k.two_stream.two_stream_crisp
Created in Jan 2021
@author: jeremy leconte
Module Contents
- exo_k.two_stream.two_stream_crisp.jit = False
- exo_k.two_stream.two_stream_crisp.solve_2stream_nu_xsec(source_nu, dtau_nu, omega0_nu, g_asym_nu, flux_top_dw_nu, mu0=2.0 / 3.0, alb_surf=0.0, verbose=False, flux_at_level=False)[source]
Deals with the spectral axis
- exo_k.two_stream.two_stream_crisp.solve_2stream_nu_corrk(source_nu, dtau_nu, omega0_nu, g_asym_nu, flux_top_dw_nu, mu0=2.0 / 3.0, alb_surf=0.0, verbose=False, flux_at_level=False)[source]
Deals with the spectral axis
- exo_k.two_stream.two_stream_crisp.solve_2stream(source, dtau, omega0, g_asym, mu0=2.0 / 3.0, flux_top_dw=0.0, alb_surf=0.0, verbose=False)[source]
Inherited from ExoRem (Blain et al. 2020): https://gitlab.obspm.fr/dblain/exorem/-/blob/master/src/fortran/exorem/radiative_transfer.f90
PURPOSE:
THIS subroutine COMPUTES THE UPWARD, DOWNWARD AND NET THERMAL FLUX IN AN INHOMOGENEOUS ABSORBING, SCATTERING ATMOSPHERE. THE TWO_STREAM APPROXIMATION (QUADRATURE WITH COS OF AVERAGE ANGLE = mu0) IS USED TO FIND THE DIFFUSE REFLECTIVITY AND TRANSMISSIVITY AND THE TOTAL UPWARD AND DOWNWARD FLUXES FOR EACH OF THE NLAY HOMOGENEOUS LAYERS. THE ADDING METHOD IS then USED TO COMBINE THESE LAYERS. IF ANY LAYER IS THICKER THAN DTAU = EMAX1, IT IS ASSUMED TO BE SEMI-INFINITE. LAYERS THICKER THAN DTAU = EMAX2, ARE TREATED AS INFINITE LAYERS.
- NOTE: TO ACCOUNT FOR A DIFFUSE FLUX AT THE TOP OF THE ATMOS-
PHERE, THE USER MUST SET flux_dw(1) EQUAL TO THAT VALUE. FOR NO DOWNWARD DIFFUSE FLUX AT THE TOP OF THE ATMOSPHERE, THE USER MUST INITIALIZE flux_dw(1) TO ZERO IN THE CALLING PROGRAM.
- Parameters:
source (
array
,np.ndarray
) – PLANCK function AT EACH LEVEL FROM TOP OF THE ATMOSPHERE (L=0) TO THE SURFACE (L=NLAY) (NLAY+1 VALUES) JL: actually seems to be pi times the planck function as defined in the rest of the code.dtau (
array
,np.ndarray
) – ARRAY OF NORMAL INCIDENCE OPTICAL DEPTHS IN EACH HOMOGENEOUS MODEL LAYER. (NLAY VALUES)omega0 (
array
,np.ndarray
) – ARRAY OF SINGLE SCATTERING ALBEDOS FOR EACH HOMO- GENEOUS MODEL LAYER. (NLAY VALUES)g_asym (
array
,np.ndarray
) – ARRAY OF ASSYMETRY parameterS FOR EACH HOMOGENEOUS MODEL LAYER. (NLAY VALUES)mu0 (
float
) – Cos of quadrature angle (Original mu0 was 2/3.)flux_top_dw (
float
) – Diffuse downward flux at upper interface.
- Returns:
- flux_up: array, np.ndarray
UPWARD FLUX AT NLAY+1 LAYER BOUNDARIES. (flux_up(L) REFERS TO THE UPWARD FLUX AT THE TOP OF LAYER L)
- flux_dw: array, np.ndarray
DOWNWARD FLUX AT NLAY+1 LAYER BOUNDARIES. (flux_dw(L) REFERS TO THE DOWNWARD FLUX AT THE BOTTOM OF LAYER L-1)
- flux_up-flux_dw: array, np.ndarray
Net flux at the same levels
- exo_k.two_stream.two_stream_crisp._DEDIR1(BATM1, BATM2, AIR, GIR, TAU, mu0)[source]
CCCCCCCCCCCCCCCCCCCCCCCCCCC D E D I R 1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC C CC C PURPOSE : CC C CC C THIS subroutine USES THE TWO-STREAM ROUTINE (QUADRATURE WITH CC C COS OF AVERAGE ANGLE = mu0) TO FIND THE UPWARD AND DOWNWARD CC C THERMAL FLUXES EMITTED FROM A HOMOGENEOUS LAYER. CC C CC C AUTHORS: DAVID PAIGE AND DAVID CRISP CC C CC C INPUT: CC C CC C BTATM1 IS ATMOSPHERIC EMISSION at level L (ARBITRARY UNITS) CC C BTATM2 IS ATMOSPHERIC EMISSION at level L+1 (ARBITRARY UNITS) CC C AIR IS IR SINGLE SCATTERING ALBEDO CC C GIR IS IR ASYMMETRY parameter CC C TAU IS OPTICAL DEPTH (EXTINCTION = ABSORPTION + SCATTERING) CC C CC C OUTPUT : CC C CC C FUPTOP IS UPWARD FLUX AT TOP OF ATM (SAME UNITS AS BTATM1 or 2) CC C FDNBOT IS DOWNWARD FLUX AT SURFACE CC C FUPBOT IS UPWARD FLUX AT SURFACE CC C CC CCCCCCCCCCCCCCCCCCCCCCCCCCC D E D I R 1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC