ARTS  2.0.49
continua.cc
Go to the documentation of this file.
1 /* Copyright (C) 2001-2011
2  Thomas Kuhn <tkuhn@uni-bremen.de>
3  Stefan Buehler <sbuehler@ltu.se>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
347 #include <cmath>
348 #include "arts.h"
349 #include "matpackI.h"
350 #include "array.h"
351 #include "absorption.h"
352 #include "continua.h"
353 
354 
355 // #################################################################################
356 
357 // global constants as defined in constants.cc
358 
359 extern const Numeric EULER_NUMBER;
360 extern const Numeric LOG10_EULER_NUMBER;
361 extern const Numeric NAT_LOG_TEN;
362 extern const Numeric PI;
363 extern const Numeric SPEED_OF_LIGHT;
364 
365 // numerical constants specific defined for the file continua.cc
366 
367 // conversion from neper to decibel:
368 //const Numeric Np_to_dB = (10.000000 * LOG10_EULER_NUMBER); // [dB/Np]
369 // conversion from decibel to neper:
370 //const Numeric dB_to_Np = (1.000000 / Np_to_dB); // [Np/dB]
371 // conversion from GHz to Hz:
372 const Numeric GHz_to_Hz = 1.000000e9; // [Hz/GHz]
373 // conversion from Hz to GHz:
374 const Numeric Hz_to_GHz = 1.000000e-9; // [GHz/Hz]
375 // conversion from kPa to Pa:
376 const Numeric kPa_to_Pa = 1.000000e3; // [kPa/Pa]
377 // conversion from Pa to kPa:
378 const Numeric Pa_to_kPa = 1.000000e-3; // [Pa/kPa]
379 // conversion from hPa to Pa (hPa = mbar):
380 const Numeric hPa_to_Pa = 1.000000e2; // [hPa/Pa]
381 // conversion from Pa to hPa (hPa = mbar):
382 const Numeric Pa_to_hPa = 1.000000e-2; // [Pa/hPa]
383 
384 // MPM pre-factor for unit setting:
385 const Numeric dB_m_Hz = 0.1820427855916028e-06; // [dB/m/Hz] (4 * pi / c) * 10 * log(e)
386 const Numeric dB_km_GHz = 0.1820427855916028e+06; // [dB/km/GHz] (4 * pi / c) * 10 * log(e)
387 
388 
389 // absorption unit conversions
390 
391 // conversion from dB/km to Np/km for absorption units:
392 //const Numeric dB_km_to_Np_km = dB_to_Np;
393 // conversion from dB/km to Np/m for absorption units:
394 //const Numeric dB_km_to_Np_m = (1.00000e-3 / (10.0 * LOG10_EULER_NUMBER));
395 // conversion from dB/km to 1/m for absorption units:
396 const Numeric dB_km_to_1_m = (1.00000e-3 / (10.0 * LOG10_EULER_NUMBER));
397 
398 
399 // lower limit for absorption calculation due to underflow error:
400 
401 const Numeric VMRCalcLimit = 1.000e-25;
402 
403 // #################################################################################
404 // ############################## WATER VAPOR MODELS ###############################
405 // #################################################################################
407 
442  const Numeric CCin, // continuum scale factor
443  const Numeric CLin, // line strength scale factor
444  const Numeric CWin, // line broadening scale factor
445  const String& model,
446  ConstVectorView f_grid,
447  ConstVectorView abs_p,
448  ConstVectorView abs_t,
449  ConstVectorView vmr,
450  const Verbosity& verbosity)
451 {
453 
454  //
455  // Coefficients are from Liebe, Radio Science, 20(5), 1985, 1069
456  // 0 1 2 3
457  // f0 b1 b2 b3
458  // [GHz] [kHz/kPa] [1] [GHz/kPa]
459  const Numeric mpm87[30][4] = {
460  { 22.235080, 0.1090, 2.143, 27.84e-3},
461  { 67.813960, 0.0011, 8.730, 27.60e-3},
462  { 119.995940, 0.0007, 8.347, 27.00e-3},
463  { 183.310117, 2.3000, 0.653, 31.64e-3},
464  { 321.225644, 0.0464, 6.156, 21.40e-3},
465  { 325.152919, 1.5400, 1.515, 29.70e-3},
466  { 336.187000, 0.0010, 9.802, 26.50e-3},
467  { 380.197372, 11.9000, 1.018, 30.36e-3},
468  { 390.134508, 0.0044, 7.318, 19.00e-3},
469  { 437.346667, 0.0637, 5.015, 13.70e-3},
470  { 439.150812, 0.9210, 3.561, 16.40e-3},
471  { 443.018295, 0.1940, 5.015, 14.40e-3},
472  { 448.001075, 10.6000, 1.370, 23.80e-3},
473  { 470.888947, 0.3300, 3.561, 18.20e-3},
474  { 474.689127, 1.2800, 2.342, 19.80e-3},
475  { 488.491133, 0.2530, 2.814, 24.90e-3},
476  { 503.568532, 0.0374, 6.693, 11.50e-3},
477  { 504.482692, 0.0125, 6.693, 11.90e-3},
478  { 556.936002, 510.0000, 0.114, 30.00e-3},
479  { 620.700807, 5.0900, 2.150, 22.30e-3},
480  { 658.006500, 0.2740, 7.767, 30.00e-3},
481  { 752.033227, 250.0000, 0.336, 28.60e-3},
482  { 841.073593, 0.0130, 8.113, 14.10e-3},
483  { 859.865000, 0.1330, 7.989, 28.60e-3},
484  { 899.407000, 0.0550, 7.845, 28.60e-3},
485  { 902.555000, 0.0380, 8.360, 26.40e-3},
486  { 906.205524, 0.1830, 5.039, 23.40e-3},
487  { 916.171582, 8.5600, 1.369, 25.30e-3},
488  { 970.315022, 9.1600, 1.842, 24.00e-3},
489  { 987.926764, 138.0000, 0.178, 28.60e-3}};
490 
491  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
492  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
493  const Numeric CC_MPM87 = 1.00000;
494  const Numeric CL_MPM87 = 1.00000;
495  const Numeric CW_MPM87 = 1.00000;
496  // ---------------------------------------------------------------------------------------
497 
498 
499  // select the parameter set (!!model dominates values!!):
500  Numeric CC, CL, CW;
501  if ( model == "MPM87" )
502  {
503  CC = CC_MPM87;
504  CL = CL_MPM87;
505  CW = CW_MPM87;
506  }
507  else if ( model == "MPM87Lines" )
508  {
509  CC = 0.000;
510  CL = CL_MPM87;
511  CW = CW_MPM87;
512  }
513  else if ( model == "MPM87Continuum" )
514  {
515  CC = CC_MPM87;
516  CL = 0.000;
517  CW = 0.000;
518  }
519  else if ( model == "user" )
520  {
521  CC = CCin;
522  CL = CLin;
523  CW = CWin;
524  }
525  else
526  {
527  ostringstream os;
528  os << "H2O-MPM87: ERROR! Wrong model values given.\n"
529  << "Valid models are: 'MPM87', 'MPM87Lines', 'MPM87Continuum', and 'user'" << '\n';
530  throw runtime_error(os.str());
531  }
532  out3 << "H2O-MPM87: (model=" << model << ") parameter values in use:\n"
533  << " CC = " << CC << "\n"
534  << " CL = " << CL << "\n"
535  << " CW = " << CW << "\n";
536 
537 
538  // number of lines of liebe line catalog (30 lines)
539  const Index i_first = 0;
540  const Index i_last = 29;
541 
542  const Index n_p = abs_p.nelem(); // Number of pressure levels
543  const Index n_f = f_grid.nelem(); // Number of frequencies
544 
545  // Check that dimensions of abs_p, abs_t, and vmr agree:
546  assert ( n_p==abs_t.nelem() );
547  assert ( n_p==vmr.nelem() );
548 
549  // Check that dimensions of pxsec are consistent with n_f
550  // and n_p. It should be [n_f,n_p]:
551  assert ( n_f==pxsec.nrows() );
552  assert ( n_p==pxsec.ncols() );
553 
554  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
555  for ( Index i=0; i<n_p; ++i )
556  {
557  // here the total pressure is not multiplied by the H2O vmr for the
558  // P_H2O calculation because we calculate pxsec and not abs: abs = vmr * pxsec
559  Numeric pwv_dummy = Pa_to_kPa * abs_p[i];
560  // relative inverse temperature [1]
561  Numeric theta = (300.0 / abs_t[i]);
562  // H2O partial pressure [kPa]
563  Numeric pwv = Pa_to_kPa * abs_p[i] * vmr[i];
564  // dry air partial pressure [kPa]
565  Numeric pda = (Pa_to_kPa * abs_p[i]) - pwv;
566  // H2O continuum absorption [dB/km/GHz2] like in the original MPM87
567  Numeric Nppc = CC * pwv_dummy * pow(theta, (Numeric)3.0) * 1.000e-5
568  * ( (0.113 * pda) + (3.57 * pwv * pow(theta, (Numeric)7.8)) );
569 
570  // Loop over input frequency
571  for ( Index s=0; s<n_f; ++s )
572  {
573  // input frequency in [GHz]
574  Numeric ff = f_grid[s] * Hz_to_GHz;
575  // H2O line contribution at position f
576  Numeric Nppl = 0.000;
577 
578  // Loop over MPM89 H2O spectral lines
579  for ( Index l = i_first; l <= i_last; ++l )
580  {
581  // line strength [kHz]
582  Numeric strength = CL * pwv_dummy * mpm87[l][1]
583  * pow(theta,(Numeric)3.5) * exp(mpm87[l][2]*(1.000-theta));
584  // line broadening parameter [GHz]
585  Numeric gam = CW * mpm87[l][3] *
586  ( (4.80 * pwv * pow(theta, (Numeric)1.1)) +
587  ( pda * pow(theta, (Numeric)0.6)) );
588  // effective line width with Doppler broadening [GHz]
589  // gam = sqrt(gam*gam + (2.14e-12 * mpm87[l][0] * mpm87[l][0] / theta));
590  // H2O line absorption [dB/km/GHz] like in the original MPM87
591  Nppl += strength * MPMLineShapeFunction(gam, mpm87[l][0], ff);
592  }
593  // pxsec = abs/vmr [1/m] but MPM87 is in [dB/km] --> conversion necessary
594  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * ( Nppl + (Nppc * ff) );
595  }
596  }
597  return;
598 }
599 //
600 // #################################################################################
602 
628  const Numeric CCin, // continuum scale factor
629  const Numeric CLin, // line strength scale factor
630  const Numeric CWin, // line broadening scale factor
631  const String& model, // model
632  ConstVectorView f_grid,
633  ConstVectorView abs_p,
634  ConstVectorView abs_t,
635  ConstVectorView vmr,
636  const Verbosity& verbosity)
637 {
639 
640  //
641  // Coefficients are from Liebe, Int. J. Infrared and Millimeter Waves, 10(6), 1989, 631
642  // 0 1 2 3 4 5 6
643  // f0 b1 b2 b3 b4 b5 b6
644  // [GHz] [kHz/kPa] [1] [MHz/kPa] [1] [1] [1]
645  const Numeric mpm89[30][7] = {
646  { 22.235080, 0.1090, 2.143, 28.11, 0.69, 4.80, 1.00},
647  { 67.813960, 0.0011, 8.735, 28.58, 0.69, 4.93, 0.82},
648  { 119.995940, 0.0007, 8.356, 29.48, 0.70, 4.78, 0.79},
649  { 183.310074, 2.3000, 0.668, 28.13, 0.64, 5.30, 0.85},
650  { 321.225644, 0.0464, 6.181, 23.03, 0.67, 4.69, 0.54},
651  { 325.152919, 1.5400, 1.540, 27.83, 0.68, 4.85, 0.74},
652  { 336.187000, 0.0010, 9.829, 26.93, 0.69, 4.74, 0.61},
653  { 380.197372, 11.9000, 1.048, 28.73, 0.69, 5.38, 0.84},
654  { 390.134508, 0.0044, 7.350, 21.52, 0.63, 4.81, 0.55},
655  { 437.346667, 0.0637, 5.050, 18.45, 0.60, 4.23, 0.48},
656  { 439.150812, 0.9210, 3.596, 21.00, 0.63, 4.29, 0.52},
657  { 443.018295, 0.1940, 5.050, 18.60, 0.60, 4.23, 0.50},
658  { 448.001075, 10.6000, 1.405, 26.32, 0.66, 4.84, 0.67},
659  { 470.888947, 0.3300, 3.599, 21.52, 0.66, 4.57, 0.65},
660  { 474.689127, 1.2800, 2.381, 23.55, 0.65, 4.65, 0.64},
661  { 488.491133, 0.2530, 2.853, 26.02, 0.69, 5.04, 0.72},
662  { 503.568532, 0.0374, 6.733, 16.12, 0.61, 3.98, 0.43},
663  { 504.482692, 0.0125, 6.733, 16.12, 0.61, 4.01, 0.45},
664  { 556.936002, 510.0000, 0.159, 32.10, 0.69, 4.11, 1.00},
665  { 620.700807, 5.0900, 2.200, 24.38, 0.71, 4.68, 0.68},
666  { 658.006500, 0.2740, 7.820, 32.10, 0.69, 4.14, 1.00},
667  { 752.033227, 250.0000, 0.396, 30.60, 0.68, 4.09, 0.84},
668  { 841.073593, 0.0130, 8.180, 15.90, 0.33, 5.76, 0.45},
669  { 859.865000, 0.1330, 7.989, 30.60, 0.68, 4.09, 0.84},
670  { 899.407000, 0.0550, 7.917, 29.85, 0.68, 4.53, 0.90},
671  { 902.555000, 0.0380, 8.432, 28.65, 0.70, 5.10, 0.95},
672  { 906.205524, 0.1830, 5.111, 24.08, 0.70, 4.70, 0.53},
673  { 916.171582, 8.5600, 1.442, 26.70, 0.70, 4.78, 0.78},
674  { 970.315022, 9.1600, 1.920, 25.50, 0.64, 4.94, 0.67},
675  { 987.926764, 138.0000, 0.258, 29.85, 0.68, 4.55, 0.90}};
676 
677  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
678  // standard values for the MPM89 model
679  // (Liebe, Int. J. Infrared and Millimeter Waves, 10(6), 1989, 631):
680  const Numeric CC_MPM89 = 1.00000;
681  const Numeric CL_MPM89 = 1.00000;
682  const Numeric CW_MPM89 = 1.00000;
683  // ---------------------------------------------------------------------------------------
684 
685 
686  // select the parameter set (!!model goes for values!!):
687  Numeric CC, CL, CW;
688  if ( model == "MPM89" )
689  {
690  CC = CC_MPM89;
691  CL = CL_MPM89;
692  CW = CW_MPM89;
693  }
694  else if ( model == "MPM89Lines" )
695  {
696  CC = 0.000;
697  CL = CL_MPM89;
698  CW = CW_MPM89;
699  }
700  else if ( model == "MPM89Continuum" )
701  {
702  CC = CC_MPM89;
703  CL = 0.000;
704  CW = 0.000;
705  }
706  else if ( model == "user" )
707  {
708  CC = CCin;
709  CL = CLin;
710  CW = CWin;
711  }
712  else
713  {
714  ostringstream os;
715  os << "H2O-MPM89: ERROR! Wrong model values given.\n"
716  << "Valid models are: 'MPM89', 'MPM89Lines', 'MPM89Continuum', and 'user'" << '\n';
717  throw runtime_error(os.str());
718  }
719  out3 << "H2O-MPM89: (model=" << model << ") parameter values in use:\n"
720  << " CC = " << CC << "\n"
721  << " CL = " << CL << "\n"
722  << " CW = " << CW << "\n";
723 
724 
725  // number of lines of Liebe line catalog (30 lines)
726  const Index i_first = 0;
727  const Index i_last = 29;
728 
729  const Index n_p = abs_p.nelem(); // Number of pressure levels
730  const Index n_f = f_grid.nelem(); // Number of frequencies
731 
732  // Check that dimensions of abs_p, abs_t, and vmr agree:
733  assert ( n_p==abs_t.nelem() );
734  assert ( n_p==vmr.nelem() );
735 
736  // Check that dimensions of pxsec are consistent with n_f
737  // and n_p. It should be [n_f,n_p]:
738  assert ( n_f==pxsec.nrows() );
739  assert ( n_p==pxsec.ncols() );
740 
741  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
742  for ( Index i=0; i<n_p; ++i )
743  {
744  // here the total pressure is not multiplied by the H2O vmr for the
745  // P_H2O calculation because we calculate pxsec and not abs: abs = vmr * pxsec
746  Numeric pwv_dummy = Pa_to_kPa * abs_p[i];
747  // relative inverse temperature [1]
748  Numeric theta = (300.0 / abs_t[i]);
749  // H2O partial pressure [kPa]
750  Numeric pwv = Pa_to_kPa * abs_p[i] * vmr[i];
751  // dry air partial pressure [kPa]
752  Numeric pda = (Pa_to_kPa * abs_p[i]) - pwv;
753  // H2O continuum absorption [dB/km/GHz^2] like in the original MPM89
754  Numeric Nppc = CC * pwv_dummy * pow(theta, (Numeric)3.0) * 1.000e-5
755  * ( (0.113 * pda) + (3.57 * pwv * pow(theta, (Numeric)7.5)) );
756 
757  // Loop over input frequency
758  for ( Index s=0; s<n_f; ++s )
759  {
760  // input frequency in [GHz]
761  Numeric ff = f_grid[s] * Hz_to_GHz;
762  // H2O line contribution at position f
763  Numeric Nppl = 0.000;
764 
765  // Loop over MPM89 spectral lines:
766  for ( Index l = i_first; l <= i_last; ++l )
767  {
768  // line strength [kHz]
769  Numeric strength = CL * pwv_dummy * mpm89[l][1]
770  * pow(theta, (Numeric)3.5) * exp(mpm89[l][2]*(1.000-theta));
771  // line broadening parameter [GHz]
772  Numeric gam = CW * mpm89[l][3] * 0.001
773  * ( mpm89[l][5] * pwv * pow(theta, mpm89[l][6]) +
774  pda * pow(theta, mpm89[l][4]) );
775  // Doppler line width [GHz]
776  // Numeric gamd = 1.46e-6 * mpm89[l][0] / sqrt(theta);
777  // effective line width [GHz]
778  // gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
779  // H2O line absorption [dB/km/GHz] like in the original MPM89
780  Nppl += strength * MPMLineShapeFunction(gam, mpm89[l][0], ff);
781  }
782  // pxsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
783  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * ( Nppl + (Nppc * ff) );
784  }
785  }
786  return;
787 }
788 //
789 // #################################################################################
791 
832  const Numeric CCin, // continuum scale factor
833  const Numeric CLin, // line strength scale factor
834  const Numeric CWin, // line broadening scale factor
835  const String& model,
836  ConstVectorView f_grid,
837  ConstVectorView abs_p,
838  ConstVectorView abs_t,
839  ConstVectorView vmr,
840  const Verbosity& verbosity)
841 {
843 
844  //
845  /*
846 CTKS OTHER DATA USED IF NOT FROM THEORETICAL CALC. IN A. BAUER ET AL. 41(1989)49-54:
847 CTKS --------------------------------------------------------------------------------------------------------------
848 CTKS | T=300 K | T=300 K | T=300 K |
849 CTKS F ISO|GWVHZO NWVHZO| GWVNZ NWVNZ| GWVAIR NWVAIR| REFERENCE
850 CTKS GHZ 1 |MHZ/TORR 1 | MHZ/TORR 1 | MHZ/TORR 1 |
851 CTKS --------------------------------------------------------------------------------------------------------------
852 CTKS 22.2 1 18.00(18) - 4.10 -- 3.77 -- LIEBE ET AL., J.CHEM.PHYS., 50(1969)727
853 CTKS 183.3 1 19.88 0.85 4.07(7) 0.63(10) 3.75(6) 0.64(10) A. BAUER ET AL. JQSRT 41(1989)49-54
854 CTKS 183.3 1 - - 4.19(17) 0.74(3) 3.89(14) 0.76(3) T. M. GOYETTE ET AL. J. MOLEC. SPEC, 143(1990)346
855 CTKS 203.4 2 -- -- 4.214 0.93 3.833 0.89 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
856 CTKS 225.9 4 -- -- 4.21 0.70 3.798 0.75 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
857 CTKS 241.6 4 -- -- 4.45 0.77 4.08 0.80 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
858 CTKS 241.9 4 -- -- 3.47 0.67 3.07 0.70 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
859 CTKS 325.1 1 -- -- 4.011 0.63 3.633 0.64 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
860 CTKS 380.2 1 20.61(7) 0.89(1) 4.24(7) 0.52(14) 3.83(6) 0.54(14) A. BAUER ET AL. JQSRT 41(1987) 531
861 CTKS 380.2 1 - - 4.16(4) 0.70(3) 3.80 0.72 T. M. GOYETTE ET AL. JQSRT 41(1993)485
862 CTKS 439.2 1 12.95(25)0.62(9) -- -- -- -- V. N. MARKOV, J. MOLEC. SPEC, 164(1994)233
863 CTKS 752.0 1 4.16(18) -- 3.75 -- S. S. D. GASSTER ET AL. JOSA, 5(1988)593
864 CTKS 987.9 1 4.42(23) -- 4.01 -- S. S. D. GASSTER ET AL. JOSA, 5(1988)593
865 */
866  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
867  // 0 1 2 3 4 5 6
868  // f0 b1 b2 b3 b4 b5 b6
869  // [MHz] [kHz/kPa] [1] [MHz/hPa] [1] [1]
870  // air self air self
871  const Numeric mpm02[35][7] = {
872  { 22235.0800, 0.10947, 2.1678, 2.811, 4.80, 0.69, 0.61},
873  { 67803.9600, 0.00111, 8.7518, 2.858, 4.93, 0.69, 0.82},
874  { 119995.9400, 0.00072, 8.3688, 2.948, 4.78, 0.70, 0.79},
875  { 183310.1170, 2.30351, 0.6794, 3.050, 5.30, 0.76, 0.85},
876  { 321225.6400, 0.04646, 6.1792, 2.303, 4.69, 0.67, 0.54},
877  { 325152.9190, 1.53869, 1.5408, 2.783, 4.85, 0.68, 0.74},
878  { 336227.6200, 0.00099, 9.8233, 2.693, 4.74, 0.64, 0.61},
879  { 380197.3720, 11.9079, 1.0439, 2.873, 5.38, 0.72, 0.89},
880  { 390134.5080, 0.00437, 7.3408, 2.152, 4.81, 0.63, 0.55},
881  { 437346.6670, 0.06378, 5.0384, 1.845, 4.23, 0.60, 0.48},
882  { 439150.8120, 0.92144, 3.5853, 2.100, 4.29, 0.63, 0.62},
883  { 443018.2950, 0.19384, 5.0384, 1.860, 4.23, 0.60, 0.50},
884  { 448001.0750, 10.6190, 1.3952, 2.632, 4.84, 0.66, 0.67},
885  { 470888.9470, 0.33005, 3.5853, 2.152, 4.57, 0.66, 0.65},
886  { 474689.1270, 1.27660, 2.3674, 2.355, 4.65, 0.65, 0.64},
887  { 488491.1330, 0.25312, 2.8391, 2.602, 5.04, 0.69, 0.72},
888  { 503568.5320, 0.03746, 6.7158, 1.612, 3.98, 0.61, 0.43},
889  { 504482.6920, 0.01250, 6.7158, 1.612, 4.01, 0.61, 0.45},
890  { 547676.4400, 1.01467, 0.1427, 2.600, 4.50, 0.69, 1.00}, // *
891  { 552020.9600, 0.18668, 0.1452, 2.600, 4.50, 0.69, 1.00}, // *
892  { 556936.0020, 510.51086, 0.1405, 3.210, 4.11, 0.69, 1.00},
893  { 620700.8070, 5.10539, 2.3673, 2.438, 4.68, 0.71, 0.68},
894  { 645905.6200, 0.00667, 8.6065, 1.800, 4.00, 0.60, 0.43},
895  { 658006.5500, 0.27451, 7.7889, 3.210, 4.14, 0.69, 1.00},
896  { 752033.2270, 249.68466, 0.3625, 3.060, 4.09, 0.68, 0.84},
897  { 841051.1620, 0.01308, 8.1347, 1.590, 5.76, 0.33, 0.45},
898  { 859965.6490, 0.13326, 8.0114, 3.060, 4.09, 0.68, 0.84},
899  { 899302.1710, 0.05492, 7.8676, 2.985, 4.53, 0.68, 0.90},
900  { 902609.4360, 0.03854, 8.3823, 2.865, 5.10, 0.70, 0.95},
901  { 906206.1180, 0.18323, 5.0628, 2.408, 4.70, 0.70, 0.53},
902  { 916171.5820, 8.56444, 1.3943, 2.670, 4.78, 0.70, 0.78},
903  { 923113.1900, 0.00784, 10.2441, 2.900, 5.00, 0.66, 0.67},
904  { 970315.0220, 9.16280, 1.8673, 2.550, 4.94, 0.64, 0.67},
905  { 987926.7640, 138.28461, 0.2045, 2.985, 4.55, 0.68, 0.90},
906  //--------------------------------------------------------------------
907  { 1780.000000, 2230.00000, 0.952, 17.620, 30.50, 2.00, 5.00}}; // pseudo continuum line
908 
909  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
910  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
911  // "Propagation modeling of moist air and suspended water/ice
912  // particles at frequencies below 1000 GHz",
913  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
914  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
915  const Numeric CC_MPM02 = 1.00000;
916  const Numeric CL_MPM02 = 1.00000;
917  const Numeric CW_MPM02 = 1.00000;
918  // ---------------------------------------------------------------------------------------
919 
920 
921  // select the parameter set (!!model dominates values!!):
922  Numeric CC, CL, CW;
923  // number of lines of Liebe line catalog (0-33 lines, 34 cont. pseudo line)
924  Index i_first = 0;
925  Index i_last = 34;
926  if ( model == "MPM02" )
927  {
928  CC = CC_MPM02;
929  CL = CL_MPM02;
930  CW = CW_MPM02;
931  i_first = 0;
932  i_last = 34;
933  }
934  else if ( model == "MPM02Lines" )
935  {
936  CC = 0.000;
937  CL = CL_MPM02;
938  CW = CW_MPM02;
939  i_first = 0;
940  i_last = 33;
941  }
942  else if ( model == "MPM02Continuum" )
943  {
944  CC = CC_MPM02;
945  CL = 0.000;
946  CW = 0.000;
947  i_first = 34;
948  i_last = 34;
949  }
950  else if ( model == "user" )
951  {
952  CC = CCin;
953  CL = CLin;
954  CW = CWin;
955  i_first = 0;
956  i_last = 34;
957 
958  }
959  else
960  {
961  ostringstream os;
962  os << "H2O-MPM02: ERROR! Wrong model values given.\n"
963  << "Valid models are: 'MPM02', 'MPM02Lines', 'MPM02Continuum', and 'user'" << '\n';
964  throw runtime_error(os.str());
965  }
966  out3 << "H2O-MPM02: (model=" << model << ") parameter values in use:\n"
967  << " CC = " << CC << "\n"
968  << " CL = " << CL << "\n"
969  << " CW = " << CW << "\n";
970 
971 
972  const Index n_p = abs_p.nelem(); // Number of pressure levels
973  const Index n_f = f_grid.nelem(); // Number of frequencies
974 
975  // Check that dimensions of abs_p, abs_t, and vmr agree:
976  assert ( n_p==abs_t.nelem() );
977  assert ( n_p==vmr.nelem() );
978 
979  // Check that dimensions of pxsec are consistent with n_f
980  // and n_p. It should be [n_f,n_p]:
981  assert ( n_f==pxsec.nrows() );
982  assert ( n_p==pxsec.ncols() );
983 
984  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
985  for ( Index i=0; i<n_p; ++i )
986  {
987  // here the total pressure is not multiplied by the H2O vmr for the
988  // P_H2O calculation because we calculate pxsec and not abs: abs = vmr * pxsec
989  Numeric pwv_dummy = Pa_to_hPa * abs_p[i];
990  // relative inverse temperature [1]
991  Numeric theta = (300.0 / abs_t[i]);
992  // H2O partial pressure [hPa]
993  Numeric pwv = Pa_to_hPa * abs_p[i] * vmr[i];
994  // dry air partial pressure [hPa]
995  Numeric pda = (Pa_to_hPa * abs_p[i]) - pwv;
996  // Loop over MPM02 spectral lines:
997 
998  // Loop over input frequency
999  for ( Index s=0; s<n_f; ++s )
1000  {
1001  // input frequency in [GHz]
1002  Numeric ff = f_grid[s] * Hz_to_GHz;
1003 
1004  for ( Index l = i_first; l <= i_last; ++l )
1005  {
1006  // line strength [ppm]. The missing vmr of H2O will be multiplied
1007  // at the stage of absorption calculation: abs / vmr * pxsec.
1008  Numeric strength = 0.00;
1009  Numeric gam = 0.00;
1010  if ( (l >= 0) && (l <= 33) ) // ---- just the lines ------------------
1011  {
1012  strength = CL * pwv_dummy * mpm02[l][1] *
1013  pow(theta, (Numeric)3.5) * exp(mpm02[l][2]*(1.0-theta));
1014  // line broadening parameter [GHz]
1015  gam = CW * mpm02[l][3] * 0.001 *
1016  ( (mpm02[l][4] * pwv * pow(theta, mpm02[l][6])) +
1017  ( pda * pow(theta, mpm02[l][5])) );
1018  }
1019  else if ( l == 34 ) // ----- just the continuum pseudo-line ----------
1020  {
1021  strength = CC * pwv_dummy * mpm02[l][1] *
1022  pow(theta, (Numeric)3.5) * exp(mpm02[l][2]*(1.0-theta));
1023  // line broadening parameter [GHz]
1024  gam = mpm02[l][3] * 0.001 *
1025  ( (mpm02[l][4] * pwv * pow(theta, mpm02[l][6])) +
1026  ( pda * pow(theta, mpm02[l][5])) );
1027  }
1028  else // ----- if something strange happens ---------------------------
1029  {
1030  ostringstream os;
1031  os << "H2O-MPM02: wrong line number detected l=" << l << " (0-34)\n";
1032  throw runtime_error(os.str());
1033  return;
1034  } // ---------------------------------------------------------------
1035  // Doppler line width [GHz]
1036  // Numeric gamd = 1.46e-6 * mpm02[l][0] / sqrt(theta);
1037  // effective line width [GHz]
1038  //gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
1039  // absorption [dB/km] like in the original MPM02
1040  Numeric Npp = strength * MPMLineShapeFunction(gam, mpm02[l][0], ff);
1041  // pxsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
1042  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * Npp;
1043  }
1044  }
1045  }
1046  return;
1047 }
1048 //
1049 //
1050 // #################################################################################
1052 
1092  const Numeric CCin, // continuum scale factor
1093  const Numeric CLin, // line strength scale factor
1094  const Numeric CWin, // line broadening scale factor
1095  const String& model,
1096  ConstVectorView f_grid,
1097  ConstVectorView abs_p,
1098  ConstVectorView abs_t,
1099  ConstVectorView vmr,
1100  const Verbosity& verbosity)
1101 {
1102  CREATE_OUT3
1103 
1104  //
1105  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
1106  // 0 1 2 3 4 5 6
1107  // f0 b1 b2 b3 b4 b5 b6
1108  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1] [1]
1109  const Numeric mpm93[35][7] = {
1110  { 22.235080, 0.01130, 2.143, 2.811, 4.80, 0.69, 1.00},
1111  { 67.803960, 0.00012, 8.735, 2.858, 4.93, 0.69, 0.82},
1112  { 119.995940, 0.00008, 8.356, 2.948, 4.78, 0.70, 0.79},
1113  { 183.310091, 0.24200, 0.668, 3.050, 5.30, 0.64, 0.85},
1114  { 321.225644, 0.00483, 6.181, 2.303, 4.69, 0.67, 0.54},
1115  { 325.152919, 0.14990, 1.540, 2.783, 4.85, 0.68, 0.74},
1116  { 336.222601, 0.00011, 9.829, 2.693, 4.74, 0.69, 0.61},
1117  { 380.197372, 1.15200, 1.048, 2.873, 5.38, 0.54, 0.89},
1118  { 390.134508, 0.00046, 7.350, 2.152, 4.81, 0.63, 0.55},
1119  { 437.346667, 0.00650, 5.050, 1.845, 4.23, 0.60, 0.48},
1120  { 439.150812, 0.09218, 3.596, 2.100, 4.29, 0.63, 0.52},
1121  { 443.018295, 0.01976, 5.050, 1.860, 4.23, 0.60, 0.50},
1122  { 448.001075, 1.03200, 1.405, 2.632, 4.84, 0.66, 0.67},
1123  { 470.888947, 0.03297, 3.599, 2.152, 4.57, 0.66, 0.65},
1124  { 474.689127, 0.12620, 2.381, 2.355, 4.65, 0.65, 0.64},
1125  { 488.491133, 0.02520, 2.853, 2.602, 5.04, 0.69, 0.72},
1126  { 503.568532, 0.00390, 6.733, 1.612, 3.98, 0.61, 0.43},
1127  { 504.482692, 0.00130, 6.733, 1.612, 4.01, 0.61, 0.45},
1128 // { 547.676440, 0.97010, 0.114, 2.600, 4.50, 0.70, 1.00},
1129 // { 552.020960, 1.47700, 0.114, 2.600, 4.50, 0.70, 1.00},
1130  { 547.676440, 0.97010*0.00199983, 0.114, 2.600, 4.50, 0.70, 1.00}, // isotopic ratio multiplied
1131  { 552.020960, 1.47700*0.00037200, 0.114, 2.600, 4.50, 0.70, 1.00}, // isotopic ratio multiplied
1132  { 556.936002, 48.74000, 0.159, 3.210, 4.11, 0.69, 1.00},
1133  { 620.700807, 0.50120, 2.200, 2.438, 4.68, 0.71, 0.68},
1134  { 645.866155, 0.00713, 8.580, 1.800, 4.00, 0.60, 0.50}, // ?? JPL tag 18003 (H2O) f_o = 645.7660100GHz
1135  { 658.005280, 0.03022, 7.820, 3.210, 4.14, 0.69, 1.00},
1136  { 752.033227, 23.96000, 0.396, 3.060, 4.09, 0.68, 0.84},
1137  { 841.053973, 0.00140, 8.180, 1.590, 5.76, 0.33, 0.45},
1138  { 859.962313, 0.01472, 7.989, 3.060, 4.09, 0.68, 0.84},
1139  { 899.306675, 0.00605, 7.917, 2.985, 4.53, 0.68, 0.90},
1140  { 902.616173, 0.00426, 8.432, 2.865, 5.10, 0.70, 0.95},
1141  { 906.207325, 0.01876, 5.111, 2.408, 4.70, 0.70, 0.53},
1142  { 916.171582, 0.83400, 1.442, 2.670, 4.78, 0.70, 0.78},
1143  { 923.118427, 0.00869, 10.220, 2.900, 5.00, 0.70, 0.80},
1144  { 970.315022, 0.89720, 1.920, 2.550, 4.94, 0.64, 0.67},
1145  { 987.926764, 13.21000, 0.258, 2.985, 4.55, 0.68, 0.90},
1146  //--------------------------------------------------------------------
1147  { 1780.000000, 2230.00000, 0.952, 17.620, 30.50, 2.00, 5.00}}; // pseudo continuum line
1148 
1149  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1150  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
1151  // "Propagation modeling of moist air and suspended water/ice
1152  // particles at frequencies below 1000 GHz",
1153  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
1154  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
1155  const Numeric CC_MPM93 = 1.00000;
1156  const Numeric CL_MPM93 = 1.00000;
1157  const Numeric CW_MPM93 = 1.00000;
1158  // ---------------------------------------------------------------------------------------
1159 
1160 
1161  // select the parameter set (!!model dominates values!!):
1162  Numeric CC, CL, CW;
1163  // number of lines of Liebe line catalog (0-33 lines, 34 cont. pseudo line)
1164  Index i_first = 0;
1165  Index i_last = 34;
1166  if ( model == "MPM93" )
1167  {
1168  CC = CC_MPM93;
1169  CL = CL_MPM93;
1170  CW = CW_MPM93;
1171  i_first = 0;
1172  i_last = 34;
1173  }
1174  else if ( model == "MPM93Lines" )
1175  {
1176  CC = 0.000;
1177  CL = CL_MPM93;
1178  CW = CW_MPM93;
1179  i_first = 0;
1180  i_last = 33;
1181  }
1182  else if ( model == "MPM93Continuum" )
1183  {
1184  CC = CC_MPM93;
1185  CL = 0.000;
1186  CW = 0.000;
1187  i_first = 34;
1188  i_last = 34;
1189  }
1190  else if ( model == "user" )
1191  {
1192  CC = CCin;
1193  CL = CLin;
1194  CW = CWin;
1195  i_first = 0;
1196  i_last = 34;
1197 
1198  }
1199  else
1200  {
1201  ostringstream os;
1202  os << "H2O-MPM93: ERROR! Wrong model values given.\n"
1203  << "Valid models are: 'MPM93', 'MPM93Lines', 'MPM93Continuum', and 'user'" << '\n';
1204  throw runtime_error(os.str());
1205  }
1206  out3 << "H2O-MPM93: (model=" << model << ") parameter values in use:\n"
1207  << " CC = " << CC << "\n"
1208  << " CL = " << CL << "\n"
1209  << " CW = " << CW << "\n";
1210 
1211 
1212  const Index n_p = abs_p.nelem(); // Number of pressure levels
1213  const Index n_f = f_grid.nelem(); // Number of frequencies
1214 
1215  // Check that dimensions of abs_p, abs_t, and vmr agree:
1216  assert ( n_p==abs_t.nelem() );
1217  assert ( n_p==vmr.nelem() );
1218 
1219  // Check that dimensions of pxsec are consistent with n_f
1220  // and n_p. It should be [n_f,n_p]:
1221  assert ( n_f==pxsec.nrows() );
1222  assert ( n_p==pxsec.ncols() );
1223 
1224  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
1225  for ( Index i=0; i<n_p; ++i )
1226  {
1227  // here the total pressure is not multiplied by the H2O vmr for the
1228  // P_H2O calculation because we calculate pxsec and not abs: abs = vmr * pxsec
1229  Numeric pwv_dummy = Pa_to_hPa * abs_p[i];
1230  // relative inverse temperature [1]
1231  Numeric theta = (300.0 / abs_t[i]);
1232  // H2O partial pressure [hPa]
1233  Numeric pwv = Pa_to_hPa * abs_p[i] * vmr[i];
1234  // dry air partial pressure [hPa]
1235  Numeric pda = (Pa_to_hPa * abs_p[i]) - pwv;
1236  // Loop over MPM93 spectral lines:
1237 
1238  // Loop over input frequency
1239  for ( Index s=0; s<n_f; ++s )
1240  {
1241  // input frequency in [GHz]
1242  Numeric ff = f_grid[s] * Hz_to_GHz;
1243 
1244  for ( Index l = i_first; l <= i_last; ++l )
1245  {
1246  // line strength [ppm]. The missing vmr of H2O will be multiplied
1247  // at the stage of absorption calculation: abs / vmr * pxsec.
1248  Numeric strength = 0.00;
1249  Numeric gam = 0.00;
1250  if ( (l >= 0) && (l <= 33) ) // ---- just the lines ------------------
1251  {
1252  strength = CL * pwv_dummy * mpm93[l][1]
1253  * pow(theta, (Numeric)3.5) * exp(mpm93[l][2]*(1.0-theta));
1254  // line broadening parameter [GHz]
1255  gam = CW * mpm93[l][3] * 0.001 *
1256  ( (mpm93[l][4] * pwv * pow(theta, mpm93[l][6])) +
1257  ( pda * pow(theta, mpm93[l][5])) );
1258  }
1259  else if ( l == 34 ) // ----- just the continuum pseudo-line ----------
1260  {
1261  strength = CC * pwv_dummy * mpm93[l][1]
1262  * pow(theta, (Numeric)3.5) * exp(mpm93[l][2]*(1.0-theta));
1263  // line broadening parameter [GHz]
1264  gam = mpm93[l][3] * 0.001 *
1265  ( (mpm93[l][4] * pwv * pow(theta, mpm93[l][6])) +
1266  ( pda * pow(theta, mpm93[l][5])) );
1267  }
1268  else // ----- if something strange happens ---------------------------
1269  {
1270  ostringstream os;
1271  os << "H2O-MPM93: wrong line number detected l=" << l << " (0-34)\n";
1272  throw runtime_error(os.str());
1273  return;
1274  } // ---------------------------------------------------------------
1275  // Doppler line width [GHz]
1276  // Numeric gamd = 1.46e-6 * mpm93[l][0] / sqrt(theta);
1277  // effective line width [GHz]
1278  //gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
1279  // absorption [dB/km] like in the original MPM93
1280  Numeric Npp = strength * MPMLineShapeFunction(gam, mpm93[l][0], ff);
1281  // pxsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
1282  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * Npp;
1283  }
1284  }
1285  }
1286  return;
1287 }
1288 //
1289 // #################################################################################
1291 
1318  const Numeric CCin, // continuum scale factor
1319  const Numeric CLin, // line strength scale factor
1320  const Numeric CWin, // line broadening scale factor
1321  const String& model,
1322  ConstVectorView f_grid,
1323  ConstVectorView abs_p,
1324  ConstVectorView abs_t,
1325  ConstVectorView vmr,
1326  const Verbosity& verbosity)
1327 {
1328  CREATE_OUT3
1329 
1330  // REFERENCES:
1331  // LINE INTENSITIES FROM HITRAN92 (SELECTION THRESHOLD=
1332  // HALF OF CONTINUUM ABSORPTION AT 1000 MB).
1333  // WIDTHS MEASURED AT 22,183,380 GHZ, OTHERS CALCULATED:
1334  // H.J.LIEBE AND T.A.DILLON, J.CHEM.PHYS. V.50, PP.727-732 (1969) &
1335  // H.J.LIEBE ET AL., JQSRT V.9, PP. 31-47 (1969) (22GHz);
1336  // A.BAUER ET AL., JQSRT V.37, PP.531-539 (1987) &
1337  // ASA WORKSHOP (SEPT. 1989) (380GHz);
1338  // AND A.BAUER ET AL., JQSRT V.41, PP.49-54 (1989) (OTHER LINES).
1339  // AIR-BROADENED CONTINUUM BASED ON LIEBE & LAYTON, NTIA
1340  // REPORT 87-224 (1987); SELF-BROADENED CONTINUUM BASED ON
1341  // LIEBE ET AL, AGARD CONF. PROC. 542 (MAY 1993),
1342  // BUT READJUSTED FOR LINE SHAPE OF
1343  // CLOUGH et al, ATMOS. RESEARCH V.23, PP.229-241 (1989).
1344  //
1345  // Coefficients are from P. W. Rosenkranz., Radio Science, 33(4), 919, 1998
1346  // line frequencies [GHz]
1347  const Numeric PWRfl[15] = { 22.2350800, 183.3101170, 321.2256400, 325.1529190, 380.1973720,
1348  439.1508120, 443.0182950, 448.0010750, 470.8889470, 474.6891270,
1349  488.4911330, 556.9360020, 620.7008070, 752.0332270, 916.1715820 };
1350  // line intensities at 300K [Hz * cm2] (see Janssen Appendix to Chap.2 for this)
1351  const Numeric PWRs1[15] = { 1.31e-14, 2.273e-12, 8.036e-14, 2.694e-12, 2.438e-11,
1352  2.179e-12, 4.624e-13, 2.562e-11, 8.369e-13, 3.263e-12,
1353  6.659e-13, 1.531e-9, 1.707e-11, 1.011e-9, 4.227e-11 };
1354  // T coeff. of intensities [1]
1355  const Numeric PWRb2[15] = { 2.144, 0.668, 6.179, 1.541, 1.048,
1356  3.595, 5.048, 1.405, 3.597, 2.379,
1357  2.852, 0.159, 2.391, 0.396, 1.441 };
1358  // air-broadened width parameters at 300K [GHz/hPa]
1359  const Numeric PWRw3[15] = { 0.00281, 0.00281, 0.00230, 0.00278, 0.00287,
1360  0.00210, 0.00186, 0.00263, 0.00215, 0.00236,
1361  0.00260, 0.00321, 0.00244, 0.00306, 0.00267 };
1362  // T-exponent of air-broadening [1]
1363  const Numeric PWRx[15] = { 0.69, 0.64, 0.67, 0.68, 0.54,
1364  0.63, 0.60, 0.66, 0.66, 0.65,
1365  0.69, 0.69, 0.71, 0.68, 0.70 };
1366  // self-broadened width parameters at 300K [GHz/hPa]
1367  const Numeric PWRws[15] = { 0.01349, 0.01491, 0.01080, 0.01350, 0.01541,
1368  0.00900, 0.00788, 0.01275, 0.00983, 0.01095,
1369  0.01313, 0.01320, 0.01140, 0.01253, 0.01275 };
1370 
1371  // T-exponent of self-broadening [1]
1372  const Numeric PWRxs[15] = { 0.61, 0.85, 0.54, 0.74, 0.89,
1373  0.52, 0.50, 0.67, 0.65, 0.64,
1374  0.72, 1.00, 0.68, 0.84, 0.78 };
1375 
1376  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1377  // standard values for the MPM87 model (P. W. Rosenkranz., Radio Science, 33(4), 919, 1998):
1378  const Numeric CC_PWR98 = 1.00000;
1379  const Numeric CL_PWR98 = 1.00000;
1380  const Numeric CW_PWR98 = 1.00000;
1381  // ---------------------------------------------------------------------------------------
1382 
1383 
1384  // select the parameter set (!!model dominates values!!):
1385  Numeric CC, CL, CW;
1386  if ( model == "Rosenkranz" )
1387  {
1388  CC = CC_PWR98;
1389  CL = CL_PWR98;
1390  CW = CW_PWR98;
1391  }
1392  else if ( model == "RosenkranzLines" )
1393  {
1394  CC = 0.000;
1395  CL = CL_PWR98;
1396  CW = CW_PWR98;
1397  }
1398  else if ( model == "RosenkranzContinuum" )
1399  {
1400  CC = CC_PWR98;
1401  CL = 0.000;
1402  CW = 0.000;
1403  }
1404  else if ( model == "user" )
1405  {
1406  CC = CCin;
1407  CL = CLin;
1408  CW = CWin;
1409  }
1410  else
1411  {
1412  ostringstream os;
1413  os << "H2O-PWR98: ERROR! Wrong model values given.\n"
1414  << "Valid models are: 'Rosenkranz', 'RosenkranzLines', 'RosenkranzContinuum', and 'user'" << '\n';
1415  throw runtime_error(os.str());
1416  }
1417  out3 << "H2O-PWR98: (model=" << model << ") parameter values in use:\n"
1418  << " CC = " << CC << "\n"
1419  << " CL = " << CL << "\n"
1420  << " CW = " << CW << "\n";
1421 
1422 
1423  const Index n_p = abs_p.nelem(); // Number of pressure levels
1424  const Index n_f = f_grid.nelem(); // Number of frequencies
1425 
1426  // Check that dimensions of abs_p, abs_t, and vmr agree:
1427  assert ( n_p==abs_t.nelem() );
1428  assert ( n_p==vmr.nelem() );
1429 
1430  // Check that dimensions of pxsec are consistent with n_f
1431  // and n_p. It should be [n_f,n_p]:
1432  assert ( n_f==pxsec.nrows() );
1433  assert ( n_p==pxsec.ncols() );
1434 
1435  // Loop pressure/temperature:
1436  for ( Index i=0; i<n_p; ++i )
1437  {
1438  // here the total pressure is not multiplied by the H2O vmr for the
1439  // P_H2O calculation because we calculate pxsec and not abs: abs = vmr * pxsec
1440  Numeric pvap_dummy = Pa_to_hPa * abs_p[i];
1441  // water vapor partial pressure [hPa]
1442  Numeric pvap = Pa_to_hPa * abs_p[i] * vmr[i];
1443  // dry air partial pressure [hPa]
1444  Numeric pda = (Pa_to_hPa * abs_p[i]) - pvap;
1445  // Rosenkranz number density (Rosenkranz H2O mass density in [g/m³])
1446  // [g/m³] = [g*K / Pa*m³] * [Pa/K]
1447  // rho = (M_H2O / R) * (P_H2O / T)
1448  // rho = 2.1667 * abs_p * vmr / abs_t
1449  // den = 3.335e16 * rho
1450  // FIXME Numeric den = 3.335e16 * (2.1667 * abs_p[i] * vmr[i] / abs_t[i]);
1451  Numeric den_dummy = 3.335e16 * (2.1667 * abs_p[i] / abs_t[i]);
1452  // inverse relative temperature [1]
1453  Numeric ti = (300.0 / abs_t[i]);
1454  Numeric ti2 = pow(ti, (Numeric)2.5);
1455 
1456  // continuum term [Np/km/GHz2]
1457  Numeric con = CC * pvap_dummy * pow(ti, (Numeric)3.0) * 1.000e-9
1458  * ( (0.543 * pda) + (17.96 * pvap * pow(ti, (Numeric)4.5)) );
1459 
1460  // Loop over input frequency
1461  for ( Index s=0; s<n_f; ++s )
1462  {
1463  // input frequency in [GHz]
1464  Numeric ff = f_grid[s] * Hz_to_GHz;
1465  // line contribution at position f
1466  Numeric sum = 0.000;
1467 
1468  // Loop over spectral lines
1469  for (Index l = 0; l < 15; l++)
1470  {
1471  Numeric width = ( CW * PWRw3[l] * pda * pow(ti, PWRx[l]) ) +
1472  ( PWRws[l] * pvap * pow(ti, PWRxs[l]));
1473  // Numeric width = CW * ( PWRw3[l] * pda * pow(ti, PWRx[l]) +
1474  // PWRws[l] * pvap * pow(ti, PWRxs[l]) );
1475  Numeric wsq = width * width;
1476  Numeric strength = CL * PWRs1[l] * ti2 * exp(PWRb2[l]*(1.0 - ti));
1477  // frequency differences
1478  Numeric df0 = ff - PWRfl[l];
1479  Numeric df1 = ff + PWRfl[l];
1480  // use Clough's definition of local line contribution
1481  Numeric base = width / (wsq + 562500.000);
1482  // positive and negative resonances
1483  Numeric res = 0.000;
1484  if (fabs(df0) < 750.0) res += width / (df0*df0 + wsq) - base;
1485  if (fabs(df1) < 750.0) res += width / (df1*df1 + wsq) - base;
1486  sum += strength * res * pow( (ff/PWRfl[l]),
1487  (Numeric)2.0 );
1488  }
1489  // line term [Np/km]
1490  Numeric absl = 0.3183e-4 * den_dummy * sum;
1491  // pxsec = abs/vmr [1/m] (Rosenkranz model in [Np/km])
1492  // 4.1907e-5 = 0.230259 * 0.1820 * 1.0e-3 (1/(10*log(e)) = 0.230259)
1493  pxsec(s,i) += 1.000e-3 * ( absl + (con * ff * ff) );
1494  }
1495  }
1496  return;
1497 }
1498 //
1499 // #################################################################################
1500 //
1502 
1528  const Numeric CCin, // continuum scale factor
1529  const Numeric CLin, // line strength scale factor
1530  const Numeric CWin, // line broadening scale factor
1531  const String& model,
1532  ConstVectorView f_grid,
1533  ConstVectorView abs_p,
1534  ConstVectorView abs_t,
1535  ConstVectorView vmr,
1536  const Verbosity& verbosity)
1537 {
1538  CREATE_OUT3
1539 
1540  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1541  // standard values for the CP98 model (S. L. Cruz-Pol et al., Radio Science, 33(5), 1319, 1998):
1542  const Numeric CC_CP98 = 1.2369; // +/- 0.155 !LARGE!
1543  const Numeric CL_CP98 = 1.0639; // +/- 0.016
1544  const Numeric CW_CP98 = 1.0658; // +/- 0.0096
1545  // ---------------------------------------------------------------------------------------
1546 
1547  // select the parameter set (!!model dominates values!!):
1548  Numeric CC, CL, CW;
1549  if ( model == "CruzPol" )
1550  {
1551  CC = CC_CP98;
1552  CL = CL_CP98;
1553  CW = CW_CP98;
1554  }
1555  else if ( model == "CruzPolLine" )
1556  {
1557  CC = 0.000;
1558  CL = CL_CP98;
1559  CW = CW_CP98;
1560  }
1561  else if ( model == "CruzPolContinuum" )
1562  {
1563  CC = CC_CP98;
1564  CL = 0.000;
1565  CW = 0.000;
1566  }
1567  else if ( model == "user" )
1568  {
1569  CC = CCin;
1570  CL = CLin;
1571  CW = CWin;
1572  }
1573  else
1574  {
1575  ostringstream os;
1576  os << "H2O-CP98: ERROR! Wrong model values given.\n"
1577  << "Valid models are: 'CruzPol', 'CruzPolLine', 'CruzPolContinuum', and 'user'" << "\n";
1578  throw runtime_error(os.str());
1579  }
1580  out3 << "H2O-CP98: (model=" << model << ") parameter values in use:\n"
1581  << " CC = " << CC << "\n"
1582  << " CL = " << CL << "\n"
1583  << " CW = " << CW << "\n";
1584 
1585  const Index n_p = abs_p.nelem(); // Number of pressure levels
1586  const Index n_f = f_grid.nelem(); // Number of frequencies
1587 
1588  // Check that dimensions of abs_p, abs_t, and vmr agree:
1589  assert ( n_p==abs_t.nelem() );
1590  assert ( n_p==vmr.nelem() );
1591 
1592  // Check that dimensions of pxsec are consistent with n_f
1593  // and n_p. It should be [n_f,n_p]:
1594  assert ( n_f==pxsec.nrows() );
1595  assert ( n_p==pxsec.ncols() );
1596 
1597  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
1598  for ( Index i=0; i<n_p; ++i )
1599  {
1600  // calculate pxsec only if VMR(H2O) > VMRCalcLimit
1601  if (vmr[i] > VMRCalcLimit)
1602  {
1603  // relative inverse temperature [1]
1604  Numeric theta = (300.0 / abs_t[i]);
1605  // H2O partial pressure [hPa]
1606  Numeric pwv = Pa_to_hPa * abs_p[i] * vmr[i];
1607  // dry air partial pressure [hPa]
1608  Numeric pda = (Pa_to_hPa * abs_p[i]) - pwv;
1609  // line strength
1610  Numeric TL = CL * 0.0109 * pwv * pow(theta,(Numeric)3.5)
1611  * exp(2.143*(1.0-theta));
1612  // line broadening parameter [GHz]
1613  Numeric gam = CW * 0.002784 *
1614  ( (pda * pow(theta,(Numeric)0.6))
1615  + (4.80 * pwv * pow(theta,(Numeric)1.1)) );
1616  // continuum term
1617  Numeric TC = CC * pwv * pow(theta, (Numeric)3.0) * 1.000e-7
1618  * ( (0.113 * pda) + (3.57 * pwv * pow(theta,(Numeric)7.5)) );
1619 
1620  // Loop over input frequency
1621  for ( Index s=0; s<n_f; ++s )
1622  {
1623  // input frequency in [GHz]
1624  Numeric ff = f_grid[s] * Hz_to_GHz;
1625  Numeric TSf = MPMLineShapeFunction(gam, 22.235080, ff);
1626  // pxsec = abs/vmr [1/m] (Cruz-Pol model in [Np/km])
1627  pxsec(s,i) += 4.1907e-5 * ff * ( (TL * TSf) + (ff * TC) ) / vmr[i];
1628  }
1629  }
1630  }
1631  return;
1632 }
1633 //
1634 // #################################################################################
1636 
1660  const Numeric Cin,
1661  const Numeric xin,
1662  const String& model,
1663  ConstVectorView f_grid,
1664  ConstVectorView abs_p,
1665  ConstVectorView abs_t,
1666  ConstVectorView vmr,
1667  const Verbosity& verbosity)
1668 {
1669  CREATE_OUT3
1670 
1671  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1672  // standard values for the Rosenkranz model (Radio Science, 33(4), 919, 1998):
1673  const Numeric Cs_PWR = 1.796e-33; // [1/m / (Hz²*Pa²)]
1674  const Numeric xs_PWR = 4.5; // [1]
1675  // standard values for the Cruz-Pol model (Radio Science, 33(5), 1319, 1998):
1676  const Numeric Cs_CP = 1.851e-33; // [1/m / (Hz²*Pa²)]
1677  const Numeric xs_CP = 7.5; // [1]
1678  // standard values for the MPM89 model (Int. J. Inf. and Millim. Waves, 10(6), 1989, 631):
1679  const Numeric Cs_MPM89 = 1.500e-33; // [1/m / (Hz²*Pa²)]
1680  const Numeric xs_MPM89 = 7.5; // [1]
1681  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
1682  const Numeric Cs_MPM87 = 1.500e-33; // [1/m / (Hz²*Pa²)]
1683  const Numeric xs_MPM87 = 7.5; // [1]
1684  // ---------------------------------------------------------------------------------------
1685 
1686  // select the parameter set (!!model goes for values!!):
1687  Numeric C, x;
1688  if ( model == "Rosenkranz" )
1689  {
1690  C = Cs_PWR;
1691  x = xs_PWR;
1692  }
1693  else if ( model == "CruzPol" )
1694  {
1695  C = Cs_CP;
1696  x = xs_CP;
1697  }
1698  else if ( model == "MPM89" )
1699  {
1700  C = Cs_MPM89;
1701  x = xs_MPM89;
1702  }
1703  else if ( model == "MPM87" )
1704  {
1705  C = Cs_MPM87;
1706  x = xs_MPM87;
1707  }
1708  else if ( model == "user" )
1709  {
1710  C = Cin;
1711  x = xin;
1712  }
1713  else
1714  {
1715  ostringstream os;
1716  os << "H2O-SelfContStandardType: ERROR! Wrong model values given.\n"
1717  << "allowed models are: 'Rosenkranz', 'CruzPol', 'MPM89', 'MPM87', 'user'" << '\n';
1718  throw runtime_error(os.str());
1719  }
1720  out3 << "H2O-SelfContStandardType: (model=" << model << ") parameter values in use:\n"
1721  << " C_s = " << C << "\n"
1722  << " x_s = " << x << "\n";
1723 
1724 
1725 
1726  const Index n_p = abs_p.nelem(); // Number of pressure levels
1727  const Index n_f = f_grid.nelem(); // Number of frequencies
1728 
1729  // Check that dimensions of abs_p, abs_t, and vmr agree:
1730  assert ( n_p==abs_t.nelem() );
1731  assert ( n_p==vmr.nelem() );
1732 
1733  // Check that dimensions of pxsec are consistent with n_f
1734  // and n_p. It should be [n_f,n_p]:
1735  assert ( n_f==pxsec.nrows() );
1736  assert ( n_p==pxsec.ncols() );
1737 
1738  // Loop over pressure/temperature grid:
1739  for ( Index i=0; i<n_p; ++i )
1740  {
1741  // Dummy scalar holds everything except the quadratic frequency dependence.
1742  // The second vmr of H2O will be multiplied at the stage of absorption
1743  // calculation: abs = vmr * pxsec.
1744  Numeric dummy =
1745  C * pow( (Numeric)300./abs_t[i], x+(Numeric)3. )
1746  * pow( abs_p[i], (Numeric)2. ) * vmr[i];
1747 
1748  // Loop over frequency grid:
1749  for ( Index s=0; s<n_f; ++s )
1750  {
1751  pxsec(s,i) += dummy * pow( f_grid[s], (Numeric)2. );
1752  // cout << "pxsec(" << s << "," << i << "): " << pxsec(s,i) << "\n";
1753  }
1754  }
1755 }
1756 //
1757 // #################################################################################
1759 
1784  const Numeric Cin,
1785  const Numeric xin,
1786  const String& model,
1787  ConstVectorView f_grid,
1788  ConstVectorView abs_p,
1789  ConstVectorView abs_t,
1790  ConstVectorView vmr,
1791  const Verbosity& verbosity)
1792 {
1793  CREATE_OUT3
1794 
1795  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1796  // standard values for the Rosenkranz model (Radio Science, 33(4), 919, 1998):
1797  const Numeric Cf_PWR = 5.43e-35 ; // [1/m / (Hz²*Pa²)]
1798  const Numeric xf_PWR = 0.0; // [1]
1799  // standard values for the Cruz-Pol model (Radio Science, 33(5), 1319, 1998):
1800  const Numeric Cf_CP = 5.85e-35; // [1/m / (Hz²*Pa²)]
1801  const Numeric xf_CP = 0.0; // [1]
1802  // standard values for the MPM89 model (Int. J. Inf. and Millim. Waves, 10(6), 1989, 631):
1803  const Numeric Cf_MPM89 = 4.74e-35; // [1/m / (Hz²*Pa²)]
1804  const Numeric xf_MPM89 = 0.0; // [1]
1805  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
1806  const Numeric Cf_MPM87 = 4.74e-35; // [1/m / (Hz²*Pa²)]
1807  const Numeric xf_MPM87 = 0.0; // [1]
1808  // ---------------------------------------------------------------------------------------
1809 
1810 
1811  // select the parameter set (!!model goes for values!!):
1812  Numeric C, x;
1813  if ( model == "Rosenkranz" )
1814  {
1815  C = Cf_PWR;
1816  x = xf_PWR;
1817  }
1818  else if ( model == "CruzPol" )
1819  {
1820  C = Cf_CP;
1821  x = xf_CP;
1822  }
1823  else if ( model == "MPM89" )
1824  {
1825  C = Cf_MPM89;
1826  x = xf_MPM89;
1827  }
1828  else if ( model == "MPM87" )
1829  {
1830  C = Cf_MPM87;
1831  x = xf_MPM87;
1832  }
1833  else if ( model == "user" )
1834  {
1835  C = Cin;
1836  x = xin;
1837  }
1838  else
1839  {
1840  ostringstream os;
1841  os << "H2O-ForeignContStandardType: ERROR! Wrong model values given.\n"
1842  << "allowed models are: 'Rosenkranz', 'CruzPol', 'MPM89', 'MPM87', 'user'" << '\n';
1843  throw runtime_error(os.str());
1844  }
1845  out3 << "H2O-ForeignContStandardType: (model=" << model << ") parameter values in use:\n"
1846  << " C_s = " << C << "\n"
1847  << " x_s = " << x << "\n";
1848 
1849  const Index n_p = abs_p.nelem(); // Number of pressure levels
1850  const Index n_f = f_grid.nelem(); // Number of frequencies
1851 
1852  // Check that dimensions of abs_p, abs_t, and vmr agree:
1853  assert ( n_p==abs_t.nelem() );
1854  assert ( n_p==vmr.nelem() );
1855 
1856  // Check that dimensions of pxsec are consistent with n_f
1857  // and n_p. It should be [n_f,n_p]:
1858  assert ( n_f==pxsec.nrows() );
1859  assert ( n_p==pxsec.ncols() );
1860 
1861  // Loop pressure/temperature:
1862  for ( Index i=0; i<n_p; ++i )
1863  {
1864  // Dry air partial pressure: p_dry := p_tot - p_h2o.
1865  Numeric pdry = abs_p[i] * (1.000e0-vmr[i]);
1866  // Dummy scalar holds everything except the quadratic frequency dependence.
1867  // The vmr of H2O will be multiplied at the stage of absorption
1868  // calculation: abs = vmr * pxsec.
1869  Numeric dummy = C * pow( (Numeric)300./abs_t[i], x+(Numeric)3. )
1870  * abs_p[i] * pdry;
1871 
1872  // Loop frequency:
1873  for ( Index s=0; s<n_f; ++s )
1874  {
1875  pxsec(s,i) += dummy * pow( f_grid[s], (Numeric)2. );
1876  // cout << "pxsec(" << s << "," << i << "): " << pxsec(s,i) << "\n";
1877  }
1878  }
1879 }
1880 //
1881 //
1882 // #################################################################################
1884 
1908  const Numeric Cin,
1909  const Numeric xin,
1910  const String& model,
1911  ConstVectorView f_grid,
1912  ConstVectorView abs_p,
1913  ConstVectorView abs_t,
1914  ConstVectorView vmr,
1915  const Verbosity& verbosity)
1916 {
1917  CREATE_OUT3
1918 
1919  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1920  // standard values for Q. Ma and R. H. Tipping, J. Chem. Phys., 117(23), 10581, 2002:
1921  // the Cf value is originally given in dB/km/kPa^2/GHz^2.0389. the conversion factor is
1922  // then 1.0283E-28 to get arts units. Additionally the Cf value is divided by 1.08 to
1923  // get the Cf for air.
1924  const Numeric Cf_MaTipping = 1.8590e-35; // [1/m / (Hz²*Pa²)]
1925  const Numeric xf_MaTipping = 4.6019; // [1]
1926  // ---------------------------------------------------------------------------------------
1927 
1928 
1929  // select the parameter set (!!model goes for values!!):
1930  Numeric C, x;
1931  if ( model == "MaTipping" )
1932  {
1933  C = Cf_MaTipping;
1934  x = xf_MaTipping;
1935  }
1936  else if ( model == "user" )
1937  {
1938  C = Cin;
1939  x = xin;
1940  }
1941  else
1942  {
1943  ostringstream os;
1944  os << "H2O-MaTipping_H2O_foreign_continuum: ERROR! Wrong model values given.\n"
1945  << "allowed models are: 'MaTipping', 'user'" << '\n';
1946  throw runtime_error(os.str());
1947  }
1948  out3 << "H2O-MaTipping_H2O_foreign_continuum: (model=" << model << ") parameter values in use:\n"
1949  << " C_s = " << C << "\n"
1950  << " x_s = " << x << "\n";
1951 
1952  const Index n_p = abs_p.nelem(); // Number of pressure levels
1953  const Index n_f = f_grid.nelem(); // Number of frequencies
1954 
1955  // Check that dimensions of abs_p, abs_t, and vmr agree:
1956  assert ( n_p==abs_t.nelem() );
1957  assert ( n_p==vmr.nelem() );
1958 
1959  // Check that dimensions of pxsec are consistent with n_f
1960  // and n_p. It should be [n_f,n_p]:
1961  assert ( n_f==pxsec.nrows() );
1962  assert ( n_p==pxsec.ncols() );
1963 
1964  // Loop pressure/temperature:
1965  for ( Index i=0; i<n_p; ++i )
1966  {
1967  // Dry air partial pressure: p_dry := p_tot - p_h2o.
1968  Numeric pdry = abs_p[i] * (1.000e0-vmr[i]);
1969  // Dummy scalar holds everything except the quadratic frequency dependence.
1970  // The vmr of H2O will be multiplied at the stage of absorption
1971  // calculation: abs = vmr * pxsec.
1972  Numeric dummy = C * pow( (Numeric)300./abs_t[i], x )
1973  * abs_p[i] * pdry;
1974 
1975  // Loop frequency:
1976  for ( Index s=0; s<n_f; ++s )
1977  {
1978  pxsec(s,i) += dummy * pow( f_grid[s], (Numeric)2.0389 );
1979  // cout << "pxsec(" << s << "," << i << "): " << pxsec(s,i) << "\n";
1980  }
1981  }
1982 }
1983 //
1984 // #################################################################################
1985 
1986 
1987 
1988 // =================================================================================
1989 
1990 
1992  const Numeric /* V2A */,
1993  const Numeric DVA,
1994  ConstVectorView A,
1995  const Numeric VI)
1996 {
1997 
1998 // ----------------------------------------------------------------------
1999  // THIS SUBROUTINE INTERPOLATES THE A ARRAY STORED
2000  // FROM V1A TO V2A IN INCREMENTS OF DVA INTO XINT
2001 // ----------------------------------------------------------------------
2002 
2003  const Numeric ONEPL = 1.001; // original value given in F77 code
2004  // FIXME const Numeric ONEMI = 0.999; // original value given in F77 code
2005 
2006  //const Numeric ONEPL = 0.001; // modified value for C/C++ code
2007 
2008  Numeric RECDVA = 1.00e0/DVA;
2009 
2010  int J = (int) ((VI-V1A)*RECDVA + ONEPL) ;
2011  Numeric VJ = V1A + DVA * (Numeric)(J-1);
2012  Numeric P = RECDVA * (VI-VJ);
2013  Numeric C = (3.00e0-2.00e0*P) * P * P;
2014  Numeric B = 0.500e0 * P * (1.00e0-P);
2015  Numeric B1 = B * (1.00e0-P);
2016  Numeric B2 = B * P;
2017 
2018  Numeric xint = -A[J-1] * B1 +
2019  A[J] * (1.00e0-C+B2) +
2020  A[J+1] * (C+B1) -
2021  A[J+2] * B2;
2022 
2023  /*
2024  cout << (J-1) << " <-> " << (J+2)
2025  << ", V=" << VI << ", VJ=" << VJ << "\n";
2026  cout << "xint=" << xint << " " << A[J-1] << " " << A[J] << " " << A[J+1] << " " << A[J+2] << "\n";
2027  */
2028 
2029  return xint;
2030 }
2031 
2033  const Numeric /* V2A */,
2034  const Numeric DVA,
2035  const Numeric A[],
2036  const Numeric VI)
2037 {
2038 
2039 // ----------------------------------------------------------------------
2040  // THIS SUBROUTINE INTERPOLATES THE A ARRAY STORED
2041  // FROM V1A TO V2A IN INCREMENTS OF DVA INTO XINT
2042 // ----------------------------------------------------------------------
2043 
2044  const Numeric ONEPL = 1.001; // original value given in F77 code
2045  // FIXME const Numeric ONEMI = 0.999; // original value given in F77 code
2046 
2047  //const Numeric ONEPL = 0.001; // modified value for C/C++ code
2048 
2049  Numeric RECDVA = 1.00e0/DVA;
2050 
2051  int J = (int) ((VI-V1A)*RECDVA + ONEPL) ;
2052  Numeric VJ = V1A + DVA * (Numeric)(J-1);
2053  Numeric P = RECDVA * (VI-VJ);
2054  Numeric C = (3.00e0-2.00e0*P) * P * P;
2055  Numeric B = 0.500e0 * P * (1.00e0-P);
2056  Numeric B1 = B * (1.00e0-P);
2057  Numeric B2 = B * P;
2058 
2059  Numeric xint = -A[J-1] * B1 +
2060  A[J] * (1.00e0-C+B2) +
2061  A[J+1] * (C+B1) -
2062  A[J+2] * B2;
2063 
2064  /*
2065  cout << (J-1) << " <-> " << (J+2)
2066  << ", V=" << VI << ", VJ=" << VJ << "\n";
2067  cout << "xint=" << xint << " " << A[J-1] << " " << A[J] << " " << A[J+1] << " " << A[J+2] << "\n";
2068  */
2069 
2070  return xint;
2071 }
2072 
2073 // =================================================================================
2074 
2076  const Numeric XKT)
2077 {
2078 // ---------------------------------------------------------------------- B18060
2079 // LAST MODIFICATION: 12 AUGUST 1991 B17940
2080 // B17950
2081 // IMPLEMENTATION: R.D. WORSHAM B17960
2082 // B17970
2083 // ALGORITHM REVISIONS: S.A. CLOUGH B17980
2084 // R.D. WORSHAM B17990
2085 // J.L. MONCET B18000
2086 // B18010
2087 // B18020
2088 // ATMOSPHERIC AND ENVIRONMENTAL RESEARCH INC. B18030
2089 // 840 MEMORIAL DRIVE, CAMBRIDGE, MA 02139 B18040
2090 // B18050
2091 // B18070
2092 // WORK SUPPORTED BY: THE ARM PROGRAM B18080
2093 // OFFICE OF ENERGY RESEARCH B18090
2094 // DEPARTMENT OF ENERGY B18100
2095 // B18110
2096 // B18120
2097 // SOURCE OF ORIGINAL ROUTINE: AFGL LINE-BY-LINE MODEL B18130
2098 // B18140
2099 // FASCOD3 B18150
2100 // B18160
2101 // ---------------------------------------------------------------------- B18060
2102 // B18170
2103 // IN THE SMALL XVIOKT REGION 0.5 IS REQUIRED
2104 
2105  Numeric XVI = VI;
2106  Numeric RADFN = 0.00e0;
2107 
2108  if (XKT > 0.0)
2109  {
2110  Numeric XVIOKT = XVI/XKT;
2111 
2112  if (XVIOKT <= 0.01e0)
2113  {
2114  RADFN = 0.500e0 * XVIOKT * XVI;
2115  }
2116  else if (XVIOKT <= 10.0e0)
2117  {
2118  Numeric EXPVKT = exp(-XVIOKT);
2119  RADFN = XVI * (1.00e0-EXPVKT) / (1.00e0+EXPVKT);
2120  }
2121  else
2122  {
2123  RADFN = XVI;
2124  }
2125  }
2126  else
2127  {
2128  RADFN = XVI;
2129  }
2130 
2131  return RADFN;
2132 }
2133 
2134 // =================================================================================
2135 
2137 
2163  const Numeric Cin,
2164  const String& model,
2165  ConstVectorView f_grid,
2166  ConstVectorView abs_p,
2167  ConstVectorView abs_t,
2168  ConstVectorView vmr,
2169  ConstVectorView abs_n2 _U_,
2170  const Verbosity& verbosity)
2171 {
2172  CREATE_OUT3
2173 
2174  // check the model name about consistency
2175  if ((model != "user") && (model != "CKD222"))
2176  {
2177  ostringstream os;
2178  os << "!!ERROR!!\n"
2179  << "CKDv2.2.2 H2O self continuum:\n"
2180  << "INPUT model name is: " << model << ".\n"
2181  << "VALID model names are user and CKD222\n";
2182  throw runtime_error(os.str());
2183  }
2184 
2185 
2186  // scaling factor of the self H2O cont. absorption
2187  Numeric ScalingFac = 1.0000e0;
2188  if ( model == "user" )
2189  {
2190  ScalingFac = Cin; // input scaling factor of calculated absorption
2191  }
2192 
2193 
2194  const Index n_p = abs_p.nelem(); // Number of pressure levels
2195  const Index n_f = f_grid.nelem(); // Number of frequencies
2196 
2197 
2198  // Check that dimensions of abs_p, abs_t, and vmr agree:
2199  assert ( n_p==abs_t.nelem() );
2200  assert ( n_p==vmr.nelem() );
2201 
2202  // Check that dimensions of pxsec are consistent with n_f
2203  // and n_p. It should be [n_f,n_p]:
2204  assert ( n_f==pxsec.nrows() );
2205  assert ( n_p==pxsec.ncols() );
2206 
2207 
2208  // ************************** CKD stuff ************************************
2209 
2210  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2211  // FIXME const Numeric T1 = 273.0e0;
2212  const Numeric TO = 296.0e0;
2213  const Numeric PO = 1013.0e0;
2214 
2215  // CKD2.2.2 specific self continuum correction function parameters
2216  const Numeric ALPHA2 = 200.000 * 200.000;
2217  const Numeric ALPHS2 = 120.000 * 120.000;
2218  const Numeric BETAS = 5.000e-06;
2219  const Numeric V0S = 1310.000;
2220  const Numeric FACTRS = 0.150;
2221 
2222  // These are self-continuum modification factors from 700-1200 cm-1
2223  const Numeric XFAC[51] = {
2224  1.00000,1.01792,1.03767,1.05749,1.07730,1.09708,
2225  1.10489,1.11268,1.12047,1.12822,1.13597,1.14367,
2226  1.15135,1.15904,1.16669,1.17431,1.18786,1.20134,
2227  1.21479,1.22821,1.24158,1.26580,1.28991,1.28295,
2228  1.27600,1.26896,1.25550,1.24213,1.22879,1.21560,
2229  1.20230,1.18162,1.16112,1.14063,1.12016,1.10195,
2230  1.09207,1.08622,1.08105,1.07765,1.07398,1.06620,
2231  1.05791,1.04905,1.03976,1.02981,1.00985,1.00000,
2232  1.00000,1.00000,1.00000};
2233 
2234  // wavenumber range where CKD H2O self continuum is valid
2235  const Numeric VABS_min = SL260_ckd_0_v1; // [cm^-1]
2236  const Numeric VABS_max = SL260_ckd_0_v2; // [cm^-1]
2237 
2238 
2239  // It is assumed here that f_grid is monotonically increasing with index!
2240  // In future change this return into a change of the loop over
2241  // the frequency f_grid. n_f_new < n_f
2242  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2243  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2244  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2245  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2246  {
2247  out3 << "WARNING:\n"
2248  << " CKD2.2.2 H2O self continuum:\n"
2249  << " input frequency vector exceeds range of model validity\n"
2250  << " " << SL296_ckd_0_v1 << "<->" << SL296_ckd_0_v2 << "cm^-1\n";
2251  }
2252 
2253 
2254  // ------------------- subroutine SL296/SL260 ----------------------------
2255 
2257  {
2258  ostringstream os;
2259  os << "!!ERROR!!\n"
2260  << "CKD2.2.2 H2O self continuum:\n"
2261  << "parameter V1 not the same for different ref. temperatures.\n";
2262  throw runtime_error(os.str());
2263  }
2265  {
2266  ostringstream os;
2267  os << "!!ERROR!!\n"
2268  << "CKD2.2.2 H2O self continuum:\n"
2269  << "parameter V2 not the same for different ref. temperatures.\n";
2270  throw runtime_error(os.str());
2271  }
2273  {
2274  ostringstream os;
2275  os << "!!ERROR!!\n"
2276  << "CKD2.2.2 H2O self continuum:\n"
2277  << "parameter DV not the same for different ref. temperatures.\n";
2278  throw runtime_error(os.str());
2279  }
2281  {
2282  ostringstream os;
2283  os << "!!ERROR!!\n"
2284  << "CKD2.2.2 H2O self continuum:\n"
2285  << "parameter NPT not the same for different ref. temperatures.\n";
2286  throw runtime_error(os.str());
2287  }
2288 
2289  // retrieve the appropriate array sequence of the self continuum
2290  // arrays of the CKD model.
2291  Numeric DVC = SL296_ckd_0_dv;
2292  Numeric V1C = V1ABS - DVC;
2293  Numeric V2C = V2ABS + DVC;
2294 
2295  int I1 = (int) ((V1C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2296  if (V1C < SL296_ckd_0_v1) I1 = -1;
2297  V1C = SL296_ckd_0_v1 + (SL296_ckd_0_dv * (Numeric)I1);
2298 
2299  int I2 = (int) ((V2C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2300 
2301  int NPTC = I2-I1+3;
2302  if (NPTC > SL296_ckd_0_npt) NPTC = SL296_ckd_0_npt+1;
2303 
2304  V2C = V1C + SL296_ckd_0_dv * (Numeric)(NPTC-1);
2305 
2306  if (NPTC < 1)
2307  {
2308  ostringstream os;
2309  out3 << "WARNING:\n"
2310  << " CKD2.2.2 H2O self continuum:\n"
2311  << " no elements of internal continuum coefficients could be found for the\n"
2312  << " input frequency range.\n"
2313  << " Leave the function without calculating the absorption.";
2314  return;
2315  }
2316 
2317  Numeric SH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2318  Numeric SH2OT1[NPTC+addF77fields]; // [cm^3/molecules]
2319 
2320  for (Index J = 1 ; J <= NPTC ; ++J)
2321  {
2322  Index I = I1+J;
2323  if ( (I < 1) || (I > SL296_ckd_0_npt) )
2324  {
2325  SH2OT0[J] = 0.0e0; // at T=296 K
2326  SH2OT1[J] = 0.0e0; // at T=260 K
2327  }
2328  else
2329  {
2330  SH2OT0[J] = SL296_ckd_0[I]; // at T=296 K
2331  SH2OT1[J] = SL260_ckd_0[I]; // at T=260 K
2332  }
2333  }
2334 
2335  // ------------------- subroutine SL296/SL260 ----------------------------
2336 
2337  Numeric SFAC = 1.00e0;
2338  Numeric VS2 = 0.00e0;
2339  // FIXME Numeric VS4 = 0.00e0;
2340 
2341  // Loop pressure/temperature:
2342  for ( Index i = 0 ; i < n_p ; ++i )
2343  {
2344 
2345  // atmospheric state parameters
2346  Numeric Tave = abs_t[i]; // [K]
2347  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
2348  Numeric Patm = Pave/PO; // [1]
2349  Numeric vmrh2o = vmr[i]; // [1]
2350  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
2351  // second vmr in abs_coefCalc multiplied
2352  Numeric Rh2o = Patm * (TO/Tave); // [1]
2353  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
2354  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
2355  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2356  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
2357 
2358  // Molecular cross section calculated by CKD.
2359  // The cross sectionis calculated on the predefined
2360  // CKD wavenumber grid.
2361  Numeric k[NPTC+addF77fields]; // [1/cm]
2362  k[0] = 0.00e0; // not used array field
2363  for (Index J = 1 ; J <= NPTC ; ++J)
2364  {
2365  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2366  Numeric SH2O = 0.0e0;
2367  if (SH2OT0[J] > 0.0e0)
2368  {
2369  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
2370  SFAC = 1.00e0;
2371 
2372  if ( (VJ >= 700.0e0) && (VJ <= 1200.0e0) )
2373  {
2374  int JFAC = (int)((VJ - 700.0e0)/10.0e0 + 0.00001e0);
2375  if ( (JFAC >= 0) && (JFAC <= 50) )
2376  SFAC = XFAC[JFAC];
2377  }
2378 
2379  // ---------------------------------------------------------
2380  // Correction to self continuum (1 SEPT 85); factor of
2381  // 0.78 at 1000 and .......
2382 
2383  VS2 = (VJ-V0S) * (VJ-V0S);
2384 
2385  SFAC = SFAC *
2386  ( 1.000e0 + 0.3000e0 * (1.000e4 / ((VJ*VJ) + 1.000e4)) ) *
2387  ( 1.000e0 - 0.2333e0 * (ALPHA2 / ((VJ-1050.000e0)*(VJ-1050.000e0) + ALPHA2)) ) *
2388  ( 1.000e0 - FACTRS * (ALPHS2 / (VS2+(BETAS*VS2*VS2)+ALPHS2)) );
2389 
2390  SH2O = SFAC * SH2O;
2391  }
2392 
2393  // CKD cross section with radiative field [1/cm]
2394  // the VMRH2O will be multiplied in abs_coefCalc, hence Rh2o does not contain
2395  // VMRH2O as multiplicative term
2396  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT); // [1]
2397 
2398  }
2399 
2400 
2401  // Loop input frequency array. The previously calculated cross section
2402  // has therefore to be interpolated on the input frequencies.
2403  for ( Index s = 0 ; s < n_f ; ++s )
2404  {
2405  // calculate the associated wave number (= 1/wavelength)
2406  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2407  if ( (V >= 0.000e0) && (V < SL296_ckd_0_v2) )
2408  {
2409  // arts cross section [1/m]
2410  // interpolate the k vector on the f_grid grid
2411  // The factor 100 comes from the conversion from 1/cm to 1/m for
2412  // the absorption coefficient
2413  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2414  }
2415  }
2416  }
2417 
2418 }
2419 
2420 
2421 
2422 // =================================================================================
2423 
2425 
2451  const Numeric Cin,
2452  const String& model,
2453  ConstVectorView f_grid,
2454  ConstVectorView abs_p,
2455  ConstVectorView abs_t,
2456  ConstVectorView vmr,
2457  ConstVectorView abs_n2 _U_,
2458  const Verbosity& verbosity)
2459 {
2460  CREATE_OUT3
2461 
2462  // check the model name about consistency
2463  if ((model != "user") && (model != "CKD222"))
2464  {
2465  ostringstream os;
2466  os << "!!ERROR!!\n"
2467  << "CKDv2.2.2 H2O foreign continuum:\n"
2468  << "INPUT model name is: " << model << ".\n"
2469  << "VALID model names are user and CKD222\n";
2470  throw runtime_error(os.str());
2471  }
2472 
2473 
2474  // scaling factor of the foreign H2O cont. absorption
2475  Numeric ScalingFac = 1.0000e0;
2476  if ( model == "user" )
2477  {
2478  ScalingFac = Cin; // input scaling factor of calculated absorption
2479  }
2480 
2481 
2482  const Index n_p = abs_p.nelem(); // Number of pressure levels
2483  const Index n_f = f_grid.nelem(); // Number of frequencies
2484 
2485 
2486  // Check that dimensions of abs_p, abs_t, and vmr agree:
2487  assert ( n_p==abs_t.nelem() );
2488  assert ( n_p==vmr.nelem() );
2489 
2490  // Check that dimensions of pxsec are consistent with n_f
2491  // and n_p. It should be [n_f,n_p]:
2492  assert ( n_f==pxsec.nrows() );
2493  assert ( n_p==pxsec.ncols() );
2494 
2495 
2496  // ************************** CKD stuff ************************************
2497 
2498  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2499  const Numeric T1 = 273.000e0;
2500  const Numeric TO = 296.000e0;
2501  const Numeric PO = 1013.000e0;
2502 
2503  // CKD2.2.2 foreign H2O continuum correction function parameters
2504  const Numeric HWSQF = 330.000e0 * 330.000e0;
2505  const Numeric BETAF = 8.000e-11;
2506  const Numeric V0F = 1130.000e0;
2507  const Numeric FACTRF = 0.970e0;
2508 
2509  const Numeric V0F2 = 1900.000e0;
2510  const Numeric HWSQF2 = 150.000e0 * 150.000e0;
2511  const Numeric BETA2 = 3.000e-6;
2512 
2513  // wavenumber range where CKD H2O foreign continuum is valid
2514  const Numeric VABS_min = FH2O_ckd_0_v1; // [cm^-1]
2515  const Numeric VABS_max = FH2O_ckd_0_v2; // [cm^-1]
2516 
2517 
2518  // It is assumed here that f_grid is monotonically increasing with index!
2519  // In future change this return into a change of the loop over
2520  // the frequency f_grid. n_f_new < n_f
2521  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2522  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2523  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2524  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2525  {
2526  out3 << "WARNING:\n"
2527  << " CKD2.2.2 H2O foreign continuum:\n"
2528  << " input frequency vector exceeds range of model validity\n"
2529  << " " << FH2O_ckd_0_v1 << "<->" << FH2O_ckd_0_v2 << "cm^-1\n";
2530  }
2531 
2532 
2533  // ---------------------- subroutine FRN296 ------------------------------
2534 
2535  // retrieve the appropriate array sequence of the foreign continuum
2536  // arrays of the CKD model.
2537  Numeric DVC = FH2O_ckd_0_dv;
2538  Numeric V1C = V1ABS - DVC;
2539  Numeric V2C = V2ABS + DVC;
2540 
2541  int I1 = (int) ((V1C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
2542  if (V1C < FH2O_ckd_0_v1) I1 = -1;
2543  V1C = FH2O_ckd_0_v1 + (FH2O_ckd_0_dv * (Numeric)I1);
2544 
2545  int I2 = (int) ((V2C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
2546 
2547  int NPTC = I2-I1+3;
2548  if (NPTC > FH2O_ckd_0_npt) NPTC = FH2O_ckd_0_npt+1;
2549 
2550  V2C = V1C + FH2O_ckd_0_dv * (Numeric)(NPTC-1);
2551 
2552  if (NPTC < 1)
2553  {
2554  out3 << "WARNING:\n"
2555  << " CKD2.2.2 H2O foreign continuum:\n"
2556  << " no elements of internal continuum coefficients could be found for the\n"
2557  << " input frequency range.\n"
2558  << " Leave the function without calculating the absorption.";
2559  return;
2560  }
2561 
2562  Numeric FH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2563 
2564  for (Index J = 1 ; J <= NPTC ; ++J)
2565  {
2566  Index I = I1+J;
2567  if ( (I < 1) || (I > FH2O_ckd_0_npt) )
2568  {
2569  FH2OT0[J] = 0.0e0;
2570  }
2571  else
2572  {
2573  FH2OT0[J] = FH2O_ckd_0[I];
2574  }
2575  }
2576 
2577  // ---------------------- subroutine FRN296 ------------------------------
2578 
2579  Numeric VF2 = 0.000e0;
2580  Numeric VF4 = 0.000e0;
2581  Numeric VF6 = 0.000e0;
2582  Numeric FSCAL = 0.000e0;
2583  Numeric FH2O = 0.000e0;
2584 
2585  // Loop pressure/temperature:
2586  for ( Index i = 0 ; i < n_p ; ++i )
2587  {
2588 
2589  // atmospheric state parameters
2590  Numeric Tave = abs_t[i]; // [K]
2591  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
2592  Numeric vmrh2o = vmr[i]; // [1]
2593  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
2594  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
2595  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
2596  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
2597  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2598  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
2599 
2600  // Molecular cross section calculated by CKD.
2601  // The cross sectionis calculated on the predefined
2602  // CKD wavenumber grid.
2603  Numeric k[NPTC+addF77fields]; // [1/cm]
2604  k[0] = 0.00e0; // not used array field
2605  for (Index J = 1 ; J <= NPTC ; ++J)
2606  {
2607  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2608 
2609  // CORRECTION TO FOREIGN CONTINUUM
2610  VF2 = (VJ-V0F) * (VJ-V0F);
2611  VF6 = VF2 * VF2 * VF2;
2612  FSCAL = (1.000e0 - FACTRF*(HWSQF/(VF2+(BETAF*VF6)+HWSQF)));
2613 
2614  VF2 = (VJ-V0F2) * (VJ-V0F2);
2615  VF4 = VF2 * VF2;
2616  FSCAL = FSCAL * (1.000e0 - 0.600e0*(HWSQF2/(VF2 + BETA2*VF4 + HWSQF2)));
2617 
2618  FH2O = FH2OT0[J] * FSCAL;
2619 
2620  // CKD cross section with radiative field [1/cm]
2621  // The VMRH2O will be multiplied in abs_coefCalc, hence WTOT and not W1
2622  // as multiplicative term
2623  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
2624 
2625  }
2626 
2627 
2628  // Loop input frequency array. The previously calculated cross section
2629  // has therefore to be interpolated on the input frequencies.
2630  for ( Index s = 0 ; s < n_f ; ++s )
2631  {
2632  // calculate the associated wave number (= 1/wavelength)
2633  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2634  if ( (V > 0.000e0) && (V < VABS_max) )
2635  {
2636  // arts CKD2.2.2 foreign H2O continuum cross section [1/m]
2637  // interpolate the k vector on the f_grid grid
2638  // The factor 100 comes from the conversion from (1/cm) to (1/m)
2639  // of the abs. coeff.
2640  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2641  }
2642  }
2643  }
2644 
2645 }
2646 
2647 
2648 // =================================================================================
2649 
2651 
2677  const Numeric Cin,
2678  const String& model,
2679  ConstVectorView f_grid,
2680  ConstVectorView abs_p,
2681  ConstVectorView abs_t,
2682  ConstVectorView vmr,
2683  ConstVectorView abs_n2 _U_,
2684  const Verbosity& verbosity)
2685 {
2686  CREATE_OUT3
2687 
2688  // check the model name about consistency
2689  if ((model != "user") && (model != "CKD242"))
2690  {
2691  ostringstream os;
2692  os << "!!ERROR!!\n"
2693  << "CKDv2.4.2 H2O self continuum:\n"
2694  << "INPUT model name is: " << model << ".\n"
2695  << "VALID model names are user and CKD242\n";
2696  throw runtime_error(os.str());
2697  }
2698 
2699 
2700  // scaling factor of the self H2O cont. absorption
2701  Numeric ScalingFac = 1.0000e0;
2702  if ( model == "user" )
2703  {
2704  ScalingFac = Cin; // input scaling factor of calculated absorption
2705  }
2706 
2707 
2708  const Index n_p = abs_p.nelem(); // Number of pressure levels
2709  const Index n_f = f_grid.nelem(); // Number of frequencies
2710 
2711 
2712  // Check that dimensions of abs_p, abs_t, and vmr agree:
2713  assert ( n_p==abs_t.nelem() );
2714  assert ( n_p==vmr.nelem() );
2715 
2716  // Check that dimensions of pxsec are consistent with n_f
2717  // and n_p. It should be [n_f,n_p]:
2718  assert ( n_f==pxsec.nrows() );
2719  assert ( n_p==pxsec.ncols() );
2720 
2721 
2722  // ************************** CKD stuff ************************************
2723 
2724  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2725  // FIXME const Numeric T1 = 273.0e0;
2726  const Numeric TO = 296.0e0;
2727  const Numeric PO = 1013.0e0;
2728 
2729  // CKD2.4.2 specific correction functions
2730  const Numeric V0S1 = 0.000e+00;
2731  const Numeric HWSQ1 = (1.000e+02 * 1.000e+02);
2732  const Numeric BETAS1 = 1.000e-04;
2733  const Numeric FACTRS1 = 0.688e+00;
2734 
2735  const Numeric V0S2 = 1.050e+03;
2736  const Numeric HWSQ2 = (2.000e+02 * 2.000e+02);
2737  const Numeric FACTRS2 = -0.2333e+00;
2738 
2739  const Numeric V0S3 = 1.310e+03;
2740  const Numeric HWSQ3 = (1.200e+02 * 1.200e+02);
2741  const Numeric BETAS3 = 5.000e-06;
2742  const Numeric FACTRS3 = -0.150e+00;
2743 
2744  const Numeric XFAC[51] = {
2745  1.00000,1.01792,1.03767,1.05749,1.07730,1.09708,
2746  1.10489,1.11268,1.12047,1.12822,1.13597,1.14367,
2747  1.15135,1.15904,1.16669,1.17431,1.18786,1.20134,
2748  1.21479,1.22821,1.24158,1.26580,1.28991,1.28295,
2749  1.27600,1.26896,1.25550,1.24213,1.22879,1.21560,
2750  1.20230,1.18162,1.16112,1.14063,1.12016,1.10195,
2751  1.09207,1.08622,1.08105,1.07765,1.07398,1.06620,
2752  1.05791,1.04905,1.03976,1.02981,1.00985,1.00000,
2753  1.00000,1.00000,1.00000};
2754 
2755  // wavenumber range where CKD H2O self continuum is valid
2756  const Numeric VABS_min = SL260_ckd_0_v1; // [cm^-1]
2757  const Numeric VABS_max = SL260_ckd_0_v2; // [cm^-1]
2758 
2759 
2760  // It is assumed here that f_grid is monotonically increasing with index!
2761  // In future change this return into a change of the loop over
2762  // the frequency f_grid. n_f_new < n_f
2763  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2764  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2765  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2766  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2767  {
2768  out3 << "WARNING:\n"
2769  << " CKD2.4.2 H2O self continuum:\n"
2770  << " input frequency vector exceeds range of model validity\n"
2771  << " " << SL296_ckd_0_v1 << "<->" << SL296_ckd_0_v2 << "cm^-1\n";
2772  }
2773 
2774 
2775  // ------------------- subroutine SL296/SL260 ----------------------------
2776 
2778  {
2779  ostringstream os;
2780  os << "!!ERROR!!\n"
2781  << "CKD2.4.2 H2O self continuum:\n"
2782  << "parameter V1 not the same for different ref. temperatures.\n";
2783  throw runtime_error(os.str());
2784  }
2786  {
2787  ostringstream os;
2788  os << "!!ERROR!!\n"
2789  << "CKD2.4.2 H2O self continuum:\n"
2790  << "parameter V2 not the same for different ref. temperatures.\n";
2791  throw runtime_error(os.str());
2792  }
2794  {
2795  ostringstream os;
2796  os << "!!ERROR!!\n"
2797  << "CKD2.4.2 H2O self continuum:\n"
2798  << "parameter DV not the same for different ref. temperatures.\n";
2799  throw runtime_error(os.str());
2800  }
2802  {
2803  ostringstream os;
2804  os << "!!ERROR!!\n"
2805  << "CKD2.4.2 H2O self continuum:\n"
2806  << "parameter NPT not the same for different ref. temperatures.\n";
2807  throw runtime_error(os.str());
2808  }
2809 
2810  // retrieve the appropriate array sequence of the self continuum
2811  // arrays of the CKD model.
2812  Numeric DVC = SL296_ckd_0_dv;
2813  Numeric V1C = V1ABS - DVC;
2814  Numeric V2C = V2ABS + DVC;
2815 
2816  int I1 = (int) ((V1C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2817  if (V1C < SL296_ckd_0_v1) I1 = -1;
2818  V1C = SL296_ckd_0_v1 + (SL296_ckd_0_dv * (Numeric)I1);
2819 
2820  int I2 = (int) ((V2C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2821 
2822  int NPTC = I2-I1+3;
2823  if (NPTC > SL296_ckd_0_npt) NPTC = SL296_ckd_0_npt+1;
2824 
2825  V2C = V1C + SL296_ckd_0_dv * (Numeric)(NPTC-1);
2826 
2827  if (NPTC < 1)
2828  {
2829  ostringstream os;
2830  out3 << "WARNING:\n"
2831  << " CKDv2.4.2 H2O self continuum:\n"
2832  << " no elements of internal continuum coefficients could be found for the\n"
2833  << " input frequency range.\n"
2834  << " Leave the function without calculating the absorption.";
2835  return;
2836  }
2837 
2838  Numeric SH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2839  Numeric SH2OT1[NPTC+addF77fields]; // [cm^3/molecules]
2840 
2841  for (Index J = 1 ; J <= NPTC ; ++J)
2842  {
2843  Index I = I1+J;
2844  if ( (I < 1) || (I > SL296_ckd_0_npt) )
2845  {
2846  SH2OT0[J] = 0.0e0; // at T=296 K
2847  SH2OT1[J] = 0.0e0; // at T=260 K
2848  }
2849  else
2850  {
2851  SH2OT0[J] = SL296_ckd_0[I]; // at T=296 K
2852  SH2OT1[J] = SL260_ckd_0[I]; // at T=260 K
2853  }
2854  }
2855 
2856  // ------------------- subroutine SL296/SL260 ----------------------------
2857 
2858  Numeric SFAC = 1.00e0;
2859  Numeric VS2 = 0.00e0;
2860  Numeric VS4 = 0.00e0;
2861 
2862  // Loop pressure/temperature:
2863  for ( Index i = 0 ; i < n_p ; ++i )
2864  {
2865 
2866  // atmospheric state parameters
2867  Numeric Tave = abs_t[i]; // [K]
2868  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
2869  Numeric Patm = Pave/PO; // [1]
2870  Numeric vmrh2o = vmr[i]; // [1]
2871  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
2872  // second vmr in abs_coefCalc multiplied
2873  Numeric Rh2o = Patm * (TO/Tave); // [1]
2874  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
2875  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
2876  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2877  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
2878 
2879  // Molecular cross section calculated by CKD.
2880  // The cross sectionis calculated on the predefined
2881  // CKD wavenumber grid.
2882  Numeric k[NPTC+addF77fields]; // [1/cm]
2883  k[0] = 0.00e0; // not used array field
2884  for (Index J = 1 ; J <= NPTC ; ++J)
2885  {
2886  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2887  Numeric SH2O = 0.0e0;
2888  if (SH2OT0[J] > 0.0e0)
2889  {
2890  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
2891  SFAC = 1.00e0;
2892 
2893  if ( (VJ >= 700.0e0) && (VJ <= 1200.0e0) )
2894  {
2895  int JFAC = (int)((VJ - 700.0e0)/10.0e0 + 0.00001e0);
2896  if ( (JFAC >= 0) && (JFAC <= 50) )
2897  SFAC = XFAC[JFAC];
2898  }
2899 
2900  // ---------------------------------------------------------
2901  // Correction to self continuum (1 SEPT 85); factor of
2902  // 0.78 at 1000 and .......
2903 
2904  VS2 = (VJ-V0S1) * (VJ-V0S1);
2905  VS4 = VS2*VS2;
2906  SFAC = SFAC *
2907  (1.000e0 + FACTRS1*(HWSQ1/((VJ*VJ)+(BETAS1*VS4)+HWSQ1)));
2908 
2909  VS2 = (VJ-V0S2) * (VJ-V0S2);
2910  SFAC = SFAC *
2911  (1.000e0 + FACTRS2*(HWSQ2/(VS2+HWSQ2)));
2912 
2913  VS2 = (VJ-V0S3) * (VJ-V0S3);
2914  VS4 = VS2*VS2;
2915  SFAC = SFAC *
2916  (1.000e0 + FACTRS3*(HWSQ3/(VS2+(BETAS3*VS4)+HWSQ3)));
2917 
2918  SH2O = SFAC * SH2O;
2919  }
2920 
2921  // CKD cross section with radiative field [1/cm]
2922  // The VMRH2O will be multiplied in abs_coefCalc, hence Rh2o does not contain
2923  // VMRH2O as multiplicative term
2924  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
2925 
2926  }
2927 
2928 
2929  // Loop input frequency array. The previously calculated cross section
2930  // has therefore to be interpolated on the input frequencies.
2931  for ( Index s = 0 ; s < n_f ; ++s )
2932  {
2933  // calculate the associated wave number (= 1/wavelength)
2934  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2935  if ( (V >= 0.000e0) && (V < SL296_ckd_0_v2) )
2936  {
2937  // arts cross section [1/m]
2938  // interpolate the k vector on the f_grid grid
2939  // The factor 100 comes from the conversion from 1/cm to 1/m for
2940  // the absorption coefficient
2941  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2942  }
2943  }
2944  }
2945 
2946 }
2947 
2948 
2949 // =================================================================================
2950 
2952 
2978  const Numeric Cin,
2979  const String& model,
2980  ConstVectorView f_grid,
2981  ConstVectorView abs_p,
2982  ConstVectorView abs_t,
2983  ConstVectorView vmr,
2984  ConstVectorView abs_n2 _U_,
2985  const Verbosity& verbosity)
2986 {
2987  CREATE_OUT3
2988 
2989  // check the model name about consistency
2990  if ((model != "user") && (model != "CKD242"))
2991  {
2992  ostringstream os;
2993  os << "!!ERROR!!\n"
2994  << "CKDv2.4.2 H2O foreign continuum:\n"
2995  << "INPUT model name is: " << model << ".\n"
2996  << "VALID model names are user and CKD242\n";
2997  throw runtime_error(os.str());
2998  }
2999 
3000 
3001  // scaling factor of the foreign H2O cont. absorption
3002  Numeric ScalingFac = 1.0000e0;
3003  if ( model == "user" )
3004  {
3005  ScalingFac = Cin; // input scaling factor of calculated absorption
3006  }
3007 
3008 
3009  const Index n_p = abs_p.nelem(); // Number of pressure levels
3010  const Index n_f = f_grid.nelem(); // Number of frequencies
3011 
3012  // Check that dimensions of abs_p, abs_t, and vmr agree:
3013  assert ( n_p==abs_t.nelem() );
3014  assert ( n_p==vmr.nelem() );
3015 
3016  // Check that dimensions of pxsec are consistent with n_f
3017  // and n_p. It should be [n_f,n_p]:
3018  assert ( n_f==pxsec.nrows() );
3019  assert ( n_p==pxsec.ncols() );
3020 
3021 
3022  // ************************** CKD stuff ************************************
3023 
3024  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
3025  const Numeric T1 = 273.0e0;
3026  const Numeric TO = 296.0e0;
3027  const Numeric PO = 1013.0e0;
3028 
3029  // CKD2.4.2 foreign H2O continuum correction function parameters
3030  const Numeric V0F1 = 350.000e0;
3031  const Numeric HWSQF1 = 200.000e0 * 200.000e0;
3032  const Numeric BETAF1 = 5.000e-9 ;
3033  const Numeric FACTRF1 = -0.700e0;
3034 
3035  const Numeric V0F1a = 630.000e0;
3036  const Numeric HWSQF1a = 65.000e0*65.000e0;
3037  const Numeric BETAF1a = 2.000e-08 ;
3038  const Numeric FACTRF1a = 0.750e0;
3039 
3040  const Numeric V0F2 = 1130.000e0;
3041  const Numeric HWSQF2 = 330.000e0 * 330.000e0;
3042  const Numeric BETAF2 = 8.000e-11;
3043  const Numeric FACTRF2 = -0.970e0;
3044 
3045  const Numeric V0F3 = 1975.000e0;
3046  const Numeric HWSQF3 = 250.000e0 * 250.000e0;
3047  const Numeric BETAF3 = 5.000e-06;
3048  const Numeric FACTRF3 = -0.650e0;
3049 
3050  // wavenumber range where CKD H2O foreign continuum is valid
3051  const Numeric VABS_min = FH2O_ckd_0_v1; // [cm^-1]
3052  const Numeric VABS_max = FH2O_ckd_0_v2; // [cm^-1]
3053 
3054 
3055  // It is assumed here that f_grid is monotonically increasing with index!
3056  // In future change this return into a change of the loop over
3057  // the frequency f_grid. n_f_new < n_f
3058  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3059  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3060  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3061  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3062  {
3063  out3 << "WARNING:\n"
3064  << " CKDv2.4.2 H2O foreign continuum:\n"
3065  << " input frequency vector exceeds range of model validity\n"
3066  << " " << FH2O_ckd_0_v1 << "<->" << FH2O_ckd_0_v2 << "cm^-1\n";
3067  }
3068 
3069 
3070  // ---------------------- subroutine FRN296 ------------------------------
3071 
3072  // retrieve the appropriate array sequence of the foreign continuum
3073  // arrays of the CKD model.
3074  Numeric DVC = FH2O_ckd_0_dv;
3075  Numeric V1C = V1ABS - DVC;
3076  Numeric V2C = V2ABS + DVC;
3077 
3078  int I1 = (int) ((V1C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
3079  if (V1C < FH2O_ckd_0_v1) I1 = -1;
3080  V1C = FH2O_ckd_0_v1 + (FH2O_ckd_0_dv * (Numeric)I1);
3081 
3082  int I2 = (int) ((V2C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
3083 
3084  int NPTC = I2-I1+3;
3085  if (NPTC > FH2O_ckd_0_npt) NPTC = FH2O_ckd_0_npt+1;
3086 
3087  V2C = V1C + FH2O_ckd_0_dv * (Numeric)(NPTC-1);
3088 
3089  if (NPTC < 1)
3090  {
3091  out3 << "WARNING:\n"
3092  << " CKDv2.4.2 H2O foreign continuum:\n"
3093  << " no elements of internal continuum coefficients could be found for the\n"
3094  << " input frequency range.\n"
3095  << " Leave the function without calculating the absorption.";
3096  return;
3097  }
3098 
3099  Numeric FH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
3100 
3101  for (Index J = 1 ; J <= NPTC ; ++J)
3102  {
3103  Index I = I1+J;
3104  if ( (I < 1) || (I > FH2O_ckd_0_npt) )
3105  {
3106  FH2OT0[J] = 0.0e0;
3107  }
3108  else
3109  {
3110  FH2OT0[J] = FH2O_ckd_0[I];
3111  }
3112  }
3113 
3114  // ---------------------- subroutine FRN296 ------------------------------
3115 
3116  Numeric VF2 = 0.000e0;
3117  Numeric VF4 = 0.000e0;
3118  Numeric VF6 = 0.000e0;
3119  Numeric FSCAL = 0.000e0;
3120  Numeric FH2O = 0.000e0;
3121 
3122  // Loop pressure/temperature:
3123  for ( Index i = 0 ; i < n_p ; ++i )
3124  {
3125 
3126  // atmospheric state parameters
3127  Numeric Tave = abs_t[i]; // [K]
3128  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
3129  Numeric vmrh2o = vmr[i]; // [1]
3130  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
3131  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
3132  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
3133  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3134  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3135  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3136 
3137  // Molecular cross section calculated by CKD.
3138  // The cross sectionis calculated on the predefined
3139  // CKD wavenumber grid.
3140  Numeric k[NPTC+addF77fields]; // [1/cm]
3141  k[0] = 0.00e0; // not used array field
3142  for (Index J = 1 ; J <= NPTC ; ++J)
3143  {
3144  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3145 
3146  // CORRECTION TO FOREIGN CONTINUUM
3147  VF2 = (VJ-V0F1) * (VJ-V0F1);
3148  VF6 = VF2 * VF2 * VF2;
3149  FSCAL = (1.000e0 + FACTRF1*(HWSQF1/(VF2+(BETAF1*VF6)+HWSQF1)));
3150 
3151  VF2 = (VJ-V0F1a) * (VJ-V0F1a);
3152  VF6 = VF2 * VF2 * VF2;
3153  FSCAL = FSCAL *
3154  (1.000e0 + FACTRF1a*(HWSQF1a/(VF2+(BETAF1a*VF6)+HWSQF1a)));
3155 
3156  VF2 = (VJ-V0F2) * (VJ-V0F2);
3157  VF6 = VF2 * VF2 * VF2;
3158  FSCAL = FSCAL *
3159  (1.000e0 + FACTRF2*(HWSQF2/(VF2+(BETAF2*VF6)+HWSQF2)));
3160 
3161  VF2 = (VJ-V0F3) * (VJ-V0F3);
3162  VF4 = VF2 * VF2;
3163  FSCAL = FSCAL *
3164  (1.000e0 + FACTRF3*(HWSQF3/(VF2+BETAF3*VF4+HWSQF3)));
3165 
3166  FH2O = FH2OT0[J] * FSCAL;
3167 
3168  // CKD cross section without radiative field
3169  // The VMRH2O will be multiplied in abs_coefCalc, hence WTOT and not W1
3170  // as multiplicative term
3171  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3172 
3173  }
3174 
3175 
3176  // Loop input frequency array. The previously calculated cross section
3177  // has therefore to be interpolated on the input frequencies.
3178  for ( Index s = 0 ; s < n_f ; ++s )
3179  {
3180  // calculate the associated wave number (= 1/wavelength)
3181  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3182  if ( (V >= 0.000e0) && (V < VABS_max) )
3183  {
3184  // arts CKD2.4.2 foreign H2O continuum cross section [1/m]
3185  // interpolate the k vector on the f_grid grid
3186  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3187  }
3188  }
3189  }
3190 
3191 }
3192 
3193 
3194 // =================================================================================
3195 
3197 
3223  const Numeric Cin,
3224  const String& model,
3225  ConstVectorView f_grid,
3226  ConstVectorView abs_p,
3227  ConstVectorView abs_t,
3228  ConstVectorView vmr,
3229  ConstVectorView abs_n2 _U_,
3230  const Verbosity& verbosity)
3231 {
3232  CREATE_OUT3
3233 
3234  // check the model name about consistency
3235  if ((model != "user") && (model != "CKDMT100"))
3236  {
3237  ostringstream os;
3238  os << "!!ERROR!!\n"
3239  << "CKD_MT1.00 H2O self continuum:\n"
3240  << "INPUT model name is: " << model << ".\n"
3241  << "VALID model names are user and CKDMT100\n";
3242  throw runtime_error(os.str());
3243  }
3244 
3245 
3246  // scaling factor of the self H2O cont. absorption
3247  Numeric ScalingFac = 1.0000e0;
3248  if ( model == "user" )
3249  {
3250  ScalingFac = Cin; // input scaling factor of calculated absorption
3251  }
3252 
3253 
3254  const Index n_p = abs_p.nelem(); // Number of pressure levels
3255  const Index n_f = f_grid.nelem(); // Number of frequencies
3256 
3257 
3258  // Check that dimensions of abs_p, abs_t, and vmr agree:
3259  assert ( n_p==abs_t.nelem() );
3260  assert ( n_p==vmr.nelem() );
3261 
3262  // Check that dimensions of pxsec are consistent with n_f
3263  // and n_p. It should be [n_f,n_p]:
3264  assert ( n_f==pxsec.nrows() );
3265  assert ( n_p==pxsec.ncols() );
3266 
3267 
3268  // ************************** CKD stuff ************************************
3269 
3270  const Numeric xLosmt = 2.68675e19; // [molecules/cm^3]
3271  // FIXME const Numeric T1 = 273.000e0; // [K]
3272  const Numeric TO = 296.000e0; // [K]
3273  const Numeric PO = 1013.000e0; // [hPa]
3274 
3275  const Numeric XFACREV[15] =
3276  {1.003, 1.009, 1.015, 1.023, 1.029,1.033,
3277  1.037, 1.039, 1.040, 1.046, 1.036,1.027,
3278  1.01, 1.002, 1.00};
3279 
3280  // wavenumber range where CKD H2O self continuum is valid
3281  const Numeric VABS_min = -2.000e1; // [cm^-1]
3282  const Numeric VABS_max = 2.000e4; // [cm^-1]
3283 
3284 
3285  // It is assumed here that f_grid is monotonically increasing with index!
3286  // In future change this return into a change of the loop over
3287  // the frequency f_grid. n_f_new < n_f
3288  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3289  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3290  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3291  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3292  {
3293  out3 << "WARNING:\n"
3294  << " CKD_MT 1.00 H2O self continuum:\n"
3295  << " input frequency vector exceeds range of model validity\n"
3296  << " " << SL296_ckd_mt_100_v1 << "<->" << SL296_ckd_mt_100_v2 << "cm^-1\n";
3297  }
3298 
3299 
3300  // ------------------- subroutine SL296/SL260 ----------------------------
3301 
3303  {
3304  ostringstream os;
3305  os << "!!ERROR!!\n"
3306  << "CKD_MT 1.00 H2O self continuum:\n"
3307  << "parameter V1 not the same for different ref. temperatures.\n";
3308  throw runtime_error(os.str());
3309  }
3311  {
3312  ostringstream os;
3313  os << "!!ERROR!!\n"
3314  << "CKD_MT 1.00 H2O self continuum:\n"
3315  << "parameter V2 not the same for different ref. temperatures.\n";
3316  throw runtime_error(os.str());
3317  }
3319  {
3320  ostringstream os;
3321  os << "!!ERROR!!\n"
3322  << "CKD_MT 1.00 H2O self continuum:\n"
3323  << "parameter DV not the same for different ref. temperatures.\n";
3324  throw runtime_error(os.str());
3325  }
3327  {
3328  ostringstream os;
3329  os << "!!ERROR!!\n"
3330  << "CKD_MT 1.00 H2O self continuum:\n"
3331  << "parameter NPT not the same for different ref. temperatures.\n";
3332  throw runtime_error(os.str());
3333  }
3334 
3335  // retrieve the appropriate array sequence of the self continuum
3336  // arrays of the CKD model.
3338  Numeric V1C = V1ABS - DVC;
3339  Numeric V2C = V2ABS + DVC;
3340 
3341  int I1 = (int) ((V1C-SL296_ckd_mt_100_v1) / SL296_ckd_mt_100_dv);
3342  if (V1C < SL296_ckd_mt_100_v1) I1 = -1;
3344 
3345  int I2 = (int) ((V2C-SL296_ckd_mt_100_v1) / SL296_ckd_mt_100_dv);
3346 
3347  int NPTC = I2-I1+3;
3348  if (NPTC > SL296_ckd_mt_100_npt) NPTC = SL296_ckd_mt_100_npt+1;
3349 
3350  V2C = V1C + SL296_ckd_mt_100_dv * (Numeric)(NPTC-1);
3351 
3352  if (NPTC < 1)
3353  {
3354  ostringstream os;
3355  out3 << "WARNING:\n"
3356  << " CKD_MT 1.00 H2O self continuum:\n"
3357  << " no elements of internal continuum coefficients could be found for the\n"
3358  << " input frequency range.\n"
3359  << " Leave the function without calculating the absorption.";
3360  return;
3361  }
3362 
3363  Vector SH2OT0(NPTC+addF77fields, 0.); // [cm^3/molecules]
3364  Vector SH2OT1(NPTC+addF77fields, 0.); // [cm^3/molecules]
3365 
3366  for (Index J = 1 ; J <= NPTC ; ++J)
3367  {
3368  Index I = I1+J;
3369  if ( (I > 0) && (I <= SL296_ckd_mt_100_npt) )
3370  {
3371  SH2OT0[J] = SL296_ckd_mt_100[I]; // at T=296 K
3372  SH2OT1[J] = SL260_ckd_mt_100[I]; // at T=260 K
3373  }
3374  }
3375 
3376  // ------------------- subroutine SL296/SL260 ----------------------------
3377 
3378  Numeric SFAC = 1.00e0;
3379 
3380  // Loop pressure/temperature:
3381  for ( Index i = 0 ; i < n_p ; ++i )
3382  {
3383 
3384  // atmospheric state parameters
3385  Numeric Tave = abs_t[i]; // [K]
3386  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
3387  Numeric Patm = Pave/PO; // [1]
3388  Numeric vmrh2o = vmr[i]; // [1]
3389  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
3390  // second vmr in abs_coefCalc multiplied
3391  Numeric Rh2o = Patm * (TO/Tave); // [1]
3392  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
3393  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
3394  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3395  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
3396 
3397  // Molecular cross section calculated by CKD.
3398  // The cross sectionis calculated on the predefined
3399  // CKD wavenumber grid.
3400  Vector k(NPTC+addF77fields, 0.); // [1/cm]
3401  for (Index J = 1 ; J <= NPTC ; ++J)
3402  {
3403  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3404  Numeric SH2O = 0.0e0;
3405  if (SH2OT0[J] > 0.0e0)
3406  {
3407  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
3408  SFAC = 1.00e0;
3409 
3410  if ( (VJ >= 820.0e0) && (VJ <= 960.0e0) )
3411  {
3412  int JFAC = (int)((VJ - 820.0e0)/10.0e0 + 0.00001e0);
3413  if ( (JFAC >= 0) && (JFAC <=14) )
3414  SFAC = XFACREV[JFAC];
3415  }
3416 
3417  SH2O = SFAC * SH2O;
3418  }
3419 
3420  // CKD cross section with radiative field [1/cm]
3421  // The VMRH2O will be multiplied in abs_coefCalc, hence Rh2o does not contain
3422  // VMRH2O as multiplicative term
3423  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3424 
3425  }
3426 
3427 
3428  // Loop input frequency array. The previously calculated cross section
3429  // has therefore to be interpolated on the input frequencies.
3430  for ( Index s = 0 ; s < n_f ; ++s )
3431  {
3432  // calculate the associated wave number (= 1/wavelength)
3433  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3434  if ( (V > 0.000e0) && (V < SL296_ckd_mt_100_v2) )
3435  {
3436  // arts cross section [1/m]
3437  // interpolate the k vector on the f_grid grid
3438  // The factor 100 comes from the conversion from 1/cm to 1/m for
3439  // the absorption coefficient
3440  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3441  }
3442  }
3443  }
3444 
3445 }
3446 
3447 // =================================================================================
3448 
3450 
3476  const Numeric Cin,
3477  const String& model,
3478  ConstVectorView f_grid,
3479  ConstVectorView abs_p,
3480  ConstVectorView abs_t,
3481  ConstVectorView vmr,
3482  ConstVectorView abs_n2 _U_,
3483  const Verbosity& verbosity)
3484 {
3485  CREATE_OUT3
3486 
3487  // check the model name about consistency
3488  if ((model != "user") && (model != "CKDMT100"))
3489  {
3490  ostringstream os;
3491  os << "!!ERROR!!\n"
3492  << "CKD_MT1.00 H2O foreign continuum:\n"
3493  << "INPUT model name is: " << model << ".\n"
3494  << "VALID model names are user and CKDMT100\n";
3495  throw runtime_error(os.str());
3496  }
3497 
3498 
3499  // scaling factor of the foreign H2O cont. absorption
3500  Numeric ScalingFac = 1.0000e0;
3501  if ( model == "user" )
3502  {
3503  ScalingFac = Cin; // input scaling factor of calculated absorption
3504  }
3505 
3506 
3507  const Index n_p = abs_p.nelem(); // Number of pressure levels
3508  const Index n_f = f_grid.nelem(); // Number of frequencies
3509 
3510 
3511  // Check that dimensions of abs_p, abs_t, and vmr agree:
3512  assert ( n_p==abs_t.nelem() );
3513  assert ( n_p==vmr.nelem() );
3514 
3515  // Check that dimensions of pxsec are consistent with n_f
3516  // and n_p. It should be [n_f,n_p]:
3517  assert ( n_f==pxsec.nrows() );
3518  assert ( n_p==pxsec.ncols() );
3519 
3520 
3521  // ************************** CKD stuff ************************************
3522 
3523  const Numeric xLosmt = 2.68675e19; // [molecules/cm^3]
3524  const Numeric T1 = 273.000e0;
3525  const Numeric TO = 296.000e0;
3526  const Numeric PO = 1013.000e0;
3527 
3528  // wavenumber range where CKD H2O self continuum is valid
3529  const Numeric VABS_min = -2.000e1; // [cm^-1]
3530  const Numeric VABS_max = 2.000e4; // [cm^-1]
3531 
3532 
3533  // It is assumed here that f_grid is monotonically increasing with index!
3534  // In future change this return into a change of the loop over
3535  // the frequency f_grid. n_f_new < n_f
3536  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3537  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3538  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3539  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3540  {
3541  out3 << "WARNING:\n"
3542  << " CKD_MT 1.00 H2O foreign continuum:\n"
3543  << " input frequency vector exceeds range of model validity\n"
3544  << " " << FH2O_ckd_mt_100_v1 << "<->" << FH2O_ckd_mt_100_v2 << "cm^-1\n";
3545  }
3546 
3547 
3548  // ---------------------- subroutine FRN296 ------------------------------
3549 
3550  // retrieve the appropriate array sequence of the foreign continuum
3551  // arrays of the CKD model.
3553  Numeric V1C = V1ABS - DVC;
3554  Numeric V2C = V2ABS + DVC;
3555 
3556  int I1 = (int) ((V1C-FH2O_ckd_mt_100_v1) / FH2O_ckd_mt_100_dv);
3557  if (V1C < FH2O_ckd_mt_100_v1) I1 = -1;
3559 
3560  int I2 = (int) ((V2C-FH2O_ckd_mt_100_v1) / FH2O_ckd_mt_100_dv);
3561 
3562  int NPTC = I2-I1+3;
3563  if (NPTC > FH2O_ckd_mt_100_npt) NPTC = FH2O_ckd_mt_100_npt+1;
3564 
3565  V2C = V1C + FH2O_ckd_mt_100_dv * (Numeric)(NPTC-1);
3566 
3567  if (NPTC < 1)
3568  {
3569  out3 << "WARNING:\n"
3570  << " CKD_MT 1.00 H2O foreign continuum:\n"
3571  << " no elements of internal continuum coefficients could be found for the\n"
3572  << " input frequency range.\n"
3573  << " Leave the function without calculating the absorption.";
3574  return;
3575  }
3576 
3577  Vector FH2OT0(NPTC+addF77fields, 0.); // [cm^3/molecules]
3578 
3579  for (Index J = 1 ; J <= NPTC ; ++J)
3580  {
3581  Index I = I1+J;
3582  if ( (I > 0) && (I <= FH2O_ckd_mt_100_npt) )
3583  {
3584  FH2OT0[J] = FH2O_ckd_mt_100[I];
3585  }
3586  }
3587 
3588  // ---------------------- subroutine FRN296 ------------------------------
3589 
3590 
3591 
3592 
3593  // Loop pressure/temperature:
3594  for ( Index i = 0 ; i < n_p ; ++i )
3595  {
3596  // atmospheric state parameters
3597  Numeric Tave = abs_t[i]; // [K]
3598  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
3599  Numeric vmrh2o = vmr[i]; // [1]
3600  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
3601  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
3602  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
3603  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3604  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3605  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3606 
3607  // Molecular cross section calculated by CKD.
3608  // The cross sectionis calculated on the predefined
3609  // CKD wavenumber grid.
3610  Vector k(NPTC+addF77fields, 0.); // [1/cm]
3611  for (Index J = 1 ; J <= NPTC ; ++J)
3612  {
3613  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3614  Numeric FH2O = FH2OT0[J];
3615 
3616  // CKD cross section with radiative field [1/cm]
3617  // The VMRH2O will be multiplied in abs_coefCalc, hence WTOT and not W1
3618  // as multiplicative term
3619  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3620 
3621  }
3622 
3623  // Loop input frequency array. The previously calculated cross section
3624  // has therefore to be interpolated on the input frequencies.
3625  for ( Index s = 0 ; s < n_f ; ++s )
3626  {
3627  // calculate the associated wave number (= 1/wavelength)
3628  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3629  if ( (V >= 0.000e0) && (V < VABS_max) )
3630  {
3631  // arts CKD_MT.100 cross section [1/m]
3632  // interpolate the k vector on the f_grid grid
3633  // The factor 100 comes from the conversion from (1/cm) to (1/m)
3634  // of the abs. coeff.
3635  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3636  }
3637  }
3638  }
3639 
3640 }
3641 
3642 //
3643 
3644 // =================================================================================
3645 
3647 
3672  const Numeric Cin,
3673  const String& model,
3674  ConstVectorView f_grid,
3675  ConstVectorView abs_p,
3676  ConstVectorView abs_t _U_,
3677  ConstVectorView vmr _U_,
3678  const Verbosity& verbosity)
3679 {
3680  CREATE_OUT3
3681 
3682  // check the model name about consistency
3683  if ((model != "user") && (model != "CKD241"))
3684  {
3685  ostringstream os;
3686  os << "!!ERROR!!\n"
3687  << "CKDv2.4.1 CO2 continuum:\n"
3688  << "INPUT model name is: " << model << ".\n"
3689  << "VALID model names are user and CKD241\n";
3690  throw runtime_error(os.str());
3691  }
3692 
3693 
3694  // scaling factor of the CO2 absorption
3695  Numeric ScalingFac = 0.0000e0;
3696  if ( model == "user" )
3697  {
3698  ScalingFac = Cin; // input scaling factor of calculated absorption
3699  }
3700  else
3701  {
3702  ScalingFac = 1.0000e0;
3703  }
3704 
3705  const Index n_p = abs_p.nelem(); // Number of pressure levels
3706  const Index n_f = f_grid.nelem(); // Number of frequencies
3707 
3708 
3709  // Check that dimensions of abs_p, abs_t, and vmr agree:
3710  assert ( n_p==abs_t.nelem() );
3711  assert ( n_p==vmr.nelem() );
3712 
3713  // Check that dimensions of pxsec are consistent with n_f
3714  // and n_p. It should be [n_f,n_p]:
3715  assert ( n_f==pxsec.nrows() );
3716  assert ( n_p==pxsec.ncols() );
3717 
3718 
3719  // ************************** CKD stuff ************************************
3720 
3721  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
3722  const Numeric T1 = 273.0e0;
3723  const Numeric TO = 296.0e0;
3724  const Numeric PO = 1013.0e0;
3725 
3726  // wavenumber range where CKD CO2 continuum is valid
3727  const Numeric VABS_min = -2.000e1; // [cm^-1]
3728  const Numeric VABS_max = 1.000e4; // [cm^-1]
3729 
3730 
3731  // It is assumed here that f_grid is monotonically increasing with index!
3732  // In future change this return into a change of the loop over
3733  // the frequency f_grid. n_f_new < n_f
3734  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3735  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3736  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3737  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3738  {
3739  out3 << "WARNING:\n"
3740  << " CKDv2.4.1 CO2 continuum:\n"
3741  << " input frequency vector exceeds range of model validity\n"
3742  << " " << FCO2_ckd_mt_100_v1 << "<->" << FCO2_ckd_mt_100_v2 << "cm^-1\n";
3743  }
3744 
3745 
3746  // ---------------------- subroutine FRNCO2 ------------------------------
3747 
3748  // retrieve the appropriate array sequence of the CO2 continuum
3749  // arrays of the CKD model.
3751  Numeric V1C = V1ABS - DVC;
3752  Numeric V2C = V2ABS + DVC;
3753 
3754  int I1 = (int) ((V1C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3755  if (V1C < FCO2_ckd_mt_100_v1) I1 = -1;
3757 
3758  int I2 = (int) ((V2C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3759 
3760  int NPTC = I2-I1+3;
3761  if (NPTC > FCO2_ckd_mt_100_npt) NPTC = FCO2_ckd_mt_100_npt+1;
3762 
3763  V2C = V1C + FCO2_ckd_mt_100_dv * (Numeric)(NPTC-1);
3764 
3765  if (NPTC < 1)
3766  {
3767  out3 << "WARNING:\n"
3768  << " CKDv2.4.1 CO2 continuum:\n"
3769  << " no elements of internal continuum coefficients could be found for the\n"
3770  << " input frequency range.\n"
3771  << " Leave the function without calculating the absorption.";
3772  return;
3773  }
3774 
3775  Numeric FCO2T0[NPTC+addF77fields]; // [cm^3/molecules]
3776 
3777  for (Index J = 1 ; J <= NPTC ; ++J)
3778  {
3779  Index I = I1+J;
3780  if ( (I < 1) || (I > FCO2_ckd_mt_100_npt) )
3781  {
3782  FCO2T0[J] = 0.0e0;
3783  }
3784  else
3785  {
3786  FCO2T0[J] = FCO2_ckd_mt_100[I];
3787  }
3788  }
3789 
3790  // ---------------------- subroutine FRNCO2 ------------------------------
3791 
3792 
3793 
3794 
3795  // Loop pressure/temperature:
3796  for ( Index i = 0 ; i < n_p ; ++i )
3797  {
3798  Numeric Tave = abs_t[i]; // [K]
3799  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
3800  // FIXME Numeric vmrco2 = vmr[i]; // [1]
3801  Numeric Rhoave = (Pave/PO) * (TO/Tave); // [hPa]
3802  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3803  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3804 
3805 
3806  // Molecular cross section calculated by CKD.
3807  // The cross sectionis calculated on the predefined
3808  // CKD wavenumber grid.
3809  Numeric k[NPTC+addF77fields]; // [1/cm]
3810  k[0] = 0.00e0; // not used array field
3811  for (Index J = 1 ; J <= NPTC ; ++J)
3812  {
3813  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3814  Numeric FCO2 = FCO2T0[J];
3815 
3816  // CKD cross section times number density with radiative field [1]
3817  // the VMRCO2 will be multiplied in abs_coefCalc
3818  k[J] = ((WTOT * Rhoave) * (FCO2*1.000e-20) * RADFN_FUN(VJ,XKT));
3819 
3820  }
3821 
3822 
3823  // Loop input frequency array. The previously calculated cross section
3824  // has therefore to be interpolated on the input frequencies.
3825  for ( Index s = 0 ; s < n_f ; ++s )
3826  {
3827  // calculate the associated wave number (= 1/wavelength)
3828  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3829  if ( (V > 0.000e0) && (V < FCO2_ckd_mt_100_v2) )
3830  {
3831  // arts cross section [1/m]
3832  // interpolate the k vector on the f_grid grid
3833  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3834  }
3835  }
3836  }
3837 
3838 }
3839 
3840 
3841 // =================================================================================
3842 
3843 
3845 
3870  const Numeric Cin,
3871  const String& model,
3872  ConstVectorView f_grid,
3873  ConstVectorView abs_p,
3874  ConstVectorView abs_t,
3875  ConstVectorView vmr _U_,
3876  const Verbosity& verbosity)
3877 {
3878  CREATE_OUT3
3879 
3880  // check the model name about consistency
3881  if ((model != "user") && (model != "CKDMT100"))
3882  {
3883  ostringstream os;
3884  os << "!!ERROR!!\n"
3885  << "CKD_MT.1.00 CO2 continuum:\n"
3886  << "INPUT model name is: " << model << ".\n"
3887  << "VALID model names are user and CKDMT100\n";
3888  throw runtime_error(os.str());
3889  }
3890 
3891 
3892  // scaling factor of the CO2 absorption
3893  Numeric ScalingFac = 0.0000e0;
3894  if ( model == "user" )
3895  {
3896  ScalingFac = Cin; // input scaling factor of calculated absorption
3897  }
3898  else
3899  {
3900  ScalingFac = 1.0000e0;
3901  }
3902 
3903  const Index n_p = abs_p.nelem(); // Number of pressure levels
3904  const Index n_f = f_grid.nelem(); // Number of frequencies
3905 
3906 
3907  // Check that dimensions of abs_p, abs_t, and vmr agree:
3908  assert ( n_p==abs_t.nelem() );
3909  assert ( n_p==vmr.nelem() );
3910 
3911  // Check that dimensions of pxsec are consistent with n_f
3912  // and n_p. It should be [n_f,n_p]:
3913  assert ( n_f==pxsec.nrows() );
3914  assert ( n_p==pxsec.ncols() );
3915 
3916 
3917  // ************************** CKD stuff ************************************
3918 
3919  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
3920  const Numeric T1 = 273.0e0;
3921  const Numeric TO = 296.0e0;
3922  const Numeric PO = 1013.0e0;
3923 
3924  // wavenumber range where CKD CO2 continuum is valid
3925  const Numeric VABS_min = FCO2_ckd_mt_100_v1; // [cm^-1]
3926  const Numeric VABS_max = FCO2_ckd_mt_100_v2; // [cm^-1]
3927 
3928 
3929  // It is assumed here that f_grid is monotonically increasing with index!
3930  // In future change this return into a change of the loop over
3931  // the frequency f_grid. n_f_new < n_f
3932  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3933  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3934  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3935  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3936  {
3937  out3 << "WARNING:\n"
3938  << " CKD_MT 1.00 CO2 continuum:\n"
3939  << " input frequency vector exceeds range of model validity\n"
3940  << " " << FCO2_ckd_mt_100_v1 << "<->" << FCO2_ckd_mt_100_v2 << "cm^-1\n";
3941  }
3942 
3943 
3944  // ---------------------- subroutine FRNCO2 ------------------------------
3945 
3946  // retrieve the appropriate array sequence of the CO2 continuum
3947  // arrays of the CKD model.
3949  Numeric V1C = V1ABS - DVC;
3950  Numeric V2C = V2ABS + DVC;
3951 
3952  int I1 = (int) ((V1C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3953  if (V1C < FCO2_ckd_mt_100_v1) I1 = -1;
3955 
3956  int I2 = (int) ((V2C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3957 
3958  int NPTC = I2-I1+3;
3959  if (NPTC > FCO2_ckd_mt_100_npt) NPTC = FCO2_ckd_mt_100_npt+1;
3960 
3961  V2C = V1C + FCO2_ckd_mt_100_dv * (Numeric)(NPTC-1);
3962 
3963  if (NPTC < 1)
3964  {
3965  out3 << "WARNING:\n"
3966  << " CKD_MT 1.00 CO2 continuum:\n"
3967  << " no elements of internal continuum coefficients could be found for the\n"
3968  << " input frequency range.\n"
3969  << " Leave the function without calculating the absorption.";
3970  return;
3971  }
3972 
3973  Vector FCO2T0(NPTC+addF77fields, 0.); // [cm^3/molecules]
3974 
3975  for (Index J = 1 ; J <= NPTC ; ++J)
3976  {
3977  Index I = I1+J;
3978  if ( (I > 0) && (I <= FCO2_ckd_mt_100_npt) )
3979  {
3980  FCO2T0[J] = FCO2_ckd_mt_100[I];
3981  }
3982  }
3983 
3984  // ---------------------- subroutine FRNCO2 ------------------------------
3985 
3986 
3987 
3988 
3989  // Loop pressure/temperature:
3990  for ( Index i = 0 ; i < n_p ; ++i )
3991  {
3992  Numeric Tave = abs_t[i]; // [K]
3993  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
3994  // FIXME Numeric vmrco2 = vmr[i]; // [1]
3995  Numeric Rhoave = (Pave/PO) * (TO/Tave); // [hPa]
3996  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3997  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3998 
3999 
4000  // Molecular cross section calculated by CKD.
4001  // The cross sectionis calculated on the predefined
4002  // CKD wavenumber grid.
4003  Vector k(NPTC+addF77fields, 0.); // [1/cm]
4004  for (Index J = 1 ; J <= NPTC ; ++J)
4005  {
4006  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4007  Numeric FCO2 = FCO2T0[J];
4008 
4009  // continuum has been increased in the nu2 band by a factor of 7
4010  if ( (VJ > 500.0e0) && (VJ < 900.0e0) )
4011  {
4012  FCO2 = 7.000e0 * FCO2;
4013  }
4014 
4015  // CKD cross section times number density with radiative field [1]
4016  // the VMRCO2 will be multiplied in abs_coefCalc
4017  k[J] = ((WTOT * Rhoave) * (FCO2*1.000e-20) * RADFN_FUN(VJ,XKT));
4018 
4019  }
4020 
4021 
4022  // Loop input frequency array. The previously calculated cross section
4023  // has therefore to be interpolated on the input frequencies.
4024  for ( Index s = 0 ; s < n_f ; ++s )
4025  {
4026  // calculate the associated wave number (= 1/wavelength)
4027  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4028  if ( (V > 0.000e0) && (V < FCO2_ckd_mt_100_v2) )
4029  {
4030  // arts cross section [1/m]
4031  // interpolate the k vector on the f_grid grid
4032  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4033  }
4034  }
4035  }
4036 
4037 }
4038 
4039 
4040 // =================================================================================
4042 
4078  const Numeric Cin,
4079  const String& model,
4080  ConstVectorView f_grid,
4081  ConstVectorView abs_p,
4082  ConstVectorView abs_t,
4083  ConstVectorView vmr,
4084  const Verbosity& verbosity)
4085 {
4086  CREATE_OUT3
4087 
4088  // check the model name about consistency
4089  if ((model != "user") && (model != "CKDMT100"))
4090  {
4091  ostringstream os;
4092  os << "!!ERROR!!\n"
4093  << "CKD_MT1.00 N2 CIA rotational band:\n"
4094  << "INPUT model name is: " << model << ".\n"
4095  << "VALID model names are user and CKDMT100\n";
4096  throw runtime_error(os.str());
4097  }
4098 
4099 
4100  // scaling factor of the N2-N2 CIA rot. band absorption
4101  Numeric ScalingFac = 0.0000e0;
4102  if ( model == "user" )
4103  {
4104  ScalingFac = Cin; // input scaling factor of calculated absorption
4105  }
4106  else
4107  {
4108  ScalingFac = 1.0000e0;
4109  }
4110 
4111  const Index n_p = abs_p.nelem(); // Number of pressure levels
4112  const Index n_f = f_grid.nelem(); // Number of frequencies
4113 
4114 
4115  // Check that dimensions of abs_p, abs_t, and vmr agree:
4116  assert ( n_p==abs_t.nelem() );
4117  assert ( n_p==vmr.nelem() );
4118 
4119  // Check that dimensions of pxsec are consistent with n_f
4120  // and n_p. It should be [n_f,n_p]:
4121  assert ( n_f==pxsec.nrows() );
4122  assert ( n_p==pxsec.ncols() );
4123 
4124 
4125  // ************************** CKD stuff ************************************
4126 
4127  // FIXME const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4128  const Numeric T1 = 273.0e0;
4129  const Numeric TO = 296.0e0;
4130  const Numeric PO = 1013.0e0;
4131 
4132 
4133  // wavenumber range where CKD H2O self continuum is valid
4134  const Numeric VABS_min = -1.000e1; // [cm^-1]
4135  const Numeric VABS_max = 3.500e2; // [cm^-1]
4136 
4137 
4138  // It is assumed here that f_grid is monotonically increasing with index!
4139  // In future change this return into a change of the loop over
4140  // the frequency f_grid. n_f_new < n_f
4141  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4142  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4143  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
4144  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
4145  {
4146  out3 << "WARNING:\n"
4147  << " CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4148  << " input frequency vector exceeds range of model validity\n"
4149  << " " << N2N2_CT296_ckd_mt_100_v1 << "<->" << N2N2_CT220_ckd_mt_100_v2 << "cm^-1\n";
4150  }
4151 
4152 
4153  // ------------------- subroutine N2R296/N2R220 ----------------------------
4154 
4156  {
4157  ostringstream os;
4158  os << "!!ERROR!!\n"
4159  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4160  << "parameter V1 not the same for different ref. temperatures.\n";
4161  throw runtime_error(os.str());
4162  }
4164  {
4165  ostringstream os;
4166  os << "!!ERROR!!\n"
4167  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4168  << "parameter V2 not the same for different ref. temperatures.\n";
4169  throw runtime_error(os.str());
4170  }
4172  {
4173  ostringstream os;
4174  os << "!!ERROR!!\n"
4175  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4176  << "parameter DV not the same for different ref. temperatures.\n";
4177  throw runtime_error(os.str());
4178  }
4180  {
4181  ostringstream os;
4182  os << "!!ERROR!!\n"
4183  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4184  << "parameter NPT not the same for different ref. temperatures.\n";
4185  throw runtime_error(os.str());
4186  }
4187 
4188  // retrieve the appropriate array sequence of the self continuum
4189  // arrays of the CKD model.
4191  Numeric V1C = V1ABS - DVC;
4192  Numeric V2C = V2ABS + DVC;
4193 
4194  int I1 = (int) ((V1C-N2N2_CT296_ckd_mt_100_v1) / N2N2_CT296_ckd_mt_100_dv);
4195  if (V1C < N2N2_CT296_ckd_mt_100_v1) I1 = -1;
4197 
4198  int I2 = (int) ((V2C-N2N2_CT296_ckd_mt_100_v1) / N2N2_CT296_ckd_mt_100_dv);
4199 
4200  int NPTC = I2-I1+3;
4202 
4203  V2C = V1C + N2N2_CT296_ckd_mt_100_dv * (Numeric)(NPTC-1);
4204 
4205  if (NPTC < 1)
4206  {
4207  out3 << "WARNING:\n"
4208  << " CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4209  << " no elements of internal continuum coefficients could be found for the\n"
4210  << " input frequency range.\n"
4211  << " Leave the function without calculating the absorption.\n";
4212  return;
4213  }
4214 
4215  Vector C0(NPTC+addF77fields, 0.); // [cm^3/molecules]
4216  Vector C1(NPTC+addF77fields, 0.); // [cm^3/molecules]
4217 
4218  for (Index J = 1 ; J <= NPTC ; ++J)
4219  {
4220  Index I = I1+J;
4221  if ( (I > 0) && (I <= N2N2_CT296_ckd_mt_100_npt) )
4222  {
4223  C0[J] = N2N2_CT296_ckd_mt_100[I]; // at T=296 K
4224  C1[J] = N2N2_CT220_ckd_mt_100[I]; // at T=260 K
4225  }
4226  }
4227 
4228  // ------------------- subroutine N2R296/N2R220 ----------------------------
4229 
4230 
4231 
4232 
4233  // Loop pressure/temperature:
4234  for ( Index i = 0 ; i < n_p ; ++i )
4235  {
4236  Numeric Tave = abs_t[i]; // [K]
4237  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
4238  Numeric vmrn2 = vmr[i]; // [1]
4239  Numeric facfac = vmrn2 * (Pave/PO) * (Pave/PO) *
4240  (T1/Tave) * (T1/Tave);
4241 
4242  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
4243  Numeric Tfac = (Tave - TO) / (220.0e0 - TO);
4244 
4245  // Molecular cross section calculated by CKD.
4246  // The cross sectionis calculated on the predefined
4247  // CKD wavenumber grid.
4248  Vector k(NPTC+addF77fields, 0.); // [1/cm]
4249  for (Index J = 1 ; J <= NPTC ; ++J)
4250  {
4251  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4252  Numeric SN2 = 0.000e0;
4253  if ( (C0[J] > 0.000e0) && (C1[J] > 0.000e0) )
4254  {
4255  SN2 = facfac* C0[J] * pow( (C1[J]/C0[J]), Tfac );
4256  }
4257 
4258  // CKD cross section with radiative field
4259  k[J] = SN2 * RADFN_FUN(VJ,XKT); // [1]
4260  }
4261 
4262 
4263  // Loop input frequency array. The previously calculated cross section
4264  // has therefore to be interpolated on the input frequencies.
4265  for ( Index s = 0 ; s < n_f ; ++s )
4266  {
4267  // calculate the associated wave number (= 1/wavelength)
4268  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4269  if ( (V > 0.000e0) && (V < N2N2_CT220_ckd_mt_100_v2) )
4270  {
4271  // arts cross section [1/m]
4272  // interpolate the k vector on the f_grid grid
4273  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4274  }
4275  }
4276  }
4277 
4278 }
4279 
4280 // =================================================================================
4281 
4283 
4324  const Numeric Cin,
4325  const String& model,
4326  ConstVectorView f_grid,
4327  ConstVectorView abs_p,
4328  ConstVectorView abs_t,
4329  ConstVectorView vmr,
4330  const Verbosity& verbosity)
4331 {
4332  CREATE_OUT3
4333 
4334  // check the model name about consistency
4335  if ((model != "user") && (model != "CKDMT100"))
4336  {
4337  ostringstream os;
4338  os << "!!ERROR!!\n"
4339  << "CKD_MT1.00 N2 CIA fundamental band:\n"
4340  << "INPUT model name is: " << model << ".\n"
4341  << "VALID model names are user and CKDMT100\n";
4342  throw runtime_error(os.str());
4343  }
4344 
4345 
4346  // scaling factor of the N2-N2 CIA fundamental band absorption
4347  Numeric ScalingFac = 1.0000e0;
4348  if ( model == "user" )
4349  {
4350  ScalingFac = Cin; // input scaling factor of calculated absorption
4351  }
4352 
4353 
4354  const Index n_p = abs_p.nelem(); // Number of pressure levels
4355  const Index n_f = f_grid.nelem(); // Number of frequencies
4356 
4357 
4358  // Check that dimensions of abs_p, abs_t, and vmr agree:
4359  assert ( n_p==abs_t.nelem() );
4360  assert ( n_p==vmr.nelem() );
4361 
4362  // Check that dimensions of pxsec are consistent with n_f
4363  // and n_p. It should be [n_f,n_p]:
4364  assert ( n_f==pxsec.nrows() );
4365  assert ( n_p==pxsec.ncols() );
4366 
4367 
4368  // ************************** CKD stuff ************************************
4369 
4370  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4371  const Numeric T1 = 273.0e0;
4372  const Numeric TO = 296.0e0;
4373  const Numeric PO = 1013.0e0;
4374  const Numeric a1 = 0.8387e0;
4375  const Numeric a2 = 0.0754e0;
4376 
4377 
4378  // It is assumed here that f_grid is monotonically increasing with index!
4379  // In future change this return into a change of the loop over
4380  // the frequency f_grid. n_f_new < n_f
4381  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4382  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4383  if ( (V1ABS < N2N2_N2F_ckd_mt_100_v1) || (V1ABS > N2N2_N2F_ckd_mt_100_v2) ||
4384  (V2ABS < N2N2_N2F_ckd_mt_100_v1) || (V2ABS > N2N2_N2F_ckd_mt_100_v2) )
4385  {
4386  out3 << "WARNING:\n"
4387  << " CKD_MT 1.00 N2-N2 CIA fundamental band:\n"
4388  << " input frequency vector exceeds range of model validity\n"
4389  << " " << N2N2_N2F_ckd_mt_100_v1 << "<->" << N2N2_N2F_ckd_mt_100_v2 << "cm^-1\n";
4390  }
4391 
4392 
4393  // ------------------- subroutine N2_VER_1 ----------------------------
4394 
4395  // retrieve the appropriate array sequence of the self continuum
4396  // arrays of the CKD model.
4398  Numeric V1C = V1ABS - DVC;
4399  Numeric V2C = V2ABS + DVC;
4400 
4401  int I1 = (int) ((V1C-N2N2_N2F_ckd_mt_100_v1) / N2N2_N2F_ckd_mt_100_dv);
4402  if (V1C < N2N2_N2F_ckd_mt_100_v1) I1 = -1;
4404 
4405  int I2 = (int) ((V2C-N2N2_N2F_ckd_mt_100_v1) / N2N2_N2F_ckd_mt_100_dv);
4406 
4407  int NPTC = I2-I1+3;
4408  if (NPTC > N2N2_N2F_ckd_mt_100_npt) NPTC = N2N2_N2F_ckd_mt_100_npt+1;
4409 
4410  V2C = V1C + N2N2_N2F_ckd_mt_100_dv * (Numeric)(NPTC-1);
4411 
4412  if (NPTC < 1)
4413  {
4414  out3 << "WARNING:\n"
4415  << " CKD_MT 1.00 N2-N2 CIA fundamental band:\n"
4416  << " no elements of internal continuum coefficients could be found for the\n"
4417  << " input frequency range.\n";
4418  return;
4419  }
4420 
4421  Vector xn2(NPTC+addF77fields, 0.);
4422  Vector xn2t(NPTC+addF77fields, 0.);
4423 
4424  for (Index J = 1 ; J <= NPTC ; ++J)
4425  {
4426  Index I = I1+J;
4427  if ( (I > 0) && (I <= N2N2_N2F_ckd_mt_100_npt) )
4428  {
4429  xn2[J] = N2N2_N2F_ckd_mt_100[I];
4430  xn2t[J] = N2N2_N2Ft_ckd_mt_100[I];
4431  }
4432  }
4433 
4434  // ------------------- subroutine N2_VER_1 ----------------------------
4435 
4436 
4437 
4438 
4439  // Loop pressure/temperature:
4440  for ( Index i = 0 ; i < n_p ; ++i )
4441  {
4442  Numeric Tave = abs_t[i]; // [K]
4443  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
4444  Numeric vmrn2 = vmr[i]; // [1]
4445  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
4446  Numeric tau_fac= WTOT * (Pave/PO) * (T1/Tave);
4447 
4448  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B) / (h*c)
4449 
4450  // FIXME Numeric Tfac = (Tave - TO) / (220.0e0 - TO); // [1]
4451  Numeric xktfac = (1.000e0/TO) - (1.000e0/Tave); // [1/K]
4452  Numeric factor = 0.000e0;
4453  if (vmrn2 > VMRCalcLimit)
4454  {
4455  factor = (1.000e0 / xLosmt) * (1.000e0/vmrn2) * (a1 - a2*(Tave/TO));
4456  }
4457 
4458  // Molecular cross section calculated by CKD.
4459  // The cross sectionis calculated on the predefined
4460  // CKD wavenumber grid.
4461  Vector k(NPTC+addF77fields+1, 0.); // [1/cm]
4462  for (Index J = 1 ; J <= NPTC ; ++J)
4463  {
4464  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4465  Numeric SN2 = 0.000e0;
4466  if (xn2[J] > 0.000e0)
4467  {
4468  Numeric C0 = factor * xn2[J] * exp(xn2t[J]*xktfac) / VJ;
4469  SN2 = tau_fac * C0;
4470  }
4471 
4472  // CKD cross section with radiative field
4473  k[J] = SN2 * RADFN_FUN(VJ,XKT); // [1/cm]
4474  }
4475 
4476 
4477  // Loop input frequency array. The previously calculated cross section
4478  // has therefore to be interpolated on the input frequencies.
4479  for ( Index s = 0 ; s < n_f ; ++s )
4480  {
4481  // calculate the associated wave number (= 1/wavelength)
4482  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4483  if ( (V > N2N2_N2F_ckd_mt_100_v1) && (V < N2N2_N2F_ckd_mt_100_v2) )
4484  {
4485  // arts cross section [1/m]
4486  // interpolate the k vector on the f_grid grid
4487  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4488  }
4489  }
4490  }
4491 
4492 }
4493 
4494 // =================================================================================
4495 
4497 
4535  const Numeric Cin,
4536  const String& model,
4537  ConstVectorView f_grid,
4538  ConstVectorView abs_p,
4539  ConstVectorView abs_t,
4540  ConstVectorView vmr _U_,
4541  const Verbosity& verbosity)
4542 {
4543  CREATE_OUT3
4544 
4545  // check the model name about consistency
4546  if ((model != "user") && (model != "CKDMT100"))
4547  {
4548  ostringstream os;
4549  os << "!!ERROR!!\n"
4550  << "CKD_MT1.00 O2 CIA fundamental band:\n"
4551  << "INPUT model name is: " << model << ".\n"
4552  << "VALID model names are user and CKDMT100\n";
4553  throw runtime_error(os.str());
4554  }
4555 
4556 
4557  // scaling factor of the O2-O2 CIA fundamental band absorption
4558  Numeric ScalingFac = 1.0000e0;
4559  if ( model == "user" )
4560  {
4561  ScalingFac = Cin; // input scaling factor of calculated absorption
4562  }
4563 
4564 
4565  const Index n_p = abs_p.nelem(); // Number of pressure levels
4566  const Index n_f = f_grid.nelem(); // Number of frequencies
4567 
4568 
4569  // Check that dimensions of abs_p, abs_t, and vmr agree:
4570  assert ( n_p==abs_t.nelem() );
4571  assert ( n_p==vmr.nelem() );
4572 
4573  // Check that dimensions of pxsec are consistent with n_f
4574  // and n_p. It should be [n_f,n_p]:
4575  assert ( n_f==pxsec.nrows() );
4576  assert ( n_p==pxsec.ncols() );
4577 
4578 
4579  // ************************** CKD stuff ************************************
4580 
4581  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4582  const Numeric T1 = 273.0e0;
4583  const Numeric TO = 296.0e0;
4584  const Numeric PO = 1013.0e0;
4585 
4586 
4587  // It is assumed here that f_grid is monotonically increasing with index!
4588  // In future change this return into a change of the loop over
4589  // the frequency f_grid. n_f_new < n_f
4590  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4591  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4592  if ( (V1ABS < O2O2_O2F_ckd_mt_100_v1) || (V1ABS > O2O2_O2F_ckd_mt_100_v2) ||
4593  (V2ABS < O2O2_O2F_ckd_mt_100_v1) || (V2ABS > O2O2_O2F_ckd_mt_100_v2) )
4594  {
4595  out3 << "WARNING:\n"
4596  << " CKD_MT 1.00 O2-O2 CIA fundamental band:\n"
4597  << " input frequency vector exceeds range of model validity\n"
4598  << " " << O2O2_O2F_ckd_mt_100_v1 << "<->" << O2O2_O2F_ckd_mt_100_v2 << "cm^-1\n";
4599  }
4600 
4601 
4602  // ------------------- subroutine O2_VER_1 ----------------------------
4603 
4604  // retrieve the appropriate array sequence of the CKD model array.
4606  Numeric V1C = V1ABS - DVC;
4607  Numeric V2C = V2ABS + DVC;
4608 
4609  int I1 = (int) ((V1C-O2O2_O2F_ckd_mt_100_v1) / O2O2_O2F_ckd_mt_100_dv);
4610  if (V1C < O2O2_O2F_ckd_mt_100_v1) I1 = -1;
4612 
4613  int I2 = (int) ((V2C-O2O2_O2F_ckd_mt_100_v1) / O2O2_O2F_ckd_mt_100_dv);
4614 
4615  int NPTC = I2-I1+3;
4616  if (NPTC > O2O2_O2F_ckd_mt_100_npt) NPTC = O2O2_O2F_ckd_mt_100_npt+1;
4617 
4618  V2C = V1C + O2O2_O2F_ckd_mt_100_dv * (Numeric)(NPTC-1);
4619 
4620  if (NPTC < 1)
4621  {
4622  out3 << "WARNING:\n"
4623  << " CKD_MT 1.00 O2 CIA fundamental band:\n"
4624  << " no elements of internal continuum coefficients could be found for the\n"
4625  << " input frequency range.\n"
4626  << " Leave the function without calculating the absorption.\n";
4627  return;
4628  }
4629 
4630  Vector xo2(NPTC+addF77fields, 0.);
4631  Vector xo2t(NPTC+addF77fields, 0.);
4632 
4633  for (Index J = 1 ; J <= NPTC ; ++J)
4634  {
4635  Index I = I1+J;
4636  if ( (I > 0) && (I <= O2O2_O2F_ckd_mt_100_npt) )
4637  {
4638  xo2[J] = O2O2_O2Fo_ckd_mt_100[I];
4639  xo2t[J] = O2O2_O2Ft_ckd_mt_100[I];
4640  }
4641  }
4642 
4643  // ------------------- subroutine O2_VER_1 ----------------------------
4644 
4645 
4646 
4647 
4648  // Loop pressure/temperature:
4649  for ( Index i = 0 ; i < n_p ; ++i )
4650  {
4651  Numeric Tave = abs_t[i]; // [K]
4652  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
4653  // FIXME Numeric vmro2 = vmr[i]; // [1]
4654  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
4655  Numeric tau_fac= WTOT * (Pave/PO) * (T1/Tave);
4656 
4657  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
4658 
4659  Numeric xktfac = (1.000e0/TO) - (1.000e0/Tave); // [1/K]
4660  Numeric factor = (1.000e0 / xLosmt);
4661 
4662  // Molecular cross section calculated by CKD.
4663  // The cross sectionis calculated on the predefined
4664  // CKD wavenumber grid.
4665  Vector k(NPTC+addF77fields+1, 0.); // [1/cm]
4666  for (Index J = 1 ; J <= NPTC ; ++J)
4667  {
4668  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4669  Numeric SO2 = 0.0e0;
4670  if (xo2[J] > 0.0e0)
4671  {
4672  Numeric C0 = factor * xo2[J] * exp(xo2t[J]*xktfac) / VJ;
4673  SO2 = tau_fac * C0;
4674  }
4675 
4676  // CKD cross section without radiative field
4677  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1]
4678  }
4679 
4680 
4681  // Loop input frequency array. The previously calculated cross section
4682  // has therefore to be interpolated on the input frequencies.
4683  for ( Index s = 0 ; s < n_f ; ++s )
4684  {
4685  // calculate the associated wave number (= 1/wavelength)
4686  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4687  if ( (V > O2O2_O2F_ckd_mt_100_v1) && (V < O2O2_O2F_ckd_mt_100_v2) )
4688  {
4689  // arts cross section [1/m]
4690  // interpolate the k vector on the f_grid grid
4691  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4692  }
4693  }
4694  }
4695 
4696 }
4697 
4698 // =================================================================================
4699 
4701 
4755  const Numeric Cin,
4756  const String& model,
4757  ConstVectorView f_grid,
4758  ConstVectorView abs_p,
4759  ConstVectorView abs_t,
4760  ConstVectorView vmr,
4761  ConstVectorView abs_n2,
4762  const Verbosity& verbosity)
4763 {
4764  CREATE_OUT3
4765 
4766  // check the model name about consistency
4767  if ((model != "user") && (model != "CKDMT100"))
4768  {
4769  ostringstream os;
4770  os << "!!ERROR!!\n"
4771  << "CKD_MT1.00 O2 band at 1.27 micrometer:\n"
4772  << "INPUT model name is: " << model << ".\n"
4773  << "VALID model names are user and CKDMT100\n";
4774  throw runtime_error(os.str());
4775  }
4776 
4777 
4778  // scaling factor of the O2 v0<-v0 band absorption
4779  Numeric ScalingFac = 1.0000e0;
4780  if ( model == "user" )
4781  {
4782  ScalingFac = Cin; // input scaling factor of calculated absorption
4783  };
4784 
4785  const Index n_p = abs_p.nelem(); // Number of pressure levels
4786  const Index n_f = f_grid.nelem(); // Number of frequencies
4787 
4788 
4789  // Check that dimensions of abs_p, abs_t, and vmr agree:
4790  assert ( n_p==abs_t.nelem() );
4791  assert ( n_p==vmr.nelem() );
4792 
4793  // Check that dimensions of pxsec are consistent with n_f
4794  // and n_p. It should be [n_f,n_p]:
4795  assert ( n_f==pxsec.nrows() );
4796  assert ( n_p==pxsec.ncols() );
4797 
4798 
4799  // ************************** CKD stuff ************************************
4800 
4801  // FIXME const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4802  const Numeric T1 = 273.0e0;
4803  // FIXME const Numeric TO = 296.0e0;
4804  const Numeric PO = 1013.0e0;
4805 
4806  // It is assumed here that f_grid is monotonically increasing with index!
4807  // In future change this return into a change of the loop over
4808  // the frequency f_grid. n_f_new < n_f
4809  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4810  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4811  if ( (V1ABS < O2_00_ckd_mt_100_v1) || (V1ABS > O2_00_ckd_mt_100_v2) ||
4812  (V2ABS < O2_00_ckd_mt_100_v1) || (V2ABS > O2_00_ckd_mt_100_v2) )
4813  {
4814  out3 << "WARNING:\n"
4815  << " CKD_MT 1.00 O2 v0<-v0 band:\n"
4816  << " input frequency vector exceeds range of model validity\n"
4817  << " " << O2_00_ckd_mt_100_v1 << "<->" << O2_00_ckd_mt_100_v2 << "cm^-1\n";
4818  }
4819 
4820 
4821  // ------------------- subroutine O2INF1 ----------------------------
4822 
4823  // retrieve the appropriate array sequence of the CKD model array.
4825  Numeric V1C = V1ABS - DVC;
4826  Numeric V2C = V2ABS + DVC;
4827 
4828  int I1 = (int) ((V1C-O2_00_ckd_mt_100_v1) / O2_00_ckd_mt_100_dv);
4829  if (V1C < O2_00_ckd_mt_100_v1) I1 = I1-1;
4831 
4832  int I2 = (int) ((V2C-O2_00_ckd_mt_100_v1) / O2_00_ckd_mt_100_dv);
4833 
4834  int NPTC = I2-I1+3;
4835 
4836  V2C = V1C + O2_00_ckd_mt_100_dv * (Numeric)(NPTC-1);
4837 
4838  if (NPTC < 1)
4839  {
4840  out3 << "WARNING:\n"
4841  << " CKD_MT 1.00 O2 v0<-v0 band:\n"
4842  << " no elements of internal continuum coefficients could be found for the\n"
4843  << " input frequency range.\n"
4844  << " Leave the function without calculating the absorption.\n";
4845  return;
4846  }
4847 
4848  Numeric CO[(int)(NPTC+addF77fields)];
4849 
4850 
4851  for (Index J = 1 ; J <= NPTC ; ++J)
4852  {
4853  CO[J] = 0.000e0;
4854  Index I = I1+J;
4855  if ( (I > 0) && (I <= O2_00_ckd_mt_100_npt) )
4856  {
4857  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4858  CO[J] = O2_00_ckd_mt_100[I] / VJ;
4859  }
4860  }
4861 
4862  // ------------------- subroutine O2INF1 ----------------------------
4863 
4864 
4865 
4866 
4867  // Loop pressure/temperature:
4868  for ( Index i = 0 ; i < n_p ; ++i )
4869  {
4870  Numeric Tave = abs_t[i]; // [K]
4871  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
4872  Numeric vmro2 = vmr[i]; // [1]
4873  Numeric vmrn2 = abs_n2[i]; // [1]
4874  Numeric ADJWO2 = (vmro2 + 0.300e0*vmrn2) / 0.446e0 *
4875  (Pave/PO) * (Pave/PO) * (T1/Tave) * (T1/Tave);
4876  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B) / (h*c)
4877 
4878  // Molecular cross section calculated by CKD.
4879  // The cross sectionis calculated on the predefined
4880  // CKD wavenumber grid. The abs. coeff. is then the
4881  // cross section times the number density.
4882  Numeric k[NPTC+addF77fields]; // [1/cm]
4883  k[0] = 0.00e0; // not used array field
4884  for (Index J = 1 ; J <= NPTC ; ++J)
4885  {
4886  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4887  Numeric SO2 = 0.0e0;
4888  if (CO[J] > 0.0e0)
4889  {
4890  SO2 = ADJWO2 * CO[J];
4891  }
4892 
4893  // CKD (cross section * number density) with radiative field
4894  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1/cm]
4895  }
4896 
4897 
4898  // Loop input frequency array. The previously calculated cross section
4899  // has therefore to be interpolated on the input frequencies.
4900  for ( Index s = 0 ; s < n_f ; ++s )
4901  {
4902  // calculate the associated wave number (= 1/wavelength)
4903  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4904  if ( (V > O2_00_ckd_mt_100_v1) && (V < O2_00_ckd_mt_100_v2) )
4905  {
4906  // arts cross section [1/m]
4907  // interpolate the k vector on the f_grid grid
4908  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4909  }
4910  }
4911  }
4912 
4913 }
4914 
4915 // =================================================================================
4916 
4918 
4961  const Numeric Cin,
4962  const String& model,
4963  ConstVectorView f_grid,
4964  ConstVectorView abs_p,
4965  ConstVectorView abs_t,
4966  ConstVectorView vmr,
4967  const Verbosity& verbosity)
4968 {
4969  CREATE_OUT3
4970 
4971  // check the model name about consistency
4972  if ((model != "user") && (model != "CKDMT100"))
4973  {
4974  ostringstream os;
4975  os << "!!ERROR!!\n"
4976  << "CKD_MT1.00 O2 band at 1.06 micrometer:\n"
4977  << "INPUT model name is: " << model << ".\n"
4978  << "VALID model names are user and CKDMT100\n";
4979  throw runtime_error(os.str());
4980  }
4981 
4982 
4983  // scaling factor of the O2 v1<-v0 band absorption
4984  Numeric ScalingFac = 1.0000e0;
4985  if ( model == "user" )
4986  {
4987  ScalingFac = Cin; // input scaling factor of calculated absorption
4988  };
4989 
4990  const Index n_p = abs_p.nelem(); // Number of pressure levels
4991  const Index n_f = f_grid.nelem(); // Number of frequencies
4992 
4993 
4994  // Check that dimensions of abs_p, abs_t, and vmr agree:
4995  assert ( n_p==abs_t.nelem() );
4996  assert ( n_p==vmr.nelem() );
4997 
4998  // Check that dimensions of pxsec are consistent with n_f
4999  // and n_p. It should be [n_f,n_p]:
5000  assert ( n_f==pxsec.nrows() );
5001  assert ( n_p==pxsec.ncols() );
5002 
5003 
5004  // ************************** CKD stuff ************************************
5005 
5006  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
5007  const Numeric T1 = 273.0e0;
5008  const Numeric TO = 296.0e0;
5009  const Numeric PO = 1013.0e0;
5010  // FIXME const Numeric vmr_argon = 9.000e-3; // VMR of argon is assumed to be const.
5011 
5012 
5013  // CKD_MT 1.00 implementation of oxygen v1<-v0 band model of
5014  // Mlawer, Clough, Brown, Stephen, Landry, Goldman, Murcray,
5015  // "Observed Atmospheric Collision Induced Absorption in Near Infrared Oxygen Bands",
5016  // Journal of Geophysical Research, vol 103, no. D4, pp. 3859-3863, 1998.
5017  const Numeric V1S = O2_10_ckd_mt_100_v1;
5018  const Numeric V2S = O2_10_ckd_mt_100_v2;
5019  const Numeric DVS = O2_10_ckd_mt_100_dv;
5020  const Numeric V1_osc = 9375.000e0;
5021  const Numeric HW1 = 58.960e0;
5022  const Numeric V2_osc = 9439.000e0;
5023  const Numeric HW2 = 45.040e0;
5024  const Numeric S1 = 1.166e-4;
5025  const Numeric S2 = 3.086e-5;
5026 
5027 
5028  // It is assumed here that f_grid is monotonically increasing with index!
5029  // In future change this return into a change of the loop over
5030  // the frequency f_grid. n_f_new < n_f
5031  Numeric V1ABS = f_grid[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
5032  Numeric V2ABS = f_grid[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
5033  if ( (V1ABS < O2_10_ckd_mt_100_v1) || (V1ABS > O2_10_ckd_mt_100_v2) ||
5034  (V2ABS < O2_10_ckd_mt_100_v1) || (V2ABS > O2_10_ckd_mt_100_v2) )
5035  {
5036  out3 << "WARNING:\n"
5037  << " CKD_MT 1.00 O2 v1<-v0 band:\n"
5038  << " input frequency vector exceeds range of model validity\n"
5039  << " " << O2_10_ckd_mt_100_v1 << "<->" << O2_10_ckd_mt_100_v2 << "cm^-1\n";
5040  }
5041 
5042 
5043  // ------------------- subroutine O2INF2 ----------------------------
5044 
5045  // retrieve the appropriate array sequence of the CKD model array.
5046  Numeric DVC = DVS;
5047  Numeric V1C = V1ABS - DVC;
5048  Numeric V2C = V2ABS + DVC;
5049 
5050  int NPTC = (int)( ((V2C-V1C)/DVC) + 3 );
5051 
5052  V2C = V1C + ( DVC * (Numeric)(NPTC-1) );
5053 
5054  if (NPTC < 1)
5055  {
5056  out3 << "WARNING:\n"
5057  << " CKD_MT 1.00 O2 v1<-v0 band:\n"
5058  << " no elements of internal continuum coefficients could be found for the\n"
5059  << " input frequency range.\n"
5060  << " Leave the function without calculating the absorption.\n";
5061  return;
5062  }
5063 
5064  Numeric C[NPTC+addF77fields];
5065  C[0] = 0.000e0; // not used field of array
5066 
5067  for (Index J = 1 ; J <= NPTC ; ++J)
5068  {
5069  C[J] = 0.000e0;
5070  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
5071 
5072  if ( (VJ > V1S) && (VJ < V2S) )
5073  {
5074  Numeric DV1 = VJ - V1_osc;
5075  Numeric DV2 = VJ - V2_osc;
5076 
5077  Numeric DAMP1 = 1.00e0;
5078  Numeric DAMP2 = 1.00e0;
5079 
5080  if ( DV1 < 0.00e0 )
5081  {
5082  DAMP1 = exp(DV1 / 176.100e0);
5083  }
5084 
5085  if ( DV2 < 0.00e0 )
5086  {
5087  DAMP2 = exp(DV2 / 176.100e0);
5088  }
5089 
5090  Numeric O2INF = 0.31831e0 *
5091  ( ((S1 * DAMP1 / HW1)/(1.000e0 + pow((DV1/HW1),(Numeric)2.0e0) )) +
5092  ((S2 * DAMP2 / HW2)/(1.000e0 + pow((DV2/HW2),(Numeric)2.0e0) )) ) * 1.054e0;
5093  C[J] = O2INF / VJ;
5094  }
5095  }
5096 
5097 
5098  // ------------------- subroutine O2INF2 ----------------------------
5099 
5100 
5101  // Loop pressure/temperature:
5102  for ( Index i = 0 ; i < n_p ; ++i )
5103  {
5104  Numeric Tave = abs_t[i]; // [K]
5105  Numeric Pave = (abs_p[i]*1.000e-2); // [hPa]
5106  Numeric vmro2 = vmr[i]; // [1]
5107  Numeric WTOT = 1.000e-20 * xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
5108  Numeric ADJWO2 = (vmro2 / 0.209e0) * WTOT * (Pave/PO) * (TO/Tave);
5109  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
5110 
5111  // Molecular cross section calculated by CKD.
5112  // The cross sectionis calculated on the predefined
5113  // CKD wavenumber grid.
5114  Numeric k[NPTC+addF77fields]; // [1/cm]
5115  k[0] = 0.00e0; // not used array field
5116  for (Index J = 1 ; J <= NPTC ; ++J)
5117  {
5118  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
5119  Numeric SO2 = 0.0e0;
5120  if (C[J] > 0.0e0)
5121  {
5122  SO2 = ADJWO2 * C[J];
5123  }
5124 
5125  // CKD cross section without radiative field
5126  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1]
5127  }
5128 
5129 
5130  // Loop input frequency array. The previously calculated cross section
5131  // has therefore to be interpolated on the input frequencies.
5132  for ( Index s = 0 ; s < n_f ; ++s )
5133  {
5134  // calculate the associated wave number (= 1/wavelength)
5135  Numeric V = f_grid[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
5136  if ( (V > V1S) && (V < V2S) )
5137  {
5138  // arts cross section [1/m]
5139  // interpolate the k vector on the f_grid grid
5140  pxsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
5141  }
5142  }
5143  }
5144 
5145 }
5146 
5147 // #################################################################################
5148 
5150 
5182 void CKD24_H20 (MatrixView pxsec,
5183  int isf,
5184  const Numeric Cin,
5185  const String& model,
5186  ConstVectorView f_grid,
5187  ConstVectorView abs_p,
5188  ConstVectorView abs_t,
5189  ConstVectorView vmr,
5190  ConstVectorView abs_n2,
5191  const Verbosity& verbosity)
5192 {
5193  CREATE_OUT3
5194 
5195  //
5196  //
5197  // external function to call (original F77 code translated with f2c)
5198  /* INPUT PARAMETERS: */
5199  /* P [hPa] TOTAL PRESSURE */
5200  /* T [K] TEMPERATURE */
5201  /* VMRH2O [1] H2O VOLUME MIXING RATIO */
5202  /* VMRN2 [1] N2 VOLUME MIXING RATIO */
5203  /* VMRO2 [1] O2 VOLUME MIXING RATIO */
5204  /* FREQ [Hz] FREQUENCY OF CALCULATION */
5205  extern double artsckd_(double p, double t,
5206  double vmrh2o, double vmrn2, double vmro2,
5207  double freq, int ivc);
5208  //
5209  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5210  Numeric XFAC = 1.0000; // scaling factor
5211  // ---------------------------------------------------------------------------------------
5212 
5213 
5214  // check the model name about consistency
5215  if ((model != "user") && (model != "CKD24"))
5216  {
5217  ostringstream os;
5218  os << "!!ERROR!!\n"
5219  << "CKDv2.4.2 H2O self/foreign continuum:\n"
5220  << "INPUT model name is: " << model << ".\n"
5221  << "VALID model names are user and CKD24\n";
5222  throw runtime_error(os.str());
5223  }
5224 
5225 
5226  // select the parameter set (!!model dominates values!!):
5227  if ( model == "CKD24" )
5228  {
5229  XFAC = 1.0000;
5230  }
5231  else if ( model == "user" )
5232  {
5233  XFAC = Cin;
5234  }
5235  else
5236  {
5237  if (isf == 0) {
5238  ostringstream os;
5239  os << "H2O-SelfContCKD24: ERROR! Wrong model values given.\n"
5240  << "allowed models are: 'CKD24', 'user'" << '\n';
5241  throw runtime_error(os.str());
5242  }
5243  if (isf == 1) {
5244  ostringstream os;
5245  os << "H2O-ForeignContCKD: ERROR! Wrong model values given.\n"
5246  << "allowed models are: 'CKD24', 'user'" << '\n';
5247  throw runtime_error(os.str());
5248  }
5249  }
5250 
5251  if (isf == 0) {
5252  out3 << "H2O-SelfContCKD24: (model=" << model << ") parameter values in use:\n"
5253  << " XFAC = " << XFAC << "\n";
5254  }
5255  if (isf == 1) {
5256  out3 << "H2O-ForeignContCKD: (model=" << model << ") parameter values in use:\n"
5257  << " XFAC = " << XFAC << "\n";
5258  }
5259 
5260 
5261  const Index n_p = abs_p.nelem(); // Number of pressure levels
5262  const Index n_f = f_grid.nelem(); // Number of frequencies
5263 
5264 
5265  // Check that dimensions of abs_p, abs_t, and vmr agree:
5266  assert ( n_p==abs_t.nelem() );
5267  assert ( n_p==vmr.nelem() );
5268 
5269  // Check that dimensions of pxsec are consistent with n_f
5270  // and n_p. It should be [n_f,n_p]:
5271  assert ( n_f==pxsec.nrows() );
5272  assert ( n_p==pxsec.ncols() );
5273 
5274  // ivc = 1 : N2-N2 CKD version of Borysow-Fromhold model
5275  // ivc = 21 : H2O CKD2.4 self cont part
5276  // ivc = 22 : H2O CKD2.4 foreign cont part
5277  // ivc = 31 : MPMf87/s93 self cont part
5278  // ivc = 32 : MPMf87/s93 foreign cont part
5279  int ivc = 55;
5280  if (isf == 0) {
5281  ivc = 21; // CKD2.4 self continuum
5282  // ivc = 31; // MPMf87/s93 self continuum
5283  }
5284  if (isf == 1) {
5285  ivc = 22; // CKD2.4 foreign continuum
5286  //ivc = 32; // MPMf87/s93 foreign continuum
5287  }
5288  if ((ivc != 1) && (ivc != 21) && (ivc != 22) && (ivc != 31) && (ivc != 32)) {
5289  ostringstream os;
5290  os << "!!ERROR: CKD24 H2O model: wrong input parameter isf (=0,1) given!\n"
5291  << "retrun without calculation!" << "\n"
5292  << "actual value of isf is " << isf << "\n";
5293  throw runtime_error(os.str());
5294  return;
5295  }
5296  // ivc = 1;
5297 
5298  // Loop pressure/temperature:
5299  for ( Index i=0; i<n_p; ++i )
5300  {
5301  double T = (double) abs_t[i]; // [K]
5302  double p = (double) (abs_p[i]*1.000e-2); // [hPa]
5303  double vmrh2o = (double) vmr[i]; // [1]
5304  double vmrn2 = (double) abs_n2[i]; // [1]
5305  double vmro2 = 0.0e0; // [1]
5306 
5307  //cout << "------------------------------------------------\n";
5308  //cout << "CKD2.4 H2O: ivc =" << ivc << "\n";
5309  //cout << "CKD2.4 H2O: T =" << T << " K\n";
5310  //cout << "CKD2.4 H2O: p =" << p << " hPa\n";
5311  //cout << "CKD2.4 H2O: vmrh2o=" << vmrh2o << "\n";
5312  //cout << "CKD2.4 H2O: vmrn2 =" << vmrn2 << "\n";
5313  //cout << "CKD2.4 H2O: vmro2 =" << vmro2 << "\n";
5314  // Loop frequency:
5315  for ( Index s=0; s<n_f; ++s )
5316  {
5317  // the second vmr of N2 will be multiplied at the stage of
5318  // absorption calculation: abs = vmr * pxsec.
5319  double f = (double) f_grid[s]; // [Hz]
5320  if (ivc == 1) { // ---------- N2 -----------------
5321  if (abs_n2[i] > 0.0e0) {
5322  //cout << "CKD2.4 N2: f =" << f << " Hz\n";
5323  double cont = artsckd_(p, T, vmrh2o, vmrn2, vmro2, f, ivc);
5324  pxsec(s,i) += (Numeric) (cont / vmr[i]);
5325  //cout << "CKD2.4 N2: abs =" << cont << " 1/m\n";
5326  }
5327  } else { // ---------------- H2O -----------------
5328  if (vmr[i] > 0.0e0) {
5329  //cout << "CKD2.4 H2O: f =" << f << " Hz\n";
5330  double cont = artsckd_(p, T, vmrh2o, vmrn2, vmro2, f, ivc);
5331  pxsec(s,i) += (Numeric) (cont / vmr[i]);
5332  //cout << "CKD2.4 H2O: abs =" << cont << " 1/m\n";
5333  }
5334  }
5335  }
5336  }
5337  return;
5338 }
5339 //
5340 // #################################################################################
5342 
5367  const Numeric Cin,
5368  const String& model,
5369  ConstVectorView f_grid,
5370  ConstVectorView abs_p,
5371  ConstVectorView abs_t,
5372  ConstVectorView vmr,
5373  const Verbosity& verbosity)
5374 {
5375  CREATE_OUT3
5376 
5377  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5378  // standard values for the Pardo et al. model (IEEE, Trans. Ant. Prop.,
5379  // Vol 49, No 12, pp. 1683-1694, 2001)
5380  const Numeric C_ATM = 0.0315; // [1/m]
5381  // ---------------------------------------------------------------------------------------
5382 
5383  // select the parameter set (!!model dominates parameters!!):
5384  Numeric C;
5385  if ( model == "ATM" )
5386  {
5387  C = C_ATM;
5388  }
5389  else if ( model == "user" )
5390  {
5391  C = Cin;
5392  }
5393  else
5394  {
5395  ostringstream os;
5396  os << "H2O-ForeignContATM01: ERROR! Wrong model values given.\n"
5397  << "allowed models are: 'ATM', 'user'" << '\n';
5398  throw runtime_error(os.str());
5399  }
5400  out3 << "H2O-ForeignContATM01: (model=" << model << ") parameter values in use:\n"
5401  << " C_f = " << C << "\n";
5402 
5403  const Index n_p = abs_p.nelem(); // Number of pressure levels
5404  const Index n_f = f_grid.nelem(); // Number of frequencies
5405 
5406  // Check that dimensions of abs_p, abs_t, and vmr agree:
5407  assert ( n_p==abs_t.nelem() );
5408  assert ( n_p==vmr.nelem() );
5409 
5410  // Check that dimensions of pxsec are consistent with n_f
5411  // and n_p. It should be [n_f,n_p]:
5412  assert ( n_f==pxsec.nrows() );
5413  assert ( n_p==pxsec.ncols() );
5414 
5415  // Loop over pressure/temperature grid:
5416  for ( Index i=0; i<n_p; ++i )
5417  {
5418  // since this is an effective "dry air" continuum, it is not really
5419  // it is not specifically attributed to N2, so we need the total
5420  // dry air part in total which is equal to the total minus the
5421  // water vapor pressure:
5422  Numeric pd = abs_p[i] * ( 1.00000e0 - vmr[i] ); // [Pa]
5423  // since the H2O VMR will be multiplied in abs_coefCalc, we omit it here
5424  Numeric pwdummy = abs_p[i] ; // [Pa]
5425  // Loop over frequency grid:
5426  for ( Index s=0; s<n_f; ++s )
5427  {
5428  // Becaue this is an effective "dry air" continuum, it is not really
5429  // specific N2 but mainly caused by N2. Therefore the N2 vmr must be
5430  // canceled out here which is later in abs_coefCalc multiplied
5431  // (calculation: abs = vmr * pxsec):
5432  pxsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
5433  pow( (f_grid[s]/(Numeric)2.25e11), (Numeric)2. ) * // quadratic f dependence [1]
5434  pow( ((Numeric)300.0/abs_t[i]), (Numeric)3. ) * // free T dependence [1]
5435  (pd/1.01300e5) * // p_dry dependence [1]
5436  (pwdummy/1.01300e5); // p_H2O dependence [1]
5437  }
5438  }
5439 }
5440 //
5441 // #################################################################################
5442 //
5444 
5483  const Numeric fcenter,
5484  const Numeric b1,
5485  const Numeric b2,
5486  const Numeric b3,
5487  const Numeric b4,
5488  const Numeric b5,
5489  const Numeric b6,
5490  const String& model,
5491  ConstVectorView f_grid,
5492  ConstVectorView abs_p,
5493  ConstVectorView abs_t,
5494  ConstVectorView vmr,
5495  const Verbosity& verbosity)
5496 {
5497  CREATE_OUT3
5498 
5499  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5500  // standard values for the MPM93 H2O continuum model
5501  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
5502  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
5503  const Numeric MPM93fo_orig = 1780.000e9; // [Hz]
5504  const Numeric MPM93b1_orig = 22300.000; // [Hz/Pa]
5505  const Numeric MPM93b2_orig = 0.952; // [1]
5506  const Numeric MPM93b3_orig = 17.600e4; // [Hz/Pa]
5507  const Numeric MPM93b4_orig = 30.500; // [1]
5508  const Numeric MPM93b5_orig = 2.000; // [1]
5509  const Numeric MPM93b6_orig = 5.000; // [1]
5510  // ---------------------------------------------------------------------------------------
5511 
5512 
5513  // select the parameter set (!!model goes for values!!):
5514  Numeric MPM93fopcl, MPM93b1pcl, MPM93b2pcl,
5515  MPM93b3pcl, MPM93b4pcl, MPM93b5pcl,
5516  MPM93b6pcl;
5517  if ( model == "MPM93" )
5518  {
5519  MPM93fopcl = MPM93fo_orig;
5520  MPM93b1pcl = MPM93b1_orig;
5521  MPM93b2pcl = MPM93b2_orig;
5522  MPM93b3pcl = MPM93b3_orig;
5523  MPM93b4pcl = MPM93b4_orig;
5524  MPM93b5pcl = MPM93b5_orig;
5525  MPM93b6pcl = MPM93b6_orig;
5526  }
5527  else if ( model == "user" )
5528  {
5529  MPM93fopcl = fcenter;
5530  MPM93b1pcl = b1;
5531  MPM93b2pcl = b2;
5532  MPM93b3pcl = b3;
5533  MPM93b4pcl = b4;
5534  MPM93b5pcl = b5;
5535  MPM93b6pcl = b6;
5536  }
5537  else
5538  {
5539  ostringstream os;
5540  os << "H2O-ContMPM93: ERROR! Wrong model values given.\n"
5541  << "allowed models are: 'MPM93', 'user'" << '\n';
5542  throw runtime_error(os.str());
5543  }
5544  out3 << "H2O-ContMPM93: (model=" << model << ") parameter values in use:\n"
5545  << " fo = " << MPM93fopcl << "\n"
5546  << " b1 = " << MPM93b1pcl << "\n"
5547  << " b2 = " << MPM93b2pcl << "\n"
5548  << " b3 = " << MPM93b3pcl << "\n"
5549  << " b4 = " << MPM93b4pcl << "\n"
5550  << " b5 = " << MPM93b5pcl << "\n"
5551  << " b6 = " << MPM93b6pcl << "\n";
5552 
5553  const Index n_p = abs_p.nelem(); // Number of pressure levels
5554  const Index n_f = f_grid.nelem(); // Number of frequencies
5555 
5556  // Check that dimensions of abs_p, abs_t, and vmr agree:
5557  assert ( n_p==abs_t.nelem() );
5558  assert ( n_p==vmr.nelem() );
5559 
5560  // Check that dimensions of pxsec are consistent with n_f
5561  // and n_p. It should be [n_f,n_p]:
5562  assert ( n_f==pxsec.nrows() );
5563  assert ( n_p==pxsec.ncols() );
5564 
5565 
5566  // Loop pressure/temperature:
5567  for ( Index i=0; i<n_p; ++i )
5568  {
5569  Numeric th = 300.0 / abs_t[i];
5570  // the vmr of H2O will be multiplied at the stage of absorption calculation:
5571  // abs / vmr * pxsec.
5572  Numeric strength = MPM93b1pcl * abs_p[i] * pow( th, (Numeric)3.5 )
5573  * exp(MPM93b2pcl * (1 - th));
5574  Numeric gam = MPM93b3pcl * 0.001 *
5575  ( MPM93b4pcl * abs_p[i] * vmr[i] * pow( th, MPM93b6pcl ) +
5576  abs_p[i]*(1.000-vmr[i]) * pow( th, MPM93b5pcl ) );
5577  // Loop frequency:
5578  for ( Index s=0; s<n_f; ++s )
5579  {
5580  // pxsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
5581  pxsec(s,i) += dB_km_to_1_m * 0.1820 *
5582  f_grid[s] * strength *
5583  MPMLineShapeFunction(gam, MPM93fopcl, f_grid[s]);
5584  }
5585  }
5586  return;
5587 }
5588 //
5589 // #################################################################################
5590 // ################################# OXYGEN MODELS #################################
5591 // #################################################################################
5593 
5622  const Numeric CCin, // continuum scale factor
5623  const Numeric CLin, // line strength scale factor
5624  const Numeric CWin, // line broadening scale factor
5625  const Numeric COin, // line coupling scale factor
5626  const String& model,
5627  ConstVectorView f_grid,
5628  ConstVectorView abs_p,
5629  ConstVectorView abs_t,
5630  ConstVectorView abs_h2o,
5631  ConstVectorView vmr,
5632  const Verbosity& verbosity)
5633 {
5634  CREATE_OUT3
5635 
5636  //
5637  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
5638  // 0 1 2 3 4 5 6
5639  // f0 a1 a2 a3 a4 a5 a6
5640  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa] [1]
5641  const Numeric mpm85[48][7] = {
5642  { 49.452379 , 0.12 , 11.830 , 8.40 , 0.0 , 5.600 , 1.700 },
5643  { 49.962257 , 0.34 , 10.720 , 8.50 , 0.0 , 5.600 , 1.700 },
5644  { 50.474238 , 0.94 , 9.690 , 8.60 , 0.0 , 5.600 , 1.700 },
5645  { 50.987748 , 2.46 , 8.690 , 8.70 , 0.0 , 5.500 , 1.700 },
5646  { 51.503350 , 6.08 , 7.740 , 8.90 , 0.0 , 5.600 , 1.800 },
5647  { 52.021409 , 14.14 , 6.840 , 9.20 , 0.0 , 5.500 , 1.800 },
5648  { 52.542393 , 31.02 , 6.000 , 9.40 , 0.0 , 5.700 , 1.800 },
5649  { 53.066906 , 64.10 , 5.220 , 9.70 , 0.0 , 5.300 , 1.900 },
5650  { 53.595748 , 124.70 , 4.480 , 10.00 , 0.0 , 5.400 , 1.800 },
5651  { 54.129999 , 228.00 , 3.810 , 10.20 , 0.0 , 4.800 , 2.000 },
5652  { 54.671157 , 391.80 , 3.190 , 10.50 , 0.0 , 4.800 , 1.900 },
5653  { 55.221365 , 631.60 , 2.620 , 10.79 , 0.0 , 4.170 , 2.100 },
5654  { 55.783800 , 953.50 , 2.115 , 11.10 , 0.0 , 3.750 , 2.100 },
5655  { 56.264777 , 548.90 , 0.010 , 16.46 , 0.0 , 7.740 , 0.900 },
5656  { 56.363387 , 1344.00 , 1.655 , 11.44 , 0.0 , 2.970 , 2.300 },
5657  { 56.968180 , 1763.00 , 1.255 , 11.81 , 0.0 , 2.120 , 2.500 },
5658  { 57.612481 , 2141.00 , 0.910 , 12.21 , 0.0 , 0.940 , 3.700 },
5659  { 58.323874 , 2386.00 , 0.621 , 12.66 , 0.0 , -0.550 , -3.100 },
5660  { 58.446589 , 1457.00 , 0.079 , 14.49 , 0.0 , 5.970 , 0.800 },
5661  { 59.164204 , 2404.00 , 0.386 , 13.19 , 0.0 , -2.440 , 0.100 },
5662  { 59.590982 , 2112.00 , 0.207 , 13.60 , 0.0 , 3.440 , 0.500 },
5663  { 60.306057 , 2124.00 , 0.207 , 13.82 , 0.0 , -4.130 , 0.700 },
5664  { 60.434775 , 2461.00 , 0.386 , 12.97 , 0.0 , 1.320 , -1.000 },
5665  { 61.150558 , 2504.00 , 0.621 , 12.48 , 0.0 , -0.360 , 5.800 },
5666  { 61.800152 , 2298.00 , 0.910 , 12.07 , 0.0 , -1.590 , 2.900 },
5667  { 62.411212 , 1933.00 , 1.255 , 11.71 , 0.0 , -2.660 , 2.300 },
5668  { 62.486253 , 1517.00 , 0.078 , 14.68 , 0.0 , -4.770 , 0.900 },
5669  { 62.997974 , 1503.00 , 1.660 , 11.39 , 0.0 , -3.340 , 2.200 },
5670  { 63.568515 , 1087.00 , 2.110 , 11.08 , 0.0 , -4.170 , 2.000 },
5671  { 64.127764 , 733.50 , 2.620 , 10.78 , 0.0 , -4.480 , 2.000 },
5672  { 64.678900 , 463.50 , 3.190 , 10.50 , 0.0 , -5.100 , 1.800 },
5673  { 65.224067 , 274.80 , 3.810 , 10.20 , 0.0 , -5.100 , 1.900 },
5674  { 65.764769 , 153.00 , 4.480 , 10.00 , 0.0 , -5.700 , 1.800 },
5675  { 66.302088 , 80.09 , 5.220 , 9.70 , 0.0 , -5.500 , 1.800 },
5676  { 66.836827 , 39.46 , 6.000 , 9.40 , 0.0 , -5.900 , 1.700 },
5677  { 67.369595 , 18.32 , 6.840 , 9.20 , 0.0 , -5.600 , 1.800 },
5678  { 67.900862 , 8.01 , 7.740 , 8.90 , 0.0 , -5.800 , 1.700 },
5679  { 68.431001 , 3.30 , 8.690 , 8.70 , 0.0 , -5.700 , 1.700 },
5680  { 68.960306 , 1.28 , 9.690 , 8.60 , 0.0 , -5.600 , 1.700 },
5681  { 69.489021 , 0.47 , 10.720 , 8.50 , 0.0 , -5.600 , 1.700 },
5682  { 70.017342 , 0.16 , 11.830 , 8.40 , 0.0 , -5.600 , 1.700 },
5683  { 118.750341 , 945.00 , 0.000 , 15.92 , 0.0 , -0.440 , 0.900 },
5684  { 368.498350 , 67.90 , 0.020 , 19.20 , 0.6 , 0.000 , 0.000 },
5685  { 424.763120 , 638.00 , 0.011 , 19.16 , 0.6 , 0.000 , 0.000 },
5686  { 487.249370 , 235.00 , 0.011 , 19.20 , 0.6 , 0.000 , 0.000 },
5687  { 715.393150 , 99.60 , 0.089 , 18.10 , 0.6 , 0.000 , 0.000 },
5688  { 773.838730 , 671.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000 },
5689  { 834.145330 , 180.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000 },
5690 };
5691 
5692  // number of lines of Liebe O2-line catalog (0-47 lines)
5693  const Index i_first = 0;
5694  const Index i_last = 47; // all the spec. lines up to 1THz
5695  // const Index i_last = 40; // only the 60GHz complex + 118GHz line
5696 
5697 
5698  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5699  // standard values for the MPM85 model (Liebe, Radio Science, 20, 1069-1089, 1985):
5700  const Numeric CC_MPM85 = 1.00000;
5701  const Numeric CL_MPM85 = 1.00000;
5702  const Numeric CW_MPM85 = 1.00000;
5703  const Numeric CO_MPM85 = 1.00000;
5704  int AppCutoff = 0;
5705  // ---------------------------------------------------------------------------------------
5706 
5707 
5708  // select the parameter set (!!model dominates values!!):
5709  Numeric CC, CL, CW, CO;
5710  if ( model == "MPM85" )
5711  {
5712  CC = CC_MPM85;
5713  CL = CL_MPM85;
5714  CW = CW_MPM85;
5715  CO = CO_MPM85;
5716  }
5717  else if ( model == "MPM85Lines" )
5718  {
5719  CC = 0.000;
5720  CL = CL_MPM85;
5721  CW = CW_MPM85;
5722  CO = CO_MPM85;
5723  }
5724  else if ( model == "MPM85Continuum" )
5725  {
5726  CC = CC_MPM85;
5727  CL = 0.000;
5728  CW = 0.000;
5729  CO = 0.000;
5730  }
5731  else if ( model == "MPM85NoCoupling" )
5732  {
5733  CC = CC_MPM85;
5734  CL = CL_MPM85;
5735  CW = CW_MPM85;
5736  CO = 0.000;
5737  }
5738  else if ( model == "MPM85NoCutoff" )
5739  {
5740  CC = CC_MPM85;
5741  CL = CL_MPM85;
5742  CW = CW_MPM85;
5743  CO = CO_MPM85;
5744  AppCutoff = 1;
5745  }
5746  else if ( model == "user" )
5747  {
5748  CC = CCin;
5749  CL = CLin;
5750  CW = CWin;
5751  CO = COin;
5752  }
5753  else
5754  {
5755  ostringstream os;
5756  os << "O2-MPM85: ERROR! Wrong model values given.\n"
5757  << "Valid models are: 'MPM85' 'MPM85Lines' 'MPM85Continuum' 'MPM85NoCoupling' 'MPM85NoCutoff'"
5758  << "and 'user'" << '\n';
5759  throw runtime_error(os.str());
5760  }
5761  out3 << "O2-MPM85: (model=" << model << ") parameter values in use:\n"
5762  << " CC = " << CC << "\n"
5763  << " CL = " << CL << "\n"
5764  << " CW = " << CW << "\n"
5765  << " CO = " << CO << "\n";
5766 
5767 
5768  // O2 continuum parameters of MPM92:
5769  const Numeric S0 = 6.140e-4; // line strength [ppm]
5770  const Numeric G0 = 5.600e-3; // line width [GHz/kPa]
5771  const Numeric X0 = 0.800; // temperature dependence of line width [1]
5772 
5773  const Index n_p = abs_p.nelem(); // Number of pressure levels
5774  const Index n_f = f_grid.nelem(); // Number of frequencies
5775 
5776  // const = VMR * ISORATIO = 0.20946 * 0.99519
5777  // this constant is already incorporated into the line strength, so we
5778  // have top devide the line strength by this value since arts multiplies pxsec
5779  // by these variables later in abs_coefCalc.
5780  const Numeric VMRISO = 0.2085;
5781 
5782  // Check that dimensions of abs_p, abs_t, and vmr agree:
5783  assert ( n_p==abs_t.nelem() );
5784  assert ( n_p==vmr.nelem() );
5785 
5786  // Check that dimensions of pxsec are consistent with n_f
5787  // and n_p. It should be [n_f,n_p]:
5788  assert ( n_f==pxsec.nrows() );
5789  assert ( n_p==pxsec.ncols() );
5790 
5791  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
5792  for ( Index i=0; i<n_p; ++i )
5793  {
5794  // check if O2-VMR will cause an underflow due to division by zero:
5795  if (vmr[i] < VMRCalcLimit)
5796  {
5797  ostringstream os;
5798  os << "ERROR: MPM87 O2 full absorption model has detected a O2 volume mixing ratio of "
5799  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
5800  << "Therefore no calculation is performed.\n";
5801  throw runtime_error(os.str());
5802  return;
5803  }
5804 
5805  // relative inverse temperature [1]
5806  Numeric theta = (300.0 / abs_t[i]);
5807  // H2O partial pressure [kPa]
5808  Numeric pwv = Pa_to_kPa * abs_p[i] * abs_h2o[i];
5809  // dry air partial pressure [kPa]
5810  Numeric pda = (Pa_to_kPa * abs_p[i]) - pwv;
5811  // here the total pressure is devided by the O2 vmr for the
5812  // P_dry calculation because we calculate pxsec and not abs: abs = vmr * pxsec
5813  Numeric pda_dummy = pda;
5814  // O2 continuum strength [ppm]
5815  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
5816  // O2 continuum pseudo line broadening [GHz]
5817  Numeric gam_cont = G0 * ( pda + 1.10*pwv ) * pow( theta, X0 ); // GHz
5818 
5819  // Loop over input frequency
5820  for ( Index s=0; s<n_f; ++s )
5821  {
5822  // input frequency in [GHz]
5823  Numeric ff = f_grid[s] * Hz_to_GHz;
5824  // O2 continuum absorption [1/m]
5825  // cross section: pxsec = absorption / var
5826  // the vmr of O2 will be multiplied at the stage of absorption calculation:
5827  // here the rolloff parameter FAC is implemented!
5828  // Numeric FAC = 1.000 / ( pow( ff, 2) + pow( 60.000, 2) );
5829  // if we let the non-proofen rollofff away as in further version:
5830  Numeric FAC = 1.000 ;
5831  Numeric Nppc = CC * strength_cont * FAC * ff * gam_cont /
5832  ( pow( ff, (Numeric)2.)
5833  + pow( gam_cont, (Numeric)2.) );
5834 
5835  // Loop over MPM85 O2 spectral lines:
5836  Numeric Nppl = 0.0;
5837  for ( Index l = i_first; l <= i_last; ++l )
5838  {
5839  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
5840  Numeric strength = CL * mpm85[l][1] * 1.000e-6 * pda_dummy *
5841  pow(theta, (Numeric)3.) * exp(mpm85[l][2]*(1.000-theta)) /
5842  mpm85[l][0];
5843  // line broadening parameter [GHz]
5844  Numeric gam = CW * ( mpm85[l][3] * 1.000e-3 *
5845  ( ( pda * pow(theta, ((Numeric)0.80-mpm85[l][4]))) +
5846  (1.10 * pwv * theta) ) );
5847  // line mixing parameter [1]
5848  Numeric delta = CO * mpm85[l][5] * 1.000e-3 *
5849  pda * pow(theta, mpm85[l][6]);
5850  // absorption [dB/km] like in the original MPM92
5851  Nppl += strength * MPMLineShapeO2Function(gam, mpm85[l][0], ff, delta);
5852  }
5853  // in MPM85 there is a cutoff for O2 line absorption if abs_l < 0
5854  // absorption cannot be less than 0 according to MPM87 philosophy.
5855  // since this cutoff is only 'detectable' in the source code and not in the
5856  // publications we assume this cutoff also for MPM85 since it is also
5857  // implemented in MPM87.
5858  if (AppCutoff == 0)
5859  {
5860  if (Nppl < 0.000) Nppl = 0.0000;
5861  }
5862  //
5863  // O2 line absorption [1/m]
5864  // cross section: pxsec = absorption / var
5865  // the vmr of O2 will be multiplied at the stage of absorption calculation:
5866  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
5867  }
5868  }
5869  return;
5870 }
5871 //
5872 // #################################################################################
5874 
5907  const Numeric CCin, // continuum scale factor
5908  const Numeric CLin, // line strength scale factor
5909  const Numeric CWin, // line broadening scale factor
5910  const Numeric COin, // line coupling scale factor
5911  const String& model,
5912  ConstVectorView f_grid,
5913  ConstVectorView abs_p,
5914  ConstVectorView abs_t,
5915  ConstVectorView abs_h2o,
5916  ConstVectorView vmr,
5917  const Verbosity& verbosity)
5918 {
5919  CREATE_OUT3
5920 
5921  //
5922  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
5923  // 0 1 2 3 4 5 6
5924  // f0 a1 a2 a3 a4 a5 a6
5925  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa]
5926  const Numeric mpm87[48][7] = {
5927  { 49.452379 , 0.12 , 11.830 , 8.40 , 0.0 , 6.600 , 1.700}, // 0
5928  { 49.962257 , 0.34 , 10.720 , 8.50 , 0.0 , 6.600 , 1.700}, // 1
5929  { 50.474238 , 0.94 , 9.690 , 8.60 , 0.0 , 6.600 , 1.700}, // 2
5930  { 50.987748 , 2.46 , 8.690 , 8.70 , 0.0 , 6.500 , 1.700}, // 3
5931  { 51.503350 , 6.08 , 7.740 , 8.90 , 0.0 , 6.627 , 1.800}, // 4
5932  { 52.021409 , 14.14 , 6.840 , 9.20 , 0.0 , 6.347 , 1.800}, // 5
5933  { 52.542393 , 31.02 , 6.000 , 9.40 , 0.0 , 6.046 , 1.800}, // 6
5934  { 53.066906 , 64.10 , 5.220 , 9.70 , 0.0 , 5.719 , 1.900}, // 7
5935  { 53.595748 , 124.70 , 4.480 , 10.00 , 0.0 , 5.400 , 1.800}, // 8
5936  { 54.129999 , 228.00 , 3.810 , 10.20 , 0.0 , 5.157 , 2.000}, // 9
5937  { 54.671157 , 391.80 , 3.190 , 10.50 , 0.0 , 4.783 , 1.900}, // 10
5938  { 55.221365 , 631.60 , 2.620 , 10.79 , 0.0 , 4.339 , 2.100}, // 11
5939  { 55.783800 , 953.50 , 2.115 , 11.10 , 0.0 , 4.011 , 2.100}, // 12
5940  { 56.264777 , 548.90 , 0.010 , 16.46 , 0.0 , 2.772 , 0.900}, // 13
5941  { 56.363387 , 1344.00 , 1.655 , 11.44 , 0.0 , 3.922 , 2.300}, // 14
5942  { 56.968180 , 1763.00 , 1.255 , 11.81 , 0.0 , 3.398 , 2.500}, // 15
5943  { 57.612481 , 2141.00 , 0.910 , 12.21 , 0.0 , 1.145 , 3.200}, // 16
5944  { 58.323874 , 2386.00 , 0.621 , 12.66 , 0.0 , -0.317 , -2.500}, // 17
5945  { 58.446589 , 1457.00 , 0.079 , 14.49 , 0.0 , 6.270 , 0.800}, // 18
5946  { 59.164204 , 2404.00 , 0.386 , 13.19 , 0.0 , -4.119 , 0.100}, // 19
5947  { 59.590982 , 2112.00 , 0.207 , 13.60 , 0.0 , 6.766 , 0.500}, // 20
5948  { 60.306057 , 2124.00 , 0.207 , 13.82 , 0.0 , -6.183 , 0.700}, // 21
5949  { 60.434775 , 2461.00 , 0.386 , 12.97 , 0.0 , 3.290 , -0.400}, // 22
5950  { 61.150558 , 2504.00 , 0.621 , 12.48 , 0.0 , -1.591 , 3.500}, // 23
5951  { 61.800152 , 2298.00 , 0.910 , 12.07 , 0.0 , -2.068 , 2.900}, // 24
5952  { 62.411212 , 1933.00 , 1.255 , 11.71 , 0.0 , -4.158 , 2.300}, // 25
5953  { 62.486253 , 1517.00 , 0.078 , 14.68 , 0.0 , -4.068 , 0.900}, // 26
5954  { 62.997974 , 1503.00 , 1.660 , 11.39 , 0.0 , -4.482 , 2.200}, // 27
5955  { 63.568515 , 1087.00 , 2.110 , 11.08 , 0.0 , -4.442 , 2.000}, // 28
5956  { 64.127764 , 733.50 , 2.620 , 10.78 , 0.0 , -4.687 , 2.000}, // 29
5957  { 64.678900 , 463.50 , 3.190 , 10.50 , 0.0 , -5.074 , 1.800}, // 30
5958  { 65.224067 , 274.80 , 3.810 , 10.20 , 0.0 , -5.403 , 1.900}, // 31
5959  { 65.764769 , 153.00 , 4.480 , 10.00 , 0.0 , -5.610 , 1.800}, // 32
5960  { 66.302088 , 80.09 , 5.220 , 9.70 , 0.0 , -5.896 , 1.800}, // 33
5961  { 66.836827 , 39.46 , 6.000 , 9.40 , 0.0 , -6.194 , 1.700}, // 34
5962  { 67.369595 , 18.32 , 6.840 , 9.20 , 0.0 , -6.468 , 1.800}, // 35
5963  { 67.900862 , 8.01 , 7.740 , 8.90 , 0.0 , -6.718 , 1.700}, // 36
5964  { 68.431001 , 3.30 , 8.690 , 8.70 , 0.0 , -6.700 , 1.700}, // 37
5965  { 68.960306 , 1.28 , 9.690 , 8.60 , 0.0 , -6.600 , 1.700}, // 38
5966  { 69.489021 , 0.47 , 10.720 , 8.50 , 0.0 , -6.600 , 1.700}, // 39
5967  { 70.017342 , 0.16 , 11.830 , 8.40 , 0.0 , -6.600 , 1.700}, // 40
5968  { 118.750341 , 945.00 , 0.000 , 16.30 , 0.0 , -0.134 , 0.800}, // 41
5969  { 368.498350 , 67.90 , 0.020 , 19.20 , 0.6 , 0.000 , 0.000}, // 42
5970  { 424.763120 , 638.00 , 0.011 , 19.16 , 0.6 , 0.000 , 0.000}, // 43
5971  { 487.249370 , 235.00 , 0.011 , 19.20 , 0.6 , 0.000 , 0.000}, // 44
5972  { 715.393150 , 99.60 , 0.089 , 18.10 , 0.6 , 0.000 , 0.000}, // 45
5973  { 773.838730 , 671.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000}, // 46
5974  { 834.145330 , 180.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000} // 47
5975  };
5976 
5977  // number of lines of Liebe O2-line catalog (0-47 lines)
5978  const Index i_first = 0;
5979  const Index i_last = 47; // all the spec. lines up to 1THz
5980  // const Index i_last = 40; // only the 60GHz complex + 118GHz line
5981 
5982 
5983  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5984  // standard values for the MPM87 model (NITA Report 87-224):
5985  const Numeric CC_MPM87 = 1.00000;
5986  const Numeric CL_MPM87 = 1.00000;
5987  const Numeric CW_MPM87 = 1.00000;
5988  const Numeric CO_MPM87 = 1.00000;
5989  int AppCutoff = 0;
5990  // ---------------------------------------------------------------------------------------
5991 
5992 
5993  // select the parameter set (!!model dominates values!!):
5994  Numeric CC, CL, CW, CO;
5995  if ( model == "MPM87" )
5996  {
5997  CC = CC_MPM87;
5998  CL = CL_MPM87;
5999  CW = CW_MPM87;
6000  CO = CO_MPM87;
6001  }
6002  else if ( model == "MPM87Lines" )
6003  {
6004  CC = 0.000;
6005  CL = CL_MPM87;
6006  CW = CW_MPM87;
6007  CO = CO_MPM87;
6008  }
6009  else if ( model == "MPM87Continuum" )
6010  {
6011  CC = CC_MPM87;
6012  CL = 0.000;
6013  CW = 0.000;
6014  CO = 0.000;
6015  }
6016  else if ( model == "MPM87NoCoupling" )
6017  {
6018  CC = CC_MPM87;
6019  CL = CL_MPM87;
6020  CW = CW_MPM87;
6021  CO = 0.000;
6022  }
6023  else if ( model == "MPM87NoCutoff" )
6024  {
6025  // !!ATTENTION!!
6026  // In the window regions the total absorption can get negative values.
6027  // So be carefull with this selection!
6028  CC = CC_MPM87;
6029  CL = CL_MPM87;
6030  CW = CW_MPM87;
6031  CO = CO_MPM87;
6032  AppCutoff = 1;
6033  }
6034  else if ( model == "user" )
6035  {
6036  CC = CCin;
6037  CL = CLin;
6038  CW = CWin;
6039  CO = COin;
6040  }
6041  else
6042  {
6043  ostringstream os;
6044  os << "O2-MPM87: ERROR! Wrong model values given.\n"
6045  << "Valid models are: 'MPM87' 'MPM87Lines' 'MPM87Continuum' 'MPM87NoCoupling' 'MPM87NoCutoff'"
6046  << "and 'user'" << '\n';
6047  throw runtime_error(os.str());
6048  }
6049  out3 << "O2-MPM87: (model=" << model << ") parameter values in use:\n"
6050  << " CC = " << CC << "\n"
6051  << " CL = " << CL << "\n"
6052  << " CW = " << CW << "\n"
6053  << " CO = " << CO << "\n";
6054 
6055 
6056  // O2 continuum parameters of MPM92:
6057  const Numeric S0 = 6.140e-4; // line strength [ppm]
6058  const Numeric G0 = 4.800e-3; // line width [GHz/kPa] !! 14% lower than in all the other versions !!
6059  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6060 
6061  const Index n_p = abs_p.nelem(); // Number of pressure levels
6062  const Index n_f = f_grid.nelem(); // Number of frequencies
6063 
6064  // const = VMR * ISORATIO = 0.20946 * 0.99519
6065  // this constant is already incorporated into the line strength, so we
6066  // have top devide the line strength by this value since arts multiplies pxsec
6067  // by these variables later in abs_coefCalc.
6068  const Numeric VMRISO = 0.2085;
6069 
6070  // Check that dimensions of abs_p, abs_t, and vmr agree:
6071  assert ( n_p==abs_t.nelem() );
6072  assert ( n_p==vmr.nelem() );
6073 
6074  // Check that dimensions of pxsec are consistent with n_f
6075  // and n_p. It should be [n_f,n_p]:
6076  assert ( n_f==pxsec.nrows() );
6077  assert ( n_p==pxsec.ncols() );
6078 
6079  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6080  for ( Index i=0; i<n_p; ++i )
6081  {
6082  // check if O2-VMR will cause an underflow due to division by zero:
6083  if (vmr[i] < VMRCalcLimit)
6084  {
6085  ostringstream os;
6086  os << "ERROR: MPM87 O2 full absorption model has detected a O2 volume mixing ratio of "
6087  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6088  << "Therefore no calculation is performed.\n";
6089  throw runtime_error(os.str());
6090  return;
6091  }
6092 
6093  // relative inverse temperature [1]
6094  Numeric theta = (300.0 / abs_t[i]);
6095  // H2O partial pressure [kPa]
6096  Numeric pwv = Pa_to_kPa * abs_p[i] * abs_h2o[i];
6097  // dry air partial pressure [kPa]
6098  Numeric pda = (Pa_to_kPa * abs_p[i]) - pwv;
6099  // here the total pressure is devided by the O2 vmr for the
6100  // P_dry calculation because we calculate pxsec and not abs: abs = vmr * pxsec
6101  Numeric pda_dummy = pda;
6102  // O2 continuum strength [ppm]
6103  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6104  // O2 continuum pseudo line broadening [GHz]
6105  Numeric gam_cont = G0 * ( pda + 1.10*pwv ) * pow( theta, X0 ); // GHz
6106 
6107  // Loop over input frequency
6108  for ( Index s=0; s<n_f; ++s )
6109  {
6110  // input frequency in [GHz]
6111  Numeric ff = f_grid[s] * Hz_to_GHz;
6112  // O2 continuum absorption [1/m]
6113  // cross section: pxsec = absorption / var
6114  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6115  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6116  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6117 
6118  // Loop over MPM87 O2 spectral lines:
6119  Numeric Nppl = 0.0;
6120  for ( Index l = i_first; l <= i_last; ++l )
6121  {
6122  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6123  Numeric strength = CL * mpm87[l][1] * 1.000e-6 * pda_dummy *
6124  pow(theta, (Numeric)3.) * exp(mpm87[l][2]*(1.000-theta)) /
6125  mpm87[l][0];
6126  // line broadening parameter [GHz]
6127  Numeric gam = CW * ( mpm87[l][3] * 1.000e-3 *
6128  ( ( pda * pow(theta, ((Numeric)0.80-mpm87[l][4]))) +
6129  (1.10 * pwv * theta) ) );
6130  // line mixing parameter [1]
6131  Numeric delta = CO * mpm87[l][5] * 1.000e-3 *
6132  pda * pow(theta, mpm87[l][6]);
6133  // absorption [dB/km] like in the original MPM92
6134  Nppl += strength * MPMLineShapeO2Function(gam, mpm87[l][0], ff, delta);
6135  }
6136  // in MPM87 there is a cutoff for O2 line absorption if abs_l < 0
6137  // absorption cannot be less than 0 according to MPM87 source code.
6138  if (AppCutoff == 0)
6139  {
6140  if (Nppl < 0.000) Nppl = 0.0000;
6141  }
6142  //
6143  // O2 line absorption [1/m]
6144  // cross section: pxsec = absorption / var
6145  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6146  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6147  }
6148  }
6149  return;
6150 }
6151 //
6152 // #################################################################################
6154 
6184  const Numeric CCin, // continuum scale factor
6185  const Numeric CLin, // line strength scale factor
6186  const Numeric CWin, // line broadening scale factor
6187  const Numeric COin, // line coupling scale factor
6188  const String& model,
6189  ConstVectorView f_grid,
6190  ConstVectorView abs_p,
6191  ConstVectorView abs_t,
6192  ConstVectorView abs_h2o,
6193  ConstVectorView vmr,
6194  const Verbosity& verbosity)
6195 {
6196  CREATE_OUT3
6197 
6198  //
6199  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6200  // 0 1 2 3 4 5 6
6201  // f0 a1 a2 a3 a4 a5 a6
6202  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa]
6203  const Numeric mpm89[44][7] = {
6204  { 50.474238, 0.94 , 9.694 , 8.60 , 0.0 , 1.600 , 5.520 }, // 0
6205  { 50.987749, 2.46 , 8.694 , 8.70 , 0.0 , 1.400 , 5.520 }, // 1
6206  { 51.503350, 6.08 , 7.744 , 8.90 , 0.0 , 1.165 , 5.520 }, // 2
6207  { 52.021410, 14.14 , 6.844 , 9.20 , 0.0 , 0.883 , 5.520 }, // 3
6208  { 52.542394, 31.02 , 6.004 , 9.40 , 0.0 , 0.579 , 5.520 }, // 4
6209  { 53.066907, 64.10 , 5.224 , 9.70 , 0.0 , 0.252 , 5.520 }, // 5
6210  { 53.595749, 124.70 , 4.484 , 10.00 , 0.0 , -0.066 , 5.520 }, // 6
6211  { 54.130000, 228.00 , 3.814 , 10.20 , 0.0 , -0.314 , 5.520 }, // 7
6212  { 54.671159, 391.80 , 3.194 , 10.50 , 0.0 , -0.706 , 5.520 }, // 8
6213  { 55.221367, 631.60 , 2.624 , 10.79 , 0.0 , -1.151 , 5.514 }, // 9
6214  { 55.783802, 953.50 , 2.119 , 11.10 , 0.0 , -0.920 , 5.025 }, // 10
6215  { 56.264775, 548.90 , 0.015 , 16.46 , 0.0 , 2.881 , -0.069 }, // 11
6216  { 56.363389, 1344.00 , 1.660 , 11.44 , 0.0 , -0.596 , 4.750 }, // 12
6217  { 56.968206, 1763.00 , 1.260 , 11.81 , 0.0 , -0.556 , 4.104 }, // 13
6218  { 57.612484, 2141.00 , 0.915 , 12.21 , 0.0 , -2.414 , 3.536 }, // 14
6219  { 58.323877, 2386.00 , 0.626 , 12.66 , 0.0 , -2.635 , 2.686 }, // 15
6220  { 58.446590, 1457.00 , 0.084 , 14.49 , 0.0 , 6.848 , -0.647 }, // 16
6221  { 59.164207, 2404.00 , 0.391 , 13.19 , 0.0 , -6.032 , 1.858 }, // 17
6222  { 59.590983, 2112.00 , 0.212 , 13.60 , 0.0 , 8.266 , -1.413 }, // 18
6223  { 60.306061, 2124.00 , 0.212 , 13.82 , 0.0 , -7.170 , 0.916 }, // 19
6224  { 60.434776, 2461.00 , 0.391 , 12.97 , 0.0 , 5.664 , -2.323 }, // 20
6225  { 61.150560, 2504.00 , 0.626 , 12.48 , 0.0 , 1.731 , -3.039 }, // 21
6226  { 61.800154, 2298.00 , 0.915 , 12.07 , 0.0 , 1.738 , -3.797 }, // 22
6227  { 62.411215, 1933.00 , 1.260 , 11.71 , 0.0 , -0.048 , -4.277 }, // 23
6228  { 62.486260, 1517.00 , 0.083 , 14.68 , 0.0 , -4.290 , 0.238 }, // 24
6229  { 62.997977, 1503.00 , 1.665 , 11.39 , 0.0 , 0.134 , -4.860 }, // 25
6230  { 63.568518, 1087.00 , 2.115 , 11.08 , 0.0 , 0.541 , -5.079 }, // 26
6231  { 64.127767, 733.50 , 2.620 , 10.78 , 0.0 , 0.814 , -5.525 }, // 27
6232  { 64.678903, 463.50 , 3.195 , 10.50 , 0.0 , 0.415 , -5.520 }, // 28
6233  { 65.224071, 274.80 , 3.815 , 10.20 , 0.0 , 0.069 , -5.520 }, // 29
6234  { 65.764772, 153.00 , 4.485 , 10.00 , 0.0 , -0.143 , -5.520 }, // 30
6235  { 66.302091, 80.09 , 5.225 , 9.70 , 0.0 , -0.428 , -5.520 }, // 31
6236  { 66.836830, 39.46 , 6.005 , 9.40 , 0.0 , -0.726 , -5.520 }, // 32
6237  { 67.369598, 18.32 , 6.845 , 9.20 , 0.0 , -1.002 , -5.520 }, // 33
6238  { 67.900867, 8.01 , 7.745 , 8.90 , 0.0 , -1.255 , -5.520 }, // 34
6239  { 68.431005, 3.30 , 8.695 , 8.70 , 0.0 , -1.500 , -5.520 }, // 35
6240  { 68.960311, 1.28 , 9.695 , 8.60 , 0.0 , -1.700 , -5.520 }, // 36
6241  { 118.750343, 945.00 , 0.009 , 16.30 , 0.0 , -0.247 , 0.003 }, // 37
6242  { 368.498350, 67.90 , 0.049 , 19.20 , 0.6 , 0.000 , 0.000 }, // 38
6243  { 424.763124, 638.00 , 0.044 , 19.16 , 0.6 , 0.000 , 0.000 }, // 39
6244  { 487.249370, 235.00 , 0.049 , 19.20 , 0.6 , 0.000 , 0.000 }, // 40
6245  { 715.393150, 99.60 , 0.145 , 18.10 , 0.6 , 0.000 , 0.000 }, // 41
6246  { 773.839675, 671.00 , 0.130 , 18.10 , 0.6 , 0.000 , 0.000 }, // 42
6247  { 834.145330, 180.00 , 0.147 , 18.10 , 0.6 , 0.000 , 0.000 } // 43
6248  };
6249 
6250  // number of lines of Liebe O2-line catalog (0-43 lines)
6251  const Index i_first = 0;
6252  const Index i_last = 43; // all the spec. lines up to 1THz
6253  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6254 
6255 
6256  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6257  // standard values for the MPM89 model (IJIMW, Vol 10, pp. 631-650, 1989):
6258  const Numeric CC_MPM89 = 1.00000;
6259  const Numeric CL_MPM89 = 1.00000;
6260  const Numeric CW_MPM89 = 1.00000;
6261  const Numeric CO_MPM89 = 1.00000;
6262  int AppCutoff = 0;
6263  // ---------------------------------------------------------------------------------------
6264 
6265 
6266  // select the parameter set (!!model dominates values!!):
6267  Numeric CC, CL, CW, CO;
6268  if ( model == "MPM89" )
6269  {
6270  CC = CC_MPM89;
6271  CL = CL_MPM89;
6272  CW = CW_MPM89;
6273  CO = CO_MPM89;
6274  }
6275  else if ( model == "MPM89Lines" )
6276  {
6277  CC = 0.000;
6278  CL = CL_MPM89;
6279  CW = CW_MPM89;
6280  CO = CO_MPM89;
6281  }
6282  else if ( model == "MPM89Continuum" )
6283  {
6284  CC = CC_MPM89;
6285  CL = 0.000;
6286  CW = 0.000;
6287  CO = 0.000;
6288  }
6289  else if ( model == "MPM89NoCoupling" )
6290  {
6291  CC = CC_MPM89;
6292  CL = CL_MPM89;
6293  CW = CW_MPM89;
6294  CO = 0.000;
6295  }
6296  else if ( model == "MPM89NoCutoff" )
6297  {
6298  CC = CC_MPM89;
6299  CL = CL_MPM89;
6300  CW = CW_MPM89;
6301  CO = CO_MPM89;
6302  AppCutoff = 1;
6303  }
6304  else if ( model == "user" )
6305  {
6306  CC = CCin;
6307  CL = CLin;
6308  CW = CWin;
6309  CO = COin;
6310  }
6311  else
6312  {
6313  ostringstream os;
6314  os << "O2-MPM89: ERROR! Wrong model values given.\n"
6315  << "Valid models are: 'MPM89' 'MPM89Lines' 'MPM89Continuum' 'MPM89NoCoupling' 'MPM89NoCutoff'"
6316  << "and 'user'" << '\n';
6317  throw runtime_error(os.str());
6318  }
6319  out3 << "O2-MPM89: (model=" << model << ") parameter values in use:\n"
6320  << " CC = " << CC << "\n"
6321  << " CL = " << CL << "\n"
6322  << " CW = " << CW << "\n"
6323  << " CO = " << CO << "\n";
6324 
6325 
6326  // O2 continuum parameters of MPM92:
6327  const Numeric S0 = 6.140e-4; // line strength [ppm]
6328  const Numeric G0 = 5.60e-3; // line width [GHz/kPa]
6329  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6330 
6331  const Index n_p = abs_p.nelem(); // Number of pressure levels
6332  const Index n_f = f_grid.nelem(); // Number of frequencies
6333 
6334  // const = VMR * ISORATIO = 0.20946 * 0.99519
6335  // this constant is already incorporated into the line strength, so we
6336  // have top devide the line strength by this value since arts multiplies pxsec
6337  // by these variables later in abs_coefCalc.
6338  const Numeric VMRISO = 0.2085;
6339 
6340  // Check that dimensions of abs_p, abs_t, and vmr agree:
6341  assert ( n_p==abs_t.nelem() );
6342  assert ( n_p==vmr.nelem() );
6343 
6344  // Check that dimensions of pxsec are consistent with n_f
6345  // and n_p. It should be [n_f,n_p]:
6346  assert ( n_f==pxsec.nrows() );
6347  assert ( n_p==pxsec.ncols() );
6348 
6349  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6350  for ( Index i=0; i<n_p; ++i )
6351  {
6352  // check if O2-VMR will cause an underflow due to division by zero:
6353  if (vmr[i] < VMRCalcLimit)
6354  {
6355  ostringstream os;
6356  os << "ERROR: MPM89 O2 full absorption model has detected a O2 volume mixing ratio of "
6357  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6358  << "Therefore no calculation is performed.\n";
6359  throw runtime_error(os.str());
6360  return;
6361  }
6362 
6363  // relative inverse temperature [1]
6364  Numeric theta = (300.0 / abs_t[i]);
6365  // H2O partial pressure [kPa]
6366  Numeric pwv = Pa_to_kPa * abs_p[i] * abs_h2o[i];
6367  // dry air partial pressure [kPa]
6368  Numeric pda = (Pa_to_kPa * abs_p[i]) - pwv;
6369  // here the total pressure is devided by the O2 vmr for the
6370  // P_dry calculation because we calculate pxsec and not abs: abs = vmr * pxsec
6371  Numeric pda_dummy = pda;
6372  // O2 continuum strength [ppm]
6373  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6374  // O2 continuum pseudo line broadening [GHz]
6375  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6376 
6377  // Loop over input frequency
6378  for ( Index s=0; s<n_f; ++s )
6379  {
6380  // input frequency in [GHz]
6381  Numeric ff = f_grid[s] * Hz_to_GHz;
6382  // O2 continuum absorption [1/m]
6383  // cross section: pxsec = absorption / var
6384  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6385  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6386  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6387 
6388  // Loop over MPM89 O2 spectral lines:
6389  Numeric Nppl = 0.0;
6390  for ( Index l = i_first; l <= i_last; ++l )
6391  {
6392  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6393  Numeric strength = CL * mpm89[l][1] * 1.000e-6 * pda_dummy *
6394  pow(theta, (Numeric)3.) * exp(mpm89[l][2]*(1.000-theta)) /
6395  mpm89[l][0];
6396  // line broadening parameter [GHz]
6397  Numeric gam = CW * ( mpm89[l][3] * 1.000e-3 *
6398  ( ( pda * pow(theta, ((Numeric)0.80-mpm89[l][4]))) +
6399  (1.10 * pwv * theta) ) );
6400  // line mixing parameter [1]
6401  Numeric delta = CO * ( (mpm89[l][5] + mpm89[l][6] * theta) * 1.000e-3 *
6402  pda * pow(theta, (Numeric)0.8) );
6403  // absorption [dB/km] like in the original MPM92
6404  Nppl += strength * MPMLineShapeO2Function(gam, mpm89[l][0], ff, delta);
6405  }
6406  // in MPM89 we adopt the cutoff for O2 line absorption if abs_l < 0
6407  // absorption cannot be less than 0 according to MPM87 source code.
6408  if (AppCutoff == 0)
6409  {
6410  if (Nppl < 0.000) Nppl = 0.0000;
6411  }
6412  //
6413  // O2 line absorption [1/m]
6414  // cross section: pxsec = absorption / var
6415  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6416  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6417  }
6418  }
6419  return;
6420 }
6421 //
6422 // #################################################################################
6423 //
6425 
6456  const Numeric CCin, // continuum scale factor
6457  const Numeric CLin, // line strength scale factor
6458  const Numeric CWin, // line broadening scale factor
6459  const Numeric COin, // line coupling scale factor
6460  const String& model,
6461  ConstVectorView f_grid,
6462  ConstVectorView abs_p,
6463  ConstVectorView abs_t,
6464  ConstVectorView abs_h2o,
6465  ConstVectorView vmr,
6466  const Verbosity& verbosity)
6467 {
6468  CREATE_OUT3
6469 
6470  //
6471  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6472  // 0 1 2 3 4 5 6
6473  // f0 a1 a2 a3 a4 a5 a6
6474  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [10³/hPa]
6475  const Numeric mpm92[44][7] = {
6476  { 50.474238, 0.094, 9.694, 0.850, 0.0, 0.210, 0.685}, // 0
6477  { 50.987749, 0.246, 8.694, 0.870, 0.0, 0.190, 0.680}, // 1
6478  { 51.503350, 0.608, 7.744, 0.890, 0.0, 0.171, 0.673}, // 2
6479  { 52.021410, 1.414, 6.844, 0.920, 0.0, 0.144, 0.664}, // 3
6480  { 52.542394, 3.102, 6.004, 0.940, 0.0, 0.118, 0.653}, // 4
6481  { 53.066907, 6.410, 5.224, 0.970, 0.0, 0.114, 0.621}, // 5
6482  { 53.595749, 12.470, 4.484, 1.000, 0.0, 0.200, 0.508}, // 6
6483  { 54.130000, 22.800, 3.814, 1.020, 0.0, 0.291, 0.375}, // 7
6484  { 54.671159, 39.180, 3.194, 1.050, 0.0, 0.325, 0.265}, // 8
6485  { 55.221367, 63.160, 2.624, 1.080, 0.0, 0.224, 0.295}, // 9
6486  { 55.783802, 95.350, 2.119, 1.110, 0.0, -0.144, 0.613}, // 0
6487  { 56.264775, 54.890, 0.015, 1.646, 0.0, 0.339, -0.098}, // 11
6488  { 56.363389, 134.400, 1.660, 1.144, 0.0, -0.258, 0.655}, // 12
6489  { 56.968206, 176.300, 1.260, 1.181, 0.0, -0.362, 0.645}, // 13
6490  { 57.612484, 214.100, 0.915, 1.221, 0.0, -0.533, 0.606}, // 14
6491  { 58.323877, 238.600, 0.626, 1.266, 0.0, -0.178, 0.044}, // 15
6492  { 58.446590, 145.700, 0.084, 1.449, 0.0, 0.650, -0.127}, // 16
6493  { 59.164207, 240.400, 0.391, 1.319, 0.0, -0.628, 0.231}, // 17
6494  { 59.590983, 211.200, 0.212, 1.360, 0.0, 0.665, -0.078}, // 18
6495  { 60.306061, 212.400, 0.212, 1.382, 0.0, -0.613, 0.070}, // 19
6496  { 60.434776, 246.100, 0.391, 1.297, 0.0, 0.606, -0.282}, // 20
6497  { 61.150560, 250.400, 0.626, 1.248, 0.0, 0.090, -0.058}, // 21
6498  { 61.800154, 229.800, 0.915, 1.207, 0.0, 0.496, -0.662}, // 22
6499  { 62.411215, 193.300, 1.260, 1.171, 0.0, 0.313, -0.676}, // 23
6500  { 62.486260, 151.700, 0.083, 1.468, 0.0, -0.433, 0.084}, // 24
6501  { 62.997977, 150.300, 1.665, 1.139, 0.0, 0.208, -0.668}, // 25
6502  { 63.568518, 108.700, 2.115, 1.110, 0.0, 0.094, -0.614}, // 26
6503  { 64.127767, 73.350, 2.620, 1.080, 0.0, -0.270, -0.289}, // 27
6504  { 64.678903, 46.350, 3.195, 1.050, 0.0, -0.366, -0.259}, // 28
6505  { 65.224071, 27.480, 3.815, 1.020, 0.0, -0.326, -0.368}, // 29
6506  { 65.764772, 15.300, 4.485, 1.000, 0.0, -0.232, -0.500}, // 30
6507  { 66.302091, 8.009, 5.225, 0.970, 0.0, -0.146, -0.609}, // 31
6508  { 66.836830, 3.946, 6.005, 0.940, 0.0, -0.147, -0.639}, // 32
6509  { 67.369598, 1.832, 6.845, 0.920, 0.0, -0.174, -0.647}, // 33
6510  { 67.900867, 0.801, 7.745, 0.890, 0.0, -0.198, -0.655}, // 34
6511  { 68.431005, 0.330, 8.695, 0.870, 0.0, -0.210, -0.660}, // 35
6512  { 68.960311, 0.128, 9.695, 0.850, 0.0, -0.220, -0.665}, // 36
6513  { 118.750343, 94.500, 0.009, 1.630, 0.0, -0.031, 0.008}, // 37
6514  { 368.498350, 6.790, 0.049, 1.920, 0.6, 0.000, 0.000}, // 38
6515  { 424.763124, 63.800, 0.044, 1.926, 0.6, 0.000, 0.000}, // 39
6516  { 487.249370, 23.500, 0.049, 1.920, 0.6, 0.000, 0.000}, // 40
6517  { 715.393150, 9.960, 0.145, 1.810, 0.6, 0.000, 0.000}, // 41
6518  { 773.839675, 67.100, 0.130, 1.810, 0.6, 0.000, 0.000}, // 42
6519  { 834.145330, 18.000, 0.147, 1.810, 0.6, 0.000, 0.000}}; // 43
6520 
6521  // number of lines of Liebe O2-line catalog (0-43 lines)
6522  const Index i_first = 0;
6523  const Index i_last = 43; // all the spec. lines up to 1THz
6524  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6525 
6526 
6527  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6528  // standard values for the MPM92 model (JQSRT, Vol 48, pp. 629-643, 1992):
6529  const Numeric CC_MPM92 = 1.00000;
6530  const Numeric CL_MPM92 = 1.00000;
6531  const Numeric CW_MPM92 = 1.00000;
6532  const Numeric CO_MPM92 = 1.00000;
6533  int AppCutoff = 0;
6534  // ---------------------------------------------------------------------------------------
6535 
6536 
6537  // select the parameter set (!!model dominates values!!):
6538  Numeric CC, CL, CW, CO;
6539  if ( model == "MPM92" )
6540  {
6541  CC = CC_MPM92;
6542  CL = CL_MPM92;
6543  CW = CW_MPM92;
6544  CO = CO_MPM92;
6545  }
6546  else if ( model == "MPM92Lines" )
6547  {
6548  CC = 0.000;
6549  CL = CL_MPM92;
6550  CW = CW_MPM92;
6551  CO = CO_MPM92;
6552  }
6553  else if ( model == "MPM92Continuum" )
6554  {
6555  CC = CC_MPM92;
6556  CL = 0.000;
6557  CW = 0.000;
6558  CO = 0.000;
6559  }
6560  else if ( model == "MPM92NoCoupling" )
6561  {
6562  CC = CC_MPM92;
6563  CL = CL_MPM92;
6564  CW = CW_MPM92;
6565  CO = 0.000;
6566  }
6567  else if ( model == "MPM92NoCutoff" )
6568  {
6569  CC = CC_MPM92;
6570  CL = CL_MPM92;
6571  CW = CW_MPM92;
6572  CO = CO_MPM92;
6573  AppCutoff = 1;
6574  }
6575  else if ( model == "user" )
6576  {
6577  CC = CCin;
6578  CL = CLin;
6579  CW = CWin;
6580  CO = COin;
6581  }
6582  else
6583  {
6584  ostringstream os;
6585  os << "O2-MPM92: ERROR! Wrong model values given.\n"
6586  << "Valid models are: 'MPM92' 'MPM92Lines' 'MPM92Continuum' 'MPM92NoCoupling' 'MPM92NoCutoff'"
6587  << "and 'user'" << '\n';
6588  throw runtime_error(os.str());
6589  }
6590  out3 << "O2-MPM92: (model=" << model << ") parameter values in use:\n"
6591  << " CC = " << CC << "\n"
6592  << " CL = " << CL << "\n"
6593  << " CW = " << CW << "\n"
6594  << " CO = " << CO << "\n";
6595 
6596 
6597  // const = VMR * ISORATIO = 0.20946 * 0.99519
6598  // this constant is already incorporated into the line strength, so we
6599  // have top devide the line strength by this value since arts multiplies pxsec
6600  // by these variables later in abs_coefCalc.
6601  const Numeric VMRISO = 0.2085;
6602 
6603  // O2 continuum parameters of MPM92:
6604  const Numeric S0 = 6.140e-5; // line strength [ppm]
6605  const Numeric G0 = 0.560e-3; // line width [GHz/hPa]
6606  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6607 
6608  const Index n_p = abs_p.nelem(); // Number of pressure levels
6609  const Index n_f = f_grid.nelem(); // Number of frequencies
6610 
6611  // Check that dimensions of abs_p, abs_t, and vmr agree:
6612  assert ( n_p==abs_t.nelem() );
6613  assert ( n_p==vmr.nelem() );
6614 
6615  // Check that dimensions of pxsec are consistent with n_f
6616  // and n_p. It should be [n_f,n_p]:
6617  assert ( n_f==pxsec.nrows() );
6618  assert ( n_p==pxsec.ncols() );
6619 
6620  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6621  for ( Index i=0; i<n_p; ++i )
6622  {
6623  // check if O2-VMR will cause an underflow due to division by zero:
6624  if (vmr[i] < VMRCalcLimit)
6625  {
6626  ostringstream os;
6627  os << "ERROR: MPM92 O2 full absorption model has detected a O2 volume mixing ratio of "
6628  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6629  << "Therefore no calculation is performed.\n";
6630  throw runtime_error(os.str());
6631  return;
6632  }
6633 
6634  // relative inverse temperature [1]
6635  Numeric theta = (300.0 / abs_t[i]);
6636  // H2O partial pressure [hPa]
6637  Numeric pwv = Pa_to_hPa * abs_p[i] * abs_h2o[i];
6638  // dry air partial pressure [hPa]
6639  Numeric pda = (Pa_to_hPa * abs_p[i]) - pwv;
6640  // here the total pressure is devided by the O2 vmr for the
6641  // P_dry calculation because we calculate pxsec and not abs: abs = vmr * pxsec
6642  Numeric pda_dummy = pda;
6643  // O2 continuum strength [ppm]
6644  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6645  // O2 continuum pseudo line broadening [GHz]
6646  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6647 
6648  // Loop over input frequency
6649  for ( Index s=0; s<n_f; ++s )
6650  {
6651  // input frequency in [GHz]
6652  Numeric ff = f_grid[s] * Hz_to_GHz;
6653  // O2 continuum absorption [1/m]
6654  // cross section: pxsec = absorption / var
6655  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6656  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6657  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6658 
6659  // Loop over MPM92 O2 spectral lines:
6660  Numeric Nppl = 0.0;
6661  for ( Index l = i_first; l <= i_last; ++l )
6662  {
6663  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6664  Numeric strength = CL * 1.000e-6 * pda_dummy * mpm92[l][1] / mpm92[l][0] *
6665  pow(theta, (Numeric)3.) * exp(mpm92[l][2]*(1.0-theta));
6666  // line broadening parameter [GHz]
6667  Numeric gam = CW * ( mpm92[l][3] * 0.001 *
6668  ( ( pda * pow(theta, ((Numeric)0.8-mpm92[l][4]))) +
6669  (1.10 * pwv * theta) ) );
6670  // line mixing parameter [1]
6671  // if (l < 11) CD = 1.1000;
6672  Numeric delta = CO * ( (mpm92[l][5] + mpm92[l][6] * theta) *
6673  (pda+pwv) * 0.001 * pow(theta, (Numeric)0.8) );
6674  // absorption [dB/km] like in the original MPM92
6675  Nppl += strength * MPMLineShapeO2Function(gam, mpm92[l][0], ff, delta);
6676  }
6677  // in MPM92 we adopt the cutoff for O2 line absorption if abs_l < 0
6678  // absorption cannot be less than 0 according to MPM87 and MPM93 source code.
6679  if (AppCutoff == 0)
6680  {
6681  if (Nppl < 0.000) Nppl = 0.0000;
6682  }
6683  //
6684  // O2 line absorption [1/m]
6685  // cross section: pxsec = absorption / var
6686  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6687  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6688  }
6689  }
6690  return;
6691 }
6692 //
6693 // #################################################################################
6695 
6727  const Numeric CCin, // continuum scale factor
6728  const Numeric CLin, // line strength scale factor
6729  const Numeric CWin, // line broadening scale factor
6730  const Numeric COin, // line coupling scale factor
6731  const String& model,
6732  ConstVectorView f_grid,
6733  ConstVectorView abs_p,
6734  ConstVectorView abs_t,
6735  ConstVectorView abs_h2o, // VMR 0f H2O
6736  ConstVectorView vmr, // VMR of O2
6737  const Verbosity& verbosity)
6738 {
6739  CREATE_OUT3
6740 
6741  //
6742  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6743  // 0 1 2 3 4 5 6
6744  // f0 a1 a2 a3 a4 a5 a6
6745  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [10³/hPa]
6746  const Numeric mpm93[44][7] = {
6747  { 50.474238, 0.094, 9.694, 0.890, 0.0, 0.240, 0.790}, // 0
6748  { 50.987749, 0.246, 8.694, 0.910, 0.0, 0.220, 0.780}, // 1
6749  { 51.503350, 0.608, 7.744, 0.940, 0.0, 0.197, 0.774}, // 2
6750  { 52.021410, 1.414, 6.844, 0.970, 0.0, 0.166, 0.764}, // 3
6751  { 52.542394, 3.102, 6.004, 0.990, 0.0, 0.136, 0.751}, // 4
6752  { 53.066907, 6.410, 5.224, 1.020, 0.0, 0.131, 0.714}, // 5
6753  { 53.595749, 12.470, 4.484, 1.050, 0.0, 0.230, 0.584}, // 6
6754  { 54.130000, 22.800, 3.814, 1.070, 0.0, 0.335, 0.431}, // 7
6755  { 54.671159, 39.180, 3.194, 1.100, 0.0, 0.374, 0.305}, // 8
6756  { 55.221367, 63.160, 2.624, 1.130, 0.0, 0.258, 0.339}, // 9
6757  { 55.783802, 95.350, 2.119, 1.170, 0.0, -0.166, 0.705}, // 10
6758  { 56.264775, 54.890, 0.015, 1.730, 0.0, 0.390, -0.113}, // 11
6759  { 56.363389, 134.400, 1.660, 1.200, 0.0, -0.297, 0.753}, // 12
6760  { 56.968206, 176.300, 1.260, 1.240, 0.0, -0.416, 0.742}, // 13
6761  { 57.612484, 214.100, 0.915, 1.280, 0.0, -0.613, 0.697}, // 14
6762  { 58.323877, 238.600, 0.626, 1.330, 0.0, -0.205, 0.051}, // 15
6763  { 58.446590, 145.700, 0.084, 1.520, 0.0, 0.748, -0.146}, // 16
6764  { 59.164207, 240.400, 0.391, 1.390, 0.0, -0.722, 0.266}, // 17
6765  { 59.590983, 211.200, 0.212, 1.430, 0.0, 0.765, -0.090}, // 18
6766  { 60.306061, 212.400, 0.212, 1.450, 0.0, -0.705, 0.081}, // 19
6767  { 60.434776, 246.100, 0.391, 1.360, 0.0, 0.697, -0.324}, // 20
6768  { 61.150560, 250.400, 0.626, 1.310, 0.0, 0.104, -0.067}, // 21
6769  { 61.800154, 229.800, 0.915, 1.270, 0.0, 0.570, -0.761}, // 22
6770  { 62.411215, 193.300, 1.260, 1.230, 0.0, 0.360, -0.777}, // 23
6771  { 62.486260, 151.700, 0.083, 1.540, 0.0, -0.498, 0.097}, // 24
6772  { 62.997977, 150.300, 1.665, 1.200, 0.0, 0.239, -0.768}, // 25
6773  { 63.568518, 108.700, 2.115, 1.170, 0.0, 0.108, -0.706}, // 26
6774  { 64.127767, 73.350, 2.620, 1.130, 0.0, -0.311, -0.332}, // 27
6775  { 64.678903, 46.350, 3.195, 1.100, 0.0, -0.421, -0.298}, // 28
6776  { 65.224071, 27.480, 3.815, 1.070, 0.0, -0.375, -0.423}, // 29
6777  { 65.764772, 15.300, 4.485, 1.050, 0.0, -0.267, -0.575}, // 30
6778  { 66.302091, 8.009, 5.225, 1.020, 0.0, -0.168, -0.700}, // 31
6779  { 66.836830, 3.946, 6.005, 0.990, 0.0, -0.169, -0.735}, // 32
6780  { 67.369598, 1.832, 6.845, 0.970, 0.0, -0.200, -0.744}, // 33
6781  { 67.900867, 0.801, 7.745, 0.940, 0.0, -0.228, -0.753}, // 34
6782  { 68.431005, 0.330, 8.695, 0.920, 0.0, -0.240, -0.760}, // 35
6783  { 68.960311, 0.128, 9.695, 0.900, 0.0, -0.250, -0.765}, // 36
6784  { 118.750343, 94.500, 0.009, 1.630, 0.0, -0.036, 0.009}, // 37
6785  { 368.498350, 6.790, 0.049, 1.920, 0.6, 0.000, 0.000}, // 38
6786  { 424.763124, 63.800, 0.044, 1.930, 0.6, 0.000, 0.000}, // 39
6787  { 487.249370, 23.500, 0.049, 1.920, 0.6, 0.000, 0.000}, // 40
6788  { 715.393150, 9.960, 0.145, 1.810, 0.6, 0.000, 0.000}, // 41
6789  { 773.839675, 67.100, 0.130, 1.820, 0.6, 0.000, 0.000}, // 42
6790  { 834.145330, 18.000, 0.147, 1.810 , 0.6, 0.000, 0.000}}; // 43
6791  // number of lines of Liebe O2-line catalog (0-43 lines)
6792  const Index i_first = 0;
6793  const Index i_last = 43; // all the spec. lines up to 1THz
6794  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6795 
6796 
6797  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6798  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
6799  const Numeric CC_MPM93 = 1.00000;
6800  const Numeric CL_MPM93 = 1.00000;
6801  const Numeric CW_MPM93 = 1.00000;
6802  const Numeric CO_MPM93 = 1.00000;
6803  int AppCutoff = 0;
6804  // ---------------------------------------------------------------------------------------
6805 
6806 
6807  // select the parameter set (!!model dominates values!!):
6808  Numeric CC, CL, CW, CO;
6809  if ( model == "MPM93" )
6810  {
6811  CC = CC_MPM93;
6812  CL = CL_MPM93;
6813  CW = CW_MPM93;
6814  CO = CO_MPM93;
6815  }
6816  else if ( model == "MPM93Lines" )
6817  {
6818  CC = 0.000;
6819  CL = CL_MPM93;
6820  CW = CW_MPM93;
6821  CO = CO_MPM93;
6822  }
6823  else if ( model == "MPM93Continuum" )
6824  {
6825  CC = CC_MPM93;
6826  CL = 0.000;
6827  CW = 0.000;
6828  CO = 0.000;
6829  }
6830  else if ( model == "MPM93NoCoupling" )
6831  {
6832  CC = CC_MPM93;
6833  CL = CL_MPM93;
6834  CW = CW_MPM93;
6835  CO = 0.000;
6836  }
6837  else if ( model == "MPM93NoCutoff" )
6838  {
6839  // !!ATTENTION!!
6840  // In the window regions the total absorption can get negative values.
6841  // So be carefull with this selection!
6842  CC = CC_MPM93;
6843  CL = CL_MPM93;
6844  CW = CW_MPM93;
6845  CO = CO_MPM93;
6846  AppCutoff = 1;
6847  }
6848  else if ( model == "user" )
6849  {
6850  CC = CCin;
6851  CL = CLin;
6852  CW = CWin;
6853  CO = COin;
6854  }
6855  else
6856  {
6857  ostringstream os;
6858  os << "O2-MPM93: ERROR! Wrong model values given.\n"
6859  << "Valid models are: 'MPM93' 'MPM93Lines' 'MPM93Continuum' 'MPM93NoCoupling' 'MPM93NoCutoff'"
6860  << "and 'user'" << '\n';
6861  throw runtime_error(os.str());
6862  }
6863  out3 << "O2-MPM93: (model=" << model << ") parameter values in use:\n"
6864  << " CC = " << CC << "\n"
6865  << " CL = " << CL << "\n"
6866  << " CW = " << CW << "\n"
6867  << " CO = " << CO << "\n";
6868 
6869 
6870  // const = VMR * ISORATIO = 0.20946 * 0.99519
6871  // this constant is already incorporated into the line strength, so we
6872  // have top devide the line strength by this value since arts multiplies pxsec
6873  // by these variables later in abs_coefCalc.
6874  const Numeric VMRISO = 0.2085;
6875 
6876  // O2 continuum parameters of MPM93:
6877  const Numeric S0 = 6.140e-5; // line strength [ppm]
6878  const Numeric G0 = 0.560e-3; // line width [GHz/hPa]
6879  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6880 
6881  const Index n_p = abs_p.nelem(); // Number of pressure levels
6882  const Index n_f = f_grid.nelem(); // Number of frequencies
6883 
6884  // Check that dimensions of abs_p, abs_t, and vmr agree:
6885  assert ( n_p==abs_t.nelem() );
6886  assert ( n_p==vmr.nelem() );
6887 
6888  // Check that dimensions of pxsec are consistent with n_f
6889  // and n_p. It should be [n_f,n_p]:
6890  assert ( n_f==pxsec.nrows() );
6891  assert ( n_p==pxsec.ncols() );
6892 
6893  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6894  for ( Index i=0; i<n_p; ++i )
6895  {
6896  // check if O2-VMR will cause an underflow due to division by zero:
6897  if (vmr[i] < VMRCalcLimit)
6898  {
6899  ostringstream os;
6900  os << "ERROR: MPM93 O2 full absorption model has detected a O2 volume mixing ratio of "
6901  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6902  << "Therefore no calculation is performed.\n";
6903  throw runtime_error(os.str());
6904  return;
6905  }
6906 
6907  // relative inverse temperature [1]
6908  Numeric theta = (300.0 / abs_t[i]);
6909  // H2O partial pressure [hPa]
6910  Numeric pwv = Pa_to_hPa * abs_p[i] * abs_h2o[i];
6911  // dry air partial pressure [hPa]
6912  Numeric pda = (Pa_to_hPa * abs_p[i]) - pwv;
6913  // here the total pressure is devided by the O2 vmr for the
6914  // P_dry calculation because we calculate pxsec and not abs: abs = vmr * pxsec
6915  // old version without VMRISO: Numeric pda_dummy = pda / vmr[i];
6916  Numeric pda_dummy = pda;
6917  // O2 continuum strength [ppm]
6918  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6919  // O2 continuum pseudo line broadening [GHz]
6920  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6921 
6922  // Loop over input frequency
6923  for ( Index s=0; s<n_f; ++s )
6924  {
6925  // input frequency in [GHz]
6926  Numeric ff = f_grid[s] * Hz_to_GHz;
6927  // O2 continuum absorption [1/m]
6928  // cross section: pxsec = absorption / var
6929  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6930  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6931  ( pow( ff, (Numeric)2.)
6932  + pow( gam_cont, (Numeric)2.) );
6933 
6934  // Loop over MPM93 O2 spectral lines:
6935  Numeric Nppl = 0.0;
6936  for ( Index l = i_first; l <= i_last; ++l )
6937  {
6938  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6939  Numeric strength = CL * 1.000e-6 * pda_dummy *
6940  mpm93[l][1] / mpm93[l][0] *
6941  pow(theta, (Numeric)3.) * exp(mpm93[l][2]*(1.0-theta));
6942  // line broadening parameter [GHz]
6943  Numeric gam = CW * ( mpm93[l][3] * 0.001 *
6944  ( ( pda * pow(theta, ((Numeric)0.8-mpm93[l][4]))) +
6945  (1.10 * pwv * theta) ) );
6946  // line mixing parameter [1]
6947  // if (l < 11) CD = 1.1000;
6948  Numeric delta = CO * ( (mpm93[l][5] + mpm93[l][6] * theta) *
6949  (pda+pwv) * pow(theta, (Numeric)0.8)
6950  * (Numeric)0.001 );
6951  // absorption [dB/km] like in the original MPM93
6952  Nppl += strength * MPMLineShapeO2Function(gam, mpm93[l][0], ff, delta);
6953  }
6954  // in MPM93 there is a cutoff for O2 line absorption if abs_l < 0
6955  // absorption cannot be less than 0 according to MPM93 philosophy.
6956  if (AppCutoff == 0)
6957  {
6958  if (Nppl < 0.000) Nppl = 0.0000;// <---!!IMPORTANT FEATURE!!
6959  }
6960  //
6961  // O2 line absorption [1/m]
6962  // cross section: pxsec = absorption / var
6963  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6964  pxsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6965  }
6966  }
6967  return;
6968 }
6969 //
6970 // #################################################################################
6971 //
6973 
7025  const Numeric CCin, // model parameter
7026  const Numeric CLin, // model parameter
7027  const Numeric CWin, // model parameter
7028  const Numeric COin, // model parameter
7029  const String& model, // model selection string
7030  const String& version, // PWR98, PWR93 or PWR88
7031  ConstVectorView f_grid,
7032  ConstVectorView abs_p,
7033  ConstVectorView abs_t,
7034  ConstVectorView vmrh2o,
7035  ConstVectorView vmr,
7036  const Verbosity& verbosity)
7037 {
7038  CREATE_OUT3
7039 
7040  const Index n_lines = 40; // all O2 lines in this model (range: 50-850 GHz)
7041  //
7042  // lines are arranged 1-,1+,3-,3+,etc. in spin-rotation spectrum
7043  // line center frequency in [GHz]
7044  const Numeric F93[n_lines] = { 118.7503, 56.2648, 62.4863, 58.4466, // 00-03
7045  60.3061, 59.5910, 59.1642, 60.4348, // 04-07
7046  58.3239, 61.1506, 57.6125, 61.8002, // 08-11
7047  56.9682, 62.4112, 56.3634, 62.9980, // 12-15
7048  55.7838, 63.5685, 55.2214, 64.1278, // 16-19
7049  54.6712, 64.6789, 54.1300, 65.2241, // 20-23
7050  53.5957, 65.7648, 53.0669, 66.3021, // 24-27
7051  52.5424, 66.8368, 52.0214, 67.3696, // 28-31
7052  51.5034, 67.9009, 368.4984, 424.7631, // 32-35
7053  487.2494, 715.3932, 773.8397, 834.1453}; // 36-39
7054 
7055  // intensities in the submm range are updated according to HITRAN96
7056  const Numeric F98[n_lines] = { 118.7503, 56.2648, 62.4863, 58.4466, 60.3061, 59.5910,
7057  59.1642, 60.4348, 58.3239, 61.1506, 57.6125, 61.8002,
7058  56.9682, 62.4112, 56.3634, 62.9980, 55.7838, 63.5685,
7059  55.2214, 64.1278, 54.6712, 64.6789, 54.1300, 65.2241,
7060  53.5957, 65.7648, 53.0669, 66.3021, 52.5424, 66.8368,
7061  52.0214, 67.3696, 51.5034, 67.9009, 368.4984, 424.7632,
7062  487.2494, 715.3931, 773.8397, 834.1458};
7063 
7064 
7065  // line strength at T=300K in [cm² * Hz]
7066  const Numeric S93[n_lines] = { 0.2936E-14, 0.8079E-15, 0.2480E-14, 0.2228E-14,
7067  0.3351E-14, 0.3292E-14, 0.3721E-14, 0.3891E-14,
7068  0.3640E-14, 0.4005E-14, 0.3227E-14, 0.3715E-14,
7069  0.2627E-14, 0.3156E-14, 0.1982E-14, 0.2477E-14,
7070  0.1391E-14, 0.1808E-14, 0.9124E-15, 0.1230E-14,
7071  0.5603E-15, 0.7842E-15, 0.3228E-15, 0.4689E-15,
7072  0.1748E-15, 0.2632E-15, 0.8898E-16, 0.1389E-15,
7073  0.4264E-16, 0.6899E-16, 0.1924E-16, 0.3229E-16,
7074  0.8191E-17, 0.1423E-16, 0.6460E-15, 0.7047E-14,
7075  0.3011E-14, 0.1826E-14, 0.1152E-13, 0.3971E-14};
7076 
7077  // intensities in the submm range are updated according to HITRAN96
7078  const Numeric S98[n_lines] = { 0.2936E-14, 0.8079E-15, 0.2480E-14, 0.2228E-14,
7079  0.3351E-14, 0.3292E-14, 0.3721E-14, 0.3891E-14,
7080  0.3640E-14, 0.4005E-14, 0.3227E-14, 0.3715E-14,
7081  0.2627E-14, 0.3156E-14, 0.1982E-14, 0.2477E-14,
7082  0.1391E-14, 0.1808E-14, 0.9124E-15, 0.1230E-14,
7083  0.5603E-15, 0.7842E-15, 0.3228E-15, 0.4689E-15,
7084  0.1748E-15, 0.2632E-15, 0.8898E-16, 0.1389E-15,
7085  0.4264E-16, 0.6899E-16, 0.1924E-16, 0.3229E-16,
7086  0.8191E-17, 0.1423E-16, 0.6494E-15, 0.7083E-14,
7087  0.3025E-14, 0.1835E-14, 0.1158E-13, 0.3993E-14};
7088 
7089  // temperature exponent of the line strength in [1]
7090  const Numeric BE[n_lines] = { 0.009, 0.015, 0.083, 0.084,
7091  0.212, 0.212, 0.391, 0.391,
7092  0.626, 0.626, 0.915, 0.915,
7093  1.260, 1.260, 1.660, 1.665,
7094  2.119, 2.115, 2.624, 2.625,
7095  3.194, 3.194, 3.814, 3.814,
7096  4.484, 4.484, 5.224, 5.224,
7097  6.004, 6.004, 6.844, 6.844,
7098  7.744, 7.744, 0.048, 0.044,
7099  0.049, 0.145, 0.141, 0.145};
7100 
7101  // widths in MHz/mbar for the O2 continuum
7102  const Numeric WB300 = 0.56; // [MHz/mbar]=[MHz/hPa]
7103  const Numeric X = 0.80; // [1]
7104 
7105  // line width parameter [GHz/bar]
7106  const Numeric W300[n_lines] = { 1.630, 1.646, 1.468, 1.449,
7107  1.382, 1.360, 1.319, 1.297,
7108  1.266, 1.248, 1.221, 1.207,
7109  1.181, 1.171, 1.144, 1.139,
7110  1.110, 1.108, 1.079, 1.078,
7111  1.050, 1.050, 1.020, 1.020,
7112  1.000, 1.000, 0.970, 0.970,
7113  0.940, 0.940, 0.920, 0.920,
7114  0.890, 0.890, 1.920, 1.920,
7115  1.920, 1.810, 1.810, 1.810};
7116 
7117  // y parameter for the calculation of Y [1/bar]
7118  const Numeric Y93[n_lines] = { -0.0233, 0.2408, -0.3486, 0.5227,
7119  -0.5430, 0.5877, -0.3970, 0.3237,
7120  -0.1348, 0.0311, 0.0725, -0.1663,
7121  0.2832, -0.3629, 0.3970, -0.4599,
7122  0.4695, -0.5199, 0.5187, -0.5597,
7123  0.5903, -0.6246, 0.6656, -0.6942,
7124  0.7086, -0.7325, 0.7348, -0.7546,
7125  0.7702, -0.7864, 0.8083, -0.8210,
7126  0.8439, -0.8529, 0.0000, 0.0000,
7127  0.0000, 0.0000, 0.0000, 0.0000};
7128 
7129  // y parameter for the calculation of Y [1/bar].
7130  // These values are from P. W. Rosenkranz, Interference coefficients for the
7131  // overlapping oxygen lines in air, JQSRT, 1988, Volume 39, 287-297.
7132  const Numeric Y88[n_lines] = { -0.0244, 0.2772, -0.4068, 0.6270,
7133  -0.6183, 0.6766, -0.4119, 0.3290,
7134  0.0317, -0.1591, 0.1145, -0.2068,
7135  0.3398, -0.4158, 0.3922, -0.4482,
7136  0.4011, -0.4442, 0.4339, -0.4687,
7137  0.4783, -0.5074, 0.5157, -0.5403,
7138  0.5400, -0.5610, 0.5719, -0.5896,
7139  0.6046, -0.6194, 0.6347, -0.6468,
7140  0.6627, -0.6718, 0.0000, 0.0000,
7141  0.0000, 0.0000, 0.0000, 0.0000};
7142 
7143  // v parameter for the calculation of Y [1/bar]
7144  const Numeric V[n_lines] ={ 0.0079, -0.0978, 0.0844, -0.1273,
7145  0.0699, -0.0776, 0.2309, -0.2825,
7146  0.0436, -0.0584, 0.6056, -0.6619,
7147  0.6451, -0.6759, 0.6547, -0.6675,
7148  0.6135, -0.6139, 0.2952, -0.2895,
7149  0.2654, -0.2590, 0.3750, -0.3680,
7150  0.5085, -0.5002, 0.6206, -0.6091,
7151  0.6526, -0.6393, 0.6640, -0.6475,
7152  0.6729, -0.6545, 0.0000, 0.0000,
7153  0.0000, 0.0000, 0.0000, 0.0000};
7154  // range of lines to take into account for the line absorption part
7155  const Index first_line = 0; // first line for calculation
7156  const Index last_line = 39; // last line for calculation
7157 
7158  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7159  // standard values for the Rosenkranz model
7160  // (P. W. Rosenkranz, Chapter 2, pp 74, in M. A. Janssen,
7161  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993):
7162  const Numeric CC_PWR93 = 1.00000;
7163  const Numeric CL_PWR93 = 1.00000;
7164  const Numeric CW_PWR93 = 1.00000;
7165  const Numeric CO_PWR93 = 1.00000;
7166  // ---------------------------------------------------------------------------------------
7167 
7168 
7169  // select the parameter set (!!model dominates values!!):
7170  Numeric CC, CL, CW, CO, Y300[n_lines], S300[n_lines], F[n_lines];
7171  // FIXME int oldnewflag = 0;
7172 
7173  if ( model == "Rosenkranz" )
7174  {
7175  CC = CC_PWR93;
7176  CL = CL_PWR93;
7177  CW = CW_PWR93;
7178  CO = CO_PWR93;
7179  }
7180  else if ( model == "RosenkranzLines" )
7181  {
7182  CC = 0.000;
7183  CL = CL_PWR93;
7184  CW = CW_PWR93;
7185  CO = CO_PWR93;
7186  }
7187  else if ( model == "RosenkranzContinuum" )
7188  {
7189  CC = CC_PWR93;
7190  CL = 0.000;
7191  CW = 0.000;
7192  CO = 0.000;
7193  }
7194  else if ( model == "RosenkranzNoCoupling" )
7195  {
7196  CC = CC_PWR93;
7197  CL = CL_PWR93;
7198  CW = CW_PWR93;
7199  CO = 0.000;
7200  }
7201  else if ( model == "user" )
7202  {
7203  CC = CCin;
7204  CL = CLin;
7205  CW = CWin;
7206  CO = COin;
7207  }
7208  else
7209  {
7210  ostringstream os;
7211  os << "O2-PWR93: ERROR! Wrong model values given.\n"
7212  << "Valid models are: 'Rosenkranz', 'RosenkranzLines', RosenkranzContinuum, "
7213  << "'RosenkranzNoCoupling', and 'user'" << '\n';
7214  throw runtime_error(os.str());
7215  }
7216  out3 << "O2-PWR93: (model=" << model << ") parameter values in use:\n"
7217  << " CC = " << CC << "\n"
7218  << " CL = " << CL << "\n"
7219  << " CW = " << CW << "\n"
7220  << " CO = " << CO << "\n";
7221 
7222 
7223  // determin if version Rosenkranz 1993 or Rosenkranz 1988 is selected
7224  if ( (version != "PWR98") && (version != "PWR93") && (version != "PWR88") )
7225  {
7226  ostringstream os;
7227  os << "O2-PWR93/PWR88: ERROR! Wrong version is selected.\n"
7228  << "Valid versions are:\n"
7229  << " 'PWR98' updates of F and S to HISTRAN96 and M.J.Schwartz, MIT, 1997\n"
7230  << " suggestions implemented.\n"
7231  << " 'PWR93' for the oxygen absorption model described in \n"
7232  << " P. W. Rosenkranz, Chapter 2, in M. A. Janssen,\n"
7233  << " Atmospheric Remote Sensing by Microwave Radiometry,\n"
7234  << " John Wiley & Sons, Inc., 1993.\n"
7235  << " 'PWR88' for the oxygen absorption model described in \n"
7236  << " P. W. Rosenkranz, Interference coefficients for the \n"
7237  << " overlapping oxygen lines in air, \n"
7238  << " JQSRT, 1988, Volume 39, 287-297.\n";
7239  throw runtime_error(os.str());
7240  }
7241 
7242 
7243  // select version dependent parameters
7244  if ( version == "PWR88" ) {
7245  for ( Index i=0; i<n_lines; ++i )
7246  {
7247  F[i] = F93[i];
7248  S300[i] = S93[i];
7249  Y300[i] = Y88[i];
7250  };
7251  }
7252  if ( version == "PWR93" ) {
7253  for ( Index i=0; i<n_lines; ++i )
7254  {
7255  F[i] = F93[i];
7256  S300[i] = S93[i];
7257  Y300[i] = Y93[i];
7258  };
7259  }
7260  if ( version == "PWR98" ) {
7261  for ( Index i=0; i<n_lines; ++i )
7262  {
7263  F[i] = F98[i];
7264  S300[i] = S98[i];
7265  Y300[i] = Y93[i];
7266  };
7267  }
7268 
7269  const Index n_p = abs_p.nelem(); // Number of pressure levels
7270  const Index n_f = f_grid.nelem(); // Number of frequencies
7271 
7272  // Check that dimensions of abs_p, abs_t, and vmr agree:
7273  assert ( n_p==abs_t.nelem() );
7274  assert ( n_p==vmr.nelem() );
7275 
7276  // Check that dimensions of pxsec are consistent with n_f
7277  // and n_p. It should be [n_f,n_p]:
7278  assert ( n_f==pxsec.nrows() );
7279  assert ( n_p==pxsec.ncols() );
7280 
7281  // Loop pressure/temperature:
7282  for ( Index i=0; i<n_p; ++i )
7283  {
7284  // check if O2-VMR will cause an underflow due to division by zero:
7285  if (vmr[i] < VMRCalcLimit)
7286  {
7287  ostringstream os;
7288  os << "ERROR: PWR93 O2 full absorption model has detected a O2 volume mixing ratio of "
7289  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
7290  << "Therefore no calculation is performed.\n";
7291  throw runtime_error(os.str());
7292  return;
7293  }
7294  // relative inverse temperature [1]
7295  Numeric TH = 3.0000e2 / abs_t[i];
7296  Numeric TH1 = (TH-1.000e0);
7297  Numeric B = pow(TH, X);
7298  // partial pressure of H2O and dry air [hPa]
7299  Numeric PRESWV = Pa_to_hPa * (abs_p[i] * vmrh2o[i]);
7300  Numeric PRESDA = Pa_to_hPa * (abs_p[i] * (1.000e0 - vmrh2o[i]));
7301  Numeric DEN = 0.001*(PRESDA*B + 1.1*PRESWV*TH); // [hPa]
7302  Numeric DENS = 0.001*(PRESDA + 1.1*PRESWV)*TH; // [hPa]
7303  Numeric DFNR = WB300*DEN; // [GHz]
7304 
7305  // continuum absorption [1/m/GHz]
7306  Numeric CCONT = CC * 1.23e-10 * pow( TH, (Numeric)2. ) * abs_p[i];
7307 
7308  // Loop over input frequency
7309  for ( Index s=0; s<n_f; ++s )
7310  {
7311  // initial O2 line absorption at position ff
7312  // Numeric O2ABS = 0.000e0;cd safff
7313 
7314  // input frequency in [GHz]
7315  Numeric ff = Hz_to_GHz * f_grid[s];
7316 
7317  // continuum absorption [Neper/km]
7318  Numeric CONT = CCONT * (ff * ff * DFNR / (ff*ff + DFNR*DFNR));
7319 
7320  // Loop over Rosnekranz '93 spectral line frequency:
7321  Numeric SUM = 0.000e0;
7322  for ( Index l=first_line; l<=last_line; ++l )
7323  {
7324  Numeric DF = CW * W300[l] * DEN; // [hPa]
7325  // 118 line update according to M. J. Schwartz, MIT, 1997
7326  if ( (version == "PWR98") && (fabs((F[l]-118.75)) < 0.10) )
7327  {
7328  DF = CW * W300[l] * DENS; // [hPa]
7329  }
7330  Numeric Y = CO * 0.001 * 0.01 * abs_p[i] * B * ( Y300[l] + V[l]*TH1 );
7331  Numeric STR = CL * S300[l] * exp(-BE[l] * TH1);
7332  Numeric SF1 = ( DF + (ff-F[l])*Y ) / ( (ff-F[l])*(ff-F[l]) + DF*DF );
7333  Numeric SF2 = ( DF - (ff+F[l])*Y ) / ( (ff+F[l])*(ff+F[l]) + DF*DF );
7334  SUM += STR * (SF1+SF2) * (ff/F[l]) * (ff/F[l]);
7335  }
7336  // O2 absorption [Neper/km]
7337  // Rosenkranz uses the factor 0.5034e12 in the calculation of the abs coeff.
7338  // This factor is the product of several terms:
7339  // 0.5034e12 = ISORATIO * VMR * (Hz/GHz) * (k_B*300K)^-1
7340  // = 0.995262 * 0.20946 * 10^-9 * 2.414322e21(hPa*cm^2*km)^-1
7341  // |---- 0.2085 ----| |---- 2.414322e12(hPa*cm^2*km)^-1 ---|
7342  // |---- 0.2085 ----| |---- 2.414322e10( Pa*cm^2*km)^-1 ---|
7343  // O2ABS = 2.4143e12 * SUM * PRESDA * pow(TH, 3.0) / PI;
7344  // O2ABS = CONT + (2.414322e10 * SUM * abs_p[i] * pow(TH, 3.0) / PI);
7345  // unit conversion x Nepers/km = y 1/m ---> y = x * 1.000e-3
7346  // therefore 2.414322e10 --> 2.414322e7
7347  // pxsec [1/m]
7348  pxsec(s,i) += CONT + (2.414322e7 * SUM * abs_p[i] * pow(TH, (Numeric)3.) / PI);
7349  }
7350  }
7351  return;
7352 }
7353 //
7354 // #################################################################################
7355 //
7357 
7394  const Numeric S0in, // model parameter
7395  const Numeric G0in, // model parameter
7396  const Numeric XS0in, // model parameter
7397  const Numeric XG0in, // model parameter
7398  const String& model,
7399  ConstVectorView f_grid,
7400  ConstVectorView abs_p,
7401  ConstVectorView abs_t,
7402  ConstVectorView abs_h2o,
7403  ConstVectorView vmr,
7404  const Verbosity& verbosity)
7405 {
7406  CREATE_OUT3
7407 
7408  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7409  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
7410  // "Propagation modeling of moist air and suspended water/ice
7411  // particles at frequencies below 1000 GHz",
7412  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7413  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7414  // const Numeric S0_MPM93 = 6.140e-13/0.20946; // line strength/VMR-O2 [1/Pa]
7415  const Numeric S0_MPM93 = 6.140e-13; // line strength [1/Pa]
7416  const Numeric G0_MPM93 = 0.560e4; // line width [Hz/Pa]
7417  const Numeric XS0_MPM93 = 2.000; // temperature dependence of line strength
7418  const Numeric XG0_MPM93 = 0.800; // temperature dependence of line width
7419  // ---------------------------------------------------------------------------------------
7420 
7421 
7422  // select the parameter set (!!model dominates parameters!!):
7423  Numeric S0, G0, XS0, XG0;
7424  if ( model == "MPM93" )
7425  {
7426  S0 = S0_MPM93;
7427  G0 = G0_MPM93;
7428  XS0 = XS0_MPM93;
7429  XG0 = XG0_MPM93;
7430  }
7431  else if ( model == "user" )
7432  {
7433  S0 = S0in;
7434  G0 = G0in;
7435  XS0 = XS0in;
7436  XG0 = XG0in;
7437  }
7438  else
7439  {
7440  ostringstream os;
7441  os << "O2-SelfContMPM93: ERROR! Wrong model values given.\n"
7442  << "Valid models are: 'MPM93' and 'user'" << '\n';
7443  throw runtime_error(os.str());
7444  }
7445  out3 << "O2-SelfContMPM93: (model=" << model << ") parameter values in use:\n"
7446  << " S0 = " << S0 << "\n"
7447  << " G0 = " << G0 << "\n"
7448  << " XS0 = " << XS0 << "\n"
7449  << " XG0 = " << XG0 << "\n";
7450 
7451 
7452  const Index n_p = abs_p.nelem(); // Number of pressure levels
7453  const Index n_f = f_grid.nelem(); // Number of frequencies
7454 
7455  // Check that dimensions of abs_p, abs_t, and vmr agree:
7456  assert ( n_p==abs_t.nelem() );
7457  assert ( n_p==vmr.nelem() );
7458 
7459  // Check that dimensions of pxsec are consistent with n_f
7460  // and n_p. It should be [n_f,n_p]:
7461  assert ( n_f==pxsec.nrows() );
7462  assert ( n_p==pxsec.ncols() );
7463 
7464  // const = VMR * ISORATIO = 0.20946 * 0.99519
7465  // this constant is already incorporated into the line strength, so we
7466  // have top devide the line strength by this value since arts multiplies pxsec
7467  // by these variables later in abs_coefCalc.
7468  const Numeric VMRISO = 0.2085;
7469 
7470 
7471  // Loop pressure/temperature:
7472  for ( Index i=0; i<n_p; ++i )
7473  {
7474  if (vmr[i] < VMRCalcLimit) // make sure that division by zero is excluded
7475  {
7476  ostringstream os;
7477  os << "ERROR: MPM93 O2 continuum absorption model has detected a O2 volume mixing ratio of "
7478  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
7479  << "Therefore no calculation is performed.\n";
7480  throw runtime_error(os.str());
7481  return;
7482  }
7483  Numeric th = 300.0 / abs_t[i]; // Theta
7484  // continuum strength
7485  Numeric strength = S0 * abs_p[i] * (1.0000 - abs_h2o[i]) * pow( th, XS0 );
7486  // G0 from the input has to be converted to unit GHz/hPa --> * 1.0e-7
7487  Numeric gamma = G0 * abs_p[i] * pow( th, XG0 ); // Hz
7488 
7489  // Loop frequency:
7490  for ( Index s=0; s<n_f; ++s )
7491  {
7492  // the vmr of O2 will be multiplied at the stage of absorption calculation:
7493  // abs / vmr * pxsec.
7494  pxsec(s,i) += (4.0 * PI / SPEED_OF_LIGHT) * // unit factor [1/(m*Hz)]
7495  (strength / VMRISO) * // strength [1]
7496  ( pow( f_grid[s], (Numeric)2.) * gamma / // line shape [Hz]
7497  ( pow( f_grid[s], (Numeric)2.) + pow( gamma, (Numeric)2.) ) );
7498  }
7499  }
7500  return;
7501 }
7502 //
7503 // #################################################################################
7504 //
7506 
7542  const Numeric S0in, // model parameter
7543  const Numeric G0in, // model parameter
7544  const Numeric XS0in, // model parameter
7545  const Numeric XG0in, // model parameter
7546  const String& model,
7547  ConstVectorView f_grid,
7548  ConstVectorView abs_p, // total pressure [Pa]
7549  ConstVectorView abs_t,
7550  ConstVectorView abs_h2o, // H2O VMR
7551  ConstVectorView vmr _U_, // O2 VMR
7552  const Verbosity& verbosity)
7553 {
7554  CREATE_OUT3
7555 
7556  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7557  // P. W. Rosenkranz, Chapter 2, in M. A. Janssen,
7558  // Atmospheric Remote Sensing by Microwave Radiometry, John Wiley & Sons, Inc., 1993
7559  // ftp://mesa.mit.edu/phil/lbl_rt
7560  const Numeric S0_PWR93 = 1.11e-14; // [K²/(Hz*Pa*m)] line strength
7561  const Numeric G0_PWR93 = 5600.000; // line width [Hz/Pa]
7562  const Numeric XS0_PWR93 = 2.000; // temperature dependence of line strength
7563  const Numeric XG0_PWR93 = 0.800; // temperature dependence of line width
7564  // ---------------------------------------------------------------------------------------
7565 
7566  // select the parameter set (!!model dominates values!!):
7567  Numeric S0, G0, XS0, XG0;
7568  if ( model == "Rosenkranz" )
7569  {
7570  S0 = S0_PWR93;
7571  G0 = G0_PWR93;
7572  XS0 = XS0_PWR93;
7573  XG0 = XG0_PWR93;
7574  }
7575  else if ( model == "user" )
7576  {
7577  S0 = S0in;
7578  G0 = G0in;
7579  XS0 = XS0in;
7580  XG0 = XG0in;
7581  }
7582  else
7583  {
7584  ostringstream os;
7585  os << "O2-SelfContPWR93: ERROR! Wrong model values given.\n"
7586  << "Valid models are: 'Rosenkranz' and 'user'" << '\n';
7587  throw runtime_error(os.str());
7588  }
7589  out3 << "O2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
7590  << " S0 = " << S0 << "\n"
7591  << " G0 = " << G0 << "\n"
7592  << " XS0 = " << XS0 << "\n"
7593  << " XG0 = " << XG0 << "\n";
7594 
7595 
7596  const Index n_p = abs_p.nelem(); // Number of pressure levels
7597  const Index n_f = f_grid.nelem(); // Number of frequencies
7598 
7599  // Check that dimensions of abs_p, abs_t, and vmr agree:
7600  assert ( n_p==abs_t.nelem() );
7601  assert ( n_p==vmr.nelem() );
7602 
7603  // Check that dimensions of pxsec are consistent with n_f
7604  // and n_p. It should be [n_f,n_p]:
7605  assert ( n_f==pxsec.nrows() );
7606  assert ( n_p==pxsec.ncols() );
7607 
7608  // loop over all pressure levels:
7609  for ( Index i=0; i<n_p; ++i )
7610  {
7611  Numeric TH = 300.00 / abs_t[i]; // relative temperature [1]
7612 
7613  Numeric ph2o = abs_p[i] * abs_h2o[i]; // water vapor partial pressure [Pa]
7614  Numeric pdry = abs_p[i] - ph2o; // dry air partial pressure [Pa]
7615 
7616 
7617  // pseudo broadening term [Hz]
7618  Numeric gamma = G0 * (pdry * pow( TH, XG0 ) + 1.100 * ph2o * TH);
7619 
7620  // Loop over frequency grid:
7621  for ( Index s=0; s<n_f; ++s )
7622  {
7623  // division by vmr of O2 is necessary because of the absorption calculation
7624  // abs = vmr * pxsec.
7625  pxsec(s,i) += S0 * abs_p[i] / pow( abs_t[i], XS0 ) *
7626  ( pow( f_grid[s], (Numeric)2. )
7627  * gamma / ( pow( f_grid[s], 2 )
7628  + pow( gamma, (Numeric)2. ) ) ) ;
7629  }
7630  }
7631 }
7632 //
7633 //
7634 // #################################################################################
7636 
7673 void Standard_O2_continuum (MatrixView pxsec, // cross section
7674  const Numeric Cin, // model parameter
7675  const Numeric G0in, // model parameter
7676  const Numeric G0Ain, // model parameter
7677  const Numeric G0Bin, // model parameter
7678  const Numeric XG0din, // model parameter
7679  const Numeric XG0win, // model parameter
7680  const String& model, // model parameter
7681  ConstVectorView f_grid, // frequency grid
7682  ConstVectorView abs_p, // P_tot grid
7683  ConstVectorView abs_t, // T grid
7684  ConstVectorView abs_h2o, // VMR H2O profile
7685  ConstVectorView vmr _U_, // VMR O2 profile
7686  const Verbosity& verbosity)
7687 {
7688  CREATE_OUT3
7689 
7690  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7691  // P. W. Rosenkranz, Chapter 2, in M. A. Janssen,
7692  // Atmospheric Remote Sensing by Microwave Radiometry, John Wiley & Sons, Inc., 1993
7693  // ftp://mesa.mit.edu/phil/lbl_rt
7694  const Numeric C_PWR93 = (1.108e-14/pow((Numeric)3.0e2,(Numeric)2.)); // [1/(Hz*Pa*m)] line strength
7695  const Numeric G0_PWR93 = 5600.000; // line width [Hz/Pa]
7696  const Numeric G0A_PWR93 = 1.000; // line width [1]
7697  const Numeric G0B_PWR93 = 1.100; // line width [1]
7698  const Numeric XG0d_PWR93 = 0.800; // temperature dependence of line width [1]
7699  const Numeric XG0w_PWR93 = 1.000; // temperature dependence of line width [1]
7700  //
7701  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
7702  // "Propagation modeling of moist air and suspended water/ice
7703  // particles at frequencies below 1000 GHz",
7704  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7705  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7706  // const Numeric C_MPM93 = 1.23e-19; // line strength/VMR [1/m*1/Hz*1/Pa]
7707  const Numeric C_MPM93 = 6.14e-13*(4.0*PI/SPEED_OF_LIGHT)/0.2085; // line strength [1/m*1/Hz*1/Pa]
7708  // 0.2085 = VMR * ISORATIO = 0.20946 * 0.99519
7709  const Numeric G0_MPM93 = 5600.000; // line width [Hz/Pa]
7710  const Numeric G0A_MPM93 = 1.000; // line width [1]
7711  const Numeric G0B_MPM93 = 1.000; // line width [1]
7712  const Numeric XG0d_MPM93 = 0.800; // temperature dependence of line strength [1]
7713  const Numeric XG0w_MPM93 = 0.800; // temperature dependence of line width [1]
7714  // ---------------------------------------------------------------------------------------
7715 
7716  // select the parameter set (!!model dominates values!!):
7717  Numeric C, G0, G0A, G0B, XG0d, XG0w;
7718  if ( model == "Rosenkranz" )
7719  {
7720  C = C_PWR93;
7721  G0 = G0_PWR93;
7722  G0A = G0A_PWR93;
7723  G0B = G0B_PWR93;
7724  XG0d = XG0d_PWR93;
7725  XG0w = XG0w_PWR93;
7726  }
7727  else if ( model == "MPM93" )
7728  {
7729  C = C_MPM93;
7730  G0 = G0_MPM93;
7731  G0A = G0A_MPM93;
7732  G0B = G0B_MPM93;
7733  XG0d = XG0d_MPM93;
7734  XG0w = XG0w_MPM93;
7735  }
7736  else if ( model == "user" )
7737  {
7738  C = Cin;
7739  G0 = G0in;
7740  G0A = G0Ain;
7741  G0B = G0Bin;
7742  XG0d = XG0din;
7743  XG0w = XG0win;
7744  }
7745  else
7746  {
7747  ostringstream os;
7748  os << "O2-GenerealCont: ERROR! Wrong model values given.\n"
7749  << "Valid models are: 'Rosenkranz', 'MPM93' and 'user'" << '\n';
7750  throw runtime_error(os.str());
7751  }
7752  out3 << "O2-GeneralCont: (model=" << model << ") parameter values in use:\n"
7753  << " C = " << C << "\n"
7754  << " G0 = " << G0 << "\n"
7755  << " G0A = " << G0A << "\n"
7756  << " G0B = " << G0B << "\n"
7757  << " XG0d = " << XG0d << "\n"
7758  << " XG0w = " << XG0w << "\n";
7759 
7760 
7761  const Index n_p = abs_p.nelem(); // Number of pressure levels
7762  const Index n_f = f_grid.nelem(); // Number of frequencies
7763 
7764  // Check that dimensions of abs_p, abs_t, and vmr agree:
7765  assert ( n_p==abs_t.nelem() );
7766  assert ( n_p==vmr.nelem() );
7767 
7768  // Check that dimensions of pxsec are consistent with n_f
7769  // and n_p. It should be [n_f,n_p]:
7770  assert ( n_f==pxsec.nrows() );
7771  assert ( n_p==pxsec.ncols() );
7772 
7773  // const = VMR * ISORATIO = 0.20946 * 0.99519
7774  // this constant is already incorporated into the line strength, so we
7775  // have top devide the line strength by this value since arts multiplies pxsec
7776  // by these variables later in abs_coefCalc.
7777  // FIXME const Numeric VMRISO = 0.2085;
7778 
7779  // loop over all pressure levels:
7780  for ( Index i=0; i<n_p; ++i )
7781  {
7782  Numeric TH = 3.0e2 / abs_t[i]; // relative temperature [1]
7783 
7784  Numeric ph2o = abs_p[i] * abs_h2o[i]; // water vapor partial pressure [Pa]
7785  Numeric pdry = abs_p[i] - ph2o; // dry air partial pressure [Pa]
7786 
7787 
7788  // pseudo broadening term [Hz]
7789  Numeric gamma = G0 * (G0A * pdry * pow( TH, XG0d ) + G0B * ph2o * pow( TH, XG0w ));
7790 
7791  // Loop over frequency grid:
7792  for ( Index s=0; s<n_f; ++s )
7793  {
7794  // division by vmr of O2 is necessary because of the absorption calculation
7795  // abs = vmr * pxsec.
7796  pxsec(s,i) += C * abs_p[i] * pow( TH, (Numeric)2. ) *
7797  ( gamma * pow( f_grid[s], (Numeric)2. ) /
7798  ( pow( f_grid[s], 2 ) + pow( gamma, (Numeric)2. ) ) );
7799  }
7800  }
7801 }
7802 //
7803 // #################################################################################
7804 // ################################ NITROGEN MODELS ################################
7805 // #################################################################################
7806 //
7808 
7839  const Numeric Cin,
7840  const String& model,
7841  ConstVectorView f_grid,
7842  ConstVectorView abs_p,
7843  ConstVectorView abs_t,
7844  ConstVectorView vmr,
7845  const Verbosity& verbosity)
7846 {
7847  CREATE_OUT3
7848 
7849  //
7850  //
7851  // external function to call (original F77 code translated with f2c)
7852  extern Numeric n2n2tks_(double t, double f);
7853  //
7854  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7855  // standard values for the MPM93 H2O continuum model
7856  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7857  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7858  Numeric XFAC = 1.0000; // scaling factor
7859  // ---------------------------------------------------------------------------------------
7860 
7861  // select the parameter set (!!model dominates values!!):
7862  if ( model == "BF86" )
7863  {
7864  XFAC = 1.0000;
7865  }
7866  else if ( model == "user" )
7867  {
7868  XFAC = Cin;
7869  }
7870  else
7871  {
7872  ostringstream os;
7873  os << "N2-SelfContBorysow: ERROR! Wrong model values given.\n"
7874  << "allowed models are: 'BF86', 'user'" << '\n';
7875  throw runtime_error(os.str());
7876  }
7877 
7878  out3 << "N2-SelfContBorysow: (model=" << model << ") parameter values in use:\n"
7879  << " XFAC = " << XFAC << "\n";
7880 
7881  const Index n_p = abs_p.nelem(); // Number of pressure levels
7882  const Index n_f = f_grid.nelem(); // Number of frequencies
7883 
7884 
7885  const Numeric AMAG2DEN = 44.53807; // inverse of N2 mol volume at std p/T
7886  const Numeric RIDGAS = 8.314510; // ideal gas constant
7887 
7888  // Check that dimensions of abs_p, abs_t, and vmr agree:
7889  assert ( n_p==abs_t.nelem() );
7890  assert ( n_p==vmr.nelem() );
7891 
7892  // Check that dimensions of pxsec are consistent with n_f
7893  // and n_p. It should be [n_f,n_p]:
7894  assert ( n_f==pxsec.nrows() );
7895  assert ( n_p==pxsec.ncols() );
7896 
7897  // Loop pressure/temperature:
7898  for ( Index i=0; i<n_p; ++i )
7899  {
7900  //cout << "------------------------------------------------\n";
7901  double T = (double) abs_t[i];
7902  //cout << "N2-N2 BF86: T =" << T << " K\n";
7903  //cout << "N2-N2 BF86: p =" << abs_p[i] << " Pa\n";
7904  //cout << "N2-N2 BF86: VMR =" << vmr[i] << "\n";
7905  Numeric XAMA = (abs_p[i]) / ( AMAG2DEN * RIDGAS * abs_t[i] );
7906  Numeric XAMA2 = pow(XAMA,(Numeric)2.);
7907  //cout << "N2-N2 BF86: XAMA =" << XAMA << "\n";
7908 
7909  // Loop frequency:
7910  for ( Index s=0; s<n_f; ++s )
7911  {
7912  // the second vmr of N2 will be multiplied at the stage of
7913  // absorption calculation: abs = vmr * pxsec.
7914  double f = (double) f_grid[s];
7915  //cout << "N2-N2 BF86: f =" << f << " Hz\n";
7916  double cont = n2n2tks_(T, f);
7917  pxsec(s,i) += (Numeric) (cont * 1.000e2 * vmr[i] * XAMA2);
7918  //cout << "N2-N2 BF86: cont =" << cont << " cm-1 * amagat-2\n";
7919  //cout << "N2-N2 BF86: abs =" << (vmr[i] * pxsec(s,i)) << " m-1\n";
7920  }
7921  }
7922  return;
7923 }
7924 //
7925 // #################################################################################
7926 //
7928 
7965  const Numeric Cin,
7966  const Numeric Gin,
7967  const Numeric xTin,
7968  const Numeric xfin,
7969  const String& model,
7970  ConstVectorView f_grid,
7971  ConstVectorView abs_p,
7972  ConstVectorView abs_t,
7973  ConstVectorView abs_h2o,
7974  ConstVectorView vmr,
7975  const Verbosity& verbosity)
7976 {
7977  CREATE_OUT3
7978 
7979  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7980  // standard values for the MPM93 H2O continuum model
7981  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7982  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7983  const Numeric xT_MPM93 = 3.500; // temperature exponent [1]
7984  const Numeric xf_MPM93 = 1.500; // frequency exponent [1]
7985  const Numeric gxf_MPM93 = 9.000*xf_MPM93; // needed for the unit conversion of G_MPM93
7986  const Numeric S_MPM93 = 2.296e-31; // line strength [1/Pa² * 1/Hz]
7987  const Numeric G_MPM93 = 1.930e-5*pow((Numeric)10.000, -gxf_MPM93); // frequency factor [1/Hz^xf]
7988  // ---------------------------------------------------------------------------------------
7989 
7990  // select the parameter set (!!model dominates values!!):
7991  Numeric S0, G0, xf, xT, gxf;
7992  if ( model == "MPM93" )
7993  {
7994  S0 = S_MPM93;
7995  G0 = G_MPM93;
7996  xT = xT_MPM93;
7997  xf = xf_MPM93;
7998  gxf = gxf_MPM93;
7999  }
8000  else if ( model == "MPM93Scale" )
8001  {
8002  S0 = Cin * S_MPM93;
8003  G0 = G_MPM93;
8004  xT = xT_MPM93;
8005  xf = xf_MPM93;
8006  gxf = gxf_MPM93;
8007  }
8008  else if ( model == "user" )
8009  {
8010  S0 = Cin;
8011  G0 = Gin;
8012  xT = xTin;
8013  xf = xfin;
8014  gxf = 9.000*xf;
8015  }
8016  else
8017  {
8018  ostringstream os;
8019  os << "N2-SelfContMPM93 : ERROR! Wrong model values given.\n"
8020  << "allowed models are: 'MPM93', 'MPM93Scale' or 'user'" << '\n';
8021  throw runtime_error(os.str());
8022  }
8023 
8024  out3 << "N2-SelfContMPM93: (model=" << model << ") parameter values in use:\n"
8025  << " S0 = " << S0 << "\n"
8026  << " G0 = " << G0 << "\n"
8027  << " xT = " << xT << "\n"
8028  << " xf = " << xf << "\n";
8029 
8030  // unit conversion internally:
8031  //const Numeric S0unitconv = 1.000e+13; // x [1/(hPa²*GHz)] => y [1/(pa²*Hz)]
8032  //const Numeric G0unitconv = pow(10.000, gxf);
8033 
8034  const Index n_p = abs_p.nelem(); // Number of pressure levels
8035  const Index n_f = f_grid.nelem(); // Number of frequencies
8036 
8037  // Check that dimensions of abs_p, abs_t, and vmr agree:
8038  assert ( n_p==abs_t.nelem() );
8039  assert ( n_p==vmr.nelem() );
8040 
8041  // Check that dimensions of pxsec are consistent with n_f
8042  // and n_p. It should be [n_f,n_p]:
8043  assert ( n_f==pxsec.nrows() );
8044  assert ( n_p==pxsec.ncols() );
8045 
8046  Numeric fac = 4.0 * PI / SPEED_OF_LIGHT; // = 4 * pi / c
8047  // Loop pressure/temperature:
8048  for ( Index i=0; i<n_p; ++i )
8049  {
8050  Numeric th = 300.0 / abs_t[i];
8051  Numeric strength = S0 *
8052  pow( (abs_p[i] * ((Numeric)1.0000 - abs_h2o[i])),
8053  (Numeric)2. )
8054  * pow( th, xT );
8055 
8056  // Loop frequency:
8057  for ( Index s=0; s<n_f; ++s )
8058  {
8059  // FIXME Numeric f = f_grid[s] * Hz_to_GHz; // frequency in GHz
8060  // the vmr of N2 will be multiplied at the stage of absorption calculation:
8061  // abs / vmr * pxsec.
8062  pxsec(s,i) += fac * strength * // strength
8063  pow(f_grid[s], (Numeric)2.) / // frequency dependence
8064  ( 1.000 + G0 * pow( f_grid[s], xf) ) *
8065  vmr[i]; // N2 vmr
8066  }
8067  }
8068  return;
8069 }
8070 //
8071 // #################################################################################
8073 
8099  const Numeric Cin,
8100  const String& model,
8101  ConstVectorView f_grid,
8102  ConstVectorView abs_p,
8103  ConstVectorView abs_t,
8104  ConstVectorView vmr,
8105  ConstVectorView h2ovmr,
8106  const Verbosity& verbosity)
8107 {
8108  CREATE_OUT3
8109 
8110  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8111  // standard values for the Pardo et al. model (IEEE, Trans. Ant. Prop.,
8112  // Vol 49, No 12, pp. 1683-1694, 2001)
8113  const Numeric C_ATM = 2.612e-6; // [1/m]
8114  // ---------------------------------------------------------------------------------------
8115 
8116  // select the parameter set (!!model dominates parameters!!):
8117  Numeric C;
8118  if ( model == "ATM" )
8119  {
8120  C = C_ATM;
8121  }
8122  else if ( model == "user" )
8123  {
8124  C = Cin;
8125  }
8126  else
8127  {
8128  ostringstream os;
8129  os << "N2-DryContATM01: ERROR! Wrong model values given.\n"
8130  << "allowed models are: 'ATM', 'user'" << '\n';
8131  throw runtime_error(os.str());
8132  }
8133  out3 << "N2-DryContATM01: (model=" << model << ") parameter values in use:\n"
8134  << " C_s = " << C << "\n";
8135 
8136  const Index n_p = abs_p.nelem(); // Number of pressure levels
8137  const Index n_f = f_grid.nelem(); // Number of frequencies
8138 
8139  // Check that dimensions of abs_p, abs_t, and vmr agree:
8140  assert ( n_p==abs_t.nelem() );
8141  assert ( n_p==vmr.nelem() );
8142 
8143  // Check that dimensions of pxsec are consistent with n_f
8144  // and n_p. It should be [n_f,n_p]:
8145  assert ( n_f==pxsec.nrows() );
8146  assert ( n_p==pxsec.ncols() );
8147 
8148  // Loop over pressure/temperature grid:
8149  for ( Index i=0; i<n_p; ++i )
8150  {
8151  // since this is an effective "dry air" continuum, it is not really
8152  // it is not specifically attributed to N2, so we need the total
8153  // dry air part in total which is equal to the total minus the
8154  // water vapor pressure:
8155  Numeric pd = abs_p[i] * ( 1.00000e0 - h2ovmr[i] ); // [Pa]
8156  // Loop over frequency grid:
8157  if (vmr[i] > VMRCalcLimit )
8158  {
8159  for ( Index s=0; s<n_f; ++s )
8160  {
8161  // Becaue this is an effective "dry air" continuum, it is not really
8162  // specific N2 but mainly caused by N2. Therefore the N2 vmr must be
8163  // canceled out here which is later in abs_coefCalc multiplied
8164  // (calculation: abs = vmr * pxsec):
8165  pxsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8166  pow( (f_grid[s]/(Numeric)2.25e11), (Numeric)2. ) * // quadratic f dependence [Hz²]
8167  pow( ((Numeric)300.0/abs_t[i]), (Numeric)3.5 ) * // free T dependence [1]
8168  pow( (pd/(Numeric)1.01300e5), (Numeric)2. ) / // quadratic p dependence [Pa²]
8169  vmr[i]; // cancel the vmr dependency
8170  }
8171  }
8172  }
8173 }
8174 //
8175 // #################################################################################
8177 
8204  const Numeric Cin,
8205  const Numeric xin,
8206  const String& model,
8207  ConstVectorView f_grid,
8208  ConstVectorView abs_p,
8209  ConstVectorView abs_t,
8210  ConstVectorView vmr,
8211  const Verbosity& verbosity)
8212 {
8213  CREATE_OUT3
8214 
8215  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8216  // standard values for the Rosenkranz model (Chapter 2, pp 74, in M. A. Janssen,
8217  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8218  const Numeric C_PWR = 1.05e-38; // [1/(Pa²*Hz²*m)]
8219  const Numeric x_PWR = 3.55; // [1]
8220  // ---------------------------------------------------------------------------------------
8221 
8222  // select the parameter set (!!model dominates parameters!!):
8223  Numeric C, x;
8224  if ( model == "Rosenkranz" )
8225  {
8226  C = C_PWR;
8227  x = x_PWR;
8228  }
8229  else if ( model == "user" )
8230  {
8231  C = Cin;
8232  x = xin;
8233  }
8234  else
8235  {
8236  ostringstream os;
8237  os << "N2-SelfContPWR93: ERROR! Wrong model values given.\n"
8238  << "allowed models are: 'Rosenkranz', 'user'" << '\n';
8239  throw runtime_error(os.str());
8240  }
8241  out3 << "N2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
8242  << " C_s = " << C << "\n"
8243  << " x_s = " << x << "\n";
8244 
8245  const Index n_p = abs_p.nelem(); // Number of pressure levels
8246  const Index n_f = f_grid.nelem(); // Number of frequencies
8247 
8248  // Check that dimensions of abs_p, abs_t, and vmr agree:
8249  assert ( n_p==abs_t.nelem() );
8250  assert ( n_p==vmr.nelem() );
8251 
8252  // Check that dimensions of pxsec are consistent with n_f
8253  // and n_p. It should be [n_f,n_p]:
8254  assert ( n_f==pxsec.nrows() );
8255  assert ( n_p==pxsec.ncols() );
8256 
8257  // Loop over pressure/temperature grid:
8258  for ( Index i=0; i<n_p; ++i )
8259  {
8260  // Loop over frequency grid:
8261  for ( Index s=0; s<n_f; ++s )
8262  {
8263  // The second vmr of N2 will be multiplied at the stage of absorption
8264  // calculation: abs = vmr * pxsec.
8265  pxsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8266  pow( f_grid[s], (Numeric)2. ) * // quadratic f dependence [Hz²]
8267  pow( (Numeric)300.0/abs_t[i], x ) * // free T dependence [1]
8268  pow( abs_p[i], (Numeric)2. ) * // quadratic p dependence [Pa²]
8269  vmr[i]; // second N2-VMR at the stage
8270  // of absorption calculation
8271  }
8272  }
8273 }
8274 //
8275 // #################################################################################
8276 //
8278 
8310  const Numeric Cin,
8311  const Numeric xfin,
8312  const Numeric xtin,
8313  const Numeric xpin,
8314  const String& model,
8315  ConstVectorView f_grid,
8316  ConstVectorView abs_p,
8317  ConstVectorView abs_t,
8318  ConstVectorView vmr,
8319  const Verbosity& verbosity)
8320 {
8321  CREATE_OUT3
8322 
8323  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8324  // standard values for the Rosenkranz model, Chapter 2, pp 74, in M. A. Janssen,
8325  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8326  const Numeric C_GM = 1.05e-38; // [1/(Pa²*Hz²*m)]
8327  const Numeric xf_GM = 2.00; // [1]
8328  const Numeric xt_GM = 3.55; // [1]
8329  const Numeric xp_GM = 2.00; // [1]
8330  // ---------------------------------------------------------------------------------------
8331 
8332  // select the parameter set (!!model dominates over values!!):
8333  Numeric C, xt, xf, xp;
8334  if ( model == "Rosenkranz" )
8335  {
8336  C = C_GM;
8337  xt = xt_GM;
8338  xf = xf_GM;
8339  xp = xp_GM;
8340  }
8341  else if ( model == "user" )
8342  {
8343  C = Cin;
8344  xt = xtin;
8345  xf = xfin;
8346  xp = xpin;
8347  }
8348  else
8349  {
8350  ostringstream os;
8351  os << "N2-SelfContStandardType: ERROR! Wrong model values given.\n"
8352  << "allowed models are: 'Rosenkranz', 'user'" << '\n';
8353  throw runtime_error(os.str());
8354  }
8355  out3 << "N2-SelfContStandardType: (model=" << model << ") parameter values in use:\n"
8356  << " C = " << C << "\n"
8357  << " xt = " << xt << "\n"
8358  << " xf = " << xf << "\n"
8359  << " xp = " << xp << "\n";
8360 
8361 
8362  const Index n_p = abs_p.nelem(); // Number of pressure levels
8363  const Index n_f = f_grid.nelem(); // Number of frequencies
8364 
8365  // Check that dimensions of abs_p, abs_t, and vmr agree:
8366  assert ( n_p==abs_t.nelem() );
8367  assert ( n_p==vmr.nelem() );
8368 
8369  // Check that dimensions of pxsec are consistent with n_f
8370  // and n_p. It should be [n_f,n_p]:
8371  assert ( n_f==pxsec.nrows() );
8372  assert ( n_p==pxsec.ncols() );
8373 
8374  // Loop over pressure/temperature grid:
8375  for ( Index i=0; i<n_p; ++i )
8376  {
8377  //cout << "vmr[" << i << "]= " << vmr[i] << "\n";
8378  // Loop over frequency grid:
8379  for ( Index s=0; s<n_f; ++s )
8380  {
8381  // The second N2-VMR will be multiplied at the stage of absorption
8382  // calculation: abs = vmr * pxsec.
8383  pxsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8384  pow( ((Numeric)300.00/abs_t[i]), xt ) * // T dependence [1]
8385  pow( f_grid[s], xf ) * // f dependence [Hz^xt]
8386  pow( abs_p[i], xp ) * // p dependence [Pa^xp]
8387  pow( vmr[i], (xp-(Numeric)1.) ); // last N2-VMR at the stage
8388  // of absorption calculation
8389  }
8390  }
8391 }
8392 //
8393 // #################################################################################
8394 // ############################## CARBON DIOXIDE MODELS ############################
8395 // #################################################################################
8397 
8424  const Numeric Cin,
8425  const Numeric xin,
8426  const String& model,
8427  ConstVectorView f_grid,
8428  ConstVectorView abs_p,
8429  ConstVectorView abs_t,
8430  ConstVectorView vmr,
8431  const Verbosity& verbosity)
8432 {
8433  CREATE_OUT3
8434 
8435  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8436  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
8437  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8438  const Numeric C_PWR = 7.43e-37; // [ 1/(Pa²*Hz²*m) ]
8439  const Numeric x_PWR = 5.08; // [ 1 ]
8440  // ---------------------------------------------------------------------------------------
8441 
8442  // select the parameter set (!!model dominates values!!):
8443  Numeric C, x;
8444  if ( model == "Rosenkranz" )
8445  {
8446  C = C_PWR;
8447  x = x_PWR;
8448  }
8449  else if ( model == "user" )
8450  {
8451  C = Cin;
8452  x = xin;
8453  }
8454  else
8455  {
8456  ostringstream os;
8457  os << "CO2-SelfContPWR93 : ERROR! Wrong model values given.\n"
8458  << "allowed models are: 'Rosenkranz', 'user'" << "\n";
8459  throw runtime_error(os.str());
8460  }
8461 
8462  out3 << "CO2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
8463  << " C = " << C << "\n"
8464  << " x = " << x << "\n";
8465 
8466  const Index n_p = abs_p.nelem(); // Number of pressure levels
8467  const Index n_f = f_grid.nelem(); // Number of frequencies
8468 
8469  // Check that dimensions of abs_p, abs_t, and vmr agree:
8470  assert ( n_p==abs_t.nelem() );
8471  assert ( n_p==vmr.nelem() );
8472 
8473  // Check that dimensions of pxsec are consistent with n_f
8474  // and n_p. It should be [n_f,n_p]:
8475  assert ( n_f==pxsec.nrows() );
8476  assert ( n_p==pxsec.ncols() );
8477 
8478  // Loop over pressure/temperature grid:
8479  for ( Index i=0; i<n_p; ++i )
8480  {
8481  // Dummy scalar holds everything except the quadratic frequency dependence.
8482  // The second vmr of CO2 will be multiplied at the stage of absorption
8483  // calculation: abs = vmr * pxsec.
8484  Numeric dummy =
8485  C * pow( (Numeric)300./abs_t[i], x ) * pow( abs_p[i], (Numeric)2. ) * vmr[i];
8486 
8487  // Loop over frequency grid:
8488  for ( Index s=0; s<n_f; ++s )
8489  {
8490  pxsec(s,i) += dummy * pow( f_grid[s], (Numeric)2. );
8491  }
8492  }
8493 }
8494 //
8495 // #################################################################################
8497 
8525  const Numeric Cin,
8526  const Numeric xin,
8527  const String& model,
8528  ConstVectorView f_grid,
8529  ConstVectorView abs_p,
8530  ConstVectorView abs_t,
8531  ConstVectorView abs_n2,
8532  ConstVectorView vmr _U_,
8533  const Verbosity& verbosity)
8534 {
8535  CREATE_OUT3
8536 
8537  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8538  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8539  const Numeric C_PWR = 2.71e-37; // default: 2.71*10^-37 1/(Pa²*Hz²*m)
8540  const Numeric x_PWR = 4.7; // default: 4.7
8541  // ---------------------------------------------------------------------------------------
8542 
8543  // select the parameter set (!!model dominates values!!):
8544  Numeric C, x;
8545  if ( model == "Rosenkranz" )
8546  {
8547  C = C_PWR;
8548  x = x_PWR;
8549  }
8550  else if ( model == "user" )
8551  {
8552  C = Cin;
8553  x = xin;
8554  }
8555  else
8556  {
8557  ostringstream os;
8558  os << "CO2-ForeignContPWR93: ERROR! Wrong model values given.\n"
8559  << "allowed models are: 'Rosenkranz', 'user'" << "\n";
8560  throw runtime_error(os.str());
8561  }
8562 
8563  out3 << "CO2-ForeignContPWR93: (model=" << model << ") parameter values in use:\n"
8564  << " C = " << C << "\n"
8565  << " x = " << x << "\n";
8566 
8567  const Index n_p = abs_p.nelem(); // Number of pressure levels
8568  const Index n_f = f_grid.nelem(); // Number of frequencies
8569 
8570  // Check that dimensions of abs_p, abs_t, and vmr agree:
8571  assert ( n_p==abs_t.nelem() );
8572  assert ( n_p==vmr.nelem() );
8573 
8574  // Check that dimensions of pxsec are consistent with n_f
8575  // and n_p. It should be [n_f,n_p]:
8576  assert ( n_f==pxsec.nrows() );
8577  assert ( n_p==pxsec.ncols() );
8578 
8579  // Loop pressure/temperature:
8580  for ( Index i=0; i<n_p; ++i )
8581  {
8582  // Dummy scalar holds everything except the quadratic frequency dependence.
8583  // The vmr of CO2 will be multiplied at the stage of absorption
8584  // calculation: abs = vmr * pxsec.
8585  Numeric dummy = C * pow( (Numeric)300./abs_t[i], x ) * abs_p[i] * abs_p[i] * abs_n2[i];
8586 
8587  // Loop frequency:
8588  for ( Index s=0; s<n_f; ++s )
8589  {
8590  pxsec(s,i) += dummy * pow( f_grid[s], (Numeric)2. );
8591  }
8592  }
8593 }
8594 //
8595 // #################################################################################
8596 // ################################### CLOUD AND RAIN MODELS #######################
8597 // #################################################################################
8599 
8631  const Numeric CCin, // input parameter
8632  const Numeric CGin, // input parameter
8633  const Numeric CEin, // input parameter
8634  const String& model, // model
8635  ConstVectorView f_grid, // frequency vector
8636  ConstVectorView abs_p, // pressure vector
8637  ConstVectorView abs_t, // temperature vector
8638  ConstVectorView vmr, // suspended water droplet density vector
8639  const Verbosity& verbosity)
8640 {
8641  CREATE_OUT3
8642 
8643  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8644  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
8645  // "Propagation modeling of moist air and suspended water/ice
8646  // particles at frequencies below 1000 GHz",
8647  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
8648  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
8649  const Numeric CC_MPM93 = 1.00000;
8650  const Numeric CG_MPM93 = 1.00000;
8651  const Numeric CE_MPM93 = 1.00000;
8652  // ---------------------------------------------------------------------------------------
8653 
8654 
8655  // select the parameter set (!!model dominates values!!):
8656  Numeric CC, CG, CE;
8657  if ( model == "MPM93" )
8658  {
8659  CC = CC_MPM93;
8660  CG = CG_MPM93;
8661  CE = CE_MPM93;
8662  }
8663  else if ( model == "user" )
8664  {
8665  CC = CCin;
8666  CG = CGin;
8667  CE = CEin;
8668  }
8669  else
8670  {
8671  ostringstream os;
8672  os << "liquidcloud-MPM93: ERROR! Wrong model values given.\n"
8673  << "Valid models are: 'MPM93' and 'user'" << '\n';
8674  throw runtime_error(os.str());
8675  }
8676  out3 << "liquidcloud-MPM93: (model=" << model << ") parameter values in use:\n"
8677  << " CC = " << CC << "\n"
8678  << " CG = " << CG << "\n"
8679  << " CE = " << CE << "\n";
8680 
8681 
8682  const Numeric m = 1.00e3; // specific weight of the droplet, fixed value: 1.00e3 kg/m³
8683  const Numeric low_lim_den = 0.000; // lower limit of suspended droplet particle density vector [kg/m³]
8684  const Numeric high_lim_den = 10.00e-3; // lower limit of suspended droplet particle density vector [kg/m³]
8685 
8686  const Index n_p = abs_p.nelem(); // Number of pressure levels
8687  const Index n_f = f_grid.nelem(); // Number of frequencies
8688 
8689  // Check that dimensions of abs_p, abs_t, and vmr agree:
8690  assert ( n_p==abs_t.nelem() );
8691  assert ( n_p==vmr.nelem() );
8692 
8693  // Check that dimensions of pxsec are consistent with n_f
8694  // and n_p. It should be [n_f,n_p]:
8695  assert ( n_f==pxsec.nrows() );
8696  assert ( n_p==pxsec.ncols() );
8697 
8698  // Loop pressure/temperature:
8699  for ( Index i=0; i<n_p; ++i )
8700  {
8701  // water vapor saturation pressure over liquid water [Pa]
8702  // Numeric es = WVSatPressureLiquidWater(abs_t[i]);
8703  // water vapor partial pressure [Pa]
8704  // Numeric e = abs_p[i] * vmr[i];
8705  // relative humidity [1]
8706  // Numeric RH = e / es;
8707 
8708  // Check limits of suspended water droplet density ("vmr") [kg/m³]
8709  if ( (vmr[i] > low_lim_den) && (vmr[i] < high_lim_den) )
8710  {
8711  // relative inverse temperature [1]
8712  Numeric theta = 300.000 / abs_t[i];
8713  // relaxation frequencies [GHz]
8714  Numeric gamma1 = CG * 20.20 - 146.40*(theta-1.000) + 316.00*(theta-1.000)*(theta-1.000);
8715  // Numeric gamma1 = 20.1 * exp( 7.88 * theta ); // see Liebe et al. IJIMW, 1992, p667, Eq. (2b)
8716  Numeric gamma2 = 39.80 * gamma1;
8717  // static and high-frequency permittivities
8718  Numeric epsilon0 = CE * 103.30 * (theta-1.000) + 77.66;
8719  Numeric epsilon1 = 0.0671 * epsilon0;
8720  Numeric epsilon2 = 3.52;
8721 
8722  // Loop frequency:
8723  for ( Index s=0; s<n_f; ++s )
8724  {
8725  // real part of the complex permittivity of water (double-debye model)
8726  Numeric Reepsilon = epsilon0 -
8727  pow((f_grid[s]*Hz_to_GHz),(Numeric)2.) *
8728  ( ((epsilon0-epsilon1)/
8729  (pow((f_grid[s]*Hz_to_GHz),(Numeric)2.)
8730  + pow(gamma1,(Numeric)2.))) +
8731  ((epsilon1-epsilon2)/
8732  (pow((f_grid[s]*Hz_to_GHz),(Numeric)2.)
8733  + pow(gamma2,(Numeric)2.))) );
8734  // imaginary part of the complex permittivity of water (double-debye model)
8735  Numeric Imepsilon = (f_grid[s]*Hz_to_GHz) *
8736  ( (gamma1*(epsilon0-epsilon1)/
8737  (pow((f_grid[s]*Hz_to_GHz),(Numeric)2.)
8738  + pow(gamma1,(Numeric)2.))) +
8739  (gamma2*(epsilon1-epsilon2)/
8740  (pow((f_grid[s]*Hz_to_GHz),(Numeric)2.)
8741  + pow(gamma2,(Numeric)2.))) );
8742  // the imaginary part of the complex refractivity of suspended liquid water particle [ppm]
8743  // In MPM93 w is in g/m³ and m is in g/cm³. Because of the units used in arts,
8744  // a factor of 1.000e6 must be multiplied with the ratio (w/m):
8745  // MPM93: (w/m)_MPM93 in (g/m³)/(g/cm³)
8746  // arts: (w/m)_arts in (kg/m³)/(kg/m³)
8747  // =====> (w/m)_MPM93 = 1.0e6 * (w/m)_arts
8748  // the factor of 1.0e6 is included below in pxsec calculation.
8749  Numeric ImNw = 1.500 / m *
8750  ( 3.000 * Imepsilon
8751  / ( pow((Reepsilon+(Numeric)2.000),(Numeric)2.)
8752  + pow(Imepsilon,(Numeric)2.) ) );
8753  // liquid water particle absorption cross section [1/m]
8754  // The vmr of H2O will be multiplied at the stage of absorption
8755  // calculation: abs = vmr * pxsec.
8756  // pxsec = abs/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
8757  pxsec(s,i) += CC * 1.000e6 * dB_km_to_1_m * 0.1820 * (f_grid[s]*Hz_to_GHz) * ImNw;
8758  }
8759  } else
8760  {
8761  if ( (vmr[i] < low_lim_den) || (vmr[i] > high_lim_den) )
8762  {
8763  ostringstream os;
8764  os << "ERROR in MPM93WaterDropletAbs:\n"
8765  << " suspended water droplet density (valid range 0.00-10.00e-3 kg/m3):" << vmr[i] << "\n"
8766  << " ==> no calculation performed!\n";
8767  throw runtime_error(os.str());
8768  }
8769  }
8770  }
8771 
8772 }
8773 //
8774 // #################################################################################
8776 
8808  const Numeric CCin, // input parameter
8809  const Numeric CAin, // input parameter
8810  const Numeric CBin, // input parameter
8811  const String& model, // model
8812  ConstVectorView f_grid, // frequency vector
8813  ConstVectorView abs_p, // pressure vector
8814  ConstVectorView abs_t, // temperature vector
8815  ConstVectorView vmr, // suspended ice particle density vector,
8816  // valid range: 0-10.0e-3 kg/m³
8817  const Verbosity& verbosity)
8818 {
8819  CREATE_OUT3
8820 
8821  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8822  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
8823  // "Propagation modeling of moist air and suspended water/ice
8824  // particles at frequencies below 1000 GHz",
8825  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
8826  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
8827  const Numeric CC_MPM93 = 1.00000;
8828  const Numeric CA_MPM93 = 1.00000;
8829  const Numeric CB_MPM93 = 1.00000;
8830  // ---------------------------------------------------------------------------------------
8831 
8832 
8833  // select the parameter set (!!model dominates values!!):
8834  Numeric CC, CA, CB;
8835  if ( model == "MPM93" )
8836  {
8837  CC = CC_MPM93;
8838  CA = CA_MPM93;
8839  CB = CB_MPM93;
8840  }
8841  else if ( model == "user" )
8842  {
8843  CC = CCin;
8844  CA = CAin;
8845  CB = CBin;
8846  }
8847  else
8848  {
8849  ostringstream os;
8850  os << "icecloud-MPM93: ERROR! Wrong model values given.\n"
8851  << "Valid models are: 'MPM93' and 'user'" << '\n';
8852  throw runtime_error(os.str());
8853  }
8854  out3 << "icecloud-MPM93: (model=" << model << ") parameter values in use:\n"
8855  << " CC = " << CC << "\n"
8856  << " CA = " << CA << "\n"
8857  << " CB = " << CB << "\n";
8858 
8859 
8860  const Numeric m = 0.916e3; // specific weight of ice particles, fixed value: 0.916e3 kg/m³
8861  const Numeric low_lim_den = 0.000; // lower limit of suspended ice particle density vector [kg/m³]
8862  const Numeric high_lim_den = 10.00e-3; // lower limit of suspended ice particle density vector [kg/m³]
8863 
8864  const Index n_p = abs_p.nelem(); // Number of pressure levels
8865  const Index n_f = f_grid.nelem(); // Number of frequencies
8866 
8867  // Check that dimensions of abs_p, abs_t, and vmr agree:
8868  assert ( n_p==abs_t.nelem() );
8869  assert ( n_p==vmr.nelem() );
8870 
8871  // Check that dimensions of pxsec are consistent with n_f
8872  // and n_p. It should be [n_f,n_p]:
8873  assert ( n_f==pxsec.nrows() );
8874  assert ( n_p==pxsec.ncols() );
8875 
8876 
8877 
8878  // Loop pressure/temperature:
8879  for ( Index i=0; i<n_p; ++i )
8880  {
8881  // water vapor saturation pressure over ice [Pa]
8882  // Numeric es = WVSatPressureIce(abs_t[i]);
8883  // water vapor partial pressure [Pa]
8884  // Numeric e = abs_p[i] * vmr[i];
8885  // relative humidity [1]
8886  // Numeric RH = e / es;
8887 
8888  // Check limits of suspended water ice crystal density ("vmr") [kg/m³]
8889  if ( (vmr[i] > low_lim_den) && (vmr[i] < high_lim_den) )
8890  {
8891  // relative inverse temperature [1]
8892  Numeric theta = 300.000 / abs_t[i];
8893  // inverse frequency T-dependency function [Hz]
8894  Numeric ai = CA * (62.000 * theta - 11.600) * exp(-22.100 * (theta-1.000)) * 1.000e-4;
8895  // linear frequency T-dependency function [1/Hz]
8896  Numeric bi = CB * 0.542e-6 *
8897  ( -24.17 + (116.79/theta)
8898  + pow((theta/(theta-(Numeric)0.9927)),(Numeric)2.) );
8899 
8900  // Loop frequency:
8901  for ( Index s=0; s<n_f; ++s )
8902  {
8903  // real part of the complex permittivity of ice
8904  Numeric Reepsilon = 3.15;
8905  // imaginary part of the complex permittivity of water
8906  Numeric Imepsilon = ( ( ai/(f_grid[s]*Hz_to_GHz) ) +
8907  ( bi*(f_grid[s]*Hz_to_GHz) ) );
8908  // the imaginary part of the complex refractivity of suspended ice particles.
8909  // In MPM93 w is in g/m³ and m is in g/cm³. Because of the units used in arts,
8910  // a factor of 1.000e6 must be multiplied with the ratio (w/m):
8911  // MPM93: (w/m)_MPM93 in (g/m³)/(g/cm³)
8912  // arts: (w/m)_arts in (kg/m³)/(kg/m³)
8913  // =====> (w/m)_MPM93 = 1.0e6 * (w/m)_arts
8914  // the factor of 1.0e6 is included below in pxsec calculation.
8915  Numeric ImNw = 1.500 / m *
8916  ( 3.000 * Imepsilon
8917  / ( pow((Reepsilon+(Numeric)2.000),(Numeric)2.)
8918  + pow(Imepsilon,(Numeric)2.) ) );
8919  // ice particle absorption cross section [1/m]
8920  // The vmr of H2O will be multiplied at the stage of absorption
8921  // calculation: abs = vmr * pxsec.
8922  // pxsec = abs/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
8923  pxsec(s,i) += CC * 1.000e6 * dB_km_to_1_m * 0.1820 * (f_grid[s]*Hz_to_GHz) * ImNw;
8924  }
8925  } else
8926  {
8927  if ( (vmr[i] < low_lim_den) || (vmr[i] > high_lim_den) )
8928  {
8929  ostringstream os;
8930  os << "ERROR in MPM93IceCrystalAbs:\n"
8931  << " suspended ice particle density (valid range: 0-10.0e-3 kg/m3):" << vmr[i] << "\n"
8932  << " ==> no calculation performed!\n";
8933  throw runtime_error(os.str());
8934  }
8935  }
8936  }
8937  return;
8938 }
8939 //
8940 // #################################################################################
8942 
8971  const Numeric CEin, // input parameter
8972  const Numeric CAin, // input parameter
8973  const Numeric CBin, // input parameter
8974  const String& model, // model
8975  ConstVectorView f_grid, // frequency vector
8976  ConstVectorView abs_p, // pressure vector
8977  ConstVectorView abs_t _U_, // temperature vector
8978  ConstVectorView vmr, // rain rate profile [mm/h]
8979  const Verbosity& verbosity)
8980 {
8981  CREATE_OUT3
8982 
8983  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8984  // standard values for the MPM93 model based on Olsen, R.L.,
8985  // D.V. Rogers, and D. B. Hodge, "The aR^b relation in the
8986  // calculation of rain attenuation", IEEE Trans. Antennas Propagat.,
8987  // vol. AP-26, pp. 318-329, 1978,
8988  const Numeric CE_MPM93 = 1.00000;
8989  const Numeric CA_MPM93 = 1.00000;
8990  const Numeric CB_MPM93 = 1.00000;
8991  // ---------------------------------------------------------------------------------------
8992 
8993 
8994  // select the parameter set (!!model dominates values!!):
8995  Numeric CE, CA, CB;
8996  if ( model == "MPM93" )
8997  {
8998  CE = CE_MPM93;
8999  CA = CA_MPM93;
9000  CB = CB_MPM93;
9001  }
9002  else if ( model == "user" )
9003  {
9004  CE = CEin;
9005  CA = CAin;
9006  CB = CBin;
9007  }
9008  else
9009  {
9010  ostringstream os;
9011  os << "rain-MPM93: ERROR! Wrong model values given.\n"
9012  << "Valid models are: 'MPM93' and 'user'" << '\n';
9013  throw runtime_error(os.str());
9014  }
9015  out3 << "rain-MPM93: (model=" << model << ") parameter values in use:\n"
9016  << " CE = " << CE << "\n"
9017  << " CA = " << CA << "\n"
9018  << " CB = " << CB << "\n";
9019 
9020 
9021  const Numeric low_lim_rr = 0.000; // lower limit of allowed rain rate [mm/h]
9022  const Numeric high_lim_rr = 150.000; // upper limit of allowed rain rate [mm/h]
9023 
9024  const Index n_p = abs_p.nelem(); // Number of pressure levels
9025  const Index n_f = f_grid.nelem(); // Number of frequencies
9026 
9027  // Check that dimensions of abs_p, abs_t, and vmr agree:
9028  assert ( n_p==abs_t.nelem() );
9029  assert ( n_p==vmr.nelem() );
9030 
9031  // Check that dimensions of pxsec are consistent with n_f
9032  // and n_p. It should be [n_f,n_p]:
9033  assert ( n_f==pxsec.nrows() );
9034  assert ( n_p==pxsec.ncols() );
9035 
9036  // Loop pressure/temperature:
9037  for ( Index i=0; i<n_p; ++i )
9038  {
9039  // Extinction by rain is parameterized as:
9040  // ext_rain = a_rain * rr ^ b_rain
9041  // a_rain and b_rain each depend on frequency by power laws:
9042  // a_rain = Ga * freq ^ Ea
9043  // b_rain = Gb * freq ^ Eb
9044  Numeric Ga = 0.;
9045  Numeric Ea = 0.;
9046  Numeric Gb = 0.;
9047  Numeric Eb = 0.;
9048  // FIXME Numeric a_rain;
9049  // FIXME Numeric b_rain;
9050  // FIXME Numeric ext_rain;
9051 
9052  // Check limits of rain rate ("vmr") [mm/h]
9053  if ( (vmr[i] >= low_lim_rr) && (vmr[i] < high_lim_rr) )
9054  {
9055  // Loop frequency:
9056  for ( Index s=0; s<n_f; ++s )
9057  {
9058  // for rain rate < 25 mm/h, take parameters from Olsen et al.'s
9059  // own power law fit to their Laws-Parsons-Low data;
9060  // for rain rate > 25 mm/h, take C. Melsheimer's power law fit
9061  // to Olsen et al.'s Laws-Parson-High data
9062  if ( vmr[i] <= 25 )
9063  {
9064  // power law coeff. Ga and exponent Ea for a, piecewise:
9065  if ( f_grid[s] <= 2.9e9 )
9066  {
9067  Ga = 6.39e-5;
9068  Ea = 2.03;
9069  }
9070  else if ( f_grid[s] <= 54.0e9 )
9071  {
9072  Ga = 4.21e-5;
9073  Ea = 2.42;
9074  }
9075  else if ( f_grid[s] <= 180e9 )
9076  {
9077  Ga = 4.09e-2;
9078  Ea = 0.699;
9079  }
9080  else if ( f_grid[s] <= 1000e9 )
9081  {
9082  Ga = 3.38;
9083  Ea = -0.151;
9084  }
9085  else
9086  {
9087  ostringstream os;
9088  os << "ERROR in MPM93RainExt:\n"
9089  << " frequency (valid range 0-1000 GHz):" << f_grid[s]*Hz_to_GHz << "\n"
9090  << " ==> no calculation performed!\n";
9091  throw runtime_error(os.str());
9092  }
9093  // power law coeff. Gb and exponent Eb for b, piecewise:
9094  if ( f_grid[s] <= 8.5e9 )
9095  {
9096  Gb = 0.851;
9097  Eb = 0.158;
9098  }
9099  else if ( f_grid[s] <= 25.0e9 )
9100  {
9101  Gb = 1.41;
9102  Eb = -0.0779;
9103  }
9104  else if ( f_grid[s] <= 164.0e9 )
9105  {
9106  Gb = 2.63;
9107  Eb = -0.272;
9108  }
9109  else if ( f_grid[s] <= 1000e9 )
9110  {
9111  Gb = 0.616;
9112  Eb = 0.0126;
9113  }
9114  else
9115  {
9116  ostringstream os;
9117  os << "ERROR in MPM93RainExt:\n"
9118  << " frequency (valid range 0-1000 GHz):" << f_grid[s]*Hz_to_GHz << "\n"
9119  << " ==> no calculation performed!\n";
9120  throw runtime_error(os.str());
9121  }
9122 
9123  }
9124  else if (vmr[i] > 25)
9125  {
9126  // power law coeff. Ga and exponent Ea for a, piecewise:
9127  if ( f_grid[s] <= 4.9e9 )
9128  {
9129  Ga = 5.30e-5;
9130  Ea = 1.87;
9131  }
9132  else if ( f_grid[s] <= 10.7e9 )
9133  {
9134  Ga = 5.03e-6;
9135  Ea = 3.35;
9136  }
9137  else if ( f_grid[s] <= 40.1e9 )
9138  {
9139  Ga = 2.53e-5;
9140  Ea = 2.67;
9141  }
9142  else if ( f_grid[s] <= 59.1e9 )
9143  {
9144  Ga = 3.58e-3;
9145  Ea = 1.33;
9146  }
9147  else if ( f_grid[s] <= 100e9 )
9148  {
9149  Ga = 0.143;
9150  Ea = 0.422;
9151  }
9152  else
9153  {
9154  ostringstream os;
9155  os << "ERROR in MPM93RainExt:\n"
9156  << " frequency (valid range for rain rate > 25mm/h: 0-100 GHz):" << f_grid[s]*Hz_to_GHz << "\n"
9157  << " ==> no calculation performed!\n";
9158  throw runtime_error(os.str());
9159  }
9160  // power law coeff. Gb and exponent Eb for b, piecewise:
9161  if ( f_grid[s] <= 6.2e9 )
9162  {
9163  Gb = 0.911;
9164  Eb = 0.190;
9165  }
9166  else if ( f_grid[s] <= 23.8e9 )
9167  {
9168  Gb = 1.71;
9169  Eb = -0.156;
9170  }
9171  else if ( f_grid[s] <= 48.4e9 )
9172  {
9173  Gb = 3.08;
9174  Eb = -0.342;
9175  }
9176  else if ( f_grid[s] <= 68.2e9 )
9177  {
9178  Gb = 1.28;
9179  Eb = -0.116;
9180  }
9181  else if ( f_grid[s] <= 100e9 )
9182  {
9183  Gb = 0.932;
9184  Eb = -0.0408;
9185  }
9186  else
9187  {
9188  ostringstream os;
9189  os << "ERROR in MPM93RainExt:\n"
9190  << " frequency (valid range for rain rate > 25mm/h: 0-100 GHz):" << f_grid[s]*Hz_to_GHz << "\n"
9191  << " ==> no calculation performed!\n";
9192  throw runtime_error(os.str());
9193  }
9194  }
9195  //Factor a_rain
9196  Numeric a_rain = Ga * pow((f_grid[s]*Hz_to_GHz),Ea);
9197  //Factor b_rain
9198  Numeric b_rain = Gb * pow((f_grid[s]*Hz_to_GHz),Eb);
9199  // Extinction coefficient [dB/km], with scaling
9200  // parameters CA and CB
9201  Numeric ext_rain = CA * a_rain * pow(vmr[i],(CB*b_rain));
9202  // rain extinction cross section [1/m]
9203  // The vmr will be multiplied at the stage of extinction
9204  // calculation: ext = vmr * pxsec.
9205  // pxsec = ext/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
9206  pxsec(s,i) += CE * dB_km_to_1_m * ext_rain / vmr[i];
9207  }
9208  } else
9209  {
9210  if ( (vmr[i] < low_lim_rr) || (vmr[i] > high_lim_rr) )
9211  {
9212  ostringstream os;
9213  os << "ERROR in MPM93RainExt:\n"
9214  << " rain rate (valid range 0.00-150.00 mm/h):" << vmr[i] << "\n"
9215  << " ==> no calculation performed!\n";
9216  throw runtime_error(os.str());
9217  }
9218  }
9219  }
9220 
9221 }
9222 //
9223 // #################################################################################
9224 // ################################# HELP FUNCTIONS ################################
9225 // #################################################################################
9226 //
9248  const Numeric fl,
9249  const Numeric f)
9250 {
9251  /*
9252  this routine calculates the line shape function of Van Vleck and Weisskopf
9253  with the factor (f/f_o)¹. for the MPM pseudo continuum line.
9254 
9255  creation TKS, 4.11.00
9256 
9257  input: gamma [Hz] line width of line L
9258  fl [Hz] central frequency of line L
9259  f [Hz] frequency position of calculation
9260 
9261  output: value [1/Hz] line shape function value at f for the line parameters
9262  of line L
9263 
9264  */
9265 
9266  double f_minus, f_plus ; /* internal variables */
9267  double value; /* return value */
9268 
9269  // line at fl
9270  f_minus = 1.000 / ((f-fl)*(f-fl) + gamma*gamma);
9271 
9272  // mirror line at -fl
9273  f_plus = 1.000 / ((f+fl)*(f+fl) + gamma*gamma);
9274 
9275  // VVW line shape function value
9276  value = fabs(f/fl) * gamma * (f_minus + f_plus);
9277 
9278  return value;
9279 }
9280 //
9281 // #################################################################################
9282 //
9305  const Numeric fl,
9306  const Numeric f,
9307  const Numeric delta)
9308 {
9309  /*
9310  this routine calculates the line shape function of Van Vleck and Weisskopf
9311  for O2 with line mixing.
9312 
9313  creation TKS, 14.07.01
9314 
9315  input: gamma [GHz] line width of line L
9316  fl [GHz] central frequency of line L
9317  f [GHz] frequency position of calculation
9318  delta [1] line mixing parameter
9319 
9320  output: value [1] line shape function value at f for the line parameters
9321  of line L
9322 
9323  */
9324 
9325  double f_minus, f_plus ; /* internal variables */
9326  double value; /* return value */
9327 
9328  // line at fl
9329  f_minus = (gamma - delta * (fl-f)) / ((fl-f)*(fl-f) + gamma*gamma);
9330 
9331  // mirror line at -fl
9332  f_plus = (gamma - delta * (fl+f)) / ((fl+f)*(fl+f) + gamma*gamma);
9333 
9334  // VVW line shape function value
9335  value = f * (f_minus + f_plus);
9336 
9337  return value;
9338 }
9339 //
9340 // #################################################################################
9341 //
9365 {
9366 
9367  // check of temperature range
9368  if (t < 0.000)
9369  {
9370  ostringstream os;
9371  os << "In WVSatPressureLiquidWater:\n"
9372  << "temperature negative: T=" << t <<"K \n";
9373  throw runtime_error(os.str());
9374  }
9375 
9376  // COMPUTES SATURATION H2O VAPOR PRESSURE (OVER LIQUID)
9377  // USING LIEBE'S APPROXIMATION (CORRECTED)
9378  // input : T in Kelvin
9379  // output : es in Pa
9380  // PWR 4/8/92
9381  /*
9382  Numeric TH = 300.0 / t;
9383  Numeric es_PWR98 = 100.00 * 35.3 * exp(22.64*(1.-TH)) * pow(TH,5.0);
9384  */
9385 
9386  // MPM93 calculation
9387  Numeric theta = 373.16 / t;
9388  Numeric exponent = ( -7.90298 * (theta-1.000) +
9389  5.02808 * log10(theta) -
9390  1.3816e-7 * ( pow( (Numeric)10.00,
9391  ((Numeric)11.344*
9392  ((Numeric)1.00-((Numeric)1.00
9393  /theta))) )
9394  - (Numeric)1.000 ) +
9395  8.1328e-3 * ( pow( (Numeric)10.00,
9396  ((Numeric)-3.49149
9397  *(theta-(Numeric)1.00)))
9398  - 1.000) +
9399  log10(1013.246) );
9400  Numeric es_MPM93 = 100.000 * pow((Numeric)10.00,exponent);
9401 
9402  return es_MPM93; // [Pa]
9403 }
9404 //
9405 // #################################################################################
9406 //
9430 {
9431 
9432  // check of temperature range
9433  if (t < 0.000)
9434  {
9435  ostringstream os;
9436  os << "In WVSatPressureIce:\n"
9437  << "temperature negative: T=" << t <<"K \n";
9438  throw runtime_error(os.str());
9439  }
9440 
9441  // MPM93 calculation
9442  Numeric theta = 273.16 / t;
9443  Numeric exponent = (-9.09718 * (theta-1.000) -
9444  3.56654 * log10(theta) +
9445  0.876793 * (1.000-(1.000/theta)) +
9446  log10(6.1071) );
9447 
9448  Numeric es_MPM93 = 100.000 * pow((Numeric)10.00,exponent);
9449 
9450  return es_MPM93;
9451 }
9452 //
9453 // #################################################################################
9454 // #################### CONTROL OF ADDITIONAL ABSORPTION MODEL #####################
9455 // #################################################################################
9456 //
9457 //
9496  const String& name,
9498  const String& model,
9499  ConstVectorView f_grid,
9500  ConstVectorView abs_p,
9501  ConstVectorView abs_t,
9502  ConstVectorView abs_n2,
9503  ConstVectorView abs_h2o,
9504  ConstVectorView vmr,
9505  const Verbosity& verbosity)
9506 {
9507  CREATE_OUT3
9508 
9509  /* In the following all the possible tags are listed here and
9510  after a first consistency check about the input parameters the
9511  appropriate internal function is called,
9512 
9513  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9514  ATTENTION PLEASE UPDATE THIS COMMENT IF ANY CHANGES ARE MADE CONCERNING
9515  THE ASSOCIATED MODELS TO EACH TAG
9516  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9517 
9518  ----------------------------------------------------------------------------------------------------
9519  TAG VALID MODELS
9520  ----------------------------------------------------------------------------------------------------
9521  *CONTAGMODINFO* H2O-SelfContStandardType: Rosenkranz, user
9522  *CONTAGMODINFO* H2O-ForeignContStandardType: Rosenkranz, user
9523  *CONTAGMODINFO* H2O-ForeignContMaTippingType: MaTipping, user
9524  *CONTAGMODINFO* H2O-ContMPM93: MPM93, user
9525  *CONTAGMODINFO* H2O-MPM87: MPM87, MPM87Lines, MPM87Continuum, user
9526  *CONTAGMODINFO* H2O-MPM89: MPM89, MPM89Lines, MPM89Continuum, user
9527  *CONTAGMODINFO* H2O-MPM93: MPM93, MPM93Lines, MPM93Continuum, user
9528  *CONTAGMODINFO* H2O-PWR98: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9529  *CONTAGMODINFO* H2O-CP98: CruzPol, CruzPolLine, CruzPolContinuum, user
9530  *CONTAGMODINFO* H2O-CKD24: CKD24, user
9531  *CONTAGMODINFO* O2-MPM85: MPM85, MPM85Lines, MPM85Continuum, MPM85NoCoupling, MPM85NoCutoff, user
9532  *CONTAGMODINFO* O2-MPM87: MPM87, MPM87Lines, MPM87Continuum, MPM87NoCoupling, MPM87NoCutoff, user
9533  *CONTAGMODINFO* O2-MPM89: MPM89, MPM89Lines, MPM89Continuum, MPM89NoCoupling, MPM89NoCutoff, user
9534  *CONTAGMODINFO* O2-MPM92: MPM92, MPM92Lines, MPM92Continuum, MPM92NoCoupling, MPM92NoCutoff, user
9535  *CONTAGMODINFO* O2-MPM93: MPM93, MPM93Lines, MPM93Continuum, MPM93NoCoupling, MPM92NoCutoff, user
9536  *CONTAGMODINFO* O2-PWR93: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9537  *CONTAGMODINFO* O2-PWR88: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9538  *CONTAGMODINFO* O2-SelfContMPM93: MPM93, user
9539  *CONTAGMODINFO* O2-SelfContPWR93: Rosenkranz, user
9540  *CONTAGMODINFO* O2-GenerealCont: Rosenkranz, MPM93, user
9541  *CONTAGMODINFO* N2-BFCIA86: BF86, user
9542  *CONTAGMODINFO* N2-SelfContMPM93: MPM93, user, MPM93Scale
9543  *CONTAGMODINFO* N2-SelfContPWR93: Rosenkranz, user
9544  *CONTAGMODINFO* N2-SelfContStandardType: Rosenkranz, user
9545  *CONTAGMODINFO* CO2-SelfContPWR93: Rosenkranz, user
9546  *CONTAGMODINFO* CO2-ForeignContPWR93: Rosenkranz, user
9547  *CONTAGMODINFO* liquidcloud-MPM93: MPM93, user
9548  *CONTAGMODINFO* icecloud-MPM93: MPM93, user
9549  *CONTAGMODINFO* rain-MPM93: MPM93, user
9550  ----------------------------------------------------------------------------------------------------
9551  */
9552 
9553  // Set up a lokal variable pxsec for the pseudo cross sections, that
9554  // are used by the internal contiuum functions. It is important that
9555  // we also inititialize this to zero here, since the continuum
9556  // routines just add to this.
9557  // The dimensions of this are [n_frequencies,n_pressures].
9558  Matrix pxsec(xsec.nrows(),xsec.ncols(),0.0);
9559 
9560  // ============= H2O continuum ========================================================
9561  if ( "H2O-SelfContStandardType"==name )
9562  {
9563  //
9564  // specific continuum parameters and units:
9565  // OUTPUT
9566  // pxsec : [1/m],
9567  // INPUT
9568  // parameters[0] : continuum coefficient (C_s) [1/m / (Hz²*Pa²)]
9569  // parameters[1] : temperature exponent (x_s) [1]
9570  // f_grid : [Hz]
9571  // abs_p : [Pa]
9572  // abs_t : [K]
9573  // vmr : [1]
9574  //
9575  const int Nparam = 2;
9576  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9577  {
9578  out3 << "Continuum model " << name << " is running with \n"
9579  << "user defined parameters according to model " << model << ".\n";
9581  parameters[0],
9582  parameters[1],
9583  model,
9584  f_grid,
9585  abs_p,
9586  abs_t,
9587  vmr,
9588  verbosity );
9589  }
9590  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9591  {
9592  ostringstream os;
9593  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9594  << "parameters for the model " << model << ",\n"
9595  << "but you specified " << parameters.nelem() << " parameters.\n";
9596  throw runtime_error(os.str());
9597  }
9598  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9599  {
9600  out3 << "Continuum model " << name << " running with \n"
9601  << "the parameters for model " << model << ".\n";
9603  0.00,
9604  0.00,
9605  model,
9606  f_grid,
9607  abs_p,
9608  abs_t,
9609  vmr,
9610  verbosity );
9611  }
9612  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9613  {
9614  ostringstream os;
9615  os << "ERROR: Continuum model " << name << " requires NO input\n"
9616  << "parameters for the model " << model << ",\n"
9617  << "but you specified " << parameters.nelem() << " parameters.\n"
9618  << "This ambiguity can not be solved by arts.\n"
9619  << "Please see the arts user guide chapter 3.\n";
9620  throw runtime_error(os.str());
9621  }
9622  }
9623  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9624  else if ( "H2O-ForeignContStandardType"==name )
9625  {
9626  //
9627  // specific continuum parameters units:
9628  // a) output
9629  // pxsec : [1/m],
9630  // b) input
9631  // parameters[0] : [1/m / (Hz²*Pa²)]
9632  // parameters[1] : [1]
9633  // f_grid : [Hz]
9634  // abs_p : [Pa]
9635  // abs_t : [K]
9636  // vmr : [1]
9637  //
9638  const int Nparam = 2;
9639  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9640  {
9641  out3 << "Continuum model " << name << " is running with \n"
9642  << "user defined parameters according to model " << model << ".\n";
9644  parameters[0],
9645  parameters[1],
9646  model,
9647  f_grid,
9648  abs_p,
9649  abs_t,
9650  vmr,
9651  verbosity );
9652  }
9653  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9654  {
9655  ostringstream os;
9656  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9657  << "parameters for the model " << model << ",\n"
9658  << "but you specified " << parameters.nelem() << " parameters.\n";
9659  throw runtime_error(os.str());
9660  }
9661  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9662  {
9663  out3 << "Continuum model " << name << " running with \n"
9664  << "the parameters for model " << model << ".\n";
9666  0.00,
9667  0.00,
9668  model,
9669  f_grid,
9670  abs_p,
9671  abs_t,
9672  vmr,
9673  verbosity );
9674  }
9675  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9676  {
9677  ostringstream os;
9678  os << "ERROR: Continuum model " << name << " requires NO input\n"
9679  << "parameters for the model " << model << ",\n"
9680  << "but you specified " << parameters.nelem() << " parameters.\n"
9681  << "This ambiguity can not be solved by arts.\n"
9682  << "Please see the arts user guide chapter 3.\n";
9683  throw runtime_error(os.str());
9684  }
9685  }
9686  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9687  else if ( "H2O-ForeignContMaTippingType"==name )
9688  {
9689  //
9690  // specific continuum parameters units:
9691  // a) output
9692  // pxsec : [1/m],
9693  // b) input
9694  // parameters[0] : [1/m / (Hz²*Pa²)]
9695  // parameters[1] : [1]
9696  // f_grid : [Hz]
9697  // abs_p : [Pa]
9698  // abs_t : [K]
9699  // vmr : [1]
9700  //
9701  const int Nparam = 2;
9702  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9703  {
9704  out3 << "Continuum model " << name << " is running with \n"
9705  << "user defined parameters according to model " << model << ".\n";
9707  parameters[0],
9708  parameters[1],
9709  model,
9710  f_grid,
9711  abs_p,
9712  abs_t,
9713  vmr,
9714  verbosity );
9715  }
9716  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9717  {
9718  ostringstream os;
9719  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9720  << "parameters for the model " << model << ",\n"
9721  << "but you specified " << parameters.nelem() << " parameters.\n";
9722  throw runtime_error(os.str());
9723  }
9724  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9725  {
9726  out3 << "Continuum model " << name << " running with \n"
9727  << "the parameters for model " << model << ".\n";
9729  0.00,
9730  0.00,
9731  model,
9732  f_grid,
9733  abs_p,
9734  abs_t,
9735  vmr,
9736  verbosity );
9737  }
9738  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9739  {
9740  ostringstream os;
9741  os << "ERROR: Continuum model " << name << " requires NO input\n"
9742  << "parameters for the model " << model << ",\n"
9743  << "but you specified " << parameters.nelem() << " parameters.\n"
9744  << "This ambiguity can not be solved by arts.\n"
9745  << "Please see the arts user guide chapter 3.\n";
9746  throw runtime_error(os.str());
9747  }
9748  }
9749  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9750  else if ( "H2O-ContMPM93"==name )
9751  {
9752  // self and foreign continuum term are simultaneously calculated
9753  // since the parameterization can not be divided up in these two
9754  // terms because they are not additive terms.
9755  //
9756  // specific continuum parameters and units:
9757  // OUTPUT
9758  // pxsec : [1/m],
9759  // INPUT
9760  // parameters[0] : pseudo continuum line frequency [Hz]
9761  // parameters[1] : pseudo continuum line strength parameter [Hz/Pa]
9762  // parameters[2] : pseudo continuum line strength temperature parameter [1]
9763  // parameters[3] : pseudo continuum line broadening parameter [Hz/Pa]
9764  // parameters[4] : pseudo continuum line broadening parameter [1]
9765  // parameters[5] : pseudo continuum line broadening parameter [1]
9766  // parameters[6] : pseudo continuum line broadening parameter [1]
9767  // f_grid : [Hz]
9768  // abs_p : [Pa]
9769  // abs_t : [K]
9770  // vmr : [1]
9771  //
9772  const int Nparam = 7;
9773  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9774  {
9775  out3 << "Continuum model " << name << " is running with \n"
9776  << "user defined parameters according to model " << model << ".\n";
9777  MPM93_H2O_continuum( pxsec,
9778  parameters[0],
9779  parameters[1],
9780  parameters[2],
9781  parameters[3],
9782  parameters[4],
9783  parameters[5],
9784  parameters[6],
9785  model,
9786  f_grid,
9787  abs_p,
9788  abs_t,
9789  vmr,
9790  verbosity );
9791  }
9792  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9793  {
9794  ostringstream os;
9795  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9796  << "parameters for the model " << model << ",\n"
9797  << "but you specified " << parameters.nelem() << " parameters.\n";
9798  throw runtime_error(os.str());
9799  }
9800  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9801  {
9802  out3 << "Continuum model " << name << " running with \n"
9803  << "the parameters for model " << model << ".\n";
9804  MPM93_H2O_continuum( pxsec,
9805  0.00,
9806  0.00,
9807  0.00,
9808  0.00,
9809  0.00,
9810  0.00,
9811  0.00,
9812  model,
9813  f_grid,
9814  abs_p,
9815  abs_t,
9816  vmr,
9817  verbosity );
9818  }
9819  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9820  {
9821  ostringstream os;
9822  os << "ERROR: Continuum model " << name << " requires NO input\n"
9823  << "parameters for the model " << model << ",\n"
9824  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
9825  << "This ambiguity can not be solved by arts.\n"
9826  << "Please see the arts user guide chapter 3.\n";
9827  throw runtime_error(os.str());
9828  }
9829  }
9830  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9831  else if ( "H2O-ForeignContATM01"==name )
9832  {
9833  // Foreign wet continuum term.
9834  //
9835  // Pardo et al., IEEE, Trans. Ant. Prop.,
9836  // Vol 49, No 12, pp. 1683-1694, 2001.
9837  //
9838  // specific continuum parameters and units:
9839  // OUTPUT
9840  // pxsec : [1/m],
9841  // INPUT
9842  // parameters[0] : pseudo continuum line frequency [Hz]
9843  // f_grid : [Hz]
9844  // abs_p : [Pa]
9845  // abs_t : [K]
9846  // vmr : [1]
9847  //
9848  const int Nparam = 1;
9849  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9850  {
9851  out3 << "Continuum model " << name << " is running with \n"
9852  << "user defined parameters according to model " << model << ".\n";
9854  parameters[0],
9855  model,
9856  f_grid,
9857  abs_p,
9858  abs_t,
9859  vmr,
9860  verbosity );
9861  }
9862  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9863  {
9864  ostringstream os;
9865  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9866  << "parameters for the model " << model << ",\n"
9867  << "but you specified " << parameters.nelem() << " parameters.\n";
9868  throw runtime_error(os.str());
9869  }
9870  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9871  {
9872  out3 << "Continuum model " << name << " running with \n"
9873  << "the parameters for model " << model << ".\n";
9875  0.000,
9876  model,
9877  f_grid,
9878  abs_p,
9879  abs_t,
9880  vmr,
9881  verbosity );
9882  }
9883  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9884  {
9885  ostringstream os;
9886  os << "ERROR: Continuum model " << name << " requires NO input\n"
9887  << "parameters for the model " << model << ",\n"
9888  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
9889  << "This ambiguity can not be solved by arts.\n"
9890  << "Please see the arts user guide chapter 3.\n";
9891  throw runtime_error(os.str());
9892  }
9893  }
9894  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9895  else if ( "H2O-SelfContCKD222"==name )
9896  {
9897  // OUTPUT:
9898  // pxsec cross section (absorption/volume mixing ratio) of
9899  // H2O self continuum according to CKD2.2.2 [1/m]
9900  // INPUT:
9901  // parameters[0] strength scaling factor [1]
9902  // model allows user defined input parameter set
9903  // (Cin) or choice of
9904  // pre-defined parameters of specific models (see note below).
9905  // f_grid predefined frequency grid [Hz]
9906  // abs_p predefined pressure grid [Pa]
9907  // abs_t predefined temperature grid [K]
9908  // vmr H2O volume mixing ratio profile [1]
9909  // abs_n2 N2 volume mixing ratio profile [1]
9910  //
9911  // WWW resource: ftp.aer.com/aer_contnm_ckd
9912  const int Nparam = 1;
9913  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9914  {
9915  out3 << "Continuum model " << name << " is running with \n"
9916  << "user defined parameters according to model " << model << ".\n";
9917  CKD_222_self_h2o( pxsec,
9918  parameters[0],
9919  model,
9920  f_grid,
9921  abs_p,
9922  abs_t,
9923  vmr,
9924  abs_n2,
9925  verbosity );
9926  }
9927  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9928  {
9929  ostringstream os;
9930  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9931  << "parameters for the model " << model << ",\n"
9932  << "but you specified " << parameters.nelem() << " parameters.\n";
9933  throw runtime_error(os.str());
9934  }
9935  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9936  {
9937  out3 << "Continuum model " << name << " running with \n"
9938  << "the parameters for model " << model << ".\n";
9939  CKD_222_self_h2o( pxsec,
9940  0.000,
9941  model,
9942  f_grid,
9943  abs_p,
9944  abs_t,
9945  vmr,
9946  abs_n2,
9947  verbosity );
9948  }
9949  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9950  {
9951  ostringstream os;
9952  os << "ERROR: continuum model " << name << " requires NO input\n"
9953  << "parameters for the model " << model << ",\n"
9954  << "but you specified " << parameters.nelem() << " parameters.\n"
9955  << "This ambiguity can not be solved by arts.\n"
9956  << "Please see the arts user guide chapter 3.\n";
9957  throw runtime_error(os.str());
9958  }
9959  }
9960  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9961  else if ( "H2O-ForeignContCKD222"==name )
9962  {
9963  // OUTPUT:
9964  // pxsec cross section (absorption/volume mixing ratio) of
9965  // H2O foreign continuum according to CKD2.2.2 [1/m]
9966  // INPUT:
9967  // parameters[0] strength scaling factor [1]
9968  // model allows user defined input parameter set
9969  // (Cin) or choice of
9970  // pre-defined parameters of specific models (see note below).
9971  // f_grid predefined frequency grid [Hz]
9972  // abs_p predefined pressure grid [Pa]
9973  // abs_t predefined temperature grid [K]
9974  // vmr H2O volume mixing ratio profile [1]
9975  // abs_n2 N2 volume mixing ratio profile [1]
9976  //
9977  // WWW resource: ftp.aer.com/aer_contnm_ckd
9978  const int Nparam = 1;
9979  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9980  {
9981  out3 << "Continuum model " << name << " is running with \n"
9982  << "user defined parameters according to model " << model << ".\n";
9983  CKD_222_foreign_h2o( pxsec,
9984  parameters[0],
9985  model,
9986  f_grid,
9987  abs_p,
9988  abs_t,
9989  vmr,
9990  abs_n2,
9991  verbosity );
9992  }
9993  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9994  {
9995  ostringstream os;
9996  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9997  << "parameters for the model " << model << ",\n"
9998  << "but you specified " << parameters.nelem() << " parameters.\n";
9999  throw runtime_error(os.str());
10000  }
10001  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10002  {
10003  out3 << "Continuum model " << name << " running with \n"
10004  << "the parameters for model " << model << ".\n";
10005  CKD_222_foreign_h2o( pxsec,
10006  0.000,
10007  model,
10008  f_grid,
10009  abs_p,
10010  abs_t,
10011  vmr,
10012  abs_n2,
10013  verbosity );
10014  }
10015  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10016  {
10017  ostringstream os;
10018  os << "ERROR: continuum model " << name << " requires NO input\n"
10019  << "parameters for the model " << model << ",\n"
10020  << "but you specified " << parameters.nelem() << " parameters.\n"
10021  << "This ambiguity can not be solved by arts.\n"
10022  << "Please see the arts user guide chapter 3.\n";
10023  throw runtime_error(os.str());
10024  }
10025  }
10026  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10027  else if ( "H2O-SelfContCKD242"==name )
10028  {
10029  // OUTPUT:
10030  // pxsec cross section (absorption/volume mixing ratio) of
10031  // H2O self continuum according to CKD2.4.2 [1/m]
10032  // INPUT:
10033  // parameters[0] strength scaling factor [1]
10034  // model allows user defined input parameter set
10035  // (Cin) or choice of
10036  // pre-defined parameters of specific models (see note below).
10037  // f_grid predefined frequency grid [Hz]
10038  // abs_p predefined pressure grid [Pa]
10039  // abs_t predefined temperature grid [K]
10040  // vmr H2O volume mixing ratio profile [1]
10041  // abs_n2 N2 volume mixing ratio profile [1]
10042  //
10043  // WWW resource: ftp.aer.com/aer_contnm_ckd
10044  const int Nparam = 1;
10045  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10046  {
10047  out3 << "Continuum model " << name << " is running with \n"
10048  << "user defined parameters according to model " << model << ".\n";
10049  CKD_242_self_h2o( pxsec,
10050  parameters[0],
10051  model,
10052  f_grid,
10053  abs_p,
10054  abs_t,
10055  vmr,
10056  abs_n2,
10057  verbosity );
10058  }
10059  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10060  {
10061  ostringstream os;
10062  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10063  << "parameters for the model " << model << ",\n"
10064  << "but you specified " << parameters.nelem() << " parameters.\n";
10065  throw runtime_error(os.str());
10066  }
10067  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10068  {
10069  out3 << "Continuum model " << name << " running with \n"
10070  << "the parameters for model " << model << ".\n";
10071  CKD_242_self_h2o( pxsec,
10072  0.000,
10073  model,
10074  f_grid,
10075  abs_p,
10076  abs_t,
10077  vmr,
10078  abs_n2,
10079  verbosity );
10080  }
10081  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10082  {
10083  ostringstream os;
10084  os << "ERROR: continuum model " << name << " requires NO input\n"
10085  << "parameters for the model " << model << ",\n"
10086  << "but you specified " << parameters.nelem() << " parameters.\n"
10087  << "This ambiguity can not be solved by arts.\n"
10088  << "Please see the arts user guide chapter 3.\n";
10089  throw runtime_error(os.str());
10090  }
10091  }
10092  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10093  else if ( "H2O-ForeignContCKD242"==name )
10094  {
10095  // OUTPUT:
10096  // pxsec cross section (absorption/volume mixing ratio) of
10097  // H2O foreign continuum according to CKD2.4.2 [1/m]
10098  // INPUT:
10099  // parameters[0] strength scaling factor [1]
10100  // model allows user defined input parameter set
10101  // (Cin) or choice of
10102  // pre-defined parameters of specific models (see note below).
10103  // f_grid predefined frequency grid [Hz]
10104  // abs_p predefined pressure grid [Pa]
10105  // abs_t predefined temperature grid [K]
10106  // vmr H2O volume mixing ratio profile [1]
10107  // abs_n2 N2 volume mixing ratio profile [1]
10108  //
10109  // WWW resource: ftp.aer.com/aer_contnm_ckd
10110  const int Nparam = 1;
10111  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10112  {
10113  out3 << "Continuum model " << name << " is running with \n"
10114  << "user defined parameters according to model " << model << ".\n";
10115  CKD_242_foreign_h2o( pxsec,
10116  parameters[0],
10117  model,
10118  f_grid,
10119  abs_p,
10120  abs_t,
10121  vmr,
10122  abs_n2,
10123  verbosity );
10124  }
10125  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10126  {
10127  ostringstream os;
10128  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10129  << "parameters for the model " << model << ",\n"
10130  << "but you specified " << parameters.nelem() << " parameters.\n";
10131  throw runtime_error(os.str());
10132  }
10133  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10134  {
10135  out3 << "Continuum model " << name << " running with \n"
10136  << "the parameters for model " << model << ".\n";
10137  CKD_242_foreign_h2o( pxsec,
10138  0.000,
10139  model,
10140  f_grid,
10141  abs_p,
10142  abs_t,
10143  vmr,
10144  abs_n2,
10145  verbosity );
10146  }
10147  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10148  {
10149  ostringstream os;
10150  os << "ERROR: continuum model " << name << " requires NO input\n"
10151  << "parameters for the model " << model << ",\n"
10152  << "but you specified " << parameters.nelem() << " parameters.\n"
10153  << "This ambiguity can not be solved by arts.\n"
10154  << "Please see the arts user guide chapter 3.\n";
10155  throw runtime_error(os.str());
10156  }
10157  }
10158  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10159  else if ( "H2O-SelfContCKDMT100"==name )
10160  {
10161  // OUTPUT:
10162  // pxsec cross section (absorption/volume mixing ratio) of
10163  // H2O self continuum according to CKD MT 1.00 [1/m]
10164  // INPUT:
10165  // parameters[0] strength scaling factor [1]
10166  // model allows user defined input parameter set
10167  // (Cin) or choice of
10168  // pre-defined parameters of specific models (see note below).
10169  // f_grid predefined frequency grid [Hz]
10170  // abs_p predefined pressure grid [Pa]
10171  // abs_t predefined temperature grid [K]
10172  // vmr H2O volume mixing ratio profile [1]
10173  // abs_n2 N2 volume mixing ratio profile [1]
10174  //
10175  // WWW resource: ftp.aer.com/aer_contnm_ckd
10176  const int Nparam = 1;
10177  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10178  {
10179  out3 << "Continuum model " << name << " is running with \n"
10180  << "user defined parameters according to model " << model << ".\n";
10181  CKD_mt_100_self_h2o( pxsec,
10182  parameters[0],
10183  model,
10184  f_grid,
10185  abs_p,
10186  abs_t,
10187  vmr,
10188  abs_n2,
10189  verbosity );
10190  }
10191  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10192  {
10193  ostringstream os;
10194  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10195  << "parameters for the model " << model << ",\n"
10196  << "but you specified " << parameters.nelem() << " parameters.\n";
10197  throw runtime_error(os.str());
10198  }
10199  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10200  {
10201  out3 << "Continuum model " << name << " running with \n"
10202  << "the parameters for model " << model << ".\n";
10203  CKD_mt_100_self_h2o( pxsec,
10204  0.000,
10205  model,
10206  f_grid,
10207  abs_p,
10208  abs_t,
10209  vmr,
10210  abs_n2,
10211  verbosity );
10212  }
10213  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10214  {
10215  ostringstream os;
10216  os << "ERROR: continuum model " << name << " requires NO input\n"
10217  << "parameters for the model " << model << ",\n"
10218  << "but you specified " << parameters.nelem() << " parameters.\n"
10219  << "This ambiguity can not be solved by arts.\n"
10220  << "Please see the arts user guide chapter 3.\n";
10221  throw runtime_error(os.str());
10222  }
10223  }
10224  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10225  else if ( "H2O-ForeignContCKDMT100"==name )
10226  {
10227  // OUTPUT:
10228  // pxsec cross section (absorption/volume mixing ratio) of
10229  // H2O foreign continuum according to CKD MT 1.00 [1/m]
10230  // INPUT:
10231  // parameters[0] strength scaling factor [1]
10232  // model allows user defined input parameter set
10233  // (Cin) or choice of
10234  // pre-defined parameters of specific models (see note below).
10235  // f_grid predefined frequency grid [Hz]
10236  // abs_p predefined pressure grid [Pa]
10237  // abs_t predefined temperature grid [K]
10238  // vmr H2O volume mixing ratio profile [1]
10239  // abs_n2 N2 volume mixing ratio profile [1]
10240  //
10241  // WWW resource: ftp.aer.com/aer_contnm_ckd
10242  const int Nparam = 1;
10243  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10244  {
10245  out3 << "Continuum model " << name << " is running with \n"
10246  << "user defined parameters according to model " << model << ".\n";
10247  CKD_mt_100_foreign_h2o( pxsec,
10248  parameters[0],
10249  model,
10250  f_grid,
10251  abs_p,
10252  abs_t,
10253  vmr,
10254  abs_n2,
10255  verbosity );
10256  }
10257  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10258  {
10259  ostringstream os;
10260  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10261  << "parameters for the model " << model << ",\n"
10262  << "but you specified " << parameters.nelem() << " parameters.\n";
10263  throw runtime_error(os.str());
10264  }
10265  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10266  {
10267  out3 << "Continuum model " << name << " running with \n"
10268  << "the parameters for model " << model << ".\n";
10269  CKD_mt_100_foreign_h2o( pxsec,
10270  0.000,
10271  model,
10272  f_grid,
10273  abs_p,
10274  abs_t,
10275  vmr,
10276  abs_n2,
10277  verbosity );
10278  }
10279  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10280  {
10281  ostringstream os;
10282  os << "ERROR: continuum model " << name << " requires NO input\n"
10283  << "parameters for the model " << model << ",\n"
10284  << "but you specified " << parameters.nelem() << " parameters.\n"
10285  << "This ambiguity can not be solved by arts.\n"
10286  << "Please see the arts user guide chapter 3.\n";
10287  throw runtime_error(os.str());
10288  }
10289  }
10290  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10291  else if ( "H2O-SelfContCKD24"==name )
10292  {
10293  // OUTPUT:
10294  // pxsec cross section (absorption/volume mixing ratio) of
10295  // H2O continuum according to CKD2.4 [1/m]
10296  // INPUT:
10297  // parameters[0] strength scaling factor [1]
10298  // model allows user defined input parameter set
10299  // (Cin) or choice of
10300  // pre-defined parameters of specific models (see note below).
10301  // f_grid predefined frequency grid [Hz]
10302  // abs_p predefined pressure grid [Pa]
10303  // abs_t predefined temperature grid [K]
10304  // vmr H2O volume mixing ratio profile [1]
10305  // abs_n2 N2 volume mixing ratio profile [1]
10306  //
10307  // WWW resource: ftp.aer.com/aer_contnm_ckd
10308  const int Nparam = 1;
10309  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10310  {
10311  out3 << "Continuum model " << name << " is running with \n"
10312  << "user defined parameters according to model " << model << ".\n";
10313  CKD24_H20( pxsec,
10314  0,
10315  parameters[0],
10316  model,
10317  f_grid,
10318  abs_p,
10319  abs_t,
10320  vmr,
10321  abs_n2,
10322  verbosity );
10323  }
10324  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10325  {
10326  ostringstream os;
10327  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10328  << "parameters for the model " << model << ",\n"
10329  << "but you specified " << parameters.nelem() << " parameters.\n";
10330  throw runtime_error(os.str());
10331  }
10332  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10333  {
10334  out3 << "Continuum model " << name << " running with \n"
10335  << "the parameters for model " << model << ".\n";
10336  CKD24_H20( pxsec,
10337  0,
10338  0.000,
10339  model,
10340  f_grid,
10341  abs_p,
10342  abs_t,
10343  vmr,
10344  abs_n2,
10345  verbosity );
10346  }
10347  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10348  {
10349  ostringstream os;
10350  os << "ERROR: continuum model " << name << " requires NO input\n"
10351  << "parameters for the model " << model << ",\n"
10352  << "but you specified " << parameters.nelem() << " parameters.\n"
10353  << "This ambiguity can not be solved by arts.\n"
10354  << "Please see the arts user guide chapter 3.\n";
10355  throw runtime_error(os.str());
10356  }
10357  }
10358  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10359  else if ( "H2O-ForeignContCKD24"==name )
10360  {
10361  // OUTPUT:
10362  // pxsec cross section (absorption/volume mixing ratio) of
10363  // H2O continuum according to CKD2.4 [1/m]
10364  // INPUT:
10365  // Cin strength scaling factor [1]
10366  // model allows user defined input parameter set
10367  // (Cin) or choice of
10368  // pre-defined parameters of specific models (see note below).
10369  // f_grid predefined frequency grid [Hz]
10370  // abs_p predefined pressure grid [Pa]
10371  // abs_t predefined temperature grid [K]
10372  // vmr H2O volume mixing ratio profile [1]
10373  // abs_n2 N2 volume mixing ratio profile [1]
10374  //
10375  // WWW resource: ftp.aer.com/aer_contnm_ckd
10376  const int Nparam = 1;
10377  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10378  {
10379  out3 << "Continuum model " << name << " is running with \n"
10380  << "user defined parameters according to model " << model << ".\n";
10381  CKD24_H20( pxsec,
10382  1,
10383  parameters[0],
10384  model,
10385  f_grid,
10386  abs_p,
10387  abs_t,
10388  vmr,
10389  abs_n2,
10390  verbosity );
10391  }
10392  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10393  {
10394  ostringstream os;
10395  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10396  << "parameters for the model " << model << ",\n"
10397  << "but you specified " << parameters.nelem() << " parameters.\n";
10398  throw runtime_error(os.str());
10399  }
10400  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10401  {
10402  out3 << "Continuum model " << name << " running with \n"
10403  << "the parameters for model " << model << ".\n";
10404  CKD24_H20( pxsec,
10405  1,
10406  0,
10407  model,
10408  f_grid,
10409  abs_p,
10410  abs_t,
10411  vmr,
10412  abs_n2,
10413  verbosity );
10414  }
10415  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10416  {
10417  ostringstream os;
10418  os << "ERROR: continuum model " << name << " requires NO input\n"
10419  << "parameters for the model " << model << ",\n"
10420  << "but you specified " << parameters.nelem() << " parameters.\n"
10421  << "This ambiguity can not be solved by arts.\n"
10422  << "Please see the arts user guide chapter 3.\n";
10423  throw runtime_error(os.str());
10424  }
10425  }
10426  // ============= H2O full models ======================================================
10427  else if ( "H2O-CP98"==name )
10428  {
10429  //
10430  // specific continuum parameters and units:
10431  // OUTPUT
10432  // pxsec : [1/m],
10433  // INPUT
10434  // parameters[0] : continuum scale factor (CC) [1]
10435  // parameters[1] : line strength scale factor (CL) [1]
10436  // parameters[2] : line broadening scale factor (CW) [1]
10437  // f_grid : [Hz]
10438  // abs_p : [Pa]
10439  // abs_t : [K]
10440  // vmr : [1]
10441  //
10442  const int Nparam = 3;
10443  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10444  {
10445  out3 << "Full model " << name << " is running with \n"
10446  << "user defined parameters according to model " << model << ".\n";
10447  CP98H2OAbsModel( pxsec,
10448  parameters[0],
10449  parameters[1],
10450  parameters[2],
10451  model,
10452  f_grid,
10453  abs_p,
10454  abs_t,
10455  vmr,
10456  verbosity );
10457  }
10458  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10459  {
10460  ostringstream os;
10461  os << "Full model " << name << " requires " << Nparam << " input\n"
10462  << "parameters for the model " << model << ",\n"
10463  << "but you specified " << parameters.nelem() << " parameters.\n";
10464  throw runtime_error(os.str());
10465  }
10466  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10467  {
10468  out3 << "Full model " << name << " running with \n"
10469  << "the parameters for model " << model << ".\n";
10470  CP98H2OAbsModel( pxsec,
10471  0.00,
10472  0.00,
10473  0.00,
10474  model,
10475  f_grid,
10476  abs_p,
10477  abs_t,
10478  vmr,
10479  verbosity );
10480  }
10481  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10482  {
10483  ostringstream os;
10484  os << "ERROR: Full model " << name << " requires NO input\n"
10485  << "parameters for the model " << model << ",\n"
10486  << "but you specified " << parameters.nelem() << " parameters.\n"
10487  << "This ambiguity can not be solved by arts.\n"
10488  << "Please see the arts user guide chapter 3.\n";
10489  throw runtime_error(os.str());
10490  }
10491  }
10492  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10493  else if ( "H2O-MPM87"==name )
10494  {
10495  //
10496  // specific continuum parameters and units:
10497  // a) output
10498  // pxsec : [1/m],
10499  // b) input
10500  // parameters[0] : continuum scale factor (CC) [1]
10501  // parameters[1] : line strength scale factor (CL) [1]
10502  // parameters[2] : line broadening scale factor (CW) [1]
10503  // f_grid : [Hz]
10504  // abs_p : [Pa]
10505  // abs_t : [K]
10506  // vmr : [1]
10507  //
10508  const int Nparam = 3;
10509  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10510  {
10511  out3 << "Full model " << name << " is running with \n"
10512  << "user defined parameters according to model " << model << ".\n";
10513  MPM87H2OAbsModel( pxsec,
10514  parameters[0],
10515  parameters[1],
10516  parameters[2],
10517  model,
10518  f_grid,
10519  abs_p,
10520  abs_t,
10521  vmr,
10522  verbosity );
10523  }
10524  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10525  {
10526  ostringstream os;
10527  os << "Full model " << name << " requires " << Nparam << " input\n"
10528  << "parameters for the model " << model << ",\n"
10529  << "but you specified " << parameters.nelem() << " parameters.\n";
10530  throw runtime_error(os.str());
10531  }
10532  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10533  {
10534  out3 << "Full model " << name << " running with \n"
10535  << "the parameters for model " << model << ".\n";
10536  MPM87H2OAbsModel( pxsec,
10537  0.00,
10538  0.00,
10539  0.00,
10540  model,
10541  f_grid,
10542  abs_p,
10543  abs_t,
10544  vmr,
10545  verbosity );
10546  }
10547  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10548  {
10549  ostringstream os;
10550  os << "ERROR: Full model " << name << " requires NO input\n"
10551  << "parameters for the model " << model << ",\n"
10552  << "but you specified " << parameters.nelem() << " parameters.\n"
10553  << "This ambiguity can not be solved by arts.\n"
10554  << "Please see the arts user guide chapter 3.\n";
10555  throw runtime_error(os.str());
10556  }
10557  }
10558  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10559  else if ( "H2O-MPM89"==name )
10560  {
10561  //
10562  // specific continuum parameters and units:
10563  // a) output
10564  // pxsec : [1/m],
10565  // b) input
10566  // parameters[0] : continuum scale factor (CC) [1]
10567  // parameters[1] : line strength scale factor (CL) [1]
10568  // parameters[2] : line broadening scale factor (CW [1]
10569  // f_grid : [Hz]
10570  // abs_p : [Pa]
10571  // abs_t : [K]
10572  // vmr : [1]
10573  //
10574  const int Nparam = 3;
10575  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10576  {
10577  out3 << "Full model " << name << " is running with \n"
10578  << "user defined parameters according to model " << model << ".\n";
10579  MPM89H2OAbsModel( pxsec,
10580  parameters[0],
10581  parameters[1],
10582  parameters[2],
10583  model,
10584  f_grid,
10585  abs_p,
10586  abs_t,
10587  vmr,
10588  verbosity );
10589  }
10590  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10591  {
10592  ostringstream os;
10593  os << "Full model " << name << " requires " << Nparam << " input\n"
10594  << "parameters for the model " << model << ",\n"
10595  << "but you specified " << parameters.nelem() << " parameters.\n";
10596  throw runtime_error(os.str());
10597  }
10598  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10599  {
10600  out3 << "Full model " << name << " running with \n"
10601  << "the parameters for model " << model << ".\n";
10602  MPM89H2OAbsModel( pxsec,
10603  0.00,
10604  0.00,
10605  0.00,
10606  model,
10607  f_grid,
10608  abs_p,
10609  abs_t,
10610  vmr,
10611  verbosity );
10612  }
10613  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10614  {
10615  ostringstream os;
10616  os << "ERROR: Full model " << name << " requires NO input\n"
10617  << "parameters for the model " << model << ",\n"
10618  << "but you specified " << parameters.nelem() << " parameters.\n"
10619  << "This ambiguity can not be solved by arts.\n"
10620  << "Please see the arts user guide chapter 3.\n";
10621  throw runtime_error(os.str());
10622  }
10623  }
10624  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10625  else if ( "H2O-MPM93"==name )
10626  {
10627  //
10628  // specific continuum parameters and units:
10629  // OUTPUT
10630  // pxsec : [1/m],
10631  // INPUT
10632  // parameters[0] : continuum scale factor (CC) [1]
10633  // parameters[1] : line strength scale factor (CL) [1]
10634  // parameters[2] : line broadening scale factor (CW) [1]
10635  // f_grid : [Hz]
10636  // abs_p : [Pa]
10637  // abs_t : [K]
10638  // vmr : [1]
10639  //
10640  const int Nparam = 3;
10641  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10642  {
10643  out3 << "Full model " << name << " is running with \n"
10644  << "user defined parameters according to model " << model << ".\n";
10645  MPM93H2OAbsModel( pxsec,
10646  parameters[0],
10647  parameters[1],
10648  parameters[2],
10649  model,
10650  f_grid,
10651  abs_p,
10652  abs_t,
10653  vmr,
10654  verbosity );
10655  }
10656  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10657  {
10658  ostringstream os;
10659  os << "Full model " << name << " requires " << Nparam << " input\n"
10660  << "parameters for the model " << model << ",\n"
10661  << "but you specified " << parameters.nelem() << " parameters.\n";
10662  throw runtime_error(os.str());
10663  }
10664  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10665  {
10666  out3 << "Full model " << name << " running with \n"
10667  << "the parameters for model " << model << ".\n";
10668  MPM93H2OAbsModel( pxsec,
10669  0.00,
10670  0.00,
10671  0.00,
10672  model,
10673  f_grid,
10674  abs_p,
10675  abs_t,
10676  vmr,
10677  verbosity );
10678  }
10679  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10680  {
10681  ostringstream os;
10682  os << "ERROR: Full model " << name << " requires NO input\n"
10683  << "parameters for the model " << model << ",\n"
10684  << "but you specified " << parameters.nelem() << " parameters.\n"
10685  << "This ambiguity can not be solved by arts.\n"
10686  << "Please see the arts user guide chapter 3.\n";
10687  throw runtime_error(os.str());
10688  }
10689  }
10690  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10691  else if ( "H2O-PWR98"==name )
10692  {
10693  // specific continuum parameters and units:
10694  // OUTPUT
10695  // pxsec : [1/m],
10696  // INPUT
10697  // parameters[0] : continuum scale factor (CC) [1]
10698  // parameters[1] : line strength scale factor (CL) [1]
10699  // parameters[2] : line broadening scale factor (CW) [1]
10700  // f_grid : [Hz]
10701  // abs_p : [Pa]
10702  // abs_t : [K]
10703  // vmr : [1]
10704  //
10705  const int Nparam = 3;
10706  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10707  {
10708  out3 << "Full model " << name << " is running with \n"
10709  << "user defined parameters according to model " << model << ".\n";
10710  PWR98H2OAbsModel( pxsec,
10711  parameters[0],
10712  parameters[1],
10713  parameters[2],
10714  model,
10715  f_grid,
10716  abs_p,
10717  abs_t,
10718  vmr,
10719  verbosity );
10720  }
10721  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10722  {
10723  ostringstream os;
10724  os << "Full model " << name << " requires " << Nparam << " input\n"
10725  << "parameters for the model " << model << ",\n"
10726  << "but you specified " << parameters.nelem() << " parameters.\n";
10727  throw runtime_error(os.str());
10728  }
10729  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10730  {
10731  out3 << "Full model " << name << " running with \n"
10732  << "the parameters for model " << model << ".\n";
10733  PWR98H2OAbsModel( pxsec,
10734  0.00,
10735  0.00,
10736  0.00,
10737  model,
10738  f_grid,
10739  abs_p,
10740  abs_t,
10741  vmr,
10742  verbosity );
10743  }
10744  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10745  {
10746  ostringstream os;
10747  os << "ERROR: Full model " << name << " requires NO input\n"
10748  << "parameters for the model " << model << ",\n"
10749  << "but you specified " << parameters.nelem() << " parameters.\n"
10750  << "This ambiguity can not be solved by arts.\n"
10751  << "Please see the arts user guide chapter 3.\n";
10752  throw runtime_error(os.str());
10753  }
10754  }
10755  // ============= O2 continuum =========================================================
10756  else if ( "O2-CIAfunCKDMT100"==name )
10757  {
10758  // Model reference:
10759  // F. Thibault, V. Menoux, R. Le Doucen, L. Rosenman,
10760  // J.-M. Hartmann, Ch. Boulet,
10761  // "Infrared collision-induced absorption by O2 near 6.4 microns for
10762  // atmospheric applications: measurements and emprirical modeling",
10763  // Appl. Optics, 35, 5911-5917, (1996).
10764  //
10765  // specific continuum parameters and units:
10766  // OUTPUT
10767  // pxsec : [1/m],
10768  // INPUT
10769  // parameters[0] : continuum scaling
10770  // model : model option ("CKD" or "user")
10771  // f_grid : [Hz]
10772  // abs_p : [Pa]
10773  // abs_t : [K]
10774  // abs_h2o : [1]
10775  // vmr : [1]
10776  //
10777  const int Nparam = 1;
10778  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10779  {
10780  out3 << "Continuum model " << name << " is running with \n"
10781  << "user defined parameters according to model " << model << ".\n";
10782  CKD_mt_CIAfun_o2( pxsec,
10783  parameters[0],
10784  model,
10785  f_grid,
10786  abs_p,
10787  abs_t,
10788  vmr,
10789  verbosity );
10790  }
10791  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10792  {
10793  ostringstream os;
10794  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10795  << "parameters for the model " << model << ",\n"
10796  << "but you specified " << parameters.nelem() << " parameters.\n";
10797  throw runtime_error(os.str());
10798  }
10799  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10800  {
10801  out3 << "Continuum model " << name << " running with \n"
10802  << "the parameters for model " << model << ".\n";
10803  CKD_mt_CIAfun_o2( pxsec,
10804  0.00e0,
10805  model,
10806  f_grid,
10807  abs_p,
10808  abs_t,
10809  vmr,
10810  verbosity );
10811  }
10812  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10813  {
10814  ostringstream os;
10815  os << "ERROR: Continuum model " << name << " requires NO input\n"
10816  << "parameters for the model " << model << ",\n"
10817  << "but you specified " << parameters.nelem() << " parameters.\n"
10818  << "This ambiguity can not be solved by arts.\n"
10819  << "Please see the arts user guide chapter 3.\n";
10820  throw runtime_error(os.str());
10821  }
10822  }
10823  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10824  else if ( "O2-v0v0CKDMT100"==name )
10825  {
10826  // Model reference:
10827  // B. Mate, C. Lugez, G.T. Fraser, W.J. Lafferty,
10828  // "Absolute Intensities for the O2 1.27 micron
10829  // continuum absorption",
10830  // J. Geophys. Res., 104, 30,585-30,590, 1999.
10831  //
10832  // specific continuum parameters and units:
10833  // OUTPUT
10834  // pxsec : [1/m],
10835  // INPUT
10836  // parameters[0] : continuum scaling
10837  // model : model option ("CKD" or "user")
10838  // f_grid : [Hz]
10839  // abs_p : [Pa]
10840  // abs_t : [K]
10841  // vmr : [1]
10842  // abs_n2 : [1]
10843  // abs_h2o : [1]
10844  //
10845  const int Nparam = 1;
10846  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10847  {
10848  out3 << "Continuum model " << name << " is running with \n"
10849  << "user defined parameters according to model " << model << ".\n";
10850  CKD_mt_v0v0_o2( pxsec,
10851  parameters[0],
10852  model,
10853  f_grid,
10854  abs_p,
10855  abs_t,
10856  vmr,
10857  abs_n2,
10858  verbosity );
10859  }
10860  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10861  {
10862  ostringstream os;
10863  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10864  << "parameters for the model " << model << ",\n"
10865  << "but you specified " << parameters.nelem() << " parameters.\n";
10866  throw runtime_error(os.str());
10867  }
10868  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10869  {
10870  out3 << "Continuum model " << name << " running with \n"
10871  << "the parameters for model " << model << ".\n";
10872  CKD_mt_v0v0_o2( pxsec,
10873  0.0e0,
10874  model,
10875  f_grid,
10876  abs_p,
10877  abs_t,
10878  vmr,
10879  abs_n2,
10880  verbosity );
10881  }
10882  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10883  {
10884  ostringstream os;
10885  os << "ERROR: Continuum model " << name << " requires NO input\n"
10886  << "parameters for the model " << model << ",\n"
10887  << "but you specified " << parameters.nelem() << " parameters.\n"
10888  << "This ambiguity can not be solved by arts.\n"
10889  << "Please see the arts user guide chapter 3.\n";
10890  throw runtime_error(os.str());
10891  }
10892  }
10893  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10894  else if ( "O2-v1v0CKDMT100"==name )
10895  {
10896  // Model reference:
10897  // Mlawer, Clough, Brown, Stephen, Landry, Goldman, Murcray,
10898  // "Observed Atmospheric Collision Induced Absorption in Near Infrared Oxygen Bands",
10899  // Journal of Geophysical Research, vol 103, no. D4, pp. 3859-3863, 1998.
10900  //
10901  // specific continuum parameters and units:
10902  // OUTPUT
10903  // pxsec : [1/m],
10904  // INPUT
10905  // parameters[0] : continuum scaling
10906  // model : model option ("CKD" or "user")
10907  // f_grid : [Hz]
10908  // abs_p : [Pa]
10909  // abs_t : [K]
10910  // vmr : [1]
10911  // abs_n2 : [1]
10912  // abs_h2o : [1]
10913  //
10914  const int Nparam = 1;
10915  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10916  {
10917  out3 << "Continuum model " << name << " is running with \n"
10918  << "user defined parameters according to model " << model << ".\n";
10919  CKD_mt_v1v0_o2( pxsec,
10920  parameters[0],
10921  model,
10922  f_grid,
10923  abs_p,
10924  abs_t,
10925  vmr,
10926  verbosity );
10927  }
10928  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10929  {
10930  ostringstream os;
10931  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10932  << "parameters for the model " << model << ",\n"
10933  << "but you specified " << parameters.nelem() << " parameters.\n";
10934  throw runtime_error(os.str());
10935  }
10936  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10937  {
10938  out3 << "Continuum model " << name << " running with \n"
10939  << "the parameters for model " << model << ".\n";
10940  CKD_mt_v1v0_o2( pxsec,
10941  0.0e0,
10942  model,
10943  f_grid,
10944  abs_p,
10945  abs_t,
10946  vmr,
10947  verbosity );
10948  }
10949  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10950  {
10951  ostringstream os;
10952  os << "ERROR: Continuum model " << name << " requires NO input\n"
10953  << "parameters for the model " << model << ",\n"
10954  << "but you specified " << parameters.nelem() << " parameters.\n"
10955  << "This ambiguity can not be solved by arts.\n"
10956  << "Please see the arts user guide chapter 3.\n";
10957  throw runtime_error(os.str());
10958  }
10959  }
10960  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10961  else if ( "O2-SelfContStandardType"==name )
10962  {
10963  // MPM93, Rosenkranz 1993 O2 continuum:
10964  // see publication side of National Telecommunications and Information Administration
10965  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
10966  // and ftp side for downloading the MPM93 original source code:
10967  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
10968  //
10969  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
10970  // "Atmospheric Remote Sensing by Microwave Radiometry",
10971  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
10972  // (see also JQSRT, Vol.48, No.5/6 pp.629-643, 1992)
10973  //
10974  // specific continuum parameters and units:
10975  // OUTPUT
10976  // pxsec : [1/m],
10977  // INPUT
10978  // parameters[0] : continuum coefficient (C) [1/m*1/Hz*1/Pa]
10979  // parameters[1] : frequency coefficient (G0) [Hz/Pa]
10980  // parameters[3] : line width parameter (G0A) [1]
10981  // parameters[3] : line width parameter (G0B) [1]
10982  // parameters[2] : temperature exponent (XG0d) [1]
10983  // parameters[2] : temperature exponent (x_s) [1]
10984  // parameters[5] : continuum coefficient (XG0w) [1]
10985  // model : model option ("MPM93", "Rosenkranz", or "user")
10986  // f_grid : [Hz]
10987  // abs_p : [Pa]
10988  // abs_t : [K]
10989  // abs_h2o : [1]
10990  // vmr : [1]
10991  //
10992  const int Nparam = 6;
10993  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10994  {
10995  out3 << "Continuum model " << name << " is running with \n"
10996  << "user defined parameters according to model " << model << ".\n";
10997  Standard_O2_continuum( pxsec,
10998  parameters[0],
10999  parameters[1],
11000  parameters[2],
11001  parameters[3],
11002  parameters[4],
11003  parameters[5],
11004  model,
11005  f_grid,
11006  abs_p,
11007  abs_t,
11008  abs_h2o,
11009  vmr,
11010  verbosity );
11011  }
11012  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11013  {
11014  ostringstream os;
11015  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11016  << "parameters for the model " << model << ",\n"
11017  << "but you specified " << parameters.nelem() << " parameters.\n";
11018  throw runtime_error(os.str());
11019  }
11020  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11021  {
11022  out3 << "Continuum model " << name << " running with \n"
11023  << "the parameters for model " << model << ".\n";
11024  Standard_O2_continuum( pxsec,
11025  0.00,
11026  0.00,
11027  0.00,
11028  0.00,
11029  0.00,
11030  0.00,
11031  model,
11032  f_grid,
11033  abs_p,
11034  abs_t,
11035  abs_h2o,
11036  vmr,
11037  verbosity );
11038  }
11039  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11040  {
11041  ostringstream os;
11042  os << "ERROR: Continuum model " << name << " requires NO input\n"
11043  << "parameters for the model " << model << ",\n"
11044  << "but you specified " << parameters.nelem() << " parameters.\n"
11045  << "This ambiguity can not be solved by arts.\n"
11046  << "Please see the arts user guide chapter 3.\n";
11047  throw runtime_error(os.str());
11048  }
11049  }
11050  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11051  else if ( "O2-SelfContMPM93"==name )
11052  {
11053  // MPM93 O2 continuum:
11054  // see publication side of National Telecommunications and Information Administration
11055  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
11056  // and ftp side for downloading the MPM93 original source code:
11057  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
11058 
11059  //
11060  // specific continuum parameters and units:
11061  // OUTPUT
11062  // pxsec : [1/m],
11063  // INPUT
11064  // parameters[0] : continuum coefficient (C) [1/m / (Hz²*Pa²)]
11065  // parameters[1] : temperature exponent (x_s) [1]
11066  // f_grid : [Hz]
11067  // abs_p : [Pa]
11068  // abs_t : [K]
11069  // abs_h2o : [1]
11070  // vmr : [1]
11071  //
11072  const int Nparam = 4;
11073  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11074  {
11075  out3 << "Continuum model " << name << " is running with \n"
11076  << "user defined parameters according to model " << model << ".\n";
11077  MPM93_O2_continuum( pxsec,
11078  parameters[0],
11079  parameters[1],
11080  parameters[2],
11081  parameters[3],
11082  model,
11083  f_grid,
11084  abs_p,
11085  abs_t,
11086  abs_h2o,
11087  vmr,
11088  verbosity );
11089  }
11090  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11091  {
11092  ostringstream os;
11093  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11094  << "parameters for the model " << model << ",\n"
11095  << "but you specified " << parameters.nelem() << " parameters.\n";
11096  throw runtime_error(os.str());
11097  }
11098  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11099  {
11100  out3 << "Continuum model " << name << " running with \n"
11101  << "the parameters for model " << model << ".\n";
11102  MPM93_O2_continuum( pxsec,
11103  0.00,
11104  0.00,
11105  0.00,
11106  0.00,
11107  model,
11108  f_grid,
11109  abs_p,
11110  abs_t,
11111  abs_h2o,
11112  vmr,
11113  verbosity );
11114  }
11115  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11116  {
11117  ostringstream os;
11118  os << "ERROR: Continuum model " << name << " requires NO input\n"
11119  << "parameters for the model " << model << ",\n"
11120  << "but you specified " << parameters.nelem() << " parameters.\n"
11121  << "This ambiguity can not be solved by arts.\n"
11122  << "Please see the arts user guide chapter 3.\n";
11123  throw runtime_error(os.str());
11124  }
11125  }
11126  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11127  else if ( "O2-SelfContPWR93"==name )
11128  {
11129  // data information about this continuum:
11130  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
11131  // "Atmospheric Remote Sensing by Microwave Radiometry",
11132  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
11133  // (see also JQSRT, Vol.48, No.5/6 pp.629-643, 1992)
11134  //
11135  // specific continuum parameters and units:
11136  // OUTPUT
11137  // pxsec : [1/m],
11138  // INPUT
11139  // parameters[0] : continuum coefficient (C) [K²/(Hz*Pa*m)]
11140  // parameters[1] : temperature exponent (x) [1]
11141  // f_grid : [Hz]
11142  // abs_p : [Pa]
11143  // abs_t : [K]
11144  // vmr : [1]
11145  //
11146  const int Nparam = 4;
11147  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11148  {
11149  out3 << "Continuum model " << name << " is running with \n"
11150  << "user defined parameters according to model " << model << ".\n";
11151  Rosenkranz_O2_continuum( pxsec,
11152  parameters[0],
11153  parameters[1],
11154  parameters[2],
11155  parameters[3],
11156  model,
11157  f_grid,
11158  abs_p,
11159  abs_t,
11160  abs_h2o,
11161  vmr,
11162  verbosity );
11163  }
11164  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11165  {
11166  ostringstream os;
11167  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11168  << "parameters for the model " << model << ",\n"
11169  << "but you specified " << parameters.nelem() << " parameters.\n";
11170  throw runtime_error(os.str());
11171  }
11172  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11173  {
11174  out3 << "Continuum model " << name << " running with \n"
11175  << "the parameters for model " << model << ".\n";
11176  Rosenkranz_O2_continuum( pxsec,
11177  0.00,
11178  0.00,
11179  0.00,
11180  0.00,
11181  model,
11182  f_grid,
11183  abs_p,
11184  abs_t,
11185  abs_h2o,
11186  vmr,
11187  verbosity );
11188  }
11189  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11190  {
11191  ostringstream os;
11192  os << "ERROR: Continuum model " << name << " requires NO input\n"
11193  << "parameters for the model " << model << ",\n"
11194  << "but you specified " << parameters.nelem() << " parameters.\n"
11195  << "This ambiguity can not be solved by arts.\n"
11196  << "Please see the arts user guide chapter 3.\n";
11197  throw runtime_error(os.str());
11198  }
11199  }
11200  // ============= O2 full model ========================================================
11201  else if ( "O2-PWR88"==name )
11202  {
11203  // REFERENCE FOR EQUATIONS AND COEFFICIENTS:
11204  // P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING
11205  // BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED. 1993)
11206  // AND
11207  // H.J. LIEBE ET AL, JQSRT V.48, PP.629-643 (1992)
11208  // (EXCEPT: SUBMILLIMETER LINE INTENSITIES FROM HITRAN92)
11209  // AND
11210  // P. W. ROSENKRANZ, INTERFERENCE COEFFICIENTS FOR THE
11211  // OVERLAPPING OXYGEN LINES IN AIR, JQSRT, 1988, VOLUME 39, 287-297.
11212  //
11213  // the only difference to the 1993 version is the line mixing
11214  // parameter Y, which is taken from the above reference JQSRT, 1988.
11215  //
11216  // specific continuum parameters and units:
11217  // OUTPUT
11218  // pxsec : [1/m],
11219  // INPUT
11220  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11221  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11222  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11223  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11224  // f_grid : [Hz]
11225  // abs_p : [Pa]
11226  // abs_t : [K]
11227  // abs_h2o, : [1]
11228  // vmr : [1]
11229  //
11230  const int Nparam = 4;
11231  const char *version="PWR88";
11232  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11233  {
11234  out3 << "Full model " << name << " is running with \n"
11235  << "user defined parameters according to model " << model << ".\n";
11236  PWR93O2AbsModel( pxsec,
11237  parameters[0], // continuum term scale factor
11238  parameters[1], // line strength scale factor
11239  parameters[2], // line broadening scale factor
11240  parameters[3], // line coupling scale factor
11241  model,
11242  version,
11243  f_grid,
11244  abs_p,
11245  abs_t,
11246  abs_h2o,
11247  vmr,
11248  verbosity );
11249  }
11250  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11251  {
11252  ostringstream os;
11253  os << "Full model " << name << " requires " << Nparam << " input\n"
11254  << "parameters for the model " << model << ",\n"
11255  << "but you specified " << parameters.nelem() << " parameters.\n";
11256  throw runtime_error(os.str());
11257  }
11258  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11259  {
11260  out3 << "Full model " << name << " running with \n"
11261  << "the parameters for model " << model << ".\n";
11262  PWR93O2AbsModel( pxsec,
11263  0.00,
11264  0.00,
11265  0.00,
11266  0.00,
11267  model,
11268  version,
11269  f_grid,
11270  abs_p,
11271  abs_t,
11272  abs_h2o,
11273  vmr,
11274  verbosity );
11275  }
11276  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11277  {
11278  ostringstream os;
11279  os << "ERROR: Full model " << name << " requires NO input\n"
11280  << "parameters for the model " << model << ",\n"
11281  << "but you specified " << parameters.nelem() << " parameters.\n"
11282  << "This ambiguity can not be solved by arts.\n"
11283  << "Please see the arts user guide chapter 3.\n";
11284  throw runtime_error(os.str());
11285  }
11286  }
11287  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11288  else if ( "O2-PWR93"==name )
11289  {
11290  // REFERENCE FOR EQUATIONS AND COEFFICIENTS:
11291  // P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING
11292  // BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED. 1993)
11293  // AND H.J. LIEBE ET AL, JQSRT V.48, PP.629-643 (1992)
11294  // (EXCEPT: SUBMILLIMETER LINE INTENSITIES FROM HITRAN92)
11295  //
11296  // specific continuum parameters and units:
11297  // OUTPUT
11298  // pxsec : [1/m],
11299  // INPUT
11300  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11301  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11302  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11303  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11304  // f_grid : [Hz]
11305  // abs_p : [Pa]
11306  // abs_t : [K]
11307  // abs_h2o, : [1]
11308  // vmr : [1]
11309  //
11310  const int Nparam = 4;
11311  const char *version="PWR93";
11312  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11313  {
11314  out3 << "Full model " << name << " is running with \n"
11315  << "user defined parameters according to model " << model << ".\n";
11316  PWR93O2AbsModel( pxsec,
11317  parameters[0], // continuum term scale factor
11318  parameters[1], // line strength scale factor
11319  parameters[2], // line broadening scale factor
11320  parameters[3], // line coupling scale factor
11321  model,
11322  version,
11323  f_grid,
11324  abs_p,
11325  abs_t,
11326  abs_h2o,
11327  vmr,
11328  verbosity );
11329  }
11330  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11331  {
11332  ostringstream os;
11333  os << "Full model " << name << " requires " << Nparam << " input\n"
11334  << "parameters for the model " << model << ",\n"
11335  << "but you specified " << parameters.nelem() << " parameters.\n";
11336  throw runtime_error(os.str());
11337  }
11338  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11339  {
11340  out3 << "Full model " << name << " running with \n"
11341  << "the parameters for model " << model << ".\n";
11342  PWR93O2AbsModel( pxsec,
11343  0.00,
11344  0.00,
11345  0.00,
11346  0.00,
11347  model,
11348  version,
11349  f_grid,
11350  abs_p,
11351  abs_t,
11352  abs_h2o,
11353  vmr,
11354  verbosity );
11355  }
11356  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11357  {
11358  ostringstream os;
11359  os << "ERROR: Full model " << name << " requires NO input\n"
11360  << "parameters for the model " << model << ",\n"
11361  << "but you specified " << parameters.nelem() << " parameters.\n"
11362  << "This ambiguity can not be solved by arts.\n"
11363  << "Please see the arts user guide chapter 3.\n";
11364  throw runtime_error(os.str());
11365  }
11366  }
11367  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11368  else if ( "O2-PWR98"==name )
11369  {
11370  // REFERENCES FOR EQUATIONS AND COEFFICIENTS:
11371  // P.W. Rosenkranz, CHAP. 2 and appendix, in ATMOSPHERIC REMOTE SENSING
11372  // BY MICROWAVE RADIOMETRY (M.A. Janssen, ed., 1993).
11373  // H.J. Liebe et al, JQSRT V.48, PP.629-643 (1992).
11374  // M.J. Schwartz, Ph.D. thesis, M.I.T. (1997).
11375  // SUBMILLIMETER LINE INTENSITIES FROM HITRAN96.
11376  // This version differs from Liebe's MPM92 in two significant respects:
11377  // 1. It uses the modification of the 1- line width temperature dependence
11378  // recommended by Schwartz: (1/T).
11379  // 2. It uses the same temperature dependence (X) for submillimeter
11380  // line widths as in the 60 GHz band: (1/T)**0.8
11381  //
11382  // specific continuum parameters and units:
11383  // OUTPUT
11384  // pxsec : [1/m],
11385  // INPUT
11386  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11387  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11388  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11389  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11390  // f_grid : [Hz]
11391  // abs_p : [Pa]
11392  // abs_t : [K]
11393  // abs_h2o, : [1]
11394  // vmr : [1]
11395  //
11396  const int Nparam = 4;
11397  const char *version="PWR98";
11398  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11399  {
11400  out3 << "Full model " << name << " is running with \n"
11401  << "user defined parameters according to model " << model << ".\n";
11402  PWR93O2AbsModel( pxsec,
11403  parameters[0], // continuum term scale factor
11404  parameters[1], // line strength scale factor
11405  parameters[2], // line broadening scale factor
11406  parameters[3], // line coupling scale factor
11407  model,
11408  version,
11409  f_grid,
11410  abs_p,
11411  abs_t,
11412  abs_h2o,
11413  vmr,
11414  verbosity );
11415  }
11416  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11417  {
11418  ostringstream os;
11419  os << "Full model " << name << " requires " << Nparam << " input\n"
11420  << "parameters for the model " << model << ",\n"
11421  << "but you specified " << parameters.nelem() << " parameters.\n";
11422  throw runtime_error(os.str());
11423  }
11424  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11425  {
11426  out3 << "Full model " << name << " running with \n"
11427  << "the parameters for model " << model << ".\n";
11428  PWR93O2AbsModel( pxsec,
11429  0.00,
11430  0.00,
11431  0.00,
11432  0.00,
11433  model,
11434  version,
11435  f_grid,
11436  abs_p,
11437  abs_t,
11438  abs_h2o,
11439  vmr,
11440  verbosity );
11441  }
11442  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11443  {
11444  ostringstream os;
11445  os << "ERROR: Full model " << name << " requires NO input\n"
11446  << "parameters for the model " << model << ",\n"
11447  << "but you specified " << parameters.nelem() << " parameters.\n"
11448  << "This ambiguity can not be solved by arts.\n"
11449  << "Please see the arts user guide chapter 3.\n";
11450  throw runtime_error(os.str());
11451  }
11452  }
11453  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11454  else if ( "O2-MPM93"==name )
11455  {
11456  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
11457  // "Propagation modeling of moist air and suspended water/ice
11458  // particles at frequencies below 1000 GHz",
11459  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
11460  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
11461  //
11462  // specific continuum parameters and units:
11463  // OUTPUT
11464  // pxsec : [1/m],
11465  // INPUT
11466  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11467  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11468  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11469  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11470  // f_grid : [Hz]
11471  // abs_p : [Pa]
11472  // abs_t : [K]
11473  // abs_h2o, : [1]
11474  // vmr : [1]
11475  //
11476  const int Nparam = 4;
11477  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11478  {
11479  out3 << "Full model " << name << " is running with \n"
11480  << "user defined parameters according to model " << model << ".\n";
11481  MPM93O2AbsModel( pxsec,
11482  parameters[0], // continuum term scale factor
11483  parameters[1], // line strength scale factor
11484  parameters[2], // line broadening scale factor
11485  parameters[3], // line coupling scale factor
11486  model,
11487  f_grid,
11488  abs_p,
11489  abs_t,
11490  abs_h2o,
11491  vmr,
11492  verbosity );
11493  }
11494  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11495  {
11496  ostringstream os;
11497  os << "Full model " << name << " requires " << Nparam << " input\n"
11498  << "parameters for the model " << model << ",\n"
11499  << "but you specified " << parameters.nelem() << " parameters.\n";
11500  throw runtime_error(os.str());
11501  }
11502  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11503  {
11504  out3 << "Full model " << name << " running with \n"
11505  << "the parameters for model " << model << ".\n";
11506  MPM93O2AbsModel( pxsec,
11507  0.00,
11508  0.00,
11509  0.00,
11510  0.00,
11511  model,
11512  f_grid,
11513  abs_p,
11514  abs_t,
11515  abs_h2o,
11516  vmr,
11517  verbosity );
11518  }
11519  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11520  {
11521  ostringstream os;
11522  os << "ERROR: Full model " << name << " requires NO input\n"
11523  << "parameters for the model " << model << ",\n"
11524  << "but you specified " << parameters.nelem() << " parameters.\n"
11525  << "This ambiguity can not be solved by arts.\n"
11526  << "Please see the arts user guide chapter 3.\n";
11527  throw runtime_error(os.str());
11528  }
11529  }
11530  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11531  else if ( "O2-MPM92"==name )
11532  {
11533  // H. J. Liebe, P. W. Rosenkranz and G. A. Hufford,
11534  // Atmospheric 60-GHz Oxygen Spectrum: New Laboratory
11535  // Measurements and Line Parameters
11536  // JQSRT, Vol 48, pp. 629-643, 1992
11537  //
11538  // specific continuum parameters and units:
11539  // OUTPUT
11540  // pxsec : [1/m],
11541  // INPUT
11542  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11543  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11544  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11545  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11546  // f_grid : [Hz]
11547  // abs_p : [Pa]
11548  // abs_t : [K]
11549  // abs_h2o, : [1]
11550  // vmr : [1]
11551  //
11552  const int Nparam = 4;
11553  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11554  {
11555  out3 << "Full model " << name << " is running with \n"
11556  << "user defined parameters according to model " << model << ".\n";
11557  MPM92O2AbsModel( pxsec,
11558  parameters[0], // continuum term scale factor
11559  parameters[1], // line strength scale factor
11560  parameters[2], // line broadening scale factor
11561  parameters[3], // line coupling scale factor
11562  model,
11563  f_grid,
11564  abs_p,
11565  abs_t,
11566  abs_h2o,
11567  vmr,
11568  verbosity );
11569  }
11570  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11571  {
11572  ostringstream os;
11573  os << "Full model " << name << " requires " << Nparam << " input\n"
11574  << "parameters for the model " << model << ",\n"
11575  << "but you specified " << parameters.nelem() << " parameters.\n";
11576  throw runtime_error(os.str());
11577  }
11578  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11579  {
11580  out3 << "Full model " << name << " running with \n"
11581  << "the parameters for model " << model << ".\n";
11582  MPM92O2AbsModel( pxsec,
11583  0.00,
11584  0.00,
11585  0.00,
11586  0.00,
11587  model,
11588  f_grid,
11589  abs_p,
11590  abs_t,
11591  abs_h2o,
11592  vmr,
11593  verbosity );
11594  }
11595  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11596  {
11597  ostringstream os;
11598  os << "ERROR: Full model " << name << " requires NO input\n"
11599  << "parameters for the model " << model << ",\n"
11600  << "but you specified " << parameters.nelem() << " parameters.\n"
11601  << "This ambiguity can not be solved by arts.\n"
11602  << "Please see the arts user guide chapter 3.\n";
11603  throw runtime_error(os.str());
11604  }
11605  }
11606  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11607  else if ( "O2-MPM89"==name )
11608  {
11609  // H. J. Liebe,
11610  // MPM - an atmospheric millimeter-wave propagation model,
11611  // Int. J. Infrared and Mill. Waves, Vol 10, pp. 631-650, 1989.
11612  //
11613  // specific continuum parameters and units:
11614  // OUTPUT
11615  // pxsec : [1/m],
11616  // INPUT
11617  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11618  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11619  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11620  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11621  // f_grid : [Hz]
11622  // abs_p : [Pa]
11623  // abs_t : [K]
11624  // abs_h2o, : [1]
11625  // vmr : [1]
11626  //
11627  const int Nparam = 4;
11628  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11629  {
11630  out3 << "Full model " << name << " is running with \n"
11631  << "user defined parameters according to model " << model << ".\n";
11632  MPM89O2AbsModel( pxsec,
11633  parameters[0], // continuum term scale factor
11634  parameters[1], // line strength scale factor
11635  parameters[2], // line broadening scale factor
11636  parameters[3], // line coupling scale factor
11637  model,
11638  f_grid,
11639  abs_p,
11640  abs_t,
11641  abs_h2o,
11642  vmr,
11643  verbosity );
11644  }
11645  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11646  {
11647  ostringstream os;
11648  os << "Full model " << name << " requires " << Nparam << " input\n"
11649  << "parameters for the model " << model << ",\n"
11650  << "but you specified " << parameters.nelem() << " parameters.\n";
11651  throw runtime_error(os.str());
11652  }
11653  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11654  {
11655  out3 << "Full model " << name << " running with \n"
11656  << "the parameters for model " << model << ".\n";
11657  MPM89O2AbsModel( pxsec,
11658  0.00,
11659  0.00,
11660  0.00,
11661  0.00,
11662  model,
11663  f_grid,
11664  abs_p,
11665  abs_t,
11666  abs_h2o,
11667  vmr,
11668  verbosity );
11669  }
11670  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11671  {
11672  ostringstream os;
11673  os << "ERROR: Full model " << name << " requires NO input\n"
11674  << "parameters for the model " << model << ",\n"
11675  << "but you specified " << parameters.nelem() << " parameters.\n"
11676  << "This ambiguity can not be solved by arts.\n"
11677  << "Please see the arts user guide chapter 3.\n";
11678  throw runtime_error(os.str());
11679  }
11680  }
11681  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11682  else if ( "O2-MPM87"==name )
11683  {
11684  // H. J. Liebe and D. H. Layton,
11685  // Millimeter-wave properties of the atmosphere:
11686  // Laboratory studies and propagation modelling,
11687  // NITA Report 87-224,
11688  // U.S. Dept. of Commerce, National Telecommunications and Information
11689  // Administration, Institute for Communication Sciences, rep. 87-224,
11690  // 325 Broadway, Boulder, CO 80303-3328
11691  //
11692  // specific continuum parameters and units:
11693  // OUTPUT
11694  // pxsec : [1/m],
11695  // INPUT
11696  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11697  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11698  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11699  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11700  // f_grid : [Hz]
11701  // abs_p : [Pa]
11702  // abs_t : [K]
11703  // abs_h2o, : [1]
11704  // vmr : [1]
11705  //
11706  const int Nparam = 4;
11707  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11708  {
11709  out3 << "Full model " << name << " is running with \n"
11710  << "user defined parameters according to model " << model << ".\n";
11711  MPM87O2AbsModel( pxsec,
11712  parameters[0], // continuum term scale factor
11713  parameters[1], // line strength scale factor
11714  parameters[2], // line broadening scale factor
11715  parameters[3], // line coupling scale factor
11716  model,
11717  f_grid,
11718  abs_p,
11719  abs_t,
11720  abs_h2o,
11721  vmr,
11722  verbosity );
11723  }
11724  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11725  {
11726  ostringstream os;
11727  os << "Full model " << name << " requires " << Nparam << " input\n"
11728  << "parameters for the model " << model << ",\n"
11729  << "but you specified " << parameters.nelem() << " parameters.\n";
11730  throw runtime_error(os.str());
11731  }
11732  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11733  {
11734  out3 << "Full model " << name << " running with \n"
11735  << "the parameters for model " << model << ".\n";
11736  MPM87O2AbsModel( pxsec,
11737  0.00,
11738  0.00,
11739  0.00,
11740  0.00,
11741  model,
11742  f_grid,
11743  abs_p,
11744  abs_t,
11745  abs_h2o,
11746  vmr,
11747  verbosity );
11748  }
11749  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11750  {
11751  ostringstream os;
11752  os << "ERROR: Full model " << name << " requires NO input\n"
11753  << "parameters for the model " << model << ",\n"
11754  << "but you specified " << parameters.nelem() << " parameters.\n"
11755  << "This ambiguity can not be solved by arts.\n"
11756  << "Please see the arts user guide chapter 3.\n";
11757  throw runtime_error(os.str());
11758  }
11759  }
11760  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11761  else if ( "O2-MPM85"==name )
11762  {
11763  // H. J. Liebe and D. H. Layton,
11764  // An updated model for millimeter wave propagation in moist air
11765  // Radio Science, vol. 20, pp. 1069-1089, 1985
11766  //
11767  // specific continuum parameters and units:
11768  // OUTPUT
11769  // pxsec : [1/m],
11770  // INPUT
11771  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11772  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11773  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11774  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11775  // f_grid : [Hz]
11776  // abs_p : [Pa]
11777  // abs_t : [K]
11778  // abs_h2o, : [1]
11779  // vmr : [1]
11780  //
11781  const int Nparam = 4;
11782  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11783  {
11784  out3 << "Full model " << name << " is running with \n"
11785  << "user defined parameters according to model " << model << ".\n";
11786  MPM85O2AbsModel( pxsec,
11787  parameters[0], // continuum term scale factor
11788  parameters[1], // line strength scale factor
11789  parameters[2], // line broadening scale factor
11790  parameters[3], // line coupling scale factor
11791  model,
11792  f_grid,
11793  abs_p,
11794  abs_t,
11795  abs_h2o,
11796  vmr,
11797  verbosity );
11798  }
11799  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11800  {
11801  ostringstream os;
11802  os << "Full model " << name << " requires " << Nparam << " input\n"
11803  << "parameters for the model " << model << ",\n"
11804  << "but you specified " << parameters.nelem() << " parameters.\n";
11805  throw runtime_error(os.str());
11806  }
11807  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11808  {
11809  out3 << "Full model " << name << " running with \n"
11810  << "the parameters for model " << model << ".\n";
11811  MPM85O2AbsModel( pxsec,
11812  0.00,
11813  0.00,
11814  0.00,
11815  0.00,
11816  model,
11817  f_grid,
11818  abs_p,
11819  abs_t,
11820  abs_h2o,
11821  vmr,
11822  verbosity );
11823  }
11824  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11825  {
11826  ostringstream os;
11827  os << "ERROR: Full model " << name << " requires NO input\n"
11828  << "parameters for the model " << model << ",\n"
11829  << "but you specified " << parameters.nelem() << " parameters.\n"
11830  << "This ambiguity can not be solved by arts.\n"
11831  << "Please see the arts user guide chapter 3.\n";
11832  throw runtime_error(os.str());
11833  }
11834  }
11835  // ============= N2 continuum =========================================================
11836  else if ( "N2-SelfContMPM93"==name )
11837  {
11838  // MPM93 N2 continuum:
11839  // see publication side of National Telecommunications and Information Administration
11840  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
11841  // and ftp side for downloading the MPM93 original source code:
11842  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
11843  //
11844  // specific continuum parameters and units:
11845  // OUTPUT
11846  // pxsec : [1/m],
11847  // INPUT
11848  // parameters[0] : strength parameter [1/m * 1/(Hz²*Pa²)]
11849  // parameters[1] : broadening parameter [1]
11850  // parameters[2] : temperature exponent [1]
11851  // parameters[3] : frequency exponent [1]
11852  // f_grid : [Hz]
11853  // abs_p : [Pa]
11854  // abs_t : [K]
11855  // abs_h2o : [1]
11856  // vmr : [1]
11857  //
11858  const int Nparam = 4;
11859  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11860  {
11861  out3 << "Continuum model " << name << " is running with \n"
11862  << "user defined parameters according to model " << model << ".\n";
11863  MPM93_N2_continuum( pxsec,
11864  parameters[0],
11865  parameters[1],
11866  parameters[2],
11867  parameters[3],
11868  model,
11869  f_grid,
11870  abs_p,
11871  abs_t,
11872  abs_h2o,
11873  vmr,
11874  verbosity );
11875  }
11876  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11877  {
11878  ostringstream os;
11879  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11880  << "parameters for the model " << model << ",\n"
11881  << "but you specified " << parameters.nelem() << " parameters.\n";
11882  throw runtime_error(os.str());
11883  }
11884  else if ( (model == "MPM93Scale") && (parameters.nelem() == 1) ) // --------------------
11885  {
11886  out3 << "Continuum model " << name << " running with \n"
11887  << "the parameters for model " << model << ".\n";
11888  MPM93_N2_continuum( pxsec,
11889  parameters[0],
11890  0.00,
11891  0.00,
11892  0.00,
11893  model,
11894  f_grid,
11895  abs_p,
11896  abs_t,
11897  abs_h2o,
11898  vmr,
11899  verbosity );
11900  }
11901  else if ( (model == "MPM93Scale") && (parameters.nelem() != 1) ) // --------------------
11902  {
11903  ostringstream os;
11904  os << "Continuum model " << name << " requires 1 scaling input\n"
11905  << "parameters for the model " << model << ",\n"
11906  << "but you specified " << parameters.nelem() << " parameters.\n";
11907  throw runtime_error(os.str());
11908  }
11909  else if ( (model != "user") && (model != "MPM93Scale") && (parameters.nelem() == 0) ) // --
11910  {
11911  out3 << "Continuum model " << name << " running with \n"
11912  << "the parameters for model " << model << ".\n";
11913  MPM93_N2_continuum( pxsec,
11914  0.00,
11915  0.00,
11916  0.00,
11917  0.00,
11918  model,
11919  f_grid,
11920  abs_p,
11921  abs_t,
11922  abs_h2o,
11923  vmr,
11924  verbosity );
11925  }
11926  /* --------------------------------------------------------------------------
11927  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11928  {
11929  ostringstream os;
11930  os << "ERROR: Continuum model " << name << " requires NO input\n"
11931  << "parameters for the model " << model << ",\n"
11932  << "but you specified " << parameters.nelem() << " parameters.\n"
11933  << "This ambiguity can not be solved by arts.\n"
11934  << "Please see the arts user guide chapter 3.\n";
11935  throw runtime_error(os.str());
11936  }
11937  ----------------------------------------------------------------------*/
11938  }
11939  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11940  else if ( "N2-DryContATM01"==name )
11941  {
11942  // data information about this continuum:
11943  // Pardo et al. model model (IEEE, Trans. Ant. Prop.,
11944  // Vol 49, No 12, pp. 1683-1694, 2001)
11945  //
11946  // specific continuum parameters and units:
11947  // a) output
11948  // pxsec : [1/m],
11949  // b) input
11950  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
11951  // f_grid : [Hz]
11952  // abs_p : [Pa]
11953  // abs_t : [K]
11954  // vmr : [1] for N2
11955  // h2ovmr : [1] for H2O
11956  //
11957  const int Nparam = 1;
11958  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11959  {
11960  out3 << "Continuum model " << name << " is running with \n"
11961  << "user defined parameters according to model " << model << ".\n";
11963  parameters[0], // coefficient
11964  model,
11965  f_grid,
11966  abs_p,
11967  abs_t,
11968  vmr,
11969  abs_h2o,
11970  verbosity );
11971  }
11972  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11973  {
11974  ostringstream os;
11975  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11976  << "parameters for the model " << model << ",\n"
11977  << "but you specified " << parameters.nelem() << " parameters.\n";
11978  throw runtime_error(os.str());
11979  }
11980  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11981  {
11982  out3 << "Continuum model " << name << " running with \n"
11983  << "the parameters for model " << model << ".\n";
11985  0.000, // coefficient
11986  model,
11987  f_grid,
11988  abs_p,
11989  abs_t,
11990  vmr,
11991  abs_h2o,
11992  verbosity );
11993  }
11994  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11995  {
11996  ostringstream os;
11997  os << "ERROR: Continuum model " << name << " requires NO input\n"
11998  << "parameters for the model " << model << ",\n"
11999  << "but you specified " << parameters.nelem() << " parameters.\n"
12000  << "This ambiguity can not be solved by arts.\n"
12001  << "Please see the arts user guide chapter 3.\n";
12002  throw runtime_error(os.str());
12003  }
12004  }
12005  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12006  else if ( "N2-SelfContPWR93"==name )
12007  {
12008  // data information about this continuum:
12009  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
12010  // "Atmospheric Remote Sensing by Microwave Radiometry",
12011  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
12012  //
12013  // specific continuum parameters and units:
12014  // a) output
12015  // pxsec : [1/m],
12016  // b) input
12017  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12018  // parameters[1] : continuum temperature exponent [1]
12019  // f_grid : [Hz]
12020  // abs_p : [Pa]
12021  // abs_t : [K]
12022  // vmr : [1]
12023  //
12024  const int Nparam = 2;
12025  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12026  {
12027  out3 << "Continuum model " << name << " is running with \n"
12028  << "user defined parameters according to model " << model << ".\n";
12030  parameters[0], // coefficient
12031  parameters[1], // temp. exponent
12032  model,
12033  f_grid,
12034  abs_p,
12035  abs_t,
12036  vmr,
12037  verbosity );
12038  }
12039  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12040  {
12041  ostringstream os;
12042  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12043  << "parameters for the model " << model << ",\n"
12044  << "but you specified " << parameters.nelem() << " parameters.\n";
12045  throw runtime_error(os.str());
12046  }
12047  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12048  {
12049  out3 << "Continuum model " << name << " running with \n"
12050  << "the parameters for model " << model << ".\n";
12052  0.00,
12053  0.00,
12054  model,
12055  f_grid,
12056  abs_p,
12057  abs_t,
12058  vmr,
12059  verbosity );
12060  }
12061  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12062  {
12063  ostringstream os;
12064  os << "ERROR: Continuum model " << name << " requires NO input\n"
12065  << "parameters for the model " << model << ",\n"
12066  << "but you specified " << parameters.nelem() << " parameters.\n"
12067  << "This ambiguity can not be solved by arts.\n"
12068  << "Please see the arts user guide chapter 3.\n";
12069  throw runtime_error(os.str());
12070  }
12071  }
12072  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12073  else if ( "N2-SelfContStandardType"==name )
12074  {
12075  // data information about this continuum:
12076  // A completely general expression for the N2 continuum
12077  //
12078  // specific continuum parameters and units:
12079  // OUTPUT
12080  // pxsec : [1/m],
12081  // INPUT
12082  // parameters[0] : continuum coefficient (C) [1/m * 1/(Hz*Pa)²]
12083  // parameters[1] : frequency exponent (xf) [1]
12084  // parameters[2] : temperature exponent (xt) [1]
12085  // parameters[3] : pressure exponent (xp) [1]
12086  // f_grid : [Hz]
12087  // abs_p : [Pa]
12088  // abs_t : [K]
12089  // vmr : [1]
12090  const int Nparam = 4;
12091  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12092  {
12093  out3 << "Continuum model " << name << " is running with \n"
12094  << "user defined parameters according to model " << model << ".\n";
12096  parameters[0],
12097  parameters[1],
12098  parameters[2],
12099  parameters[3],
12100  model,
12101  f_grid,
12102  abs_p,
12103  abs_t,
12104  vmr,
12105  verbosity );
12106  }
12107  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12108  {
12109  ostringstream os;
12110  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12111  << "parameters for the model " << model << ",\n"
12112  << "but you specified " << parameters.nelem() << " parameters.\n";
12113  throw runtime_error(os.str());
12114  }
12115  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12116  {
12117  out3 << "Continuum model " << name << " running with \n"
12118  << "the parameters for model " << model << ".\n";
12120  0.000,
12121  0.000,
12122  0.000,
12123  0.000,
12124  model,
12125  f_grid,
12126  abs_p,
12127  abs_t,
12128  vmr,
12129  verbosity );
12130  }
12131  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12132  {
12133  ostringstream os;
12134  os << "ERROR: Continuum model " << name << " requires NO input\n"
12135  << "parameters for the model " << model << ",\n"
12136  << "but you specified " << parameters.nelem() << " parameters.\n"
12137  << "This ambiguity can not be solved by arts.\n"
12138  << "Please see the arts user guide chapter 3.\n";
12139  throw runtime_error(os.str());
12140  }
12141  }
12142  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12143  else if ( "N2-SelfContBorysow"==name )
12144  {
12145  // data information about this continuum:
12146  // A. Borysow and L. Frommhold, The Astrophysical Journal,
12147  // Vol. 311, pp.1043-1057, 1986
12148  const int Nparam = 1;
12149  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12150  {
12151  out3 << "Continuum model " << name << " is running with \n"
12152  << "user defined parameters according to model " << model << ".\n";
12153  BF86_CIA_N2( pxsec,
12154  parameters[0], // scaling factor
12155  model,
12156  f_grid,
12157  abs_p,
12158  abs_t,
12159  vmr,
12160  verbosity );
12161  }
12162  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12163  {
12164  ostringstream os;
12165  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12166  << "parameters for the model " << model << ",\n"
12167  << "but you specified " << parameters.nelem() << " parameters.\n";
12168  throw runtime_error(os.str());
12169  }
12170  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12171  {
12172  out3 << "Continuum model " << name << " running with \n"
12173  << "the parameters for model " << model << ".\n";
12174  BF86_CIA_N2( pxsec,
12175  0.0,
12176  model,
12177  f_grid,
12178  abs_p,
12179  abs_t,
12180  vmr,
12181  verbosity );
12182  }
12183  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12184  {
12185  ostringstream os;
12186  os << "ERROR: Continuum model " << name << " requires NO input\n"
12187  << "parameters for the model " << model << ",\n"
12188  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12189  << "This ambiguity can not be solved by arts.\n"
12190  << "Please see the arts user guide chapter 3.\n";
12191  throw runtime_error(os.str());
12192  }
12193  }
12194  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12195  else if ( "N2-CIArotCKDMT100"==name )
12196  {
12197  // data information about this continuum:
12198  // A. Borysow and L. Frommhold, The Astrophysical Journal,
12199  // Vol. 311, pp.1043-1057, 1986
12200  const int Nparam = 1;
12201  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12202  {
12203  out3 << "Continuum model " << name << " is running with \n"
12204  << "user defined parameters according to model " << model << ".\n";
12205  CKD_mt_CIArot_n2( pxsec,
12206  parameters[0], // scaling factor
12207  model,
12208  f_grid,
12209  abs_p,
12210  abs_t,
12211  vmr,
12212  verbosity );
12213  }
12214  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12215  {
12216  ostringstream os;
12217  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12218  << "parameters for the model " << model << ",\n"
12219  << "but you specified " << parameters.nelem() << " parameters.\n";
12220  throw runtime_error(os.str());
12221  }
12222  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12223  {
12224  out3 << "Continuum model " << name << " running with \n"
12225  << "the parameters for model " << model << ".\n";
12226  CKD_mt_CIArot_n2( pxsec,
12227  0.0,
12228  model,
12229  f_grid,
12230  abs_p,
12231  abs_t,
12232  vmr,
12233  verbosity );
12234  }
12235  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12236  {
12237  ostringstream os;
12238  os << "ERROR: Continuum model " << name << " requires NO input\n"
12239  << "parameters for the model " << model << ",\n"
12240  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12241  << "This ambiguity can not be solved by arts.\n"
12242  << "Please see the arts user guide chapter 3.\n";
12243  throw runtime_error(os.str());
12244  }
12245  }
12246  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12247  else if ( "N2-CIAfunCKDMT100"==name )
12248  {
12249  // data information about this continuum:
12250  // Lafferty, W.J., A.M. Solodov,A. Weber, W.B. Olson and J._M. Hartmann,
12251  // Infrared collision-induced absorption by
12252  // N2 near 4.3 microns for atmospheric applications:
12253  // Measurements and emprirical modeling,
12254  // Appl. Optics, 35, 5911-5917, (1996)
12255 
12256  const int Nparam = 1;
12257  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12258  {
12259  out3 << "Continuum model " << name << " is running with \n"
12260  << "user defined parameters according to model " << model << ".\n";
12261  CKD_mt_CIAfun_n2( pxsec,
12262  parameters[0], // scaling factor
12263  model,
12264  f_grid,
12265  abs_p,
12266  abs_t,
12267  vmr,
12268  verbosity );
12269  }
12270  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12271  {
12272  ostringstream os;
12273  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12274  << "parameters for the model " << model << ",\n"
12275  << "but you specified " << parameters.nelem() << " parameters.\n";
12276  throw runtime_error(os.str());
12277  }
12278  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12279  {
12280  out3 << "Continuum model " << name << " running with \n"
12281  << "the parameters for model " << model << ".\n";
12282  CKD_mt_CIAfun_n2( pxsec,
12283  0.0,
12284  model,
12285  f_grid,
12286  abs_p,
12287  abs_t,
12288  vmr,
12289  verbosity );
12290  }
12291  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12292  {
12293  ostringstream os;
12294  os << "ERROR: Continuum model " << name << " requires NO input\n"
12295  << "parameters for the model " << model << ",\n"
12296  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12297  << "This ambiguity can not be solved by arts.\n"
12298  << "Please see the arts user guide chapter 3.\n";
12299  throw runtime_error(os.str());
12300  }
12301  }
12302  // ============= CO2 continuum ========================================================
12303  else if ( "CO2-CKD241"==name )
12304  {
12305  // data information about this continuum:
12306  // CKDv2.4.1 model at http://www.rtweb.aer.com/continuum_frame.html
12307  // This continuum accounts for the far wings of the many COS lines/bands since
12308  // the line is used with a cutoff in the line shape with +/- 25 cm^-1.
12309  //
12310  // specific continuum parameters and units:
12311  // OUTPUT
12312  // pxsec : [1/m],
12313  // INPUT
12314  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12315  // parameters[1] : continuum temperature exponent [1]
12316  // f_grid : [Hz]
12317  // abs_p : [Pa]
12318  // abs_t : [K]
12319  // vmr : [1]
12320  // abs_h2o : [1]
12321  //
12322  const int Nparam = 1;
12323  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12324  {
12325  out3 << "Continuum model " << name << " is running with \n"
12326  << "user defined parameters according to model " << model << ".\n";
12327  CKD_241_co2( pxsec,
12328  parameters[0], // abs. scaling
12329  model,
12330  f_grid,
12331  abs_p,
12332  abs_t,
12333  vmr,
12334  verbosity );
12335  }
12336  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12337  {
12338  ostringstream os;
12339  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12340  << "parameters for the model " << model << ",\n"
12341  << "but you specified " << parameters.nelem() << " parameters.\n";
12342  throw runtime_error(os.str());
12343  }
12344  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12345  {
12346  out3 << "Continuum model " << name << " running with \n"
12347  << "the parameters for model " << model << ".\n";
12348  CKD_241_co2( pxsec,
12349  0.00,
12350  model,
12351  f_grid,
12352  abs_p,
12353  abs_t,
12354  vmr,
12355  verbosity );
12356  }
12357  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12358  {
12359  ostringstream os;
12360  os << "ERROR: Continuum model " << name << " requires NO input\n"
12361  << "parameters for the model " << model << ",\n"
12362  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12363  << "This ambiguity can not be solved by arts.\n"
12364  << "Please see the arts user guide chapter 3.\n";
12365  throw runtime_error(os.str());
12366  }
12367  }
12368  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12369  else if ( "CO2-CKDMT100"==name )
12370  {
12371  // data information about this continuum:
12372  // CKD model at http://www.rtweb.aer.com/continuum_frame.html
12373  // This continuum accounts for the far wings of the many COS lines/bands since
12374  // the line is used with a cutoff in the line shape with +/- 25 cm^-1.
12375  //
12376  // specific continuum parameters and units:
12377  // OUTPUT
12378  // pxsec : [1/m],
12379  // INPUT
12380  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12381  // parameters[1] : continuum temperature exponent [1]
12382  // f_grid : [Hz]
12383  // abs_p : [Pa]
12384  // abs_t : [K]
12385  // vmr : [1]
12386  // abs_h2o : [1]
12387  //
12388  const int Nparam = 1;
12389  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12390  {
12391  out3 << "Continuum model " << name << " is running with \n"
12392  << "user defined parameters according to model " << model << ".\n";
12393  CKD_mt_co2( pxsec,
12394  parameters[0], // abs. scaling
12395  model,
12396  f_grid,
12397  abs_p,
12398  abs_t,
12399  vmr,
12400  verbosity );
12401  }
12402  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12403  {
12404  ostringstream os;
12405  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12406  << "parameters for the model " << model << ",\n"
12407  << "but you specified " << parameters.nelem() << " parameters.\n";
12408  throw runtime_error(os.str());
12409  }
12410  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12411  {
12412  out3 << "Continuum model " << name << " running with \n"
12413  << "the parameters for model " << model << ".\n";
12414  CKD_mt_co2( pxsec,
12415  0.00,
12416  model,
12417  f_grid,
12418  abs_p,
12419  abs_t,
12420  vmr,
12421  verbosity );
12422  }
12423  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12424  {
12425  ostringstream os;
12426  os << "ERROR: Continuum model " << name << " requires NO input\n"
12427  << "parameters for the model " << model << ",\n"
12428  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12429  << "This ambiguity can not be solved by arts.\n"
12430  << "Please see the arts user guide chapter 3.\n";
12431  throw runtime_error(os.str());
12432  }
12433  }
12434  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12435  else if ( "CO2-SelfContPWR93"==name )
12436  {
12437  // data information about this continuum:
12438  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
12439  // "Atmospheric Remote Sensing by Microwave Radiometry",
12440  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
12441  //
12442  // specific continuum parameters and units:
12443  // OUTPUT
12444  // pxsec : [1/m],
12445  // INPUT
12446  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12447  // parameters[1] : continuum temperature exponent [1]
12448  // f_grid : [Hz]
12449  // abs_p : [Pa]
12450  // abs_t : [K]
12451  // vmr : [1]
12452  //
12453  const int Nparam = 2;
12454  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12455  {
12456  out3 << "Continuum model " << name << " is running with \n"
12457  << "user defined parameters according to model " << model << ".\n";
12459  parameters[0], // coefficient
12460  parameters[1], // temp. exponent
12461  model,
12462  f_grid,
12463  abs_p,
12464  abs_t,
12465  vmr,
12466  verbosity );
12467  }
12468  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12469  {
12470  ostringstream os;
12471  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12472  << "parameters for the model " << model << ",\n"
12473  << "but you specified " << parameters.nelem() << " parameters.\n";
12474  throw runtime_error(os.str());
12475  }
12476  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12477  {
12478  out3 << "Continuum model " << name << " running with \n"
12479  << "the parameters for model " << model << ".\n";
12481  0.00,
12482  0.00,
12483  model,
12484  f_grid,
12485  abs_p,
12486  abs_t,
12487  vmr,
12488  verbosity );
12489  }
12490  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12491  {
12492  ostringstream os;
12493  os << "ERROR: Continuum model " << name << " requires NO input\n"
12494  << "parameters for the model " << model << ",\n"
12495  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12496  << "This ambiguity can not be solved by arts.\n"
12497  << "Please see the arts user guide chapter 3.\n";
12498  throw runtime_error(os.str());
12499  }
12500  }
12501  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12502  else if ( "CO2-ForeignContPWR93"==name )
12503  {
12504  // data information about this continuum:
12505  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
12506  // "Atmospheric Remote Sensing by Microwave Radiometry",
12507  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
12508  //
12509  // specific continuum parameters and units:
12510  // OUTPUT
12511  // pxsec : [1/m],
12512  // INPUT
12513  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12514  // parameters[1] : continuum temperature exponent [1]
12515  // f_grid : [Hz]
12516  // abs_p : [Pa]
12517  // abs_t : [K]
12518  // abs_n2 : [1]
12519  // vmr : [1]
12520  //
12521  const int Nparam = 2;
12522  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12523  {
12524  out3 << "Continuum model " << name << " is running with \n"
12525  << "user defined parameters according to model " << model << ".\n";
12527  parameters[0],
12528  parameters[1],
12529  model,
12530  f_grid,
12531  abs_p,
12532  abs_t,
12533  abs_n2,
12534  vmr,
12535  verbosity );
12536  }
12537  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12538  {
12539  ostringstream os;
12540  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12541  << "parameters for the model " << model << ",\n"
12542  << "but you specified " << parameters.nelem() << " parameters.\n";
12543  throw runtime_error(os.str());
12544  }
12545  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12546  {
12547  out3 << "Continuum model " << name << " running with \n"
12548  << "the parameters for model " << model << ".\n";
12550  0.00,
12551  0.00,
12552  model,
12553  f_grid,
12554  abs_p,
12555  abs_t,
12556  abs_n2,
12557  vmr,
12558  verbosity );
12559  }
12560  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12561  {
12562  ostringstream os;
12563  os << "ERROR: Continuum model " << name << " requires NO input\n"
12564  << "parameters for the model " << model << ",\n"
12565  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12566  << "This ambiguity can not be solved by arts.\n"
12567  << "Please see the arts user guide chapter 3.\n";
12568  throw runtime_error(os.str());
12569  }
12570  }
12571  // ============= cloud and fog absorption from MPM93 ==================================
12572  else if ( "liquidcloud-MPM93"==name )
12573  {
12574  // Suspended water droplet absorption parameterization from MPM93 model
12575  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
12576  // "Propagation modeling of moist air and suspended water/ice
12577  // particles at frequencies below 1000 GHz",
12578  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
12579  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
12580  //
12581  // specific continuum parameters and units:
12582  // OUTPUT
12583  // pxsec : [1/m],
12584  // INPUT
12585  // parameters[0] : [1]
12586  // parameters[1] : [1]
12587  // parameters[2] : [1]
12588  // model : [1]
12589  // f_grid : [Hz]
12590  // abs_p : [Pa]
12591  // abs_t : [K]
12592  // vmr : [1]
12593  //
12594  // liquid water droplet parameters:
12595  // suspended water droplet density range: 0-10 g/m³
12596  // specific droplet weight value: 1 g/cm³
12597  //
12598  // valid atmospheric condition:
12599  // temperature : 233 to 323 K
12600  // relative humidity: 1 to 100 %
12601  //
12602  const int Nparam = 3;
12603  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12604  {
12605  out3 << "MPM93 liquid water cloud absorption model " << name << " is running with \n"
12606  << "user defined parameters according to model " << model << ".\n";
12607  MPM93WaterDropletAbs(pxsec,
12608  parameters[0], // scaling factror
12609  parameters[1], // scaling factror
12610  parameters[2], // scaling factror
12611  model, // model option
12612  f_grid,
12613  abs_p,
12614  abs_t,
12615  vmr,
12616  verbosity);
12617  }
12618  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12619  {
12620  ostringstream os;
12621  os << "MPM93 liquid water cloud absorption model " << name << " requires\n"
12622  << Nparam << " input parameter for the model " << model << ",\n"
12623  << "but you specified " << parameters.nelem() << " parameters.\n";
12624  throw runtime_error(os.str());
12625  }
12626  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12627  {
12628  out3 << "MPM93 liquid water cloud absorption model " << name << " running with \n"
12629  << "the parameter for model " << model << ".\n";
12630  MPM93WaterDropletAbs(pxsec,
12631  0.000, // scaling factror
12632  0.000, // scaling factror
12633  0.000, // scaling factror
12634  model, // model option
12635  f_grid,
12636  abs_p,
12637  abs_t,
12638  vmr,
12639  verbosity);
12640  }
12641  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12642  {
12643  ostringstream os;
12644  os << "ERROR: MPM93 liquid water cloud absorption model " << name << " requires NO input\n"
12645  << "parameters for the model " << model << ",\n"
12646  << "but you specified " << parameters.nelem() << " parameters.\n"
12647  << "This ambiguity can not be solved by arts.\n"
12648  << "Please see the arts user guide chapter 4.\n";
12649  throw runtime_error(os.str());
12650  }
12651  }
12652  // ============= ice particle absorption from MPM93 ===================================
12653  else if ( "icecloud-MPM93"==name )
12654  {
12655  // Ice particle absorption parameterization from MPM93 model
12656  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
12657  // "Propagation modeling of moist air and suspended water/ice
12658  // particles at frequencies below 1000 GHz",
12659  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
12660  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
12661  //
12662  // specific continuum parameters and units:
12663  // OUTPUT
12664  // pxsec : [1/m],
12665  // INPUT
12666  // parameters[0] : [1]
12667  // parameters[1] : [1]
12668  // parameters[2] : [1]
12669  // model : [1]
12670  // f_grid : [Hz]
12671  // abs_p : [Pa]
12672  // abs_t : [K]
12673  // vmr : [1]
12674  //
12675  // ice crystal parameters:
12676  // suspended water droplet density range: 0-10 g/m³
12677  // specific droplet weight value: 1 g/cm³
12678  //
12679  // valid atmospheric condition:
12680  // temperature : 233 to 323 K
12681  // relative humidity: 1 to 100 %
12682  //
12683  const int Nparam = 3;
12684  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12685  {
12686  out3 << "MPM93 ice water cloud absorption model " << name << " is running with \n"
12687  << "user defined parameters according to model " << model << ".\n";
12688  MPM93IceCrystalAbs(pxsec,
12689  parameters[0], // scaling factror
12690  parameters[1], // scaling factror
12691  parameters[2], // scaling factror
12692  model, // model option
12693  f_grid,
12694  abs_p,
12695  abs_t,
12696  vmr,
12697  verbosity);
12698  }
12699  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12700  {
12701  ostringstream os;
12702  os << "MPM93 ice water cloud absorption model " << name << " requires \n"
12703  << Nparam << " input parameter for the model " << model << ",\n"
12704  << "but you specified " << parameters.nelem() << " parameters.\n";
12705  throw runtime_error(os.str());
12706  }
12707  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12708  {
12709  out3 << "MPM93 ice water cloud absorption model " << name << " running with \n"
12710  << "the parameter for model " << model << ".\n";
12711  MPM93IceCrystalAbs(pxsec,
12712  0.000, // scaling factror
12713  0.000, // scaling factror
12714  0.000, // scaling factror
12715  model, // model option
12716  f_grid,
12717  abs_p,
12718  abs_t,
12719  vmr,
12720  verbosity);
12721  }
12722  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12723  {
12724  ostringstream os;
12725  os << "ERROR: MPM93 ice water cloud absorption model " << name << " requires NO input\n"
12726  << "parameters for the model " << model << ",\n"
12727  << "but you specified " << parameters.nelem() << " parameters.\n"
12728  << "This ambiguity can not be solved by arts.\n"
12729  << "Please see the arts user guide chapter 4.\n";
12730  throw runtime_error(os.str());
12731  }
12732  }
12733  // ============= rain extinction from MPM93 ===========================================
12734  else if ( "rain-MPM93"==name )
12735  {
12736  // Rain extinction parameterization from MPM93 model, described in
12737  // H. J. Liebe,
12738  // "MPM - An Atmospheric Millimeter-Wave Propagation Model",
12739  // Int. J. Infrared and Millimeter Waves, vol. 10(6),
12740  // pp. 631-650, 1989
12741  // and based on
12742  // Olsen, R.L., D.V. Rogers, and D. B. Hodge, "The aR^b relation in the
12743  // calculation of rain attenuation", IEEE Trans. Antennas Propagat.,
12744  // vol. AP-26, pp. 318-329, 1978.
12745  //
12746  // specific continuum parameters and units:
12747  // OUTPUT
12748  // pxsec : [1/m],
12749  // INPUT
12750  // parameters[0] : [1]
12751  // parameters[1] : [1]
12752  // parameters[2] : [1]
12753  // model : [1]
12754  // f_grid : [Hz]
12755  // abs_p : [Pa]
12756  // abs_t : [K]
12757  // vmr : [mm/h]
12758  //
12759  // rain parameters:
12760  // rain rate range: 0-150 mm/h
12761  //
12762  // valid atmospheric condition:
12763  // temperature : (preferably above 273 K...)
12764  //
12765  const int Nparam = 3;
12766  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12767  {
12768  out3 << "MPM93 rain extinction model " << name << " is running with \n"
12769  << "user defined parameters according to model " << model << ".\n";
12770  MPM93RainExt(pxsec,
12771  parameters[0], // scaling factror
12772  parameters[1], // scaling factror
12773  parameters[2], // scaling factror
12774  model, // model option
12775  f_grid,
12776  abs_p,
12777  abs_t,
12778  vmr,
12779  verbosity);
12780  }
12781  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12782  {
12783  ostringstream os;
12784  os << "MPM93 rain extinction model " << name << " requires \n"
12785  << Nparam << " input parameter for the model " << model << ",\n"
12786  << "but you specified " << parameters.nelem() << " parameters.\n";
12787  throw runtime_error(os.str());
12788  }
12789  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12790  {
12791  out3 << "MPM93 rain extinction model " << name << " running with \n"
12792  << "the parameter for model " << model << ".\n";
12793  MPM93RainExt(pxsec,
12794  0.000, // scaling factror
12795  0.000, // scaling factror
12796  0.000, // scaling factror
12797  model, // model option
12798  f_grid,
12799  abs_p,
12800  abs_t,
12801  vmr,
12802  verbosity);
12803  }
12804  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12805  {
12806  ostringstream os;
12807  os << "ERROR: MPM93 rain extinction model " << name << " requires NO input\n"
12808  << "parameters for the model " << model << ",\n"
12809  << "but you specified " << parameters.nelem() << " parameters.\n"
12810  << "This ambiguity can not be solved by arts.\n"
12811  << "Please see the arts user guide chapter 4.\n";
12812  throw runtime_error(os.str());
12813  }
12814  }
12815  else // -----------------------------------------------------------------------
12816  {
12817  // none of the continuum or full model tags were selected -> error message.
12818  ostringstream os;
12819  os << "ERROR: Continuum/ full model tag `" << name << "' not yet implemented in arts!";
12820  throw runtime_error(os.str());
12821  }
12822 
12823  // We have to divide the result from the internal continuum model by
12824  // the number density n to convert it from pseudo cross section to a
12825  // true cross section.
12826 
12827  // Boltzmann constant
12828  extern const Numeric BOLTZMAN_CONST;
12829 
12830  // Loop all pressures:
12831  for ( Index i=0; i<abs_p.nelem(); ++i )
12832  {
12833  const Numeric p_i = abs_p[i];
12834  const Numeric t_i = abs_t[i];
12835 
12836  // Calculate total number density from pressure and temperature.
12837  // n = n0*T0/p0 * p/T or n = p/kB/t, ideal gas law
12838  const Numeric n = p_i / BOLTZMAN_CONST / t_i;
12839 
12840  // We add to the output variable xsec here, previous content is
12841  // not overwritten!
12842  pxsec(joker,i) /= n;
12843  xsec(joker,i) += pxsec(joker,i);
12844  }
12845 }
12846 
12847 // #################################################################################
12848 
12873 {
12874  // The species lookup data:
12875  extern const Array<SpeciesRecord> species_data;
12876 
12877  // For the list of valid continuum models:
12878  ArrayOfString valid_models;
12879 
12880  bool found = false;
12881 
12882  // Loop all species:
12884  i<species_data.end();
12885  ++i )
12886  {
12887  String specnam = i->Name();
12888 
12889  // Loop all isotopes:
12890  for ( Array<IsotopeRecord>::const_iterator j=i->Isotope().begin();
12891  j<i->Isotope().end();
12892  ++j )
12893  {
12894  String isonam = j->Name();
12895 
12896  // The specified name consists of a species part and an
12897  // isotope part, e.g., H2O-ContStandardSelf. We need to
12898  // construct a similar String from the species lookup data
12899  // by concatenating species name and isotope name.
12900 
12901  String fullnam = specnam + "-" + isonam;
12902  // cout << fullnam << "\n";
12903 
12904  // See if this is a continuum tag, so that we can add it to
12905  // the list:
12906  if ( 0 > j->Abundance() )
12907  {
12908  valid_models.push_back(fullnam);
12909  }
12910 
12911  if ( name == fullnam )
12912  {
12913  found = true;
12914  }
12915  }
12916  }
12917 
12918  // ----------------------------------------------------------------------
12919  // Have we found it?
12920  if (!found)
12921  {
12922  ostringstream os;
12923  os << "The String `" << name << "' matches none of the known\n"
12924  << "continuum models. Known continuum models are:";
12925  for ( ArrayOfString::const_iterator i=valid_models.begin();
12926  i<valid_models.end();
12927  ++i )
12928  {
12929  os << "\n" << *i;
12930  }
12931  throw runtime_error(os.str());
12932  }
12933 }
12934 //
12935 //
12936 // #################################################################################
12937 // ############################# f2c code implementation ###########################
12938 // #################################################################################
12939 //
12940 //
12941 // ------------------- begin of f2c.h file --------------------------------
12942 //
12943 /* f2c.h -- Standard Fortran to C header file */
12944 #ifndef F2C_INCLUDE
12945 #define F2C_INCLUDE
12946 
12947 typedef long int integer;
12948 typedef unsigned long int uinteger;
12949 typedef char *address;
12950 typedef short int shortint;
12951 typedef float real;
12952 typedef double doublereal;
12953 typedef struct { real r, i; } complex;
12954 typedef struct { doublereal r, i; } doublecomplex;
12955 typedef long int logical;
12956 typedef short int shortlogical;
12957 typedef char logical1;
12958 typedef char integer1;
12959 #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
12960 typedef long long longint; /* system-dependent */
12961 typedef unsigned long long ulongint; /* system-dependent */
12962 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
12963 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
12964 #endif
12965 
12966 #define TRUE_ (1)
12967 #define FALSE_ (0)
12968 
12969 /* Extern is for use with -E */
12970 #ifndef Extern
12971 #define Extern extern
12972 #endif
12973 
12974 /* I/O stuff */
12975 
12976 #ifdef f2c_i2
12977 /* for -i2 */
12978 typedef short flag;
12979 typedef short ftnlen;
12980 typedef short ftnint;
12981 #else
12982 typedef long int flag;
12983 typedef long int ftnlen;
12984 typedef long int ftnint;
12985 #endif
12986 
12987 /*external read, write*/
12988 typedef struct
12992  char *cifmt;
12994 } cilist;
12995 
12996 /*internal read, write*/
12997 typedef struct
12999  char *iciunit;
13001  char *icifmt;
13004 } icilist;
13005 
13006 /*open*/
13007 typedef struct
13010  char *ofnm;
13012  char *osta;
13013  char *oacc;
13014  char *ofm;
13016  char *oblnk;
13017 } olist;
13018 
13019 /*close*/
13020 typedef struct
13023  char *csta;
13024 } cllist;
13025 
13026 /*rewind, backspace, endfile*/
13027 typedef struct
13030 } alist;
13031 
13032 /* inquire */
13033 typedef struct
13036  char *infile;
13038  ftnint *inex; /*parameters in standard's order*/
13042  char *inname;
13044  char *inacc;
13046  char *inseq;
13048  char *indir;
13050  char *infmt;
13052  char *inform;
13054  char *inunf;
13058  char *inblank;
13060 } inlist;
13061 
13062 #define VOID void
13063 
13064 union Multitype { /* for multiple entry points */
13068  /* longint j; */
13073  };
13074 
13075 typedef union Multitype Multitype;
13076 
13077 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
13078 
13079 struct Vardesc { /* for Namelist */
13080  char *name;
13081  char *addr;
13083  int type;
13084  };
13085 typedef struct Vardesc Vardesc;
13086 
13087 struct Namelist {
13088  char *name;
13090  int nvars;
13091  };
13092 typedef struct Namelist Namelist;
13093 
13094 #define abs(x) ((x) >= 0 ? (x) : -(x))
13095 #define dabs(x) (doublereal)abs(x)
13096 #define min(a,b) ((a) <= (b) ? (a) : (b))
13097 #define max(a,b) ((a) >= (b) ? (a) : (b))
13098 #define dmin(a,b) (doublereal)min(a,b)
13099 #define dmax(a,b) (doublereal)max(a,b)
13100 #define bit_test(a,b) ((a) >> (b) & 1)
13101 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
13102 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
13103 
13104 /* procedure parameter types for -A and -C++ */
13105 
13106 #define F2C_proc_par_types 1
13107 #ifdef __cplusplus
13108 typedef int /* Unknown procedure type */ (*U_fp)(...);
13109 typedef shortint (*J_fp)(...);
13110 typedef integer (*I_fp)(...);
13111 typedef real (*R_fp)(...);
13112 typedef doublereal (*D_fp)(...), (*E_fp)(...);
13113 typedef /* Complex */ VOID (*C_fp)(...);
13114 typedef /* Double Complex */ VOID (*Z_fp)(...);
13115 typedef logical (*L_fp)(...);
13116 typedef shortlogical (*K_fp)(...);
13117 typedef /* Character */ VOID (*H_fp)(...);
13118 typedef /* Subroutine */ int (*S_fp)(...);
13119 #else
13120 typedef int /* Unknown procedure type */ (*U_fp)();
13121 typedef shortint (*J_fp)();
13122 typedef integer (*I_fp)();
13123 typedef real (*R_fp)();
13124 typedef doublereal (*D_fp)(), (*E_fp)();
13125 typedef /* Complex */ VOID (*C_fp)();
13126 typedef /* Double Complex */ VOID (*Z_fp)();
13127 typedef logical (*L_fp)();
13128 typedef shortlogical (*K_fp)();
13129 typedef /* Character */ VOID (*H_fp)();
13130 typedef /* Subroutine */ int (*S_fp)();
13131 #endif
13132 /* E_fp is for real functions when -R is not specified */
13133 typedef VOID C_f; /* complex function */
13134 typedef VOID H_f; /* character function */
13135 typedef VOID Z_f; /* double complex function */
13136 typedef doublereal E_f; /* real function with -R not specified */
13137 
13138 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
13139 
13140 #ifndef Skip_f2c_Undefs
13141 #undef cray
13142 #undef gcos
13143 #undef mc68010
13144 #undef mc68020
13145 #undef mips
13146 #undef pdp11
13147 #undef sgi
13148 #undef sparc
13149 #undef sun
13150 #undef sun2
13151 #undef sun3
13152 #undef sun4
13153 #undef u370
13154 #undef u3b
13155 #undef u3b2
13156 #undef u3b5
13157 #undef unix
13158 #undef vax
13159 #endif
13160 #endif
13161 
13162 // ------------------- end of f2c.h file --------------------------------
13163 
13164 
13165 // ------------------ begin of Borysow N2N2 F77 code --------------------
13166 
13167 
13168 /* n2n2tks.f -- translated by f2c (version 20010821).
13169  You must link the resulting object file with the libraries:
13170  -lf2c -lm (in that order)
13171 */
13172 
13173 /* Common Block Declarations */
13174 
13175 struct s_blockin_ {
13176  double temp, fnumin, fnumax, dnu;
13178 
13179 #define blockin_1 blockin_
13180 
13181 struct s_app3a_ {
13182  double slit, dx, wnrmax3;
13184 
13185 #define app3a_1 app3a_
13186 
13187 struct s_app3b_ {
13188  int nsri, ns, nsriup;
13190 
13191 #define app3b_1 app3b_
13192 
13193 struct s_rsilo_ {
13194  double rsilo[201];
13196 
13197 #define rsilo_1 rsilo_
13198 
13199 struct s_bou43_ {
13200  int initb;
13202 
13203 #define bou43_1 bou43_
13204 
13205 union u_bba_ {
13206  struct s_m_1 {
13207  double omeg[201], rsi[201], rsigg[201], alfa;
13208  } m_1;
13209  struct s_m_2 {
13210  double omeg[201], rsi[201], rsigg[201], beta;
13211  } m_2;
13213 
13214 #define bba_1 (bba_.m_1)
13215 #define bba_2 (bba_.m_2)
13216 
13217 struct s_bbc_ {
13218  int nsol;
13220 
13221 #define bbc_1 bbc_
13222 
13223 struct s_bf_ {
13224  double g0bf, delbf, om0;
13226 
13227 #define bf_1 bf_
13228 
13229 struct like_1_ {
13230  int like;
13231  char lgas[5];
13232 };
13233 
13234 #define like_1 (*(struct like_1_ *) &like_)
13235 
13236 struct s_k1k0_ {
13237  int ik1k0;
13239 
13240 #define k1k0_1 k1k0_
13241 
13242 struct s_bbb_ {
13243  int ibound;
13245 
13246 #define bbb_1 bbb_
13247 
13248 struct energ_1_ {
13249  double eb[246] /* was [41][6] */;
13250  int niv[6];
13251 };
13252 
13253 #define energ_1 (*(struct energ_1_ *) &energ_)
13254 
13255 struct s_dimer_ {
13256  int nlines;
13258 
13259 #define dimer_1 dimer_
13260 
13261 struct n2part_1_ {
13262  double q1, wn2[2], b01, d01;
13263  int jrange2;
13264 };
13265 struct n2part_2_ {
13266  double q, wn2[2], b0, d0;
13267  int jrange1;
13268 };
13269 
13270 #define n2part_1 (*(struct n2part_1_ *) &n2part_)
13271 #define n2part_2 (*(struct n2part_2_ *) &n2part_)
13272 
13273 union u_bl3_ {
13274  struct s_m_1 {
13275  double rsi[401];
13276  } m_1;
13277  struct s_m_2 {
13278  double rsibb[401];
13279  } m_2;
13281 
13282 #define bl3_1 (bl3_.m_1)
13283 #define bl3_2 (bl3_.m_2)
13284 
13285 union u_bbbb_ {
13286  struct s_m_1 {
13287  int idelv, iv, ivp, idell, il, ilp;
13288  } m_1;
13289  struct s_m_2 {
13291  } m_2;
13293 
13294 #define bbbb_1 (bbbb_.m_1)
13295 #define bbbb_2 (bbbb_.m_2)
13296 
13297 /* Initialized data */
13298 
13299 struct s_energe_ {
13300  double e_1[246];
13301  int e_2[6];
13302  } energ_ = { {-54.99996, -54.86228, -54.58697, -54.17413, -53.62391,
13303  -52.93648, -52.11211, -51.15108, -50.05374, -48.82049, -47.45179,
13304  -45.94815, -44.31014, -42.53841, -40.63365, -38.59665, -36.42824,
13305  -34.12937, -31.70105, -29.14439, -26.46061, -23.65103, -20.71709,
13306  -17.66041, -14.48271, -11.18593, -7.77221, -4.24393, -.60374,
13307  3.14531, 6.99978, 10.95566, 15.00818, 19.15136, 23.37787,
13308  27.67681, 32.03237, 36.42278, 40.83668, 45.29436, 49.79246,
13309  -31.89437, -31.77215, -31.52779, -31.16143, -30.67334, -30.06382,
13310  -29.33328, -28.48222, -27.51123, -26.42099, -25.21229, -23.88603,
13311  -22.44322, -20.88502, -19.21272, -17.42777, -15.53182, -13.52669,
13312  -11.41446, -9.1975, -6.87848, -4.46049, -1.94714, .65736, 3.34788,
13313  6.11816, 8.95978, 11.8613, 14.80383, 17.75924, 20.71774,
13314  23.71589, 0., 0., 0., 0., 0., 0., 0., 0., 0., -16.05019, -15.9464,
13315  -15.73896, -15.42815, -15.0144, -14.4983, -13.88057, -13.16213,
13316  -12.34407, -11.42771, -10.41455, -9.30639, -8.10531, -6.81376,
13317  -5.43459, -3.97121, -2.42768, -.80899, .87859, 2.62689, 4.42334,
13318  6.24733, 8.06983, 9.90464, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13319  0., 0., 0., 0., 0., 0., 0., -6.49343, -6.41131, -6.24732,
13320  -6.00202, -5.67623, -5.27111, -4.78813, -4.22919, -3.59665,
13321  -2.89345, -2.12325, -1.29074, -.40202, .5345, 1.50455, 2.48212,
13322  3.46665, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13323  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., -1.76583, -1.70887,
13324  -1.59552, -1.427, -1.20523, -.93302, -.61434, -.25504, .13641, 0.,
13325  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13326  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13327  -.17133, -.14341, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13328  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13329  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, {41, 32, 24, 17, 9, 2} }
13330  ;
13331 
13332 struct s_n2part_ {
13333  double fill_1[1];
13334  double e_2[4];
13335  int fill_3[1];
13336  } n2part_ = { {0}, {2., 1., 1.98957, 5.8e-6}, {0} };
13337 
13338 struct s_like_ {
13339  int fill_1[1];
13340  char e_2[5];
13341  } like_ = { {0}, "N2N2" };
13342 
13343 
13344 /* Table of constant values */
13345 
13346 // FIXME static integer c__9 = 9;
13347 // FIXME static integer c__1 = 1;
13348 // FIXME static integer c__5 = 5;
13349 static int cs__1 = 1;
13350 static int cs__0 = 0;
13351 static double c_b24 = 2.9723;
13352 static double c_b25 = -.99569;
13353 static double c_b26 = .09464;
13354 static double c_b27 = 1.2962e-12;
13355 static double c_b28 = -.13048;
13356 static double c_b29 = -.03128;
13357 static double c_b30 = 3.7969e-14;
13358 static double c_b31 = 1.03681;
13359 static double c_b32 = -.14336;
13360 static int cs__2 = 2;
13361 static int cs__3 = 3;
13362 static double c_b43 = .180926;
13363 static double c_b44 = -1.69153;
13364 static double c_b45 = .18605;
13365 static double c_b46 = .3;
13366 static double c_b47 = 0.;
13367 static double c_b49 = 6.6017e-16;
13368 static double c_b50 = 2.59982;
13369 static double c_b51 = -.31831;
13370 static double c_b52 = 1.2481e-12;
13371 static double c_b53 = -.57028;
13372 static double c_b54 = .05983;
13373 static double c_b55 = 5.2681e-13;
13374 static double c_b56 = -.24719;
13375 static double c_b57 = .00519;
13376 static double c_b58 = 2.7518e15;
13377 static double c_b59 = -25.38969;
13378 static double c_b60 = 2.46542;
13379 static int cs__4 = 4;
13380 static int cs__5 = 5;
13381 // FIXME static integer c__2 = 2;
13382 static double c_b78 = .0825299;
13383 static double c_b79 = -1.25562;
13384 static double c_b80 = .12981;
13385 static double c_b84 = 3.6611e-15;
13386 static double c_b85 = 1.47688;
13387 static double c_b86 = -.16537;
13388 static double c_b87 = 6.1264e-10;
13389 static double c_b88 = -2.25011;
13390 static double c_b89 = .15289;
13391 static double c_b90 = 7.982e-10;
13392 static double c_b91 = -2.76152;
13393 static double c_b92 = .21847;
13394 static double c_b93 = 5.2868e-22;
13395 static double c_b94 = 7.66253;
13396 static double c_b95 = -.77527;
13397 static double c_b112 = 119.261;
13398 static double c_b113 = -3.78587;
13399 static double c_b114 = .34024;
13400 static double c_b115 = 9.3777e-12;
13401 static double c_b116 = -.66548;
13402 static double c_b117 = .0033;
13403 static double c_b118 = 3.0395e-13;
13404 static double c_b119 = .24728;
13405 static double c_b120 = -.06607;
13406 static double c_b183 = 1e-6;
13407 static double c_b186 = 1.5;
13408 
13409 #define temp (blockin_1.temp)
13410 #define fnumin (blockin_1.fnumin)
13411 #define fnumax (blockin_1.fnumax)
13412 #define dnu (blockin_1.dnu)
13413 #define slit (app3a_1.slit)
13414 #define dx (app3a_1.dx)
13415 #define rsilo (rsilo_1.rsilo)
13416 #define omeg (bba_1.omeg)
13417 #define rsi (bba_1.rsi)
13418 #define rsigg (bba_1.rsigg)
13419 #define nsol (bbc_1.nsol)
13420 #define like (like_1.like)
13421 #define ik1k0 (k1k0_1.ik1k0)
13422 #define ibound (bbb_1.ibound)
13423 
13424 /* TKS ****** SUBROUTINE N2N2TKS(T, F) ***************************************/
13425 Numeric n2n2tks_(double t, double f)
13426 {
13427  /* System generated locals */
13428  int s__1;
13429  double ret_val;
13430 
13431  /* Local variables */
13432  double hexa[10], quad[10], freq[10], e;
13433  int i__;
13434  double s, x, t1, t2, t3, t4;
13435  int ij, nf, jj;
13436  double rslow1, si;
13437  int nr;
13438  double ss[1], tt[2];
13439  extern /* Subroutine */ int bound32_(double *, double *, int
13440  *), bound54_(double *, double *, int *);
13441  double tksabs[5];
13442  extern /* Subroutine */ int spline_(int *, int *, int *,
13443  double *, double *, double *, double *,
13444  double *, double *, int *, double *);
13445  double dtrans[10], abscoef[10];
13446  extern /* Subroutine */ int addspec_(double *, double *,
13447  double *, double *, double *, double *,
13448  double *, int *, double *, double *, int *,
13449  int *, int *, int *, int *, int *);
13450  double eps, alfatot[10];
13451  extern /* Subroutine */ int partsum_(double *);
13452 
13453 /* ========================================= */
13454 /* Copyright (C) Aleksandra Borysow, 1987) */
13455 /* ==================================================================== */
13456 /* PROGRAM PREPARED BY ALEKSANDRA BORYSOW (APRIL'1987) */
13457 /* (UNIVERSITY OF TEXAS AT AUSTIN, PHYSICS DEPARTMENT) */
13458 /* ORIGINAL VERSION: WRITTEN ON CYBER */
13459 
13460 /* PROGRAM GENERATES N2-N2 COLLISION-INDUCED SPECTRA AT */
13461 /* TEMPERATURES BETWEEN 50 TO 300 K. */
13462 /* CIA SPECTRA MODELED AFTER PAPER (*) */
13463 /* ALEKSANDRA BORYSOW AND LOTHAR FROMMHOLD, */
13464 /* ASTROPHYSICAL JOURNAL, VOL. 311, PAGES 1043-1057, (1986) */
13465 
13466 /* REVISED BY GLENN ORTON (1989) - TO WORK ON SUN WORKSTATIONS */
13467 /* AND ON THE VAX MACHINES (FORTRAN-77) */
13468 /* PASSES STANDARD TEST ON SUN, AT 200K (JULY 1992) */
13469 /* ==================================================================== */
13470 
13471 /* ALSO IN REVISION: DOUBLE PRECISION FOR ALL F.P. VARIABLES */
13472 
13473 /* ==================================================================== */
13474 
13475 /* HISTORY: */
13476 
13477 /* 2001-02-28 THOMAS KUHN: */
13478 /* CHANGE OF LINES */
13479 /* RSILO(I)=DLOG(RSI(I)*1.E80) */
13480 /* TO */
13481 /* RSILO(I)=(DLOG(RSI(I))+80.0D0*DLOG(10.0D0)) */
13482 /* BECAUSE OF OVERFLOW PROBLEMS. */
13483 /* COSMETICS FOR THE CODE TO BE FASTER READABLE. */
13484 /* CHANGE OF OUTPUT FILE NAME. */
13485 /* CHANGE OF OUTPUT FILE CONTENT */
13486 
13487 /* ==================================================================== */
13488 
13489 /* TKS* IMPLICIT REAL*8 (A-H,O-Z) */
13490 
13491 /* TKS INPUT/OUTPUT VARIABLES */
13492 /* REAL T, F */
13493 
13494  ret_val = 0.;
13495 
13496 /* TEMP = TEMPERATURE IN KELVIN, SHOULD BE BETWEEN 50. AND 300. */
13497 /* FNUMIN = LOWEST FREQUENCY IN CM-1, FOR LISTING OF ALPHA(FNU) */
13498 /* FNUMAX = HIGHEST FREQUENCY IN CM-1, FOR LISTING OF ALPHA(FNU) */
13499 /* LINE SHAPE MODELLING WILL BE MOST ACCURATE WITHIN RANGE OF */
13500 /* R-T SPECTRAL INTENSITIES AS 1:100. */
13501 /* DNU = FREQUENCY INCREMENT IN CM-1. DNU SHOULD BE CHOSEN SO */
13502 /* THAT NOT MORE THAN 10 STEPS ARE NEEDED TO GO FROM */
13503 /* FNUMIN TO FNUMAX (ELSE ARRAY DIMENSIONS OF FREQ,ABSCOEF */
13504 /* MUST BE ADJUSTED IN ADDEM). */
13505 
13506 
13507 /* USER: */
13508 /* ----- */
13509 /* EDIT ONLY HERE: TEMP (K), MIN. FREQ. (CM^-1)= FNUMIN, */
13510 /* MAX. FREQ. = FNUMAX, STEP = DNU, SLITWIDTH (CM^-1)=SLIT */
13511 /* (SLIT=4.3 IS EQUIVALENT TO THAT OF VOYAGER SPECTRA, ONLY BOUND BOUND */
13512 /* SPECTRA ARE CONVOLUTED WITH THIS SLITWIDTH, THE FREE FREE SPECTRA */
13513 /* ARE FAR TOO BROAD FOR THE SLITWIDTH FUNCTION TO MATTER, */
13514 /* LEAVE LIKE = 1 (FOR LIKE PAIRS, AS N2-N2) */
13515 /* THE PROGRAM WILL ASSUME EQUILIBRIUM N2, */
13516 /* ALLOWED TEMPERATURE RANGE: 50-300K (DO NOT EXTEND IT BEYOND THESE LIMITS!) */
13517 /* IF QUESTIONS: CONTACT ABORYSOW@NBI.DK */
13518 /* TKS* NF=INT((FNUMAX-FNUMIN)/DNU+0.5)+1 */
13519 /* TKS* IF (NF.GT.10) NF=10 */
13520 /* TKS* FNUMAX=FNUMIN+FLOAT(NF-1)*DNU */
13521 
13522 /* TKS INPUT TEMPERATURE (K) CHECK OF RANGE */
13523  if (t < 50. || t > 300.) {
13524  ostringstream os;
13525  os << "out of T range ( 50<T<300)! return without calc.!" <<"\n";
13526  throw runtime_error(os.str());
13527  goto L999;
13528  }
13529  temp = t;
13530 
13531 /* *********************** INPUT DATA FROM USER *********************** */
13532 /* FNUMIN = MINIMUM FREQENCY [CM^-1] */
13533  fnumin = f / 29979245800.;
13534 /* FNUMAX = MAXIMUM FREQENCY [CM^-1] */
13535  fnumax = fnumin;
13536 /* ONLY ONE FREQUENCY PER CALL */
13537  nf = 1;
13538 /* DEFAULT VALUE OF FREQUENCY STEP [CM^-1] */
13539  dnu = 10.;
13540 /* DEFAULT VALUE */
13541  like = 1;
13542 /* SLIT = SLITWIDTH [CM^-1] */
13543 /* SLIT=4.3 IS EQUIVALENT TO THAT OF VOYAGER SPECTRA, ONLY BOUND BOUND */
13544 /* SPECTRA ARE CONVOLUTED WITH THIS SLITWIDTH, THE FREE FREE SPECTRA */
13545 /* ARE FAR TOO BROAD FOR THE SLITWIDTH FUNCTION TO MATTER. */
13546  slit = 4.3;
13547 /* ******************************************************************** */
13548 
13549 /* TKS* WRITE (6,14) LGAS,TEMP,FNUMIN,FNUMAX,DNU,NF-1 */
13550 /* TKS*14 FORMAT(' ABSORPTION SPECTRA OF ',A5,' AT',F8.1,' K'/ */
13551 /* TKS* $ 1X,43(1H=),/ */
13552 /* TKS* 1' MIN.FREQ.=',F8.1,' CM-1',10X,'MAX.FREQ.=',F8.1,' CM-1',10X, */
13553 /* TKS* 2'FREQ.INCREMENT=',F8.2,' CM-1',5X,'IN',I5,' STEPS'//) */
13554 
13555 
13556  partsum_(&temp);
13557 
13558 
13559 /* THE N2-N2 SPECTRA FOR 50-300K */
13560 /* ================================ */
13561 
13562  x = log(temp);
13563  s__1 = nf;
13564  for (i__ = 1; i__ <= s__1; ++i__) {
13565 /* FREQ(I)=FNUMIN+FLOAT(I-1)*DNU */
13566  freq[i__ - 1] = fnumin;
13567  alfatot[i__ - 1] = 0.;
13568 /* L10: */
13569  abscoef[i__ - 1] = 0.;
13570  }
13571 
13572 
13573 /* ==================================================================== */
13574 
13575 
13576  jj = 1;
13577 L442:
13578 /* L1023: */
13579  ++jj;
13580  if (jj == 42) {
13581  goto L444;
13582  }
13583  goto L442;
13584 /* EB(JJ,IV) JJ-ROTATIONAL LEVEL "L", IV- VIBRATIONAL LEVEL "V"; */
13585 L444:
13586 
13587 
13588 
13589 /* ==================================================================== */
13590 
13591 /* QUADRUPOLAR INDUCTION: (50-300K) LAMBDA1,LAMBDA2,LAMBDA,L=2023&0223 */
13592 /* ------------------------------------------------------------------- */
13593 
13594  eps = 1e-5;
13595  tt[0] = 10.;
13596  bound32_(&temp, rsi, &nsol);
13597  ij = 0;
13598  rslow1 = 0.;
13599  s__1 = nsol;
13600  for (i__ = 1; i__ <= s__1; ++i__) {
13601  ++ij;
13602 /* MOD CAN BE ONLY 0 OR 1 OR 2 */
13603  if (ij % 3 == 0) {
13604  rslow1 = 1.5e-60;
13605  }
13606  if (ij % 3 == 1) {
13607  rslow1 = 1.7e-60;
13608  }
13609  if (ij % 3 == 2) {
13610  rslow1 = 1.6e-60;
13611  }
13612  if (rsi[i__ - 1] < 1e-60) {
13613  rsi[i__ - 1] = rslow1;
13614  }
13615 /* TKS* RSILO(I)=DLOG(RSI(I)*1.D80) */
13616  rsilo[i__ - 1] = log(rsi[i__ - 1]) + log(10.) * 80.;
13617  omeg[i__ - 1] = (double) (i__ - 1) * dx;
13618 /* L88: */
13619  }
13620 
13621 /* L9991: */
13622 
13623  spline_(&nsol, &cs__1, &cs__0, &eps, omeg, rsilo, tt, ss, &si, &nr, rsigg)
13624  ;
13625 
13626  ik1k0 = 1;
13627  ibound = 1;
13628 /* B-C LINESHAPE HERE */
13629 /* THESE VALUES (S,T1,T2) REPLACE VALUES GIVEN IN PAPER (*): */
13630 /* PUBLISHED IN AN ERRATUM, ASTROPHYSICAL JOURNAL, VOL.320, P.437 */
13631 /* (1987) */
13632  s = c_b24 * exp((c_b26 * x + c_b25) * x);
13633  t1 = c_b27 * exp((c_b29 * x + c_b28) * x);
13634  t2 = c_b30 * exp((c_b32 * x + c_b31) * x);
13635  e = 0.;
13636  t3 = 0.;
13637  t4 = 0.;
13638 
13639  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13640  like, &cs__2, &cs__0, &cs__2, &cs__3);
13641  s__1 = nf;
13642  for (i__ = 1; i__ <= s__1; ++i__) {
13643  quad[i__ - 1] = abscoef[i__ - 1];
13644 /* L20: */
13645  alfatot[i__ - 1] = abscoef[i__ - 1] + alfatot[i__ - 1];
13646  }
13647 
13648 
13649 
13650 /* ==================================================================== */
13651 
13652 /* HEXADECAPOLE COMPONENTS: LAMBDA1,LAMBDA2,LAMBDA,L=4045&0445 */
13653 /* ----------------------------------------------------------- */
13654 
13655  bound54_(&temp, rsi, &nsol);
13656  ij = 0;
13657  s__1 = nsol;
13658  for (i__ = 1; i__ <= s__1; ++i__) {
13659  ++ij;
13660 /* MOD CAN BE ONLY 0 OR 1 OR 2 */
13661  if (ij % 3 == 0) {
13662  rslow1 = 1.5e-60;
13663  }
13664  if (ij % 3 == 1) {
13665  rslow1 = 1.7e-60;
13666  }
13667  if (ij % 3 == 2) {
13668  rslow1 = 1.6e-60;
13669  }
13670  if (rsi[i__ - 1] < 1e-60) {
13671  rsi[i__ - 1] = rslow1;
13672  }
13673 /* TKS RSILO(I)=DLOG(RSI(I)*1.E80) */
13674  rsilo[i__ - 1] = log(rsi[i__ - 1]) + log(10.) * 80.;
13675 /* L111: */
13676  omeg[i__ - 1] = (double) (i__ - 1) * dx;
13677  }
13678  spline_(&nsol, &cs__1, &cs__0, &eps, omeg, rsilo, tt, ss, &si, &nr, rsigg)
13679  ;
13680 
13681 /* --------------------------- */
13682 /* TEMPERATURES 50-140K */
13683 /* --------------------------- */
13684 
13685  if (temp >= 140.) {
13686  goto L333;
13687  }
13688 
13689  s = c_b43 * exp((c_b45 * x + c_b44) * x);
13690  e = c_b46 * exp((c_b47 * x + c_b47) * x);
13691  t1 = c_b49 * exp((c_b51 * x + c_b50) * x);
13692  t2 = c_b52 * exp((c_b54 * x + c_b53) * x);
13693  t3 = c_b55 * exp((c_b57 * x + c_b56) * x);
13694  t4 = c_b58 * exp((c_b60 * x + c_b59) * x);
13695 
13696  ik1k0 = 0;
13697  ibound = 1;
13698  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13699  like, &cs__4, &cs__0, &cs__4, &cs__5);
13700  s__1 = nf;
13701  for (i__ = 1; i__ <= s__1; ++i__) {
13702  hexa[i__ - 1] = abscoef[i__ - 1];
13703  /*
13704  s_wsle(&io___25);
13705  do_lio(&c__9, &c__1, " T=50-140K: HEXA(", (ftnlen)17);
13706  do_lio(&c__2, &c__1, (char *)&i__, (ftnlen)sizeof(int));
13707  do_lio(&c__9, &c__1, ") =", (ftnlen)3);
13708  do_lio(&c__5, &c__1, (char *)&abscoef[i__ - 1], (ftnlen)sizeof(
13709  double));
13710  e_wsle();
13711  */
13712 /* L50: */
13713  alfatot[i__ - 1] += abscoef[i__ - 1];
13714  }
13715  goto L334;
13716 
13717 /* --------------------------- */
13718 /* TEMPERATURES 140-300K */
13719 /* --------------------------- */
13720 
13721 L333:
13722  ik1k0 = 0;
13723  ibound = 1;
13724  s = c_b78 * exp((c_b80 * x + c_b79) * x);
13725  e = c_b46 * exp((c_b47 * x + c_b47) * x);
13726  t1 = c_b84 * exp((c_b86 * x + c_b85) * x);
13727  t2 = c_b87 * exp((c_b89 * x + c_b88) * x);
13728  t3 = c_b90 * exp((c_b92 * x + c_b91) * x);
13729  t4 = c_b93 * exp((c_b95 * x + c_b94) * x);
13730 
13731  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13732  like, &cs__4, &cs__0, &cs__4, &cs__5);
13733  s__1 = nf;
13734  for (i__ = 1; i__ <= s__1; ++i__) {
13735  hexa[i__ - 1] = abscoef[i__ - 1];
13736  /*
13737  s_wsle(&io___26);
13738  do_lio(&c__9, &c__1, " T=140-300K: HEXA(", (ftnlen)18);
13739  do_lio(&c__2, &c__1, (char *)&i__, (ftnlen)sizeof(int));
13740  do_lio(&c__9, &c__1, ") =", (ftnlen)3);
13741  do_lio(&c__5, &c__1, (char *)&abscoef[i__ - 1], (ftnlen)sizeof(
13742  double));
13743  e_wsle();
13744  */
13745 /* L550: */
13746  alfatot[i__ - 1] += abscoef[i__ - 1];
13747  }
13748 
13749 /* ==================================================================== */
13750 
13751 /* DOUBLE TRANSITIONS: LAMBDA1,LAMBDA2,LAMBDA,L=2,2,3,3 */
13752 /* ---------------------------------------------------- */
13753 
13754 /* --------------------------- */
13755 /* TEMPERATURES 50-300K */
13756 /* --------------------------- */
13757 
13758 L334:
13759  ik1k0 = 1;
13760  ibound = 0;
13761 /* X S=Y(X,1.19261D-58, -3.78587,0.34024) */
13762  s = c_b112 * exp((c_b114 * x + c_b113) * x);
13763  t1 = c_b115 * exp((c_b117 * x + c_b116) * x);
13764  t2 = c_b118 * exp((c_b120 * x + c_b119) * x);
13765  t3 = 0.;
13766  t4 = 0.;
13767  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13768  like, &cs__2, &cs__2, &cs__3, &cs__3);
13769  s__1 = nf;
13770  for (i__ = 1; i__ <= s__1; ++i__) {
13771  dtrans[i__ - 1] = abscoef[i__ - 1];
13772 /* L650: */
13773  alfatot[i__ - 1] += abscoef[i__ - 1];
13774  }
13775 
13776 /* ==================================================================== */
13777 
13778 /* ANISOTROPIC OVERLAP NEGLECTED (LAMBDA1,LAMBDA2,LAMBDA,L=0212) */
13779 /* SINCE THIS TERM IS EXTREMELY SMALL */
13780 
13781 /* ==================================================================== */
13782 
13783 /* TKS* PRINT 154, FREQ(1),FREQ(NF),FREQ(2)-FREQ(1),TEMP */
13784 /* TKS* PRINT 156, (ALFATOT(I),I=1,NF) */
13785 /* TKS*154 FORMAT(///' ABSORPTION COEFFICIENT ALPHA(FNU), FROM ',F5.1, */
13786 /* TKS* $' CM-1 TO',F7.1,' CM-1, AT',F6.2,' CM-1 INCREMENTS, AT T=', */
13787 /* TKS* $F7.2,' K, IN UNITS OF CM-1 AMAGAT-2'/) */
13788 /* TKS*156 FORMAT(' ',10D13.5) */
13789 /* TKS* OPEN(UNIT=10, FILE='OUT', STATUS='UNKNOWN') */
13790 /* TKS* WRITE(10, 2929) (FREQ(I), ALFATOT(I), I=1, NF) */
13791 /* TKS*C WRITE(10, 2929) (FREQ(I), QUAD(I), HEXA(I) ALFATOT(I), I=1, NF) */
13792 /* TKS*2929 FORMAT(F10.3, E12.4) */
13793 
13794 /* TKS* STOP */
13795 
13796 
13797 
13798 /* TKS FILL OUTPUT VARIABLE */
13799  tksabs[0] = quad[0];
13800  tksabs[1] = hexa[0];
13801  tksabs[2] = dtrans[0];
13802  tksabs[3] = alfatot[0];
13803  ret_val = alfatot[0];
13804 /* TKS print*,'QUAD(1),HEXA(1),DTRANS(1)=',QUAD(1),HEXA(1),DTRANS(1) */
13805 L999:
13806  return ret_val;
13807 } /* n2n2tks_ */
13808 
13809 #undef temp
13810 #undef fnumin
13811 #undef fnumax
13812 #undef dnu
13813 #undef slit
13814 #undef dx
13815 #undef rsilo
13816 #undef omeg
13817 #undef rsi
13818 #undef rsigg
13819 #undef nsol
13820 #undef like
13821 #undef ik1k0
13822 #undef ibound
13823 
13824 #define wnrmax3 (app3a_1.wnrmax3)
13825 #define rsilo (rsilo_1.rsilo)
13826 #define omeg (bba_2.omeg)
13827 #define rsigg (bba_2.rsigg)
13828 #define beta (bba_2.beta)
13829 #define nsol (bbc_1.nsol)
13830 #define ibound (bbb_1.ibound)
13831 #define q1 (n2part_1.q1)
13832 #define wn2 (n2part_1.wn2)
13833 #define b01 (n2part_1.b01)
13834 #define d01 (n2part_1.d01)
13835 #define jrange2 (n2part_1.jrange2)
13836 
13837 
13838 
13839 /* ########################################################################## */
13840 
13841 
13842 /* Subroutine */ int addspec_(double *g0, double *ep, double *
13843  tau1, double *tau2, double *tau5, double *tau6,
13844  double *temp, int *nf, double *freq, double *abscoef,
13845  int * /* mp */, int *like, int *lambda1, int *lambda2,
13846  int *lambda, int * /* lvalue */)
13847 {
13848  /* Initialized data */
13849 
13850  static double closchm = 2.68675484e19;
13851  static double boltzwn = .6950304;
13852  static double hbar = 1.054588757e-27;
13853  static double pi = 3.1415926535898;
13854  static double clight = 2.997925e10;
13855 
13856  /* Format strings */
13857  /*
13858  static char fmt_20[] = "(/\002 LAMBDA1,LAMBDA2, LAMBDA,LVALUE=\002,2i3,2"
13859  "x,2i3,\002 COMPONENT.\002/15x,\002LINE SHAPE PARAMETERS:\002,6d1"
13860  "2.3,5x,\002G(0)=\002,d12.3/)";
13861  */
13862 
13863  /* System generated locals */
13864  int s__1, s__2, s__3, s__4, s__5, s__6;
13865  double d__1, d__2;
13866 
13867  /* Builtin functions */
13868  /*
13869  integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void),
13870  s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
13871  e_wsle(void);
13872  */
13873 
13874  /* Local variables */
13875  int list, jsum = 0;
13876  extern double bgama_(double *, double *, double *,
13877  double *, double *, double *, double *);
13878  int i__, j;
13879  double calib, p;
13880  int i1, j1, i2, j2;
13881  double p1, p2, omega1, omega2;
13882  int ip, jp, iq;
13883  double twopic;
13884  int jplusl, ip1, jp1, ip2, jp2;
13885  double fac, cgs, xbg, wkf, frq, wki;
13886  extern double specfct_(double *, double *, double *,
13887  double *, int *, double *), clebsqr_(int *,
13888  int *, int *);
13889  double cg1s, cg2s;
13890 
13891  /* Fortran I/O blocks */
13892  /*
13893  static cilist io___38 = { 0, 6, 0, fmt_20, 0 };
13894  static cilist io___40 = { 0, 6, 0, 0, 0 };
13895  */
13896 
13897 
13898 /* THIS PROGRAM GENERATES LISTING OF R-T CIA ALFA(OMEGA) */
13899 /* IF EITHER LAMBDA1 OR LAMBDA2 EQUAL TO ZERO - SINGLE TRANSITIONS; */
13900 /* DOUBLE TRANSITIONS ARE ASSUMED OTHERWISE. */
13901 /* LIKE=1 FOR LIKE SYSTEMS (AS H2-H2), SET LIKE=0 ELSE. */
13902 
13903 /* COMMON/BB/OMEG(201),RSI(201),RSIGG(201),NSOL,BETA */
13904 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
13905 /* DIMENSION ABSCOEF(NF),FREQ(NF) */
13906  /* Parameter adjustments */
13907  --abscoef;
13908  --freq;
13909 
13910  /* Function Body */
13911 
13912  twopic = 2. * pi * clight;
13913  if (*like != 1) {
13914  *like = 0;
13915  }
13916 /* TAKE CARE OF FACTOR OF 1.E-60 HERE. */
13917 /* Computing 2nd power */
13918  d__1 = pi;
13919 /* Computing 2nd power */
13920  d__2 = closchm * 1e-30;
13921  calib = twopic * (d__1 * d__1 * 4. / (hbar * 3. * clight)) * (d__2 * d__2)
13922  ;
13923  calib /= (double) (*like + 1);
13924  beta = 1. / (boltzwn * *temp);
13925  list = *nf;
13926  s__1 = list;
13927  for (i__ = 1; i__ <= s__1; ++i__) {
13928 /* L88: */
13929  abscoef[i__] = 0.;
13930  }
13931 
13932 /* ROTATIONAL SPECTRUM FOR THE DETAILED LISTING ******************* */
13933  /*
13934  s_wsfe(&io___38);
13935  do_fio(&c__1, (char *)&(*lambda1), (ftnlen)sizeof(int));
13936  do_fio(&c__1, (char *)&(*lambda2), (ftnlen)sizeof(int));
13937  do_fio(&c__1, (char *)&(*lambda), (ftnlen)sizeof(int));
13938  do_fio(&c__1, (char *)&(*lvalue), (ftnlen)sizeof(int));
13939  do_fio(&c__1, (char *)&(*g0), (ftnlen)sizeof(double));
13940  do_fio(&c__1, (char *)&(*ep), (ftnlen)sizeof(double));
13941  do_fio(&c__1, (char *)&(*tau1), (ftnlen)sizeof(double));
13942  do_fio(&c__1, (char *)&(*tau2), (ftnlen)sizeof(double));
13943  do_fio(&c__1, (char *)&(*tau5), (ftnlen)sizeof(double));
13944  do_fio(&c__1, (char *)&(*tau6), (ftnlen)sizeof(double));
13945  d__1 = *g0 * bgama_(&c_b47, tau1, tau2, ep, tau5, tau6, temp);
13946  do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(double));
13947  e_wsfe();
13948  */
13949  if (*lambda1 == 0 || *lambda2 == 0) {
13950  goto L152;
13951  }
13952  jplusl = jrange2 + max(*lambda1,*lambda2);
13953 
13954  /*
13955  s_wsle(&io___40);
13956  do_lio(&c__9, &c__1, "LAMBDA1,LAMBDA2,ABSCOEF(1)=", (ftnlen)27);
13957  do_lio(&c__2, &c__1, (char *)&(*lambda1), (ftnlen)sizeof(int));
13958  do_lio(&c__2, &c__1, (char *)&(*lambda2), (ftnlen)sizeof(int));
13959  do_lio(&c__5, &c__1, (char *)&abscoef[1], (ftnlen)sizeof(double));
13960  e_wsle();
13961  */
13962  jsum = 0;
13963  s__1 = jrange2;
13964  for (i1 = 1; i1 <= s__1; ++i1) {
13965  j1 = i1 - 1;
13966  s__2 = jplusl;
13967  for (ip1 = 1; ip1 <= s__2; ++ip1) {
13968  jp1 = ip1 - 1;
13969  cg1s = clebsqr_(&j1, lambda1, &jp1);
13970  if (cg1s <= 0.) {
13971  goto L150;
13972  } else {
13973  goto L130;
13974  }
13975 L130:
13976  s__3 = j1 * (j1 + 1);
13977  p1 = (double) (2 * j1 + 1) * wn2[1 + j1 % 2 - 1] * exp(
13978  -1.4387859 / *temp * ((b01 - (double) s__3 * d01) * (
13979  double) s__3)) / q1;
13980  ++jsum;
13981  s__3 = jp1 * ip1;
13982  s__4 = j1 * i1;
13983  omega1 = (b01 - (double) s__3 * d01) * (double) s__3 - (
13984  b01 - (double) s__4 * d01) * (double) s__4;
13985  s__3 = jrange2;
13986  for (i2 = 1; i2 <= s__3; ++i2) {
13987  j2 = i2 - 1;
13988  s__4 = jplusl;
13989  for (ip2 = 1; ip2 <= s__4; ++ip2) {
13990  jp2 = ip2 - 1;
13991  cg2s = clebsqr_(&j2, lambda2, &jp2);
13992  if (cg2s <= 0.) {
13993  goto L148;
13994  } else {
13995  goto L132;
13996  }
13997 L132:
13998  s__5 = j2 * (j2 + 1);
13999  p2 = (double) (2 * j2 + 1) * wn2[1 + j2 % 2 - 1] *
14000  exp(-1.4387859 / *temp * ((b01 - (double)
14001  s__5 * d01) * (double) s__5)) / q1;
14002  s__5 = jp2 * ip2;
14003  s__6 = j2 * i2;
14004  omega2 = (b01 - (double) s__5 * d01) * (double)
14005  s__5 - (b01 - (double) s__6 * d01) * (
14006  double) s__6;
14007  fac = calib * p1 * p2 * cg1s * cg2s;
14008  s__5 = list;
14009  for (i__ = 1; i__ <= s__5; ++i__) {
14010  frq = freq[i__] - omega1 - omega2;
14011  wki = freq[i__] * (1. - exp(-beta * freq[i__]));
14012  wkf = wki * fac;
14013  xbg = *g0 * bgama_(&frq, tau1, tau2, ep, tau5, tau6,
14014  temp);
14015  if (ibound == 0) {
14016  goto L555;
14017  }
14018  if (abs(frq) <= wnrmax3) {
14019  xbg += specfct_(&frq, omeg, rsilo, rsigg, &nsol, &
14020  beta);
14021  }
14022 L555:
14023  abscoef[i__] += xbg * wkf;
14024 /* L146: */
14025  }
14026 L148:
14027  ;
14028  }
14029  }
14030 L150:
14031  ;
14032  }
14033  }
14034  goto L2222;
14035 /* SINGLE TRANSITIONS AT NITROGEN'S ROTATIONAL FREQUENCIES */
14036 /* ======================================================= */
14037 L152:
14038  jplusl = jrange2 + *lambda;
14039  s__2 = jrange2;
14040  for (i__ = 1; i__ <= s__2; ++i__) {
14041  j = i__ - 1;
14042  s__1 = jplusl;
14043  for (ip = 1; ip <= s__1; ++ip) {
14044  jp = ip - 1;
14045  cgs = clebsqr_(&j, lambda, &jp);
14046  if (cgs <= 0.) {
14047  goto L200;
14048  } else {
14049  goto L210;
14050  }
14051 L210:
14052  s__4 = j * (j + 1);
14053  p = (double) (2 * j + 1) * wn2[1 + j % 2 - 1] * exp(
14054  -1.4387859 / *temp * ((b01 - (double) s__4 * d01) * (
14055  double) s__4)) / q1;
14056  ++jsum;
14057  s__4 = jp * ip;
14058  s__3 = j * i__;
14059  omega1 = (b01 - (double) s__4 * d01) * (double) s__4 - (
14060  b01 - (double) s__3 * d01) * (double) s__3;
14061  fac = calib * p * cgs;
14062  s__4 = list;
14063  for (iq = 1; iq <= s__4; ++iq) {
14064  frq = freq[iq] - omega1;
14065 /* XWKI=FREQ(IQ)*(1.-EXP(-BETA*FREQ(IQ))) */
14066  wki = freq[iq] * (1. - exp(-beta * freq[iq]));
14067  wkf = wki * fac;
14068  xbg = *g0 * bgama_(&frq, tau1, tau2, ep, tau5, tau6, temp);
14069  if (ibound == 0) {
14070  goto L444;
14071  }
14072  if (abs(frq) <= wnrmax3) {
14073  xbg += specfct_(&frq, omeg, rsilo, rsigg, &nsol, &beta);
14074  }
14075 L444:
14076  abscoef[iq] += xbg * wkf;
14077 /* L199: */
14078  }
14079 L200:
14080  ;
14081  }
14082  }
14083 
14084 L2222:
14085 /* TKS 2222 PRINT 44,(ABSCOEF(I),I=1,LIST) */
14086 /* L44: */
14087  return 0;
14088 } /* addspec_ */
14089 
14090 #undef wnrmax3
14091 #undef rsilo
14092 #undef omeg
14093 #undef rsigg
14094 #undef beta
14095 #undef nsol
14096 #undef ibound
14097 #undef q1
14098 #undef wn2
14099 #undef b01
14100 #undef d01
14101 #undef jrange2
14102 
14103 #define q (n2part_2.q)
14104 #define wn2 (n2part_2.wn2)
14105 #define b0 (n2part_2.b0)
14106 #define d0 (n2part_2.d0)
14107 #define jrange1 (n2part_2.jrange1)
14108 
14109 /* Subroutine */ int partsum_(double *temp)
14110 {
14111  /* System generated locals */
14112  int s__1;
14113 
14114  /* Local variables */
14115  int j;
14116  double dq;
14117 
14118 /* N2 ROTATIONAL PARTITION SUM Q = Q(T). */
14119 
14120 
14121 
14122 /* Q,B0,D0,WN2 - PARTITION FCT., ROT.CONSTANTS, WEIGHTS FOR N2 */
14123  q = 0.;
14124  j = 0;
14125 L50:
14126  s__1 = j * (j + 1);
14127  dq = (double) (2 * j + 1) * wn2[1 + j % 2 - 1] * exp(-1.4387859 * ((
14128  b0 - (double) s__1 * d0) * (double) s__1) / *temp);
14129  q += dq;
14130  ++j;
14131  if (dq > q / 900.) {
14132  goto L50;
14133  }
14134  jrange1 = j;
14135 /* TKS PRINT 30, Q, JRANGE1 */
14136 
14137 /* L30: */
14138  return 0;
14139 } /* partsum_ */
14140 
14141 #undef q
14142 #undef wn2
14143 #undef b0
14144 #undef d0
14145 #undef jrange1
14146 
14147 #define slit (app3a_1.slit)
14148 #define dx (app3a_1.dx)
14149 #define wnrmax3 (app3a_1.wnrmax3)
14150 #define nsri (app3b_1.nsri)
14151 #define ns (app3b_1.ns)
14152 #define nsriup (app3b_1.nsriup)
14153 #define rsi (bl3_1.rsi)
14154 
14155 /* Subroutine */ int profile_(double *x, double *y)
14156 {
14157  /* System generated locals */
14158  int s__1;
14159 
14160  /* Local variables */
14161  int i__;
14162  double slope;
14163  int n1;
14164  double x0;
14165  int nc;
14166  double dr;
14167  int no;
14168  double xi;
14169  int nu;
14170 
14171 /* A TRIANGULAR SLIT FUNCTION IS USED. */
14172 
14173 
14174 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14175 
14176  if (*y < 0.) {
14177  goto L105;
14178  } else if (*y == 0) {
14179  goto L106;
14180  } else {
14181  goto L1;
14182  }
14183 L1:
14184  x0 = nsri + 1. + *x / dx;
14185  nc = (int) x0;
14186  n1 = nc + 1;
14187  slope = *y / slit;
14188  nu = (int) (x0 - ns);
14189  if (nu < 1) {
14190  nu = 1;
14191  }
14192  if (nu > nsriup) {
14193  return 0;
14194  }
14195  no = (int) (x0 + ns);
14196  if (no > nsriup) {
14197  no = nsriup;
14198  }
14199  if (no < 1) {
14200  return 0;
14201  }
14202  if (nc > nsriup) {
14203  nc = nsriup;
14204  }
14205  if (nc <= 1) {
14206  goto L101;
14207  }
14208  s__1 = nc;
14209  for (i__ = nu; i__ <= s__1; ++i__) {
14210  xi = (i__ - 1.) * dx - wnrmax3;
14211  dr = slope * (xi - (*x - slit));
14212  if (dr <= 0.) {
14213  goto L100;
14214  }
14215  rsi[i__ - 1] += dr;
14216 L100:
14217  ;
14218  }
14219 L101:
14220 
14221  if (nc >= nsriup) {
14222  return 0;
14223  }
14224  if (n1 < 1) {
14225  n1 = 1;
14226  }
14227  s__1 = no;
14228  for (i__ = n1; i__ <= s__1; ++i__) {
14229  xi = (i__ - 1.) * dx - wnrmax3;
14230  dr = *y - slope * (xi - *x);
14231  if (dr <= 0.) {
14232  goto L102;
14233  }
14234  rsi[i__ - 1] += dr;
14235 L102:
14236  ;
14237  }
14238  return 0;
14239 L105:
14240 /* TKS 105 PRINT 10,SLIT */
14241 /* TKS 10 FORMAT(/' A TRIANGULAR SLIT FUNCTION OF',F6.3,' CM-1 HALFWIDTH IS */
14242 /* TKS ' USED'/) */
14243 L106:
14244  return 0;
14245 } /* profile_ */
14246 
14247 #undef slit
14248 #undef dx
14249 #undef wnrmax3
14250 #undef nsri
14251 #undef ns
14252 #undef nsriup
14253 #undef rsi
14254 
14255 
14256 /* X FUNCTION SPECFCT(FREQ,OMEGA,PHI,PHI2,N,RTEMP) */
14257 
14258 double specfct_(double *freq, double *omega, double *phi,
14259  double *phi2, int *n, double *rtemp)
14260 {
14261  /* System generated locals */
14262  double ret_val;
14263 
14264  /* Local variables */
14265  double tfac, f, gp, si;
14266  int nr;
14267  extern /* Subroutine */ int ixpolat_(int *, int *, int *,
14268  double *, double *, double *, double *,
14269  double *, double *, int *, double *);
14270 
14271 
14272 /* THIS INTERPOLATES THE SPECTRAL FUNCTION PHI(FREQ) DEFINED AT */
14273 /* OMEGA(N) AS PHI(N). PHI2 IS THE SECOND DERIVATIVE AT OMEGA */
14274 /* WHICH MUST BE OBTAINED FIRST (USE SPLINE FOR THAT PURPOSE). */
14275 /* RTEMP IS THE RECIPROCAL TEMPERATURE IN CM-1 UNITS. */
14276 /* NOTE THAT WE INTERPOLATE 1.E80 TIMES THE LOGARITHM OF PHI(OMEGA) */
14277 /* NOTE THAT IN GSO'S REVISION, THIS FACTOR IS REMOVED. */
14278 /* (REVISION MODIFIED) */
14279 
14280 
14281 
14282 /* PRINT*,'FREQ =',FREQ */
14283 /* PRINT*,'OMEGA=',OMEGA */
14284 /* PRINT*,'RTEMP=',RTEMP */
14285 /* PRINT*,'PHI =',PHI */
14286 /* PRINT*,'PHI2 =',PHI2 */
14287  /* Parameter adjustments */
14288  --phi2;
14289  --phi;
14290  --omega;
14291 
14292  /* Function Body */
14293  tfac = 0.;
14294  f = *freq;
14295  if (f >= 0.) {
14296  goto L20;
14297  } else {
14298  goto L10;
14299  }
14300 L10:
14301  f = abs(f);
14302  tfac = -(*rtemp) * f;
14303 L20:
14304  if (f <= omega[*n]) {
14305  goto L30;
14306  }
14307  ret_val = exp(-(phi[*n - 1] - phi[*n]) * (f - omega[*n]) / (omega[*n] -
14308  omega[*n - 1]) + phi[*n] + tfac) * 1e-80;
14309 /* print*,' (A) SPECFCT=',SPECFCT */
14310 /* X SPECFCT=DEXP(-(PHI(N-1)-PHI(N))*(F-OMEGA(N))/ */
14311 /* X $(OMEGA(N)-OMEGA(N-1))+PHI(N)+TFAC) */
14312  return ret_val;
14313 /* 30 PRINT*,'SI,NR,PHI2=', */
14314 /* & SI,NR,PHI2 */
14315 /* CALL IXPOLAT(N,1,0,1.D-6,OMEGA,PHI,F,GP,SI,NR,PHI2) */
14316 L30:
14317  ixpolat_(n, &cs__1, &cs__0, &c_b183, &omega[1], &phi[1], &f, &gp, &si, &
14318  nr, &phi2[1]);
14319  ret_val = exp(tfac + gp) * 1e-80;
14320 /* X SPECFCT=DEXP(TFAC+GP) */
14321 /* print*,' (B) GP,SPECFCT=',GP,SPECFCT */
14322 
14323  return ret_val;
14324 } /* specfct_ */
14325 #define slit (app3a_1.slit)
14326 #define dx (app3a_1.dx)
14327 #define wnrmax3 (app3a_1.wnrmax3)
14328 #define nsri (app3b_1.nsri)
14329 #define ns (app3b_1.ns)
14330 #define nsriup (app3b_1.nsriup)
14331 #define eb (energ_1.eb)
14332 #define niv (energ_1.niv)
14333 #define nlines (dimer_1.nlines)
14334 #define rsibb (bl3_2.rsibb)
14335 #define ldelvi (bbbb_2.ldelvi)
14336 #define ivi (bbbb_2.ivi)
14337 #define ivip (bbbb_2.ivip)
14338 #define ldelel (bbbb_2.ldelel)
14339 #define ll (bbbb_2.ll)
14340 #define llp (bbbb_2.llp)
14341 
14342 /* Subroutine */ int bound32_(double *temp, double *rsi, int *
14343  nsol)
14344 {
14345  /* Initialized data */
14346 
14347  static int ldelvis[63] = { 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,
14348  1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,
14349  3,4,4,4,4,4,4,4,4 };
14350  static int ivis[63] = { 0,0,1,1,2,2,3,3,4,4,0,0,0,0,1,1,1,1,2,2,2,2,
14351  3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,1,2,0,1,2,0,1,0,1,0,1,2,
14352  0,1,0,1,0,1,0,1 };
14353  static int ivips[63] = { 0,0,1,1,2,2,3,3,4,4,1,1,1,1,2,2,2,2,3,3,3,3,
14354  4,4,4,4,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,3,4,5,3,4,5,3,4,3,4,3,4,5,
14355  4,5,4,5,4,5,4,5 };
14356  static int ldelels[63] = { 1,3,1,3,1,3,1,3,1,3,-3,-1,1,3,-3,-1,1,3,
14357  -3,-1,1,3,3,1,-1,-3,-3,-1,1,3,-3,-1,1,3,-3,-1,1,3,-1,-3,1,3,1,1,1,
14358  -1,-1,-1,-3,-3,3,3,-3,-3,-3,-3,-3,3,3,1,1,-1,-1 };
14359  static double as[63] = { 4.4844e-40,4.4356e-40,2.9345e-40,2.885e-40,
14360  1.6441e-40,1.5899e-40,7.2882e-41,6.7748e-41,1.0378e-41,1.3041e-42,
14361  1.5006e-41,1.537e-41,1.6139e-41,1.7143e-41,1.9985e-41,2.0169e-41,
14362  2.0994e-41,2.2094e-41,1.636e-41,1.6281e-41,1.6714e-41,1.7326e-41,
14363  8.0425e-42,8.0862e-42,8.0093e-42,8.1366e-42,2.4471e-42,2.5406e-42,
14364  2.6629e-42,2.8064e-42,4.6227e-42,4.715e-42,4.8513e-42,5.0133e-42,
14365  3.9968e-42,3.984e-42,3.981e-42,3.9687e-42,1.1806e-42,1.3458e-42,
14366  3.8746e-42,3.9219e-42,7.3334e-43,1.339e-42,1.3041e-42,7.1401e-43,
14367  1.3461e-42,6.5776e-43,6.9847e-43,1.3517e-42,7.5545e-43,1.3268e-42,
14368  6.9847e-43,1.3517e-42,7.464e-43,2.1322e-43,2.6037e-43,2.0823e-43,
14369  2.0632e-43,2.1067e-43,2.0531e-43,2.1218e-43,2.3006e-43 };
14370  static double bs[63] = { 4.3e-4,4.6e-4,8.3e-4,8.9e-4,.0017,.00186,
14371  .0041,.00457,0.,0.,9.99e-4,5.23e-4,1.49e-4,-1.68e-4,.001837,
14372  .001153,6.6e-4,2.54e-4,.003603,.002677,.002101,.001738,.00595,
14373  .006843,0.,.007035,.001025,6.42e-4,2.54e-4,-1.64e-4,.002342,
14374  .001975,.00164,.001328,.004943,.004999,.005461,.006839,0.,.010993,
14375  0.,0.,.001367,.005262,0.,.001601,.00451,0.,.001828,.004175,.04816,
14376  .007033,.001828,.004175,.009338,.003733,.008508,.006979,0.,
14377  .005035,0.,.004169,0. };
14378  static double twopic = 1.88365183e11;
14379  static double pi = 3.141592654;
14380 
14381  /* System generated locals */
14382  int s__1;
14383  double d__1;
14384 
14385  /* Local variables */
14386  double alfa;
14387  int nnii, nsol2;
14388  double a, b;
14389  int i__, l, n;
14390  double stoke, stoki, am, pf;
14391  int lp;
14392  double rm;
14393  int nr, iv;
14394  double stokip;
14395  int ivp;
14396  extern double clebsqr_(int *, int *, int *);
14397  extern /* Subroutine */ int profile_(double *, double *);
14398 
14399 
14400 #define eb_ref(a_1,a_2) eb[(a_2)*41 + a_1 - 42]
14401 
14402 
14403 
14404 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14405 
14406 
14407 /* STORED VALUES */
14408  /* Parameter adjustments */
14409  --rsi;
14410 
14411  /* Function Body */
14412 
14413 
14414 /* EB(I,K) - BOUND ENERGIES */
14415 /* AM = (MTX.EL. (L,BETA,L') )**2 */
14416 /* M(L,L',V,V') OF PAPER (*) ARE TO BE CORRECTED: */
14417 /* M(L,L',V,V') = AM * (2L+1) * C(L,3,L')**2 */
14418 /* NSRI - HOW MANY POINTS FOR B-B SPECTRAL FUNCTION TO BE GIVEN */
14419 /* WNRMAX3 - THE FREQUENCY RANGE OF B-B CONTRIBUTION */
14420 /* SLIT- THE HALFWIDTH OF THE SPECTRAL PROFILE CONVOLUTED WITH */
14421 /* B-B SPECTRUM, IN [CM-1]. */
14422 /* A,B, COEFFICIENTS , EQ. 7, A.BORYSOW, L.FROMMHOLD, */
14423 /* AP. J. VOL.311, 1043-1057, (1986) */
14424 
14425  nsri = 190;
14426  wnrmax3 = 45.;
14427  nsriup = (nsri << 1) + 1;
14428  dx = wnrmax3 / (double) nsri;
14429  ns = (int) (slit / dx);
14430 
14431  for (i__ = 1; i__ <= 401; ++i__) {
14432 /* L300: */
14433  rsibb[i__ - 1] = 0.;
14434  }
14435 
14436  alfa = 1. / (*temp * .69519);
14437  rm = 2.32498211e-23;
14438 /* RM - REDUCED MASS FOR N2-N2 */
14439 
14440  d__1 = rm * 1.380662e-16 * *temp * 2. * pi / 4.3906208382975998e-53;
14441  pf = pow(d__1, c_b186);
14442 /* SCALE DOWN BY 1.D60 */
14443  pf *= 1e-60;
14444 
14445  nr = 0;
14446 L555:
14447  ++nr;
14448  ldelvi = ldelvis[nr - 1];
14449  ivi = ivis[nr - 1];
14450  ivip = ivips[nr - 1];
14451  ldelel = ldelels[nr - 1];
14452  a = as[nr - 1];
14453  b = bs[nr - 1];
14454 /* WRITE (6,334) LDELVI,IVI,IVIP, LDELEL,A,B */
14455 /* L334: */
14456 
14457 /* LDELVI=DELTA(V)=V'-V */
14458 /* IVI = V; IVIP = V' */
14459 /* LDELEL = DELTA(L) = L'-L */
14460 
14461  iv = ivi + 1;
14462  ivp = ivip + 1;
14463 /* THESE ARE ENERGY COLUMNS (V, V') */
14464 
14465  nnii = niv[iv - 1];
14466 
14467  s__1 = nnii;
14468  for (l = 1; l <= s__1; ++l) {
14469 /* LOOP OVER INITIAL L-VALUES... */
14470 
14471  am = a * exp(-b * (double) ((l - 1) * l));
14472 /* L - NUMBER OF ROW, (L-1) - ROTATIONAL LEVEL */
14473  lp = l + ldelel;
14474  ll = l - 1;
14475  llp = lp - 1;
14476 /* LL,LLP ARE INITIAL L AND FINAL L' ANGULAR MOMENTUM QUANTUM NUMBERS */
14477 
14478  if (lp > niv[ivp - 1] || lp < 1) {
14479  goto L20;
14480  }
14481  if (eb_ref(lp, ivp) == 0.) {
14482  goto L20;
14483  }
14484  if (eb_ref(l, iv) == 0.) {
14485  goto L20;
14486  }
14487  stoke = eb_ref(lp, ivp) - eb_ref(l, iv);
14488 
14489  stoki = am * exp(-alfa * eb_ref(l, iv)) / pf * (double) ((ll << 1)
14490  + 1) * clebsqr_(&ll, &cs__3, &llp);
14491 
14492  profile_(&stoke, &stoki);
14493  if (stoki > 0.) {
14494  ++nlines;
14495  }
14496 
14497  stokip = am * exp(-alfa * eb_ref(lp, ivp)) / pf * (double) ((llp
14498  << 1) + 1) * clebsqr_(&llp, &cs__3, &ll);
14499 
14500  d__1 = -stoke;
14501  profile_(&d__1, &stokip);
14502  if (stokip > 0.) {
14503  ++nlines;
14504  }
14505 
14506 L20:
14507  ;
14508  }
14509  if (nr == 63) {
14510  goto L56;
14511  }
14512  goto L555;
14513 L56:
14514 
14515 /* 32 ENTRIES FOR (3220)+(3202) IN TABLE 6, 63 IN ALL: */
14516 /* DATA EXPANDED AND INCLUDE NOW ALL POSSIBLE B-B TRANSITIONS */
14517 
14518  s__1 = nsriup;
14519  for (n = 1; n <= s__1; ++n) {
14520 /* L90: */
14521  rsibb[n - 1] = rsibb[n - 1] / twopic / slit;
14522  }
14523 
14524  *nsol = nsri + 1;
14525  nsol2 = *nsol + 1;
14526 /* RSI - CONTRIBUTION FOR POSITIVE FREQUENCY SHIFTS */
14527 
14528  s__1 = *nsol;
14529  for (i__ = 1; i__ <= s__1; ++i__) {
14530 /* L22: */
14531  rsi[i__] = rsibb[*nsol - 1 + i__ - 1];
14532  }
14533 
14534 /* PRINT 999, (RSI(I),I=1,NSOL) */
14535 /* L999: */
14536 
14537  return 0;
14538 } /* bound32_ */
14539 
14540 #undef slit
14541 #undef dx
14542 #undef wnrmax3
14543 #undef nsri
14544 #undef ns
14545 #undef nsriup
14546 #undef eb
14547 #undef niv
14548 #undef nlines
14549 #undef rsibb
14550 #undef ldelvi
14551 #undef ivi
14552 #undef ivip
14553 #undef ldelel
14554 #undef ll
14555 #undef llp
14556 
14557 
14558 #undef eb_ref
14559 
14560 #define slit (app3a_1.slit)
14561 #define dx (app3a_1.dx)
14562 #define wnrmax3 (app3a_1.wnrmax3)
14563 #define nsri (app3b_1.nsri)
14564 #define ns (app3b_1.ns)
14565 #define nsriup (app3b_1.nsriup)
14566 #define eb (energ_1.eb)
14567 #define niv (energ_1.niv)
14568 #define nlines (dimer_1.nlines)
14569 #define rsibb (bl3_2.rsibb)
14570 
14571 /* Subroutine */ int bound54_(double *temp, double *rsi, int *
14572  nsol)
14573 {
14574  /* Initialized data */
14575 
14576  static int ldelvis[54] = { 0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,
14577  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
14578  };
14579  static int ivis[54] = { 0,0,0,1,1,1,2,2,2,3,3,3,0,0,0,0,0,0,1,1,1,1,
14580  1,1,2,2,2,2,2,2,3,3,3,3,3,3,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2 };
14581  static int ivips[54] = { 0,0,0,1,1,1,2,2,2,3,3,3,1,1,1,1,1,1,2,2,2,2,
14582  2,2,3,3,3,3,3,3,4,4,4,4,4,4,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4 };
14583  static int ldelels[54] = { 1,3,5,1,3,5,1,3,5,1,3,5,-5,-3,-1,1,3,5,-5,
14584  -3,-1,1,3,5,-5,-3,-1,1,3,5,-5,-3,-1,1,3,5,-5,-3,-1,1,3,5,-5,-3,-1,
14585  1,3,5,-5,-3,-1,1,3,5 };
14586  static double as[54] = { 7.9332e-42,7.8207e-42,7.7235e-42,4.5815e-42,
14587  4.4834e-42,4.4059e-42,2.173e-42,2.0824e-42,2.025e-42,7.7222e-43,
14588  7.0351e-43,6.6815e-43,4.9611e-43,5.2232e-43,5.2979e-43,5.4652e-43,
14589  5.6827e-43,5.9277e-43,5.733e-43,6.062e-43,6.0862e-43,6.2104e-43,
14590  6.3809e-43,6.5698e-43,3.9501e-43,4.1599e-43,4.1033e-43,4.1097e-43,
14591  4.1339e-43,4.153e-43,1.5858e-43,1.5976e-43,1.5478e-43,1.5066e-43,
14592  1.4554e-43,1.3848e-43,9.9241e-44,1.0109e-43,1.0396e-43,1.0758e-43,
14593  1.1176e-43,1.1636e-43,1.646e-43,1.647e-43,1.6617e-43,1.6837e-43,
14594  1.7085e-43,1.7327e-43,1.1797e-43,1.1593e-43,1.1405e-43,1.1174e-43,
14595  1.0853e-43,1.0401e-43 };
14596  static double bs[54] = { 6.12e-4,6.35e-4,6.77e-4,.001137,.001201,
14597  .001341,.00229,.002449,.00287,.005426,.005876,.00745,.001,8.83e-4,
14598  6.09e-4,3.92e-4,2.07e-4,3.7e-5,.001625,.001624,.001305,.001084,
14599  9.27e-4,8.21e-4,.002978,.003273,.002994,.002954,.003153,.003668,
14600  .005799,.006423,.006733,.00796,.010937,.019179,.001229,9.93e-4,
14601  7.67e-4,5.43e-4,3.09e-4,5.1e-5,.002456,.0023,.00221,.002193,
14602  .002273,.002506,.004556,.004825,.005454,.006725,.009431,.016672 };
14603  static double twopic = 1.88365183e11;
14604  static double pi = 3.141592654;
14605 
14606  /* System generated locals */
14607  int s__1;
14608  double d__1;
14609 
14610  /* Local variables */
14611  double alfa;
14612  int nnii, ivip, nsol2;
14613  double a, b;
14614  int i__, l, n;
14615  double stoke, stoki, am, pf;
14616  int ll, lp;
14617  double rm;
14618  int nr, ldelel, iv, ldelvi;
14619  double stokip;
14620  int ivi, llp, ivp;
14621  extern double clebsqr_(int *, int *, int *);
14622  extern /* Subroutine */ int profile_(double *, double *);
14623 
14624 
14625 #define eb_ref(a_1,a_2) eb[(a_2)*41 + a_1 - 42]
14626 
14627 
14628 
14629 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14630 /* STORED VALUES */
14631 
14632 /* TKS THIS DATA STRUCTURE HAS 55 ENTRIES AND NOT 54!! */
14633 /* TKS DATA LDELVIS /0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, */
14634 /* TKS & 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2, */
14635 /* TKS & 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2/ */
14636 /* TKS WE HAVE SSKIPPED THE LAST "2" IN THIS DATA STATEMENT */
14637  /* Parameter adjustments */
14638  --rsi;
14639 
14640  /* Function Body */
14641 
14642 
14643 
14644 
14645 
14646 
14647 
14648 
14649  nsri = 190;
14650  wnrmax3 = 47.;
14651  nsriup = (nsri << 1) + 1;
14652  dx = wnrmax3 / (double) nsri;
14653  ns = (int) (slit / dx);
14654 
14655  for (i__ = 1; i__ <= 401; ++i__) {
14656 /* L300: */
14657  rsibb[i__ - 1] = 0.;
14658  }
14659  alfa = 1. / (*temp * .69519);
14660  rm = 2.32498211e-23;
14661 /* RM - REDUCED MASS FOR N2-N2 */
14662 
14663  d__1 = rm * 1.380662e-16 * *temp * 2. * pi / 4.3906208382975998e-53;
14664  pf = pow(d__1, c_b186);
14665 /* SCALE DOWNWARD BY 1.D60 */
14666  pf *= 1e-60;
14667 
14668  nr = 0;
14669 L555:
14670  ++nr;
14671  ldelvi = ldelvis[nr - 1];
14672  ivi = ivis[nr - 1];
14673  ivip = ivips[nr - 1];
14674  ldelel = ldelels[nr - 1];
14675  a = as[nr - 1];
14676  b = bs[nr - 1];
14677 /* WRITE (6,334) LDELVI,IVI,IVIP, LDELEL,A,B */
14678 /* L334: */
14679 /* LDELVI=DELTA(V)=V'-V */
14680 /* IVI = V */
14681 /* LDELEL = DELTA(L) = L'-L */
14682 
14683  iv = ivi + 1;
14684  ivp = ivip + 1;
14685  nnii = niv[iv - 1];
14686  s__1 = nnii;
14687  for (l = 1; l <= s__1; ++l) {
14688  am = a * exp(-b * (double) (l * (l + 1)));
14689  lp = l + ldelel;
14690  ll = l - 1;
14691  llp = lp - 1;
14692  if (lp > niv[ivp - 1] || lp < 1) {
14693  goto L20;
14694  }
14695  if (eb_ref(lp, ivp) == 0.) {
14696  goto L20;
14697  }
14698  if (eb_ref(l, iv) == 0.) {
14699  goto L20;
14700  }
14701 
14702  stoke = eb_ref(lp, ivp) - eb_ref(l, iv);
14703  stoki = am * exp(-alfa * eb_ref(l, iv)) / pf * (double) ((ll << 1)
14704  + 1) * clebsqr_(&ll, &cs__5, &llp);
14705  profile_(&stoke, &stoki);
14706  if (stoki > 0.) {
14707  ++nlines;
14708  }
14709  stokip = am * exp(-alfa * eb_ref(lp, ivp)) / pf * (double) ((llp
14710  << 1) + 1) * clebsqr_(&llp, &cs__5, &ll);
14711  d__1 = -stoke;
14712  profile_(&d__1, &stokip);
14713  if (stokip > 0.) {
14714  ++nlines;
14715  }
14716 L20:
14717  ;
14718  }
14719  if (nr == 54) {
14720  goto L56;
14721  }
14722 
14723  goto L555;
14724 L56:
14725 /* 54 ENTRIES FOR (5440)=(5404) IN TABLE 6 */
14726 
14727  s__1 = nsriup;
14728  for (n = 1; n <= s__1; ++n) {
14729 /* L90: */
14730  rsibb[n - 1] = rsibb[n - 1] / twopic / slit;
14731  }
14732 
14733  *nsol = nsri + 1;
14734  nsol2 = *nsol + 1;
14735 
14736  s__1 = *nsol;
14737  for (i__ = 1; i__ <= s__1; ++i__) {
14738 /* L22: */
14739  rsi[i__] = rsibb[*nsol - 1 + i__ - 1];
14740  }
14741 
14742 /* PRINT 999, (RSI(I),I=1,NSOL) */
14743 /* L999: */
14744 
14745  return 0;
14746 } /* bound54_ */
14747 
14748 #undef slit
14749 #undef dx
14750 #undef wnrmax3
14751 #undef nsri
14752 #undef ns
14753 #undef nsriup
14754 #undef eb
14755 #undef niv
14756 #undef nlines
14757 #undef rsibb
14758 
14759 
14760 #undef eb_ref
14761 
14762 
14763 double clebsqr_0_(int n__, int *l, int *lambda, int *lp)
14764 {
14765  /* System generated locals */
14766  int s__1, s__2;
14767  double ret_val, d__1;
14768 
14769  /* Local variables */
14770  extern double fctl_(int *);
14771  double f;
14772  int i__;
14773  double p;
14774  int i0, i1;
14775  double fc;
14776 
14777 /* SQUARE OF CLEBSCH-GORDAN COEFFICIENT (L,LAMBDA,0,0;LP,0) */
14778 /* FOR INTEGER ARGUMENTS ONLY */
14779 /* NOTE THAT LAMBDA SHOULD BE SMALL, MAYBE @10 OR SO. */
14780 
14781 
14782  switch(n__) {
14783  case 1: goto L_threej2;
14784  }
14785 
14786  fc = (double) ((*lp << 1) + 1);
14787  goto L2;
14788 
14789 
14790 L_threej2:
14791 /* THIS ENTRY RETURNS THE SQUARED 3-J SYMBOL L LAMBDA LP */
14792 /* 0 0 0 */
14793 /* INSTEAD OF THE CLEBSCH-GORDAN COEFFICIENT */
14794 /* (LIMITATION TO INTEGER ARGUMENTS ONLY) */
14795 
14796 /* NOTE THAT THE THREE-J SYMBOLS ARE COMPLETELY SYMMETRIC IN THE */
14797 /* ARGUMENTS. IT WOULD BE ADVANTAGEOUS TO REORDER THE INPUT ARGUMENT */
14798 /* LIST SO THAT LAMBDA BECOMES THE SMALLEST OF THE 3 ARGUMENTS. */
14799  fc = 1.;
14800 L2:
14801  ret_val = 0.;
14802  if (*l + *lambda < *lp || *lambda + *lp < *l || *l + *lp < *lambda) {
14803  return ret_val;
14804  }
14805  if ((*l + *lp + *lambda) % 2 != 0) {
14806  return ret_val;
14807  }
14808  if (*l < 0 || *lp < 0 || *lambda < 0) {
14809  return ret_val;
14810  }
14811  f = 1. / (double) (*l + *lp + 1 - *lambda);
14812  if (*lambda == 0) {
14813  goto L22;
14814  }
14815  i1 = (*l + *lp + *lambda) / 2;
14816  i0 = (*l + *lp - *lambda) / 2 + 1;
14817  s__1 = i1;
14818  for (i__ = i0; i__ <= s__1; ++i__) {
14819 /* L20: */
14820  f = f * (double) i__ / (double) (((i__ << 1) + 1) << 1);
14821  }
14822 L22:
14823  s__1 = *lambda + *l - *lp;
14824  s__2 = *lambda + *lp - *l;
14825  p = fc * f * fctl_(&s__1) * fctl_(&s__2);
14826  s__1 = (*lambda + *l - *lp) / 2;
14827  s__2 = (*lambda + *lp - *l) / 2;
14828 /* Computing 2nd power */
14829  d__1 = fctl_(&s__1) * fctl_(&s__2);
14830  ret_val = p / (d__1 * d__1);
14831  return ret_val;
14832 } /* clebsqr_ */
14833 
14834 double clebsqr_(int *l, int *lambda, int *lp)
14835 {
14836  return clebsqr_0_(0, l, lambda, lp);
14837  }
14838 
14839 double threej2_(void)
14840 {
14841  return clebsqr_0_(1, (int *)0, (int *)0, (int *)0);
14842  }
14843 
14844 double fctl_(int *n)
14845 {
14846  /* System generated locals */
14847  int s__1;
14848  double ret_val, d__1;
14849 
14850  /* Local variables */
14851  int i__, j;
14852  double z__;
14853 
14854 
14855 
14856  ret_val = 1.;
14857  if (*n <= 1) {
14858  return ret_val;
14859  }
14860  if (*n > 15) {
14861  goto L20;
14862  }
14863  j = 1;
14864  s__1 = *n;
14865  for (i__ = 2; i__ <= s__1; ++i__) {
14866 /* L10: */
14867  j *= i__;
14868  }
14869  ret_val = (double) j;
14870  return ret_val;
14871 L20:
14872  z__ = (double) (*n + 1);
14873  d__1 = z__ - .5;
14874  ret_val = exp(-z__) * pow(z__, d__1) * ((((-2.294720936e-4 / z__ -
14875  .00268132716) / z__ + .003472222222) / z__ + .08333333333) / z__
14876  + 1.) * 2.506628274631;
14877  return ret_val;
14878 } /* fctl_ */
14879 #define ik1k0 (k1k0_1.ik1k0)
14880 
14881 double bgama_(double *fnu, double *t1, double *t2, double
14882  *eps, double *t3, double *t4, double *temp)
14883 {
14884  /* Initialized data */
14885 
14886  static double pi = 3.1415926535898;
14887  static double clight = 29979245800.;
14888  static double hbar = 1.0545887e-27;
14889  static double boltz = 1.380662e-16;
14890 
14891  /* System generated locals */
14892  double ret_val, d__1, d__2, d__3, d__4;
14893 
14894  /* Local variables */
14895  double omega, z__, k0, t0, bgambc, zp, xk1;
14896 
14897 /* SPECTRAL FUNCTION "EBC", FOR REFERENCE: */
14898 /* SEE "PHENOMENA INDUCED BY INTERMOLECULAR INTERACTIONS", */
14899 /* ED. G. BIRNBAUM; J. BORYSOW AND L. FROMMHOLD, P.67, (1985) */
14900 /* ============================================ */
14901 
14902 
14903 /* IF IK1K0=1 ONLY B-C; EBC OTHERWISE */
14904 
14905  omega = 2. * pi * clight * *fnu;
14906  t0 = hbar / (boltz * 2. * *temp);
14907 /* Computing 2nd power */
14908  d__1 = omega * *t1;
14909  z__ = sqrt((d__1 * d__1 + 1.) * (*t2 * *t2 + t0 * t0)) / *t1;
14910  if (z__ - 2. <= 0.) {
14911  goto L10;
14912  } else {
14913  goto L12;
14914  }
14915 L10:
14916 /* Computing 2nd power */
14917  d__2 = z__ / 3.75;
14918  d__1 = d__2 * d__2;
14919 /* Computing 2nd power */
14920  d__4 = z__ / 2.;
14921  d__3 = d__4 * d__4;
14922  xk1 = z__ * z__ * log(z__ / 2.) * ((((((3.2411e-4 * d__1 + .00301532) *
14923  d__1 + .02658733) * d__1 + .15084934) * d__1 + .51498869) * d__1
14924  + .87890594) * d__1 + .5) + ((((((-4.686e-5 * d__3 - .00110404) *
14925  d__3 - .01919402) * d__3 - .18156897) * d__3 - .67278579) * d__3
14926  + .15443144) * d__3 + 1.);
14927  goto L20;
14928 L12:
14929  d__1 = 2. / z__;
14930  xk1 = sqrt(z__) * exp(-z__) * ((((((-6.8245e-4 * d__1 + .00325614) * d__1
14931  - .00780353) * d__1 + .01504268) * d__1 - .0365562) * d__1 +
14932  .23498619) * d__1 + 1.25331414);
14933 L20:
14934 /* Computing 2nd power */
14935  d__1 = *t1 * omega;
14936  bgambc = *t1 / pi * exp(*t2 / *t1 + t0 * omega) * xk1 / (d__1 * d__1 + 1.)
14937  ;
14938  if (ik1k0 == 1) {
14939  goto L55;
14940  }
14941 /* Computing 2nd power */
14942  d__1 = omega * *t4;
14943  zp = sqrt((d__1 * d__1 + 1.) * (*t3 * *t3 + t0 * t0)) / *t4;
14944  if (zp - 2. <= 0.) {
14945  goto L22;
14946  } else {
14947  goto L24;
14948  }
14949 L22:
14950 /* Computing 2nd power */
14951  d__2 = zp / 3.75;
14952  d__1 = d__2 * d__2;
14953 /* Computing 2nd power */
14954  d__4 = zp / 2.;
14955  d__3 = d__4 * d__4;
14956  k0 = -log(zp / 2.) * ((((((.0045813 * d__1 + .0360768) * d__1 + .2659732)
14957  * d__1 + 1.2067492) * d__1 + 3.0899424) * d__1 + 3.5156229) *
14958  d__1 + 1.) + ((((((7.4e-6 * d__3 + 1.075e-4) * d__3 + .00262698) *
14959  d__3 + .0348859) * d__3 + .23069756) * d__3 + .4227842) * d__3 -
14960  .57721566);
14961  goto L30;
14962 L24:
14963  d__1 = 2. / zp;
14964  k0 = exp(-zp) * ((((((5.3208e-4 * d__1 - .0025154) * d__1 + .00587872) *
14965  d__1 - .01062446) * d__1 + .02189568) * d__1 - .07832358) * d__1
14966  + 1.25331414) / sqrt(zp);
14967 L30:
14968  ret_val = (bgambc + *eps * (*t3 / pi) * exp(*t3 / *t4 + t0 * omega) * k0)
14969  / (*eps + 1.);
14970  goto L66;
14971 L55:
14972  ret_val = bgambc;
14973 L66:
14974  return ret_val;
14975 } /* bgama_ */
14976 
14977 #undef ik1k0
14978 
14979 
14980 /* Subroutine */ int spline_0_(int n__, int *l, int *m, int *k,
14981  double *eps, double *x, double *y, double *t,
14982  double *ss, double *si, int *nr, double *s2)
14983 {
14984  /* System generated locals */
14985  int s__1, s__2;
14986  double d__1, d__2;
14987 
14988  /* Local variables */
14989  double epsi, prod, h__;
14990  int i__, j, n;
14991  double w, omega;
14992  int n1;
14993  double s3;
14994  int ic;
14995  double sm, delsqs, ht1, ht2, ss2, yp1, eta, ypn;
14996 
14997 
14998 
14999 /* SPLINE INTERPOLATION AND QUADRATURE, THIRD ORDER AFTER GREVILLE. */
15000 /* INPUT ARGUMENTS L...Y, OUTPUT SS...NR. */
15001 /* L DATA POINTS X(1), Y(1) ... X(L),Y(L) */
15002 /* EPS=ERROR CRITERION, TYPICALLY EPS=1.D-5 FOR 5 DECI. PLACES ACCURA */
15003 /* M ARGUMENTS T(1)..T(M) FOR WHICH FUNCTION VALUES SS(1)..SS(M), FOR */
15004 /* K=0; OR FIRST OR SECOND DERIVATIVE FOR K=1 OR -1, RESPECTIVELY. */
15005 /* NOTE THAT M HAS TO BE AT LEAST EQUAL TO 1. */
15006 /* SI=INTEGRAL (OVER WHOLE INTERVAL) FOR K=2 ONLY. */
15007 /* FOR 'NATURAL' SPLINE FUNCTIONS, S2(1)=S2(L)=0. MUST BE INPUT*NOTE* */
15008 /* N0 INDICATES THE NUMBER OF OUT-OF-RANGE CALLS. X(1)<T(I)<X(L) */
15009 /* EXTRAPOLATE WITH CAUTION. (ASSUMPTION D2Y/DX2 = 0.) */
15010 /* S2(I) IS THE 2ND DERIVATIVE AT X=X(I) AND IS COMPUTED INTERNALLY. */
15011 /* DIMENSION X(L),Y(L),T(M),SS(M),S2(L) */
15012 
15013  /* Parameter adjustments */
15014  --x;
15015  --y;
15016  --t;
15017  --ss;
15018  --s2;
15019 
15020  /* Function Body */
15021  switch(n__) {
15022  case 1: goto L_ixpolat;
15023  }
15024 
15025  n = *l;
15026  n1 = n - 1;
15027  *nr = 0;
15028 /* L4: */
15029  s__1 = n1;
15030  for (i__ = 2; i__ <= s__1; ++i__) {
15031 /* L52: */
15032  s__2 = i__ - 1;
15033  s2[i__] = 3. * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) - (y[
15034  s__2 + 1] - y[s__2]) / (x[s__2 + 1] - x[s__2])) / (x[i__ + 1]
15035  - x[i__ - 1]) / 1.5;
15036  }
15037  omega = 1.0717968;
15038  ic = 0;
15039 /* 'NATURAL' SPLINE FUNCTIONS OF THIRD ORDER. */
15040  s2[1] = 0.;
15041  s2[n] = 0.;
15042 L5:
15043  eta = 0.;
15044  ++ic;
15045  sm = abs(s2[1]);
15046  s__2 = n;
15047  for (i__ = 2; i__ <= s__2; ++i__) {
15048  if ((d__1 = s2[i__], abs(d__1)) > sm) {
15049  sm = (d__2 = s2[i__], abs(d__2));
15050  }
15051 /* L25: */
15052  }
15053  epsi = *eps * sm;
15054 /* L6: */
15055  s__2 = n1;
15056  for (i__ = 2; i__ <= s__2; ++i__) {
15057 /* L7: */
15058  s__1 = i__ - 1;
15059  w = (3. * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) - (y[s__1 +
15060  1] - y[s__1]) / (x[s__1 + 1] - x[s__1])) / (x[i__ + 1] - x[
15061  i__ - 1]) - (x[i__] - x[i__ - 1]) * .5 / (x[i__ + 1] - x[i__
15062  - 1]) * s2[i__ - 1] - (.5 - (x[i__] - x[i__ - 1]) * .5 / (x[
15063  i__ + 1] - x[i__ - 1])) * s2[i__ + 1] - s2[i__]) * omega;
15064 /* L8: */
15065  if (abs(w) - eta <= 0.) {
15066  goto L10;
15067  } else {
15068  goto L9;
15069  }
15070 L9:
15071  eta = abs(w);
15072 L10:
15073  s2[i__] += w;
15074  }
15075 /* L13: */
15076  if (eta - epsi >= 0.) {
15077  goto L5;
15078  } else {
15079  goto L14;
15080  }
15081 /* ENTRY IXPOLAT */
15082 
15083 L_ixpolat:
15084 /* THIS ENTRY USEFUL WHEN ITERATION PREVIOUSLY COMPLETED */
15085 
15086  n = *l;
15087  n1 = n - 1;
15088  *nr = 0;
15089  ic = -1;
15090 L14:
15091  if (*k - 2 != 0) {
15092  goto L15;
15093  } else {
15094  goto L20;
15095  }
15096 L15:
15097  s__2 = *m;
15098  for (j = 1; j <= s__2; ++j) {
15099 /* L16: */
15100  i__ = 1;
15101 /* L54: */
15102  if ((d__1 = t[j] - x[1]) < 0.) {
15103  goto L58;
15104  } else if (d__1 == 0) {
15105  goto L17;
15106  } else {
15107  goto L55;
15108  }
15109 L55:
15110  if ((d__1 = t[j] - x[n]) < 0.) {
15111  goto L57;
15112  } else if (d__1 == 0) {
15113  goto L59;
15114  } else {
15115  goto L158;
15116  }
15117 L56:
15118  if ((d__1 = t[j] - x[i__]) < 0.) {
15119  goto L60;
15120  } else if (d__1 == 0) {
15121  goto L17;
15122  } else {
15123  goto L57;
15124  }
15125 L57:
15126  ++i__;
15127  goto L56;
15128 
15129 L58:
15130  ++(*nr);
15131  ht1 = t[j] - x[1];
15132  ht2 = t[j] - x[2];
15133  yp1 = (y[cs__1 + 1] - y[cs__1]) / (x[cs__1 + 1] - x[cs__1]) + (x[1] -
15134  x[2]) * (s2[1] * 2. + s2[2]) / 6.;
15135  if (*k < 0) {
15136  goto L72;
15137  } else if (*k == 0) {
15138  goto L70;
15139  } else {
15140  goto L71;
15141  }
15142 L71:
15143  ss[j] = yp1 + ht1 * s2[1];
15144  goto L61;
15145 L70:
15146  ss[j] = y[1] + yp1 * ht1 + s2[1] * ht1 * ht1 / 2.;
15147  goto L61;
15148 L72:
15149  ss[j] = s2[i__];
15150  goto L61;
15151 L158:
15152  ht2 = t[j] - x[n];
15153  ht1 = t[j] - x[n1];
15154  ++(*nr);
15155  ypn = (y[n1 + 1] - y[n1]) / (x[n1 + 1] - x[n1]) + (x[n] - x[n1]) * (
15156  s2[n1] + s2[n] * 2.) / 6.;
15157  if (*k < 0) {
15158  goto L82;
15159  } else if (*k == 0) {
15160  goto L80;
15161  } else {
15162  goto L81;
15163  }
15164 L81:
15165  ss[j] = ypn + ht2 * s2[n];
15166  goto L61;
15167 L80:
15168  ss[j] = y[n] + ypn * ht2 + s2[n] * ht2 * ht2 / 2.;
15169  goto L61;
15170 L82:
15171  ss[j] = s2[n];
15172  goto L61;
15173 
15174 L59:
15175  i__ = n;
15176 L60:
15177  --i__;
15178 L17:
15179  ht1 = t[j] - x[i__];
15180  ht2 = t[j] - x[i__ + 1];
15181  prod = ht1 * ht2;
15182  s3 = (s2[i__ + 1] - s2[i__]) / (x[i__ + 1] - x[i__]);
15183  ss2 = s2[i__] + ht1 * s3;
15184  delsqs = (s2[i__] + s2[i__ + 1] + ss2) / 6.;
15185 
15186  if (*k < 0) {
15187  goto L43;
15188  } else if (*k == 0) {
15189  goto L41;
15190  } else {
15191  goto L42;
15192  }
15193 L41:
15194  ss[j] = y[i__] + ht1 * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]))
15195  + prod * delsqs;
15196  goto L61;
15197 L42:
15198  ss[j] = (y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) + (ht1 + ht2) *
15199  delsqs + prod * s3 / 6.;
15200  goto L61;
15201 L43:
15202  ss[j] = ss2;
15203 L61:
15204  ;
15205  }
15206 L20:
15207  *si = 0.;
15208 
15209  s__2 = n1;
15210  for (i__ = 1; i__ <= s__2; ++i__) {
15211  h__ = x[i__ + 1] - x[i__];
15212 /* L62: */
15213 /* Computing 3rd power */
15214  d__1 = h__;
15215  *si = *si + h__ * .5 * (y[i__] + y[i__ + 1]) - d__1 * (d__1 * d__1) *
15216  (s2[i__] + s2[i__ + 1]) / 24.;
15217  }
15218 
15219  if (*k == 2) {
15220  *nr = ic;
15221  }
15222 
15223  return 0;
15224 } /* spline_ */
15225 
15226 /* Subroutine */ int spline_(int *l, int *m, int *k,
15227  double *eps, double *x, double *y, double *t,
15228  double *ss, double *si, int *nr, double *s2)
15229 {
15230  return spline_0_(0, l, m, k, eps, x, y, t, ss, si, nr, s2);
15231  }
15232 
15233 /* Subroutine */ int ixpolat_(int *l, int *m, int *k,
15234  double *eps, double *x, double *y, double *t,
15235  double *ss, double *si, int *nr, double *s2)
15236 {
15237  return spline_0_(1, l, m, k, eps, x, y, t, ss, si, nr, s2);
15238  }
15239 
15240 
15241 // ---------------------- end of Borysow N2N2 F77 code -------------------------
15242 
15243 
15244 // ---------------------- begin of monortm CKD F77 code -------------------------
15245 
15246 
15247 /* Common Block Declarations */
15248 
15249 struct fh2oa_1_ {
15250  double fh2o[2003];
15251 };
15252 
15253 #define fh2oa_1 (*(struct fh2oa_1_ *) &fh2oa_)
15254 
15255 struct fh2ob_1_ {
15256  double v1, v2, dv;
15257  int nptfh2o;
15258 };
15259 struct fh2ob_2_ {
15260  double v1, v2, dv;
15261  int npts;
15262 };
15263 
15264 #define fh2ob_1 (*(struct fh2ob_1_ *) &fh2ob_)
15265 #define fh2ob_2 (*(struct fh2ob_2_ *) &fh2ob_)
15266 
15267 struct sh2oa_1_ {
15268  double swv296[2003];
15269 };
15270 
15271 #define sh2oa_1 (*(struct sh2oa_1_ *) &sh2oa_)
15272 
15273 struct sh2ob_1_ {
15274  double v1, v2, dv;
15276 };
15277 struct sh2ob_2_ {
15278  double v1, v2, dv;
15279  int npts;
15280 };
15281 
15282 #define sh2ob_1 (*(struct sh2ob_1_ *) &sh2ob_)
15283 #define sh2ob_2 (*(struct sh2ob_2_ *) &sh2ob_)
15284 
15285 struct s260a_1_ {
15286  double swv260[2003];
15287 };
15288 
15289 #define s260a_1 (*(struct s260a_1_ *) &s260a_)
15290 
15291 struct s260b_1_ {
15292  double v1___, v2___, dv___;
15294 };
15295 struct s260b_2_ {
15296  double v1, v2, dv;
15297  int npts;
15298 };
15299 
15300 #define s260b_1 (*(struct s260b_1_ *) &s260b_)
15301 #define s260b_2 (*(struct s260b_2_ *) &s260b_)
15302 
15303 struct consts_1_ {
15306 };
15307 
15308 #define consts_1 (*(struct consts_1_ *) &consts_)
15309 
15310 /* Initialized data */
15311 
15312 struct s_fh2oa_ {
15313  double e_1[2003];
15314  } fh2oa_ = { {.012859, .011715, .011038, .011715, .012859, .015326,
15315  .016999, .018321, .019402, .01957, .019432, .017572, .01676,
15316  .01548, .013984, .012266, .010467, .0094526, .0080485, .0069484,
15317  .0061416, .0050941, .0044836, .0038133, .0034608, .0031487,
15318  .0024555, .0020977, .0017266, .001492, .0012709, 9.8081e-4,
15319  8.5063e-4, 6.8822e-4, 5.3809e-4, 4.4679e-4, 3.3774e-4, 2.7979e-4,
15320  2.1047e-4, 1.6511e-4, 1.2993e-4, 9.3033e-5, 7.436e-5, 5.6428e-5,
15321  4.5442e-5, 3.4575e-5, 2.7903e-5, 2.1374e-5, 1.6075e-5, 1.3022e-5,
15322  1.0962e-5, 8.5959e-6, 6.9125e-6, 5.3808e-6, 4.3586e-6, 3.6394e-6,
15323  2.9552e-6, 2.3547e-6, 1.8463e-6, 1.6036e-6, 1.3483e-6, 1.1968e-6,
15324  1.0333e-6, 8.4484e-7, 6.7195e-7, 5.0947e-7, 4.2343e-7, 3.4453e-7,
15325  2.783e-7, 2.3063e-7, 1.9951e-7, 1.7087e-7, 1.4393e-7, 1.2575e-7,
15326  1.075e-7, 8.2325e-8, 5.7524e-8, 4.4482e-8, 3.8106e-8, 3.4315e-8,
15327  2.9422e-8, 2.5069e-8, 2.2402e-8, 1.9349e-8, 1.6152e-8, 1.2208e-8,
15328  8.966e-9, 7.1322e-9, 6.1028e-9, 5.2938e-9, 4.535e-9, 3.4977e-9,
15329  2.9511e-9, 2.4734e-9, 2.0508e-9, 1.8507e-9, 1.6373e-9, 1.5171e-9,
15330  1.3071e-9, 1.2462e-9, 1.2148e-9, 1.259e-9, 1.3153e-9, 1.3301e-9,
15331  1.4483e-9, 1.6944e-9, 2.0559e-9, 2.2954e-9, 2.6221e-9, 3.2606e-9,
15332  4.2392e-9, 5.2171e-9, 6.2553e-9, 8.2548e-9, 9.5842e-9, 1.128e-8,
15333  1.3628e-8, 1.7635e-8, 2.1576e-8, 2.4835e-8, 3.0014e-8, 3.8485e-8,
15334  4.744e-8, 5.5202e-8, 7.0897e-8, 9.6578e-8, 1.3976e-7, 1.8391e-7,
15335  2.3207e-7, 2.996e-7, 4.0408e-7, 5.926e-7, 7.8487e-7, 1.0947e-6,
15336  1.4676e-6, 1.9325e-6, 2.6587e-6, 3.4534e-6, 4.4376e-6, 5.8061e-6,
15337  7.0141e-6, 8.4937e-6, 1.0186e-5, 1.2034e-5, 1.3837e-5, 1.6595e-5,
15338  1.9259e-5, 2.162e-5, 2.3681e-5, 2.7064e-5, 3.251e-5, 3.546e-5,
15339  3.9109e-5, 4.2891e-5, 4.7757e-5, 5.0981e-5, 5.0527e-5, 4.8618e-5,
15340  4.4001e-5, 3.7982e-5, 3.2667e-5, 2.7794e-5, 2.491e-5, 2.4375e-5,
15341  2.7316e-5, 3.2579e-5, 3.5499e-5, 3.801e-5, 4.1353e-5, 4.3323e-5,
15342  4.3004e-5, 3.979e-5, 3.7718e-5, 3.636e-5, 3.2386e-5, 2.7409e-5,
15343  2.3626e-5, 2.0631e-5, 1.8371e-5, 1.5445e-5, 1.2989e-5, 1.1098e-5,
15344  9.6552e-6, 8.0649e-6, 7.2365e-6, 5.9137e-6, 5.2759e-6, 4.886e-6,
15345  4.1321e-6, 3.5918e-6, 2.764e-6, 2.4892e-6, 2.1018e-6, 1.7848e-6,
15346  1.5855e-6, 1.3569e-6, 1.1986e-6, 9.4693e-7, 7.4097e-7, 6.3443e-7,
15347  4.8131e-7, 4.0942e-7, 3.3316e-7, 2.8488e-7, 2.3461e-7, 1.7397e-7,
15348  1.4684e-7, 1.0953e-7, 8.5396e-8, 6.9261e-8, 5.4001e-8, 4.543e-8,
15349  3.2791e-8, 2.5995e-8, 2.0225e-8, 1.571e-8, 1.3027e-8, 1.0229e-8,
15350  8.5277e-9, 6.5249e-9, 5.0117e-9, 3.9906e-9, 3.2332e-9, 2.7847e-9,
15351  2.457e-9, 2.3359e-9, 2.0599e-9, 1.8436e-9, 1.6559e-9, 1.491e-9,
15352  1.2794e-9, 9.8229e-10, 8.0054e-10, 6.0769e-10, 4.5646e-10,
15353  3.3111e-10, 2.4428e-10, 1.8007e-10, 1.3291e-10, 9.7974e-11,
15354  7.8271e-11, 6.3833e-11, 5.4425e-11, 4.6471e-11, 4.0209e-11,
15355  3.5227e-11, 3.1212e-11, 2.884e-11, 2.7762e-11, 2.7935e-11,
15356  3.2012e-11, 3.9525e-11, 5.0303e-11, 6.8027e-11, 9.3954e-11,
15357  1.2986e-10, 1.8478e-10, 2.5331e-10, 3.4827e-10, 4.6968e-10,
15358  6.238e-10, 7.9106e-10, 1.0026e-9, 1.2102e-9, 1.4146e-9, 1.6154e-9,
15359  1.751e-9, 1.8575e-9, 1.8742e-9, 1.87e-9, 1.8582e-9, 1.9657e-9,
15360  2.1204e-9, 2.0381e-9, 2.0122e-9, 2.0436e-9, 2.1213e-9, 2.0742e-9,
15361  1.987e-9, 2.0465e-9, 2.1556e-9, 2.2222e-9, 2.1977e-9, 2.1047e-9,
15362  1.9334e-9, 1.7357e-9, 1.5754e-9, 1.4398e-9, 1.4018e-9, 1.5459e-9,
15363  1.7576e-9, 2.1645e-9, 2.948e-9, 4.4439e-9, 5.8341e-9, 8.0757e-9,
15364  1.1658e-8, 1.6793e-8, 2.2694e-8, 2.9468e-8, 3.9278e-8, 5.2145e-8,
15365  6.4378e-8, 7.7947e-8, 8.5321e-8, 9.7848e-8, 1.0999e-7, 1.1489e-7,
15366  1.2082e-7, 1.2822e-7, 1.4053e-7, 1.5238e-7, 1.5454e-7, 1.5018e-7,
15367  1.4048e-7, 1.2359e-7, 1.0858e-7, 9.3486e-8, 8.1638e-8, 7.769e-8,
15368  8.4625e-8, 1.0114e-7, 1.143e-7, 1.2263e-7, 1.3084e-7, 1.338e-7,
15369  1.3573e-7, 1.3441e-7, 1.2962e-7, 1.2638e-7, 1.1934e-7, 1.1371e-7,
15370  1.0871e-7, 9.8843e-8, 9.1877e-8, 9.105e-8, 9.3213e-8, 9.2929e-8,
15371  1.0155e-7, 1.1263e-7, 1.237e-7, 1.3636e-7, 1.54e-7, 1.7656e-7,
15372  2.1329e-7, 2.3045e-7, 2.5811e-7, 2.9261e-7, 3.4259e-7, 4.077e-7,
15373  4.8771e-7, 5.8081e-7, 7.2895e-7, 8.7482e-7, 1.0795e-6, 1.3384e-6,
15374  1.7208e-6, 2.0677e-6, 2.5294e-6, 3.1123e-6, 3.79e-6, 4.7752e-6,
15375  5.6891e-6, 6.6261e-6, 7.6246e-6, 8.773e-6, 9.6672e-6, 1.098e-5,
15376  1.1287e-5, 1.167e-5, 1.1635e-5, 1.1768e-5, 1.2039e-5, 1.2253e-5,
15377  1.3294e-5, 1.4005e-5, 1.3854e-5, 1.342e-5, 1.3003e-5, 1.2645e-5,
15378  1.1715e-5, 1.1258e-5, 1.1516e-5, 1.2494e-5, 1.3655e-5, 1.4931e-5,
15379  1.4649e-5, 1.3857e-5, 1.312e-5, 1.1791e-5, 1.0637e-5, 8.276e-6,
15380  6.5821e-6, 5.1959e-6, 4.0158e-6, 3.0131e-6, 2.0462e-6, 1.4853e-6,
15381  1.0365e-6, 7.3938e-7, 4.9752e-7, 3.4148e-7, 2.4992e-7, 1.8363e-7,
15382  1.4591e-7, 1.138e-7, 9.0588e-8, 7.3697e-8, 6.0252e-8, 5.1868e-8,
15383  4.266e-8, 3.6163e-8, 3.2512e-8, 2.9258e-8, 2.4238e-8, 2.1209e-8,
15384  1.6362e-8, 1.3871e-8, 1.2355e-8, 9.694e-9, 7.7735e-9, 6.2278e-9,
15385  5.2282e-9, 4.3799e-9, 3.5545e-9, 2.7527e-9, 2.095e-9, 1.6344e-9,
15386  1.2689e-9, 1.0403e-9, 8.488e-10, 6.3461e-10, 4.7657e-10,
15387  3.522e-10, 2.7879e-10, 2.3021e-10, 1.6167e-10, 1.1732e-10,
15388  8.9206e-11, 7.0596e-11, 5.831e-11, 4.4084e-11, 3.1534e-11,
15389  2.5068e-11, 2.2088e-11, 2.2579e-11, 2.2637e-11, 2.5705e-11,
15390  3.2415e-11, 4.6116e-11, 6.5346e-11, 9.4842e-11, 1.2809e-10,
15391  1.8211e-10, 2.4052e-10, 3.027e-10, 3.5531e-10, 4.2402e-10,
15392  4.673e-10, 4.7942e-10, 4.6813e-10, 4.5997e-10, 4.5788e-10,
15393  4.0311e-10, 3.7367e-10, 3.3149e-10, 2.9281e-10, 2.5231e-10,
15394  2.1152e-10, 1.9799e-10, 1.8636e-10, 1.9085e-10, 2.0786e-10,
15395  2.2464e-10, 2.3785e-10, 2.5684e-10, 2.7499e-10, 2.6962e-10,
15396  2.6378e-10, 2.6297e-10, 2.6903e-10, 2.7035e-10, 2.5394e-10,
15397  2.5655e-10, 2.7184e-10, 2.9013e-10, 3.0585e-10, 3.0791e-10,
15398  3.1667e-10, 3.4343e-10, 3.7365e-10, 4.0269e-10, 4.726e-10,
15399  5.6584e-10, 6.9791e-10, 8.6569e-10, 1.0393e-9, 1.2067e-9,
15400  1.5047e-9, 1.8583e-9, 2.2357e-9, 2.6498e-9, 3.2483e-9, 3.9927e-9,
15401  4.6618e-9, 5.5555e-9, 6.6609e-9, 8.2139e-9, 1.0285e-8, 1.3919e-8,
15402  1.8786e-8, 2.515e-8, 3.313e-8, 4.5442e-8, 6.337e-8, 9.0628e-8,
15403  1.2118e-7, 1.5927e-7, 2.1358e-7, 2.7825e-7, 3.7671e-7, 4.4894e-7,
15404  5.4442e-7, 6.224e-7, 7.3004e-7, 8.3384e-7, 8.7933e-7, 8.808e-7,
15405  8.6939e-7, 8.6541e-7, 8.2055e-7, 7.7278e-7, 7.5989e-7, 8.6909e-7,
15406  9.7945e-7, 1.0394e-6, 1.0646e-6, 1.1509e-6, 1.2017e-6, 1.1915e-6,
15407  1.1259e-6, 1.1549e-6, 1.1938e-6, 1.2356e-6, 1.2404e-6, 1.1716e-6,
15408  1.1149e-6, 1.0073e-6, 8.9845e-7, 7.6639e-7, 6.1517e-7, 5.0887e-7,
15409  4.1269e-7, 3.2474e-7, 2.5698e-7, 1.8893e-7, 1.4009e-7, 1.034e-7,
15410  7.7724e-8, 5.7302e-8, 4.2178e-8, 2.9603e-8, 2.1945e-8, 1.6301e-8,
15411  1.2806e-8, 1.0048e-8, 7.897e-9, 6.1133e-9, 4.9054e-9, 4.1985e-9,
15412  3.6944e-9, 3.2586e-9, 2.7362e-9, 2.3647e-9, 2.1249e-9, 1.8172e-9,
15413  1.6224e-9, 1.5158e-9, 1.2361e-9, 1.0682e-9, 9.2312e-10, 7.922e-10,
15414  6.8174e-10, 5.6147e-10, 4.8268e-10, 4.1534e-10, 3.3106e-10,
15415  2.8275e-10, 2.4584e-10, 2.0742e-10, 1.784e-10, 1.4664e-10,
15416  1.239e-10, 1.0497e-10, 8.5038e-11, 6.7008e-11, 5.6355e-11,
15417  4.3323e-11, 3.6914e-11, 3.2262e-11, 3.0749e-11, 3.0318e-11,
15418  2.9447e-11, 2.9918e-11, 3.0668e-11, 3.1315e-11, 3.0329e-11,
15419  2.8259e-11, 2.6065e-11, 2.3578e-11, 2.0469e-11, 1.6908e-11,
15420  1.4912e-11, 1.1867e-11, 9.973e-12, 8.1014e-12, 6.7528e-12,
15421  6.3133e-12, 5.8599e-12, 6.0145e-12, 6.5105e-12, 7.0537e-12,
15422  7.4973e-12, 7.8519e-12, 8.5039e-12, 9.1995e-12, 1.0694e-11,
15423  1.1659e-11, 1.2685e-11, 1.3087e-11, 1.3222e-11, 1.2634e-11,
15424  1.1077e-11, 9.6259e-12, 8.3202e-12, 7.4857e-12, 6.8069e-12,
15425  6.7496e-12, 7.3116e-12, 8.0171e-12, 8.6394e-12, 9.2659e-12,
15426  1.0048e-11, 1.0941e-11, 1.2226e-11, 1.3058e-11, 1.5193e-11,
15427  1.8923e-11, 2.3334e-11, 2.8787e-11, 3.6693e-11, 4.8295e-11,
15428  6.426e-11, 8.8269e-11, 1.1865e-10, 1.5961e-10, 2.0605e-10,
15429  2.7349e-10, 3.7193e-10, 4.8216e-10, 6.1966e-10, 7.715e-10,
15430  1.0195e-9, 1.2859e-9, 1.6535e-9, 2.0316e-9, 2.3913e-9, 3.0114e-9,
15431  3.7495e-9, 4.6504e-9, 5.9145e-9, 7.684e-9, 1.0304e-8, 1.301e-8,
15432  1.6441e-8, 2.1475e-8, 2.5892e-8, 2.9788e-8, 3.382e-8, 4.0007e-8,
15433  4.4888e-8, 4.5765e-8, 4.6131e-8, 4.6239e-8, 4.4849e-8, 4.0729e-8,
15434  3.6856e-8, 3.6164e-8, 3.7606e-8, 4.1457e-8, 4.375e-8, 5.115e-8,
15435  5.6054e-8, 6.1586e-8, 6.4521e-8, 6.6494e-8, 6.9024e-8, 6.8893e-8,
15436  7.0901e-8, 6.976e-8, 7.1485e-8, 7.074e-8, 7.3764e-8, 7.6618e-8,
15437  8.4182e-8, 9.3838e-8, 1.0761e-7, 1.2851e-7, 1.4748e-7, 1.8407e-7,
15438  2.2109e-7, 2.6392e-7, 2.9887e-7, 3.4493e-7, 4.0336e-7, 4.3551e-7,
15439  4.9231e-7, 5.0728e-7, 5.3781e-7, 5.3285e-7, 5.4496e-7, 5.5707e-7,
15440  5.6944e-7, 6.1123e-7, 6.4317e-7, 6.4581e-7, 6.1999e-7, 6.0191e-7,
15441  5.7762e-7, 5.7241e-7, 5.7013e-7, 6.016e-7, 6.6905e-7, 7.4095e-7,
15442  8.2121e-7, 8.0947e-7, 7.6145e-7, 7.2193e-7, 6.3722e-7, 5.4316e-7,
15443  4.2186e-7, 3.2528e-7, 2.5207e-7, 1.8213e-7, 1.2658e-7, 8.6746e-8,
15444  6.0216e-8, 4.1122e-8, 2.8899e-8, 2.174e-8, 1.799e-8, 1.5593e-8,
15445  1.397e-8, 1.2238e-8, 1.0539e-8, 9.2386e-9, 7.8481e-9, 6.8704e-9,
15446  5.7615e-9, 5.0434e-9, 4.6886e-9, 4.377e-9, 3.9768e-9, 3.5202e-9,
15447  3.1854e-9, 2.9009e-9, 2.5763e-9, 2.2135e-9, 1.9455e-9, 1.6248e-9,
15448  1.3368e-9, 1.0842e-9, 8.4254e-10, 6.7414e-10, 5.4667e-10,
15449  4.5005e-10, 3.4932e-10, 2.6745e-10, 2.2053e-10, 1.8162e-10,
15450  1.4935e-10, 1.1618e-10, 9.1888e-11, 8.0672e-11, 6.8746e-11,
15451  6.2668e-11, 5.5715e-11, 4.5074e-11, 3.7669e-11, 3.2082e-11,
15452  2.8085e-11, 2.4838e-11, 1.9791e-11, 1.6964e-11, 1.3887e-11,
15453  1.1179e-11, 9.7499e-12, 7.8255e-12, 6.3698e-12, 5.3265e-12,
15454  4.6588e-12, 4.4498e-12, 3.9984e-12, 3.7513e-12, 3.7176e-12,
15455  3.9148e-12, 4.2702e-12, 5.009e-12, 6.5801e-12, 8.7787e-12,
15456  1.2718e-11, 1.8375e-11, 2.5304e-11, 3.5403e-11, 4.8842e-11,
15457  6.484e-11, 8.0911e-11, 1.0136e-10, 1.2311e-10, 1.4203e-10,
15458  1.5869e-10, 1.8093e-10, 2.137e-10, 2.5228e-10, 2.8816e-10,
15459  3.4556e-10, 3.986e-10, 4.435e-10, 4.776e-10, 5.2357e-10,
15460  6.0827e-10, 6.3635e-10, 6.5886e-10, 6.8753e-10, 7.2349e-10,
15461  7.2789e-10, 6.8232e-10, 6.6081e-10, 6.4232e-10, 6.3485e-10,
15462  6.4311e-10, 7.2235e-10, 7.7263e-10, 8.1668e-10, 9.0324e-10,
15463  9.7643e-10, 1.0535e-9, 1.0195e-9, 1.0194e-9, 1.0156e-9,
15464  9.6792e-10, 9.2725e-10, 8.7347e-10, 8.4484e-10, 8.2647e-10,
15465  8.4363e-10, 9.1261e-10, 1.0051e-9, 1.1511e-9, 1.4037e-9,
15466  1.8066e-9, 2.4483e-9, 3.2739e-9, 4.3194e-9, 5.6902e-9, 7.7924e-9,
15467  9.7376e-9, 1.2055e-8, 1.4303e-8, 1.6956e-8, 1.9542e-8, 2.2233e-8,
15468  2.5186e-8, 2.7777e-8, 2.8943e-8, 2.8873e-8, 2.9417e-8, 2.7954e-8,
15469  2.7524e-8, 2.704e-8, 3.1254e-8, 3.6843e-8, 3.7797e-8, 3.8713e-8,
15470  4.0135e-8, 4.2824e-8, 4.3004e-8, 4.0279e-8, 4.2781e-8, 4.522e-8,
15471  4.8948e-8, 5.0172e-8, 4.8499e-8, 4.7182e-8, 4.2204e-8, 3.7701e-8,
15472  3.0972e-8, 2.4654e-8, 1.9543e-8, 1.4609e-8, 1.1171e-8, 8.3367e-9,
15473  6.3791e-9, 5.079e-9, 4.0655e-9, 3.3658e-9, 2.7882e-9, 2.4749e-9,
15474  2.2287e-9, 2.0217e-9, 1.8191e-9, 1.5897e-9, 1.4191e-9, 1.2448e-9,
15475  1.0884e-9, 9.3585e-10, 7.9429e-10, 7.3214e-10, 6.5008e-10,
15476  5.7549e-10, 5.43e-10, 4.7251e-10, 4.3451e-10, 3.8446e-10,
15477  3.5589e-10, 3.4432e-10, 2.8209e-10, 2.462e-10, 2.1278e-10,
15478  1.8406e-10, 1.6314e-10, 1.3261e-10, 1.1696e-10, 9.6865e-11,
15479  7.6814e-11, 6.6411e-11, 5.0903e-11, 4.0827e-11, 3.0476e-11,
15480  2.323e-11, 1.7707e-11, 1.3548e-11, 1.0719e-11, 9.3026e-12,
15481  8.7967e-12, 8.3136e-12, 7.3918e-12, 6.5293e-12, 5.9243e-12,
15482  5.3595e-12, 3.5266e-12, 2.2571e-12, 1.615e-12, 1.1413e-12,
15483  8.4998e-13, 7.0803e-13, 5.1747e-13, 4.0694e-13, 3.6528e-13,
15484  3.367e-13, 3.1341e-13, 2.939e-13, 2.868e-13, 3.1283e-13,
15485  3.7294e-13, 5.0194e-13, 6.7919e-13, 1.0455e-12, 1.523e-12,
15486  2.3932e-12, 3.4231e-12, 5.0515e-12, 7.3193e-12, 9.9406e-12,
15487  1.2193e-11, 1.4742e-11, 1.9269e-11, 2.1816e-11, 2.275e-11,
15488  2.2902e-11, 2.3888e-11, 2.4902e-11, 2.216e-11, 2.0381e-11,
15489  1.9903e-11, 2.0086e-11, 1.9304e-11, 2.0023e-11, 2.2244e-11,
15490  2.545e-11, 3.1228e-11, 3.456e-11, 3.6923e-11, 3.7486e-11,
15491  3.8124e-11, 3.8317e-11, 3.4737e-11, 3.3037e-11, 3.1724e-11,
15492  2.984e-11, 2.8301e-11, 2.5857e-11, 2.3708e-11, 1.9452e-11,
15493  1.6232e-11, 1.5174e-11, 1.4206e-11, 1.4408e-11, 1.5483e-11,
15494  1.8642e-11, 2.3664e-11, 3.0181e-11, 4.016e-11, 5.2287e-11,
15495  7.2754e-11, 1.0511e-10, 1.4531e-10, 2.0998e-10, 2.6883e-10,
15496  3.3082e-10, 4.2638e-10, 5.3132e-10, 6.3617e-10, 7.1413e-10,
15497  8.5953e-10, 9.9715e-10, 1.0796e-9, 1.0978e-9, 1.1052e-9,
15498  1.1095e-9, 1.0641e-9, 9.7881e-10, 9.659e-10, 1.0332e-9, 1.1974e-9,
15499  1.3612e-9, 1.5829e-9, 1.8655e-9, 2.1465e-9, 2.4779e-9, 2.737e-9,
15500  2.9915e-9, 3.3037e-9, 3.6347e-9, 3.9587e-9, 4.4701e-9, 5.0122e-9,
15501  5.8044e-9, 6.1916e-9, 6.9613e-9, 7.7863e-9, 8.282e-9, 9.4359e-9,
15502  9.7387e-9, 1.0656e-8, 1.0746e-8, 1.121e-8, 1.1905e-8, 1.2194e-8,
15503  1.3145e-8, 1.3738e-8, 1.3634e-8, 1.3011e-8, 1.2511e-8, 1.1805e-8,
15504  1.2159e-8, 1.239e-8, 1.3625e-8, 1.5678e-8, 1.7886e-8, 1.9933e-8,
15505  1.9865e-8, 1.9e-8, 1.7812e-8, 1.5521e-8, 1.2593e-8, 9.5635e-9,
15506  7.2987e-9, 5.2489e-9, 3.5673e-9, 2.4206e-9, 1.6977e-9, 1.2456e-9,
15507  9.3744e-10, 7.8379e-10, 6.996e-10, 6.6451e-10, 6.8521e-10,
15508  7.4234e-10, 8.6658e-10, 9.4972e-10, 1.0791e-9, 1.2359e-9,
15509  1.3363e-9, 1.5025e-9, 1.5368e-9, 1.6152e-9, 1.6184e-9, 1.6557e-9,
15510  1.7035e-9, 1.6916e-9, 1.7237e-9, 1.7175e-9, 1.6475e-9, 1.5335e-9,
15511  1.4272e-9, 1.3282e-9, 1.3459e-9, 1.4028e-9, 1.5192e-9, 1.7068e-9,
15512  1.9085e-9, 2.1318e-9, 2.102e-9, 1.9942e-9, 1.8654e-9, 1.6391e-9,
15513  1.3552e-9, 1.0186e-9, 7.854e-10, 5.7022e-10, 3.9247e-10,
15514  2.5441e-10, 1.6699e-10, 1.1132e-10, 6.8989e-11, 4.5255e-11,
15515  3.1106e-11, 2.3161e-11, 1.7618e-11, 1.438e-11, 1.1601e-11,
15516  9.7148e-12, 8.4519e-12, 6.5392e-12, 5.4113e-12, 4.7624e-12,
15517  4.0617e-12, 3.6173e-12, 2.8608e-12, 2.2724e-12, 1.7436e-12,
15518  1.3424e-12, 1.0358e-12, 7.3064e-13, 5.45e-13, 4.0551e-13,
15519  2.8642e-13, 2.1831e-13, 1.686e-13, 1.2086e-13, 1.015e-13,
15520  9.355e-14, 8.4105e-14, 7.3051e-14, 6.9796e-14, 7.9949e-14,
15521  1.0742e-13, 1.5639e-13, 2.1308e-13, 3.1226e-13, 4.6853e-13,
15522  6.6917e-13, 1.0088e-12, 1.4824e-12, 2.2763e-12, 3.3917e-12,
15523  4.4585e-12, 6.3187e-12, 8.4189e-12, 1.1302e-11, 1.3431e-11,
15524  1.5679e-11, 1.9044e-11, 2.2463e-11, 2.3605e-11, 2.3619e-11,
15525  2.3505e-11, 2.3805e-11, 2.2549e-11, 1.9304e-11, 1.8382e-11,
15526  1.7795e-11, 1.8439e-11, 1.9146e-11, 2.1966e-11, 2.6109e-11,
15527  3.1883e-11, 3.7872e-11, 4.3966e-11, 4.8789e-11, 5.3264e-11,
15528  5.9705e-11, 6.3744e-11, 7.0163e-11, 7.9114e-11, 8.8287e-11,
15529  9.9726e-11, 1.1498e-10, 1.37e-10, 1.6145e-10, 1.9913e-10,
15530  2.2778e-10, 2.6216e-10, 2.977e-10, 3.3405e-10, 3.7821e-10,
15531  3.9552e-10, 4.1322e-10, 4.0293e-10, 4.0259e-10, 3.8853e-10,
15532  3.7842e-10, 3.8551e-10, 4.4618e-10, 5.0527e-10, 5.0695e-10,
15533  5.1216e-10, 5.193e-10, 5.5794e-10, 5.332e-10, 5.2008e-10,
15534  5.6888e-10, 6.1883e-10, 6.9006e-10, 6.9505e-10, 6.6768e-10,
15535  6.329e-10, 5.6753e-10, 5.0327e-10, 3.983e-10, 3.1147e-10,
15536  2.4416e-10, 1.886e-10, 1.3908e-10, 9.9156e-11, 7.3779e-11,
15537  5.6048e-11, 4.2457e-11, 3.4505e-11, 2.9881e-11, 2.7865e-11,
15538  2.8471e-11, 3.1065e-11, 3.4204e-11, 3.914e-11, 4.3606e-11,
15539  4.9075e-11, 5.3069e-11, 5.5236e-11, 5.5309e-11, 5.3832e-11,
15540  5.3183e-11, 5.1783e-11, 5.2042e-11, 5.4422e-11, 5.5656e-11,
15541  5.4409e-11, 5.2659e-11, 5.1696e-11, 5.1726e-11, 4.9003e-11,
15542  4.905e-11, 5.17e-11, 5.6818e-11, 6.3129e-11, 6.6542e-11,
15543  6.4367e-11, 5.9908e-11, 5.447e-11, 4.7903e-11, 3.9669e-11,
15544  2.9651e-11, 2.2286e-11, 1.6742e-11, 1.1827e-11, 7.7739e-12,
15545  4.8805e-12, 3.1747e-12, 2.0057e-12, 1.255e-12, 8.7434e-13,
15546  6.2755e-13, 4.9752e-13, 4.0047e-13, 3.5602e-13, 3.093e-13,
15547  2.4903e-13, 1.9316e-13, 1.4995e-13, 1.2059e-13, 8.7242e-14,
15548  6.4511e-14, 5.33e-14, 4.3741e-14, 3.4916e-14, 2.656e-14,
15549  1.6923e-14, 1.1816e-14, 6.7071e-15, 3.6474e-15, 2.0686e-15,
15550  1.1925e-15, 6.8948e-16, 3.9661e-16, 2.2576e-16, 1.2669e-16,
15551  6.9908e-17, 3.7896e-17, 2.028e-17, 1.1016e-17, 6.7816e-18,
15552  6.0958e-18, 8.9913e-18, 1.7201e-17, 3.4964e-17, 7.0722e-17,
15553  1.402e-16, 2.7167e-16, 5.1478e-16, 9.55e-16, 1.7376e-15,
15554  3.1074e-15, 5.4789e-15, 9.564e-15, 1.6635e-14, 2.9145e-14,
15555  5.2179e-14, 8.8554e-14, 1.4764e-13, 2.3331e-13, 3.5996e-13,
15556  5.2132e-13, 6.3519e-13, 7.3174e-13, 8.3752e-13, 9.8916e-13,
15557  1.1515e-12, 1.4034e-12, 1.6594e-12, 2.1021e-12, 2.7416e-12,
15558  3.4135e-12, 4.5517e-12, 5.5832e-12, 7.2303e-12, 9.9484e-12,
15559  1.2724e-11, 1.6478e-11, 2.0588e-11, 2.5543e-11, 3.3625e-11,
15560  4.1788e-11, 5.0081e-11, 6.0144e-11, 6.9599e-11, 8.4408e-11,
15561  9.7143e-11, 1.0805e-10, 1.1713e-10, 1.2711e-10, 1.3727e-10,
15562  1.4539e-10, 1.6049e-10, 1.768e-10, 2.0557e-10, 2.4967e-10,
15563  3.0096e-10, 3.5816e-10, 4.0851e-10, 4.6111e-10, 5.2197e-10,
15564  5.5043e-10, 6.0324e-10, 6.4983e-10, 6.7498e-10, 7.0545e-10,
15565  7.068e-10, 7.5218e-10, 7.5723e-10, 7.784e-10, 8.0081e-10,
15566  8.0223e-10, 7.7271e-10, 7.1676e-10, 6.7819e-10, 6.4753e-10,
15567  6.5844e-10, 7.0163e-10, 7.7503e-10, 8.8152e-10, 9.9022e-10,
15568  1.0229e-9, 9.9296e-10, 8.9911e-10, 7.7813e-10, 6.3785e-10,
15569  4.7491e-10, 3.528e-10, 2.4349e-10, 1.6502e-10, 1.1622e-10,
15570  8.6715e-11, 6.736e-11, 5.391e-11, 4.5554e-11, 4.13e-11,
15571  3.9728e-11, 3.9e-11, 3.9803e-11, 4.1514e-11, 4.3374e-11,
15572  4.6831e-11, 4.8921e-11, 5.1995e-11, 5.7242e-11, 6.2759e-11,
15573  7.0801e-11, 7.4555e-11, 7.9754e-11, 8.7616e-11, 9.1171e-11,
15574  1.0349e-10, 1.1047e-10, 1.2024e-10, 1.299e-10, 1.3725e-10,
15575  1.5005e-10, 1.5268e-10, 1.5535e-10, 1.5623e-10, 1.5009e-10,
15576  1.4034e-10, 1.3002e-10, 1.2225e-10, 1.1989e-10, 1.2411e-10,
15577  1.3612e-10, 1.5225e-10, 1.7202e-10, 1.9471e-10, 1.9931e-10,
15578  1.9079e-10, 1.7478e-10, 1.5259e-10, 1.2625e-10, 9.3332e-11,
15579  6.8796e-11, 4.6466e-11, 2.9723e-11, 1.8508e-11, 1.2106e-11,
15580  8.0142e-12, 5.4066e-12, 3.9329e-12, 3.1665e-12, 2.742e-12,
15581  2.3996e-12, 2.3804e-12, 2.3242e-12, 2.4476e-12, 2.5331e-12,
15582  2.3595e-12, 2.2575e-12, 2.1298e-12, 2.0088e-12, 1.8263e-12,
15583  1.6114e-12, 1.4422e-12, 1.2946e-12, 1.0837e-12, 9.1282e-13,
15584  7.2359e-13, 5.3307e-13, 3.8837e-13, 2.6678e-13, 1.6769e-13,
15585  1.0826e-13, 7.2364e-14, 4.5201e-14, 3.0808e-14, 2.2377e-14,
15586  1.704e-14, 9.2181e-15, 5.2934e-15, 3.5774e-15, 3.1431e-15,
15587  3.7647e-15, 5.6428e-15, 9.5139e-15, 1.7322e-14, 2.8829e-14,
15588  4.7708e-14, 6.9789e-14, 9.7267e-14, 1.4662e-13, 1.9429e-13,
15589  2.5998e-13, 3.6636e-13, 4.796e-13, 6.5129e-13, 7.7638e-13,
15590  9.3774e-13, 1.1467e-12, 1.3547e-12, 1.5686e-12, 1.6893e-12,
15591  1.9069e-12, 2.1352e-12, 2.3071e-12, 2.4759e-12, 2.8247e-12,
15592  3.4365e-12, 4.3181e-12, 5.6107e-12, 7.0017e-12, 8.6408e-12,
15593  1.0974e-11, 1.3742e-11, 1.6337e-11, 2.0157e-11, 2.3441e-11,
15594  2.6733e-11, 3.0247e-11, 3.3737e-11, 3.8618e-11, 4.1343e-11,
15595  4.387e-11, 4.4685e-11, 4.4881e-11, 4.5526e-11, 4.3628e-11,
15596  4.4268e-11, 4.6865e-11, 5.3426e-11, 5.402e-11, 5.3218e-11,
15597  5.4587e-11, 5.636e-11, 5.774e-11, 5.6426e-11, 6.0399e-11,
15598  6.6981e-11, 7.4319e-11, 7.7977e-11, 7.5539e-11, 7.161e-11,
15599  6.4606e-11, 5.5498e-11, 4.3944e-11, 3.3769e-11, 2.5771e-11,
15600  1.9162e-11, 1.3698e-11, 1.0173e-11, 7.8925e-12, 6.1938e-12,
15601  4.7962e-12, 4.0811e-12, 3.3912e-12, 2.8625e-12, 2.4504e-12,
15602  2.2188e-12, 2.2139e-12, 2.2499e-12, 2.2766e-12, 2.3985e-12,
15603  2.5459e-12, 2.9295e-12, 3.4196e-12, 3.6155e-12, 4.0733e-12,
15604  4.461e-12, 4.9372e-12, 5.4372e-12, 5.7304e-12, 6.164e-12,
15605  6.1278e-12, 6.294e-12, 6.4947e-12, 6.8174e-12, 7.519e-12,
15606  8.2608e-12, 8.4971e-12, 8.3484e-12, 8.1888e-12, 7.8552e-12,
15607  7.8468e-12, 7.5943e-12, 7.9096e-12, 8.6869e-12, 9.1303e-12,
15608  9.2547e-12, 8.9322e-12, 8.2177e-12, 7.3408e-12, 5.7956e-12,
15609  4.447e-12, 3.5881e-12, 2.6748e-12, 1.7074e-12, 9.67e-13,
15610  5.2645e-13, 2.9943e-13, 1.7316e-13, 1.0039e-13, 5.7859e-14,
15611  3.2968e-14, 1.8499e-14, 1.0192e-14, 5.5015e-15, 2.904e-15,
15612  1.4968e-15, 7.5244e-16, 3.6852e-16, 1.7568e-16, 8.1464e-17,
15613  3.6717e-17, 1.6076e-17, 6.8341e-18, 2.8195e-18, 1.1286e-18, 0.,
15614  0., 0., 0., 0., 0., 0., 0., 0., 1.407e-18, 3.0405e-18, 6.4059e-18,
15615  1.3169e-17, 2.6443e-17, 5.1917e-17, 9.9785e-17, 1.8802e-16,
15616  3.4788e-16, 6.3328e-16, 1.137e-15, 2.0198e-15, 3.5665e-15,
15617  6.3053e-15, 1.1309e-14, 2.1206e-14, 3.2858e-14, 5.5165e-14,
15618  8.6231e-14, 1.2776e-13, 1.778e-13, 2.5266e-13, 3.6254e-13,
15619  5.1398e-13, 6.8289e-13, 8.7481e-13, 1.1914e-12, 1.6086e-12,
15620  2.0469e-12, 2.5761e-12, 3.4964e-12, 4.498e-12, 5.5356e-12,
15621  6.7963e-12, 8.572e-12, 1.07e-11, 1.2983e-11, 1.627e-11,
15622  1.9609e-11, 2.2668e-11, 2.5963e-11, 3.0918e-11, 3.493e-11,
15623  3.933e-11, 4.4208e-11, 4.6431e-11, 5.1141e-11, 5.4108e-11,
15624  5.8077e-11, 6.505e-11, 7.2126e-11, 8.1064e-11, 8.1973e-11,
15625  8.1694e-11, 8.3081e-11, 8.024e-11, 7.9225e-11, 7.6256e-11,
15626  7.8468e-11, 8.0041e-11, 8.1585e-11, 8.3485e-11, 8.3774e-11,
15627  8.587e-11, 8.6104e-11, 8.8516e-11, 9.0814e-11, 9.2522e-11,
15628  8.8913e-11, 7.8381e-11, 6.8568e-11, 5.6797e-11, 4.4163e-11,
15629  3.2369e-11, 2.3259e-11, 1.6835e-11, 1.1733e-11, 8.5273e-12,
15630  6.3805e-12, 4.8983e-12, 3.8831e-12, 3.261e-12, 2.8577e-12,
15631  2.521e-12, 2.2913e-12, 2.0341e-12, 1.8167e-12, 1.6395e-12,
15632  1.489e-12, 1.3516e-12, 1.2542e-12, 1.291e-12, 1.3471e-12,
15633  1.4689e-12, 1.5889e-12, 1.6989e-12, 1.8843e-12, 2.0902e-12,
15634  2.3874e-12, 2.7294e-12, 3.3353e-12, 4.0186e-12, 4.5868e-12,
15635  5.2212e-12, 5.8856e-12, 6.5991e-12, 7.2505e-12, 7.6637e-12,
15636  8.5113e-12, 9.4832e-12, 9.9678e-12, 1.0723e-11, 1.0749e-11,
15637  1.138e-11, 1.1774e-11, 1.1743e-11, 1.2493e-11, 1.2559e-11,
15638  1.2332e-11, 1.1782e-11, 1.1086e-11, 1.0945e-11, 1.1178e-11,
15639  1.2083e-11, 1.3037e-11, 1.473e-11, 1.645e-11, 1.7403e-11,
15640  1.7004e-11, 1.5117e-11, 1.3339e-11, 1.0844e-11, 8.0915e-12,
15641  5.6615e-12, 3.7196e-12, 2.5194e-12, 1.6569e-12, 1.1201e-12,
15642  8.2335e-13, 6.027e-13, 4.8205e-13, 4.1313e-13, 3.6243e-13,
15643  3.2575e-13, 2.773e-13, 2.5292e-13, 2.3062e-13, 2.1126e-13,
15644  2.1556e-13, 2.1213e-13, 2.2103e-13, 2.1927e-13, 2.0794e-13,
15645  1.9533e-13, 1.6592e-13, 1.4521e-13, 1.1393e-13, 8.3772e-14,
15646  6.2077e-14, 4.3337e-14, 2.7165e-14, 1.6821e-14, 9.5407e-15,
15647  5.3093e-15, 3.032e-15, 1.7429e-15, 9.9828e-16, 5.6622e-16,
15648  3.1672e-16, 1.7419e-16, 9.3985e-17, 4.9656e-17, 2.5652e-17,
15649  1.2942e-17, 6.3695e-18, 3.0554e-18, 1.4273e-18, -0., -0., -0.,
15650  -0., -0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15651  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15652  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15653  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15654  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15655  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15656  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15657  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15658  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15659  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15660  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15661  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.} };
15662 
15663 struct s_fh2ob_ {
15664  double e_1[3];
15665  int e_2;
15666  } fh2ob_ = { {-20., 2e4, 10.}, 2003 };
15667 
15668 struct s_sh2oa_ {
15669  double e_1[2003];
15670  } sh2oa_ = { {.11109, .10573, .10162, .10573, .11109, .12574, .13499,
15671  .14327, .15065, .15164, .15022, .13677, .13115, .12253, .11271,
15672  .1007, .087495, .080118, .06994, .062034, .056051, .047663,
15673  .04245, .03669, .033441, .030711, .025205, .022113, .01888,
15674  .016653, .014626, .012065, .010709, .0091783, .0077274, .0067302,
15675  .0056164, .0049089, .0041497, .0035823, .0031124, .0026414,
15676  .0023167, .0020156, .0017829, .0015666, .0013928, .0012338,
15677  .0010932, 9.7939e-4, 8.8241e-4, 7.9173e-4, 7.1296e-4, 6.4179e-4,
15678  5.8031e-4, 5.2647e-4, 4.7762e-4, 4.3349e-4, 3.9355e-4, 3.5887e-4,
15679  3.2723e-4, 2.9919e-4, 2.7363e-4, 2.5013e-4, 2.2876e-4, 2.0924e-4,
15680  1.9193e-4, 1.7618e-4, 1.6188e-4, 1.4891e-4, 1.3717e-4, 1.2647e-4,
15681  1.1671e-4, 1.0786e-4, 9.9785e-5, 9.235e-5, 8.5539e-5, 7.9377e-5,
15682  7.3781e-5, 6.8677e-5, 6.3993e-5, 5.9705e-5, 5.5788e-5, 5.2196e-5,
15683  4.8899e-5, 4.5865e-5, 4.3079e-5, 4.0526e-5, 3.8182e-5, 3.6025e-5,
15684  3.4038e-5, 3.2203e-5, 3.0511e-5, 2.8949e-5, 2.7505e-5, 2.617e-5,
15685  2.4933e-5, 2.3786e-5, 2.2722e-5, 2.1736e-5, 2.0819e-5, 1.9968e-5,
15686  1.9178e-5, 1.8442e-5, 1.776e-5, 1.7127e-5, 1.6541e-5, 1.5997e-5,
15687  1.5495e-5, 1.5034e-5, 1.4614e-5, 1.423e-5, 1.3883e-5, 1.3578e-5,
15688  1.3304e-5, 1.3069e-5, 1.2876e-5, 1.2732e-5, 1.2626e-5, 1.2556e-5,
15689  1.2544e-5, 1.2604e-5, 1.2719e-5, 1.2883e-5, 1.3164e-5, 1.3581e-5,
15690  1.4187e-5, 1.4866e-5, 1.5669e-5, 1.6717e-5, 1.8148e-5, 2.0268e-5,
15691  2.2456e-5, 2.5582e-5, 2.9183e-5, 3.3612e-5, 3.9996e-5, 4.6829e-5,
15692  5.5055e-5, 6.5897e-5, 7.536e-5, 8.7213e-5, 1.0046e-4, 1.1496e-4,
15693  1.2943e-4, 1.5049e-4, 1.6973e-4, 1.8711e-4, 2.0286e-4, 2.2823e-4,
15694  2.678e-4, 2.8766e-4, 3.1164e-4, 3.364e-4, 3.6884e-4, 3.9159e-4,
15695  3.8712e-4, 3.7433e-4, 3.4503e-4, 3.1003e-4, 2.8027e-4, 2.5253e-4,
15696  2.3408e-4, 2.2836e-4, 2.4442e-4, 2.7521e-4, 2.9048e-4, 3.0489e-4,
15697  3.2646e-4, 3.388e-4, 3.3492e-4, 3.0987e-4, 2.9482e-4, 2.8711e-4,
15698  2.6068e-4, 2.2683e-4, 1.9996e-4, 1.7788e-4, 1.6101e-4, 1.3911e-4,
15699  1.2013e-4, 1.0544e-4, 9.4224e-5, 8.1256e-5, 7.3667e-5, 6.2233e-5,
15700  5.5906e-5, 5.1619e-5, 4.514e-5, 4.0273e-5, 3.3268e-5, 3.0258e-5,
15701  2.644e-5, 2.3103e-5, 2.0749e-5, 1.8258e-5, 1.6459e-5, 1.4097e-5,
15702  1.2052e-5, 1.0759e-5, 9.14e-6, 8.1432e-6, 7.146e-6, 6.4006e-6,
15703  5.6995e-6, 4.9372e-6, 4.4455e-6, 3.9033e-6, 3.474e-6, 3.1269e-6,
15704  2.8059e-6, 2.5558e-6, 2.2919e-6, 2.0846e-6, 1.8983e-6, 1.7329e-6,
15705  1.5929e-6, 1.4631e-6, 1.3513e-6, 1.2461e-6, 1.1519e-6, 1.0682e-6,
15706  9.9256e-7, 9.2505e-7, 8.6367e-7, 8.0857e-7, 7.5674e-7, 7.0934e-7,
15707  6.658e-7, 6.258e-7, 5.8853e-7, 5.5333e-7, 5.2143e-7, 4.9169e-7,
15708  4.6431e-7, 4.3898e-7, 4.1564e-7, 3.9405e-7, 3.7403e-7, 3.5544e-7,
15709  3.3819e-7, 3.2212e-7, 3.0714e-7, 2.9313e-7, 2.8003e-7, 2.6777e-7,
15710  2.5628e-7, 2.4551e-7, 2.354e-7, 2.2591e-7, 2.1701e-7, 2.0866e-7,
15711  2.0082e-7, 1.9349e-7, 1.8665e-7, 1.8027e-7, 1.7439e-7, 1.6894e-7,
15712  1.64e-7, 1.5953e-7, 1.5557e-7, 1.5195e-7, 1.4888e-7, 1.4603e-7,
15713  1.4337e-7, 1.4093e-7, 1.3828e-7, 1.3569e-7, 1.327e-7, 1.2984e-7,
15714  1.2714e-7, 1.2541e-7, 1.2399e-7, 1.2102e-7, 1.1878e-7, 1.1728e-7,
15715  1.1644e-7, 1.1491e-7, 1.1305e-7, 1.1235e-7, 1.1228e-7, 1.1224e-7,
15716  1.1191e-7, 1.1151e-7, 1.1098e-7, 1.1068e-7, 1.1109e-7, 1.1213e-7,
15717  1.1431e-7, 1.1826e-7, 1.2322e-7, 1.3025e-7, 1.4066e-7, 1.5657e-7,
15718  1.7214e-7, 1.9449e-7, 2.2662e-7, 2.6953e-7, 3.1723e-7, 3.7028e-7,
15719  4.4482e-7, 5.3852e-7, 6.2639e-7, 7.2175e-7, 7.7626e-7, 8.7248e-7,
15720  9.6759e-7, 1.0102e-6, 1.062e-6, 1.1201e-6, 1.2107e-6, 1.2998e-6,
15721  1.313e-6, 1.2856e-6, 1.235e-6, 1.1489e-6, 1.0819e-6, 1.012e-6,
15722  9.4795e-7, 9.2858e-7, 9.806e-7, 1.0999e-6, 1.1967e-6, 1.2672e-6,
15723  1.3418e-6, 1.3864e-6, 1.433e-6, 1.4592e-6, 1.4598e-6, 1.4774e-6,
15724  1.4726e-6, 1.482e-6, 1.505e-6, 1.4984e-6, 1.5181e-6, 1.5888e-6,
15725  1.685e-6, 1.769e-6, 1.9277e-6, 2.1107e-6, 2.3068e-6, 2.5347e-6,
15726  2.8069e-6, 3.1345e-6, 3.5822e-6, 3.9051e-6, 4.3422e-6, 4.8704e-6,
15727  5.5351e-6, 6.3454e-6, 7.269e-6, 8.2974e-6, 9.7609e-6, 1.1237e-5,
15728  1.3187e-5, 1.5548e-5, 1.8784e-5, 2.1694e-5, 2.5487e-5, 3.0092e-5,
15729  3.5385e-5, 4.2764e-5, 4.9313e-5, 5.58e-5, 6.2968e-5, 7.106e-5,
15730  7.7699e-5, 8.7216e-5, 8.9335e-5, 9.2151e-5, 9.2779e-5, 9.4643e-5,
15731  9.7978e-5, 1.0008e-4, 1.0702e-4, 1.1026e-4, 1.0828e-4, 1.055e-4,
15732  1.0432e-4, 1.0428e-4, 9.898e-5, 9.4992e-5, 9.5159e-5, 1.0058e-4,
15733  1.0738e-4, 1.155e-4, 1.1229e-4, 1.0596e-4, 1.0062e-4, 9.1742e-5,
15734  8.4492e-5, 6.8099e-5, 5.6295e-5, 4.6502e-5, 3.8071e-5, 3.0721e-5,
15735  2.3297e-5, 1.8688e-5, 1.483e-5, 1.2049e-5, 9.6754e-6, 7.9192e-6,
15736  6.6673e-6, 5.6468e-6, 4.8904e-6, 4.2289e-6, 3.688e-6, 3.2396e-6,
15737  2.8525e-6, 2.5363e-6, 2.2431e-6, 1.9949e-6, 1.7931e-6, 1.6164e-6,
15738  1.4431e-6, 1.2997e-6, 1.1559e-6, 1.0404e-6, 9.43e-7, 8.4597e-7,
15739  7.6133e-7, 6.8623e-7, 6.2137e-7, 5.6345e-7, 5.1076e-7, 4.6246e-7,
15740  4.1906e-7, 3.8063e-7, 3.461e-7, 3.1554e-7, 2.8795e-7, 2.6252e-7,
15741  2.3967e-7, 2.1901e-7, 2.0052e-7, 1.8384e-7, 1.6847e-7, 1.5459e-7,
15742  1.4204e-7, 1.3068e-7, 1.2036e-7, 1.1095e-7, 1.0237e-7, 9.4592e-8,
15743  8.753e-8, 8.1121e-8, 7.5282e-8, 6.9985e-8, 6.5189e-8, 6.0874e-8,
15744  5.6989e-8, 5.353e-8, 5.0418e-8, 4.7745e-8, 4.5367e-8, 4.3253e-8,
15745  4.1309e-8, 3.9695e-8, 3.8094e-8, 3.6482e-8, 3.4897e-8, 3.35e-8,
15746  3.2302e-8, 3.0854e-8, 2.9698e-8, 2.8567e-8, 2.76e-8, 2.6746e-8,
15747  2.5982e-8, 2.551e-8, 2.5121e-8, 2.4922e-8, 2.4909e-8, 2.5013e-8,
15748  2.5216e-8, 2.5589e-8, 2.6049e-8, 2.6451e-8, 2.6978e-8, 2.7687e-8,
15749  2.86e-8, 2.9643e-8, 3.0701e-8, 3.2058e-8, 3.3695e-8, 3.5558e-8,
15750  3.7634e-8, 3.9875e-8, 4.2458e-8, 4.548e-8, 4.8858e-8, 5.2599e-8,
15751  5.703e-8, 6.2067e-8, 6.7911e-8, 7.4579e-8, 8.1902e-8, 8.9978e-8,
15752  9.987e-8, 1.1102e-7, 1.2343e-7, 1.3732e-7, 1.5394e-7, 1.7318e-7,
15753  1.9383e-7, 2.1819e-7, 2.4666e-7, 2.8109e-7, 3.2236e-7, 3.776e-7,
15754  4.4417e-7, 5.2422e-7, 6.1941e-7, 7.4897e-7, 9.2041e-7, 1.1574e-6,
15755  1.4126e-6, 1.7197e-6, 2.1399e-6, 2.6266e-6, 3.3424e-6, 3.8418e-6,
15756  4.514e-6, 5.0653e-6, 5.8485e-6, 6.5856e-6, 6.8937e-6, 6.9121e-6,
15757  6.9005e-6, 6.9861e-6, 6.82e-6, 6.6089e-6, 6.5809e-6, 7.3496e-6,
15758  8.0311e-6, 8.3186e-6, 8.426e-6, 9.0644e-6, 9.4965e-6, 9.4909e-6,
15759  9.016e-6, 9.1494e-6, 9.3629e-6, 9.5944e-6, 9.5459e-6, 8.9919e-6,
15760  8.604e-6, 7.8613e-6, 7.1567e-6, 6.2677e-6, 5.1899e-6, 4.4188e-6,
15761  3.7167e-6, 3.0636e-6, 2.5573e-6, 2.0317e-6, 1.6371e-6, 1.3257e-6,
15762  1.0928e-6, 8.9986e-7, 7.4653e-7, 6.1111e-7, 5.1395e-7, 4.35e-7,
15763  3.7584e-7, 3.2633e-7, 2.8413e-7, 2.4723e-7, 2.1709e-7, 1.9294e-7,
15764  1.7258e-7, 1.5492e-7, 1.382e-7, 1.2389e-7, 1.1189e-7, 1.0046e-7,
15765  9.0832e-8, 8.2764e-8, 7.4191e-8, 6.7085e-8, 6.0708e-8, 5.4963e-8,
15766  4.9851e-8, 4.5044e-8, 4.0916e-8, 3.722e-8, 3.3678e-8, 3.0663e-8,
15767  2.7979e-8, 2.5495e-8, 2.3286e-8, 2.1233e-8, 1.9409e-8, 1.777e-8,
15768  1.626e-8, 1.4885e-8, 1.3674e-8, 1.2543e-8, 1.1551e-8, 1.0655e-8,
15769  9.8585e-9, 9.1398e-9, 8.4806e-9, 7.8899e-9, 7.3547e-9, 6.867e-9,
15770  6.4131e-9, 5.993e-9, 5.6096e-9, 5.2592e-9, 4.9352e-9, 4.6354e-9,
15771  4.3722e-9, 4.125e-9, 3.9081e-9, 3.7118e-9, 3.5372e-9, 3.3862e-9,
15772  3.2499e-9, 3.1324e-9, 3.0313e-9, 2.9438e-9, 2.8686e-9, 2.805e-9,
15773  2.7545e-9, 2.7149e-9, 2.6907e-9, 2.6724e-9, 2.6649e-9, 2.6642e-9,
15774  2.6725e-9, 2.6871e-9, 2.7056e-9, 2.7357e-9, 2.7781e-9, 2.8358e-9,
15775  2.9067e-9, 2.9952e-9, 3.102e-9, 3.2253e-9, 3.3647e-9, 3.5232e-9,
15776  3.7037e-9, 3.9076e-9, 4.1385e-9, 4.3927e-9, 4.6861e-9, 5.0238e-9,
15777  5.4027e-9, 5.8303e-9, 6.3208e-9, 6.8878e-9, 7.5419e-9, 8.313e-9,
15778  9.1952e-9, 1.0228e-8, 1.1386e-8, 1.2792e-8, 1.4521e-8, 1.6437e-8,
15779  1.8674e-8, 2.116e-8, 2.4506e-8, 2.8113e-8, 3.2636e-8, 3.7355e-8,
15780  4.2234e-8, 4.9282e-8, 5.7358e-8, 6.6743e-8, 7.8821e-8, 9.4264e-8,
15781  1.1542e-7, 1.3684e-7, 1.6337e-7, 2.0056e-7, 2.3252e-7, 2.6127e-7,
15782  2.9211e-7, 3.3804e-7, 3.7397e-7, 3.8205e-7, 3.881e-7, 3.9499e-7,
15783  3.9508e-7, 3.7652e-7, 3.5859e-7, 3.6198e-7, 3.7871e-7, 4.0925e-7,
15784  4.2717e-7, 4.8241e-7, 5.2008e-7, 5.653e-7, 5.9531e-7, 6.1994e-7,
15785  6.508e-7, 6.6355e-7, 6.9193e-7, 6.993e-7, 7.3058e-7, 7.4678e-7,
15786  7.9193e-7, 8.3627e-7, 9.1267e-7, 1.0021e-6, 1.1218e-6, 1.2899e-6,
15787  1.4447e-6, 1.7268e-6, 2.0025e-6, 2.3139e-6, 2.5599e-6, 2.892e-6,
15788  3.3059e-6, 3.5425e-6, 3.9522e-6, 4.0551e-6, 4.2818e-6, 4.2892e-6,
15789  4.421e-6, 4.5614e-6, 4.6739e-6, 4.9482e-6, 5.1118e-6, 5.0986e-6,
15790  4.9417e-6, 4.9022e-6, 4.8449e-6, 4.8694e-6, 4.8111e-6, 4.9378e-6,
15791  5.3231e-6, 5.7362e-6, 6.235e-6, 6.0951e-6, 5.7281e-6, 5.4585e-6,
15792  4.9032e-6, 4.3009e-6, 3.4776e-6, 2.8108e-6, 2.2993e-6, 1.7999e-6,
15793  1.387e-6, 1.075e-6, 8.5191e-7, 6.7951e-7, 5.5336e-7, 4.6439e-7,
15794  4.0243e-7, 3.5368e-7, 3.1427e-7, 2.7775e-7, 2.4486e-7, 2.1788e-7,
15795  1.9249e-7, 1.7162e-7, 1.5115e-7, 1.3478e-7, 1.2236e-7, 1.1139e-7,
15796  1.0092e-7, 9.0795e-8, 8.2214e-8, 7.4691e-8, 6.7486e-8, 6.0414e-8,
15797  5.4584e-8, 4.8754e-8, 4.3501e-8, 3.8767e-8, 3.4363e-8, 3.0703e-8,
15798  2.7562e-8, 2.4831e-8, 2.2241e-8, 1.9939e-8, 1.8049e-8, 1.6368e-8,
15799  1.4863e-8, 1.346e-8, 1.2212e-8, 1.1155e-8, 1.0185e-8, 9.3417e-9,
15800  8.5671e-9, 7.8292e-9, 7.1749e-9, 6.5856e-9, 6.0588e-9, 5.5835e-9,
15801  5.135e-9, 4.7395e-9, 4.3771e-9, 4.0476e-9, 3.756e-9, 3.4861e-9,
15802  3.2427e-9, 3.024e-9, 2.8278e-9, 2.6531e-9, 2.4937e-9, 2.3511e-9,
15803  2.2245e-9, 2.1133e-9, 2.0159e-9, 1.933e-9, 1.8669e-9, 1.8152e-9,
15804  1.7852e-9, 1.7752e-9, 1.7823e-9, 1.8194e-9, 1.8866e-9, 1.9759e-9,
15805  2.0736e-9, 2.2083e-9, 2.3587e-9, 2.4984e-9, 2.6333e-9, 2.816e-9,
15806  3.0759e-9, 3.372e-9, 3.6457e-9, 4.0668e-9, 4.4541e-9, 4.7976e-9,
15807  5.0908e-9, 5.4811e-9, 6.1394e-9, 6.3669e-9, 6.5714e-9, 6.8384e-9,
15808  7.1918e-9, 7.3741e-9, 7.2079e-9, 7.2172e-9, 7.2572e-9, 7.3912e-9,
15809  7.6188e-9, 8.3291e-9, 8.7885e-9, 9.2412e-9, 1.0021e-8, 1.0752e-8,
15810  1.1546e-8, 1.1607e-8, 1.1949e-8, 1.2346e-8, 1.2516e-8, 1.2826e-8,
15811  1.3053e-8, 1.3556e-8, 1.4221e-8, 1.5201e-8, 1.6661e-8, 1.8385e-8,
15812  2.0585e-8, 2.3674e-8, 2.7928e-8, 3.3901e-8, 4.1017e-8, 4.9595e-8,
15813  6.0432e-8, 7.6304e-8, 9.0764e-8, 1.0798e-7, 1.2442e-7, 1.4404e-7,
15814  1.6331e-7, 1.8339e-7, 2.0445e-7, 2.2288e-7, 2.3083e-7, 2.3196e-7,
15815  2.3919e-7, 2.3339e-7, 2.3502e-7, 2.3444e-7, 2.6395e-7, 2.9928e-7,
15816  3.0025e-7, 3.0496e-7, 3.1777e-7, 3.4198e-7, 3.4739e-7, 3.2696e-7,
15817  3.41e-7, 3.5405e-7, 3.7774e-7, 3.8285e-7, 3.6797e-7, 3.58e-7,
15818  3.2283e-7, 2.9361e-7, 2.4881e-7, 2.0599e-7, 1.7121e-7, 1.3641e-7,
15819  1.1111e-7, 8.9413e-8, 7.3455e-8, 6.2078e-8, 5.2538e-8, 4.5325e-8,
15820  3.9005e-8, 3.4772e-8, 3.1203e-8, 2.8132e-8, 2.525e-8, 2.2371e-8,
15821  2.0131e-8, 1.7992e-8, 1.6076e-8, 1.4222e-8, 1.249e-8, 1.1401e-8,
15822  1.0249e-8, 9.2279e-9, 8.5654e-9, 7.6227e-9, 6.9648e-9, 6.2466e-9,
15823  5.7252e-9, 5.38e-9, 4.696e-9, 4.2194e-9, 3.7746e-9, 3.3813e-9,
15824  3.0656e-9, 2.6885e-9, 2.4311e-9, 2.1572e-9, 1.8892e-9, 1.7038e-9,
15825  1.4914e-9, 1.3277e-9, 1.1694e-9, 1.0391e-9, 9.2779e-10,
15826  8.3123e-10, 7.4968e-10, 6.8385e-10, 6.2915e-10, 5.7784e-10,
15827  5.2838e-10, 4.8382e-10, 4.4543e-10, 4.1155e-10, 3.7158e-10,
15828  3.3731e-10, 3.0969e-10, 2.8535e-10, 2.6416e-10, 2.4583e-10,
15829  2.2878e-10, 2.1379e-10, 2.0073e-10, 1.8907e-10, 1.7866e-10,
15830  1.6936e-10, 1.6119e-10, 1.5424e-10, 1.4847e-10, 1.4401e-10,
15831  1.4068e-10, 1.3937e-10, 1.3943e-10, 1.4281e-10, 1.4766e-10,
15832  1.5701e-10, 1.7079e-10, 1.8691e-10, 2.0081e-10, 2.174e-10,
15833  2.4847e-10, 2.6463e-10, 2.7087e-10, 2.7313e-10, 2.8352e-10,
15834  2.9511e-10, 2.8058e-10, 2.7227e-10, 2.7356e-10, 2.8012e-10,
15835  2.8034e-10, 2.9031e-10, 3.103e-10, 3.3745e-10, 3.8152e-10,
15836  4.0622e-10, 4.2673e-10, 4.3879e-10, 4.5488e-10, 4.7179e-10,
15837  4.614e-10, 4.6339e-10, 4.6716e-10, 4.7024e-10, 4.7931e-10,
15838  4.8503e-10, 4.9589e-10, 4.9499e-10, 5.0363e-10, 5.3184e-10,
15839  5.6451e-10, 6.0932e-10, 6.6469e-10, 7.4076e-10, 8.3605e-10,
15840  9.4898e-10, 1.0935e-9, 1.2593e-9, 1.4913e-9, 1.8099e-9, 2.1842e-9,
15841  2.7284e-9, 3.2159e-9, 3.7426e-9, 4.5226e-9, 5.3512e-9, 6.1787e-9,
15842  6.8237e-9, 7.9421e-9, 9.0002e-9, 9.6841e-9, 9.9558e-9, 1.0232e-8,
15843  1.0591e-8, 1.0657e-8, 1.0441e-8, 1.0719e-8, 1.1526e-8, 1.2962e-8,
15844  1.4336e-8, 1.615e-8, 1.8417e-8, 2.0725e-8, 2.3426e-8, 2.5619e-8,
15845  2.7828e-8, 3.0563e-8, 3.3438e-8, 3.6317e-8, 4.04e-8, 4.4556e-8,
15846  5.0397e-8, 5.3315e-8, 5.9185e-8, 6.5311e-8, 6.9188e-8, 7.7728e-8,
15847  7.9789e-8, 8.6598e-8, 8.7768e-8, 9.1773e-8, 9.7533e-8, 1.0007e-7,
15848  1.065e-7, 1.0992e-7, 1.0864e-7, 1.0494e-7, 1.0303e-7, 1.0031e-7,
15849  1.0436e-7, 1.0537e-7, 1.1184e-7, 1.2364e-7, 1.3651e-7, 1.4881e-7,
15850  1.4723e-7, 1.4118e-7, 1.3371e-7, 1.1902e-7, 1.0007e-7, 7.9628e-8,
15851  6.4362e-8, 5.0243e-8, 3.8133e-8, 2.94e-8, 2.3443e-8, 1.9319e-8,
15852  1.6196e-8, 1.4221e-8, 1.2817e-8, 1.1863e-8, 1.1383e-8, 1.1221e-8,
15853  1.1574e-8, 1.1661e-8, 1.2157e-8, 1.2883e-8, 1.3295e-8, 1.4243e-8,
15854  1.424e-8, 1.4614e-8, 1.4529e-8, 1.4685e-8, 1.4974e-8, 1.479e-8,
15855  1.489e-8, 1.4704e-8, 1.4142e-8, 1.3374e-8, 1.2746e-8, 1.2172e-8,
15856  1.2336e-8, 1.2546e-8, 1.3065e-8, 1.409e-8, 1.5215e-8, 1.654e-8,
15857  1.6144e-8, 1.5282e-8, 1.4358e-8, 1.2849e-8, 1.0998e-8, 8.6956e-9,
15858  7.0881e-9, 5.5767e-9, 4.2792e-9, 3.2233e-9, 2.502e-9, 1.9985e-9,
15859  1.5834e-9, 1.3015e-9, 1.0948e-9, 9.4141e-10, 8.1465e-10,
15860  7.1517e-10, 6.2906e-10, 5.5756e-10, 4.9805e-10, 4.3961e-10,
15861  3.9181e-10, 3.5227e-10, 3.167e-10, 2.8667e-10, 2.5745e-10,
15862  2.3212e-10, 2.0948e-10, 1.897e-10, 1.7239e-10, 1.5659e-10,
15863  1.4301e-10, 1.3104e-10, 1.2031e-10, 1.1095e-10, 1.0262e-10,
15864  9.513e-11, 8.8595e-11, 8.2842e-11, 7.7727e-11, 7.3199e-11,
15865  6.9286e-11, 6.5994e-11, 6.3316e-11, 6.1244e-11, 5.9669e-11,
15866  5.8843e-11, 5.8832e-11, 5.9547e-11, 6.1635e-11, 6.4926e-11,
15867  7.0745e-11, 7.8802e-11, 8.6724e-11, 1.0052e-10, 1.1575e-10,
15868  1.3626e-10, 1.5126e-10, 1.6751e-10, 1.9239e-10, 2.1748e-10,
15869  2.2654e-10, 2.2902e-10, 2.324e-10, 2.4081e-10, 2.393e-10,
15870  2.2378e-10, 2.2476e-10, 2.2791e-10, 2.4047e-10, 2.5305e-10,
15871  2.8073e-10, 3.1741e-10, 3.6592e-10, 4.1495e-10, 4.6565e-10,
15872  5.099e-10, 5.5607e-10, 6.1928e-10, 6.6779e-10, 7.335e-10,
15873  8.1434e-10, 8.9635e-10, 9.9678e-10, 1.1256e-9, 1.2999e-9,
15874  1.4888e-9, 1.7642e-9, 1.9606e-9, 2.2066e-9, 2.4601e-9, 2.7218e-9,
15875  3.0375e-9, 3.1591e-9, 3.2852e-9, 3.2464e-9, 3.3046e-9, 3.271e-9,
15876  3.2601e-9, 3.3398e-9, 3.7446e-9, 4.0795e-9, 4.0284e-9, 4.0584e-9,
15877  4.1677e-9, 4.5358e-9, 4.4097e-9, 4.2744e-9, 4.5449e-9, 4.8147e-9,
15878  5.2656e-9, 5.2476e-9, 5.0275e-9, 4.7968e-9, 4.3654e-9, 3.953e-9,
15879  3.2447e-9, 2.6489e-9, 2.1795e-9, 1.788e-9, 1.4309e-9, 1.1256e-9,
15880  9.1903e-10, 7.6533e-10, 6.3989e-10, 5.5496e-10, 4.9581e-10,
15881  4.5722e-10, 4.3898e-10, 4.3505e-10, 4.3671e-10, 4.5329e-10,
15882  4.6827e-10, 4.9394e-10, 5.1122e-10, 5.1649e-10, 5.0965e-10,
15883  4.9551e-10, 4.8928e-10, 4.7947e-10, 4.7989e-10, 4.9071e-10,
15884  4.8867e-10, 4.726e-10, 4.5756e-10, 4.54e-10, 4.5993e-10,
15885  4.4042e-10, 4.3309e-10, 4.4182e-10, 4.6735e-10, 5.0378e-10,
15886  5.2204e-10, 5.0166e-10, 4.6799e-10, 4.3119e-10, 3.8803e-10,
15887  3.3291e-10, 2.6289e-10, 2.1029e-10, 1.7011e-10, 1.3345e-10,
15888  1.0224e-10, 7.8207e-11, 6.2451e-11, 5.0481e-11, 4.1507e-11,
15889  3.5419e-11, 3.0582e-11, 2.69e-11, 2.3778e-11, 2.1343e-11,
15890  1.9182e-11, 1.7162e-11, 1.5391e-11, 1.3877e-11, 1.2619e-11,
15891  1.145e-11, 1.0461e-11, 9.6578e-12, 8.9579e-12, 8.3463e-12,
15892  7.8127e-12, 7.3322e-12, 6.9414e-12, 6.6037e-12, 6.3285e-12,
15893  6.1095e-12, 5.9387e-12, 5.8118e-12, 5.726e-12, 5.6794e-12,
15894  5.6711e-12, 5.7003e-12, 5.767e-12, 5.8717e-12, 6.0151e-12,
15895  6.1984e-12, 6.4232e-12, 6.6918e-12, 7.0065e-12, 7.3705e-12,
15896  7.7873e-12, 8.2612e-12, 8.7972e-12, 9.4009e-12, 1.0079e-11,
15897  1.084e-11, 1.1692e-11, 1.2648e-11, 1.3723e-11, 1.4935e-11,
15898  1.6313e-11, 1.7905e-11, 1.974e-11, 2.1898e-11, 2.4419e-11,
15899  2.7426e-11, 3.0869e-11, 3.4235e-11, 3.7841e-11, 4.1929e-11,
15900  4.6776e-11, 5.2123e-11, 5.8497e-11, 6.5294e-11, 7.4038e-11,
15901  8.4793e-11, 9.6453e-11, 1.1223e-10, 1.2786e-10, 1.4882e-10,
15902  1.7799e-10, 2.0766e-10, 2.4523e-10, 2.8591e-10, 3.3386e-10,
15903  4.0531e-10, 4.7663e-10, 5.4858e-10, 6.3377e-10, 7.1688e-10,
15904  8.4184e-10, 9.5144e-10, 1.0481e-9, 1.1356e-9, 1.2339e-9,
15905  1.3396e-9, 1.4375e-9, 1.5831e-9, 1.7323e-9, 1.9671e-9, 2.2976e-9,
15906  2.6679e-9, 3.0777e-9, 3.4321e-9, 3.8192e-9, 4.2711e-9, 4.4903e-9,
15907  4.8931e-9, 5.2253e-9, 5.404e-9, 5.6387e-9, 5.6704e-9, 6.0345e-9,
15908  6.1079e-9, 6.2576e-9, 6.4039e-9, 6.3776e-9, 6.1878e-9, 5.8616e-9,
15909  5.7036e-9, 5.584e-9, 5.6905e-9, 5.8931e-9, 6.2478e-9, 6.8291e-9,
15910  7.4528e-9, 7.6078e-9, 7.3898e-9, 6.7573e-9, 5.9827e-9, 5.0927e-9,
15911  4.0099e-9, 3.1933e-9, 2.4296e-9, 1.8485e-9, 1.4595e-9, 1.2017e-9,
15912  1.0164e-9, 8.7433e-10, 7.7108e-10, 7.0049e-10, 6.5291e-10,
15913  6.1477e-10, 5.9254e-10, 5.815e-10, 5.7591e-10, 5.849e-10,
15914  5.8587e-10, 5.9636e-10, 6.2408e-10, 6.5479e-10, 7.048e-10,
15915  7.2313e-10, 7.5524e-10, 8.0863e-10, 8.3386e-10, 9.2342e-10,
15916  9.6754e-10, 1.0293e-9, 1.0895e-9, 1.133e-9, 1.221e-9, 1.2413e-9,
15917  1.2613e-9, 1.2671e-9, 1.2225e-9, 1.1609e-9, 1.0991e-9, 1.06e-9,
15918  1.057e-9, 1.0818e-9, 1.1421e-9, 1.227e-9, 1.337e-9, 1.4742e-9,
15919  1.4946e-9, 1.4322e-9, 1.321e-9, 1.1749e-9, 1.0051e-9, 7.8387e-10,
15920  6.1844e-10, 4.6288e-10, 3.4164e-10, 2.5412e-10, 1.9857e-10,
15921  1.5876e-10, 1.2966e-10, 1.092e-10, 9.4811e-11, 8.3733e-11,
15922  7.3906e-11, 6.7259e-11, 6.1146e-11, 5.7119e-11, 5.3546e-11,
15923  4.8625e-11, 4.4749e-11, 4.1089e-11, 3.7825e-11, 3.4465e-11,
15924  3.1018e-11, 2.8109e-11, 2.561e-11, 2.2859e-11, 2.049e-11,
15925  1.8133e-11, 1.5835e-11, 1.3949e-11, 1.2295e-11, 1.0799e-11,
15926  9.6544e-12, 8.7597e-12, 7.999e-12, 7.3973e-12, 6.9035e-12,
15927  6.4935e-12, 6.1195e-12, 5.8235e-12, 5.5928e-12, 5.4191e-12,
15928  5.2993e-12, 5.2338e-12, 5.2272e-12, 5.2923e-12, 5.4252e-12,
15929  5.6523e-12, 5.9433e-12, 6.3197e-12, 6.9016e-12, 7.5016e-12,
15930  8.2885e-12, 9.405e-12, 1.0605e-11, 1.2257e-11, 1.3622e-11,
15931  1.5353e-11, 1.7543e-11, 1.9809e-11, 2.2197e-11, 2.4065e-11,
15932  2.6777e-11, 2.9751e-11, 3.2543e-11, 3.5536e-11, 3.9942e-11,
15933  4.6283e-11, 5.4556e-11, 6.549e-11, 7.6803e-11, 9.0053e-11,
15934  1.0852e-10, 1.2946e-10, 1.4916e-10, 1.7748e-10, 2.0073e-10,
15935  2.2485e-10, 2.5114e-10, 2.7715e-10, 3.1319e-10, 3.3305e-10,
15936  3.5059e-10, 3.5746e-10, 3.6311e-10, 3.7344e-10, 3.6574e-10,
15937  3.7539e-10, 3.9434e-10, 4.351e-10, 4.334e-10, 4.2588e-10,
15938  4.3977e-10, 4.6062e-10, 4.7687e-10, 4.6457e-10, 4.8578e-10,
15939  5.2344e-10, 5.6752e-10, 5.8702e-10, 5.6603e-10, 5.3784e-10,
15940  4.9181e-10, 4.3272e-10, 3.5681e-10, 2.8814e-10, 2.332e-10,
15941  1.8631e-10, 1.4587e-10, 1.1782e-10, 9.8132e-11, 8.2528e-11,
15942  6.9174e-11, 6.1056e-11, 5.3459e-11, 4.7116e-11, 4.1878e-11,
15943  3.8125e-11, 3.6347e-11, 3.5071e-11, 3.3897e-11, 3.3541e-11,
15944  3.3563e-11, 3.5469e-11, 3.8111e-11, 3.8675e-11, 4.1333e-11,
15945  4.3475e-11, 4.6476e-11, 4.9761e-11, 5.138e-11, 5.4135e-11,
15946  5.3802e-11, 5.5158e-11, 5.6864e-11, 5.9311e-11, 6.3827e-11,
15947  6.7893e-11, 6.823e-11, 6.6694e-11, 6.6018e-11, 6.4863e-11,
15948  6.5893e-11, 6.3813e-11, 6.4741e-11, 6.863e-11, 7.0255e-11,
15949  7.0667e-11, 6.881e-11, 6.4104e-11, 5.8136e-11, 4.7242e-11,
15950  3.7625e-11, 3.1742e-11, 2.5581e-11, 1.8824e-11, 1.3303e-11,
15951  9.6919e-12, 7.5353e-12, 6.0986e-12, 5.0742e-12, 4.3094e-12,
15952  3.719e-12, 3.252e-12, 2.8756e-12, 2.568e-12, 2.3139e-12,
15953  2.1025e-12, 1.9257e-12, 1.7777e-12, 1.6539e-12, 1.5508e-12,
15954  1.4657e-12, 1.3966e-12, 1.3417e-12, 1.2998e-12, 1.27e-12,
15955  1.2514e-12, 1.2437e-12, 1.2463e-12, 1.2592e-12, 1.2823e-12,
15956  1.3157e-12, 1.3596e-12, 1.4144e-12, 1.4806e-12, 1.5588e-12,
15957  1.6497e-12, 1.7544e-12, 1.8738e-12, 2.0094e-12, 2.1626e-12,
15958  2.3354e-12, 2.5297e-12, 2.7483e-12, 2.9941e-12, 3.2708e-12,
15959  3.5833e-12, 3.9374e-12, 4.3415e-12, 4.8079e-12, 5.3602e-12,
15960  5.9816e-12, 6.7436e-12, 7.6368e-12, 8.6812e-12, 9.8747e-12,
15961  1.135e-11, 1.3181e-11, 1.5406e-11, 1.7868e-11, 2.0651e-11,
15962  2.4504e-11, 2.9184e-11, 3.4159e-11, 3.9979e-11, 4.8704e-11,
15963  5.7856e-11, 6.7576e-11, 7.9103e-11, 9.437e-11, 1.1224e-10,
15964  1.3112e-10, 1.5674e-10, 1.8206e-10, 2.0576e-10, 2.3187e-10,
15965  2.7005e-10, 3.0055e-10, 3.3423e-10, 3.6956e-10, 3.8737e-10,
15966  4.263e-10, 4.5154e-10, 4.8383e-10, 5.3582e-10, 5.8109e-10,
15967  6.3741e-10, 6.3874e-10, 6.387e-10, 6.5818e-10, 6.5056e-10,
15968  6.5291e-10, 6.3159e-10, 6.3984e-10, 6.4549e-10, 6.5444e-10,
15969  6.7035e-10, 6.7665e-10, 6.9124e-10, 6.8451e-10, 6.9255e-10,
15970  6.9923e-10, 7.0396e-10, 6.7715e-10, 6.0371e-10, 5.3774e-10,
15971  4.6043e-10, 3.7635e-10, 2.9484e-10, 2.2968e-10, 1.8185e-10,
15972  1.4191e-10, 1.1471e-10, 9.479e-11, 7.9613e-11, 6.7989e-11,
15973  5.9391e-11, 5.281e-11, 4.7136e-11, 4.2618e-11, 3.8313e-11,
15974  3.4686e-11, 3.1669e-11, 2.911e-11, 2.6871e-11, 2.5074e-11,
15975  2.4368e-11, 2.3925e-11, 2.4067e-11, 2.4336e-11, 2.4704e-11,
15976  2.5823e-11, 2.7177e-11, 2.9227e-11, 3.1593e-11, 3.573e-11,
15977  4.0221e-11, 4.3994e-11, 4.8448e-11, 5.3191e-11, 5.8552e-11,
15978  6.3458e-11, 6.6335e-11, 7.2457e-11, 7.9091e-11, 8.2234e-11,
15979  8.7668e-11, 8.7951e-11, 9.2952e-11, 9.6157e-11, 9.5926e-11,
15980  1.012e-10, 1.0115e-10, 9.9577e-11, 9.6633e-11, 9.2891e-11,
15981  9.3315e-11, 9.5584e-11, 1.0064e-10, 1.0509e-10, 1.1455e-10,
15982  1.2443e-10, 1.2963e-10, 1.2632e-10, 1.1308e-10, 1.0186e-10,
15983  8.588e-11, 6.7863e-11, 5.1521e-11, 3.778e-11, 2.8842e-11,
15984  2.2052e-11, 1.7402e-11, 1.4406e-11, 1.1934e-11, 1.0223e-11,
15985  8.9544e-12, 7.9088e-12, 7.0675e-12, 6.2222e-12, 5.6051e-12,
15986  5.0502e-12, 4.5578e-12, 4.2636e-12, 3.9461e-12, 3.7599e-12,
15987  3.5215e-12, 3.2467e-12, 3.0018e-12, 2.6558e-12, 2.3928e-12,
15988  2.0707e-12, 1.7575e-12, 1.5114e-12, 1.2941e-12, 1.1004e-12,
15989  9.5175e-13, 8.2894e-13, 7.3253e-13, 6.5551e-13, 5.9098e-13,
15990  5.3548e-13, 4.8697e-13, 4.4413e-13, 4.06e-13, 3.7188e-13,
15991  3.4121e-13, 3.1356e-13, 2.8856e-13, 2.659e-13, 2.4533e-13,
15992  2.2663e-13, 2.096e-13, 1.9407e-13, 1.799e-13, 1.6695e-13,
15993  1.5512e-13, 1.4429e-13, 1.3437e-13, 1.2527e-13, 1.1693e-13,
15994  1.0927e-13, 1.0224e-13, 9.5767e-14, 8.9816e-14, 8.4335e-14,
15995  7.9285e-14, 7.4626e-14, 7.0325e-14, 6.6352e-14, 6.2676e-14,
15996  5.9274e-14, 5.6121e-14, 5.3195e-14, 5.0479e-14, 4.7953e-14,
15997  4.5602e-14, 4.3411e-14, 4.1367e-14, 3.9456e-14, 3.767e-14,
15998  3.5996e-14, 3.4427e-14, 3.2952e-14, 3.1566e-14, 3.0261e-14,
15999  2.903e-14, 2.7868e-14, 2.677e-14, 2.573e-14, 2.4745e-14,
16000  2.3809e-14, 2.2921e-14, 2.2076e-14, 2.1271e-14, 2.0504e-14,
16001  1.9772e-14, 1.9073e-14, 1.8404e-14, 1.7764e-14, 1.7151e-14,
16002  1.6564e-14, 1.6e-14, 1.5459e-14, 1.4939e-14, 1.4439e-14,
16003  1.3958e-14, 1.3495e-14, 1.3049e-14, 1.262e-14, 1.2206e-14,
16004  1.1807e-14, 1.1422e-14, 1.105e-14, 1.0691e-14, 1.0345e-14,
16005  1.001e-14, 9.687e-15, 9.3747e-15, 9.0727e-15, 8.7808e-15,
16006  8.4986e-15, 8.2257e-15, 7.9617e-15, 7.7064e-15, 7.4594e-15,
16007  7.2204e-15, 6.9891e-15, 6.7653e-15, 6.5488e-15, 6.3392e-15,
16008  6.1363e-15, 5.9399e-15, 5.7499e-15, 5.5659e-15, 5.3878e-15,
16009  5.2153e-15, 5.0484e-15, 4.8868e-15, 4.7303e-15, 4.5788e-15,
16010  4.4322e-15, 4.2902e-15, 4.1527e-15, 4.0196e-15, 3.8907e-15,
16011  3.7659e-15, 3.6451e-15, 3.5281e-15, 3.4149e-15, 3.3052e-15,
16012  3.1991e-15, 3.0963e-15, 2.9967e-15, 2.9004e-15, 2.8071e-15,
16013  2.7167e-15, 2.6293e-15, 2.5446e-15, 2.4626e-15, 2.3833e-15,
16014  2.3064e-15, 2.232e-15, 2.16e-15, 2.0903e-15, 2.0228e-15,
16015  1.9574e-15, 1.8942e-15, 1.8329e-15, 1.7736e-15, 1.7163e-15,
16016  1.6607e-15, 1.6069e-15, 1.5548e-15, 1.5044e-15, 1.4557e-15,
16017  1.4084e-15, 1.3627e-15, 1.3185e-15, 1.2757e-15, 1.2342e-15,
16018  1.1941e-15, 1.1552e-15, 1.1177e-15, 1.0813e-15, 1.0461e-15,
16019  1.012e-15, 9.79e-16, 9.4707e-16, 9.1618e-16, 8.8628e-16,
16020  8.5734e-16, 8.2933e-16, 8.0223e-16, 7.76e-16, 7.5062e-16,
16021  7.2606e-16, 7.0229e-16, 6.7929e-16, 6.5703e-16, 6.355e-16,
16022  6.1466e-16, 5.9449e-16, 5.7498e-16, 5.561e-16, 5.3783e-16,
16023  5.2015e-16, 5.0305e-16, 4.865e-16, 4.7049e-16, 4.55e-16,
16024  4.4002e-16, 4.2552e-16, 4.1149e-16, 3.9792e-16, 3.8479e-16,
16025  3.7209e-16, 3.5981e-16, 3.4792e-16, 3.3642e-16, 3.253e-16,
16026  3.1454e-16, 3.0413e-16, 2.9406e-16, 2.8432e-16, 2.749e-16,
16027  2.6579e-16, 2.5697e-16, 2.4845e-16, 2.402e-16, 2.3223e-16,
16028  2.2451e-16, 2.1705e-16, 2.0984e-16, 2.0286e-16, 1.9611e-16,
16029  1.8958e-16, 1.8327e-16, 1.7716e-16, 1.7126e-16, 1.6555e-16,
16030  1.6003e-16, 1.5469e-16, 1.4952e-16, 1.4453e-16, 1.397e-16,
16031  1.3503e-16 } };
16032 
16033 struct s_sh2ob_ {
16034  double e_1[3];
16035  int e_2;
16036  } sh2ob_ = { {-20., 2e4, 10.}, 2003 };
16037 
16038 struct s_s260a_ {
16039  double e_1[2003];
16040  } s260a_ = { {.1775, .17045, .16457, .17045, .1775, .20036, .21347, .22454,
16041  .23428, .23399, .23022, .20724, .19712, .18317, .16724, .1478,
16042  .12757, .11626, .10098, .089033, .07977, .067416, .059588,
16043  .051117, .046218, .042179, .034372, .029863, .025252, .022075,
16044  .019209, .015816, .013932, .011943, .010079, .0087667, .0074094,
16045  .0064967, .0055711, .0048444, .0042552, .0036953, .0032824,
16046  .0029124, .0026102, .002337, .00211, .0019008, .0017145, .0015573,
16047  .0014206, .0012931, .0011803, .0010774, 9.8616e-4, 9.0496e-4,
16048  8.3071e-4, 7.6319e-4, 7.0149e-4, 6.4637e-4, 5.9566e-4, 5.4987e-4,
16049  5.0768e-4, 4.688e-4, 4.3317e-4, 4.0037e-4, 3.7064e-4, 3.4325e-4,
16050  3.1809e-4, 2.9501e-4, 2.7382e-4, 2.543e-4, 2.363e-4, 2.1977e-4,
16051  2.0452e-4, 1.9042e-4, 1.774e-4, 1.6544e-4, 1.5442e-4, 1.4425e-4,
16052  1.3486e-4, 1.2618e-4, 1.1817e-4, 1.1076e-4, 1.0391e-4, 9.7563e-5,
16053  9.1696e-5, 8.6272e-5, 8.1253e-5, 7.6607e-5, 7.2302e-5, 6.8311e-5,
16054  6.4613e-5, 6.1183e-5, 5.8001e-5, 5.5048e-5, 5.2307e-5, 4.9761e-5,
16055  4.7395e-5, 4.5197e-5, 4.3155e-5, 4.1256e-5, 3.9491e-5, 3.7849e-5,
16056  3.6324e-5, 3.4908e-5, 3.3594e-5, 3.2374e-5, 3.1244e-5, 3.0201e-5,
16057  2.924e-5, 2.8356e-5, 2.7547e-5, 2.6814e-5, 2.6147e-5, 2.5551e-5,
16058  2.5029e-5, 2.4582e-5, 2.4203e-5, 2.3891e-5, 2.3663e-5, 2.3531e-5,
16059  2.3483e-5, 2.3516e-5, 2.3694e-5, 2.4032e-5, 2.4579e-5, 2.5234e-5,
16060  2.6032e-5, 2.7119e-5, 2.8631e-5, 3.0848e-5, 3.3262e-5, 3.6635e-5,
16061  4.0732e-5, 4.5923e-5, 5.3373e-5, 6.1875e-5, 7.2031e-5, 8.598e-5,
16062  9.8642e-5, 1.1469e-4, 1.3327e-4, 1.539e-4, 1.7513e-4, 2.0665e-4,
16063  2.3609e-4, 2.622e-4, 2.8677e-4, 3.259e-4, 3.8624e-4, 4.157e-4,
16064  4.5207e-4, 4.9336e-4, 5.45e-4, 5.8258e-4, 5.8086e-4, 5.6977e-4,
16065  5.3085e-4, 4.802e-4, 4.3915e-4, 4.0343e-4, 3.7853e-4, 3.7025e-4,
16066  3.9637e-4, 4.4675e-4, 4.7072e-4, 4.9022e-4, 5.2076e-4, 5.3676e-4,
16067  5.2755e-4, 4.8244e-4, 4.5473e-4, 4.3952e-4, 3.9614e-4, 3.4086e-4,
16068  2.9733e-4, 2.6367e-4, 2.3767e-4, 2.0427e-4, 1.7595e-4, 1.5493e-4,
16069  1.3851e-4, 1.1874e-4, 1.0735e-4, 9.049e-5, 8.1149e-5, 7.4788e-5,
16070  6.5438e-5, 5.8248e-5, 4.8076e-5, 4.3488e-5, 3.7856e-5, 3.3034e-5,
16071  2.9592e-5, 2.6088e-5, 2.3497e-5, 2.0279e-5, 1.7526e-5, 1.5714e-5,
16072  1.3553e-5, 1.2145e-5, 1.0802e-5, 9.7681e-6, 8.8196e-6, 7.8291e-6,
16073  7.1335e-6, 6.4234e-6, 5.8391e-6, 5.3532e-6, 4.9079e-6, 4.5378e-6,
16074  4.1716e-6, 3.8649e-6, 3.5893e-6, 3.3406e-6, 3.1199e-6, 2.9172e-6,
16075  2.7348e-6, 2.5644e-6, 2.4086e-6, 2.2664e-6, 2.1359e-6, 2.0159e-6,
16076  1.9051e-6, 1.8031e-6, 1.7074e-6, 1.6185e-6, 1.5356e-6, 1.4584e-6,
16077  1.3861e-6, 1.3179e-6, 1.2545e-6, 1.1951e-6, 1.1395e-6, 1.0873e-6,
16078  1.0384e-6, 9.925e-7, 9.4935e-7, 9.0873e-7, 8.705e-7, 8.3446e-7,
16079  8.0046e-7, 7.6834e-7, 7.38e-7, 7.0931e-7, 6.8217e-7, 6.5648e-7,
16080  6.3214e-7, 6.0909e-7, 5.8725e-7, 5.6655e-7, 5.4693e-7, 5.2835e-7,
16081  5.1077e-7, 4.9416e-7, 4.7853e-7, 4.6381e-7, 4.5007e-7, 4.3728e-7,
16082  4.255e-7, 4.145e-7, 4.0459e-7, 3.9532e-7, 3.8662e-7, 3.7855e-7,
16083  3.7041e-7, 3.6254e-7, 3.542e-7, 3.4617e-7, 3.3838e-7, 3.3212e-7,
16084  3.2655e-7, 3.1865e-7, 3.1203e-7, 3.067e-7, 3.0252e-7, 2.9749e-7,
16085  2.9184e-7, 2.8795e-7, 2.8501e-7, 2.8202e-7, 2.7856e-7, 2.7509e-7,
16086  2.7152e-7, 2.6844e-7, 2.6642e-7, 2.6548e-7, 2.6617e-7, 2.6916e-7,
16087  2.7372e-7, 2.8094e-7, 2.9236e-7, 3.1035e-7, 3.2854e-7, 3.5481e-7,
16088  3.9377e-7, 4.4692e-7, 5.0761e-7, 5.7715e-7, 6.7725e-7, 8.0668e-7,
16089  9.3716e-7, 1.0797e-6, 1.1689e-6, 1.3217e-6, 1.4814e-6, 1.5627e-6,
16090  1.6519e-6, 1.7601e-6, 1.906e-6, 2.0474e-6, 2.0716e-6, 2.0433e-6,
16091  1.9752e-6, 1.8466e-6, 1.7526e-6, 1.6657e-6, 1.587e-6, 1.5633e-6,
16092  1.652e-6, 1.8471e-6, 1.9953e-6, 2.0975e-6, 2.2016e-6, 2.2542e-6,
16093  2.3081e-6, 2.3209e-6, 2.2998e-6, 2.3056e-6, 2.2757e-6, 2.2685e-6,
16094  2.2779e-6, 2.2348e-6, 2.2445e-6, 2.3174e-6, 2.4284e-6, 2.529e-6,
16095  2.734e-6, 2.972e-6, 3.2332e-6, 3.5392e-6, 3.9013e-6, 4.3334e-6,
16096  4.9088e-6, 5.3428e-6, 5.9142e-6, 6.6106e-6, 7.4709e-6, 8.5019e-6,
16097  9.6835e-6, 1.0984e-5, 1.2831e-5, 1.4664e-5, 1.708e-5, 2.0103e-5,
16098  2.4148e-5, 2.7948e-5, 3.2855e-5, 3.9046e-5, 4.6429e-5, 5.6633e-5,
16099  6.6305e-5, 7.6048e-5, 8.7398e-5, 1.0034e-4, 1.1169e-4, 1.2813e-4,
16100  1.3354e-4, 1.3952e-4, 1.4204e-4, 1.4615e-4, 1.5144e-4, 1.5475e-4,
16101  1.6561e-4, 1.7135e-4, 1.6831e-4, 1.6429e-4, 1.6353e-4, 1.6543e-4,
16102  1.5944e-4, 1.5404e-4, 1.5458e-4, 1.6287e-4, 1.7277e-4, 1.8387e-4,
16103  1.7622e-4, 1.636e-4, 1.5273e-4, 1.3667e-4, 1.2364e-4, 9.7576e-5,
16104  7.914e-5, 6.4241e-5, 5.1826e-5, 4.1415e-5, 3.1347e-5, 2.5125e-5,
16105  2.0027e-5, 1.6362e-5, 1.3364e-5, 1.1117e-5, 9.4992e-6, 8.1581e-6,
16106  7.1512e-6, 6.2692e-6, 5.5285e-6, 4.9e-6, 4.3447e-6, 3.8906e-6,
16107  3.4679e-6, 3.1089e-6, 2.8115e-6, 2.5496e-6, 2.2982e-6, 2.0861e-6,
16108  1.8763e-6, 1.7035e-6, 1.5548e-6, 1.4107e-6, 1.2839e-6, 1.1706e-6,
16109  1.0709e-6, 9.8099e-7, 8.9901e-7, 8.2394e-7, 7.5567e-7, 6.9434e-7,
16110  6.3867e-7, 5.8845e-7, 5.4263e-7, 5.0033e-7, 4.6181e-7, 4.2652e-7,
16111  3.9437e-7, 3.6497e-7, 3.3781e-7, 3.1292e-7, 2.9011e-7, 2.6915e-7,
16112  2.4989e-7, 2.3215e-7, 2.1582e-7, 2.0081e-7, 1.87e-7, 1.7432e-7,
16113  1.6264e-7, 1.5191e-7, 1.4207e-7, 1.3306e-7, 1.2484e-7, 1.1737e-7,
16114  1.1056e-7, 1.0451e-7, 9.906e-8, 9.4135e-8, 8.9608e-8, 8.5697e-8,
16115  8.1945e-8, 7.8308e-8, 7.4808e-8, 7.1686e-8, 6.8923e-8, 6.5869e-8,
16116  6.3308e-8, 6.084e-8, 5.8676e-8, 5.6744e-8, 5.5016e-8, 5.3813e-8,
16117  5.2792e-8, 5.2097e-8, 5.1737e-8, 5.1603e-8, 5.1656e-8, 5.1989e-8,
16118  5.2467e-8, 5.2918e-8, 5.3589e-8, 5.456e-8, 5.5869e-8, 5.7403e-8,
16119  5.8968e-8, 6.0973e-8, 6.3432e-8, 6.6245e-8, 6.9353e-8, 7.2686e-8,
16120  7.6541e-8, 8.0991e-8, 8.595e-8, 9.1429e-8, 9.7851e-8, 1.0516e-7,
16121  1.1349e-7, 1.2295e-7, 1.3335e-7, 1.4488e-7, 1.5864e-7, 1.7412e-7,
16122  1.914e-7, 2.1078e-7, 2.3369e-7, 2.5996e-7, 2.8848e-7, 3.2169e-7,
16123  3.5991e-7, 4.0566e-7, 4.5969e-7, 5.3094e-7, 6.1458e-7, 7.1155e-7,
16124  8.3045e-7, 9.9021e-7, 1.2042e-6, 1.4914e-6, 1.8145e-6, 2.221e-6,
16125  2.7831e-6, 3.4533e-6, 4.4446e-6, 5.1989e-6, 6.2289e-6, 7.1167e-6,
16126  8.3949e-6, 9.6417e-6, 1.0313e-5, 1.0485e-5, 1.0641e-5, 1.0898e-5,
16127  1.0763e-5, 1.0506e-5, 1.0497e-5, 1.1696e-5, 1.2654e-5, 1.3029e-5,
16128  1.3175e-5, 1.4264e-5, 1.4985e-5, 1.4999e-5, 1.4317e-5, 1.4616e-5,
16129  1.4963e-5, 1.5208e-5, 1.4942e-5, 1.3879e-5, 1.3087e-5, 1.1727e-5,
16130  1.0515e-5, 9.0073e-6, 7.3133e-6, 6.1181e-6, 5.0623e-6, 4.1105e-6,
16131  3.3915e-6, 2.6711e-6, 2.1464e-6, 1.7335e-6, 1.4302e-6, 1.1847e-6,
16132  9.9434e-7, 8.2689e-7, 7.0589e-7, 6.075e-7, 5.3176e-7, 4.6936e-7,
16133  4.1541e-7, 3.6625e-7, 3.2509e-7, 2.9156e-7, 2.6308e-7, 2.3819e-7,
16134  2.1421e-7, 1.9366e-7, 1.7626e-7, 1.5982e-7, 1.4567e-7, 1.3354e-7,
16135  1.2097e-7, 1.1029e-7, 1.0063e-7, 9.2003e-8, 8.4245e-8, 7.7004e-8,
16136  7.0636e-8, 6.4923e-8, 5.9503e-8, 5.4742e-8, 5.045e-8, 4.647e-8,
16137  4.2881e-8, 3.955e-8, 3.6541e-8, 3.3803e-8, 3.1279e-8, 2.8955e-8,
16138  2.6858e-8, 2.4905e-8, 2.3146e-8, 2.1539e-8, 2.0079e-8, 1.8746e-8,
16139  1.7517e-8, 1.6396e-8, 1.5369e-8, 1.4426e-8, 1.3543e-8, 1.2724e-8,
16140  1.1965e-8, 1.1267e-8, 1.0617e-8, 1.001e-8, 9.4662e-9, 8.9553e-9,
16141  8.4988e-9, 8.0807e-9, 7.7043e-9, 7.3721e-9, 7.0707e-9, 6.8047e-9,
16142  6.5702e-9, 6.3634e-9, 6.1817e-9, 6.0239e-9, 5.8922e-9, 5.7824e-9,
16143  5.7019e-9, 5.6368e-9, 5.594e-9, 5.5669e-9, 5.5583e-9, 5.5653e-9,
16144  5.5837e-9, 5.6243e-9, 5.6883e-9, 5.78e-9, 5.8964e-9, 6.0429e-9,
16145  6.2211e-9, 6.4282e-9, 6.6634e-9, 6.9306e-9, 7.2336e-9, 7.5739e-9,
16146  7.9562e-9, 8.3779e-9, 8.8575e-9, 9.3992e-9, 1.0004e-8, 1.0684e-8,
16147  1.145e-8, 1.232e-8, 1.3311e-8, 1.4455e-8, 1.5758e-8, 1.7254e-8,
16148  1.8927e-8, 2.093e-8, 2.3348e-8, 2.6074e-8, 2.9221e-8, 3.277e-8,
16149  3.7485e-8, 4.2569e-8, 4.8981e-8, 5.5606e-8, 6.2393e-8, 7.1901e-8,
16150  8.2921e-8, 9.5513e-8, 1.1111e-7, 1.3143e-7, 1.5971e-7, 1.8927e-7,
16151  2.2643e-7, 2.786e-7, 3.2591e-7, 3.7024e-7, 4.2059e-7, 4.9432e-7,
16152  5.5543e-7, 5.7498e-7, 5.921e-7, 6.1005e-7, 6.1577e-7, 5.9193e-7,
16153  5.6602e-7, 5.7403e-7, 6.005e-7, 6.4723e-7, 6.7073e-7, 7.5415e-7,
16154  8.0982e-7, 8.7658e-7, 9.143e-7, 9.4459e-7, 9.8347e-7, 9.8768e-7,
16155  1.0153e-6, 1.0066e-6, 1.0353e-6, 1.0353e-6, 1.0722e-6, 1.1138e-6,
16156  1.1923e-6, 1.2947e-6, 1.4431e-6, 1.6537e-6, 1.8662e-6, 2.2473e-6,
16157  2.6464e-6, 3.1041e-6, 3.4858e-6, 4.0167e-6, 4.6675e-6, 5.0983e-6,
16158  5.7997e-6, 6.0503e-6, 6.4687e-6, 6.5396e-6, 6.7986e-6, 7.0244e-6,
16159  7.2305e-6, 7.6732e-6, 7.9783e-6, 7.9846e-6, 7.7617e-6, 7.7657e-6,
16160  7.7411e-6, 7.8816e-6, 7.8136e-6, 8.0051e-6, 8.5799e-6, 9.1659e-6,
16161  9.8646e-6, 9.492e-6, 8.767e-6, 8.2034e-6, 7.2297e-6, 6.2324e-6,
16162  4.9315e-6, 3.9128e-6, 3.1517e-6, 2.4469e-6, 1.8815e-6, 1.4627e-6,
16163  1.1698e-6, 9.4686e-7, 7.8486e-7, 6.697e-7, 5.8811e-7, 5.2198e-7,
16164  4.6809e-7, 4.1671e-7, 3.7006e-7, 3.3066e-7, 2.9387e-7, 2.6415e-7,
16165  2.3409e-7, 2.0991e-7, 1.9132e-7, 1.7519e-7, 1.5939e-7, 1.4368e-7,
16166  1.305e-7, 1.1883e-7, 1.0772e-7, 9.6884e-8, 8.7888e-8, 7.8956e-8,
16167  7.1024e-8, 6.3824e-8, 5.7256e-8, 5.1769e-8, 4.7037e-8, 4.2901e-8,
16168  3.897e-8, 3.5467e-8, 3.2502e-8, 2.9827e-8, 2.7389e-8, 2.5111e-8,
16169  2.3056e-8, 2.1267e-8, 1.961e-8, 1.8133e-8, 1.6775e-8, 1.5491e-8,
16170  1.4329e-8, 1.3265e-8, 1.23e-8, 1.142e-8, 1.0593e-8, 9.8475e-9,
16171  9.1585e-9, 8.5256e-9, 7.9525e-9, 7.4226e-9, 6.9379e-9, 6.495e-9,
16172  6.0911e-9, 5.7242e-9, 5.3877e-9, 5.0821e-9, 4.8051e-9, 4.5554e-9,
16173  4.3315e-9, 4.1336e-9, 3.9632e-9, 3.8185e-9, 3.708e-9, 3.6296e-9,
16174  3.5804e-9, 3.5776e-9, 3.6253e-9, 3.7115e-9, 3.8151e-9, 3.9804e-9,
16175  4.1742e-9, 4.3581e-9, 4.5306e-9, 4.7736e-9, 5.1297e-9, 5.5291e-9,
16176  5.9125e-9, 6.4956e-9, 7.0362e-9, 7.5318e-9, 7.9947e-9, 8.6438e-9,
16177  9.7227e-9, 1.013e-8, 1.0549e-8, 1.1064e-8, 1.1702e-8, 1.2043e-8,
16178  1.1781e-8, 1.1838e-8, 1.1917e-8, 1.2131e-8, 1.2476e-8, 1.3611e-8,
16179  1.436e-8, 1.5057e-8, 1.6247e-8, 1.7284e-8, 1.842e-8, 1.8352e-8,
16180  1.8722e-8, 1.9112e-8, 1.9092e-8, 1.9311e-8, 1.9411e-8, 1.9884e-8,
16181  2.0508e-8, 2.151e-8, 2.3143e-8, 2.505e-8, 2.7596e-8, 3.1231e-8,
16182  3.626e-8, 4.341e-8, 5.224e-8, 6.3236e-8, 7.7522e-8, 9.8688e-8,
16183  1.1859e-7, 1.4341e-7, 1.6798e-7, 1.9825e-7, 2.2898e-7, 2.6257e-7,
16184  2.9884e-7, 3.3247e-7, 3.4936e-7, 3.5583e-7, 3.715e-7, 3.658e-7,
16185  3.7124e-7, 3.703e-7, 4.1536e-7, 4.6656e-7, 4.6677e-7, 4.7507e-7,
16186  4.9653e-7, 5.3795e-7, 5.4957e-7, 5.2238e-7, 5.469e-7, 5.6569e-7,
16187  5.9844e-7, 5.9835e-7, 5.6522e-7, 5.4123e-7, 4.7904e-7, 4.2851e-7,
16188  3.5603e-7, 2.8932e-7, 2.3655e-7, 1.8592e-7, 1.4943e-7, 1.1971e-7,
16189  9.8482e-8, 8.3675e-8, 7.127e-8, 6.2496e-8, 5.4999e-8, 4.9821e-8,
16190  4.5387e-8, 4.134e-8, 3.7453e-8, 3.3298e-8, 3.012e-8, 2.7032e-8,
16191  2.4236e-8, 2.15e-8, 1.8988e-8, 1.7414e-8, 1.5706e-8, 1.4192e-8,
16192  1.3204e-8, 1.1759e-8, 1.0737e-8, 9.6309e-9, 8.8179e-9, 8.2619e-9,
16193  7.2264e-9, 6.4856e-9, 5.8037e-9, 5.2093e-9, 4.7205e-9, 4.1749e-9,
16194  3.7852e-9, 3.3915e-9, 3.0089e-9, 2.7335e-9, 2.4398e-9, 2.2031e-9,
16195  1.9786e-9, 1.789e-9, 1.6266e-9, 1.483e-9, 1.3576e-9, 1.2518e-9,
16196  1.1587e-9, 1.0726e-9, 9.9106e-10, 9.1673e-10, 8.5084e-10,
16197  7.9147e-10, 7.2882e-10, 6.7342e-10, 6.2593e-10, 5.8294e-10,
16198  5.4435e-10, 5.0997e-10, 4.7806e-10, 4.4931e-10, 4.2357e-10,
16199  4.0023e-10, 3.7909e-10, 3.5999e-10, 3.4285e-10, 3.2776e-10,
16200  3.1468e-10, 3.0377e-10, 2.9479e-10, 2.8877e-10, 2.8512e-10,
16201  2.8617e-10, 2.8976e-10, 3.0001e-10, 3.1718e-10, 3.3898e-10,
16202  3.5857e-10, 3.8358e-10, 4.3131e-10, 4.5741e-10, 4.6948e-10,
16203  4.7594e-10, 4.9529e-10, 5.1563e-10, 4.9475e-10, 4.8369e-10,
16204  4.8829e-10, 5.0047e-10, 5.0203e-10, 5.1954e-10, 5.5352e-10,
16205  5.9928e-10, 6.7148e-10, 7.1121e-10, 7.4317e-10, 7.6039e-10,
16206  7.8313e-10, 8.0684e-10, 7.8553e-10, 7.8312e-10, 7.8537e-10,
16207  7.8872e-10, 8.0185e-10, 8.1004e-10, 8.2608e-10, 8.2525e-10,
16208  8.3857e-10, 8.792e-10, 9.2451e-10, 9.8661e-10, 1.0629e-9,
16209  1.1659e-9, 1.2922e-9, 1.4387e-9, 1.6254e-9, 1.8425e-9, 2.1428e-9,
16210  2.5477e-9, 3.0379e-9, 3.757e-9, 4.4354e-9, 5.1802e-9, 6.2769e-9,
16211  7.4894e-9, 8.7474e-9, 9.8037e-9, 1.1582e-8, 1.3293e-8, 1.4471e-8,
16212  1.5025e-8, 1.558e-8, 1.6228e-8, 1.6413e-8, 1.602e-8, 1.6393e-8,
16213  1.7545e-8, 1.959e-8, 2.1449e-8, 2.3856e-8, 2.705e-8, 3.0214e-8,
16214  3.3733e-8, 3.6487e-8, 3.9353e-8, 4.266e-8, 4.6385e-8, 4.9955e-8,
16215  5.5313e-8, 6.0923e-8, 6.8948e-8, 7.3649e-8, 8.2602e-8, 9.2212e-8,
16216  9.908e-8, 1.1319e-7, 1.179e-7, 1.2941e-7, 1.3199e-7, 1.3914e-7,
16217  1.4843e-7, 1.53e-7, 1.6419e-7, 1.7095e-7, 1.6988e-7, 1.6494e-7,
16218  1.6327e-7, 1.6067e-7, 1.6909e-7, 1.7118e-7, 1.8106e-7, 1.9857e-7,
16219  2.1696e-7, 2.3385e-7, 2.2776e-7, 2.1402e-7, 1.9882e-7, 1.7362e-7,
16220  1.4308e-7, 1.1158e-7, 8.8781e-8, 6.8689e-8, 5.2062e-8, 4.0427e-8,
16221  3.2669e-8, 2.7354e-8, 2.32e-8, 2.058e-8, 1.8676e-8, 1.7329e-8,
16222  1.6621e-8, 1.6433e-8, 1.6953e-8, 1.7134e-8, 1.7948e-8, 1.9107e-8,
16223  1.9875e-8, 2.1416e-8, 2.1556e-8, 2.2265e-8, 2.2171e-8, 2.2534e-8,
16224  2.3029e-8, 2.2828e-8, 2.3143e-8, 2.2965e-8, 2.2223e-8, 2.1108e-8,
16225  2.0265e-8, 1.9516e-8, 1.9941e-8, 2.0312e-8, 2.108e-8, 2.2611e-8,
16226  2.421e-8, 2.6069e-8, 2.5097e-8, 2.3318e-8, 2.1543e-8, 1.8942e-8,
16227  1.596e-8, 1.2386e-8, 9.934e-9, 7.7502e-9, 5.9462e-9, 4.5113e-9,
16228  3.5523e-9, 2.8844e-9, 2.3394e-9, 1.9584e-9, 1.6749e-9, 1.4624e-9,
16229  1.2809e-9, 1.1359e-9, 1.0087e-9, 9.0166e-10, 8.1079e-10,
16230  7.2219e-10, 6.4922e-10, 5.8803e-10, 5.329e-10, 4.859e-10,
16231  4.4111e-10, 4.0184e-10, 3.6644e-10, 3.3529e-10, 3.0789e-10,
16232  2.8286e-10, 2.6089e-10, 2.4125e-10, 2.2355e-10, 2.0783e-10,
16233  1.937e-10, 1.8088e-10, 1.6948e-10, 1.5929e-10, 1.5013e-10,
16234  1.4193e-10, 1.347e-10, 1.2841e-10, 1.2307e-10, 1.1865e-10,
16235  1.1502e-10, 1.1243e-10, 1.1099e-10, 1.1066e-10, 1.1216e-10,
16236  1.1529e-10, 1.2171e-10, 1.3128e-10, 1.4153e-10, 1.5962e-10,
16237  1.8048e-10, 2.0936e-10, 2.3165e-10, 2.5746e-10, 2.96e-10,
16238  3.3707e-10, 3.5267e-10, 3.5953e-10, 3.6822e-10, 3.8363e-10,
16239  3.8286e-10, 3.5883e-10, 3.6154e-10, 3.6653e-10, 3.8507e-10,
16240  4.025e-10, 4.4435e-10, 4.9889e-10, 5.6932e-10, 6.3599e-10,
16241  7.0281e-10, 7.5777e-10, 8.1279e-10, 8.891e-10, 9.34e-10,
16242  1.0076e-9, 1.0945e-9, 1.1898e-9, 1.3108e-9, 1.4725e-9, 1.7028e-9,
16243  1.9619e-9, 2.3527e-9, 2.6488e-9, 3.0327e-9, 3.4396e-9, 3.8797e-9,
16244  4.4115e-9, 4.6853e-9, 4.9553e-9, 4.9551e-9, 5.1062e-9, 5.0996e-9,
16245  5.1119e-9, 5.2283e-9, 5.8297e-9, 6.3439e-9, 6.2675e-9, 6.3296e-9,
16246  6.5173e-9, 7.1685e-9, 7.0528e-9, 6.8856e-9, 7.3182e-9, 7.699e-9,
16247  8.3461e-9, 8.1946e-9, 7.7153e-9, 7.2411e-9, 6.4511e-9, 5.7336e-9,
16248  4.6105e-9, 3.6962e-9, 2.9944e-9, 2.4317e-9, 1.9399e-9, 1.5331e-9,
16249  1.2633e-9, 1.0613e-9, 9.0136e-10, 7.9313e-10, 7.1543e-10,
16250  6.6485e-10, 6.4225e-10, 6.398e-10, 6.4598e-10, 6.7428e-10,
16251  7.027e-10, 7.4694e-10, 7.7946e-10, 7.9395e-10, 7.8716e-10,
16252  7.6933e-10, 7.622e-10, 7.4825e-10, 7.4805e-10, 7.6511e-10,
16253  7.6492e-10, 7.4103e-10, 7.1979e-10, 7.1686e-10, 7.3403e-10,
16254  7.1142e-10, 7.0212e-10, 7.1548e-10, 7.5253e-10, 8.0444e-10,
16255  8.2378e-10, 7.8004e-10, 7.1712e-10, 6.4978e-10, 5.7573e-10,
16256  4.8675e-10, 3.7945e-10, 3.0118e-10, 2.4241e-10, 1.91e-10,
16257  1.4816e-10, 1.1567e-10, 9.4183e-11, 7.766e-11, 6.527e-11,
16258  5.6616e-11, 4.9576e-11, 4.4137e-11, 3.9459e-11, 3.5759e-11,
16259  3.2478e-11, 2.9419e-11, 2.6703e-11, 2.4365e-11, 2.2412e-11,
16260  2.0606e-11, 1.9067e-11, 1.78e-11, 1.6695e-11, 1.5729e-11,
16261  1.4887e-11, 1.4135e-11, 1.3519e-11, 1.2992e-11, 1.2563e-11,
16262  1.2223e-11, 1.1962e-11, 1.1775e-11, 1.1657e-11, 1.1605e-11,
16263  1.1619e-11, 1.1697e-11, 1.1839e-11, 1.2046e-11, 1.2319e-11,
16264  1.2659e-11, 1.307e-11, 1.3553e-11, 1.4113e-11, 1.4754e-11,
16265  1.548e-11, 1.6298e-11, 1.7214e-11, 1.8236e-11, 1.9372e-11,
16266  2.0635e-11, 2.2036e-11, 2.359e-11, 2.5317e-11, 2.7242e-11,
16267  2.94e-11, 3.1849e-11, 3.4654e-11, 3.7923e-11, 4.1695e-11,
16268  4.6055e-11, 5.094e-11, 5.5624e-11, 6.0667e-11, 6.6261e-11,
16269  7.2692e-11, 7.9711e-11, 8.7976e-11, 9.6884e-11, 1.0775e-10,
16270  1.2093e-10, 1.3531e-10, 1.5404e-10, 1.7315e-10, 1.9862e-10,
16271  2.3341e-10, 2.7014e-10, 3.1716e-10, 3.6957e-10, 4.3233e-10,
16272  5.2566e-10, 6.2251e-10, 7.2149e-10, 8.3958e-10, 9.5931e-10,
16273  1.1388e-9, 1.2973e-9, 1.4442e-9, 1.5638e-9, 1.6974e-9, 1.8489e-9,
16274  1.983e-9, 2.172e-9, 2.3662e-9, 2.6987e-9, 3.1697e-9, 3.6907e-9,
16275  4.2625e-9, 4.7946e-9, 5.3848e-9, 6.0897e-9, 6.473e-9, 7.1483e-9,
16276  7.7432e-9, 8.0851e-9, 8.5013e-9, 8.5909e-9, 9.189e-9, 9.3124e-9,
16277  9.5936e-9, 9.8787e-9, 9.9036e-9, 9.6712e-9, 9.2036e-9, 9.0466e-9,
16278  8.938e-9, 9.1815e-9, 9.5092e-9, 1.0027e-8, 1.0876e-8, 1.1744e-8,
16279  1.1853e-8, 1.1296e-8, 1.0134e-8, 8.8245e-9, 7.393e-9, 5.715e-9,
16280  4.4884e-9, 3.4027e-9, 2.6054e-9, 2.079e-9, 1.7267e-9, 1.4724e-9,
16281  1.2722e-9, 1.1234e-9, 1.0186e-9, 9.468e-10, 8.8854e-10,
16282  8.5127e-10, 8.3157e-10, 8.2226e-10, 8.3395e-10, 8.3294e-10,
16283  8.4725e-10, 8.8814e-10, 9.3697e-10, 1.0112e-9, 1.0412e-9,
16284  1.0948e-9, 1.181e-9, 1.2267e-9, 1.369e-9, 1.4512e-9, 1.5568e-9,
16285  1.6552e-9, 1.7321e-9, 1.8797e-9, 1.921e-9, 1.9686e-9, 1.9917e-9,
16286  1.9357e-9, 1.8486e-9, 1.7575e-9, 1.7113e-9, 1.7163e-9, 1.7623e-9,
16287  1.8536e-9, 1.9765e-9, 2.1334e-9, 2.3237e-9, 2.3259e-9, 2.1833e-9,
16288  1.9785e-9, 1.7308e-9, 1.4596e-9, 1.1198e-9, 8.7375e-10,
16289  6.5381e-10, 4.8677e-10, 3.6756e-10, 2.9155e-10, 2.3735e-10,
16290  1.959e-10, 1.6638e-10, 1.4549e-10, 1.2947e-10, 1.1511e-10,
16291  1.0548e-10, 9.6511e-11, 9.0469e-11, 8.517e-11, 7.7804e-11,
16292  7.1971e-11, 6.6213e-11, 6.1063e-11, 5.5881e-11, 5.0508e-11,
16293  4.5932e-11, 4.1997e-11, 3.7672e-11, 3.3972e-11, 3.0318e-11,
16294  2.6769e-11, 2.3874e-11, 2.1336e-11, 1.9073e-11, 1.7313e-11,
16295  1.5904e-11, 1.4684e-11, 1.3698e-11, 1.2873e-11, 1.2175e-11,
16296  1.1542e-11, 1.1024e-11, 1.0602e-11, 1.0267e-11, 1.0012e-11,
16297  9.8379e-12, 9.7482e-12, 9.7564e-12, 9.8613e-12, 1.0092e-11,
16298  1.0418e-11, 1.0868e-11, 1.1585e-11, 1.2351e-11, 1.3372e-11,
16299  1.4841e-11, 1.6457e-11, 1.8681e-11, 2.055e-11, 2.2912e-11,
16300  2.5958e-11, 2.9137e-11, 3.2368e-11, 3.4848e-11, 3.8462e-11,
16301  4.219e-11, 4.5629e-11, 4.9022e-11, 5.4232e-11, 6.19e-11,
16302  7.1953e-11, 8.5368e-11, 9.9699e-11, 1.1734e-10, 1.4185e-10,
16303  1.7017e-10, 1.9813e-10, 2.3859e-10, 2.7304e-10, 3.0971e-10,
16304  3.5129e-10, 3.9405e-10, 4.5194e-10, 4.8932e-10, 5.2436e-10,
16305  5.4098e-10, 5.5542e-10, 5.7794e-10, 5.6992e-10, 5.879e-10,
16306  6.1526e-10, 6.8034e-10, 6.7956e-10, 6.6864e-10, 6.9329e-10,
16307  7.2971e-10, 7.6546e-10, 7.5078e-10, 7.8406e-10, 8.3896e-10,
16308  9.0111e-10, 9.1994e-10, 8.7189e-10, 8.1426e-10, 7.3097e-10,
16309  6.3357e-10, 5.1371e-10, 4.0936e-10, 3.2918e-10, 2.6255e-10,
16310  2.0724e-10, 1.6879e-10, 1.4165e-10, 1.1989e-10, 1.0125e-10,
16311  8.9629e-11, 7.8458e-11, 6.8826e-11, 6.0935e-11, 5.5208e-11,
16312  5.2262e-11, 5.026e-11, 4.8457e-11, 4.7888e-11, 4.8032e-11,
16313  5.0838e-11, 5.4668e-11, 5.579e-11, 6.0056e-11, 6.3811e-11,
16314  6.8848e-11, 7.459e-11, 7.8249e-11, 8.3371e-11, 8.3641e-11,
16315  8.6591e-11, 8.9599e-11, 9.3487e-11, 1.0066e-10, 1.0765e-10,
16316  1.0851e-10, 1.0619e-10, 1.0557e-10, 1.046e-10, 1.0796e-10,
16317  1.0523e-10, 1.0674e-10, 1.1261e-10, 1.1431e-10, 1.1408e-10,
16318  1.0901e-10, 9.9105e-11, 8.8077e-11, 6.9928e-11, 5.4595e-11,
16319  4.5401e-11, 3.6313e-11, 2.6986e-11, 1.9463e-11, 1.4577e-11,
16320  1.1583e-11, 9.5492e-12, 8.077e-12, 6.9642e-12, 6.0966e-12,
16321  5.4046e-12, 4.8431e-12, 4.3815e-12, 3.9987e-12, 3.679e-12,
16322  3.4113e-12, 3.1868e-12, 2.9992e-12, 2.8434e-12, 2.7153e-12,
16323  2.612e-12, 2.5311e-12, 2.4705e-12, 2.429e-12, 2.4053e-12,
16324  2.3988e-12, 2.4087e-12, 2.4349e-12, 2.4771e-12, 2.5355e-12,
16325  2.6103e-12, 2.7019e-12, 2.811e-12, 2.9383e-12, 3.0848e-12,
16326  3.2518e-12, 3.4405e-12, 3.6527e-12, 3.8902e-12, 4.1555e-12,
16327  4.451e-12, 4.7801e-12, 5.1462e-12, 5.5539e-12, 6.0086e-12,
16328  6.5171e-12, 7.0884e-12, 7.7357e-12, 8.4831e-12, 9.3096e-12,
16329  1.0282e-11, 1.1407e-11, 1.269e-11, 1.4148e-11, 1.5888e-11,
16330  1.7992e-11, 2.0523e-11, 2.3342e-11, 2.6578e-11, 3.0909e-11,
16331  3.6228e-11, 4.2053e-11, 4.9059e-11, 5.9273e-11, 7.0166e-11,
16332  8.2298e-11, 9.7071e-11, 1.1673e-10, 1.401e-10, 1.6621e-10,
16333  2.0127e-10, 2.3586e-10, 2.705e-10, 3.095e-10, 3.6584e-10,
16334  4.1278e-10, 4.6591e-10, 5.222e-10, 5.5246e-10, 6.15e-10,
16335  6.5878e-10, 7.1167e-10, 7.9372e-10, 8.6975e-10, 9.6459e-10,
16336  9.7368e-10, 9.8142e-10, 1.0202e-9, 1.02e-9, 1.0356e-9, 1.0092e-9,
16337  1.0269e-9, 1.0366e-9, 1.049e-9, 1.0717e-9, 1.0792e-9, 1.1016e-9,
16338  1.0849e-9, 1.0929e-9, 1.0971e-9, 1.0969e-9, 1.046e-9, 9.2026e-10,
16339  8.1113e-10, 6.8635e-10, 5.5369e-10, 4.2908e-10, 3.3384e-10,
16340  2.648e-10, 2.081e-10, 1.6915e-10, 1.4051e-10, 1.1867e-10,
16341  1.0158e-10, 8.899e-11, 7.9175e-11, 7.044e-11, 6.3453e-11,
16342  5.7009e-11, 5.1662e-11, 4.7219e-11, 4.3454e-11, 4.0229e-11,
16343  3.7689e-11, 3.6567e-11, 3.5865e-11, 3.5955e-11, 3.5928e-11,
16344  3.6298e-11, 3.7629e-11, 3.93e-11, 4.1829e-11, 4.4806e-11,
16345  5.0534e-11, 5.6672e-11, 6.2138e-11, 6.8678e-11, 7.6111e-11,
16346  8.4591e-11, 9.2634e-11, 9.8085e-11, 1.083e-10, 1.1949e-10,
16347  1.2511e-10, 1.3394e-10, 1.3505e-10, 1.4342e-10, 1.4874e-10,
16348  1.492e-10, 1.5872e-10, 1.5972e-10, 1.5821e-10, 1.5425e-10,
16349  1.4937e-10, 1.5089e-10, 1.5521e-10, 1.6325e-10, 1.6924e-10,
16350  1.8265e-10, 1.9612e-10, 2.0176e-10, 1.9359e-10, 1.7085e-10,
16351  1.5197e-10, 1.2646e-10, 9.8552e-11, 7.453e-11, 5.5052e-11,
16352  4.2315e-11, 3.2736e-11, 2.6171e-11, 2.1909e-11, 1.8286e-11,
16353  1.5752e-11, 1.3859e-11, 1.2288e-11, 1.1002e-11, 9.7534e-12,
16354  8.8412e-12, 8.0169e-12, 7.2855e-12, 6.8734e-12, 6.4121e-12,
16355  6.1471e-12, 5.778e-12, 5.3478e-12, 4.9652e-12, 4.4043e-12,
16356  3.9862e-12, 3.4684e-12, 2.9681e-12, 2.5791e-12, 2.2339e-12,
16357  1.9247e-12, 1.6849e-12, 1.4863e-12, 1.3291e-12, 1.2021e-12,
16358  1.0947e-12, 1.0015e-12, 9.1935e-13, 8.4612e-13, 7.8036e-13,
16359  7.21e-13, 6.6718e-13, 6.1821e-13, 5.7353e-13, 5.3269e-13,
16360  4.9526e-13, 4.6093e-13, 4.2937e-13, 4.0034e-13, 3.7361e-13,
16361  3.4895e-13, 3.2621e-13, 3.052e-13, 2.8578e-13, 2.6782e-13,
16362  2.512e-13, 2.3581e-13, 2.2154e-13, 2.0832e-13, 1.9605e-13,
16363  1.8466e-13, 1.7408e-13, 1.6425e-13, 1.5511e-13, 1.4661e-13,
16364  1.3869e-13, 1.3131e-13, 1.2444e-13, 1.1803e-13, 1.1205e-13,
16365  1.0646e-13, 1.0124e-13, 9.6358e-14, 9.1789e-14, 8.7509e-14,
16366  8.3498e-14, 7.9735e-14, 7.6202e-14, 7.2882e-14, 6.976e-14,
16367  6.6822e-14, 6.4053e-14, 6.1442e-14, 5.8978e-14, 5.665e-14,
16368  5.4448e-14, 5.2364e-14, 5.0389e-14, 4.8516e-14, 4.6738e-14,
16369  4.5048e-14, 4.3441e-14, 4.1911e-14, 4.0453e-14, 3.9063e-14,
16370  3.7735e-14, 3.6467e-14, 3.5254e-14, 3.4093e-14, 3.298e-14,
16371  3.1914e-14, 3.0891e-14, 2.9909e-14, 2.8965e-14, 2.8058e-14,
16372  2.7185e-14, 2.6344e-14, 2.5535e-14, 2.4755e-14, 2.4002e-14,
16373  2.3276e-14, 2.2576e-14, 2.1899e-14, 2.1245e-14, 2.0613e-14,
16374  2.0002e-14, 1.9411e-14, 1.8839e-14, 1.8285e-14, 1.7749e-14,
16375  1.723e-14, 1.6727e-14, 1.624e-14, 1.5768e-14, 1.531e-14,
16376  1.4867e-14, 1.4436e-14, 1.4019e-14, 1.3614e-14, 1.3221e-14,
16377  1.284e-14, 1.2471e-14, 1.2112e-14, 1.1764e-14, 1.1425e-14,
16378  1.1097e-14, 1.0779e-14, 1.0469e-14, 1.0169e-14, 9.8775e-15,
16379  9.5943e-15, 9.3193e-15, 9.0522e-15, 8.7928e-15, 8.5409e-15,
16380  8.2962e-15, 8.0586e-15, 7.8278e-15, 7.6036e-15, 7.3858e-15,
16381  7.1742e-15, 6.9687e-15, 6.7691e-15, 6.5752e-15, 6.3868e-15,
16382  6.2038e-15, 6.026e-15, 5.8533e-15, 5.6856e-15, 5.5226e-15,
16383  5.3642e-15, 5.2104e-15, 5.061e-15, 4.9158e-15, 4.7748e-15,
16384  4.6378e-15, 4.5047e-15, 4.3753e-15, 4.2497e-15, 4.1277e-15,
16385  4.0091e-15, 3.8939e-15, 3.782e-15, 3.6733e-15, 3.5677e-15,
16386  3.4651e-15, 3.3655e-15, 3.2686e-15, 3.1746e-15, 3.0832e-15,
16387  2.9944e-15, 2.9082e-15, 2.8244e-15, 2.7431e-15, 2.664e-15,
16388  2.5872e-15, 2.5126e-15, 2.4401e-15, 2.3697e-15, 2.3014e-15,
16389  2.2349e-15, 2.1704e-15, 2.1077e-15, 2.0468e-15, 1.9877e-15,
16390  1.9302e-15, 1.8744e-15, 1.8202e-15, 1.7675e-15, 1.7164e-15,
16391  1.6667e-15, 1.6184e-15, 1.5716e-15, 1.526e-15, 1.4818e-15,
16392  1.4389e-15, 1.3971e-15, 1.3566e-15, 1.3172e-15, 1.279e-15,
16393  1.2419e-15, 1.2058e-15, 1.1708e-15, 1.1368e-15, 1.1037e-15,
16394  1.0716e-15, 1.0405e-15, 1.0102e-15, 9.8079e-16, 9.5224e-16,
16395  9.2451e-16, 8.9758e-16, 8.7142e-16, 8.4602e-16, 8.2136e-16,
16396  7.974e-16, 7.7414e-16, 7.5154e-16, 7.2961e-16, 7.083e-16,
16397  6.8761e-16, 6.6752e-16, 6.4801e-16, 6.2906e-16, 6.1066e-16,
16398  5.928e-16, 5.7545e-16, 5.586e-16, 5.4224e-16, 5.2636e-16,
16399  5.1094e-16, 4.9596e-16} };
16400 
16401 struct s_s260b_ {
16402  double e_1[3];
16403  int e_2;
16404  } s260b_ = { {-20., 2e4, 10.}, 2003 };
16405 
16406 struct s_consts_ {
16407  double e_1[9];
16408  } consts_ = { {3.1415927410125732, 6.62606876e-27, 1.3806503e-16,
16409  29979245800., 6.02214199e23, 2.6867775e19, 83144720.,
16410  1.191042722e-12, 1.4387752} };
16411 
16412 
16413 /* Table of constant values */
16414 
16415 /*
16416 static integer c__9 = 9;
16417 static integer c__1 = 1;
16418 static integer c__2 = 2;
16419 static integer c__5 = 5;
16420 static int cs__0 = 0;
16421 */
16422 // FIXME static double c_b125 = 0.;
16423 
16424 /* ############################################################################ */
16425 /* path: $Source: /srv/svn/cvs/cvsroot/arts/src/continua.cc,v $ */
16426 /* author: $Author $ */
16427 /* revision: $Revision: 1.39 $ */
16428 /* created: $Date: 2006/06/30 08:35:33 $ */
16429 /* ############################################################################ */
16430 
16431 /* CKD2.4 TEST */
16432 /* TKS, 2002-02-28 */
16433 /* CALL : g77 -c testckd.f ; g77 testckd.o -o testckd */
16434 
16435 /* ############################################################################ */
16436 /* ----------------------------------------------------------------------------- */
16437 
16438 /* INPUT PARAMETERS: */
16439 /* P [hPa] TOTAL PRESSURE */
16440 /* T [K] TEMPERATURE */
16441 /* VMRH2O [1] H2O VOLUME MIXING RATIO */
16442 /* VMRN2 [1] N2 VOLUME MIXING RATIO */
16443 /* VMRO2 [1] O2 VOLUME MIXING RATIO */
16444 /* FREQ [Hz] FREQUENCY OF ABSORPTION CALCULATION */
16445 
16446 
16447 /* OUTPUT PARAMETER: */
16448 /* artsckd_ [1/m] ABSORPTION COEFFICIENT */
16449 
16450 /* ----------------------------------------------------------------------------- */
16451 
16452 double artsckd_(double p, double t, double vmrh2o,
16453  double vmrn2, double vmro2, double freq, int ivc)
16454 {
16455  /* Initialized data */
16456 
16457  static double xslf = 1.;
16458  static double xfrg = 1.;
16459  static double xcn2 = 1.;
16460 
16461  /* System generated locals */
16462  double ret_val=0.0e0;
16463  // FIXME double d__1, d__2, d__3, d__4;
16464 
16465  /* Local variables */
16466  // FIXME int iosa;
16467  double w_wv__, oc_n2, radct;
16468  double w_other__, w_n2__, w_o2__;
16469  double of_wv, os_wv, p0, xn_wv__, t0, rhofac, wn, xn, xn0, tksvpt, rft;
16470 
16471  extern int initi_(double, double , double *,
16472  double *, double *, double *, double *,
16473  double *, double *, double *, double *,
16474  double *, double *);
16475  extern double fwv_(int , double , double *, double *,
16476  double *, double *, double *, double *);
16477  extern double swv_(int , double , double , double *, double *
16478  , double *, double *, double *, double *,
16479  double *);
16480  extern double conti_n2__(double , double , double *,
16481  double *, double *, double *, double *);
16482 
16483 
16484 /* PROGRAM: MODM */
16485 /* ------- */
16486 
16487 /* AUTHOR: Sid-Ahmed Boukabara */
16488 /* ------ */
16489 
16490 /* AFFILIATION: ATMOSPHERIC AND ENVIRONMENTAL RESEARCH INC. */
16491 /* ----------- */
16492 
16493 /* DATE OF CREATION : October 1998 */
16494 /* ---------------- */
16495 
16496 /* AIM: This program is aimed at the calculation of the */
16497 /* --- atmospheric optical depths. The spectral validity depends */
16498 /* only on the region covered by the file:"spectral_lines.dat" */
16499 /* The components treated here are the water vapor, the */
16500 /* oxygen, the ozone, the nitrogen and nitrogen dioxide. */
16501 
16502 /* - IVC : Flag of contin. vers.: CKD2.4(if=2) MPMf87/s93 (if=3) */
16503 /* - ICP : Flag to take(if =1) or not (if=0) the line coupling */
16504 /* - NWN : Number of wavenumbers to be treated */
16505 /* - WN : Vector of NWN wavenumbers [in cm-1], one should note that */
16506 /* this input could be a scalar (associated with NWN=1) */
16507 /* - NLAY : Number of layers to be treated. */
16508 /* - P : Vector of NLAY pressures (in mbar), one should note that */
16509 /* this input could be a scalar (associated with NLAY=1) */
16510 /* - T : Vector of NLAY temperatures [in Kelvin] */
16511 /* - W_WV : Vector of NLAY water vapor column amounts [in molecules/cm2] */
16512 /* - W_O2 : Vector of NLAY oxygen column amounts [in molecules/cm2] */
16513 /* - W_N2 : Vector of NLAY nitrogen column amounts [in molecules/cm2] */
16514 /* - W_OTHER : Vector of NLAY of other species column amounts [in molecules/cm2] */
16515 /* - CLW : Vector of NLAY Cloud Liquid Water amounts [in kg/m2 or mm] */
16516 /* When Cloud is present, the frequency must be consistent */
16517 /* with Rayleigh absorption (no scattering performed in */
16518 /* monortm). */
16519 /* - XSLF : Scaling factor of the self WV continuum (usually XSLF=1) */
16520 /* - XFRG : Scaling factor of the foreign WV continuum (usually XFRG=1) */
16521 /* - XCN2 : Scaling factor of the N2 continuum (usually XCN2=1) */
16522 /* - O : An array of NWNxNLAY elts containing the total optical depths */
16523 /* due to all the active species [in nepers] */
16524 /* - OS_WV : An array of NWNxNLAY elts containing the water vapor optical */
16525 /* depth (due to self continuum), [in Nepers] */
16526 /* - OF_WV : An array of NWNxNLAY elts containing the water vapor optical */
16527 /* depth (due to foreign continuum), [in Nepers] */
16528 /* - OC_N2 : An array of NWNxNLAY elts containing the nitrogen optical */
16529 /* depth (due to continuum), [in Nepers] */
16530 /* - O_CLW : An array of NWNxNLAY elts containing the CLW optical */
16531 /* depth , [in Nepers] */
16532 
16533 /* History of the modifications: */
16534 /* ***************************** */
16535 /* - written in 1999 by Sid Ahmed Boukabara, Ross Hoffman */
16536 /* and Tony Clough. */
16537 /* - validated against ARM sondes in the */
16538 /* microwave spectrum (23.8 and 31.4 GHz). SAB, 2000. */
16539 /* - extended to more species by Sid Ahmed Boukabara in 03/2000. */
16540 /* - cleaned up and commented in 2001 for first public release. */
16541 /* Also put under CVS configuration management. SAB. */
16542 /* - Extended O2 lines to submillimeter. Extensive validation */
16543 /* by comparison to Rosenkranz model and MWR data. */
16544 /* Update of the LBLATM module (accepts inputs at pressure */
16545 /* grid, along with altitude grid). */
16546 /* Fixed the handling of N2 amount coming from LBLATM (which */
16547 /* depends on the number of molecules NMOL). */
16548 /* Adopted accurate constants values. */
16549 /* Sid Ahmed Boukabara. Dec 14th 2001. */
16550 /* - Updated on January 7th 2002. ARM option (INP=2) updated and */
16551 /* made more efficient after Jim's comments. (INP=3) option optimized. */
16552 /* WV line intensities modified in the microwave (see Tony's email). */
16553 
16554 /* Comments should be forwarded to Sid Ahmed Boukabara (sboukaba@aer.com) */
16555 /* or Tony Clough (clough@aer.com). */
16556 
16557 /* ============================================================================ */
16558 
16559 
16560 /* TKS functions: */
16561 
16562 /* scaling factor (SLF cont) */
16563 /* scaling factor (FRG cont) */
16564 /* scaling factor (N2 cont) */
16565 
16566 
16567  w_wv__ = 0.0e0;
16568  w_o2__ = 0.0e0;
16569  w_n2__ = 0.0e0;
16570  w_other__ = 0.0e0;
16571  ret_val = 0.0e0;
16572  rft = 0.0e0;
16573  os_wv = 0.0e0;
16574  of_wv = 0.0e0;
16575  oc_n2 = 0.0e0;
16576 
16577 /* ---INPUTS & GENERAL CONTROL PARAMETERS */
16578 
16579  /* set H2O, O2 and N2 number density to column amount [molec/cm2] */
16580  /* TKSVPT = P[Pa] / T[K] */
16581  tksvpt = (p * 100.0) / t;
16582  /* 7.242923e16 = k_B [J/K] * 1.0e-6 [m^3/cm^3] */
16583  w_wv__ = vmrh2o * 7.242923e16 * tksvpt;
16584  w_o2__ = vmro2 * 7.242923e16 * tksvpt;
16585  w_n2__ = vmrn2 * 7.242923e16 * tksvpt;
16586  w_other__ = (1.0000E0-vmrh2o-vmro2-vmrn2) * 7.242923e16 * tksvpt;
16587 
16588  /* frequency [Hz] to wave number [cm-1] */
16589  wn = freq / 29979245800.0;
16590  //cout << "CKD2.4 H2O column amounts [molec/cm2] =" << w_wv__ << "\n";
16591  //cout << "CKD2.4 O2 column amounts [molec/cm2] =" << w_o2__ << "\n";
16592  //cout << "CKD2.4 H2O column amounts [molec/cm2] =" << w_n2__ << "\n";
16593  //cout << "CKD2.4 others column amounts [molec/cm2] =" << w_other__ << "\n";
16594  //cout << "freq=" << freq << " Hz, wave num=" << wn << " cm-1\n";
16595 
16596 /* ---------------------------------------------------------------------------- */
16597 
16598 /* --- INITIALIZATION ----------------------------------------- */
16599  initi_(p, t, &radct, &t0, &p0, &w_wv__, &w_o2__, &w_n2__, &w_other__, &
16600  xn0, &xn, &xn_wv__, &rhofac);
16601  //cout << "CKD2.4 t0=" << t0 << " p0=" << p0 << "\n";
16602  //cout << "radct =" << radct << "\n";
16603  //cout << "xn0 =" << xn0 << "\n";
16604  //cout << "xn =" << xn << "\n";
16605  //cout << "xn_wv__ =" << xn_wv__ << "\n";
16606  //cout << "rhofac =" << rhofac << "\n";
16607 
16608  /* --- RAD_FIELD_TERM ----------------------------------------- */
16609  rft = wn * tanh(radct * wn / (t * 2));
16610  //cout << "rft =" << rft << "\n";
16611 
16612  /* --- H2O CONTINUUM TERM ------------------------------------- */
16613 
16614  if (ivc == 21) {
16615  /* CKD2.4 CONT_SELF_WV [Np/m] */
16616  os_wv = 1.0000e2 * swv_(2, wn, t, &t0, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xslf);
16617  //cout << "CKD2.4 ivc=21, H2O self cont [in Np/m] =" << os_wv << "\n";
16618  return os_wv;
16619  }
16620  if (ivc == 31) {
16621  /* MPMf87/s93 CONT_SELF_WV [Np/m] */
16622  os_wv = 1.0000e2 * swv_(3, wn, t, &t0, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xslf);
16623  //cout << "CKD2.4 ivc=31, H2O self cont [in Np/m] =" << os_wv << "\n";
16624  return os_wv;
16625  }
16626  if (ivc == 22) {
16627  /* CKD2.4 CONT_FRGN_WV [Np/m] */
16628  of_wv = 1.0000e2 * fwv_(2, wn, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xfrg);
16629  //cout << "CKD2.4 ivc=22, H2O foreign cont [in Np/m] =" << of_wv << "\n";
16630  return of_wv;
16631  }
16632  if (ivc == 32) {
16633  /* MPMf87/s93 CONT_FRGN_WV [Np/m] */
16634  of_wv = 1.0000e2 * fwv_(3, wn, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xfrg);
16635  //cout << "CKD2.4 ivc=32, H2O foreign cont [in Np/m] =" << of_wv << "\n";
16636  return of_wv ;
16637  }
16638 
16639  /* --- N2 CONTINUUM TERM [Np/m] ----------------------------------- */
16640  if (ivc == 1) {
16641  oc_n2 = 1.0000e2 * conti_n2__(wn, t, &t0, &w_n2__, &rft, &rhofac, &xcn2);
16642  //cout << "CKD2.4 ivc=1, N2 cont [in Np/m] =" << oc_n2 << "\n";
16643  return oc_n2;
16644  }
16645 
16646  /* --- TOTAL ABSORPTION IN [in Np/m] --------------------------- */
16647  // cout << "CKD2.4 H2O s+f cont [in Np/m] =" << ((os_wv+of_wv) * 1.0000e2) << "\n";
16648  //ret_val = ((os_wv + of_wv + oc_n2) * 1.0000e2);
16649 
16650 // FIXME L999:
16651 
16652  return ret_val; // [Np/m]
16653 } /* artsckd_ */
16654 
16655 
16656 /* ############################################################################ */
16657 /* foreign continuum functions -------------------------------------------- */
16658 double fwv_(int ivc, double wn, double *w_wv__, double *rft,
16659  double *xn, double *xn_wv__, double *xn0, double *xfrg)
16660 {
16661  /* System generated locals */
16662  double ret_val = 0.0e0;
16663 
16664  /* Local variables */
16665  extern double fwv24_(double , double *, double *,
16666  double *, double *, double *, double *),
16667  fwv_mpmf87s93__(double , double *, double *,
16668  double *, double *, double *, double *);
16669 
16670  ret_val = 0.0e0;
16671 
16672 /* --- CKD2.4 CONTINUUM ------------------------------------- */
16673  if (ivc == 2 && *w_wv__ > 0.) {
16674  ret_val = fwv24_(wn, w_wv__, rft, xn, xn_wv__, xn0, xfrg);
16675  }
16676 
16677 
16678 /* --- MPMf87s93 CONTINUUM ---------------------------------- */
16679  if (ivc == 3 && *w_wv__ > 0.) {
16680  ret_val = fwv_mpmf87s93__(wn, w_wv__, rft, xn, xn_wv__, xn0, xfrg);
16681  }
16682 
16683  return ret_val;
16684 } /* fwv_ */
16685 
16686 double fwv_mpmf87s93__(double wn, double *w_wv__, double *rft,
16687  double *xn, double *xn_wv__, double *xn0, double *xfrg)
16688 {
16689  /* System generated locals */
16690  double ret_val=0.0e0;
16691 
16692  /* Local variables */
16693  extern double xlgr_(double *, double *);
16694  int i__, j;
16695  double x[4], fscal, xf;
16696 
16697  ret_val = 0.0e0;
16698 
16699  j = (int) ((wn - fh2ob_1.v1) / fh2ob_1.dv) + 1;
16700 
16701  for (i__ = 1; i__ <= 4; ++i__) {
16702  x[i__ - 1] = fh2oa_1.fh2o[j + i__ - 3];
16703  }
16704 
16705  xf = (wn - (fh2ob_1.v1 + fh2ob_1.dv * (double) (j - 1))) /
16706  fh2ob_1.dv;
16707  fscal = .8;
16708  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_wv__ * *rft * ((*xn - *xn_wv__) / *
16709  xn0)) * fscal * *xfrg;
16710 
16711 /* L999: */
16712  return ret_val;
16713 } /* fwv_mpmf87s93__ */
16714 
16715 double fwv24_(double wn, double *w_wv__, double *rft,
16716  double *xn, double *xn_wv__, double *xn0, double *
16717  xfrg)
16718 {
16719  /* Initialized data */
16720 
16721  static double v0f1 = 350.;
16722  static double hwsqf1 = 4e4;
16723  static double betaf1 = 5e-9;
16724  static double factrf1 = -.7;
16725  static double v0f1a = 630.;
16726  static double hwsqf1a = 4225.;
16727  static double betaf1a = 2e-8;
16728  static double factrf1a = .75;
16729  static double v0f2 = 1130.;
16730  static double hwsqf2 = 108900.;
16731  static double betaf2 = 8e-11;
16732  static double factrf2 = -.97;
16733  static double v0f3 = 1975.;
16734  static double hwsqf3 = 62500.;
16735  static double betaf3 = 5e-6;
16736  static double factrf3 = -.65;
16737 
16738  /* System generated locals */
16739  double ret_val=0.0e0;
16740  double d__1;
16741 
16742  /* Local variables */
16743  extern double xlgr_(double *, double *);
16744  int i__, j;
16745  double x[4], fscal, xf, vf2, vf4, vf6;
16746 
16747  ret_val = 0.0e0;
16748 
16749  j = (int) ((wn - fh2ob_1.v1) / fh2ob_1.dv) + 1;
16750  for (i__ = 1; i__ <= 4; ++i__) {
16751  x[i__ - 1] = fh2oa_1.fh2o[j + i__ - 3];
16752  }
16753 
16754  xf = (wn - (fh2ob_1.v1 + fh2ob_1.dv * (double) (j - 1))) /
16755  fh2ob_1.dv;
16756 
16757 /* ---added correction to the forgn continuum */
16758 /* Computing 2nd power */
16759  d__1 = wn - v0f1;
16760  vf2 = d__1 * d__1;
16761  vf6 = vf2 * vf2 * vf2;
16762  fscal = factrf1 * (hwsqf1 / (vf2 + betaf1 * vf6 + hwsqf1)) + 1.;
16763 /* Computing 2nd power */
16764  d__1 = wn - v0f1a;
16765  vf2 = d__1 * d__1;
16766  vf6 = vf2 * vf2 * vf2;
16767  fscal *= factrf1a * (hwsqf1a / (vf2 + betaf1a * vf6 + hwsqf1a)) + 1.;
16768 /* Computing 2nd power */
16769  d__1 = wn - v0f2;
16770  vf2 = d__1 * d__1;
16771  vf6 = vf2 * vf2 * vf2;
16772  fscal *= factrf2 * (hwsqf2 / (vf2 + betaf2 * vf6 + hwsqf2)) + 1.;
16773 /* Computing 2nd power */
16774  d__1 = wn - v0f3;
16775  vf2 = d__1 * d__1;
16776  vf4 = vf2 * vf2;
16777  fscal *= factrf3 * (hwsqf3 / (vf2 + betaf3 * vf4 + hwsqf3)) + 1.;
16778  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_wv__ * *rft * ((*xn - *xn_wv__) / *
16779  xn0)) * fscal * *xfrg;
16780 
16781 /* L999: */
16782  return ret_val;
16783 } /* fwv24_ */
16784 
16785 
16786 
16787 /* self continuum function ------------------------------------------------ */
16788 double swv_(int ivc, double wn, double t, double *t0,
16789  double *w_wv__, double *rft, double *xn, double *
16790  xn_wv__, double *xn0, double *xslf)
16791 {
16792  /* System generated locals */
16793  double ret_val;
16794 
16795  /* Local variables */
16796  extern double swv_mpmf87s93__(double , double , double *
16797  , double *, double *, double *, double *,
16798  double *, double *);
16799  extern double swv24_(double , double ,
16800  double *, double *, double *, double *,
16801  double *, double *, double *);
16802 
16803  ret_val = 0.;
16804 
16805 /* CKD2.4 CONTINUUM */
16806  if (ivc == 2 && *w_wv__ > 0.) {
16807 /* CNT_SLF_WV CKD2.4 */
16808  ret_val = swv24_(wn, t, t0, w_wv__, rft, xn, xn_wv__, xn0, xslf);
16809  }
16810 
16811  if (ivc == 3 && *w_wv__ > 0.) {
16812 /* MPMf87s93 CKD2.4 CONT. */
16813 /* CNT_SLF_WV */
16814  ret_val = swv_mpmf87s93__(wn, t, t0, w_wv__, rft, xn, xn_wv__, xn0,
16815  xslf);
16816  }
16817 
16818  return ret_val;
16819 } /* swv_ */
16820 
16821 
16822 
16823 double swv24_(double wn, double t, double *t0, double *
16824  w_wv__, double *rft, double * /* xn */, double *xn_wv__,
16825  double *xn0, double *xslf)
16826 {
16827  /* Initialized data */
16828 
16829  static double v0s1 = 0.;
16830  static double hwsq1 = 1e4;
16831  static double betas1 = 1e-4;
16832  static double factrs1 = .688;
16833  static double v0s2 = 1050.;
16834  static double hwsq2 = 4e4;
16835  static double factrs2 = -.2333;
16836  static double v0s3 = 1310.;
16837  static double hwsq3 = 14400.;
16838  static double betas3 = 5e-6;
16839  static double factrs3 = -.15;
16840 
16841  /* System generated locals */
16842  double ret_val, d__1, d__2;
16843 
16844  /* Local variables */
16845  double sfac;
16846  extern double xlgr_(double *, double *);
16847  int j;
16848  double x[4], xf, vs2, vs4;
16849 
16850 /* ---UNITS(CM**3/MOL)*1.E-20 */
16851 
16852  ret_val = 0.;
16853 
16854  j = (int) ((wn - sh2ob_1.v1) / sh2ob_1.dv) + 1;
16855  d__1 = s260a_1.swv260[j - 2] / sh2oa_1.swv296[j - 2];
16856  d__2 = (t - *t0) / (260. - *t0);
16857  x[0] = sh2oa_1.swv296[j - 2] * pow(d__1, d__2);
16858  d__1 = s260a_1.swv260[j - 1] / sh2oa_1.swv296[j - 1];
16859  d__2 = (t - *t0) / (260. - *t0);
16860  x[1] = sh2oa_1.swv296[j - 1] * pow(d__1, d__2);
16861  d__1 = s260a_1.swv260[j] / sh2oa_1.swv296[j];
16862  d__2 = (t - *t0) / (260. - *t0);
16863  x[2] = sh2oa_1.swv296[j] * pow(d__1, d__2);
16864  d__1 = s260a_1.swv260[j + 1] / sh2oa_1.swv296[j + 1];
16865  d__2 = (t - *t0) / (260. - *t0);
16866  x[3] = sh2oa_1.swv296[j + 1] * pow(d__1, d__2);
16867  xf = (wn - (sh2ob_1.v1 + sh2ob_1.dv * (double) (j - 1))) /
16868  sh2ob_1.dv;
16869  sfac = 1.;
16870 /* Computing 2nd power */
16871  d__1 = wn - v0s1;
16872  vs2 = d__1 * d__1;
16873  vs4 = vs2 * vs2;
16874 /* Computing 2nd power */
16875  d__1 = wn;
16876  sfac *= factrs1 * (hwsq1 / (d__1 * d__1 + betas1 * vs4 + hwsq1)) + 1.;
16877 /* Computing 2nd power */
16878  d__1 = wn - v0s2;
16879  vs2 = d__1 * d__1;
16880  sfac *= factrs2 * (hwsq2 / (vs2 + hwsq2)) + 1.;
16881 /* Computing 2nd power */
16882  d__1 = wn - v0s3;
16883  vs2 = d__1 * d__1;
16884  vs4 = vs2 * vs2;
16885  sfac *= factrs3 * (hwsq3 / (vs2 + betas3 * vs4 + hwsq3)) + 1.;
16886  ret_val = *w_wv__ * *rft * (*xn_wv__ / *xn0) * xlgr_(&xf, x) * 1e-20 *
16887  sfac * *xslf;
16888 
16889  return ret_val;
16890 } /* swv24_ */
16891 
16892 double swv_mpmf87s93__(double wn, double t, double *t0,
16893  double *w_wv__, double *rft, double * /* xn */, double *
16894  xn_wv__, double *xn0, double *xslf)
16895 {
16896  /* System generated locals */
16897  double ret_val, d__1, d__2;
16898 
16899  /* Local variables */
16900  double sfac;
16901  extern double xlgr_(double *, double *);
16902  int j;
16903  double x[4], xf;
16904 
16905 /* ---UNITS(CM**3/MOL)*1.E-20 */
16906 
16907  ret_val = 0.;
16908 
16909  j = (int) ((wn - sh2ob_1.v1) / sh2ob_1.dv) + 1;
16910  d__1 = s260a_1.swv260[j - 2] / sh2oa_1.swv296[j - 2];
16911  d__2 = (t - *t0) / (260. - *t0);
16912  x[0] = sh2oa_1.swv296[j - 2] * pow(d__1, d__2);
16913  d__1 = s260a_1.swv260[j - 1] / sh2oa_1.swv296[j - 1];
16914  d__2 = (t - *t0) / (260. - *t0);
16915  x[1] = sh2oa_1.swv296[j - 1] * pow(d__1, d__2);
16916  d__1 = s260a_1.swv260[j] / sh2oa_1.swv296[j];
16917  d__2 = (t - *t0) / (260. - *t0);
16918  x[2] = sh2oa_1.swv296[j] * pow(d__1, d__2);
16919  d__1 = s260a_1.swv260[j + 1] / sh2oa_1.swv296[j + 1];
16920  d__2 = (t - *t0) / (260. - *t0);
16921  x[3] = sh2oa_1.swv296[j + 1] * pow(d__1, d__2);
16922  xf = (wn - (sh2ob_1.v1 + sh2ob_1.dv * (double) (j - 1))) /
16923  sh2ob_1.dv;
16924  sfac = 3.;
16925  ret_val = *w_wv__ * *rft * (*xn_wv__ / *xn0) * xlgr_(&xf, x) * 1e-20 *
16926  sfac * *xslf;
16927 
16928 /* L999: */
16929  return ret_val;
16930 } /* swv_mpmf87s93__ */
16931 
16932 /* --- N2 continuum ------------------------------------------------------- */
16933 double conti_n2__(double wn, double t, double *t0,
16934  double *w_n2__, double *rft, double *rhofac, double *
16935  xcn2)
16936 {
16937  /* Initialized data */
16938 
16939  static double v1 = -10.;
16940  static double dv = 5.;
16941  static double ct296[73] = { 4.303e-7,4.85e-7,4.979e-7,4.85e-7,
16942  4.303e-7,3.715e-7,3.292e-7,3.086e-7,2.92e-7,2.813e-7,2.804e-7,
16943  2.738e-7,2.726e-7,2.724e-7,2.635e-7,2.621e-7,2.547e-7,2.428e-7,
16944  2.371e-7,2.228e-7,2.1e-7,1.991e-7,1.822e-7,1.697e-7,1.555e-7,
16945  1.398e-7,1.281e-7,1.138e-7,1.012e-7,9.078e-8,7.879e-8,6.944e-8,
16946  6.084e-8,5.207e-8,4.54e-8,3.897e-8,3.313e-8,2.852e-8,2.413e-8,
16947  2.045e-8,1.737e-8,1.458e-8,1.231e-8,1.031e-8,8.586e-9,7.162e-9,
16948  5.963e-9,4.999e-9,4.226e-9,3.607e-9,3.09e-9,2.669e-9,2.325e-9,
16949  2.024e-9,1.783e-9,1.574e-9,1.387e-9,1.236e-9,1.098e-9,9.777e-10,
16950  8.765e-10,7.833e-10,7.022e-10,6.317e-10,5.65e-10,5.1e-10,
16951  4.572e-10,4.115e-10,3.721e-10,3.339e-10,3.005e-10,2.715e-10,
16952  2.428e-10 };
16953  static double ct220[73] = { 4.946e-7,5.756e-7,5.964e-7,5.756e-7,
16954  4.946e-7,4.145e-7,3.641e-7,3.482e-7,3.34e-7,3.252e-7,3.299e-7,
16955  3.206e-7,3.184e-7,3.167e-7,2.994e-7,2.943e-7,2.794e-7,2.582e-7,
16956  2.468e-7,2.237e-7,2.038e-7,1.873e-7,1.641e-7,1.474e-7,1.297e-7,
16957  1.114e-7,9.813e-8,8.309e-8,7.059e-8,6.068e-8,5.008e-8,4.221e-8,
16958  3.537e-8,2.885e-8,2.407e-8,1.977e-8,1.605e-8,1.313e-8,1.057e-8,
16959  8.482e-9,6.844e-9,5.595e-9,4.616e-9,3.854e-9,3.257e-9,2.757e-9,
16960  2.372e-9,2.039e-9,1.767e-9,1.548e-9,1.346e-9,1.181e-9,1.043e-9,
16961  9.11e-10,8.103e-10,7.189e-10,6.314e-10,5.635e-10,4.976e-10,
16962  4.401e-10,3.926e-10,3.477e-10,3.085e-10,2.745e-10,2.416e-10,
16963  2.155e-10,1.895e-10,1.678e-10,1.493e-10,1.31e-10,1.154e-10,
16964  1.019e-10,8.855e-11 };
16965 
16966  /* System generated locals */
16967  double ret_val, d__1, d__2;
16968 
16969  /* Local variables */
16970  extern double xlgr_(double *, double *);
16971  int j;
16972  double x[4], xf;
16973 
16974 /* TKS INTEGER NPTCONTN2 */
16975 /* TKS INTEGER NPTCONTN2B */
16976 /* TKS & V1B,V2B,DVB */
16977 /* TKS DATA V2 / 350.0 / */
16978 /* TKS DATA NPTCONTN2 / 73 / */
16979 /* TKS DATA V1B, V2B, DVB, NPTCONTN2B / -10., 350., 5.0, 73 / */
16980 
16981 
16982 
16983  ret_val = 0.;
16984 /* TKS -- begin implementation of TKS */
16985  if (wn <= 0.) {
16986  ret_val = 0.;
16987  return ret_val;
16988  }
16989  if (wn > 350.) {
16990  ret_val = 0.;
16991  return ret_val;
16992  }
16993 /* TKS -- end implementation of TKS */
16994 
16995  if (*w_n2__ == 0.) {
16996  ret_val = 0.;
16997  return ret_val;
16998  }
16999 
17000  j = (int) ((wn - v1) / dv) + 1;
17001  d__1 = ct296[j - 2] / ct220[j - 2];
17002  d__2 = (t - *t0) / (220. - *t0);
17003  x[0] = ct296[j - 2] * pow(d__1, d__2);
17004  d__1 = ct296[j - 1] / ct220[j - 1];
17005  d__2 = (t - *t0) / (220. - *t0);
17006  x[1] = ct296[j - 1] * pow(d__1, d__2);
17007  d__1 = ct296[j] / ct220[j];
17008  d__2 = (t - *t0) / (220. - *t0);
17009  x[2] = ct296[j] * pow(d__1, d__2);
17010  d__1 = ct296[j + 1] / ct220[j + 1];
17011  d__2 = (t - *t0) / (220. - *t0);
17012  x[3] = ct296[j + 1] * pow(d__1, d__2);
17013  xf = (wn - (v1 + dv * (double) (j - 1))) / dv;
17014  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_n2__ / .26867775 * *rft * *rhofac) *
17015  *xcn2;
17016 
17017  return ret_val;
17018 } /* conti_n2__ */
17019 
17020 /* --- 4 points Lagrange interpolation ----------------------------------- */
17021 double xlgr_(double *xf, double *x)
17022 {
17023  /* System generated locals */
17024  double ret_val;
17025 
17026  /* Local variables */
17027  double a[4], b;
17028 
17029 
17030 
17031 
17032 /* with continous derivatives */
17033  /* Parameter adjustments */
17034  --x;
17035 
17036  /* Function Body */
17037  b = *xf * .5 * (1. - *xf);
17038  a[0] = -b * (1. - *xf);
17039  a[1] = 1. - (3. - *xf * 2.) * *xf * *xf + b * *xf;
17040  a[2] = (3. - *xf * 2.) * *xf * *xf + b * (1. - *xf);
17041  a[3] = -(b * *xf);
17042  ret_val = a[0] * x[1] + a[1] * x[2] + a[2] * x[3] + a[3] * x[4];
17043 
17044 /* L999: */
17045  return ret_val;
17046 } /* xlgr_ */
17047 
17048 /* --- initializations ---------------------------------------------------- */
17049 int initi_(double p, double t, double *radct,
17050  double *t0, double *p0, double *w_wv__, double *
17051  w_o2__, double *w_n2__, double *w_other__, double *xn0,
17052  double *xn, double *xn_wv__, double *rhofac)
17053 {
17054  /* Initialized data */
17055 
17056  static double wvmolmass = 18.016;
17057  static double drymolmass = 28.97;
17058 
17059  double wdry, ratiomix, wvpress;
17060 
17061 /* [K] */
17062  *t0 = 296.;
17063 /* [hPa] */
17064  *p0 = 1013.25;
17065 
17066 /* [K/cm-1] */
17067  *radct = consts_1.planck * consts_1.clight / consts_1.boltz;
17068  *xn0 = *p0 / (consts_1.boltz * *t0) * 1e3;
17069  *xn = p / (consts_1.boltz * t) * 1e3;
17070  wdry = *w_o2__ + *w_n2__ + *w_other__;
17071  ratiomix = *w_wv__ * wvmolmass / (wdry * drymolmass);
17072  wvpress = ratiomix / (ratiomix + wvmolmass / drymolmass) * p;
17073  *xn_wv__ = wvpress / (consts_1.boltz * t) * 1e3;
17074  *rhofac = *w_n2__ / (wdry + *w_wv__) * (p / *p0) * (273.15 / t);
17075 
17076 /* L999: */
17077  return 0;
17078 } /* initi_ */
17079 
17080 /* ############################################################################ */
17081 /* ---Block data to be consistent with LBLRTM/LBLATM */
17082 /* Subroutine */ int phys_consts__(void)
17083 {
17084  return 0;
17085 } /* phys_consts__ */
17086 
17087 
17088 /* Pi was obtained from PI = 2.*ASIN(1.) */
17089 /* --------------------------------------------- */
17090 /* Constants from NIST 01/11/2002 */
17091 /* --------------------------------------------- */
17092 /* --------------------------------------------- */
17093 /* units are generally cgs */
17094 /* The first and second radiation constants are taken from NIST. */
17095 /* They were previously obtained from the relations: */
17096 /* RADCN1 = 2.*PLANCK*CLIGHT*CLIGHT*1.E-07 */
17097 /* RADCN2 = PLANCK*CLIGHT/BOLTZ */
17098 /* --------------------------------------------- */
17099 
17100 /* ############################################################################ */
17101 /* Subroutine */ int bsa296_(void)
17102 {
17103  return 0;
17104 } /* bsa296_ */
17105 
17106 
17107 
17108 
17109 
17110 
17111 
17112 /* Subroutine */ int bsb296_(void)
17113 {
17114  return 0;
17115 } /* bsb296_ */
17116 
17117 
17118 
17119 
17120 
17121 
17122 
17123 /* ---------------------------------------------------------------------------- */
17124 
17125 
17126 /* Subroutine */ int bs260a_(void)
17127 {
17128  return 0;
17129 } /* bs260a_ */
17130 
17131 
17132 
17133 
17134 
17135 
17136 
17137 
17138 /* Subroutine */ int bs260b_(void)
17139 {
17140  return 0;
17141 } /* bs260b_ */
17142 
17143 
17144 
17145 
17146 
17147 
17148 
17149 /* ---------------------------------------------------------------------------- */
17150 
17151 
17152 /* Subroutine */ int bfh2oa_(void)
17153 {
17154  return 0;
17155 } /* bfh2oa_ */
17156 
17157 
17158 
17159 
17160 
17161 
17162 
17163 
17164 /* Subroutine */ int bfh2ob_(void)
17165 {
17166  return 0;
17167 } /* bfh2ob_ */
17168 
17169 
17170 // ---------------------- end of monortm CKD F77 code --------------------------
CKD_mt_v0v0_o2
void CKD_mt_v0v0_o2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version MT 1.00 O2 v0<-v0 band absorption.
Definition: continua.cc:4754
n2n2tks_
Numeric n2n2tks_(double t, double f)
Definition: continua.cc:13425
CKD_mt_CIArot_n2
void CKD_mt_CIArot_n2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version MT 1.00 N2-N2 collision induced absorption (rotational band)
Definition: continua.cc:4077
bfh2oa_
int bfh2oa_(void)
Definition: continua.cc:17152
threej2_
double threej2_(void)
Definition: continua.cc:14839
spline_0_
int spline_0_(int n__, int *l, int *m, int *k, double *eps, double *x, double *y, double *t, double *ss, double *si, int *nr, double *s2)
Definition: continua.cc:14980
Matrix
The Matrix class.
Definition: matpackI.h:767
s_fh2ob_::e_2
int e_2
Definition: continua.cc:15665
MPM89O2AbsModel
void MPM89O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM89O2AbsModel.
Definition: continua.cc:6183
fh2ob_1_::nptfh2o
int nptfh2o
Definition: continua.cc:15257
Vardesc::addr
char * addr
Definition: continua.cc:13081
s_app3b_::ns
int ns
Definition: continua.cc:13188
Namelist::vars
Vardesc ** vars
Definition: continua.cc:13089
u_bbbb_::s_m_1
Definition: continua.cc:13286
s260b_
struct s_s260b_ s260b_
N2N2_N2F_ckd_mt_100_v2
const Numeric N2N2_N2F_ckd_mt_100_v2
Definition: continua.h:3385
inlist::inopen
ftnint * inopen
Definition: continua.cc:13039
cllist::cerr
flag cerr
Definition: continua.cc:13021
app3a_
struct s_app3a_ app3a_
bba_
union u_bba_ bba_
SPEED_OF_LIGHT
const Numeric SPEED_OF_LIGHT
s_app3a_::wnrmax3
double wnrmax3
Definition: continua.cc:13182
cilist::ciunit
ftnint ciunit
Definition: continua.cc:12990
cilist::cierr
flag cierr
Definition: continua.cc:12989
fac
Numeric fac(const Index n)
fac
Definition: math_funcs.cc:68
fh2ob_1_::v1
double v1
Definition: continua.cc:15256
MatrixView
The MatrixView class.
Definition: matpackI.h:668
consts_1_
Definition: continua.cc:15303
dB_km_to_1_m
const Numeric dB_km_to_1_m
Definition: continua.cc:396
inlist::inrecl
ftnint * inrecl
Definition: continua.cc:13056
n2part_1_::q1
double q1
Definition: continua.cc:13262
conti_n2__
double conti_n2__(double wn, double t, double *t0, double *w_n2__, double *rft, double *rhofac, double *xcn2)
Definition: continua.cc:16933
MPM93_O2_continuum
void MPM93_O2_continuum(MatrixView pxsec, const Numeric S0in, const Numeric G0in, const Numeric XS0in, const Numeric XG0in, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM93 O2 continuum:
Definition: continua.cc:7393
fh2ob_1_
Definition: continua.cc:15255
inlist::inblanklen
ftnlen inblanklen
Definition: continua.cc:13059
N2N2_CT296_ckd_mt_100
const double N2N2_CT296_ckd_mt_100[N2N2_CT296_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3330
fh2ob_2_
Definition: continua.cc:15259
O2O2_O2F_ckd_mt_100_v1
const Numeric O2O2_O2F_ckd_mt_100_v1
Definition: continua.h:3450
u_bba_::m_2
struct u_bba_::s_m_2 m_2
FH2O_ckd_0_dv
const Numeric FH2O_ckd_0_dv
Definition: continua.h:1016
u_bbbb_::s_m_1::il
int il
Definition: continua.cc:13287
olist::oblnk
char * oblnk
Definition: continua.cc:13016
bfh2ob_
int bfh2ob_(void)
Definition: continua.cc:17164
CKD_mt_CIAfun_o2
void CKD_mt_CIAfun_o2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version MT 1.00 O2-O2 collision induced absorption (fundamental band)
Definition: continua.cc:4534
absorption.h
Declarations required for the calculation of absorption coefficients.
alist::aerr
flag aerr
Definition: continua.cc:13028
u_bba_::s_m_1
Definition: continua.cc:13206
b0
#define b0
Definition: continua.cc:14105
dimer_
struct s_dimer_ dimer_
s_fh2ob_::e_1
double e_1[3]
Definition: continua.cc:15664
s_blockin_
Definition: continua.cc:13175
n2part_2_::jrange1
int jrange1
Definition: continua.cc:13267
u_bl3_
Definition: continua.cc:13273
inlist::innum
ftnint * innum
Definition: continua.cc:13040
initi_
int initi_(double p, double t, double *radct, double *t0, double *p0, double *w_wv__, double *w_o2__, double *w_n2__, double *w_other__, double *xn0, double *xn, double *xn_wv__, double *rhofac)
Definition: continua.cc:17049
O2O2_O2F_ckd_mt_100_npt
const int O2O2_O2F_ckd_mt_100_npt
Definition: continua.h:3453
u_bba_
Definition: continua.cc:13205
sh2oa_1_::swv296
double swv296[2003]
Definition: continua.cc:15268
u_bba_::s_m_1::alfa
double alfa
Definition: continua.cc:13207
Pa_to_kPa
const Numeric Pa_to_kPa
Definition: continua.cc:378
O2_00_ckd_mt_100_v2
const Numeric O2_00_ckd_mt_100_v2
Definition: continua.h:3520
bsa296_
int bsa296_(void)
Definition: continua.cc:17101
inlist::infmtlen
ftnlen infmtlen
Definition: continua.cc:13051
s260b_2_::dv
double dv
Definition: continua.cc:15296
bs260b_
int bs260b_(void)
Definition: continua.cc:17138
K_fp
shortlogical(* K_fp)()
Definition: continua.cc:13128
s260b_2_::v1
double v1
Definition: continua.cc:15296
bsb296_
int bsb296_(void)
Definition: continua.cc:17112
MPM93O2AbsModel
void MPM93O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM93O2AbsModel.
Definition: continua.cc:6726
s_n2part_
Definition: continua.cc:13332
inlist
Definition: continua.cc:13034
eb_ref
#define eb_ref(a_1, a_2)
sh2ob_1_::dv
double dv
Definition: continua.cc:15274
energ_1_
Definition: continua.cc:13248
ik1k0
#define ik1k0
Definition: continua.cc:14879
u_bl3_::m_1
struct u_bl3_::s_m_1 m_1
N2N2_CT296_ckd_mt_100_v1
const Numeric N2N2_CT296_ckd_mt_100_v1
Definition: continua.h:3326
s_app3a_::dx
double dx
Definition: continua.cc:13182
cilist::cifmt
char * cifmt
Definition: continua.cc:12992
shortint
short int shortint
Definition: continua.cc:12950
O2O2_O2F_ckd_mt_100_dv
const Numeric O2O2_O2F_ckd_mt_100_dv
Definition: continua.h:3452
joker
const Joker joker
cllist::cunit
ftnint cunit
Definition: continua.cc:13022
q1
#define q1
Definition: continua.cc:13831
GHz_to_Hz
const Numeric GHz_to_Hz
Definition: continua.cc:372
inlist::inseq
char * inseq
Definition: continua.cc:13046
O2O2_O2Fo_ckd_mt_100
const double O2O2_O2Fo_ckd_mt_100[O2O2_O2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3454
beta
#define beta
Definition: continua.cc:13828
ivi
#define ivi
Definition: continua.cc:14336
Standard_N2_self_continuum
void Standard_N2_self_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xfin, const Numeric xtin, const Numeric xpin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
4) N2-N2
Definition: continua.cc:8309
dnu
#define dnu
Definition: continua.cc:13412
FH2O_ckd_mt_100
const double FH2O_ckd_mt_100[FH2O_ckd_mt_100_npt+addF77fields]
Definition: continua.h:2704
Multitype::z
doublecomplex z
Definition: continua.cc:13072
SL296_ckd_mt_100_v2
const Numeric SL296_ckd_mt_100_v2
Definition: continua.h:1878
VOID
#define VOID
Definition: continua.cc:13062
sh2oa_
struct s_sh2oa_ sh2oa_
u_bbbb_::s_m_1::idelv
int idelv
Definition: continua.cc:13287
FCO2_ckd_mt_100_v2
const Numeric FCO2_ckd_mt_100_v2
Definition: continua.h:3112
CKD_mt_100_self_h2o
void CKD_mt_100_self_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version MT 1.00 H2O self continuum absorption model.
Definition: continua.cc:3222
N2N2_N2F_ckd_mt_100_dv
const Numeric N2N2_N2F_ckd_mt_100_dv
Definition: continua.h:3386
u_bbbb_
Definition: continua.cc:13285
O2_10_ckd_mt_100_dv
const Numeric O2_10_ckd_mt_100_dv
Definition: continua.h:3640
MPM92O2AbsModel
void MPM92O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM92O2AbsModel.
Definition: continua.cc:6455
Vardesc::dims
ftnlen * dims
Definition: continua.cc:13082
s260a_1_::swv260
double swv260[2003]
Definition: continua.cc:15286
rsilo_
struct s_rsilo_ rsilo_
consts_1_::gascon
double gascon
Definition: continua.cc:15304
doublecomplex
Definition: continua.cc:12954
N2N2_CT220_ckd_mt_100
const double N2N2_CT220_ckd_mt_100[N2N2_CT220_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3360
slit
#define slit
Definition: continua.cc:14560
SL296_ckd_mt_100_dv
const Numeric SL296_ckd_mt_100_dv
Definition: continua.h:1879
like_1_::like
int like
Definition: continua.cc:13230
inlist::inblank
char * inblank
Definition: continua.cc:13058
n2part_2_::b0
double b0
Definition: continua.cc:13266
Z_f
VOID Z_f
Definition: continua.cc:13135
fh2ob_
struct s_fh2ob_ fh2ob_
Namelist
Definition: continua.cc:13087
N2N2_CT296_ckd_mt_100_dv
const Numeric N2N2_CT296_ckd_mt_100_dv
Definition: continua.h:3328
hPa_to_Pa
const Numeric hPa_to_Pa
Definition: continua.cc:380
u_bbbb_::s_m_1::ilp
int ilp
Definition: continua.cc:13287
s_sh2oa_::e_1
double e_1[2003]
Definition: continua.cc:15669
s_app3a_
Definition: continua.cc:13181
s_rsilo_
Definition: continua.cc:13193
s_app3b_
Definition: continua.cc:13187
FH2O_ckd_0
const double FH2O_ckd_0[FH2O_ckd_0_npt+addF77fields]
Definition: continua.h:1018
s260b_1_::dv___
double dv___
Definition: continua.cc:15292
swv_
double swv_(int ivc, double wn, double t, double *t0, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xslf)
Definition: continua.cc:16788
u_bbbb_::s_m_2::ll
int ll
Definition: continua.cc:13290
inlist::innamlen
ftnlen innamlen
Definition: continua.cc:13043
inlist::innrec
ftnint * innrec
Definition: continua.cc:13057
s_bbb_::ibound
int ibound
Definition: continua.cc:13243
s_consts_
Definition: continua.cc:16406
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:796
SL260_ckd_mt_100_dv
const Numeric SL260_ckd_mt_100_dv
Definition: continua.h:2290
u_bl3_::s_m_2::rsibb
double rsibb[401]
Definition: continua.cc:13278
xsec_continuum_tag
void xsec_continuum_tag(MatrixView xsec, const String &name, ConstVectorView parameters, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_n2, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
Calculates model absorption for one continuum or full model tag.
Definition: continua.cc:9495
like_
struct s_like_ like_
s260a_1_
Definition: continua.cc:15285
cilist
Definition: continua.cc:12989
N2N2_N2F_ckd_mt_100
const double N2N2_N2F_ckd_mt_100[N2N2_N2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3388
SL296_ckd_0_v2
const Numeric SL296_ckd_0_v2
Definition: continua.h:602
N2N2_N2F_ckd_mt_100_npt
const int N2N2_N2F_ckd_mt_100_npt
Definition: continua.h:3387
addF77fields
const int addF77fields
Definition: continua.h:577
s_s260a_
Definition: continua.cc:16038
E_fp
doublereal(*)(* E_fp)()
Definition: continua.cc:13124
inlist::informlen
ftnint informlen
Definition: continua.cc:13053
s_n2part_::fill_1
double fill_1[1]
Definition: continua.cc:13333
s_s260a_::e_1
double e_1[2003]
Definition: continua.cc:16039
FCO2_ckd_mt_100_npt
const int FCO2_ckd_mt_100_npt
Definition: continua.h:3114
temp
#define temp
Definition: continua.cc:13409
s_s260b_
Definition: continua.cc:16401
u_bba_::m_1
struct u_bba_::s_m_1 m_1
blockin_
struct s_blockin_ blockin_
MPM93WaterDropletAbs
void MPM93WaterDropletAbs(MatrixView pxsec, const Numeric CCin, const Numeric CGin, const Numeric CEin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM93WaterDropletAbs.
Definition: continua.cc:8630
inlist::inerr
flag inerr
Definition: continua.cc:13034
olist::ofnmlen
ftnlen ofnmlen
Definition: continua.cc:13011
s260b_2_::v2
double v2
Definition: continua.cc:15296
H_f
VOID H_f
Definition: continua.cc:13134
u_bbbb_::s_m_1::idell
int idell
Definition: continua.cc:13287
sh2ob_2_::dv
double dv
Definition: continua.cc:15278
array.h
This file contains the definition of Array.
SL260_ckd_mt_100_npt
const int SL260_ckd_mt_100_npt
Definition: continua.h:2291
sh2oa_1_
Definition: continua.cc:15267
q
#define q
Definition: continua.cc:14103
n2part_1_
Definition: continua.cc:13261
n2part_2_
Definition: continua.cc:13265
consts_1_::radcn2
double radcn2
Definition: continua.cc:15305
I_fp
integer(* I_fp)()
Definition: continua.cc:13122
s260b_2_::npts
int npts
Definition: continua.cc:15297
d0
#define d0
Definition: continua.cc:14106
consts_1_::pi
double pi
Definition: continua.cc:15304
O2_00_ckd_mt_100
const double O2_00_ckd_mt_100[O2_00_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3523
inlist::inname
char * inname
Definition: continua.cc:13042
s_blockin_::dnu
double dnu
Definition: continua.cc:13176
Namelist::nvars
int nvars
Definition: continua.cc:13090
u_bbbb_::s_m_2::ivip
int ivip
Definition: continua.cc:13290
flag
long int flag
Definition: continua.cc:12982
addspec_
int addspec_(double *g0, double *ep, double *tau1, double *tau2, double *tau5, double *tau6, double *temp, int *nf, double *freq, double *abscoef, int *, int *like, int *lambda1, int *lambda2, int *lambda, int *)
Definition: continua.cc:13842
SL260_ckd_0_dv
const Numeric SL260_ckd_0_dv
Definition: continua.h:1432
fh2ob_1_::v2
double v2
Definition: continua.cc:15256
continua.h
This header file contains all the declarations of the implemented continua and full absorption (lines...
ldelvi
#define ldelvi
Definition: continua.cc:14335
s_like_::fill_1
int fill_1[1]
Definition: continua.cc:13339
FH2O_ckd_mt_100_dv
const Numeric FH2O_ckd_mt_100_dv
Definition: continua.h:2702
fh2oa_1
#define fh2oa_1
Definition: continua.cc:15253
dx
#define dx
Definition: continua.cc:14561
energ_
struct s_energe_ energ_
s_bf_::om0
double om0
Definition: continua.cc:13224
MPM93_N2_continuum
void MPM93_N2_continuum(MatrixView pxsec, const Numeric Cin, const Numeric Gin, const Numeric xTin, const Numeric xfin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM93 N2 continuum.
Definition: continua.cc:7964
clebsqr_0_
double clebsqr_0_(int n__, int *l, int *lambda, int *lp)
Definition: continua.cc:14763
matpackI.h
olist::ofm
char * ofm
Definition: continua.cc:13014
ixpolat_
int ixpolat_(int *l, int *m, int *k, double *eps, double *x, double *y, double *t, double *ss, double *si, int *nr, double *s2)
Definition: continua.cc:15233
fh2oa_
struct s_fh2oa_ fh2oa_
s260a_1
#define s260a_1
Definition: continua.cc:15289
O2_00_ckd_mt_100_npt
const int O2_00_ckd_mt_100_npt
Definition: continua.h:3522
Array
This can be used to make arrays out of anything.
Definition: array.h:103
nlines
#define nlines
Definition: continua.cc:14568
Rosenkranz_CO2_self_continuum
void Rosenkranz_CO2_self_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Rosenkranz_CO2_self_continuum.
Definition: continua.cc:8423
u_bbbb_::s_m_1::ivp
int ivp
Definition: continua.cc:13287
n2part_2_::q
double q
Definition: continua.cc:13266
u_bba_::s_m_2::beta
double beta
Definition: continua.cc:13210
fctl_
double fctl_(int *n)
Definition: continua.cc:14844
icilist::icifmt
char * icifmt
Definition: continua.cc:13001
consts_1_::boltz
double boltz
Definition: continua.cc:15304
Pardo_ATM_H2O_ForeignContinuum
void Pardo_ATM_H2O_ForeignContinuum(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Pardo_ATM_H2O_ForeignContinuum.
Definition: continua.cc:5366
Namelist::name
char * name
Definition: continua.cc:13088
s_energe_
Definition: continua.cc:13299
s_bf_
Definition: continua.cc:13223
Multitype
Definition: continua.cc:13064
N2N2_CT220_ckd_mt_100_dv
const Numeric N2N2_CT220_ckd_mt_100_dv
Definition: continua.h:3358
Multitype::r
real r
Definition: continua.cc:13069
s_dimer_
Definition: continua.cc:13255
check_continuum_model
void check_continuum_model(const String &name)
An auxiliary functions that checks if a given continuum model is listed in species_data....
Definition: continua.cc:12872
MPM85O2AbsModel
void MPM85O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM85O2AbsModel.
Definition: continua.cc:5621
MPM93H2OAbsModel
void MPM93H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM93H2OAbsModel.
Definition: continua.cc:1091
consts_1_::planck
double planck
Definition: continua.cc:15304
N2N2_CT296_ckd_mt_100_npt
const int N2N2_CT296_ckd_mt_100_npt
Definition: continua.h:3329
CREATE_OUT3
#define CREATE_OUT3
Definition: messages.h:208
O2_00_ckd_mt_100_v1
const Numeric O2_00_ckd_mt_100_v1
Definition: continua.h:3519
FH2O_ckd_mt_100_v2
const Numeric FH2O_ckd_mt_100_v2
Definition: continua.h:2701
bl3_
union u_bl3_ bl3_
FCO2_ckd_mt_100
const double FCO2_ckd_mt_100[FCO2_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3115
profile_
int profile_(double *x, double *y)
Definition: continua.cc:14155
PWR98H2OAbsModel
void PWR98H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
PWR98H2OAbsModel.
Definition: continua.cc:1317
MaTipping_H2O_foreign_continuum
void MaTipping_H2O_foreign_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MaTipping_H2O_foreign_continuum.
Definition: continua.cc:1907
n2part_2_::d0
double d0
Definition: continua.cc:13266
u_bba_::s_m_2::rsi
double rsi[201]
Definition: continua.cc:13210
species_data
Array< SpeciesRecord > species_data
Definition: species_data.cc:40
CP98H2OAbsModel
void CP98H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CP98H2OAbsModel.
Definition: continua.cc:1527
s260b_1_::v1___
double v1___
Definition: continua.cc:15292
O2O2_O2F_ckd_mt_100_v2
const Numeric O2O2_O2F_ckd_mt_100_v2
Definition: continua.h:3451
fwv_mpmf87s93__
double fwv_mpmf87s93__(double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16686
logical
long int logical
Definition: continua.cc:12955
O2_10_ckd_mt_100_v1
const Numeric O2_10_ckd_mt_100_v1
Definition: continua.h:3638
Rosenkranz_N2_self_continuum
void Rosenkranz_N2_self_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Rosenkranz_N2_self_continuum.
Definition: continua.cc:8203
FH2O_ckd_mt_100_npt
const int FH2O_ckd_mt_100_npt
Definition: continua.h:2703
s_blockin_::fnumax
double fnumax
Definition: continua.cc:13176
ivip
#define ivip
Definition: continua.cc:14337
Multitype::g
integer1 g
Definition: continua.cc:13065
u_bbbb_::m_1
struct u_bbbb_::s_m_1 m_1
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:802
R_fp
real(* R_fp)()
Definition: continua.cc:13123
_U_
#define _U_
Definition: config.h:158
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:62
Multitype::i
integer i
Definition: continua.cc:13067
BF86_CIA_N2
void BF86_CIA_N2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Borysow-Frommhold 1986 N2-N2 CIA absorption model;.
Definition: continua.cc:7838
dB_km_GHz
const Numeric dB_km_GHz
Definition: continua.cc:386
abs
#define abs(x)
Definition: continua.cc:13094
jrange1
#define jrange1
Definition: continua.cc:14107
Vardesc
Definition: continua.cc:13079
s_rsilo_::rsilo
double rsilo[201]
Definition: continua.cc:13194
cllist
Definition: continua.cc:13021
fh2ob_2_::dv
double dv
Definition: continua.cc:15260
clebsqr_
double clebsqr_(int *l, int *lambda, int *lp)
Definition: continua.cc:14834
CKD_mt_v1v0_o2
void CKD_mt_v1v0_o2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version MT 1.00 O2 v1<-v0 band absorption.
Definition: continua.cc:4960
logical1
char logical1
Definition: continua.cc:12957
fwv24_
double fwv24_(double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16715
address
char * address
Definition: continua.cc:12949
inlist::indirlen
ftnlen indirlen
Definition: continua.cc:13049
consts_1_::radcn1
double radcn1
Definition: continua.cc:15304
sh2oa_1
#define sh2oa_1
Definition: continua.cc:15271
FCO2_ckd_mt_100_dv
const Numeric FCO2_ckd_mt_100_dv
Definition: continua.h:3113
fh2oa_1_::fh2o
double fh2o[2003]
Definition: continua.cc:15250
Standard_H2O_self_continuum
void Standard_H2O_self_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Standard_H2O_self_continuum.
Definition: continua.cc:1659
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:175
s_app3b_::nsriup
int nsriup
Definition: continua.cc:13188
s_n2part_::fill_3
int fill_3[1]
Definition: continua.cc:13335
E_f
doublereal E_f
Definition: continua.cc:13136
fnumax
#define fnumax
Definition: continua.cc:13411
s260b_2_
Definition: continua.cc:15295
FCO2_ckd_mt_100_v1
const Numeric FCO2_ckd_mt_100_v1
Definition: continua.h:3111
rsilo
#define rsilo
Definition: continua.cc:13825
s260b_1_
Definition: continua.cc:15291
shortlogical
short int shortlogical
Definition: continua.cc:12956
fh2ob_1
#define fh2ob_1
Definition: continua.cc:15264
doublereal
double doublereal
Definition: continua.cc:12952
FH2O_ckd_mt_100_v1
const Numeric FH2O_ckd_mt_100_v1
Definition: continua.h:2700
specfct_
double specfct_(double *freq, double *omega, double *phi, double *phi2, int *n, double *rtemp)
Definition: continua.cc:14258
N2N2_CT220_ckd_mt_100_v1
const Numeric N2N2_CT220_ckd_mt_100_v1
Definition: continua.h:3356
doublecomplex::r
doublereal r
Definition: continua.cc:12954
ns
#define ns
Definition: continua.cc:14564
omeg
#define omeg
Definition: continua.cc:13826
u_bba_::s_m_2::rsigg
double rsigg[201]
Definition: continua.cc:13210
phys_consts__
int phys_consts__(void)
Definition: continua.cc:17082
olist::ounit
ftnint ounit
Definition: continua.cc:13009
olist::ofnm
char * ofnm
Definition: continua.cc:13010
alist
Definition: continua.cc:13028
consts_1_::avogad
double avogad
Definition: continua.cc:15304
inlist::infile
char * infile
Definition: continua.cc:13036
s_energe_::e_1
double e_1[246]
Definition: continua.cc:13300
sh2ob_1_::nptslfwv
int nptslfwv
Definition: continua.cc:15275
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
energ_1_::niv
int niv[6]
Definition: continua.cc:13250
S_fp
int(* S_fp)()
Definition: continua.cc:13130
CKD_mt_100_foreign_h2o
void CKD_mt_100_foreign_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version MT 1.00 H2O foreign continuum absorption model.
Definition: continua.cc:3475
s260a_
struct s_s260a_ s260a_
N2N2_CT220_ckd_mt_100_v2
const Numeric N2N2_CT220_ckd_mt_100_v2
Definition: continua.h:3357
app3b_
struct s_app3b_ app3b_
Pardo_ATM_N2_dry_continuum
void Pardo_ATM_N2_dry_continuum(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView h2ovmr, const Verbosity &verbosity)
Pardo_ATM_N2_dry_continuum.
Definition: continua.cc:8098
icilist::icirlen
ftnint icirlen
Definition: continua.cc:13002
u_bba_::s_m_1::rsigg
double rsigg[201]
Definition: continua.cc:13207
WVSatPressureLiquidWater
Numeric WVSatPressureLiquidWater(const Numeric t)
Definition: continua.cc:9364
sh2ob_1_
Definition: continua.cc:15273
fh2ob_2_::v2
double v2
Definition: continua.cc:15260
FH2O_ckd_0_v2
const Numeric FH2O_ckd_0_v2
Definition: continua.h:1015
CKD_222_self_h2o
void CKD_222_self_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version 2.2.2 H2O self continuum absorption model.
Definition: continua.cc:2162
sh2ob_2_
Definition: continua.cc:15277
bgama_
double bgama_(double *fnu, double *t1, double *t2, double *eps, double *t3, double *t4, double *temp)
Definition: continua.cc:14881
s_blockin_::temp
double temp
Definition: continua.cc:13176
SL260_ckd_mt_100
const double SL260_ckd_mt_100[SL260_ckd_mt_100_npt+addF77fields]
Definition: continua.h:2292
u_bl3_::s_m_2
Definition: continua.cc:13277
SL260_ckd_0_v1
const Numeric SL260_ckd_0_v1
Definition: continua.h:1430
s260b_1_::nptslfwv___
int nptslfwv___
Definition: continua.cc:15293
fh2ob_2_::npts
int npts
Definition: continua.cc:15261
olist::orl
ftnint orl
Definition: continua.cc:13015
bound54_
int bound54_(double *temp, double *rsi, int *nsol)
Definition: continua.cc:14571
Vardesc::type
int type
Definition: continua.cc:13083
s_like_::e_2
char e_2[5]
Definition: continua.cc:13340
Vardesc::name
char * name
Definition: continua.cc:13080
s260b_1_::v2___
double v2___
Definition: continua.cc:15292
integer1
char integer1
Definition: continua.cc:12958
MPM93RainExt
void MPM93RainExt(MatrixView pxsec, const Numeric CEin, const Numeric CAin, const Numeric CBin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM93RainExt.
Definition: continua.cc:8970
inlist::inseqlen
ftnlen inseqlen
Definition: continua.cc:13047
olist::oerr
flag oerr
Definition: continua.cc:13008
alist::aunit
ftnint aunit
Definition: continua.cc:13029
MPM87H2OAbsModel
void MPM87H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM87H2OAbsModel.
Definition: continua.cc:441
O2_10_ckd_mt_100_v2
const Numeric O2_10_ckd_mt_100_v2
Definition: continua.h:3639
bf_
struct s_bf_ bf_
like
#define like
Definition: continua.cc:13420
s_blockin_::fnumin
double fnumin
Definition: continua.cc:13176
s_k1k0_
Definition: continua.cc:13236
max
#define max(a, b)
Definition: continua.cc:13097
niv
#define niv
Definition: continua.cc:14567
PI
const Numeric PI
Rosenkranz_CO2_foreign_continuum
void Rosenkranz_CO2_foreign_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_n2, ConstVectorView vmr, const Verbosity &verbosity)
Rosenkranz_CO2_foreign_continuum.
Definition: continua.cc:8524
MPM93_H2O_continuum
void MPM93_H2O_continuum(MatrixView pxsec, const Numeric fcenter, const Numeric b1, const Numeric b2, const Numeric b3, const Numeric b4, const Numeric b5, const Numeric b6, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM93 H2O pseudo continuum line parameters:
Definition: continua.cc:5482
CKD_242_foreign_h2o
void CKD_242_foreign_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version 2.4.2 H2O foreign continuum absorption model.
Definition: continua.cc:2977
wnrmax3
#define wnrmax3
Definition: continua.cc:14562
real
float real
Definition: continua.cc:12951
N2N2_N2F_ckd_mt_100_v1
const Numeric N2N2_N2F_ckd_mt_100_v1
Definition: continua.h:3384
artsckd_
double artsckd_(double p, double t, double vmrh2o, double vmrn2, double vmro2, double freq, int ivc)
Definition: continua.cc:16452
s_bf_::g0bf
double g0bf
Definition: continua.cc:13224
s_energe_::e_2
int e_2[6]
Definition: continua.cc:13301
Standard_O2_continuum
void Standard_O2_continuum(MatrixView pxsec, const Numeric Cin, const Numeric G0in, const Numeric G0Ain, const Numeric G0Bin, const Numeric XG0din, const Numeric XG0win, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
Standard_O2_continuum.
Definition: continua.cc:7673
SL260_ckd_0
const double SL260_ckd_0[SL260_ckd_0_npt+addF77fields]
Definition: continua.h:1434
SL260_ckd_mt_100_v2
const Numeric SL260_ckd_mt_100_v2
Definition: continua.h:2289
bbbb_
union u_bbbb_ bbbb_
SL260_ckd_0_v2
const Numeric SL260_ckd_0_v2
Definition: continua.h:1431
consts_1
#define consts_1
Definition: continua.cc:15308
s_k1k0_::ik1k0
int ik1k0
Definition: continua.cc:13237
integer
long int integer
Definition: continua.cc:12947
u_bbbb_::s_m_2::ldelel
int ldelel
Definition: continua.cc:13290
s_sh2ob_::e_2
int e_2
Definition: continua.cc:16035
SL296_ckd_0_v1
const Numeric SL296_ckd_0_v1
Definition: continua.h:601
Multitype::h
shortint h
Definition: continua.cc:13066
cilist::cirec
ftnint cirec
Definition: continua.cc:12993
J_fp
shortint(* J_fp)()
Definition: continua.cc:13121
n2part_1_::jrange2
int jrange2
Definition: continua.cc:13263
rsigg
#define rsigg
Definition: continua.cc:13827
rsibb
#define rsibb
Definition: continua.cc:14569
n2part_
struct s_n2part_ n2part_
VMRCalcLimit
const Numeric VMRCalcLimit
Definition: continua.cc:401
s_dimer_::nlines
int nlines
Definition: continua.cc:13256
nsri
#define nsri
Definition: continua.cc:14563
consts_1_::clight
double clight
Definition: continua.cc:15304
s_sh2oa_
Definition: continua.cc:15668
s_sh2ob_::e_1
double e_1[3]
Definition: continua.cc:16034
s_fh2oa_
Definition: continua.cc:15312
C_f
VOID C_f
Definition: continua.cc:13133
CKD_mt_co2
void CKD_mt_co2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version MT 1.00 CO2 continuum absorption model.
Definition: continua.cc:3869
ldelel
#define ldelel
Definition: continua.cc:14338
Multitype::d
doublereal d
Definition: continua.cc:13070
s_bbb_
Definition: continua.cc:13242
s_sh2ob_
Definition: continua.cc:16033
like_1_::lgas
char lgas[5]
Definition: continua.cc:13231
s_app3b_::nsri
int nsri
Definition: continua.cc:13188
s_fh2ob_
Definition: continua.cc:15663
inlist::inunflen
ftnlen inunflen
Definition: continua.cc:13055
energ_1_::eb
double eb[246]
Definition: continua.cc:13249
fh2ob_1_::dv
double dv
Definition: continua.cc:15256
inlist::infilen
ftnlen infilen
Definition: continua.cc:13037
s_bbc_
Definition: continua.cc:13217
n2part_1_::d01
double d01
Definition: continua.cc:13262
s_bou43_::initb
int initb
Definition: continua.cc:13200
olist::osta
char * osta
Definition: continua.cc:13012
complex::r
real r
Definition: continua.cc:12953
u_bl3_::m_2
struct u_bl3_::s_m_2 m_2
consts_1_::alosmt
double alosmt
Definition: continua.cc:15304
icilist
Definition: continua.cc:12998
partsum_
int partsum_(double *temp)
Definition: continua.cc:14109
s_consts_::e_1
double e_1[9]
Definition: continua.cc:16407
Multitype::c
complex c
Definition: continua.cc:13071
ftnlen
long int ftnlen
Definition: continua.cc:12983
parameters
Parameters parameters
Holds the command line parameters.
Definition: parameters.cc:40
RADFN_FUN
Numeric RADFN_FUN(const Numeric VI, const Numeric XKT)
Definition: continua.cc:2075
s_bbc_::nsol
int nsol
Definition: continua.cc:13218
PWR93O2AbsModel
void PWR93O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, const String &version, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmrh2o, ConstVectorView vmr, const Verbosity &verbosity)
Oxygen complex at 60 GHz plus mm O2 lines plus O2 continuum.
Definition: continua.cc:7024
u_bba_::s_m_2::omeg
double omeg[201]
Definition: continua.cc:13210
u_bl3_::s_m_1::rsi
double rsi[401]
Definition: continua.cc:13275
H_fp
VOID(* H_fp)()
Definition: continua.cc:13129
inlist::infmt
char * infmt
Definition: continua.cc:13050
u_bbbb_::s_m_2::llp
int llp
Definition: continua.cc:13290
SL260_ckd_0_npt
const int SL260_ckd_0_npt
Definition: continua.h:1433
s_n2part_::e_2
double e_2[4]
Definition: continua.cc:13334
kPa_to_Pa
const Numeric kPa_to_Pa
Definition: continua.cc:376
olist::oacc
char * oacc
Definition: continua.cc:13013
inlist::inunf
char * inunf
Definition: continua.cc:13054
u_bbbb_::s_m_2::ldelvi
int ldelvi
Definition: continua.cc:13290
icilist::icierr
flag icierr
Definition: continua.cc:12998
u_bbbb_::s_m_2
Definition: continua.cc:13289
sh2ob_
struct s_sh2ob_ sh2ob_
d01
#define d01
Definition: continua.cc:13834
LOG10_EULER_NUMBER
const Numeric LOG10_EULER_NUMBER
MPM89H2OAbsModel
void MPM89H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM89H2OAbsModel.
Definition: continua.cc:627
dB_m_Hz
const Numeric dB_m_Hz
Definition: continua.cc:385
s_bf_::delbf
double delbf
Definition: continua.cc:13224
fh2oa_1_
Definition: continua.cc:15249
u_bl3_::s_m_1
Definition: continua.cc:13274
icilist::iciend
flag iciend
Definition: continua.cc:13000
inlist::inex
ftnint * inex
Definition: continua.cc:13038
SL296_ckd_0_npt
const int SL296_ckd_0_npt
Definition: continua.h:604
b01
#define b01
Definition: continua.cc:13833
k1k0_
struct s_k1k0_ k1k0_
O2_00_ckd_mt_100_dv
const Numeric O2_00_ckd_mt_100_dv
Definition: continua.h:3521
wn2
#define wn2
Definition: continua.cc:14104
SL296_ckd_mt_100_v1
const Numeric SL296_ckd_mt_100_v1
Definition: continua.h:1877
swv24_
double swv24_(double wn, double t, double *t0, double *w_wv__, double *rft, double *, double *xn_wv__, double *xn0, double *xslf)
Definition: continua.cc:16823
C_fp
VOID(* C_fp)()
Definition: continua.cc:13125
s_s260b_::e_1
double e_1[3]
Definition: continua.cc:16402
xlgr_
double xlgr_(double *xf, double *x)
Definition: continua.cc:17021
N2N2_CT296_ckd_mt_100_v2
const Numeric N2N2_CT296_ckd_mt_100_v2
Definition: continua.h:3327
bbc_
struct s_bbc_ bbc_
MPM87O2AbsModel
void MPM87O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
MPM87O2AbsModel.
Definition: continua.cc:5906
swv_mpmf87s93__
double swv_mpmf87s93__(double wn, double t, double *t0, double *w_wv__, double *rft, double *, double *xn_wv__, double *xn0, double *xslf)
Definition: continua.cc:16892
sh2ob_2_::npts
int npts
Definition: continua.cc:15279
SL260_ckd_mt_100_v1
const Numeric SL260_ckd_mt_100_v1
Definition: continua.h:2288
N2N2_CT220_ckd_mt_100_npt
const int N2N2_CT220_ckd_mt_100_npt
Definition: continua.h:3359
Z_fp
VOID(* Z_fp)()
Definition: continua.cc:13126
u_bbbb_::s_m_2::ivi
int ivi
Definition: continua.cc:13290
s_s260b_::e_2
int e_2
Definition: continua.cc:16403
s_bou43_
Definition: continua.cc:13199
n2part_1_::wn2
double wn2[2]
Definition: continua.cc:13262
CKD_mt_CIAfun_n2
void CKD_mt_CIAfun_n2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version MT 1.00 N2-N2 collision induced absorption (fundamental band)
Definition: continua.cc:4323
uinteger
unsigned long int uinteger
Definition: continua.cc:12948
icilist::iciunit
char * iciunit
Definition: continua.cc:12999
XINT_FUN
Numeric XINT_FUN(const Numeric V1A, const Numeric, const Numeric DVA, ConstVectorView A, const Numeric VI)
Definition: continua.cc:1991
EULER_NUMBER
const Numeric EULER_NUMBER
Pa_to_hPa
const Numeric Pa_to_hPa
Definition: continua.cc:382
NAT_LOG_TEN
const Numeric NAT_LOG_TEN
bound32_
int bound32_(double *temp, double *rsi, int *nsol)
Definition: continua.cc:14342
s_fh2oa_::e_1
double e_1[2003]
Definition: continua.cc:15313
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
n2part_1_::b01
double b01
Definition: continua.cc:13262
L_fp
logical(* L_fp)()
Definition: continua.cc:13127
ibound
#define ibound
Definition: continua.cc:13830
rsi
#define rsi
Definition: continua.cc:14153
s_app3a_::slit
double slit
Definition: continua.cc:13182
FH2O_ckd_0_npt
const int FH2O_ckd_0_npt
Definition: continua.h:1017
u_bba_::s_m_2
Definition: continua.cc:13209
Hz_to_GHz
const Numeric Hz_to_GHz
Definition: continua.cc:374
fnumin
#define fnumin
Definition: continua.cc:13410
u_bbbb_::m_2
struct u_bbbb_::s_m_2 m_2
CKD_242_self_h2o
void CKD_242_self_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version 2.4.2 H2O self continuum absorption model.
Definition: continua.cc:2676
SL296_ckd_0_dv
const Numeric SL296_ckd_0_dv
Definition: continua.h:603
sh2ob_1_::v1
double v1
Definition: continua.cc:15274
u_bbbb_::s_m_1::iv
int iv
Definition: continua.cc:13287
MPM93IceCrystalAbs
void MPM93IceCrystalAbs(MatrixView pxsec, const Numeric CCin, const Numeric CAin, const Numeric CBin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM93IceCrystalAbs.
Definition: continua.cc:8807
CKD24_H20
void CKD24_H20(MatrixView pxsec, int isf, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version 2.4 H2O continuum absorption model.
Definition: continua.cc:5182
llp
#define llp
Definition: continua.cc:14340
CKD_222_foreign_h2o
void CKD_222_foreign_h2o(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, ConstVectorView abs_n2, const Verbosity &verbosity)
CKD version 2.2.2 H2O foreign continuum absorption model.
Definition: continua.cc:2450
SL296_ckd_mt_100_npt
const int SL296_ckd_mt_100_npt
Definition: continua.h:1880
bou43_
struct s_bou43_ bou43_
FH2O_ckd_0_v1
const Numeric FH2O_ckd_0_v1
Definition: continua.h:1014
inlist::inacclen
ftnlen inacclen
Definition: continua.cc:13045
ftnint
long int ftnint
Definition: continua.cc:12984
bs260a_
int bs260a_(void)
Definition: continua.cc:17126
nsriup
#define nsriup
Definition: continua.cc:14565
icilist::icirnum
ftnint icirnum
Definition: continua.cc:13003
Vector
The Vector class.
Definition: matpackI.h:555
like_1_
Definition: continua.cc:13229
CKD_241_co2
void CKD_241_co2(MatrixView pxsec, const Numeric Cin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
CKD version 2.4.1 CO2 continuum absorption model.
Definition: continua.cc:3671
n2part_2_::wn2
double wn2[2]
Definition: continua.cc:13266
inlist::innamed
ftnint * innamed
Definition: continua.cc:13041
s_like_
Definition: continua.cc:13338
Rosenkranz_O2_continuum
void Rosenkranz_O2_continuum(MatrixView pxsec, const Numeric S0in, const Numeric G0in, const Numeric XS0in, const Numeric XG0in, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_h2o, ConstVectorView vmr, const Verbosity &verbosity)
3) O2-air
Definition: continua.cc:7541
MPMLineShapeFunction
Numeric MPMLineShapeFunction(const Numeric gamma, const Numeric fl, const Numeric f)
Definition: continua.cc:9247
cilist::ciend
flag ciend
Definition: continua.cc:12991
u_bba_::s_m_1::omeg
double omeg[201]
Definition: continua.cc:13207
consts_
struct s_consts_ consts_
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
inlist::inacc
char * inacc
Definition: continua.cc:13044
MPMLineShapeO2Function
Numeric MPMLineShapeO2Function(const Numeric gamma, const Numeric fl, const Numeric f, const Numeric delta)
Definition: continua.cc:9304
nsol
#define nsol
Definition: continua.cc:13829
bbb_
struct s_bbb_ bbb_
sh2ob_1_::v2
double v2
Definition: continua.cc:15274
D_fp
doublereal(* D_fp)()
Definition: continua.cc:13124
sh2ob_1
#define sh2ob_1
Definition: continua.cc:15282
cllist::csta
char * csta
Definition: continua.cc:13023
MPM02H2OAbsModel
void MPM02H2OAbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
MPM02H2OAbsModel.
Definition: continua.cc:831
WVSatPressureIce
Numeric WVSatPressureIce(const Numeric t)
Definition: continua.cc:9429
N2N2_N2Ft_ckd_mt_100
const double N2N2_N2Ft_ckd_mt_100[N2N2_N2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3416
inlist::inform
char * inform
Definition: continua.cc:13052
inlist::indir
char * indir
Definition: continua.cc:13048
inlist::inunit
ftnint inunit
Definition: continua.cc:13035
SL296_ckd_mt_100
const double SL296_ckd_mt_100[SL296_ckd_mt_100_npt+addF77fields]
Definition: continua.h:1881
jrange2
#define jrange2
Definition: continua.cc:13835
complex
Definition: continua.cc:12953
BOLTZMAN_CONST
const Numeric BOLTZMAN_CONST
Global constant, the Boltzmann constant [J/K].
fh2ob_2_::v1
double v1
Definition: continua.cc:15260
Standard_H2O_foreign_continuum
void Standard_H2O_foreign_continuum(MatrixView pxsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmr, const Verbosity &verbosity)
Standard_H2O_foreign_continuum.
Definition: continua.cc:1783
arts.h
The global header file for ARTS.
ll
#define ll
Definition: continua.cc:14339
sh2ob_2_::v1
double v1
Definition: continua.cc:15278
SL296_ckd_0
const double SL296_ckd_0[SL296_ckd_0_npt+addF77fields]
Definition: continua.h:605
olist
Definition: continua.cc:13008
sh2ob_2_::v2
double v2
Definition: continua.cc:15278
fwv_
double fwv_(int ivc, double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16658
u_bba_::s_m_1::rsi
double rsi[201]
Definition: continua.cc:13207
spline_
int spline_(int *l, int *m, int *k, double *eps, double *x, double *y, double *t, double *ss, double *si, int *nr, double *s2)
Definition: continua.cc:15226
O2O2_O2Ft_ckd_mt_100
const double O2O2_O2Ft_ckd_mt_100[O2O2_O2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3478