1 #ifndef ERF_RRTMGP_INTERFACE_H
2 #define ERF_RRTMGP_INTERFACE_H
4 #include <rrtmgp_const.h>
5 #include <mo_gas_optics_rrtmgp.h>
6 #include <mo_cloud_optics.h>
7 #include <mo_fluxes_byband.h>
8 #include <mo_load_coefficients.h>
9 #include <mo_gas_concentrations.h>
10 #include <mo_gas_optics_rrtmgp.h>
11 #include <mo_cloud_optics.h>
12 #include <mo_rte_sw.h>
13 #include <mo_rte_lw.h>
14 #include <mo_load_cloud_coefficients.h>
34 const std::string& coefficients_file_sw,
const std::string& coefficients_file_lw,
35 const std::string& cloud_optics_file_sw,
const std::string& cloud_optics_file_lw);
44 real1d &sfc_alb_dir_vis, real1d &sfc_alb_dir_nir,
45 real1d &sfc_alb_dif_vis, real1d &sfc_alb_dif_nir,
46 real2d &sfc_alb_dir, real2d &sfc_alb_dif);
51 real3d &sw_bnd_flux_dir , real3d &sw_bnd_flux_dif ,
52 real1d &sfc_flux_dir_vis, real1d &sfc_flux_dir_nir,
53 real1d &sfc_flux_dif_vis, real1d &sfc_flux_dif_nir);
58 real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev,
60 real2d &sfc_alb_dir, real2d &sfc_alb_dif, real1d &mu0,
61 real2d &lwp, real2d &iwp, real2d &rel, real2d &rei, real2d &cldfrac,
62 real3d &aer_tau_sw, real3d &aer_ssa_sw, real3d &aer_asm_sw, real3d &aer_tau_lw,
63 real3d &cld_tau_sw_bnd, real3d &cld_tau_lw_bnd,
64 real3d &cld_tau_sw_gpt, real3d &cld_tau_lw_gpt,
65 real2d &sw_flux_up, real2d &sw_flux_dn, real2d &sw_flux_dn_dir,
66 real2d &lw_flux_up, real2d &lw_flux_dn,
67 real2d &sw_clnclrsky_flux_up, real2d &sw_clnclrsky_flux_dn, real2d &sw_clnclrsky_flux_dn_dir,
68 real2d &sw_clrsky_flux_up, real2d &sw_clrsky_flux_dn, real2d &sw_clrsky_flux_dn_dir,
69 real2d &sw_clnsky_flux_up, real2d &sw_clnsky_flux_dn, real2d &sw_clnsky_flux_dn_dir,
70 real2d &lw_clnclrsky_flux_up, real2d &lw_clnclrsky_flux_dn,
71 real2d &lw_clrsky_flux_up, real2d &lw_clrsky_flux_dn,
72 real2d &lw_clnsky_flux_up, real2d &lw_clnsky_flux_dn,
73 real3d &sw_bnd_flux_up, real3d &sw_bnd_flux_dn, real3d &sw_bnd_flux_dn_dir,
74 real3d &lw_bnd_flux_up, real3d &lw_bnd_flux_dn,
75 const real tsi_scaling,
76 const bool extra_clnclrsky_diag =
false,
const bool extra_clnsky_diag =
false);
80 rrtmgp_sw (
const int ncol,
const int nlay,
81 GasOpticsRRTMGP &k_dist,
82 real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev,
84 real2d &sfc_alb_dir, real2d &sfc_alb_dif, real1d &mu0,
85 OpticalProps2str &aerosol, OpticalProps2str &clouds,
87 FluxesBroadband &clnclrsky_fluxes,
88 FluxesBroadband &clrsky_fluxes,
89 FluxesBroadband &clnsky_fluxes,
90 const real tsi_scaling,
91 const bool extra_clnclrsky_diag,
92 const bool extra_clnsky_diag);
96 rrtmgp_lw (
const int ncol,
const int nlay,
97 GasOpticsRRTMGP &k_dist,
98 real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev,
100 OpticalProps1scl &aerosol, OpticalProps1scl &clouds,
101 FluxesByband &fluxes,
102 FluxesBroadband &clnclrsky_fluxes,
103 FluxesBroadband &clrsky_fluxes,
104 FluxesBroadband &clnsky_fluxes,
105 const bool extra_clnclrsky_diag,
106 const bool extra_clnsky_diag);
114 const int overlap_option,
125 const real3d& cld_tau_gpt,
131 const real2d &p_del,
const real2d &z_del,
const real2d &
qc,
132 const real2d &qi,
const real2d &rel,
const real2d &rei,
133 const real2d &cldfrac_tot,
const real2d &nc,
134 real1d &T_mid_at_cldtop, real1d &p_mid_at_cldtop,
135 real1d &cldfrac_ice_at_cldtop, real1d &cldfrac_liq_at_cldtop,
136 real1d &cldfrac_tot_at_cldtop, real1d &cdnc_at_cldtop,
137 real1d &eff_radius_qc_at_cldtop, real1d &eff_radius_qi_at_cldtop);
double real
Definition: ERF_OrbCosZenith.H:9
void init_kls()
Definition: ERF_RRTMGP_Interface.cpp:3
void finalize_kls()
Definition: ERF_RRTMGP_Interface.cpp:9
@ qc
Definition: ERF_SatAdj.H:36
Definition: ERF_RRTMGP_Interface.cpp:15
void rrtmgp_finalize()
Definition: ERF_RRTMGP_Interface.cpp:257
CloudOptics cloud_optics_sw
Definition: ERF_RRTMGP_Interface.cpp:34
int3d get_subcolumn_mask(const int ncol, const int nlay, const int ngpt, real2d &cldf, const int overlap_option, int1d &seeds)
Definition: ERF_RRTMGP_Interface.cpp:521
void rrtmgp_sw(const int ncol, const int nlay, GasOpticsRRTMGP &k_dist, real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev, GasConcs &gas_concs, real2d &sfc_alb_dir, real2d &sfc_alb_dif, real1d &mu0, OpticalProps2str &aerosol, OpticalProps2str &clouds, FluxesByband &fluxes, FluxesBroadband &clnclrsky_fluxes, FluxesBroadband &clrsky_fluxes, FluxesBroadband &clnsky_fluxes, const real tsi_scaling, const bool extra_clnclrsky_diag, const bool extra_clnsky_diag)
Definition: ERF_RRTMGP_Interface.cpp:594
void compute_band_by_band_surface_albedos(const int ncol, const int nswbands, real1d &sfc_alb_dir_vis, real1d &sfc_alb_dir_nir, real1d &sfc_alb_dif_vis, real1d &sfc_alb_dif_nir, real2d &sfc_alb_dir, real2d &sfc_alb_dif)
Definition: ERF_RRTMGP_Interface.cpp:268
void rrtmgp_lw(const int ncol, const int nlay, GasOpticsRRTMGP &k_dist, real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev, GasConcs &gas_concs, OpticalProps1scl &aerosol, OpticalProps1scl &clouds, FluxesByband &fluxes, FluxesBroadband &clnclrsky_fluxes, FluxesBroadband &clrsky_fluxes, FluxesBroadband &clnsky_fluxes, const bool extra_clnclrsky_diag, const bool extra_clnsky_diag)
Definition: ERF_RRTMGP_Interface.cpp:873
int get_wavelength_index_lw(double wavelength)
Definition: ERF_RRTMGP_Interface.cpp:1048
void compute_aerocom_cloudtop(int ncol, int nlay, const real2d &tmid, const real2d &pmid, const real2d &p_del, const real2d &z_del, const real2d &qc, const real2d &qi, const real2d &rel, const real2d &rei, const real2d &cldfrac_tot, const real2d &nc, real1d &T_mid_at_cldtop, real1d &p_mid_at_cldtop, real1d &cldfrac_ice_at_cldtop, real1d &cldfrac_liq_at_cldtop, real1d &cldfrac_tot_at_cldtop, real1d &cdnc_at_cldtop, real1d &eff_radius_qc_at_cldtop, real1d &eff_radius_qi_at_cldtop)
Definition: ERF_RRTMGP_Interface.cpp:1080
CloudOptics cloud_optics_lw
Definition: ERF_RRTMGP_Interface.cpp:35
int get_wavelength_index_sw(double wavelength)
Definition: ERF_RRTMGP_Interface.cpp:1044
void rrtmgp_main(const int ncol, const int nlay, real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev, GasConcs &gas_concs, real2d &sfc_alb_dir, real2d &sfc_alb_dif, real1d &mu0, real2d &lwp, real2d &iwp, real2d &rel, real2d &rei, real2d &cldfrac, real3d &aer_tau_sw, real3d &aer_ssa_sw, real3d &aer_asm_sw, real3d &aer_tau_lw, real3d &cld_tau_sw_bnd, real3d &cld_tau_lw_bnd, real3d &cld_tau_sw_gpt, real3d &cld_tau_lw_gpt, real2d &sw_flux_up, real2d &sw_flux_dn, real2d &sw_flux_dn_dir, real2d &lw_flux_up, real2d &lw_flux_dn, real2d &sw_clnclrsky_flux_up, real2d &sw_clnclrsky_flux_dn, real2d &sw_clnclrsky_flux_dn_dir, real2d &sw_clrsky_flux_up, real2d &sw_clrsky_flux_dn, real2d &sw_clrsky_flux_dn_dir, real2d &sw_clnsky_flux_up, real2d &sw_clnsky_flux_dn, real2d &sw_clnsky_flux_dn_dir, real2d &lw_clnclrsky_flux_up, real2d &lw_clnclrsky_flux_dn, real2d &lw_clrsky_flux_up, real2d &lw_clrsky_flux_dn, real2d &lw_clnsky_flux_up, real2d &lw_clnsky_flux_dn, real3d &sw_bnd_flux_up, real3d &sw_bnd_flux_dn, real3d &sw_bnd_flux_dn_dir, real3d &lw_bnd_flux_up, real3d &lw_bnd_flux_dn, const real tsi_scaling, const bool extra_clnclrsky_diag, const bool extra_clnsky_diag)
Definition: ERF_RRTMGP_Interface.cpp:391
void rrtmgp_initialize(GasConcs &gas_concs, const std::string &coefficients_file_sw, const std::string &coefficients_file_lw, const std::string &cloud_optics_file_sw, const std::string &cloud_optics_file_lw)
Definition: ERF_RRTMGP_Interface.cpp:234
GasOpticsRRTMGP k_dist_lw
Definition: ERF_RRTMGP_Interface.cpp:27
void compute_cloud_area(int ncol, int nlay, int ngpt, const real pmin, const real pmax, const real2d &pmid, const real3d &cld_tau_gpt, real1d &cld_area)
Definition: ERF_RRTMGP_Interface.cpp:1009
GasOpticsRRTMGP k_dist_sw
Definition: ERF_RRTMGP_Interface.cpp:26
int get_wavelength_index(OpticalProps &kdist, double wavelength)
Definition: ERF_RRTMGP_Interface.cpp:1052
void compute_broadband_surface_fluxes(const int ncol, const int ktop, const int nswbands, real3d &sw_bnd_flux_dir, real3d &sw_bnd_flux_dif, real1d &sfc_flux_dir_vis, real1d &sfc_flux_dir_nir, real1d &sfc_flux_dif_vis, real1d &sfc_flux_dif_nir)
Definition: ERF_RRTMGP_Interface.cpp:328
bool initialized
Definition: ERF_RRTMGP_Interface.cpp:37