41 using std::ostringstream;
42 using std::runtime_error;
74 Numeric temp_c = surface_temp - 273.15;
75 Numeric temp_cc = temp_c * temp_c;
76 Numeric temp_ccc = temp_cc * temp_c;
78 if ( (temp_c < -5.0) || (temp_c > 100.0) ||
79 (freq < 10e+9) || (freq > 500e+9) )
83 os <<
"Severe warning from dclamkaouchi: " 84 <<
"The accepted temperature range in centigrade is " 85 <<
"[-5,100],\nbut a value of " << temp_c
86 <<
"degree C was found. Also the allowed frequency range is " 87 <<
"[10 GHz,500 GHz],\nbut a value of " << freq
90 throw runtime_error( os.str() );
93 if ( (freq < 20e+9) || (freq > 200e+9) )
97 os <<
"Warning from dclamkaouchi: " 98 <<
"The accepted temperature range in centigrade is " 99 <<
"[-5,100],\nbut a value of " << temp_c
100 <<
"degree C was found. Also the allowed frequency range is " 101 <<
"[10 GHz,500 GHz],\nbut a value of " << freq
102 <<
" was found."<< surface_wind;
108 throw runtime_error( os.str() );
112 Numeric tau1 = surface_fastem_constants[0] + surface_fastem_constants[1]* temp_c +
113 surface_fastem_constants[2] * temp_cc;
115 Numeric tau2 = surface_fastem_constants[3] + surface_fastem_constants[4]* temp_c +
116 surface_fastem_constants[5] * temp_cc + surface_fastem_constants[6] * temp_ccc;
119 Numeric del1 = surface_fastem_constants[7] + surface_fastem_constants[8]* temp_c +
120 surface_fastem_constants[9] * temp_cc + surface_fastem_constants[10] * temp_ccc;
122 Numeric del2 = surface_fastem_constants[11] + surface_fastem_constants[12]* temp_c +
123 surface_fastem_constants[13] * temp_cc + surface_fastem_constants[14] * temp_ccc;
125 Numeric einf = surface_fastem_constants[17] + surface_fastem_constants[18] * temp_c;
128 Numeric fen = 2.0 * surface_fastem_constants[19] * freq/1e+9 * 0.001;
130 Numeric den1 = 1.0 + fen2 * tau1 * tau1;
131 Numeric den2 = 1.0 + fen2 * tau2 * tau2;
132 Numeric perm_real1 = del1/den1;
133 Numeric perm_real2 = del2/den2;
134 Numeric perm_imag1 = del1 * fen * tau1/den1;
135 Numeric perm_imag2 = del2 * fen * tau2/den2;
136 Numeric perm_real = perm_real1 + perm_real2 + einf;
137 Numeric perm_imag = perm_imag1 + perm_imag2;
139 Complex xperm (perm_real, perm_imag);
148 Numeric sin_theta = sin(theta * DEG2RAD);
151 Numeric sin_2 = pow(sin_theta, 2);
153 Complex perm1 = sqrt(xperm - sin_2);
154 Complex perm2 = xperm * cos_theta;
156 Complex rhth = (cos_theta - perm1)/(cos_theta + perm1);
157 Complex rvth = (perm2 - perm1)/(perm2 + perm1);
164 Numeric rverts = pow(rvertsr, 2) + pow(rvertsi, 2);
170 Numeric rhorzs = pow(rhorzsr, 2) + pow(rhorzsi, 2);
172 surface_emiss[0] = rverts;
173 surface_emiss[1] = rhorzs;
174 surface_emiss[2] = 0;
175 surface_emiss[3] = 0;
A class implementing complex numbers for ARTS.
std::complex< Numeric > Complex
The declarations of all the exception classes.
NUMERIC Numeric
The type to use for all floating point numbers.
A constant view of a Vector.
void fastem(VectorView surface_emiss, const Numeric &surface_temp, ConstVectorView surface_wind, ConstVectorView surface_fastem_constants, const Numeric &freq)
Calculate the surface emissivity using Fastem model.