40 GetLBLRTM(Y,G,Temperature,Pressure,Pressure_Limit,order);
44 Get2ndOrder(Y,G,DV,Temperature,Pressure,Pressure_Limit);
48 throw std::runtime_error(
"You are trying to return line mixing data for a line despite having\n" 49 "declared the line absorption can only be understood by full band calculations..\n");
51 throw std::runtime_error(
"You are trying to return a line mixing type that is unknown to ARTS.\n");
57 dY_dT=dG_dT=dDV_dT=0.0;
60 GetLBLRTM_dT(dY_dT,dG_dT,Temperature,dt,Pressure,Pressure_Limit,order);
64 Get2ndOrder_dT(dY_dT,dG_dT,dDV_dT,Temperature,Pressure,Pressure_Limit);
68 throw std::runtime_error(
"You are trying to return line mixing data for a line despite having\n" 69 "declared the line absorption can only be understood by full band calculations..\n");
71 throw std::runtime_error(
"You are trying to return a line mixing type that is unknown to ARTS.\n");
235 const Numeric& Pressure_Limit)
const 239 throw std::runtime_error(
"LBLRTM mode of line mixing does not have coefficients but are gridded. Use \"Line Mixing Y\" and equivalent instead.\n");
241 throw std::runtime_error(
"Non-resonant partial derivatives not supported.\n");
251 throw std::runtime_error(
"You are trying to return line mixing data for a line despite having\n" 252 "declared the line absorption can only be understood by full band calculations..\n");
254 throw std::runtime_error(
"You are trying to return a line mixing type that is unknown to ARTS.\n");
260 const Numeric& Pressure_Limit)
const 264 throw std::runtime_error(
"LBLRTM mode of line mixing does not have coefficients but are gridded. Use \"Line Mixing Y\" and equivalent instead.\n");
266 throw std::runtime_error(
"Non-resonant partial derivatives not supported.\n");
270 throw std::runtime_error(
"1st Order mode of line mixing only have zeroth order coefficients.\n");
272 throw std::runtime_error(
"You are trying to return line mixing data for a line despite having\n" 273 "declared the line absorption can only be understood by full band calculations..\n");
275 throw std::runtime_error(
"You are trying to return a line mixing type that is unknown to ARTS.\n");
281 const Numeric& Pressure_Limit)
const 285 throw std::runtime_error(
"LBLRTM mode of line mixing does not have coefficients but are gridded. Use \"Line Mixing Y\" and equivalent instead.\n");
287 throw std::runtime_error(
"Non-resonant partial derivatives not supported.\n");
297 throw std::runtime_error(
"You are trying to return line mixing data for a line despite having\n" 298 "declared the line absorption can only be understood by full band calculations..\n");
300 throw std::runtime_error(
"You are trying to return a line mixing type that is unknown to ARTS.\n");
311 if(Pressure>Pressure_Limit)
318 const Vector T0(1,Temperature);
329 if(Pressure_Limit < 0.0)
330 extrapol =
abs(Pressure_Limit);
344 Y = tmp[0] * Pressure;
346 G = tmp[0] * Pressure * Pressure;
360 if(Pressure>Pressure_Limit)
367 const Vector T0(1,Temperature);
374 itw1.
resize(gp1.nelem(),order+1);
379 if(Pressure_Limit < 0.0)
380 extrapol =
abs(Pressure_Limit);
398 interp(tmp1, itw1, y, gp1);
399 interp(tmp2, itw2, y, gp2);
400 dY_dT = (tmp2[0]-tmp1[0])/dt * Pressure;
401 interp(tmp1,itw1, g, gp1);
402 interp(tmp2,itw2, g, gp2);
403 dG_dT = (tmp2[0]-tmp1[0])/dt * Pressure * Pressure;
427 if(Pressure>Pressure_Limit)
437 Y = ( ( y[0] + y[1] * ( Theta-1. ) ) *
pow( Theta, y[2] ) ) * Pressure;
438 G = ( ( g[0] + g[1] * ( Theta-1. ) ) *
pow( Theta, g[2] ) ) * Pressure * Pressure;
439 DV = ( ( dv[0] + dv[1] * ( Theta-1. ) ) *
pow( Theta, dv[2] ) ) * Pressure * Pressure;
452 if(Pressure>Pressure_Limit)
463 dY_dT = - (T0* y[1]*
pow(Theta, y[2]))/T2 - (T0* y[2]*
pow(Theta,( y[2] - 1))*( y[0] + y[1]*(Theta - 1)))/T2;
464 dG_dT = - (T0* g[1]*
pow(Theta, g[2]))/T2 - (T0* g[2]*
pow(Theta,( g[2] - 1))*( g[0] + g[1]*(Theta - 1)))/T2;
465 dDV_dT = - (T0*dv[1]*
pow(Theta,dv[2]))/T2 - (T0*dv[2]*
pow(Theta,(dv[2] - 1))*(dv[0] + dv[1]*(Theta - 1)))/T2;
468 dG_dT*=Pressure*Pressure;
469 dDV_dT*=Pressure*Pressure;
472 dY_dT=dG_dT=dDV_dT=0;
483 if(Pressure>Pressure_Limit)
493 dY0 =
pow( Theta, y[2] ) * Pressure;
494 dG0 =
pow( Theta, g[2] ) * Pressure * Pressure;
495 dDV0 =
pow( Theta, dv[2] ) * Pressure * Pressure;
509 if(Pressure>Pressure_Limit)
519 dY1 = ( ( ( Theta-1. ) ) *
pow( Theta, y[2] ) ) * Pressure;
520 dG1 = ( ( ( Theta-1. ) ) *
pow( Theta, g[2] ) ) * Pressure * Pressure;
521 dDV1 = ( ( ( Theta-1. ) ) *
pow( Theta, dv[2] ) ) * Pressure * Pressure;
535 if(Pressure>Pressure_Limit)
544 const Numeric logTheta = log(Theta);
546 dYexp = ( ( y[0] + y[1] * ( Theta-1. ) ) *
pow( Theta, y[2] ) ) * Pressure * logTheta;
547 dGexp = ( ( g[0] + g[1] * ( Theta-1. ) ) *
pow( Theta, g[2] ) ) * Pressure * Pressure * logTheta;
548 dDVexp = ( ( dv[0] + dv[1] * ( Theta-1. ) ) *
pow( Theta, dv[2] ) ) * Pressure * Pressure * logTheta;
551 dYexp=dDVexp=dGexp=0;
561 if(Pressure>Pressure_Limit)
568 Y = y *
pow(T0/Temperature, x) * Pressure;
581 if(Pressure>Pressure_Limit)
591 dY_dT = y * (-(T0*x*
pow((Theta),(x - 1)))/T2) * Pressure;
603 if(Pressure>Pressure_Limit)
609 dY0 =
pow(T0/Temperature, x) * Pressure;
622 if(Pressure>Pressure_Limit)
629 dYexp = y *
pow(T0/Temperature, x) * Pressure * log(T0/Temperature);
644 mdata[1][0] *= 1 + change;
646 mdata[1][0] += change;
649 throw std::runtime_error(
"Unsupported change");
657 mdata[1][1] *= 1 + change;
659 mdata[1][1] += change;
662 throw std::runtime_error(
"Unsupported change");
670 mdata[2][0] *= 1 + change;
672 mdata[2][0] += change;
676 mdata[1][2] *= 1 + change;
678 mdata[1][2] += change;
681 throw std::runtime_error(
"Unsupported change");
689 mdata[2][0] *= 1 + change;
691 mdata[2][0] += change;
694 throw std::runtime_error(
"Unsupported change");
702 mdata[2][1] *= 1 + change;
704 mdata[2][1] += change;
707 throw std::runtime_error(
"Unsupported change");
715 mdata[2][2] *= 1 + change;
717 mdata[2][2] += change;
720 throw std::runtime_error(
"Unsupported change");
728 mdata[3][0] *= 1 + change;
730 mdata[3][0] += change;
733 throw std::runtime_error(
"Unsupported change");
741 mdata[3][1] *= 1 + change;
743 mdata[3][1] += change;
746 throw std::runtime_error(
"Unsupported change");
754 mdata[3][2] *= 1 + change;
756 mdata[3][2] += change;
759 throw std::runtime_error(
"Unsupported change");
783 throw std::runtime_error(
"You are trying to set line mixing data for a line despite having\n" 784 "declared the line absorption can only be understood by full band calculations..\n");
786 throw std::runtime_error(
"You are trying to store a line mixing type that is unknown to ARTS.\n");
806 throw std::runtime_error(
"You are trying to store a line mixing type that is unknown to ARTS.\n");
817 throw std::runtime_error(
"The line mixing data vector is not of the right length for LBLRTM.\n");
825 mdata[0][0] = input[0];
826 mdata[0][1] = input[1];
827 mdata[0][2] = input[2];
828 mdata[0][3] = input[3];
832 mdata[1][0] = input[4];
833 mdata[1][1] = input[5];
834 mdata[1][2] = input[6];
835 mdata[1][3] = input[7];
839 mdata[2][0] = input[8];
840 mdata[2][1] = input[9];
841 mdata[2][2] = input[10];
842 mdata[2][3] = input[11];
852 throw std::runtime_error(
"The line mixing data vector is not of the right length for LBLRTM non-resonant.\n");
857 mdata[0][0] = input[0];
866 throw std::runtime_error(
"You are trying to set line mixing data to a none line mixed line.\n");
875 throw std::runtime_error(
"The line mixing data vector is not of the right length for 2ndOrder.\n");
882 mdata[0][0] = input[6];
886 mdata[1][0] = input[0];
887 mdata[1][1] = input[1];
888 mdata[1][2] = input[7];
892 mdata[2][0] = input[2];
893 mdata[2][1] = input[3];
894 mdata[2][2] = input[8];
898 mdata[3][0] = input[4];
899 mdata[3][1] = input[5];
900 mdata[3][2] = input[9];
909 throw std::runtime_error(
"The line mixing data vector is not of the right length for 1stOrder.\n");
916 mdata[0][0] = input[0];
920 mdata[1][0] = input[1];
924 mdata[2][0] = input[2];
934 else if(input ==
"LL")
936 else if(input ==
"NR")
938 else if(input ==
"L2")
940 else if(input ==
"L1")
942 else if(input ==
"BB")
945 throw std::runtime_error(
"You are trying to read a line mixing type that is unknown to ARTS.\n");
955 output[0] =
mdata[0][0];
956 output[1] =
mdata[0][1];
957 output[2] =
mdata[0][2];
958 output[3] =
mdata[0][3];
961 output[4] =
mdata[1][0];
962 output[5] =
mdata[1][1];
963 output[6] =
mdata[1][2];
964 output[7] =
mdata[1][3];
967 output[8] =
mdata[2][0];
968 output[9] =
mdata[2][1];
969 output[10] =
mdata[2][2];
970 output[11] =
mdata[2][3];
978 output[0]=
mdata[0][0];
988 output[6] =
mdata[0][0];
991 output[0] =
mdata[1][0];
992 output[1] =
mdata[1][1];
993 output[7] =
mdata[1][2];
996 output[2] =
mdata[2][0];
997 output[3] =
mdata[2][1];
998 output[8] =
mdata[2][2];
1001 output[4] =
mdata[3][0];
1002 output[5] =
mdata[3][1];
1003 output[9] =
mdata[3][2];
1013 output[0] =
mdata[0][0];
1016 output[1] =
mdata[1][0];
1019 output[2] =
mdata[2][0];
1041 throw std::runtime_error(
"You are trying to store a line mixing type that is unknown to ARTS.\n");
1064 throw std::runtime_error(
"You are trying to store a line mixing type that is unknown to ARTS.\n");
INDEX Index
The type to use for all integer numbers and indices.
void GetLineMixingParams_dT(Numeric &dY_dT, Numeric &dG_dG, Numeric &dDV_dT, const Numeric &Temperature, const Numeric &dt, const Numeric &Pressure, const Numeric &Pressure_Limit, const Index &order=1) const
void GetVectorFromData(Vector &output) const
void ChangeYexp(const Numeric &change, const bool relative=false)
void Vector2LBLRTMData(const Vector &input)
void ChangeG0(const Numeric &change, const bool relative=false)
Index nelem() const
Number of elements.
void ChangeDF1(const Numeric &change, const bool relative=false)
void GetLBLRTM_O2NonResonant(Numeric &G) const
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
void GetLBLRTM_dT(Numeric &dY_dT, Numeric &dG_dT, const Numeric &Temperature, const Numeric &dt, const Numeric &Pressure, const Numeric &Pressure_Limit, const Index &order) const
void SecondOrderData2Vector(Vector &output) const
String Type2StorageTag() const
void LBLRTMData2Vector(Vector &output) const
void Get1stOrder_dZerothOrder(Numeric &dY0, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void FirstOrderData2Vector(Vector &output) const
Index nelem() const
Returns the number of elements.
void SetInternalDerivatives(ComplexVector &derivatives, const ArrayOfRetrievalQuantity &ppd, const QuantumIdentifier &QI, const Numeric &temperature, const Numeric &pressure, const Numeric &pressure_limit) const
void Vector2NoneData(const Vector &)
void GetLineMixingParams_dZerothOrder(Numeric &dY0, Numeric &dG0, Numeric &dDV0, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void Get2ndOrder_dExponent(Numeric &dYexp, Numeric &dGexp, Numeric &dDVexp, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void ChangeDF0(const Numeric &change, const bool relative=false)
void StorageTag2SetType(const String &input)
void SetDataFromVectorWithKnownType(ConstVectorView)
void Get2ndOrder(Numeric &Y, Numeric &G, Numeric &DV, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void ChangeY0(const Numeric &change, const bool relative=false)
Class to identify and match lines by their quantum numbers.
void Vector2SecondOrderData(const Vector &input)
NUMERIC Numeric
The type to use for all floating point numbers.
void GetLineMixingParams_dFirstOrder(Numeric &dY1, Numeric &dG1, Numeric &dDV1, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void GetLineMixingParams(Numeric &Y, Numeric &G, Numeric &DV, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit, const Index &order=1) const
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
The maximum difference from 1 that we allow for a sum check.
void Get1stOrder_dT(Numeric &dY_dT, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
Numeric pow(const Rational base, Numeric exp)
Power of.
void Vector2LBLRTM_O2NonResonantData(const Vector &input)
void Get2ndOrder_dFirstOrder(Numeric &dY1, Numeric &dG1, Numeric &dDV1, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
This can be used to make arrays out of anything.
Contains the line mixing data class definition.
void ChangeDFexp(const Numeric &change, const bool relative=false)
void Vector2FirstOrderData(const Vector &input)
void resize(Index n)
Resize function.
void GetLBLRTM(Numeric &Y, Numeric &G, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit, const Index &order) const
void Get2ndOrder_dT(Numeric &dY_dT, Numeric &dG_dT, Numeric &dDV_dT, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void Get1stOrder(Numeric &Y, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
A constant view of a Vector.
Index nelem(const Lines &l)
Number of lines.
void Get1stOrder_dExponent(Numeric &dYexp, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
Index ExpectedVectorLengthFromType() const
void ChangeY1(const Numeric &change, const bool relative=false)
void LBLRTM_O2NonResonantData2Vector(Vector &output) const
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
void GetLineMixingParams_dExponent(Numeric &dYexp, Numeric &dGexp, Numeric &dDVexp, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void ChangeGexp(const Numeric &change, const bool relative=false)
void ChangeG1(const Numeric &change, const bool relative=false)
void Get2ndOrder_dZerothOrder(Numeric &dY0, Numeric &dG0, Numeric &dDV0, const Numeric &Temperature, const Numeric &Pressure, const Numeric &Pressure_Limit) const
void resize(Index r, Index c)
Resize function.