3 #include <boost/progress.hpp> 9 void create_bin_uvvswir_v1(
int *E_nlayers,
int *E_ndat,
int *E_maxbins,
int *ndat,
int *nlay,
int *nbin,
double *binlims,
double *gasdat,
double *omega,
int *ncnt,
int *index);
14 Range all = Range::all();
16 Array<double, 1> wavenumber(spec_domain.
wavenumber());
19 Array<double, 2> optical_depth(atmosphere->number_layer(), wavenumber.rows(), blitz::ColumnMajorArray<2>());
20 Array<double, 2> single_scattering_albedo(optical_depth.shape(), blitz::ColumnMajorArray<2>());
23 for(
int wn_idx = 0; wn_idx < wavenumber.rows(); ++wn_idx) {
24 optical_depth(all, wn_idx) = atmosphere->optical_depth_wrt_iv(wavenumber(wn_idx), channel_index).value();
25 single_scattering_albedo(all, wn_idx) = atmosphere->single_scattering_albedo_wrt_iv(wavenumber(wn_idx), channel_index).value();
27 if (progress) *progress += 1;
31 int nlayer = atmosphere->number_layer();
32 int ndat = wavenumber.rows();
35 binlims_.reference(Array<double, 1>(nbin, blitz::ColumnMajorArray<1>()));
36 ncnt_.reference(Array<int, 1>(nbin, blitz::ColumnMajorArray<1>()));
37 index_.reference(Array<int, 1>(wavenumber.rows(), blitz::ColumnMajorArray<1>()));
39 create_bin_uvvswir_v1(&nlayer, &ndat, &nbin, &ndat, &nlayer, &nbin, binlims_.dataFirst(), optical_depth.dataFirst(), single_scattering_albedo.dataFirst(), ncnt_.dataFirst(), index_.dataFirst());
void compute_bins(const SpectralDomain &spec_domain, int chanel_index)
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
Apply value function to a blitz array.
static std::ostream * stream()
Underlying stream, can be null if no underlying stream.
blitz::Array< double, 1 > wavenumber(const Unit &Units=units::inv_cm) const
Return data as wavenumbers.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
void create_bin_uvvswir_v1(int *E_nlayers, int *E_ndat, int *E_maxbins, int *ndat, int *nlay, int *nbin, double *binlims, double *gasdat, double *omega, int *ncnt, int *index)