52 const Vector& pnd_agenda_input_t,
53 const Matrix& pnd_agenda_input,
57 const Index& species_index,
67 pnd_agenda_input_names,
80 const Vector& pnd_agenda_input_t,
81 const Matrix& pnd_agenda_input,
85 const Index& species_index,
95 pnd_agenda_input_names,
112 const Vector& psd_size_grid,
113 const Vector& pnd_agenda_input_t,
114 const Matrix& pnd_agenda_input,
131 "The number of columns in *pnd_agenda_input* must " 132 "be 0, 1, 2, 3 or 4.");
135 const Index n0_fixed = (
Index) !(std::isnan(n0));
136 const Index mu_fixed = (
Index) !(std::isnan(mu));
137 const Index la_fixed = (
Index) !(std::isnan(la));
138 const Index ga_fixed = (
Index) !(std::isnan(ga));
140 if (nin + n0_fixed + mu_fixed + la_fixed + ga_fixed != 4)
142 "This PSD has four free parameters. This means that " 143 "the number\nof columns in *pnd_agenda_input* and the " 144 "number of numerics\n(i.e. non-NaN) and among " 145 "the GIN arguments n0, mu, la and\nga must add up to " 146 "four. And this was found not to be the case.");
156 mgd_i_pai[0] = nhit++;
161 mgd_i_pai[1] = nhit++;
166 mgd_i_pai[2] = nhit++;
171 mgd_i_pai[3] = nhit++;
186 for (
Index j = 0; j < 4; j++) {
187 if (dx2in[
i] == mgd_i_pai[j]) {
196 for (
Index ip = 0; ip < np; ip++) {
199 if (mgd_i_pai[
i] >= 0) {
200 mgd_pars[
i] = pnd_agenda_input(ip, mgd_i_pai[
i]);
203 Numeric t = pnd_agenda_input_t[ip];
206 if ((mgd_pars[0] == 0.) && (!ndx)) {
211 if (t < t_min || t > t_max) {
214 os <<
"Method called with a temperature of " << t <<
" K.\n" 215 <<
"This is outside the specified allowed range: [ max(0.," << t_min
216 <<
"), " << t_max <<
" ]";
217 throw runtime_error(os.
str());
224 if (mgd_pars[2] <= 0)
225 throw runtime_error(
"Bad MGD parameter detected: la <= 0");
226 if (mgd_pars[3] <= 0)
227 throw runtime_error(
"Bad MGD parameter detected: ga <= 0");
246 dpsd_data_dx(mgd_i_jac[i], ip,
joker) = jac_data(i,
joker);
255 const Vector& psd_size_grid,
256 const Vector& pnd_agenda_input_t,
257 const Matrix& pnd_agenda_input,
274 if (nin < 1 || nin > 4)
276 "The number of columns in *pnd_agenda_input* must " 278 if (scat_species_a <= 0)
279 throw runtime_error(
"*scat_species_a* should be > 0.");
280 if (scat_species_b <= 0 || scat_species_b >= 5)
281 throw runtime_error(
"*scat_species_b* should be > 0 and < 5.");
289 if (n0_depend + mu_depend + la_depend + ga_depend != 1)
291 "One (but only one) of n0, mu, la and ga must be NaN, " 292 "to flag that this parameter is the one dependent of " 294 if (mu_depend || ga_depend)
296 "Sorry, mu and la are not yet allowed to be the " 297 "dependent parameter.");
299 const Index n0_fixed = (
Index) !(n0_depend || std::isnan(n0));
300 const Index mu_fixed = (
Index) !(mu_depend || std::isnan(mu));
301 const Index la_fixed = (
Index) !(la_depend || std::isnan(la));
302 const Index ga_fixed = (
Index) !(ga_depend || std::isnan(ga));
304 if (nin + n0_fixed + mu_fixed + la_fixed + ga_fixed != 4)
306 "This PSD has four free parameters. This means that " 307 "the number\nof columns in *pnd_agenda_input* and the " 308 "number of numerics\n(i.e. not -999 or NaN) and among " 309 "the GIN arguments n0, mu, la and\nga must add up to " 310 "four. And this was found not to be the case.");
313 Vector mgd_pars(4), ext_pars(1);
320 }
else if (!n0_depend) {
321 mgd_i_pai[0] = nhit++;
325 }
else if (!mu_depend) {
326 mgd_i_pai[1] = nhit++;
330 }
else if (!la_depend) {
331 mgd_i_pai[2] = nhit++;
335 }
else if (!ga_depend) {
336 mgd_i_pai[3] = nhit++;
359 for (
Index j = 0; j < 4; j++) {
360 if (dx2in[
i] == mgd_i_pai[j]) {
370 for (
Index ip = 0; ip < np; ip++) {
372 ext_pars[0] = pnd_agenda_input(ip, ext_i_pai[0]);
375 if (mgd_i_pai[
i] >= 0) {
376 mgd_pars[
i] = pnd_agenda_input(ip, mgd_i_pai[
i]);
379 Numeric t = pnd_agenda_input_t[ip];
382 if ((ext_pars[0] == 0.) && (!ndx)) {
387 if (t < t_min || t > t_max) {
390 os <<
"Method called with a temperature of " << t <<
" K.\n" 391 <<
"This is outside the specified allowed range: [ max(0.," << t_min
392 <<
"), " << t_max <<
" ]";
393 throw runtime_error(os.
str());
401 Numeric mub1 = 0, eterm = 0, scfac = 0;
404 mub1 = mgd_pars[1] + scat_species_b + 1;
405 eterm = mub1 / mgd_pars[3];
406 scfac = (mgd_pars[3] *
pow(mgd_pars[2], eterm)) /
407 (scat_species_a * tgamma(eterm));
408 mgd_pars[0] = scfac * ext_pars[0];
409 }
else if (la_depend) {
410 if (ext_pars[0] <= 0)
412 "The mass content must be > 0 when la is " 413 "the dependent parameter.");
414 mub1 = mgd_pars[1] + scat_species_b + 1;
415 eterm = mub1 / mgd_pars[3];
416 scfac = mgd_pars[3] / (scat_species_a * mgd_pars[0] * tgamma(eterm));
417 scfac =
pow(scfac, -1 / eterm);
418 mgd_pars[2] = scfac *
pow(ext_pars[0], -1 / eterm);
426 throw runtime_error(
"Bad MGD parameter detected: mu + b + 1 <= 0");
427 if (mgd_pars[2] <= 0)
428 throw runtime_error(
"Bad MGD parameter detected: la <= 0");
429 if (mgd_pars[3] <= 0)
430 throw runtime_error(
"Bad MGD parameter detected: ga <= 0");
441 (
bool)mgd_do_jac[0] || n0_depend,
442 (
bool)mgd_do_jac[1] || mu_depend,
443 (
bool)mgd_do_jac[2] || la_depend,
444 (
bool)mgd_do_jac[3] || ga_depend);
449 dpsd_data_dx(ext_i_jac[0], ip,
joker) = jac_data(0,
joker);
450 dpsd_data_dx(ext_i_jac[0], ip,
joker) *= scfac;
451 }
else if (la_depend) {
452 dpsd_data_dx(ext_i_jac[0], ip,
joker) = jac_data(2,
joker);
453 dpsd_data_dx(ext_i_jac[0], ip,
joker) *=
454 scfac * (-1 / eterm) *
pow(ext_pars[0], -(1 / eterm + 1));
463 dpsd_data_dx(mgd_i_jac[i], ip,
joker) = jac_data(i,
joker);
472 const Vector& psd_size_grid,
473 const Vector& pnd_agenda_input_t,
474 const Matrix& pnd_agenda_input,
493 pnd_agenda_input_names,
510 const Vector& psd_size_grid,
511 const Vector& pnd_agenda_input_t,
512 const Matrix& pnd_agenda_input,
527 "mean particle mass",
531 pnd_agenda_input_names,
548 const Vector& psd_size_grid,
549 const Vector& pnd_agenda_input_t,
550 const Matrix& pnd_agenda_input,
569 pnd_agenda_input_names,
586 const Vector& psd_size_grid,
587 const Vector& pnd_agenda_input_t,
588 const Matrix& pnd_agenda_input,
607 pnd_agenda_input_names,
625 const Vector& psd_size_grid,
626 const Vector& pnd_agenda_input_t,
627 const Matrix& pnd_agenda_input,
646 pnd_agenda_input_names,
667 const Vector& psd_size_grid,
668 const Vector& pnd_agenda_input_t,
669 const Matrix& pnd_agenda_input,
689 "The number of columns in *pnd_agenda_input* must " 693 const bool n0_depend = (
Index)n0 == -999;
694 const bool dm_depend = (
Index)dm == -999;
695 const bool iwc_depend = (
Index)iwc == -999;
698 const bool iwc_fixed = !(std::isnan(iwc)) && !iwc_depend;
699 const bool n0_fixed = !(std::isnan(n0)) && !n0_depend;
700 const bool dm_fixed = !(std::isnan(dm)) && !dm_depend;
702 if (!((nin + iwc_fixed + n0_fixed + dm_fixed == 2) ||
703 (nin + iwc_fixed + n0_fixed + dm_fixed == 1))) {
705 "This PSD can have one or two independent parameters, that is \n" 706 "the sum of the number of rows in pnd_agenda_input and\n" 707 "non-NAN, non-dependent values in iwc, n0, dm must be equal to\n" 715 if ((n0_depend || dm_depend) && (!iwc_fixed)) {
719 if ((!n0_depend) && (!n0_fixed)) {
723 if ((!dm_depend) && (!dm_fixed)) {
732 for (
Index j = 0; j < 3; ++j) {
733 if (dx2in[
i] == i_pai[j]) {
741 if (psd_size_grid[0] < std::numeric_limits<Numeric>::epsilon()) {
742 if (psd_size_grid.
nelem() < 2) {
743 throw std::runtime_error(
744 "psd_size_grid has only one element which is 0. This is not allowed.");
748 Numeric iwc_p(0.0), n0_p(0.0), dm_p(0.0);
750 for (
Index ip = 0; ip < np; ip++) {
751 Numeric t = pnd_agenda_input_t[ip];
755 iwc_p = pnd_agenda_input(ip, i_pai[0]);
758 n0_p = pnd_agenda_input(ip, i_pai[1]);
761 dm_p = pnd_agenda_input(ip, i_pai[2]);
764 if (n0_depend && dm_depend) {
767 }
else if (n0_depend) {
769 }
else if (dm_depend) {
774 if ((t < t_min) || (t > t_max)) {
777 os <<
"Method called with a temperature of " << t <<
" K.\n" 778 <<
"This is outside the specified allowed range: [ max(0.," << t_min
779 <<
"), " << t_max <<
" ]";
780 throw runtime_error(os.
str());
787 if ((iwc > 0.0) && ((dm_p <= 0.0) || (dm_p < dm_min))) {
789 os <<
"The provided or inferred value of *Dm* (" << dm_p <<
") is " 790 <<
" less than zero or *Dm_min* and this is not allowed. " 791 <<
"This means that you have very small or zero values " 792 <<
"in *pnd_agenda_input* which is not supported " 793 <<
"by this PSD." << std::endl;
794 throw runtime_error(os.
str());
800 Vector x_grid(psd_size_grid);
801 x_grid *= 1.0 / dm_p;
803 if (x_grid[0] < std::numeric_limits<Numeric>::epsilon()) {
804 x_grid[0] = 0.1 * psd_size_grid[1];
808 psd_data(ip,
joker), jac_data, x_grid, alpha, beta);
809 psd_data(ip,
joker) *= n0_p;
810 jac_data(0,
joker) *= n0_p;
814 dndn0 *= (1.0 / n0_p);
817 dxddm *= (-1.0 / dm_p);
818 Numeric dn0diwc = n0_p / iwc_p;
821 dpsd_data_dx(i_jac[0], ip,
joker) = 0.0;
824 Numeric ddmdiwc = 0.25 * dm_p / iwc_p;
828 dpsd_data_dx(i_jac[0], ip,
joker) += dndiwc;
829 }
else if (n0_depend) {
832 dpsd_data_dx(i_jac[0], ip,
joker) += dndiwc;
837 dpsd_data_dx(i_jac[1], ip,
joker) = dndn0;
841 Numeric ddmdn0 = -0.25 / n0_p * dm_p;
843 dpsd_data_dx(i_jac[1], ip,
joker) += dndn02;
848 dpsd_data_dx(i_jac[2], ip,
joker) = dxddm;
849 dpsd_data_dx(i_jac[2], ip,
joker) *= dndx;
852 Numeric dn0ddm = -4.0 * n0_p / dm_p;
854 dpsd_data_dx(i_jac[2], ip,
joker) += dndn02;
859 if ((!iwc_depend) && (iwc_p == 0.0)) {
860 psd_data(0,
joker) = 0.0;
861 for (
size_t i = 0;
i < 2; ++
i) {
863 dpsd_data_dx(i_jac[i], ip,
joker) = 0.0;
873 const Vector& psd_size_grid,
874 const Vector& pnd_agenda_input_t,
875 const Matrix& pnd_agenda_input,
893 if (pnd_agenda_input.
ncols() != 1)
894 throw runtime_error(
"*pnd_agenda_input* must have one column.");
895 if (regime !=
"TR" && regime !=
"ML")
896 throw runtime_error(
"regime must either be \"TR\" or \"ML\".");
897 if (scat_species_a <= 0)
898 throw runtime_error(
"*scat_species_a* should be > 0.");
899 if (scat_species_b < b_min || scat_species_b > b_max) {
901 os <<
"Method called with a mass-dimension-relation exponent b of " 902 << scat_species_b <<
".\n" 903 <<
"This is outside the specified allowed range: [" << b_min <<
"," 905 throw runtime_error(os.
str());
908 for (
Index ip = 0; ip < np; ip++) {
910 Numeric swc = pnd_agenda_input(ip, 0);
911 Numeric t = pnd_agenda_input_t[ip];
915 if (
abs(swc) < 1e-15) {
920 if ((swc == 0.) && (!ndx)) {
925 if (t < t_min || t > t_max) {
928 os <<
"Method called with a temperature of " << t <<
" K.\n" 929 <<
"This is outside the specified allowed range: [ max(0.," << t_min
930 <<
"), " << t_max <<
" ]";
931 throw runtime_error(os.
str());
940 }
else if (t > t_max_psd) {
962 psd_data(ip,
i) = psd_weight * psd_1p[
i];
970 const Numeric swcp = swc + dswc;
979 dpsd_data_dx(0, ip,
i) = (psd_1p[
i] - psd_data(ip,
i)) / dswc;
988 const Vector& psd_size_grid,
989 const Vector& pnd_agenda_input_t,
990 const Matrix& pnd_agenda_input,
1006 if (pnd_agenda_input.
ncols() != 1)
1007 throw runtime_error(
"*pnd_agenda_input* must have one column.");
1009 throw runtime_error(
1010 "Jacobian calculations and \"noisy\" can not be " 1012 if (scat_species_b < 2.9 || scat_species_b > 3.1) {
1014 os <<
"This PSD treats pure ice, using Dveq as size grid.\n" 1015 <<
"This means that *scat_species_b* should be close to 3,\n" 1016 <<
"but it is outside of the tolerated range of [2.9,3.1].\n" 1017 <<
"Your value of *scat_species_b* is: " << scat_species_b;
1018 throw runtime_error(os.
str());
1020 if (scat_species_a < 460 || scat_species_a > 500) {
1022 os <<
"This PSD treats pure ice, using Dveq as size grid.\n" 1023 <<
"This means that *scat_species_a* should be close to 480,\n" 1024 <<
"but it is outside of the tolerated range of [460,500].\n" 1025 <<
"Your value of *scat_species_a* is: " << scat_species_a;
1026 throw runtime_error(os.
str());
1029 for (
Index ip = 0; ip < np; ip++) {
1031 Numeric iwc = pnd_agenda_input(ip, 0);
1032 Numeric t = pnd_agenda_input_t[ip];
1035 if ((iwc == 0.) && (!ndx)) {
1040 if (t < t_min || t > t_max) {
1043 os <<
"Method called with a temperature of " << t <<
" K.\n" 1044 <<
"This is outside the specified allowed range: [ max(0.," << t_min
1045 <<
"), " << t_max <<
" ]";
1046 throw runtime_error(os.
str());
1053 if (t < t_min_psd) {
1055 }
else if (t > t_max_psd) {
1071 psd_data(ip,
i) = psd_weight * psd_1p[
i];
1079 const Numeric iwcp = iwc + diwc;
1082 dpsd_data_dx(0, ip,
i) = (psd_1p[
i] - psd_data(ip,
i)) / diwc;
1095 const Vector& psd_size_grid,
1096 const Vector& pnd_agenda_input_t,
1097 const Matrix& pnd_agenda_input,
1100 const Numeric& scat_species_a,
1101 const Numeric& scat_species_b,
1112 pnd_agenda_input_names,
1129 const Vector& psd_size_grid,
1130 const Vector& pnd_agenda_input_t,
1131 const Matrix& pnd_agenda_input,
1134 const Numeric& scat_species_a,
1135 const Numeric& scat_species_b,
1146 pnd_agenda_input_names,
1167 const Vector& psd_size_grid,
1168 const Vector& pnd_agenda_input_t,
1169 const Matrix& pnd_agenda_input,
1172 const Numeric& scat_species_a,
1173 const Numeric& scat_species_b,
1184 pnd_agenda_input_names,
1205 const Vector& psd_size_grid,
1206 const Vector& pnd_agenda_input_t,
1207 const Matrix& pnd_agenda_input,
1210 const String& hydrometeor_type,
1216 const Index nin = pnd_agenda_input_names.
nelem();
1217 const Index ndx = dpnd_data_dx_names.
nelem();
1222 if (pnd_agenda_input.
ncols() != nin) {
1223 throw runtime_error(
1224 "Length of *pnd_agenda_input_names* and number of " 1225 "columns in *pnd_agenda_input* must be equal.");
1227 if (pnd_agenda_input.
ncols() != 2) {
1228 throw runtime_error(
1229 "*pnd_agenda_input* must have two columns" 1230 "(mass density and number density).");
1234 throw runtime_error(
"*dpnd_data_dx_names* must have length <=2.");
1243 }
else if ((
Index)pnd_agenda_input_names[
i].find(
"number_density") !=
1249 if (input_idx[0] == -1) {
1250 throw runtime_error(
"mass_density-tag not found ");
1252 if (input_idx[1] == -1) {
1253 throw runtime_error(
"number_density-tag not found ");
1261 dpnd_data_dx_idx[0] =
i;
1262 }
else if ((
Index)dpnd_data_dx_names[
i].find(
"number_density") !=
1264 dpnd_data_dx_idx[1] =
i;
1269 psd_data.
resize(np, nsi);
1272 dpsd_data_dx.
resize(ndx, np, nsi);
1275 dpsd_data_dx.
resize(0, 0, 0);
1278 for (
Index ip = 0; ip < np; ip++) {
1280 Numeric WC = pnd_agenda_input(ip, input_idx[0]);
1281 Numeric N_tot = pnd_agenda_input(ip, input_idx[1]);
1282 Numeric t = pnd_agenda_input_t[ip];
1285 if ((WC == 0.) && (!ndx)) {
1290 if (t < t_min || t > t_max) {
1293 os <<
"Method called with a temperature of " << t <<
" K.\n" 1294 <<
"This is outside the specified allowed range: [ max(0.," << t_min
1295 <<
"), " << t_max <<
" ]";
1296 throw runtime_error(os.
str());
1313 psd_SB06(psd_1p, dpsd_1p, psd_size_grid, N_tot, WC, hydrometeor_type);
1316 psd_data(ip,
i) = psd_weight * psd_1p[
i];
1318 for (
Index idx = 0; idx < dpnd_data_dx_idx.
nelem(); idx++) {
1321 if (dpnd_data_dx_idx[idx] != -1) {
1322 dpsd_data_dx(dpnd_data_dx_idx[idx], ip,
i) =
1323 psd_weight * dpsd_1p(
i, idx);
1334 const Vector& psd_size_grid,
1335 const Vector& pnd_agenda_input_t,
1336 const Matrix& pnd_agenda_input,
1339 const String& hydrometeor_type,
1345 const Index nin = pnd_agenda_input_names.
nelem();
1346 const Index ndx = dpnd_data_dx_names.
nelem();
1351 if (pnd_agenda_input.
ncols() != nin) {
1352 throw runtime_error(
1353 "Length of *pnd_agenda_input_names* and number of " 1354 "columns in *pnd_agenda_input* must be equal.");
1356 if (pnd_agenda_input.
ncols() != 2) {
1357 throw runtime_error(
1358 "*pnd_agenda_input* must have two columns" 1359 "(mass density and number density).");
1363 throw runtime_error(
"*dpnd_data_dx_names* must have length <=2.");
1372 }
else if ((
Index)pnd_agenda_input_names[
i].find(
"number_density") !=
1378 if (input_idx[0] == -1) {
1379 throw runtime_error(
"mass_density-tag not found ");
1381 if (input_idx[1] == -1) {
1382 throw runtime_error(
"number_density-tag not found ");
1390 dpnd_data_dx_idx[0] =
i;
1391 }
else if ((
Index)dpnd_data_dx_names[
i].find(
"number_density") !=
1393 dpnd_data_dx_idx[1] =
i;
1398 psd_data.
resize(np, nsi);
1401 dpsd_data_dx.
resize(ndx, np, nsi);
1404 dpsd_data_dx.
resize(0, 0, 0);
1407 for (
Index ip = 0; ip < np; ip++) {
1409 Numeric WC = pnd_agenda_input(ip, input_idx[0]);
1410 Numeric N_tot = pnd_agenda_input(ip, input_idx[1]);
1411 Numeric t = pnd_agenda_input_t[ip];
1414 if ((WC == 0.) && (!ndx)) {
1419 if (t < t_min || t > t_max) {
1422 os <<
"Method called with a temperature of " << t <<
" K.\n" 1423 <<
"This is outside the specified allowed range: [ max(0.," << t_min
1424 <<
"), " << t_max <<
" ]";
1425 throw runtime_error(os.
str());
1442 psd_MY05(psd_1p, dpsd_1p, psd_size_grid, N_tot, WC, hydrometeor_type);
1445 psd_data(ip,
i) = psd_weight * psd_1p[
i];
1447 for (
Index idx = 0; idx < dpnd_data_dx_idx.
nelem(); idx++) {
1450 if (dpnd_data_dx_idx[idx] != -1) {
1451 dpsd_data_dx(dpnd_data_dx_idx[idx], ip,
i) =
1452 psd_weight * dpsd_1p(
i, idx);
INDEX Index
The type to use for all integer numbers and indices.
void psdDelanoeEtAl14(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &iwc, const Numeric &n0, const Numeric &dm, const Numeric &rho, const Numeric &alpha, const Numeric &beta, const Numeric &t_min, const Numeric &t_max, const Numeric &dm_min, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdDelanoeEtAl14.
void psdMcFarquaharHeymsfield97(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &t_min, const Numeric &t_max, const Numeric &t_min_psd, const Numeric &t_max_psd, const Index &picky, const Index &noisy, const Verbosity &)
WORKSPACE METHOD: psdMcFarquaharHeymsfield97.
Index nelem() const
Number of elements.
void psdModifiedGammaMassSingleMoment(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n_alpha, const Numeric &n_b, const Numeric &mu, const Numeric &gamma, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdModifiedGammaMassSingleMoment.
Declarations having to do with the four output streams.
void psdAbelBoutle12(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdAbelBoutle12.
void psd_snow_F07(Vector &psd, const Vector &diameter, const Numeric &swc, const Numeric &t, const Numeric alpha, const Numeric beta, const String ®ime)
The F07 snow PSD.
void psdModifiedGammaMassNtot(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdModifiedGammaMassNtot.
Numeric n0_from_t(Numeric t)
Sets N0star based on temperature.
Linear algebra functions.
void delanoe_shape_with_derivative(VectorView psd, MatrixView jac_data, const Vector &x, const Numeric &alpha, const Numeric &beta)
! Shape functions for normalized PSD.
void psd_cloudice_MH97(Vector &psd, const Vector &diameter, const Numeric &iwc, const Numeric &t, const bool noisy)
The MH97 cloud ice PSD.
void psd_mono_common(Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &type, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const ArrayOfArrayOfScatteringMetaData &scat_meta, const Index &species_index, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
Code common to PSDs of mono type.
void psd_mgd_smm_common(Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &psd_name, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n_alpha_in, const Numeric &n_b_in, const Numeric &mu_in, const Numeric &gamma_in, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
Code common to a number of modified gamma PSDs used with single-moment mass schemes.
void psdModifiedGammaMassXmedian(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdModifiedGammaMassXmedian.
Index nelem() const
Returns the number of elements.
This file contains the definition of Array.
Index ncols() const
Returns the number of columns.
void mgd_with_derivatives(VectorView psd, MatrixView jac_data, const Vector &x, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const bool &do_n0_jac, const bool &do_mu_jac, const bool &do_la_jac, const bool &do_ga_jac)
The global header file for ARTS.
_CS_string_type str() const
void psdSeifertBeheng06(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const String &hydrometeor_type, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdSeifertBeheng06.
void psdModifiedGamma(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdModifiedGamma.
void psdWangEtAl16(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdWangEtAl16.
void psd_MY05(Vector &psd, Matrix &dpsd, const Vector &diameter_max, const Numeric N_tot, const Numeric WC, const String psd_type)
#define START_OF_PSD_METHODS()
NUMERIC Numeric
The type to use for all floating point numbers.
void psdMonoDispersive(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const ArrayOfArrayOfScatteringMetaData &scat_meta, const Index &species_index, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdMonoDispersive.
void psd_mgd_mass_and_something(Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &something, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
Code common to MGD PSD involving the integrated mass.
void psdModifiedGammaMass(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdModifiedGammaMass.
Numeric pow(const Rational base, Numeric exp)
Power of.
void resize(Index p, Index r, Index c)
Resize function.
This can be used to make arrays out of anything.
void psdModifiedGammaMassMeanParticleMass(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdModifiedGammaMassMeanParticleMass.
void psdMonoMass(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const ArrayOfArrayOfScatteringMetaData &scat_meta, const Index &species_index, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdMonoMass.
void psd_SB06(Vector &psd, Matrix &dpsd, const Vector &mass, const Numeric &N_tot, const Numeric &WC, const String &hydrometeor_type)
void psdMilbrandtYau05(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const String &hydrometeor_type, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdMilbrandtYau05.
void psdModifiedGammaMassXmean(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdModifiedGammaMassXmean.
Numeric n0_from_iwc_dm(Numeric iwc, Numeric dm, Numeric rho)
Derives N0star from IWC and Dm.
void psdFieldEtAl07(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const String ®ime, const Numeric &t_min, const Numeric &t_max, const Numeric &t_min_psd, const Numeric &t_max_psd, const Numeric &b_min, const Numeric &b_max, const Index &picky, const Verbosity &)
WORKSPACE METHOD: psdFieldEtAl07.
void psdFieldEtAl19(Matrix &psd_data, Tensor3 &dpsd_data_dx, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &verbosity)
WORKSPACE METHOD: psdFieldEtAl19.
static const Index npos
Define npos:
Internal functions associated with size distributions.
Numeric dm_from_iwc_n0(Numeric iwc, Numeric n0, Numeric rho)
Derives Dm from IWC and N0star.
This file contains declerations of functions of physical character.
Index nrows() const
Returns the number of rows.
void resize(Index r, Index c)
Resize function.