11 .def(luabind::constructor<
const HdfFile&,
12 const std::string&>())
22 const std::string& Hdf_group)
23 : hdf_file_name(F.file_name()),
27 (Hdf_group +
"/wavenumber");
29 (Hdf_group +
"/spectrum");
30 if(!srange.units.is_commensurate(
Unit(
"dimensionless")))
31 throw Exception(
"Solar absorption spectrum units need to be dimensionless");
32 if(sdom.
value.rows() != srange.value.rows())
33 throw Exception(
"wavenumber and spectrum need to be the same size");
34 domain_unit = sdom.
units;
38 (x.dataFirst(), x.dataFirst() + x.rows(), y.dataFirst());
45 Array<double, 1> wv = spec_domain.
convert_wave(domain_unit);
48 res.resize(wv.shape());
49 for(
int i = 0; i < res.rows(); ++i)
50 res(i) = table(wv(i));
56 Os <<
"SolarAbsorptionTable\n" 57 <<
" Hdf file name: " << hdf_file_name <<
"\n" 58 <<
" Hdf group: " << hdf_group <<
"\n";
virtual void print(std::ostream &Os) const
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
virtual Spectrum solar_absorption_spectrum(const SpectralDomain &spec_domain) const
This calculates the solar absorption spectrum.
This is the base of the exception hierarchy for Full Physics code.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
This class calculates the solar absorption spectrum.
SolarAbsorptionTable(const HdfFile &Hdf_static_input, const std::string &Hdf_group)
Read the given file for the solar absorption spectrum.
blitz::Array< T, D > value
This class reads and writes a HDF5 file.
Apply value function to a blitz array.
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
blitz::Array< double, 1 > convert_wave(const Unit &Units) const
Return data as the supplied the units.
We have a number of different spectrums that appear in different parts of the code.
Libraries such as boost::units allow unit handling where we know the units at compile time...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
ArrayWithUnit< T, D > read_field_with_unit(const std::string &Dataname) const
Read a given field, along with metadata describing the units.
This class calculates the solar absorption spectrum.
blitz::Array< T, D > to_c_order(const blitz::Array< T, D > &In)
Ensure that a given blitz::Array is contiguous, not reversed, and in C RowMajorArray format...