ARTS  1.0.222
continua.cc
Go to the documentation of this file.
1 /* Copyright (C) 2001 Thomas Kuhn <tkuhn@uni-bremen.de>
2  Stefan Buehler <sbuehler@uni-bremen.de>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License as published by the
6  Free Software Foundation; either version 2, or (at your option) any
7  later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17  USA. */
18 
336 #include <cmath>
337 #include "arts.h"
338 #include "matpackI.h"
339 #include "array.h"
340 #include "absorption.h"
341 #include "messages.h"
342 #include "continua.h"
343 
344 // #################################################################################
345 
346 // global constants as defined in constants.cc
347 
348 extern const Numeric EULER_NUMBER;
349 extern const Numeric LOG10_EULER_NUMBER;
350 extern const Numeric NAT_LOG_TEN;
351 extern const Numeric PI;
352 extern const Numeric SPEED_OF_LIGHT;
353 
354 // numerical constants specific defined for the file continua.cc
355 
356 // conversion from neper to decibel:
357 const Numeric Np_to_dB = (10.000000 * LOG10_EULER_NUMBER); // [dB/Np]
358 // conversion from decibel to neper:
359 const Numeric dB_to_Np = (1.000000 / Np_to_dB); // [Np/dB]
360 // conversion from GHz to Hz:
361 const Numeric GHz_to_Hz = 1.000000e9; // [Hz/GHz]
362 // conversion from Hz to GHz:
363 const Numeric Hz_to_GHz = 1.000000e-9; // [GHz/Hz]
364 // conversion from kPa to Pa:
365 const Numeric kPa_to_Pa = 1.000000e3; // [kPa/Pa]
366 // conversion from Pa to kPa:
367 const Numeric Pa_to_kPa = 1.000000e-3; // [Pa/kPa]
368 // conversion from hPa to Pa (hPa = mbar):
369 const Numeric hPa_to_Pa = 1.000000e2; // [hPa/Pa]
370 // conversion from Pa to hPa (hPa = mbar):
371 const Numeric Pa_to_hPa = 1.000000e-2; // [Pa/hPa]
372 
373 // MPM pre-factor for unit setting:
374 const Numeric dB_m_Hz = 0.1820427855916028e-06; // [dB/m/Hz] (4 * pi / c) * 10 * log(e)
375 const Numeric dB_km_GHz = 0.1820427855916028e+06; // [dB/km/GHz] (4 * pi / c) * 10 * log(e)
376 
377 
378 // absorption unit conversions
379 
380 // conversion from dB/km to Np/km for absorption units:
382 // conversion from dB/km to Np/m for absorption units:
383 const Numeric dB_km_to_Np_m = (1.00000e-3 / (10.0 * LOG10_EULER_NUMBER));
384 // conversion from dB/km to 1/m for absorption units:
385 const Numeric dB_km_to_1_m = (1.00000e-3 / (10.0 * LOG10_EULER_NUMBER));
386 
387 
388 // lower limit for absorption calculation due to underflow error:
389 
390 const Numeric VMRCalcLimit = 1.000e-25;
391 
392 // #################################################################################
393 // ############################## WATER VAPOR MODELS ###############################
394 // #################################################################################
395 //
432  const Numeric CCin, // continuum scale factor
433  const Numeric CLin, // line strength scale factor
434  const Numeric CWin, // line broadening scale factor
435  const String& model,
436  ConstVectorView f_mono,
437  ConstVectorView p_abs,
438  ConstVectorView t_abs,
439  ConstVectorView vmr )
440 {
441  //
442  // Coefficients are from Liebe, Radio Science, 20(5), 1985, 1069
443  // 0 1 2 3
444  // f0 b1 b2 b3
445  // [GHz] [kHz/kPa] [1] [GHz/kPa]
446  const Numeric mpm87[30][4] = {
447  { 22.235080, 0.1090, 2.143, 27.84e-3},
448  { 67.813960, 0.0011, 8.730, 27.60e-3},
449  { 119.995940, 0.0007, 8.347, 27.00e-3},
450  { 183.310117, 2.3000, 0.653, 31.64e-3},
451  { 321.225644, 0.0464, 6.156, 21.40e-3},
452  { 325.152919, 1.5400, 1.515, 29.70e-3},
453  { 336.187000, 0.0010, 9.802, 26.50e-3},
454  { 380.197372, 11.9000, 1.018, 30.36e-3},
455  { 390.134508, 0.0044, 7.318, 19.00e-3},
456  { 437.346667, 0.0637, 5.015, 13.70e-3},
457  { 439.150812, 0.9210, 3.561, 16.40e-3},
458  { 443.018295, 0.1940, 5.015, 14.40e-3},
459  { 448.001075, 10.6000, 1.370, 23.80e-3},
460  { 470.888947, 0.3300, 3.561, 18.20e-3},
461  { 474.689127, 1.2800, 2.342, 19.80e-3},
462  { 488.491133, 0.2530, 2.814, 24.90e-3},
463  { 503.568532, 0.0374, 6.693, 11.50e-3},
464  { 504.482692, 0.0125, 6.693, 11.90e-3},
465  { 556.936002, 510.0000, 0.114, 30.00e-3},
466  { 620.700807, 5.0900, 2.150, 22.30e-3},
467  { 658.006500, 0.2740, 7.767, 30.00e-3},
468  { 752.033227, 250.0000, 0.336, 28.60e-3},
469  { 841.073593, 0.0130, 8.113, 14.10e-3},
470  { 859.865000, 0.1330, 7.989, 28.60e-3},
471  { 899.407000, 0.0550, 7.845, 28.60e-3},
472  { 902.555000, 0.0380, 8.360, 26.40e-3},
473  { 906.205524, 0.1830, 5.039, 23.40e-3},
474  { 916.171582, 8.5600, 1.369, 25.30e-3},
475  { 970.315022, 9.1600, 1.842, 24.00e-3},
476  { 987.926764, 138.0000, 0.178, 28.60e-3}};
477 
478  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
479  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
480  const Numeric CC_MPM87 = 1.00000;
481  const Numeric CL_MPM87 = 1.00000;
482  const Numeric CW_MPM87 = 1.00000;
483  // ---------------------------------------------------------------------------------------
484 
485 
486  // select the parameter set (!!model dominates values!!):
487  Numeric CC, CL, CW;
488  if ( model == "MPM87" )
489  {
490  CC = CC_MPM87;
491  CL = CL_MPM87;
492  CW = CW_MPM87;
493  }
494  else if ( model == "MPM87Lines" )
495  {
496  CC = 0.000;
497  CL = CL_MPM87;
498  CW = CW_MPM87;
499  }
500  else if ( model == "MPM87Continuum" )
501  {
502  CC = CC_MPM87;
503  CL = 0.000;
504  CW = 0.000;
505  }
506  else if ( model == "user" )
507  {
508  CC = CCin;
509  CL = CLin;
510  CW = CWin;
511  }
512  else
513  {
514  ostringstream os;
515  os << "H2O-MPM87: ERROR! Wrong model values given.\n"
516  << "Valid models are: 'MPM87', 'MPM87Lines', 'MPM87Continuum', and 'user'" << '\n';
517  throw runtime_error(os.str());
518  }
519  out3 << "H2O-MPM87: (model=" << model << ") parameter values in use:\n"
520  << " CC = " << CC << "\n"
521  << " CL = " << CL << "\n"
522  << " CW = " << CW << "\n";
523 
524 
525  // number of lines of liebe line catalog (30 lines)
526  const Index i_first = 0;
527  const Index i_last = 29;
528 
529  const Index n_p = p_abs.nelem(); // Number of pressure levels
530  const Index n_f = f_mono.nelem(); // Number of frequencies
531 
532  // Check that dimensions of p_abs, t_abs, and vmr agree:
533  assert ( n_p==t_abs.nelem() );
534  assert ( n_p==vmr.nelem() );
535 
536  // Check that dimensions of xsec are consistent with n_f
537  // and n_p. It should be [n_f,n_p]:
538  assert ( n_f==xsec.nrows() );
539  assert ( n_p==xsec.ncols() );
540 
541  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
542  for ( Index i=0; i<n_p; ++i )
543  {
544  // here the total pressure is not multiplied by the H2O vmr for the
545  // P_H2O calculation because we calculate xsec and not abs: abs = vmr * xsec
546  Numeric pwv_dummy = Pa_to_kPa * p_abs[i];
547  // relative inverse temperature [1]
548  Numeric theta = (300.0 / t_abs[i]);
549  // H2O partial pressure [kPa]
550  Numeric pwv = Pa_to_kPa * p_abs[i] * vmr[i];
551  // dry air partial pressure [kPa]
552  Numeric pda = (Pa_to_kPa * p_abs[i]) - pwv;
553  // H2O continuum absorption [dB/km/GHz2] like in the original MPM87
554  Numeric Nppc = CC * pwv_dummy * pow(theta, (Numeric)3.0) * 1.000e-5
555  * ( (0.113 * pda) + (3.57 * pwv * pow(theta, (Numeric)7.8)) );
556 
557  // Loop over input frequency
558  for ( Index s=0; s<n_f; ++s )
559  {
560  // input frequency in [GHz]
561  Numeric ff = f_mono[s] * Hz_to_GHz;
562  // H2O line contribution at position f
563  Numeric Nppl = 0.000;
564 
565  // Loop over MPM89 H2O spectral lines
566  for ( Index l = i_first; l <= i_last; ++l )
567  {
568  // line strength [kHz]
569  Numeric strength = CL * pwv_dummy * mpm87[l][1]
570  * pow(theta,(Numeric)3.5) * exp(mpm87[l][2]*(1.000-theta));
571  // line broadening parameter [GHz]
572  Numeric gam = CW * mpm87[l][3] *
573  ( (4.80 * pwv * pow(theta, (Numeric)1.1)) +
574  ( pda * pow(theta, (Numeric)0.6)) );
575  // effective line width with Doppler broadening [GHz]
576  // gam = sqrt(gam*gam + (2.14e-12 * mpm87[l][0] * mpm87[l][0] / theta));
577  // H2O line absorption [dB/km/GHz] like in the original MPM87
578  Nppl += strength * MPMLineShapeFunction(gam, mpm87[l][0], ff);
579  }
580  // xsec = abs/vmr [1/m] but MPM87 is in [dB/km] --> conversion necessary
581  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * ( Nppl + (Nppc * ff) );
582  }
583  }
584  return;
585 }
586 //
587 // #################################################################################
588 //
616  const Numeric CCin, // continuum scale factor
617  const Numeric CLin, // line strength scale factor
618  const Numeric CWin, // line broadening scale factor
619  const String& model, // model
620  ConstVectorView f_mono,
621  ConstVectorView p_abs,
622  ConstVectorView t_abs,
623  ConstVectorView vmr )
624 {
625  //
626  // Coefficients are from Liebe, Int. J. Infrared and Millimeter Waves, 10(6), 1989, 631
627  // 0 1 2 3 4 5 6
628  // f0 b1 b2 b3 b4 b5 b6
629  // [GHz] [kHz/kPa] [1] [MHz/kPa] [1] [1] [1]
630  const Numeric mpm89[30][7] = {
631  { 22.235080, 0.1090, 2.143, 28.11, 0.69, 4.80, 1.00},
632  { 67.813960, 0.0011, 8.735, 28.58, 0.69, 4.93, 0.82},
633  { 119.995940, 0.0007, 8.356, 29.48, 0.70, 4.78, 0.79},
634  { 183.310074, 2.3000, 0.668, 28.13, 0.64, 5.30, 0.85},
635  { 321.225644, 0.0464, 6.181, 23.03, 0.67, 4.69, 0.54},
636  { 325.152919, 1.5400, 1.540, 27.83, 0.68, 4.85, 0.74},
637  { 336.187000, 0.0010, 9.829, 26.93, 0.69, 4.74, 0.61},
638  { 380.197372, 11.9000, 1.048, 28.73, 0.69, 5.38, 0.84},
639  { 390.134508, 0.0044, 7.350, 21.52, 0.63, 4.81, 0.55},
640  { 437.346667, 0.0637, 5.050, 18.45, 0.60, 4.23, 0.48},
641  { 439.150812, 0.9210, 3.596, 21.00, 0.63, 4.29, 0.52},
642  { 443.018295, 0.1940, 5.050, 18.60, 0.60, 4.23, 0.50},
643  { 448.001075, 10.6000, 1.405, 26.32, 0.66, 4.84, 0.67},
644  { 470.888947, 0.3300, 3.599, 21.52, 0.66, 4.57, 0.65},
645  { 474.689127, 1.2800, 2.381, 23.55, 0.65, 4.65, 0.64},
646  { 488.491133, 0.2530, 2.853, 26.02, 0.69, 5.04, 0.72},
647  { 503.568532, 0.0374, 6.733, 16.12, 0.61, 3.98, 0.43},
648  { 504.482692, 0.0125, 6.733, 16.12, 0.61, 4.01, 0.45},
649  { 556.936002, 510.0000, 0.159, 32.10, 0.69, 4.11, 1.00},
650  { 620.700807, 5.0900, 2.200, 24.38, 0.71, 4.68, 0.68},
651  { 658.006500, 0.2740, 7.820, 32.10, 0.69, 4.14, 1.00},
652  { 752.033227, 250.0000, 0.396, 30.60, 0.68, 4.09, 0.84},
653  { 841.073593, 0.0130, 8.180, 15.90, 0.33, 5.76, 0.45},
654  { 859.865000, 0.1330, 7.989, 30.60, 0.68, 4.09, 0.84},
655  { 899.407000, 0.0550, 7.917, 29.85, 0.68, 4.53, 0.90},
656  { 902.555000, 0.0380, 8.432, 28.65, 0.70, 5.10, 0.95},
657  { 906.205524, 0.1830, 5.111, 24.08, 0.70, 4.70, 0.53},
658  { 916.171582, 8.5600, 1.442, 26.70, 0.70, 4.78, 0.78},
659  { 970.315022, 9.1600, 1.920, 25.50, 0.64, 4.94, 0.67},
660  { 987.926764, 138.0000, 0.258, 29.85, 0.68, 4.55, 0.90}};
661 
662  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
663  // standard values for the MPM89 model
664  // (Liebe, Int. J. Infrared and Millimeter Waves, 10(6), 1989, 631):
665  const Numeric CC_MPM89 = 1.00000;
666  const Numeric CL_MPM89 = 1.00000;
667  const Numeric CW_MPM89 = 1.00000;
668  // ---------------------------------------------------------------------------------------
669 
670 
671  // select the parameter set (!!model goes for values!!):
672  Numeric CC, CL, CW;
673  if ( model == "MPM89" )
674  {
675  CC = CC_MPM89;
676  CL = CL_MPM89;
677  CW = CW_MPM89;
678  }
679  else if ( model == "MPM89Lines" )
680  {
681  CC = 0.000;
682  CL = CL_MPM89;
683  CW = CW_MPM89;
684  }
685  else if ( model == "MPM89Continuum" )
686  {
687  CC = CC_MPM89;
688  CL = 0.000;
689  CW = 0.000;
690  }
691  else if ( model == "user" )
692  {
693  CC = CCin;
694  CL = CLin;
695  CW = CWin;
696  }
697  else
698  {
699  ostringstream os;
700  os << "H2O-MPM89: ERROR! Wrong model values given.\n"
701  << "Valid models are: 'MPM89', 'MPM89Lines', 'MPM89Continuum', and 'user'" << '\n';
702  throw runtime_error(os.str());
703  }
704  out3 << "H2O-MPM89: (model=" << model << ") parameter values in use:\n"
705  << " CC = " << CC << "\n"
706  << " CL = " << CL << "\n"
707  << " CW = " << CW << "\n";
708 
709 
710  // number of lines of Liebe line catalog (30 lines)
711  const Index i_first = 0;
712  const Index i_last = 29;
713 
714  const Index n_p = p_abs.nelem(); // Number of pressure levels
715  const Index n_f = f_mono.nelem(); // Number of frequencies
716 
717  // Check that dimensions of p_abs, t_abs, and vmr agree:
718  assert ( n_p==t_abs.nelem() );
719  assert ( n_p==vmr.nelem() );
720 
721  // Check that dimensions of xsec are consistent with n_f
722  // and n_p. It should be [n_f,n_p]:
723  assert ( n_f==xsec.nrows() );
724  assert ( n_p==xsec.ncols() );
725 
726  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
727  for ( Index i=0; i<n_p; ++i )
728  {
729  // here the total pressure is not multiplied by the H2O vmr for the
730  // P_H2O calculation because we calculate xsec and not abs: abs = vmr * xsec
731  Numeric pwv_dummy = Pa_to_kPa * p_abs[i];
732  // relative inverse temperature [1]
733  Numeric theta = (300.0 / t_abs[i]);
734  // H2O partial pressure [kPa]
735  Numeric pwv = Pa_to_kPa * p_abs[i] * vmr[i];
736  // dry air partial pressure [kPa]
737  Numeric pda = (Pa_to_kPa * p_abs[i]) - pwv;
738  // H2O continuum absorption [dB/km/GHz^2] like in the original MPM89
739  Numeric Nppc = CC * pwv_dummy * pow(theta, (Numeric)3.0) * 1.000e-5
740  * ( (0.113 * pda) + (3.57 * pwv * pow(theta, (Numeric)7.5)) );
741 
742  // Loop over input frequency
743  for ( Index s=0; s<n_f; ++s )
744  {
745  // input frequency in [GHz]
746  Numeric ff = f_mono[s] * Hz_to_GHz;
747  // H2O line contribution at position f
748  Numeric Nppl = 0.000;
749 
750  // Loop over MPM89 spectral lines:
751  for ( Index l = i_first; l <= i_last; ++l )
752  {
753  // line strength [kHz]
754  Numeric strength = CL * pwv_dummy * mpm89[l][1]
755  * pow(theta, (Numeric)3.5) * exp(mpm89[l][2]*(1.000-theta));
756  // line broadening parameter [GHz]
757  Numeric gam = CW * mpm89[l][3] * 0.001
758  * ( mpm89[l][5] * pwv * pow(theta, mpm89[l][6]) +
759  pda * pow(theta, mpm89[l][4]) );
760  // Doppler line width [GHz]
761  // Numeric gamd = 1.46e-6 * mpm89[l][0] / sqrt(theta);
762  // effective line width [GHz]
763  // gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
764  // H2O line absorption [dB/km/GHz] like in the original MPM89
765  Nppl += strength * MPMLineShapeFunction(gam, mpm89[l][0], ff);
766  }
767  // xsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
768  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * ( Nppl + (Nppc * ff) );
769  }
770  }
771  return;
772 }
773 //
774 // #################################################################################
775 //
818  const Numeric CCin, // continuum scale factor
819  const Numeric CLin, // line strength scale factor
820  const Numeric CWin, // line broadening scale factor
821  const String& model,
822  ConstVectorView f_mono,
823  ConstVectorView p_abs,
824  ConstVectorView t_abs,
825  ConstVectorView vmr )
826 {
827  //
828  /*
829 CTKS OTHER DATA USED IF NOT FROM THEORETICAL CALC. IN A. BAUER ET AL. 41(1989)49-54:
830 CTKS --------------------------------------------------------------------------------------------------------------
831 CTKS | T=300 K | T=300 K | T=300 K |
832 CTKS F ISO|GWVHZO NWVHZO| GWVNZ NWVNZ| GWVAIR NWVAIR| REFERENCE
833 CTKS GHZ 1 |MHZ/TORR 1 | MHZ/TORR 1 | MHZ/TORR 1 |
834 CTKS --------------------------------------------------------------------------------------------------------------
835 CTKS 22.2 1 18.00(18) - 4.10 -- 3.77 -- LIEBE ET AL., J.CHEM.PHYS., 50(1969)727
836 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
837 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
838 CTKS 203.4 2 -- -- 4.214 0.93 3.833 0.89 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
839 CTKS 225.9 4 -- -- 4.21 0.70 3.798 0.75 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
840 CTKS 241.6 4 -- -- 4.45 0.77 4.08 0.80 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
841 CTKS 241.9 4 -- -- 3.47 0.67 3.07 0.70 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
842 CTKS 325.1 1 -- -- 4.011 0.63 3.633 0.64 J.-M. COLMONT ET AL. J. MOLEC. SPEC. 193(1999)233-243
843 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
844 CTKS 380.2 1 - - 4.16(4) 0.70(3) 3.80 0.72 T. M. GOYETTE ET AL. JQSRT 41(1993)485
845 CTKS 439.2 1 12.95(25)0.62(9) -- -- -- -- V. N. MARKOV, J. MOLEC. SPEC, 164(1994)233
846 CTKS 752.0 1 4.16(18) -- 3.75 -- S. S. D. GASSTER ET AL. JOSA, 5(1988)593
847 CTKS 987.9 1 4.42(23) -- 4.01 -- S. S. D. GASSTER ET AL. JOSA, 5(1988)593
848 */
849  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
850  // 0 1 2 3 4 5 6
851  // f0 b1 b2 b3 b4 b5 b6
852  // [MHz] [kHz/kPa] [1] [MHz/hPa] [1] [1]
853  // air self air self
854  const Numeric mpm02[35][7] = {
855  { 22235.0800, 0.10947, 2.1678, 2.811, 4.80, 0.69, 0.61},
856  { 67803.9600, 0.00111, 8.7518, 2.858, 4.93, 0.69, 0.82},
857  { 119995.9400, 0.00072, 8.3688, 2.948, 4.78, 0.70, 0.79},
858  { 183310.1170, 2.30351, 0.6794, 3.050, 5.30, 0.76, 0.85},
859  { 321225.6400, 0.04646, 6.1792, 2.303, 4.69, 0.67, 0.54},
860  { 325152.9190, 1.53869, 1.5408, 2.783, 4.85, 0.68, 0.74},
861  { 336227.6200, 0.00099, 9.8233, 2.693, 4.74, 0.64, 0.61},
862  { 380197.3720, 11.9079, 1.0439, 2.873, 5.38, 0.72, 0.89},
863  { 390134.5080, 0.00437, 7.3408, 2.152, 4.81, 0.63, 0.55},
864  { 437346.6670, 0.06378, 5.0384, 1.845, 4.23, 0.60, 0.48},
865  { 439150.8120, 0.92144, 3.5853, 2.100, 4.29, 0.63, 0.62},
866  { 443018.2950, 0.19384, 5.0384, 1.860, 4.23, 0.60, 0.50},
867  { 448001.0750, 10.6190, 1.3952, 2.632, 4.84, 0.66, 0.67},
868  { 470888.9470, 0.33005, 3.5853, 2.152, 4.57, 0.66, 0.65},
869  { 474689.1270, 1.27660, 2.3674, 2.355, 4.65, 0.65, 0.64},
870  { 488491.1330, 0.25312, 2.8391, 2.602, 5.04, 0.69, 0.72},
871  { 503568.5320, 0.03746, 6.7158, 1.612, 3.98, 0.61, 0.43},
872  { 504482.6920, 0.01250, 6.7158, 1.612, 4.01, 0.61, 0.45},
873  { 547676.4400, 1.01467, 0.1427, 2.600, 4.50, 0.69, 1.00}, // *
874  { 552020.9600, 0.18668, 0.1452, 2.600, 4.50, 0.69, 1.00}, // *
875  { 556936.0020, 510.51086, 0.1405, 3.210, 4.11, 0.69, 1.00},
876  { 620700.8070, 5.10539, 2.3673, 2.438, 4.68, 0.71, 0.68},
877  { 645905.6200, 0.00667, 8.6065, 1.800, 4.00, 0.60, 0.43},
878  { 658006.5500, 0.27451, 7.7889, 3.210, 4.14, 0.69, 1.00},
879  { 752033.2270, 249.68466, 0.3625, 3.060, 4.09, 0.68, 0.84},
880  { 841051.1620, 0.01308, 8.1347, 1.590, 5.76, 0.33, 0.45},
881  { 859965.6490, 0.13326, 8.0114, 3.060, 4.09, 0.68, 0.84},
882  { 899302.1710, 0.05492, 7.8676, 2.985, 4.53, 0.68, 0.90},
883  { 902609.4360, 0.03854, 8.3823, 2.865, 5.10, 0.70, 0.95},
884  { 906206.1180, 0.18323, 5.0628, 2.408, 4.70, 0.70, 0.53},
885  { 916171.5820, 8.56444, 1.3943, 2.670, 4.78, 0.70, 0.78},
886  { 923113.1900, 0.00784, 10.2441, 2.900, 5.00, 0.66, 0.67},
887  { 970315.0220, 9.16280, 1.8673, 2.550, 4.94, 0.64, 0.67},
888  { 987926.7640, 138.28461, 0.2045, 2.985, 4.55, 0.68, 0.90},
889  //--------------------------------------------------------------------
890  { 1780.000000, 2230.00000, 0.952, 17.620, 30.50, 2.00, 5.00}}; // pseudo continuum line
891 
892  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
893  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
894  // "Propagation modeling of moist air and suspended water/ice
895  // particles at frequencies below 1000 GHz",
896  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
897  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
898  const Numeric CC_MPM02 = 1.00000;
899  const Numeric CL_MPM02 = 1.00000;
900  const Numeric CW_MPM02 = 1.00000;
901  // ---------------------------------------------------------------------------------------
902 
903 
904  // select the parameter set (!!model dominates values!!):
905  Numeric CC, CL, CW;
906  // number of lines of Liebe line catalog (0-33 lines, 34 cont. pseudo line)
907  Index i_first = 0;
908  Index i_last = 34;
909  if ( model == "MPM02" )
910  {
911  CC = CC_MPM02;
912  CL = CL_MPM02;
913  CW = CW_MPM02;
914  i_first = 0;
915  i_last = 34;
916  }
917  else if ( model == "MPM02Lines" )
918  {
919  CC = 0.000;
920  CL = CL_MPM02;
921  CW = CW_MPM02;
922  i_first = 0;
923  i_last = 33;
924  }
925  else if ( model == "MPM02Continuum" )
926  {
927  CC = CC_MPM02;
928  CL = 0.000;
929  CW = 0.000;
930  i_first = 34;
931  i_last = 34;
932  }
933  else if ( model == "user" )
934  {
935  CC = CCin;
936  CL = CLin;
937  CW = CWin;
938  i_first = 0;
939  i_last = 34;
940 
941  }
942  else
943  {
944  ostringstream os;
945  os << "H2O-MPM02: ERROR! Wrong model values given.\n"
946  << "Valid models are: 'MPM02', 'MPM02Lines', 'MPM02Continuum', and 'user'" << '\n';
947  throw runtime_error(os.str());
948  }
949  out3 << "H2O-MPM02: (model=" << model << ") parameter values in use:\n"
950  << " CC = " << CC << "\n"
951  << " CL = " << CL << "\n"
952  << " CW = " << CW << "\n";
953 
954 
955  const Index n_p = p_abs.nelem(); // Number of pressure levels
956  const Index n_f = f_mono.nelem(); // Number of frequencies
957 
958  // Check that dimensions of p_abs, t_abs, and vmr agree:
959  assert ( n_p==t_abs.nelem() );
960  assert ( n_p==vmr.nelem() );
961 
962  // Check that dimensions of xsec are consistent with n_f
963  // and n_p. It should be [n_f,n_p]:
964  assert ( n_f==xsec.nrows() );
965  assert ( n_p==xsec.ncols() );
966 
967  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
968  for ( Index i=0; i<n_p; ++i )
969  {
970  // here the total pressure is not multiplied by the H2O vmr for the
971  // P_H2O calculation because we calculate xsec and not abs: abs = vmr * xsec
972  Numeric pwv_dummy = Pa_to_hPa * p_abs[i];
973  // relative inverse temperature [1]
974  Numeric theta = (300.0 / t_abs[i]);
975  // H2O partial pressure [hPa]
976  Numeric pwv = Pa_to_hPa * p_abs[i] * vmr[i];
977  // dry air partial pressure [hPa]
978  Numeric pda = (Pa_to_hPa * p_abs[i]) - pwv;
979  // Loop over MPM02 spectral lines:
980 
981  // Loop over input frequency
982  for ( Index s=0; s<n_f; ++s )
983  {
984  // input frequency in [GHz]
985  Numeric ff = f_mono[s] * Hz_to_GHz;
986 
987  for ( Index l = i_first; l <= i_last; ++l )
988  {
989  // line strength [ppm]. The missing vmr of H2O will be multiplied
990  // at the stage of absorption calculation: abs / vmr * xsec.
991  Numeric strength = 0.00;
992  Numeric gam = 0.00;
993  if ( (l >= 0) && (l <= 33) ) // ---- just the lines ------------------
994  {
995  strength = CL * pwv_dummy * mpm02[l][1] *
996  pow(theta, (Numeric)3.5) * exp(mpm02[l][2]*(1.0-theta));
997  // line broadening parameter [GHz]
998  gam = CW * mpm02[l][3] * 0.001 *
999  ( (mpm02[l][4] * pwv * pow(theta, mpm02[l][6])) +
1000  ( pda * pow(theta, mpm02[l][5])) );
1001  }
1002  else if ( l == 34 ) // ----- just the continuum pseudo-line ----------
1003  {
1004  strength = CC * pwv_dummy * mpm02[l][1] *
1005  pow(theta, (Numeric)3.5) * exp(mpm02[l][2]*(1.0-theta));
1006  // line broadening parameter [GHz]
1007  gam = mpm02[l][3] * 0.001 *
1008  ( (mpm02[l][4] * pwv * pow(theta, mpm02[l][6])) +
1009  ( pda * pow(theta, mpm02[l][5])) );
1010  }
1011  else // ----- if something strange happens ---------------------------
1012  {
1013  ostringstream os;
1014  os << "H2O-MPM02: wrong line number detected l=" << l << " (0-34)\n";
1015  throw runtime_error(os.str());
1016  return;
1017  } // ---------------------------------------------------------------
1018  // Doppler line width [GHz]
1019  // Numeric gamd = 1.46e-6 * mpm02[l][0] / sqrt(theta);
1020  // effective line width [GHz]
1021  //gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
1022  // absorption [dB/km] like in the original MPM02
1023  Numeric Npp = strength * MPMLineShapeFunction(gam, mpm02[l][0], ff);
1024  // xsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
1025  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * Npp;
1026  }
1027  }
1028  }
1029  return;
1030 }
1031 //
1032 //
1033 // #################################################################################
1034 //
1076  const Numeric CCin, // continuum scale factor
1077  const Numeric CLin, // line strength scale factor
1078  const Numeric CWin, // line broadening scale factor
1079  const String& model,
1080  ConstVectorView f_mono,
1081  ConstVectorView p_abs,
1082  ConstVectorView t_abs,
1083  ConstVectorView vmr )
1084 {
1085  //
1086  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
1087  // 0 1 2 3 4 5 6
1088  // f0 b1 b2 b3 b4 b5 b6
1089  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1] [1]
1090  const Numeric mpm93[35][7] = {
1091  { 22.235080, 0.01130, 2.143, 2.811, 4.80, 0.69, 1.00},
1092  { 67.803960, 0.00012, 8.735, 2.858, 4.93, 0.69, 0.82},
1093  { 119.995940, 0.00008, 8.356, 2.948, 4.78, 0.70, 0.79},
1094  { 183.310091, 0.24200, 0.668, 3.050, 5.30, 0.64, 0.85},
1095  { 321.225644, 0.00483, 6.181, 2.303, 4.69, 0.67, 0.54},
1096  { 325.152919, 0.14990, 1.540, 2.783, 4.85, 0.68, 0.74},
1097  { 336.222601, 0.00011, 9.829, 2.693, 4.74, 0.69, 0.61},
1098  { 380.197372, 1.15200, 1.048, 2.873, 5.38, 0.54, 0.89},
1099  { 390.134508, 0.00046, 7.350, 2.152, 4.81, 0.63, 0.55},
1100  { 437.346667, 0.00650, 5.050, 1.845, 4.23, 0.60, 0.48},
1101  { 439.150812, 0.09218, 3.596, 2.100, 4.29, 0.63, 0.52},
1102  { 443.018295, 0.01976, 5.050, 1.860, 4.23, 0.60, 0.50},
1103  { 448.001075, 1.03200, 1.405, 2.632, 4.84, 0.66, 0.67},
1104  { 470.888947, 0.03297, 3.599, 2.152, 4.57, 0.66, 0.65},
1105  { 474.689127, 0.12620, 2.381, 2.355, 4.65, 0.65, 0.64},
1106  { 488.491133, 0.02520, 2.853, 2.602, 5.04, 0.69, 0.72},
1107  { 503.568532, 0.00390, 6.733, 1.612, 3.98, 0.61, 0.43},
1108  { 504.482692, 0.00130, 6.733, 1.612, 4.01, 0.61, 0.45},
1109 // { 547.676440, 0.97010, 0.114, 2.600, 4.50, 0.70, 1.00},
1110 // { 552.020960, 1.47700, 0.114, 2.600, 4.50, 0.70, 1.00},
1111  { 547.676440, 0.97010*0.00199983, 0.114, 2.600, 4.50, 0.70, 1.00}, // isotopic ratio multiplied
1112  { 552.020960, 1.47700*0.00037200, 0.114, 2.600, 4.50, 0.70, 1.00}, // isotopic ratio multiplied
1113  { 556.936002, 48.74000, 0.159, 3.210, 4.11, 0.69, 1.00},
1114  { 620.700807, 0.50120, 2.200, 2.438, 4.68, 0.71, 0.68},
1115  { 645.866155, 0.00713, 8.580, 1.800, 4.00, 0.60, 0.50}, // ?? JPL tag 18003 (H2O) f_o = 645.7660100GHz
1116  { 658.005280, 0.03022, 7.820, 3.210, 4.14, 0.69, 1.00},
1117  { 752.033227, 23.96000, 0.396, 3.060, 4.09, 0.68, 0.84},
1118  { 841.053973, 0.00140, 8.180, 1.590, 5.76, 0.33, 0.45},
1119  { 859.962313, 0.01472, 7.989, 3.060, 4.09, 0.68, 0.84},
1120  { 899.306675, 0.00605, 7.917, 2.985, 4.53, 0.68, 0.90},
1121  { 902.616173, 0.00426, 8.432, 2.865, 5.10, 0.70, 0.95},
1122  { 906.207325, 0.01876, 5.111, 2.408, 4.70, 0.70, 0.53},
1123  { 916.171582, 0.83400, 1.442, 2.670, 4.78, 0.70, 0.78},
1124  { 923.118427, 0.00869, 10.220, 2.900, 5.00, 0.70, 0.80},
1125  { 970.315022, 0.89720, 1.920, 2.550, 4.94, 0.64, 0.67},
1126  { 987.926764, 13.21000, 0.258, 2.985, 4.55, 0.68, 0.90},
1127  //--------------------------------------------------------------------
1128  { 1780.000000, 2230.00000, 0.952, 17.620, 30.50, 2.00, 5.00}}; // pseudo continuum line
1129 
1130  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1131  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
1132  // "Propagation modeling of moist air and suspended water/ice
1133  // particles at frequencies below 1000 GHz",
1134  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
1135  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
1136  const Numeric CC_MPM93 = 1.00000;
1137  const Numeric CL_MPM93 = 1.00000;
1138  const Numeric CW_MPM93 = 1.00000;
1139  // ---------------------------------------------------------------------------------------
1140 
1141 
1142  // select the parameter set (!!model dominates values!!):
1143  Numeric CC, CL, CW;
1144  // number of lines of Liebe line catalog (0-33 lines, 34 cont. pseudo line)
1145  Index i_first = 0;
1146  Index i_last = 34;
1147  if ( model == "MPM93" )
1148  {
1149  CC = CC_MPM93;
1150  CL = CL_MPM93;
1151  CW = CW_MPM93;
1152  i_first = 0;
1153  i_last = 34;
1154  }
1155  else if ( model == "MPM93Lines" )
1156  {
1157  CC = 0.000;
1158  CL = CL_MPM93;
1159  CW = CW_MPM93;
1160  i_first = 0;
1161  i_last = 33;
1162  }
1163  else if ( model == "MPM93Continuum" )
1164  {
1165  CC = CC_MPM93;
1166  CL = 0.000;
1167  CW = 0.000;
1168  i_first = 34;
1169  i_last = 34;
1170  }
1171  else if ( model == "user" )
1172  {
1173  CC = CCin;
1174  CL = CLin;
1175  CW = CWin;
1176  i_first = 0;
1177  i_last = 34;
1178 
1179  }
1180  else
1181  {
1182  ostringstream os;
1183  os << "H2O-MPM93: ERROR! Wrong model values given.\n"
1184  << "Valid models are: 'MPM93', 'MPM93Lines', 'MPM93Continuum', and 'user'" << '\n';
1185  throw runtime_error(os.str());
1186  }
1187  out3 << "H2O-MPM93: (model=" << model << ") parameter values in use:\n"
1188  << " CC = " << CC << "\n"
1189  << " CL = " << CL << "\n"
1190  << " CW = " << CW << "\n";
1191 
1192 
1193  const Index n_p = p_abs.nelem(); // Number of pressure levels
1194  const Index n_f = f_mono.nelem(); // Number of frequencies
1195 
1196  // Check that dimensions of p_abs, t_abs, and vmr agree:
1197  assert ( n_p==t_abs.nelem() );
1198  assert ( n_p==vmr.nelem() );
1199 
1200  // Check that dimensions of xsec are consistent with n_f
1201  // and n_p. It should be [n_f,n_p]:
1202  assert ( n_f==xsec.nrows() );
1203  assert ( n_p==xsec.ncols() );
1204 
1205  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
1206  for ( Index i=0; i<n_p; ++i )
1207  {
1208  // here the total pressure is not multiplied by the H2O vmr for the
1209  // P_H2O calculation because we calculate xsec and not abs: abs = vmr * xsec
1210  Numeric pwv_dummy = Pa_to_hPa * p_abs[i];
1211  // relative inverse temperature [1]
1212  Numeric theta = (300.0 / t_abs[i]);
1213  // H2O partial pressure [hPa]
1214  Numeric pwv = Pa_to_hPa * p_abs[i] * vmr[i];
1215  // dry air partial pressure [hPa]
1216  Numeric pda = (Pa_to_hPa * p_abs[i]) - pwv;
1217  // Loop over MPM93 spectral lines:
1218 
1219  // Loop over input frequency
1220  for ( Index s=0; s<n_f; ++s )
1221  {
1222  // input frequency in [GHz]
1223  Numeric ff = f_mono[s] * Hz_to_GHz;
1224 
1225  for ( Index l = i_first; l <= i_last; ++l )
1226  {
1227  // line strength [ppm]. The missing vmr of H2O will be multiplied
1228  // at the stage of absorption calculation: abs / vmr * xsec.
1229  Numeric strength = 0.00;
1230  Numeric gam = 0.00;
1231  if ( (l >= 0) && (l <= 33) ) // ---- just the lines ------------------
1232  {
1233  strength = CL * pwv_dummy * mpm93[l][1]
1234  * pow(theta, (Numeric)3.5) * exp(mpm93[l][2]*(1.0-theta));
1235  // line broadening parameter [GHz]
1236  gam = CW * mpm93[l][3] * 0.001 *
1237  ( (mpm93[l][4] * pwv * pow(theta, mpm93[l][6])) +
1238  ( pda * pow(theta, mpm93[l][5])) );
1239  }
1240  else if ( l == 34 ) // ----- just the continuum pseudo-line ----------
1241  {
1242  strength = CC * pwv_dummy * mpm93[l][1]
1243  * pow(theta, (Numeric)3.5) * exp(mpm93[l][2]*(1.0-theta));
1244  // line broadening parameter [GHz]
1245  gam = mpm93[l][3] * 0.001 *
1246  ( (mpm93[l][4] * pwv * pow(theta, mpm93[l][6])) +
1247  ( pda * pow(theta, mpm93[l][5])) );
1248  }
1249  else // ----- if something strange happens ---------------------------
1250  {
1251  ostringstream os;
1252  os << "H2O-MPM93: wrong line number detected l=" << l << " (0-34)\n";
1253  throw runtime_error(os.str());
1254  return;
1255  } // ---------------------------------------------------------------
1256  // Doppler line width [GHz]
1257  // Numeric gamd = 1.46e-6 * mpm93[l][0] / sqrt(theta);
1258  // effective line width [GHz]
1259  //gam = 0.535 * gam + sqrt(0.217*gam*gam + gamd*gamd);
1260  // absorption [dB/km] like in the original MPM93
1261  Numeric Npp = strength * MPMLineShapeFunction(gam, mpm93[l][0], ff);
1262  // xsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
1263  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * Npp;
1264  }
1265  }
1266  }
1267  return;
1268 }
1269 //
1270 // #################################################################################
1271 //
1300  const Numeric CCin, // continuum scale factor
1301  const Numeric CLin, // line strength scale factor
1302  const Numeric CWin, // line broadening scale factor
1303  const String& model,
1304  ConstVectorView f_mono,
1305  ConstVectorView p_abs,
1306  ConstVectorView t_abs,
1307  ConstVectorView vmr )
1308 {
1309  // REFERENCES:
1310  // LINE INTENSITIES FROM HITRAN92 (SELECTION THRESHOLD=
1311  // HALF OF CONTINUUM ABSORPTION AT 1000 MB).
1312  // WIDTHS MEASURED AT 22,183,380 GHZ, OTHERS CALCULATED:
1313  // H.J.LIEBE AND T.A.DILLON, J.CHEM.PHYS. V.50, PP.727-732 (1969) &
1314  // H.J.LIEBE ET AL., JQSRT V.9, PP. 31-47 (1969) (22GHz);
1315  // A.BAUER ET AL., JQSRT V.37, PP.531-539 (1987) &
1316  // ASA WORKSHOP (SEPT. 1989) (380GHz);
1317  // AND A.BAUER ET AL., JQSRT V.41, PP.49-54 (1989) (OTHER LINES).
1318  // AIR-BROADENED CONTINUUM BASED ON LIEBE & LAYTON, NTIA
1319  // REPORT 87-224 (1987); SELF-BROADENED CONTINUUM BASED ON
1320  // LIEBE ET AL, AGARD CONF. PROC. 542 (MAY 1993),
1321  // BUT READJUSTED FOR LINE SHAPE OF
1322  // CLOUGH et al, ATMOS. RESEARCH V.23, PP.229-241 (1989).
1323  //
1324  // Coefficients are from P. W. Rosenkranz., Radio Science, 33(4), 919, 1998
1325  // line frequencies [GHz]
1326  const Numeric PWRfl[15] = { 22.2350800, 183.3101170, 321.2256400, 325.1529190, 380.1973720,
1327  439.1508120, 443.0182950, 448.0010750, 470.8889470, 474.6891270,
1328  488.4911330, 556.9360020, 620.7008070, 752.0332270, 916.1715820 };
1329  // line intensities at 300K [Hz * cm2] (see Janssen Appendix to Chap.2 for this)
1330  const Numeric PWRs1[15] = { 1.31e-14, 2.273e-12, 8.036e-14, 2.694e-12, 2.438e-11,
1331  2.179e-12, 4.624e-13, 2.562e-11, 8.369e-13, 3.263e-12,
1332  6.659e-13, 1.531e-9, 1.707e-11, 1.011e-9, 4.227e-11 };
1333  // T coeff. of intensities [1]
1334  const Numeric PWRb2[15] = { 2.144, 0.668, 6.179, 1.541, 1.048,
1335  3.595, 5.048, 1.405, 3.597, 2.379,
1336  2.852, 0.159, 2.391, 0.396, 1.441 };
1337  // air-broadened width parameters at 300K [GHz/hPa]
1338  const Numeric PWRw3[15] = { 0.00281, 0.00281, 0.00230, 0.00278, 0.00287,
1339  0.00210, 0.00186, 0.00263, 0.00215, 0.00236,
1340  0.00260, 0.00321, 0.00244, 0.00306, 0.00267 };
1341  // T-exponent of air-broadening [1]
1342  const Numeric PWRx[15] = { 0.69, 0.64, 0.67, 0.68, 0.54,
1343  0.63, 0.60, 0.66, 0.66, 0.65,
1344  0.69, 0.69, 0.71, 0.68, 0.70 };
1345  // self-broadened width parameters at 300K [GHz/hPa]
1346  const Numeric PWRws[15] = { 0.01349, 0.01491, 0.01080, 0.01350, 0.01541,
1347  0.00900, 0.00788, 0.01275, 0.00983, 0.01095,
1348  0.01313, 0.01320, 0.01140, 0.01253, 0.01275 };
1349 
1350  // T-exponent of self-broadening [1]
1351  const Numeric PWRxs[15] = { 0.61, 0.85, 0.54, 0.74, 0.89,
1352  0.52, 0.50, 0.67, 0.65, 0.64,
1353  0.72, 1.00, 0.68, 0.84, 0.78 };
1354 
1355  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1356  // standard values for the MPM87 model (P. W. Rosenkranz., Radio Science, 33(4), 919, 1998):
1357  const Numeric CC_PWR98 = 1.00000;
1358  const Numeric CL_PWR98 = 1.00000;
1359  const Numeric CW_PWR98 = 1.00000;
1360  // ---------------------------------------------------------------------------------------
1361 
1362 
1363  // select the parameter set (!!model dominates values!!):
1364  Numeric CC, CL, CW;
1365  if ( model == "Rosenkranz" )
1366  {
1367  CC = CC_PWR98;
1368  CL = CL_PWR98;
1369  CW = CW_PWR98;
1370  }
1371  else if ( model == "RosenkranzLines" )
1372  {
1373  CC = 0.000;
1374  CL = CL_PWR98;
1375  CW = CW_PWR98;
1376  }
1377  else if ( model == "RosenkranzContinuum" )
1378  {
1379  CC = CC_PWR98;
1380  CL = 0.000;
1381  CW = 0.000;
1382  }
1383  else if ( model == "user" )
1384  {
1385  CC = CCin;
1386  CL = CLin;
1387  CW = CWin;
1388  }
1389  else
1390  {
1391  ostringstream os;
1392  os << "H2O-PWR98: ERROR! Wrong model values given.\n"
1393  << "Valid models are: 'Rosenkranz', 'RosenkranzLines', 'RosenkranzContinuum', and 'user'" << '\n';
1394  throw runtime_error(os.str());
1395  }
1396  out3 << "H2O-PWR98: (model=" << model << ") parameter values in use:\n"
1397  << " CC = " << CC << "\n"
1398  << " CL = " << CL << "\n"
1399  << " CW = " << CW << "\n";
1400 
1401 
1402  const Index n_p = p_abs.nelem(); // Number of pressure levels
1403  const Index n_f = f_mono.nelem(); // Number of frequencies
1404 
1405  // Check that dimensions of p_abs, t_abs, and vmr agree:
1406  assert ( n_p==t_abs.nelem() );
1407  assert ( n_p==vmr.nelem() );
1408 
1409  // Check that dimensions of xsec are consistent with n_f
1410  // and n_p. It should be [n_f,n_p]:
1411  assert ( n_f==xsec.nrows() );
1412  assert ( n_p==xsec.ncols() );
1413 
1414  // Loop pressure/temperature:
1415  for ( Index i=0; i<n_p; ++i )
1416  {
1417  // here the total pressure is not multiplied by the H2O vmr for the
1418  // P_H2O calculation because we calculate xsec and not abs: abs = vmr * xsec
1419  Numeric pvap_dummy = Pa_to_hPa * p_abs[i];
1420  // water vapor partial pressure [hPa]
1421  Numeric pvap = Pa_to_hPa * p_abs[i] * vmr[i];
1422  // dry air partial pressure [hPa]
1423  Numeric pda = (Pa_to_hPa * p_abs[i]) - pvap;
1424  // Rosenkranz number density (Rosenkranz H2O mass density in [g/m³])
1425  // [g/m³] = [g*K / Pa*m³] * [Pa/K]
1426  // rho = (M_H2O / R) * (P_H2O / T)
1427  // rho = 2.1667 * p_abs * vmr / t_abs
1428  // den = 3.335e16 * rho
1429  // FIXME Numeric den = 3.335e16 * (2.1667 * p_abs[i] * vmr[i] / t_abs[i]);
1430  Numeric den_dummy = 3.335e16 * (2.1667 * p_abs[i] / t_abs[i]);
1431  // inverse relative temperature [1]
1432  Numeric ti = (300.0 / t_abs[i]);
1433  Numeric ti2 = pow(ti, (Numeric)2.5);
1434 
1435  // continuum term [Np/km/GHz2]
1436  Numeric con = CC * pvap_dummy * pow(ti, (Numeric)3.0) * 1.000e-9
1437  * ( (0.543 * pda) + (17.96 * pvap * pow(ti, (Numeric)4.5)) );
1438 
1439  // Loop over input frequency
1440  for ( Index s=0; s<n_f; ++s )
1441  {
1442  // input frequency in [GHz]
1443  Numeric ff = f_mono[s] * Hz_to_GHz;
1444  // line contribution at position f
1445  Numeric sum = 0.000;
1446 
1447  // Loop over spectral lines
1448  for (Index l = 0; l < 15; l++)
1449  {
1450  Numeric width = ( CW * PWRw3[l] * pda * pow(ti, PWRx[l]) ) +
1451  ( PWRws[l] * pvap * pow(ti, PWRxs[l]));
1452  // Numeric width = CW * ( PWRw3[l] * pda * pow(ti, PWRx[l]) +
1453  // PWRws[l] * pvap * pow(ti, PWRxs[l]) );
1454  Numeric wsq = width * width;
1455  Numeric strength = CL * PWRs1[l] * ti2 * exp(PWRb2[l]*(1.0 - ti));
1456  // frequency differences
1457  Numeric df0 = ff - PWRfl[l];
1458  Numeric df1 = ff + PWRfl[l];
1459  // use Clough's definition of local line contribution
1460  Numeric base = width / (wsq + 562500.000);
1461  // positive and negative resonances
1462  Numeric res = 0.000;
1463  if (fabs(df0) < 750.0) res += width / (df0*df0 + wsq) - base;
1464  if (fabs(df1) < 750.0) res += width / (df1*df1 + wsq) - base;
1465  sum += strength * res * pow( (ff/PWRfl[l]),
1466  (Numeric)2.0 );
1467  }
1468  // line term [Np/km]
1469  Numeric absl = 0.3183e-4 * den_dummy * sum;
1470  // xsec = abs/vmr [1/m] (Rosenkranz model in [Np/km])
1471  // 4.1907e-5 = 0.230259 * 0.1820 * 1.0e-3 (1/(10*log(e)) = 0.230259)
1472  xsec(s,i) += 1.000e-3 * ( absl + (con * ff * ff) );
1473  }
1474  }
1475  return;
1476 }
1477 //
1478 // #################################################################################
1479 //
1507  const Numeric CCin, // continuum scale factor
1508  const Numeric CLin, // line strength scale factor
1509  const Numeric CWin, // line broadening scale factor
1510  const String& model,
1511  ConstVectorView f_mono,
1512  ConstVectorView p_abs,
1513  ConstVectorView t_abs,
1514  ConstVectorView vmr )
1515 {
1516 
1517  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1518  // standard values for the CP98 model (S. L. Cruz-Pol et al., Radio Science, 33(5), 1319, 1998):
1519  const Numeric CC_CP98 = 1.2369; // +/- 0.155 !LARGE!
1520  const Numeric CL_CP98 = 1.0639; // +/- 0.016
1521  const Numeric CW_CP98 = 1.0658; // +/- 0.0096
1522  // ---------------------------------------------------------------------------------------
1523 
1524  // select the parameter set (!!model dominates values!!):
1525  Numeric CC, CL, CW;
1526  if ( model == "CruzPol" )
1527  {
1528  CC = CC_CP98;
1529  CL = CL_CP98;
1530  CW = CW_CP98;
1531  }
1532  else if ( model == "CruzPolLine" )
1533  {
1534  CC = 0.000;
1535  CL = CL_CP98;
1536  CW = CW_CP98;
1537  }
1538  else if ( model == "CruzPolContinuum" )
1539  {
1540  CC = CC_CP98;
1541  CL = 0.000;
1542  CW = 0.000;
1543  }
1544  else if ( model == "user" )
1545  {
1546  CC = CCin;
1547  CL = CLin;
1548  CW = CWin;
1549  }
1550  else
1551  {
1552  ostringstream os;
1553  os << "H2O-CP98: ERROR! Wrong model values given.\n"
1554  << "Valid models are: 'CruzPol', 'CruzPolLine', 'CruzPolContinuum', and 'user'" << "\n";
1555  throw runtime_error(os.str());
1556  }
1557  out3 << "H2O-CP98: (model=" << model << ") parameter values in use:\n"
1558  << " CC = " << CC << "\n"
1559  << " CL = " << CL << "\n"
1560  << " CW = " << CW << "\n";
1561 
1562  const Index n_p = p_abs.nelem(); // Number of pressure levels
1563  const Index n_f = f_mono.nelem(); // Number of frequencies
1564 
1565  // Check that dimensions of p_abs, t_abs, and vmr agree:
1566  assert ( n_p==t_abs.nelem() );
1567  assert ( n_p==vmr.nelem() );
1568 
1569  // Check that dimensions of xsec are consistent with n_f
1570  // and n_p. It should be [n_f,n_p]:
1571  assert ( n_f==xsec.nrows() );
1572  assert ( n_p==xsec.ncols() );
1573 
1574  // Loop pressure/temperature (pressure in [hPa] therefore the factor 0.01)
1575  for ( Index i=0; i<n_p; ++i )
1576  {
1577  // calculate xsec only if VMR(H2O) > VMRCalcLimit
1578  if (vmr[i] > VMRCalcLimit)
1579  {
1580  // relative inverse temperature [1]
1581  Numeric theta = (300.0 / t_abs[i]);
1582  // H2O partial pressure [hPa]
1583  Numeric pwv = Pa_to_hPa * p_abs[i] * vmr[i];
1584  // dry air partial pressure [hPa]
1585  Numeric pda = (Pa_to_hPa * p_abs[i]) - pwv;
1586  // line strength
1587  Numeric TL = CL * 0.0109 * pwv * pow(theta,(Numeric)3.5)
1588  * exp(2.143*(1.0-theta));
1589  // line broadening parameter [GHz]
1590  Numeric gam = CW * 0.002784 *
1591  ( (pda * pow(theta,(Numeric)0.6))
1592  + (4.80 * pwv * pow(theta,(Numeric)1.1)) );
1593  // continuum term
1594  Numeric TC = CC * pwv * pow(theta, (Numeric)3.0) * 1.000e-7
1595  * ( (0.113 * pda) + (3.57 * pwv * pow(theta,(Numeric)7.5)) );
1596 
1597  // Loop over input frequency
1598  for ( Index s=0; s<n_f; ++s )
1599  {
1600  // input frequency in [GHz]
1601  Numeric ff = f_mono[s] * Hz_to_GHz;
1602  Numeric TSf = MPMLineShapeFunction(gam, 22.235080, ff);
1603  // xsec = abs/vmr [1/m] (Cruz-Pol model in [Np/km])
1604  xsec(s,i) += 4.1907e-5 * ff * ( (TL * TSf) + (ff * TC) ) / vmr[i];
1605  }
1606  }
1607  }
1608  return;
1609 }
1610 //
1611 // #################################################################################
1612 //
1637  const Numeric Cin,
1638  const Numeric xin,
1639  const String& model,
1640  ConstVectorView f_mono,
1641  ConstVectorView p_abs,
1642  ConstVectorView t_abs,
1643  ConstVectorView vmr )
1644 {
1645 
1646  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1647  // standard values for the Rosenkranz model (Radio Science, 33(4), 919, 1998):
1648  const Numeric Cs_PWR = 1.796e-33; // [1/m / (Hz²*Pa²)]
1649  const Numeric xs_PWR = 4.5; // [1]
1650  // standard values for the Cruz-Pol model (Radio Science, 33(5), 1319, 1998):
1651  const Numeric Cs_CP = 1.851e-33; // [1/m / (Hz²*Pa²)]
1652  const Numeric xs_CP = 7.5; // [1]
1653  // standard values for the MPM89 model (Int. J. Inf. and Millim. Waves, 10(6), 1989, 631):
1654  const Numeric Cs_MPM89 = 1.500e-33; // [1/m / (Hz²*Pa²)]
1655  const Numeric xs_MPM89 = 7.5; // [1]
1656  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
1657  const Numeric Cs_MPM87 = 1.500e-33; // [1/m / (Hz²*Pa²)]
1658  const Numeric xs_MPM87 = 7.5; // [1]
1659  // ---------------------------------------------------------------------------------------
1660 
1661  // select the parameter set (!!model goes for values!!):
1662  Numeric C, x;
1663  if ( model == "Rosenkranz" )
1664  {
1665  C = Cs_PWR;
1666  x = xs_PWR;
1667  }
1668  else if ( model == "CruzPol" )
1669  {
1670  C = Cs_CP;
1671  x = xs_CP;
1672  }
1673  else if ( model == "MPM89" )
1674  {
1675  C = Cs_MPM89;
1676  x = xs_MPM89;
1677  }
1678  else if ( model == "MPM87" )
1679  {
1680  C = Cs_MPM87;
1681  x = xs_MPM87;
1682  }
1683  else if ( model == "user" )
1684  {
1685  C = Cin;
1686  x = xin;
1687  }
1688  else
1689  {
1690  ostringstream os;
1691  os << "H2O-SelfContStandardType: ERROR! Wrong model values given.\n"
1692  << "allowed models are: 'Rosenkranz', 'CruzPol', 'MPM89', 'MPM87', 'user'" << '\n';
1693  throw runtime_error(os.str());
1694  }
1695  out3 << "H2O-SelfContStandardType: (model=" << model << ") parameter values in use:\n"
1696  << " C_s = " << C << "\n"
1697  << " x_s = " << x << "\n";
1698 
1699 
1700 
1701  const Index n_p = p_abs.nelem(); // Number of pressure levels
1702  const Index n_f = f_mono.nelem(); // Number of frequencies
1703 
1704  // Check that dimensions of p_abs, t_abs, and vmr agree:
1705  assert ( n_p==t_abs.nelem() );
1706  assert ( n_p==vmr.nelem() );
1707 
1708  // Check that dimensions of xsec are consistent with n_f
1709  // and n_p. It should be [n_f,n_p]:
1710  assert ( n_f==xsec.nrows() );
1711  assert ( n_p==xsec.ncols() );
1712 
1713  // Loop over pressure/temperature grid:
1714  for ( Index i=0; i<n_p; ++i )
1715  {
1716  // Dummy scalar holds everything except the quadratic frequency dependence.
1717  // The second vmr of H2O will be multiplied at the stage of absorption
1718  // calculation: abs = vmr * xsec.
1719  Numeric dummy =
1720  C * pow( (Numeric)300./t_abs[i], x+(Numeric)3. )
1721  * pow( p_abs[i], (Numeric)2. ) * vmr[i];
1722 
1723  // Loop over frequency grid:
1724  for ( Index s=0; s<n_f; ++s )
1725  {
1726  xsec(s,i) += dummy * pow( f_mono[s], (Numeric)2. );
1727  // cout << "xsec(" << s << "," << i << "): " << xsec(s,i) << "\n";
1728  }
1729  }
1730 }
1731 //
1732 // #################################################################################
1733 //
1759  const Numeric Cin,
1760  const Numeric xin,
1761  const String& model,
1762  ConstVectorView f_mono,
1763  ConstVectorView p_abs,
1764  ConstVectorView t_abs,
1765  ConstVectorView vmr )
1766 {
1767 
1768  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1769  // standard values for the Rosenkranz model (Radio Science, 33(4), 919, 1998):
1770  const Numeric Cf_PWR = 5.43e-35 ; // [1/m / (Hz²*Pa²)]
1771  const Numeric xf_PWR = 0.0; // [1]
1772  // standard values for the Cruz-Pol model (Radio Science, 33(5), 1319, 1998):
1773  const Numeric Cf_CP = 5.85e-35; // [1/m / (Hz²*Pa²)]
1774  const Numeric xf_CP = 0.0; // [1]
1775  // standard values for the MPM89 model (Int. J. Inf. and Millim. Waves, 10(6), 1989, 631):
1776  const Numeric Cf_MPM89 = 4.74e-35; // [1/m / (Hz²*Pa²)]
1777  const Numeric xf_MPM89 = 0.0; // [1]
1778  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
1779  const Numeric Cf_MPM87 = 4.74e-35; // [1/m / (Hz²*Pa²)]
1780  const Numeric xf_MPM87 = 0.0; // [1]
1781  // ---------------------------------------------------------------------------------------
1782 
1783 
1784  // select the parameter set (!!model goes for values!!):
1785  Numeric C, x;
1786  if ( model == "Rosenkranz" )
1787  {
1788  C = Cf_PWR;
1789  x = xf_PWR;
1790  }
1791  else if ( model == "CruzPol" )
1792  {
1793  C = Cf_CP;
1794  x = xf_CP;
1795  }
1796  else if ( model == "MPM89" )
1797  {
1798  C = Cf_MPM89;
1799  x = xf_MPM89;
1800  }
1801  else if ( model == "MPM87" )
1802  {
1803  C = Cf_MPM87;
1804  x = xf_MPM87;
1805  }
1806  else if ( model == "user" )
1807  {
1808  C = Cin;
1809  x = xin;
1810  }
1811  else
1812  {
1813  ostringstream os;
1814  os << "H2O-ForeignContStandardType: ERROR! Wrong model values given.\n"
1815  << "allowed models are: 'Rosenkranz', 'CruzPol', 'MPM89', 'MPM87', 'user'" << '\n';
1816  throw runtime_error(os.str());
1817  }
1818  out3 << "H2O-ForeignContStandardType: (model=" << model << ") parameter values in use:\n"
1819  << " C_s = " << C << "\n"
1820  << " x_s = " << x << "\n";
1821 
1822  const Index n_p = p_abs.nelem(); // Number of pressure levels
1823  const Index n_f = f_mono.nelem(); // Number of frequencies
1824 
1825  // Check that dimensions of p_abs, t_abs, and vmr agree:
1826  assert ( n_p==t_abs.nelem() );
1827  assert ( n_p==vmr.nelem() );
1828 
1829  // Check that dimensions of xsec are consistent with n_f
1830  // and n_p. It should be [n_f,n_p]:
1831  assert ( n_f==xsec.nrows() );
1832  assert ( n_p==xsec.ncols() );
1833 
1834  // Loop pressure/temperature:
1835  for ( Index i=0; i<n_p; ++i )
1836  {
1837  // Dry air partial pressure: p_dry := p_tot - p_h2o.
1838  Numeric pdry = p_abs[i] * (1.000e0-vmr[i]);
1839  // Dummy scalar holds everything except the quadratic frequency dependence.
1840  // The vmr of H2O will be multiplied at the stage of absorption
1841  // calculation: abs = vmr * xsec.
1842  Numeric dummy = C * pow( (Numeric)300./t_abs[i], x+(Numeric)3. )
1843  * p_abs[i] * pdry;
1844 
1845  // Loop frequency:
1846  for ( Index s=0; s<n_f; ++s )
1847  {
1848  xsec(s,i) += dummy * pow( f_mono[s], (Numeric)2. );
1849  // cout << "xsec(" << s << "," << i << "): " << xsec(s,i) << "\n";
1850  }
1851  }
1852 }
1853 //
1854 //
1855 // #################################################################################
1856 //
1881  const Numeric Cin,
1882  const Numeric xin,
1883  const String& model,
1884  ConstVectorView f_mono,
1885  ConstVectorView p_abs,
1886  ConstVectorView t_abs,
1887  ConstVectorView vmr )
1888 {
1889 
1890  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
1891  // standard values for Q. Ma and R. H. Tipping, J. Chem. Phys., 117(23), 10581, 2002:
1892  // the Cf value is originally given in dB/km/kPa^2/GHz^2.0389. the conversion factor is
1893  // then 1.0283E-28 to get arts units. Additionally the Cf value is divided by 1.08 to
1894  // get the Cf for air.
1895  const Numeric Cf_MaTipping = 1.8590e-35; // [1/m / (Hz²*Pa²)]
1896  const Numeric xf_MaTipping = 4.6019; // [1]
1897  // ---------------------------------------------------------------------------------------
1898 
1899 
1900  // select the parameter set (!!model goes for values!!):
1901  Numeric C, x;
1902  if ( model == "MaTipping" )
1903  {
1904  C = Cf_MaTipping;
1905  x = xf_MaTipping;
1906  }
1907  else if ( model == "user" )
1908  {
1909  C = Cin;
1910  x = xin;
1911  }
1912  else
1913  {
1914  ostringstream os;
1915  os << "H2O-MaTipping_H2O_foreign_continuum: ERROR! Wrong model values given.\n"
1916  << "allowed models are: 'MaTipping', 'user'" << '\n';
1917  throw runtime_error(os.str());
1918  }
1919  out3 << "H2O-MaTipping_H2O_foreign_continuum: (model=" << model << ") parameter values in use:\n"
1920  << " C_s = " << C << "\n"
1921  << " x_s = " << x << "\n";
1922 
1923  const Index n_p = p_abs.nelem(); // Number of pressure levels
1924  const Index n_f = f_mono.nelem(); // Number of frequencies
1925 
1926  // Check that dimensions of p_abs, t_abs, and vmr agree:
1927  assert ( n_p==t_abs.nelem() );
1928  assert ( n_p==vmr.nelem() );
1929 
1930  // Check that dimensions of xsec are consistent with n_f
1931  // and n_p. It should be [n_f,n_p]:
1932  assert ( n_f==xsec.nrows() );
1933  assert ( n_p==xsec.ncols() );
1934 
1935  // Loop pressure/temperature:
1936  for ( Index i=0; i<n_p; ++i )
1937  {
1938  // Dry air partial pressure: p_dry := p_tot - p_h2o.
1939  Numeric pdry = p_abs[i] * (1.000e0-vmr[i]);
1940  // Dummy scalar holds everything except the quadratic frequency dependence.
1941  // The vmr of H2O will be multiplied at the stage of absorption
1942  // calculation: abs = vmr * xsec.
1943  Numeric dummy = C * pow( (Numeric)300./t_abs[i], x )
1944  * p_abs[i] * pdry;
1945 
1946  // Loop frequency:
1947  for ( Index s=0; s<n_f; ++s )
1948  {
1949  xsec(s,i) += dummy * pow( f_mono[s], (Numeric)2.0389 );
1950  // cout << "xsec(" << s << "," << i << "): " << xsec(s,i) << "\n";
1951  }
1952  }
1953 }
1954 //
1955 // #################################################################################
1956 
1957 
1958 
1959 // =================================================================================
1960 
1961 
1963  const Numeric /* V2A */,
1964  const Numeric DVA,
1965  const Numeric A[],
1966  const Numeric VI)
1967 {
1968 
1969 // ----------------------------------------------------------------------
1970  // THIS SUBROUTINE INTERPOLATES THE A ARRAY STORED
1971  // FROM V1A TO V2A IN INCREMENTS OF DVA INTO XINT
1972 // ----------------------------------------------------------------------
1973 
1974  const Numeric ONEPL = 1.001; // original value given in F77 code
1975  // FIXME const Numeric ONEMI = 0.999; // original value given in F77 code
1976 
1977  //const Numeric ONEPL = 0.001; // modified value for C/C++ code
1978 
1979  Numeric RECDVA = 1.00e0/DVA;
1980 
1981  int J = (int) ((VI-V1A)*RECDVA + ONEPL) ;
1982  Numeric VJ = V1A + DVA * (Numeric)(J-1);
1983  Numeric P = RECDVA * (VI-VJ);
1984  Numeric C = (3.00e0-2.00e0*P) * P * P;
1985  Numeric B = 0.500e0 * P * (1.00e0-P);
1986  Numeric B1 = B * (1.00e0-P);
1987  Numeric B2 = B * P;
1988 
1989  Numeric xint = -A[J-1] * B1 +
1990  A[J] * (1.00e0-C+B2) +
1991  A[J+1] * (C+B1) -
1992  A[J+2] * B2;
1993 
1994  /*
1995  cout << (J-1) << " <-> " << (J+2)
1996  << ", V=" << VI << ", VJ=" << VJ << "\n";
1997  cout << "xint=" << xint << " " << A[J-1] << " " << A[J] << " " << A[J+1] << " " << A[J+2] << "\n";
1998  */
1999 
2000  return xint;
2001 }
2002 
2003 // =================================================================================
2004 
2006  const Numeric XKT)
2007 {
2008 // ---------------------------------------------------------------------- B18060
2009 // LAST MODIFICATION: 12 AUGUST 1991 B17940
2010 // B17950
2011 // IMPLEMENTATION: R.D. WORSHAM B17960
2012 // B17970
2013 // ALGORITHM REVISIONS: S.A. CLOUGH B17980
2014 // R.D. WORSHAM B17990
2015 // J.L. MONCET B18000
2016 // B18010
2017 // B18020
2018 // ATMOSPHERIC AND ENVIRONMENTAL RESEARCH INC. B18030
2019 // 840 MEMORIAL DRIVE, CAMBRIDGE, MA 02139 B18040
2020 // B18050
2021 // B18070
2022 // WORK SUPPORTED BY: THE ARM PROGRAM B18080
2023 // OFFICE OF ENERGY RESEARCH B18090
2024 // DEPARTMENT OF ENERGY B18100
2025 // B18110
2026 // B18120
2027 // SOURCE OF ORIGINAL ROUTINE: AFGL LINE-BY-LINE MODEL B18130
2028 // B18140
2029 // FASCOD3 B18150
2030 // B18160
2031 // ---------------------------------------------------------------------- B18060
2032 // B18170
2033 // IN THE SMALL XVIOKT REGION 0.5 IS REQUIRED
2034 
2035  Numeric XVI = VI;
2036  Numeric RADFN = 0.00e0;
2037 
2038  if (XKT > 0.0)
2039  {
2040  Numeric XVIOKT = XVI/XKT;
2041 
2042  if (XVIOKT <= 0.01e0)
2043  {
2044  RADFN = 0.500e0 * XVIOKT * XVI;
2045  }
2046  else if (XVIOKT <= 10.0e0)
2047  {
2048  Numeric EXPVKT = exp(-XVIOKT);
2049  RADFN = XVI * (1.00e0-EXPVKT) / (1.00e0+EXPVKT);
2050  }
2051  else
2052  {
2053  RADFN = XVI;
2054  }
2055  }
2056  else
2057  {
2058  RADFN = XVI;
2059  }
2060 
2061  return RADFN;
2062 }
2063 
2064 // =================================================================================
2065 
2066 // CKD version 2.2.2 H2O self continuum absorption model
2094  const Numeric Cin,
2095  const String& model,
2096  ConstVectorView f_mono,
2097  ConstVectorView p_abs,
2098  ConstVectorView t_abs,
2099  ConstVectorView vmr,
2100  ConstVectorView /* n2_abs */ )
2101 {
2102 
2103 
2104  // check the model name about consistency
2105  if ((model != "user") && (model != "CKD222"))
2106  {
2107  ostringstream os;
2108  os << "!!ERROR!!\n"
2109  << "CKDv2.2.2 H2O self continuum:\n"
2110  << "INPUT model name is: " << model << ".\n"
2111  << "VALID model names are user and CKD222\n";
2112  throw runtime_error(os.str());
2113  }
2114 
2115 
2116  // scaling factor of the self H2O cont. absorption
2117  Numeric ScalingFac = 1.0000e0;
2118  if ( model == "user" )
2119  {
2120  ScalingFac = Cin; // input scaling factor of calculated absorption
2121  }
2122 
2123 
2124  const Index n_p = p_abs.nelem(); // Number of pressure levels
2125  const Index n_f = f_mono.nelem(); // Number of frequencies
2126 
2127 
2128  // Check that dimensions of p_abs, t_abs, and vmr agree:
2129  assert ( n_p==t_abs.nelem() );
2130  assert ( n_p==vmr.nelem() );
2131 
2132  // Check that dimensions of xsec are consistent with n_f
2133  // and n_p. It should be [n_f,n_p]:
2134  assert ( n_f==xsec.nrows() );
2135  assert ( n_p==xsec.ncols() );
2136 
2137 
2138  // ************************** CKD stuff ************************************
2139 
2140  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2141  // FIXME const Numeric T1 = 273.0e0;
2142  const Numeric TO = 296.0e0;
2143  const Numeric PO = 1013.0e0;
2144 
2145  // CKD2.2.2 specific self continuum correction function parameters
2146  const Numeric ALPHA2 = 200.000 * 200.000;
2147  const Numeric ALPHS2 = 120.000 * 120.000;
2148  const Numeric BETAS = 5.000e-06;
2149  const Numeric V0S = 1310.000;
2150  const Numeric FACTRS = 0.150;
2151 
2152  // These are self-continuum modification factors from 700-1200 cm-1
2153  const Numeric XFAC[51] = {
2154  1.00000,1.01792,1.03767,1.05749,1.07730,1.09708,
2155  1.10489,1.11268,1.12047,1.12822,1.13597,1.14367,
2156  1.15135,1.15904,1.16669,1.17431,1.18786,1.20134,
2157  1.21479,1.22821,1.24158,1.26580,1.28991,1.28295,
2158  1.27600,1.26896,1.25550,1.24213,1.22879,1.21560,
2159  1.20230,1.18162,1.16112,1.14063,1.12016,1.10195,
2160  1.09207,1.08622,1.08105,1.07765,1.07398,1.06620,
2161  1.05791,1.04905,1.03976,1.02981,1.00985,1.00000,
2162  1.00000,1.00000,1.00000};
2163 
2164  // wavenumber range where CKD H2O self continuum is valid
2165  const Numeric VABS_min = SL260_ckd_0_v1; // [cm^-1]
2166  const Numeric VABS_max = SL260_ckd_0_v2; // [cm^-1]
2167 
2168 
2169  // It is assumed here that f_mono is monotonically increasing with index!
2170  // In future change this return into a change of the loop over
2171  // the frequency f_mono. n_f_new < n_f
2172  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2173  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2174  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2175  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2176  {
2177  out3 << "WARNING:\n"
2178  << " CKD2.2.2 H2O self continuum:\n"
2179  << " input frequency vector exceeds range of model validity\n"
2180  << " " << SL296_ckd_0_v1 << "<->" << SL296_ckd_0_v2 << "cm^-1\n";
2181  }
2182 
2183 
2184  // ------------------- subroutine SL296/SL260 ----------------------------
2185 
2187  {
2188  ostringstream os;
2189  os << "!!ERROR!!\n"
2190  << "CKD2.2.2 H2O self continuum:\n"
2191  << "parameter V1 not the same for different ref. temperatures.\n";
2192  throw runtime_error(os.str());
2193  }
2195  {
2196  ostringstream os;
2197  os << "!!ERROR!!\n"
2198  << "CKD2.2.2 H2O self continuum:\n"
2199  << "parameter V2 not the same for different ref. temperatures.\n";
2200  throw runtime_error(os.str());
2201  }
2203  {
2204  ostringstream os;
2205  os << "!!ERROR!!\n"
2206  << "CKD2.2.2 H2O self continuum:\n"
2207  << "parameter DV not the same for different ref. temperatures.\n";
2208  throw runtime_error(os.str());
2209  }
2211  {
2212  ostringstream os;
2213  os << "!!ERROR!!\n"
2214  << "CKD2.2.2 H2O self continuum:\n"
2215  << "parameter NPT not the same for different ref. temperatures.\n";
2216  throw runtime_error(os.str());
2217  }
2218 
2219  // retrieve the appropriate array sequence of the self continuum
2220  // arrays of the CKD model.
2221  Numeric DVC = SL296_ckd_0_dv;
2222  Numeric V1C = V1ABS - DVC;
2223  Numeric V2C = V2ABS + DVC;
2224 
2225  int I1 = (int) ((V1C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2226  if (V1C < SL296_ckd_0_v1) I1 = -1;
2227  V1C = SL296_ckd_0_v1 + (SL296_ckd_0_dv * (Numeric)I1);
2228 
2229  int I2 = (int) ((V2C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2230 
2231  int NPTC = I2-I1+3;
2232  if (NPTC > SL296_ckd_0_npt) NPTC = SL296_ckd_0_npt+1;
2233 
2234  V2C = V1C + SL296_ckd_0_dv * (Numeric)(NPTC-1);
2235 
2236  if (NPTC < 1)
2237  {
2238  ostringstream os;
2239  out3 << "WARNING:\n"
2240  << " CKD2.2.2 H2O self continuum:\n"
2241  << " no elements of internal continuum coefficients could be found for the\n"
2242  << " input frequency range.\n"
2243  << " Leave the function without calculating the absorption.";
2244  return;
2245  }
2246 
2247  Numeric SH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2248  Numeric SH2OT1[NPTC+addF77fields]; // [cm^3/molecules]
2249 
2250  for (Index J = 1 ; J <= NPTC ; ++J)
2251  {
2252  Index I = I1+J;
2253  if ( (I < 1) || (I > SL296_ckd_0_npt) )
2254  {
2255  SH2OT0[J] = 0.0e0; // at T=296 K
2256  SH2OT1[J] = 0.0e0; // at T=260 K
2257  }
2258  else
2259  {
2260  SH2OT0[J] = SL296_ckd_0[I]; // at T=296 K
2261  SH2OT1[J] = SL260_ckd_0[I]; // at T=260 K
2262  }
2263  }
2264 
2265  // ------------------- subroutine SL296/SL260 ----------------------------
2266 
2267  Numeric SFAC = 1.00e0;
2268  Numeric VS2 = 0.00e0;
2269  // FIXME Numeric VS4 = 0.00e0;
2270 
2271  // Loop pressure/temperature:
2272  for ( Index i = 0 ; i < n_p ; ++i )
2273  {
2274 
2275  // atmospheric state parameters
2276  Numeric Tave = t_abs[i]; // [K]
2277  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
2278  Numeric Patm = Pave/PO; // [1]
2279  Numeric vmrh2o = vmr[i]; // [1]
2280  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
2281  // second vmr in absCalc multiplied
2282  Numeric Rh2o = Patm * (TO/Tave); // [1]
2283  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
2284  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
2285  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2286  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
2287 
2288  // Molecular cross section calculated by CKD.
2289  // The cross sectionis calculated on the predefined
2290  // CKD wavenumber grid.
2291  Numeric k[NPTC+addF77fields]; // [1/cm]
2292  k[0] = 0.00e0; // not used array field
2293  for (Index J = 1 ; J <= NPTC ; ++J)
2294  {
2295  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2296  Numeric SH2O = 0.0e0;
2297  if (SH2OT0[J] > 0.0e0)
2298  {
2299  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
2300  SFAC = 1.00e0;
2301 
2302  if ( (VJ >= 700.0e0) && (VJ <= 1200.0e0) )
2303  {
2304  int JFAC = (int)((VJ - 700.0e0)/10.0e0 + 0.00001e0);
2305  if ( (JFAC >= 0) && (JFAC <= 50) )
2306  SFAC = XFAC[JFAC];
2307  }
2308 
2309  // ---------------------------------------------------------
2310  // Correction to self continuum (1 SEPT 85); factor of
2311  // 0.78 at 1000 and .......
2312 
2313  VS2 = (VJ-V0S) * (VJ-V0S);
2314 
2315  SFAC = SFAC *
2316  ( 1.000e0 + 0.3000e0 * (1.000e4 / ((VJ*VJ) + 1.000e4)) ) *
2317  ( 1.000e0 - 0.2333e0 * (ALPHA2 / ((VJ-1050.000e0)*(VJ-1050.000e0) + ALPHA2)) ) *
2318  ( 1.000e0 - FACTRS * (ALPHS2 / (VS2+(BETAS*VS2*VS2)+ALPHS2)) );
2319 
2320  SH2O = SFAC * SH2O;
2321  }
2322 
2323  // CKD cross section with radiative field [1/cm]
2324  // the VMRH2O will be multiplied in absCalc, hence Rh2o does not contain
2325  // VMRH2O as multiplicative term
2326  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT); // [1]
2327 
2328  }
2329 
2330 
2331  // Loop input frequency array. The previously calculated cross section
2332  // has therefore to be interpolated on the input frequencies.
2333  for ( Index s = 0 ; s < n_f ; ++s )
2334  {
2335  // calculate the associated wave number (= 1/wavelength)
2336  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2337  if ( (V >= 0.000e0) && (V < SL296_ckd_0_v2) )
2338  {
2339  // arts cross section [1/m]
2340  // interpolate the k vector on the f_mono grid
2341  // The factor 100 comes from the conversion from 1/cm to 1/m for
2342  // the absorption coefficient
2343  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2344  }
2345  }
2346  }
2347 
2348 }
2349 
2350 
2351 
2352 // =================================================================================
2353 
2354 // CKD version 2.2.2 H2O foreign continuum absorption model
2382  const Numeric Cin,
2383  const String& model,
2384  ConstVectorView f_mono,
2385  ConstVectorView p_abs,
2386  ConstVectorView t_abs,
2387  ConstVectorView vmr,
2388  ConstVectorView /* n2_abs */ )
2389 {
2390 
2391  // check the model name about consistency
2392  if ((model != "user") && (model != "CKD222"))
2393  {
2394  ostringstream os;
2395  os << "!!ERROR!!\n"
2396  << "CKDv2.2.2 H2O foreign continuum:\n"
2397  << "INPUT model name is: " << model << ".\n"
2398  << "VALID model names are user and CKD222\n";
2399  throw runtime_error(os.str());
2400  }
2401 
2402 
2403  // scaling factor of the foreign H2O cont. absorption
2404  Numeric ScalingFac = 1.0000e0;
2405  if ( model == "user" )
2406  {
2407  ScalingFac = Cin; // input scaling factor of calculated absorption
2408  }
2409 
2410 
2411  const Index n_p = p_abs.nelem(); // Number of pressure levels
2412  const Index n_f = f_mono.nelem(); // Number of frequencies
2413 
2414 
2415  // Check that dimensions of p_abs, t_abs, and vmr agree:
2416  assert ( n_p==t_abs.nelem() );
2417  assert ( n_p==vmr.nelem() );
2418 
2419  // Check that dimensions of xsec are consistent with n_f
2420  // and n_p. It should be [n_f,n_p]:
2421  assert ( n_f==xsec.nrows() );
2422  assert ( n_p==xsec.ncols() );
2423 
2424 
2425  // ************************** CKD stuff ************************************
2426 
2427  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2428  const Numeric T1 = 273.000e0;
2429  const Numeric TO = 296.000e0;
2430  const Numeric PO = 1013.000e0;
2431 
2432  // CKD2.2.2 foreign H2O continuum correction function parameters
2433  const Numeric HWSQF = 330.000e0 * 330.000e0;
2434  const Numeric BETAF = 8.000e-11;
2435  const Numeric V0F = 1130.000e0;
2436  const Numeric FACTRF = 0.970e0;
2437 
2438  const Numeric V0F2 = 1900.000e0;
2439  const Numeric HWSQF2 = 150.000e0 * 150.000e0;
2440  const Numeric BETA2 = 3.000e-6;
2441 
2442  // wavenumber range where CKD H2O foreign continuum is valid
2443  const Numeric VABS_min = FH2O_ckd_0_v1; // [cm^-1]
2444  const Numeric VABS_max = FH2O_ckd_0_v2; // [cm^-1]
2445 
2446 
2447  // It is assumed here that f_mono is monotonically increasing with index!
2448  // In future change this return into a change of the loop over
2449  // the frequency f_mono. n_f_new < n_f
2450  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2451  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2452  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2453  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2454  {
2455  out3 << "WARNING:\n"
2456  << " CKD2.2.2 H2O foreign continuum:\n"
2457  << " input frequency vector exceeds range of model validity\n"
2458  << " " << FH2O_ckd_0_v1 << "<->" << FH2O_ckd_0_v2 << "cm^-1\n";
2459  }
2460 
2461 
2462  // ---------------------- subroutine FRN296 ------------------------------
2463 
2464  // retrieve the appropriate array sequence of the foreign continuum
2465  // arrays of the CKD model.
2466  Numeric DVC = FH2O_ckd_0_dv;
2467  Numeric V1C = V1ABS - DVC;
2468  Numeric V2C = V2ABS + DVC;
2469 
2470  int I1 = (int) ((V1C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
2471  if (V1C < FH2O_ckd_0_v1) I1 = -1;
2472  V1C = FH2O_ckd_0_v1 + (FH2O_ckd_0_dv * (Numeric)I1);
2473 
2474  int I2 = (int) ((V2C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
2475 
2476  int NPTC = I2-I1+3;
2477  if (NPTC > FH2O_ckd_0_npt) NPTC = FH2O_ckd_0_npt+1;
2478 
2479  V2C = V1C + FH2O_ckd_0_dv * (Numeric)(NPTC-1);
2480 
2481  if (NPTC < 1)
2482  {
2483  out3 << "WARNING:\n"
2484  << " CKD2.2.2 H2O foreign continuum:\n"
2485  << " no elements of internal continuum coefficients could be found for the\n"
2486  << " input frequency range.\n"
2487  << " Leave the function without calculating the absorption.";
2488  return;
2489  }
2490 
2491  Numeric FH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2492 
2493  for (Index J = 1 ; J <= NPTC ; ++J)
2494  {
2495  Index I = I1+J;
2496  if ( (I < 1) || (I > FH2O_ckd_0_npt) )
2497  {
2498  FH2OT0[J] = 0.0e0;
2499  }
2500  else
2501  {
2502  FH2OT0[J] = FH2O_ckd_0[I];
2503  }
2504  }
2505 
2506  // ---------------------- subroutine FRN296 ------------------------------
2507 
2508  Numeric VF2 = 0.000e0;
2509  Numeric VF4 = 0.000e0;
2510  Numeric VF6 = 0.000e0;
2511  Numeric FSCAL = 0.000e0;
2512  Numeric FH2O = 0.000e0;
2513 
2514  // Loop pressure/temperature:
2515  for ( Index i = 0 ; i < n_p ; ++i )
2516  {
2517 
2518  // atmospheric state parameters
2519  Numeric Tave = t_abs[i]; // [K]
2520  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
2521  Numeric vmrh2o = vmr[i]; // [1]
2522  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
2523  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
2524  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
2525  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
2526  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2527  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
2528 
2529  // Molecular cross section calculated by CKD.
2530  // The cross sectionis calculated on the predefined
2531  // CKD wavenumber grid.
2532  Numeric k[NPTC+addF77fields]; // [1/cm]
2533  k[0] = 0.00e0; // not used array field
2534  for (Index J = 1 ; J <= NPTC ; ++J)
2535  {
2536  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2537 
2538  // CORRECTION TO FOREIGN CONTINUUM
2539  VF2 = (VJ-V0F) * (VJ-V0F);
2540  VF6 = VF2 * VF2 * VF2;
2541  FSCAL = (1.000e0 - FACTRF*(HWSQF/(VF2+(BETAF*VF6)+HWSQF)));
2542 
2543  VF2 = (VJ-V0F2) * (VJ-V0F2);
2544  VF4 = VF2 * VF2;
2545  FSCAL = FSCAL * (1.000e0 - 0.600e0*(HWSQF2/(VF2 + BETA2*VF4 + HWSQF2)));
2546 
2547  FH2O = FH2OT0[J] * FSCAL;
2548 
2549  // CKD cross section with radiative field [1/cm]
2550  // The VMRH2O will be multiplied in absCalc, hence WTOT and not W1
2551  // as multiplicative term
2552  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
2553 
2554  }
2555 
2556 
2557  // Loop input frequency array. The previously calculated cross section
2558  // has therefore to be interpolated on the input frequencies.
2559  for ( Index s = 0 ; s < n_f ; ++s )
2560  {
2561  // calculate the associated wave number (= 1/wavelength)
2562  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2563  if ( (V > 0.000e0) && (V < VABS_max) )
2564  {
2565  // arts CKD2.2.2 foreign H2O continuum cross section [1/m]
2566  // interpolate the k vector on the f_mono grid
2567  // The factor 100 comes from the conversion from (1/cm) to (1/m)
2568  // of the abs. coeff.
2569  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2570  }
2571  }
2572  }
2573 
2574 }
2575 
2576 
2577 // =================================================================================
2578 
2579 // CKD version 2.4.2 H2O self continuum absorption model
2607  const Numeric Cin,
2608  const String& model,
2609  ConstVectorView f_mono,
2610  ConstVectorView p_abs,
2611  ConstVectorView t_abs,
2612  ConstVectorView vmr,
2613  ConstVectorView /* n2_abs */ )
2614 {
2615 
2616 
2617  // check the model name about consistency
2618  if ((model != "user") && (model != "CKD242"))
2619  {
2620  ostringstream os;
2621  os << "!!ERROR!!\n"
2622  << "CKDv2.4.2 H2O self continuum:\n"
2623  << "INPUT model name is: " << model << ".\n"
2624  << "VALID model names are user and CKD242\n";
2625  throw runtime_error(os.str());
2626  }
2627 
2628 
2629  // scaling factor of the self H2O cont. absorption
2630  Numeric ScalingFac = 1.0000e0;
2631  if ( model == "user" )
2632  {
2633  ScalingFac = Cin; // input scaling factor of calculated absorption
2634  }
2635 
2636 
2637  const Index n_p = p_abs.nelem(); // Number of pressure levels
2638  const Index n_f = f_mono.nelem(); // Number of frequencies
2639 
2640 
2641  // Check that dimensions of p_abs, t_abs, and vmr agree:
2642  assert ( n_p==t_abs.nelem() );
2643  assert ( n_p==vmr.nelem() );
2644 
2645  // Check that dimensions of xsec are consistent with n_f
2646  // and n_p. It should be [n_f,n_p]:
2647  assert ( n_f==xsec.nrows() );
2648  assert ( n_p==xsec.ncols() );
2649 
2650 
2651  // ************************** CKD stuff ************************************
2652 
2653  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2654  // FIXME const Numeric T1 = 273.0e0;
2655  const Numeric TO = 296.0e0;
2656  const Numeric PO = 1013.0e0;
2657 
2658  // CKD2.4.2 specific correction functions
2659  const Numeric V0S1 = 0.000e+00;
2660  const Numeric HWSQ1 = (1.000e+02 * 1.000e+02);
2661  const Numeric BETAS1 = 1.000e-04;
2662  const Numeric FACTRS1 = 0.688e+00;
2663 
2664  const Numeric V0S2 = 1.050e+03;
2665  const Numeric HWSQ2 = (2.000e+02 * 2.000e+02);
2666  const Numeric FACTRS2 = -0.2333e+00;
2667 
2668  const Numeric V0S3 = 1.310e+03;
2669  const Numeric HWSQ3 = (1.200e+02 * 1.200e+02);
2670  const Numeric BETAS3 = 5.000e-06;
2671  const Numeric FACTRS3 = -0.150e+00;
2672 
2673  const Numeric XFAC[51] = {
2674  1.00000,1.01792,1.03767,1.05749,1.07730,1.09708,
2675  1.10489,1.11268,1.12047,1.12822,1.13597,1.14367,
2676  1.15135,1.15904,1.16669,1.17431,1.18786,1.20134,
2677  1.21479,1.22821,1.24158,1.26580,1.28991,1.28295,
2678  1.27600,1.26896,1.25550,1.24213,1.22879,1.21560,
2679  1.20230,1.18162,1.16112,1.14063,1.12016,1.10195,
2680  1.09207,1.08622,1.08105,1.07765,1.07398,1.06620,
2681  1.05791,1.04905,1.03976,1.02981,1.00985,1.00000,
2682  1.00000,1.00000,1.00000};
2683 
2684  // wavenumber range where CKD H2O self continuum is valid
2685  const Numeric VABS_min = SL260_ckd_0_v1; // [cm^-1]
2686  const Numeric VABS_max = SL260_ckd_0_v2; // [cm^-1]
2687 
2688 
2689  // It is assumed here that f_mono is monotonically increasing with index!
2690  // In future change this return into a change of the loop over
2691  // the frequency f_mono. n_f_new < n_f
2692  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2693  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2694  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2695  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2696  {
2697  out3 << "WARNING:\n"
2698  << " CKD2.4.2 H2O self continuum:\n"
2699  << " input frequency vector exceeds range of model validity\n"
2700  << " " << SL296_ckd_0_v1 << "<->" << SL296_ckd_0_v2 << "cm^-1\n";
2701  }
2702 
2703 
2704  // ------------------- subroutine SL296/SL260 ----------------------------
2705 
2707  {
2708  ostringstream os;
2709  os << "!!ERROR!!\n"
2710  << "CKD2.4.2 H2O self continuum:\n"
2711  << "parameter V1 not the same for different ref. temperatures.\n";
2712  throw runtime_error(os.str());
2713  }
2715  {
2716  ostringstream os;
2717  os << "!!ERROR!!\n"
2718  << "CKD2.4.2 H2O self continuum:\n"
2719  << "parameter V2 not the same for different ref. temperatures.\n";
2720  throw runtime_error(os.str());
2721  }
2723  {
2724  ostringstream os;
2725  os << "!!ERROR!!\n"
2726  << "CKD2.4.2 H2O self continuum:\n"
2727  << "parameter DV not the same for different ref. temperatures.\n";
2728  throw runtime_error(os.str());
2729  }
2731  {
2732  ostringstream os;
2733  os << "!!ERROR!!\n"
2734  << "CKD2.4.2 H2O self continuum:\n"
2735  << "parameter NPT not the same for different ref. temperatures.\n";
2736  throw runtime_error(os.str());
2737  }
2738 
2739  // retrieve the appropriate array sequence of the self continuum
2740  // arrays of the CKD model.
2741  Numeric DVC = SL296_ckd_0_dv;
2742  Numeric V1C = V1ABS - DVC;
2743  Numeric V2C = V2ABS + DVC;
2744 
2745  int I1 = (int) ((V1C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2746  if (V1C < SL296_ckd_0_v1) I1 = -1;
2747  V1C = SL296_ckd_0_v1 + (SL296_ckd_0_dv * (Numeric)I1);
2748 
2749  int I2 = (int) ((V2C-SL296_ckd_0_v1) / SL296_ckd_0_dv);
2750 
2751  int NPTC = I2-I1+3;
2752  if (NPTC > SL296_ckd_0_npt) NPTC = SL296_ckd_0_npt+1;
2753 
2754  V2C = V1C + SL296_ckd_0_dv * (Numeric)(NPTC-1);
2755 
2756  if (NPTC < 1)
2757  {
2758  ostringstream os;
2759  out3 << "WARNING:\n"
2760  << " CKDv2.4.2 H2O self continuum:\n"
2761  << " no elements of internal continuum coefficients could be found for the\n"
2762  << " input frequency range.\n"
2763  << " Leave the function without calculating the absorption.";
2764  return;
2765  }
2766 
2767  Numeric SH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
2768  Numeric SH2OT1[NPTC+addF77fields]; // [cm^3/molecules]
2769 
2770  for (Index J = 1 ; J <= NPTC ; ++J)
2771  {
2772  Index I = I1+J;
2773  if ( (I < 1) || (I > SL296_ckd_0_npt) )
2774  {
2775  SH2OT0[J] = 0.0e0; // at T=296 K
2776  SH2OT1[J] = 0.0e0; // at T=260 K
2777  }
2778  else
2779  {
2780  SH2OT0[J] = SL296_ckd_0[I]; // at T=296 K
2781  SH2OT1[J] = SL260_ckd_0[I]; // at T=260 K
2782  }
2783  }
2784 
2785  // ------------------- subroutine SL296/SL260 ----------------------------
2786 
2787  Numeric SFAC = 1.00e0;
2788  Numeric VS2 = 0.00e0;
2789  Numeric VS4 = 0.00e0;
2790 
2791  // Loop pressure/temperature:
2792  for ( Index i = 0 ; i < n_p ; ++i )
2793  {
2794 
2795  // atmospheric state parameters
2796  Numeric Tave = t_abs[i]; // [K]
2797  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
2798  Numeric Patm = Pave/PO; // [1]
2799  Numeric vmrh2o = vmr[i]; // [1]
2800  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
2801  // second vmr in absCalc multiplied
2802  Numeric Rh2o = Patm * (TO/Tave); // [1]
2803  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
2804  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
2805  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
2806  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
2807 
2808  // Molecular cross section calculated by CKD.
2809  // The cross sectionis calculated on the predefined
2810  // CKD wavenumber grid.
2811  Numeric k[NPTC+addF77fields]; // [1/cm]
2812  k[0] = 0.00e0; // not used array field
2813  for (Index J = 1 ; J <= NPTC ; ++J)
2814  {
2815  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
2816  Numeric SH2O = 0.0e0;
2817  if (SH2OT0[J] > 0.0e0)
2818  {
2819  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
2820  SFAC = 1.00e0;
2821 
2822  if ( (VJ >= 700.0e0) && (VJ <= 1200.0e0) )
2823  {
2824  int JFAC = (int)((VJ - 700.0e0)/10.0e0 + 0.00001e0);
2825  if ( (JFAC >= 0) && (JFAC <= 50) )
2826  SFAC = XFAC[JFAC];
2827  }
2828 
2829  // ---------------------------------------------------------
2830  // Correction to self continuum (1 SEPT 85); factor of
2831  // 0.78 at 1000 and .......
2832 
2833  VS2 = (VJ-V0S1) * (VJ-V0S1);
2834  VS4 = VS2*VS2;
2835  SFAC = SFAC *
2836  (1.000e0 + FACTRS1*(HWSQ1/((VJ*VJ)+(BETAS1*VS4)+HWSQ1)));
2837 
2838  VS2 = (VJ-V0S2) * (VJ-V0S2);
2839  SFAC = SFAC *
2840  (1.000e0 + FACTRS2*(HWSQ2/(VS2+HWSQ2)));
2841 
2842  VS2 = (VJ-V0S3) * (VJ-V0S3);
2843  VS4 = VS2*VS2;
2844  SFAC = SFAC *
2845  (1.000e0 + FACTRS3*(HWSQ3/(VS2+(BETAS3*VS4)+HWSQ3)));
2846 
2847  SH2O = SFAC * SH2O;
2848  }
2849 
2850  // CKD cross section with radiative field [1/cm]
2851  // The VMRH2O will be multiplied in absCalc, hence Rh2o does not contain
2852  // VMRH2O as multiplicative term
2853  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
2854 
2855  }
2856 
2857 
2858  // Loop input frequency array. The previously calculated cross section
2859  // has therefore to be interpolated on the input frequencies.
2860  for ( Index s = 0 ; s < n_f ; ++s )
2861  {
2862  // calculate the associated wave number (= 1/wavelength)
2863  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2864  if ( (V >= 0.000e0) && (V < SL296_ckd_0_v2) )
2865  {
2866  // arts cross section [1/m]
2867  // interpolate the k vector on the f_mono grid
2868  // The factor 100 comes from the conversion from 1/cm to 1/m for
2869  // the absorption coefficient
2870  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
2871  }
2872  }
2873  }
2874 
2875 }
2876 
2877 
2878 // =================================================================================
2879 
2880 // CKD version 2.4.2 H2O foreign continuum absorption model
2908  const Numeric Cin,
2909  const String& model,
2910  ConstVectorView f_mono,
2911  ConstVectorView p_abs,
2912  ConstVectorView t_abs,
2913  ConstVectorView vmr,
2914  ConstVectorView /* n2_abs */ )
2915 {
2916 
2917 
2918  // check the model name about consistency
2919  if ((model != "user") && (model != "CKD242"))
2920  {
2921  ostringstream os;
2922  os << "!!ERROR!!\n"
2923  << "CKDv2.4.2 H2O foreign continuum:\n"
2924  << "INPUT model name is: " << model << ".\n"
2925  << "VALID model names are user and CKD242\n";
2926  throw runtime_error(os.str());
2927  }
2928 
2929 
2930  // scaling factor of the foreign H2O cont. absorption
2931  Numeric ScalingFac = 1.0000e0;
2932  if ( model == "user" )
2933  {
2934  ScalingFac = Cin; // input scaling factor of calculated absorption
2935  }
2936 
2937 
2938  const Index n_p = p_abs.nelem(); // Number of pressure levels
2939  const Index n_f = f_mono.nelem(); // Number of frequencies
2940 
2941  // Check that dimensions of p_abs, t_abs, and vmr agree:
2942  assert ( n_p==t_abs.nelem() );
2943  assert ( n_p==vmr.nelem() );
2944 
2945  // Check that dimensions of xsec are consistent with n_f
2946  // and n_p. It should be [n_f,n_p]:
2947  assert ( n_f==xsec.nrows() );
2948  assert ( n_p==xsec.ncols() );
2949 
2950 
2951  // ************************** CKD stuff ************************************
2952 
2953  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
2954  const Numeric T1 = 273.0e0;
2955  const Numeric TO = 296.0e0;
2956  const Numeric PO = 1013.0e0;
2957 
2958  // CKD2.4.2 foreign H2O continuum correction function parameters
2959  const Numeric V0F1 = 350.000e0;
2960  const Numeric HWSQF1 = 200.000e0 * 200.000e0;
2961  const Numeric BETAF1 = 5.000e-9 ;
2962  const Numeric FACTRF1 = -0.700e0;
2963 
2964  const Numeric V0F1a = 630.000e0;
2965  const Numeric HWSQF1a = 65.000e0*65.000e0;
2966  const Numeric BETAF1a = 2.000e-08 ;
2967  const Numeric FACTRF1a = 0.750e0;
2968 
2969  const Numeric V0F2 = 1130.000e0;
2970  const Numeric HWSQF2 = 330.000e0 * 330.000e0;
2971  const Numeric BETAF2 = 8.000e-11;
2972  const Numeric FACTRF2 = -0.970e0;
2973 
2974  const Numeric V0F3 = 1975.000e0;
2975  const Numeric HWSQF3 = 250.000e0 * 250.000e0;
2976  const Numeric BETAF3 = 5.000e-06;
2977  const Numeric FACTRF3 = -0.650e0;
2978 
2979  // wavenumber range where CKD H2O foreign continuum is valid
2980  const Numeric VABS_min = FH2O_ckd_0_v1; // [cm^-1]
2981  const Numeric VABS_max = FH2O_ckd_0_v2; // [cm^-1]
2982 
2983 
2984  // It is assumed here that f_mono is monotonically increasing with index!
2985  // In future change this return into a change of the loop over
2986  // the frequency f_mono. n_f_new < n_f
2987  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2988  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
2989  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
2990  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
2991  {
2992  out3 << "WARNING:\n"
2993  << " CKDv2.4.2 H2O foreign continuum:\n"
2994  << " input frequency vector exceeds range of model validity\n"
2995  << " " << FH2O_ckd_0_v1 << "<->" << FH2O_ckd_0_v2 << "cm^-1\n";
2996  }
2997 
2998 
2999  // ---------------------- subroutine FRN296 ------------------------------
3000 
3001  // retrieve the appropriate array sequence of the foreign continuum
3002  // arrays of the CKD model.
3003  Numeric DVC = FH2O_ckd_0_dv;
3004  Numeric V1C = V1ABS - DVC;
3005  Numeric V2C = V2ABS + DVC;
3006 
3007  int I1 = (int) ((V1C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
3008  if (V1C < FH2O_ckd_0_v1) I1 = -1;
3009  V1C = FH2O_ckd_0_v1 + (FH2O_ckd_0_dv * (Numeric)I1);
3010 
3011  int I2 = (int) ((V2C-FH2O_ckd_0_v1) / FH2O_ckd_0_dv);
3012 
3013  int NPTC = I2-I1+3;
3014  if (NPTC > FH2O_ckd_0_npt) NPTC = FH2O_ckd_0_npt+1;
3015 
3016  V2C = V1C + FH2O_ckd_0_dv * (Numeric)(NPTC-1);
3017 
3018  if (NPTC < 1)
3019  {
3020  out3 << "WARNING:\n"
3021  << " CKDv2.4.2 H2O foreign continuum:\n"
3022  << " no elements of internal continuum coefficients could be found for the\n"
3023  << " input frequency range.\n"
3024  << " Leave the function without calculating the absorption.";
3025  return;
3026  }
3027 
3028  Numeric FH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
3029 
3030  for (Index J = 1 ; J <= NPTC ; ++J)
3031  {
3032  Index I = I1+J;
3033  if ( (I < 1) || (I > FH2O_ckd_0_npt) )
3034  {
3035  FH2OT0[J] = 0.0e0;
3036  }
3037  else
3038  {
3039  FH2OT0[J] = FH2O_ckd_0[I];
3040  }
3041  }
3042 
3043  // ---------------------- subroutine FRN296 ------------------------------
3044 
3045  Numeric VF2 = 0.000e0;
3046  Numeric VF4 = 0.000e0;
3047  Numeric VF6 = 0.000e0;
3048  Numeric FSCAL = 0.000e0;
3049  Numeric FH2O = 0.000e0;
3050 
3051  // Loop pressure/temperature:
3052  for ( Index i = 0 ; i < n_p ; ++i )
3053  {
3054 
3055  // atmospheric state parameters
3056  Numeric Tave = t_abs[i]; // [K]
3057  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
3058  Numeric vmrh2o = vmr[i]; // [1]
3059  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
3060  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
3061  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
3062  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3063  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3064  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3065 
3066  // Molecular cross section calculated by CKD.
3067  // The cross sectionis calculated on the predefined
3068  // CKD wavenumber grid.
3069  Numeric k[NPTC+addF77fields]; // [1/cm]
3070  k[0] = 0.00e0; // not used array field
3071  for (Index J = 1 ; J <= NPTC ; ++J)
3072  {
3073  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3074 
3075  // CORRECTION TO FOREIGN CONTINUUM
3076  VF2 = (VJ-V0F1) * (VJ-V0F1);
3077  VF6 = VF2 * VF2 * VF2;
3078  FSCAL = (1.000e0 + FACTRF1*(HWSQF1/(VF2+(BETAF1*VF6)+HWSQF1)));
3079 
3080  VF2 = (VJ-V0F1a) * (VJ-V0F1a);
3081  VF6 = VF2 * VF2 * VF2;
3082  FSCAL = FSCAL *
3083  (1.000e0 + FACTRF1a*(HWSQF1a/(VF2+(BETAF1a*VF6)+HWSQF1a)));
3084 
3085  VF2 = (VJ-V0F2) * (VJ-V0F2);
3086  VF6 = VF2 * VF2 * VF2;
3087  FSCAL = FSCAL *
3088  (1.000e0 + FACTRF2*(HWSQF2/(VF2+(BETAF2*VF6)+HWSQF2)));
3089 
3090  VF2 = (VJ-V0F3) * (VJ-V0F3);
3091  VF4 = VF2 * VF2;
3092  FSCAL = FSCAL *
3093  (1.000e0 + FACTRF3*(HWSQF3/(VF2+BETAF3*VF4+HWSQF3)));
3094 
3095  FH2O = FH2OT0[J] * FSCAL;
3096 
3097  // CKD cross section without radiative field
3098  // The VMRH2O will be multiplied in absCalc, hence WTOT and not W1
3099  // as multiplicative term
3100  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3101 
3102  }
3103 
3104 
3105  // Loop input frequency array. The previously calculated cross section
3106  // has therefore to be interpolated on the input frequencies.
3107  for ( Index s = 0 ; s < n_f ; ++s )
3108  {
3109  // calculate the associated wave number (= 1/wavelength)
3110  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3111  if ( (V >= 0.000e0) && (V < VABS_max) )
3112  {
3113  // arts CKD2.4.2 foreign H2O continuum cross section [1/m]
3114  // interpolate the k vector on the f_mono grid
3115  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3116  }
3117  }
3118  }
3119 
3120 }
3121 
3122 
3123 // =================================================================================
3124 
3125 // CKD version MT 1.00 H2O self continuum absorption model
3153  const Numeric Cin,
3154  const String& model,
3155  ConstVectorView f_mono,
3156  ConstVectorView p_abs,
3157  ConstVectorView t_abs,
3158  ConstVectorView vmr,
3159  ConstVectorView /* n2_abs */ )
3160 {
3161 
3162  // check the model name about consistency
3163  if ((model != "user") && (model != "CKDMT100"))
3164  {
3165  ostringstream os;
3166  os << "!!ERROR!!\n"
3167  << "CKD_MT1.00 H2O self continuum:\n"
3168  << "INPUT model name is: " << model << ".\n"
3169  << "VALID model names are user and CKDMT100\n";
3170  throw runtime_error(os.str());
3171  }
3172 
3173 
3174  // scaling factor of the self H2O cont. absorption
3175  Numeric ScalingFac = 1.0000e0;
3176  if ( model == "user" )
3177  {
3178  ScalingFac = Cin; // input scaling factor of calculated absorption
3179  }
3180 
3181 
3182  const Index n_p = p_abs.nelem(); // Number of pressure levels
3183  const Index n_f = f_mono.nelem(); // Number of frequencies
3184 
3185 
3186  // Check that dimensions of p_abs, t_abs, and vmr agree:
3187  assert ( n_p==t_abs.nelem() );
3188  assert ( n_p==vmr.nelem() );
3189 
3190  // Check that dimensions of xsec are consistent with n_f
3191  // and n_p. It should be [n_f,n_p]:
3192  assert ( n_f==xsec.nrows() );
3193  assert ( n_p==xsec.ncols() );
3194 
3195 
3196  // ************************** CKD stuff ************************************
3197 
3198  const Numeric xLosmt = 2.68675e19; // [molecules/cm^3]
3199  // FIXME const Numeric T1 = 273.000e0; // [K]
3200  const Numeric TO = 296.000e0; // [K]
3201  const Numeric PO = 1013.000e0; // [hPa]
3202 
3203  const Numeric XFACREV[15] =
3204  {1.003, 1.009, 1.015, 1.023, 1.029,1.033,
3205  1.037, 1.039, 1.040, 1.046, 1.036,1.027,
3206  1.01, 1.002, 1.00};
3207 
3208  // wavenumber range where CKD H2O self continuum is valid
3209  const Numeric VABS_min = -2.000e1; // [cm^-1]
3210  const Numeric VABS_max = 2.000e4; // [cm^-1]
3211 
3212 
3213  // It is assumed here that f_mono is monotonically increasing with index!
3214  // In future change this return into a change of the loop over
3215  // the frequency f_mono. n_f_new < n_f
3216  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3217  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3218  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3219  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3220  {
3221  out3 << "WARNING:\n"
3222  << " CKD_MT 1.00 H2O self continuum:\n"
3223  << " input frequency vector exceeds range of model validity\n"
3224  << " " << SL296_ckd_mt_100_v1 << "<->" << SL296_ckd_mt_100_v2 << "cm^-1\n";
3225  }
3226 
3227 
3228  // ------------------- subroutine SL296/SL260 ----------------------------
3229 
3231  {
3232  ostringstream os;
3233  os << "!!ERROR!!\n"
3234  << "CKD_MT 1.00 H2O self continuum:\n"
3235  << "parameter V1 not the same for different ref. temperatures.\n";
3236  throw runtime_error(os.str());
3237  }
3239  {
3240  ostringstream os;
3241  os << "!!ERROR!!\n"
3242  << "CKD_MT 1.00 H2O self continuum:\n"
3243  << "parameter V2 not the same for different ref. temperatures.\n";
3244  throw runtime_error(os.str());
3245  }
3247  {
3248  ostringstream os;
3249  os << "!!ERROR!!\n"
3250  << "CKD_MT 1.00 H2O self continuum:\n"
3251  << "parameter DV not the same for different ref. temperatures.\n";
3252  throw runtime_error(os.str());
3253  }
3255  {
3256  ostringstream os;
3257  os << "!!ERROR!!\n"
3258  << "CKD_MT 1.00 H2O self continuum:\n"
3259  << "parameter NPT not the same for different ref. temperatures.\n";
3260  throw runtime_error(os.str());
3261  }
3262 
3263  // retrieve the appropriate array sequence of the self continuum
3264  // arrays of the CKD model.
3266  Numeric V1C = V1ABS - DVC;
3267  Numeric V2C = V2ABS + DVC;
3268 
3269  int I1 = (int) ((V1C-SL296_ckd_mt_100_v1) / SL296_ckd_mt_100_dv);
3270  if (V1C < SL296_ckd_mt_100_v1) I1 = -1;
3272 
3273  int I2 = (int) ((V2C-SL296_ckd_mt_100_v1) / SL296_ckd_mt_100_dv);
3274 
3275  int NPTC = I2-I1+3;
3276  if (NPTC > SL296_ckd_mt_100_npt) NPTC = SL296_ckd_mt_100_npt+1;
3277 
3278  V2C = V1C + SL296_ckd_mt_100_dv * (Numeric)(NPTC-1);
3279 
3280  if (NPTC < 1)
3281  {
3282  ostringstream os;
3283  out3 << "WARNING:\n"
3284  << " CKD_MT 1.00 H2O self continuum:\n"
3285  << " no elements of internal continuum coefficients could be found for the\n"
3286  << " input frequency range.\n"
3287  << " Leave the function without calculating the absorption.";
3288  return;
3289  }
3290 
3291  Numeric SH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
3292  Numeric SH2OT1[NPTC+addF77fields]; // [cm^3/molecules]
3293 
3294  for (Index J = 1 ; J <= NPTC ; ++J)
3295  {
3296  Index I = I1+J;
3297  if ( (I < 1) || (I > SL296_ckd_mt_100_npt) )
3298  {
3299  SH2OT0[J] = 0.0e0; // at T=296 K
3300  SH2OT1[J] = 0.0e0; // at T=260 K
3301  }
3302  else
3303  {
3304  SH2OT0[J] = SL296_ckd_mt_100[I]; // at T=296 K
3305  SH2OT1[J] = SL260_ckd_mt_100[I]; // at T=260 K
3306  }
3307  }
3308 
3309  // ------------------- subroutine SL296/SL260 ----------------------------
3310 
3311  Numeric SFAC = 1.00e0;
3312 
3313  // Loop pressure/temperature:
3314  for ( Index i = 0 ; i < n_p ; ++i )
3315  {
3316 
3317  // atmospheric state parameters
3318  Numeric Tave = t_abs[i]; // [K]
3319  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
3320  Numeric Patm = Pave/PO; // [1]
3321  Numeric vmrh2o = vmr[i]; // [1]
3322  // FIXME Numeric Ph2o = Patm * vmrh2o; // [1]
3323  // second vmr in absCalc multiplied
3324  Numeric Rh2o = Patm * (TO/Tave); // [1]
3325  Numeric Tfac = (Tave-TO)/(260.0-TO); // [1]
3326  Numeric WTOT = xLosmt * (Pave/1.013000e3) * (2.7300e2/Tave); // [molecules/cm^2]
3327  Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3328  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B)/(h*c)
3329 
3330  // Molecular cross section calculated by CKD.
3331  // The cross sectionis calculated on the predefined
3332  // CKD wavenumber grid.
3333  Numeric k[NPTC+addF77fields]; // [1/cm]
3334  k[0] = 0.00e0; // not used array field
3335  for (Index J = 1 ; J <= NPTC ; ++J)
3336  {
3337  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3338  Numeric SH2O = 0.0e0;
3339  if (SH2OT0[J] > 0.0e0)
3340  {
3341  SH2O = SH2OT0[J] * pow( (SH2OT1[J]/SH2OT0[J]), Tfac );
3342  SFAC = 1.00e0;
3343 
3344  if ( (VJ >= 820.0e0) && (VJ <= 960.0e0) )
3345  {
3346  int JFAC = (int)((VJ - 820.0e0)/10.0e0 + 0.00001e0);
3347  if ( (JFAC >= 0) && (JFAC <=14) )
3348  SFAC = XFACREV[JFAC];
3349  }
3350 
3351  SH2O = SFAC * SH2O;
3352  }
3353 
3354  // CKD cross section with radiative field [1/cm]
3355  // The VMRH2O will be multiplied in absCalc, hence Rh2o does not contain
3356  // VMRH2O as multiplicative term
3357  k[J] = W1 * Rh2o * (SH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3358 
3359  }
3360 
3361 
3362  // Loop input frequency array. The previously calculated cross section
3363  // has therefore to be interpolated on the input frequencies.
3364  for ( Index s = 0 ; s < n_f ; ++s )
3365  {
3366  // calculate the associated wave number (= 1/wavelength)
3367  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3368  if ( (V > 0.000e0) && (V < SL296_ckd_mt_100_v2) )
3369  {
3370  // arts cross section [1/m]
3371  // interpolate the k vector on the f_mono grid
3372  // The factor 100 comes from the conversion from 1/cm to 1/m for
3373  // the absorption coefficient
3374  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3375  }
3376  }
3377  }
3378 
3379 }
3380 
3381 // =================================================================================
3382 
3383 // CKD version MT 1.00 H2O foreign continuum absorption model
3411  const Numeric Cin,
3412  const String& model,
3413  ConstVectorView f_mono,
3414  ConstVectorView p_abs,
3415  ConstVectorView t_abs,
3416  ConstVectorView vmr,
3417  ConstVectorView /* n2_abs */ )
3418 {
3419 
3420 
3421  // check the model name about consistency
3422  if ((model != "user") && (model != "CKDMT100"))
3423  {
3424  ostringstream os;
3425  os << "!!ERROR!!\n"
3426  << "CKD_MT1.00 H2O foreign continuum:\n"
3427  << "INPUT model name is: " << model << ".\n"
3428  << "VALID model names are user and CKDMT100\n";
3429  throw runtime_error(os.str());
3430  }
3431 
3432 
3433  // scaling factor of the foreign H2O cont. absorption
3434  Numeric ScalingFac = 1.0000e0;
3435  if ( model == "user" )
3436  {
3437  ScalingFac = Cin; // input scaling factor of calculated absorption
3438  }
3439 
3440 
3441  const Index n_p = p_abs.nelem(); // Number of pressure levels
3442  const Index n_f = f_mono.nelem(); // Number of frequencies
3443 
3444 
3445  // Check that dimensions of p_abs, t_abs, and vmr agree:
3446  assert ( n_p==t_abs.nelem() );
3447  assert ( n_p==vmr.nelem() );
3448 
3449  // Check that dimensions of xsec are consistent with n_f
3450  // and n_p. It should be [n_f,n_p]:
3451  assert ( n_f==xsec.nrows() );
3452  assert ( n_p==xsec.ncols() );
3453 
3454 
3455  // ************************** CKD stuff ************************************
3456 
3457  const Numeric xLosmt = 2.68675e19; // [molecules/cm^3]
3458  const Numeric T1 = 273.000e0;
3459  const Numeric TO = 296.000e0;
3460  const Numeric PO = 1013.000e0;
3461 
3462  // wavenumber range where CKD H2O self continuum is valid
3463  const Numeric VABS_min = -2.000e1; // [cm^-1]
3464  const Numeric VABS_max = 2.000e4; // [cm^-1]
3465 
3466 
3467  // It is assumed here that f_mono is monotonically increasing with index!
3468  // In future change this return into a change of the loop over
3469  // the frequency f_mono. n_f_new < n_f
3470  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3471  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3472  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3473  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3474  {
3475  out3 << "WARNING:\n"
3476  << " CKD_MT 1.00 H2O foreign continuum:\n"
3477  << " input frequency vector exceeds range of model validity\n"
3478  << " " << FH2O_ckd_mt_100_v1 << "<->" << FH2O_ckd_mt_100_v2 << "cm^-1\n";
3479  }
3480 
3481 
3482  // ---------------------- subroutine FRN296 ------------------------------
3483 
3484  // retrieve the appropriate array sequence of the foreign continuum
3485  // arrays of the CKD model.
3487  Numeric V1C = V1ABS - DVC;
3488  Numeric V2C = V2ABS + DVC;
3489 
3490  int I1 = (int) ((V1C-FH2O_ckd_mt_100_v1) / FH2O_ckd_mt_100_dv);
3491  if (V1C < FH2O_ckd_mt_100_v1) I1 = -1;
3493 
3494  int I2 = (int) ((V2C-FH2O_ckd_mt_100_v1) / FH2O_ckd_mt_100_dv);
3495 
3496  int NPTC = I2-I1+3;
3497  if (NPTC > FH2O_ckd_mt_100_npt) NPTC = FH2O_ckd_mt_100_npt+1;
3498 
3499  V2C = V1C + FH2O_ckd_mt_100_dv * (Numeric)(NPTC-1);
3500 
3501  if (NPTC < 1)
3502  {
3503  out3 << "WARNING:\n"
3504  << " CKD_MT 1.00 H2O foreign continuum:\n"
3505  << " no elements of internal continuum coefficients could be found for the\n"
3506  << " input frequency range.\n"
3507  << " Leave the function without calculating the absorption.";
3508  return;
3509  }
3510 
3511  Numeric FH2OT0[NPTC+addF77fields]; // [cm^3/molecules]
3512 
3513  for (Index J = 1 ; J <= NPTC ; ++J)
3514  {
3515  Index I = I1+J;
3516  if ( (I < 1) || (I > FH2O_ckd_mt_100_npt) )
3517  {
3518  FH2OT0[J] = 0.0e0;
3519  }
3520  else
3521  {
3522  FH2OT0[J] = FH2O_ckd_mt_100[I];
3523  }
3524  }
3525 
3526  // ---------------------- subroutine FRN296 ------------------------------
3527 
3528 
3529 
3530 
3531  // Loop pressure/temperature:
3532  for ( Index i = 0 ; i < n_p ; ++i )
3533  {
3534  // atmospheric state parameters
3535  Numeric Tave = t_abs[i]; // [K]
3536  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
3537  Numeric vmrh2o = vmr[i]; // [1]
3538  // FIXME Numeric ph2o = vmrh2o * Pave; // [hPa]
3539  Numeric PFRGN = (Pave/PO) * (1.00000e0 - vmrh2o); // dry air pressure [hPa]
3540  Numeric RFRGN = PFRGN * (TO/Tave); // [hPa]
3541  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3542  // FIXME Numeric W1 = vmrh2o * WTOT; // [molecules/cm^2]
3543  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3544 
3545  // Molecular cross section calculated by CKD.
3546  // The cross sectionis calculated on the predefined
3547  // CKD wavenumber grid.
3548  Numeric k[NPTC+addF77fields]; // [1/cm]
3549  k[0] = 0.00e0; // not used array field
3550  for (Index J = 1 ; J <= NPTC ; ++J)
3551  {
3552  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3553  Numeric FH2O = FH2OT0[J];
3554 
3555  // CKD cross section with radiative field [1/cm]
3556  // The VMRH2O will be multiplied in absCalc, hence WTOT and not W1
3557  // as multiplicative term
3558  k[J] = WTOT * RFRGN * (FH2O*1.000e-20) * RADFN_FUN(VJ,XKT);
3559 
3560  }
3561 
3562  // Loop input frequency array. The previously calculated cross section
3563  // has therefore to be interpolated on the input frequencies.
3564  for ( Index s = 0 ; s < n_f ; ++s )
3565  {
3566  // calculate the associated wave number (= 1/wavelength)
3567  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3568  if ( (V >= 0.000e0) && (V < VABS_max) )
3569  {
3570  // arts CKD_MT.100 cross section [1/m]
3571  // interpolate the k vector on the f_mono grid
3572  // The factor 100 comes from the conversion from (1/cm) to (1/m)
3573  // of the abs. coeff.
3574  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3575  }
3576  }
3577  }
3578 
3579 }
3580 
3581 //
3582 
3583 // =================================================================================
3584 
3585 // CKD version 2.4.1 CO2 continuum absorption model
3612  const Numeric Cin,
3613  const String& model,
3614  ConstVectorView f_mono,
3615  ConstVectorView p_abs,
3616  ConstVectorView t_abs,
3617  ConstVectorView vmr )
3618 {
3619 
3620  // check the model name about consistency
3621  if ((model != "user") && (model != "CKD241"))
3622  {
3623  ostringstream os;
3624  os << "!!ERROR!!\n"
3625  << "CKDv2.4.1 CO2 continuum:\n"
3626  << "INPUT model name is: " << model << ".\n"
3627  << "VALID model names are user and CKD241\n";
3628  throw runtime_error(os.str());
3629  }
3630 
3631 
3632  // scaling factor of the CO2 absorption
3633  Numeric ScalingFac = 0.0000e0;
3634  if ( model == "user" )
3635  {
3636  ScalingFac = Cin; // input scaling factor of calculated absorption
3637  }
3638  else
3639  {
3640  ScalingFac = 1.0000e0;
3641  }
3642 
3643  const Index n_p = p_abs.nelem(); // Number of pressure levels
3644  const Index n_f = f_mono.nelem(); // Number of frequencies
3645 
3646 
3647  // Check that dimensions of p_abs, t_abs, and vmr agree:
3648  assert ( n_p==t_abs.nelem() );
3649  assert ( n_p==vmr.nelem() );
3650 
3651  // Check that dimensions of xsec are consistent with n_f
3652  // and n_p. It should be [n_f,n_p]:
3653  assert ( n_f==xsec.nrows() );
3654  assert ( n_p==xsec.ncols() );
3655 
3656 
3657  // ************************** CKD stuff ************************************
3658 
3659  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
3660  const Numeric T1 = 273.0e0;
3661  const Numeric TO = 296.0e0;
3662  const Numeric PO = 1013.0e0;
3663 
3664  // wavenumber range where CKD CO2 continuum is valid
3665  const Numeric VABS_min = -2.000e1; // [cm^-1]
3666  const Numeric VABS_max = 1.000e4; // [cm^-1]
3667 
3668 
3669  // It is assumed here that f_mono is monotonically increasing with index!
3670  // In future change this return into a change of the loop over
3671  // the frequency f_mono. n_f_new < n_f
3672  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3673  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3674  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3675  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3676  {
3677  out3 << "WARNING:\n"
3678  << " CKDv2.4.1 CO2 continuum:\n"
3679  << " input frequency vector exceeds range of model validity\n"
3680  << " " << FCO2_ckd_mt_100_v1 << "<->" << FCO2_ckd_mt_100_v2 << "cm^-1\n";
3681  }
3682 
3683 
3684  // ---------------------- subroutine FRNCO2 ------------------------------
3685 
3686  // retrieve the appropriate array sequence of the CO2 continuum
3687  // arrays of the CKD model.
3689  Numeric V1C = V1ABS - DVC;
3690  Numeric V2C = V2ABS + DVC;
3691 
3692  int I1 = (int) ((V1C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3693  if (V1C < FCO2_ckd_mt_100_v1) I1 = -1;
3695 
3696  int I2 = (int) ((V2C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3697 
3698  int NPTC = I2-I1+3;
3699  if (NPTC > FCO2_ckd_mt_100_npt) NPTC = FCO2_ckd_mt_100_npt+1;
3700 
3701  V2C = V1C + FCO2_ckd_mt_100_dv * (Numeric)(NPTC-1);
3702 
3703  if (NPTC < 1)
3704  {
3705  out3 << "WARNING:\n"
3706  << " CKDv2.4.1 CO2 continuum:\n"
3707  << " no elements of internal continuum coefficients could be found for the\n"
3708  << " input frequency range.\n"
3709  << " Leave the function without calculating the absorption.";
3710  return;
3711  }
3712 
3713  Numeric FCO2T0[NPTC+addF77fields]; // [cm^3/molecules]
3714 
3715  for (Index J = 1 ; J <= NPTC ; ++J)
3716  {
3717  Index I = I1+J;
3718  if ( (I < 1) || (I > FCO2_ckd_mt_100_npt) )
3719  {
3720  FCO2T0[J] = 0.0e0;
3721  }
3722  else
3723  {
3724  FCO2T0[J] = FCO2_ckd_mt_100[I];
3725  }
3726  }
3727 
3728  // ---------------------- subroutine FRNCO2 ------------------------------
3729 
3730 
3731 
3732 
3733  // Loop pressure/temperature:
3734  for ( Index i = 0 ; i < n_p ; ++i )
3735  {
3736  Numeric Tave = t_abs[i]; // [K]
3737  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
3738  // FIXME Numeric vmrco2 = vmr[i]; // [1]
3739  Numeric Rhoave = (Pave/PO) * (TO/Tave); // [hPa]
3740  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3741  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3742 
3743 
3744  // Molecular cross section calculated by CKD.
3745  // The cross sectionis calculated on the predefined
3746  // CKD wavenumber grid.
3747  Numeric k[NPTC+addF77fields]; // [1/cm]
3748  k[0] = 0.00e0; // not used array field
3749  for (Index J = 1 ; J <= NPTC ; ++J)
3750  {
3751  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3752  Numeric FCO2 = FCO2T0[J];
3753 
3754  // CKD cross section times number density with radiative field [1]
3755  // the VMRCO2 will be multiplied in absCalc
3756  k[J] = ((WTOT * Rhoave) * (FCO2*1.000e-20) * RADFN_FUN(VJ,XKT));
3757 
3758  }
3759 
3760 
3761  // Loop input frequency array. The previously calculated cross section
3762  // has therefore to be interpolated on the input frequencies.
3763  for ( Index s = 0 ; s < n_f ; ++s )
3764  {
3765  // calculate the associated wave number (= 1/wavelength)
3766  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3767  if ( (V > 0.000e0) && (V < FCO2_ckd_mt_100_v2) )
3768  {
3769  // arts cross section [1/m]
3770  // interpolate the k vector on the f_mono grid
3771  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3772  }
3773  }
3774  }
3775 
3776 }
3777 
3778 
3779 // =================================================================================
3780 
3781 
3782 // CKD version MT 1.00 CO2 continuum absorption model
3809  const Numeric Cin,
3810  const String& model,
3811  ConstVectorView f_mono,
3812  ConstVectorView p_abs,
3813  ConstVectorView t_abs,
3814  ConstVectorView vmr)
3815 {
3816 
3817 
3818  // check the model name about consistency
3819  if ((model != "user") && (model != "CKDMT100"))
3820  {
3821  ostringstream os;
3822  os << "!!ERROR!!\n"
3823  << "CKD_MT.1.00 CO2 continuum:\n"
3824  << "INPUT model name is: " << model << ".\n"
3825  << "VALID model names are user and CKDMT100\n";
3826  throw runtime_error(os.str());
3827  }
3828 
3829 
3830  // scaling factor of the CO2 absorption
3831  Numeric ScalingFac = 0.0000e0;
3832  if ( model == "user" )
3833  {
3834  ScalingFac = Cin; // input scaling factor of calculated absorption
3835  }
3836  else
3837  {
3838  ScalingFac = 1.0000e0;
3839  }
3840 
3841  const Index n_p = p_abs.nelem(); // Number of pressure levels
3842  const Index n_f = f_mono.nelem(); // Number of frequencies
3843 
3844 
3845  // Check that dimensions of p_abs, t_abs, and vmr agree:
3846  assert ( n_p==t_abs.nelem() );
3847  assert ( n_p==vmr.nelem() );
3848 
3849  // Check that dimensions of xsec are consistent with n_f
3850  // and n_p. It should be [n_f,n_p]:
3851  assert ( n_f==xsec.nrows() );
3852  assert ( n_p==xsec.ncols() );
3853 
3854 
3855  // ************************** CKD stuff ************************************
3856 
3857  const Numeric xLosmt = 2.686763e19; // [molecules/cm^3]
3858  const Numeric T1 = 273.0e0;
3859  const Numeric TO = 296.0e0;
3860  const Numeric PO = 1013.0e0;
3861 
3862  // wavenumber range where CKD CO2 continuum is valid
3863  const Numeric VABS_min = FCO2_ckd_mt_100_v1; // [cm^-1]
3864  const Numeric VABS_max = FCO2_ckd_mt_100_v2; // [cm^-1]
3865 
3866 
3867  // It is assumed here that f_mono is monotonically increasing with index!
3868  // In future change this return into a change of the loop over
3869  // the frequency f_mono. n_f_new < n_f
3870  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3871  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3872  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
3873  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
3874  {
3875  out3 << "WARNING:\n"
3876  << " CKD_MT 1.00 CO2 continuum:\n"
3877  << " input frequency vector exceeds range of model validity\n"
3878  << " " << FCO2_ckd_mt_100_v1 << "<->" << FCO2_ckd_mt_100_v2 << "cm^-1\n";
3879  }
3880 
3881 
3882  // ---------------------- subroutine FRNCO2 ------------------------------
3883 
3884  // retrieve the appropriate array sequence of the CO2 continuum
3885  // arrays of the CKD model.
3887  Numeric V1C = V1ABS - DVC;
3888  Numeric V2C = V2ABS + DVC;
3889 
3890  int I1 = (int) ((V1C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3891  if (V1C < FCO2_ckd_mt_100_v1) I1 = -1;
3893 
3894  int I2 = (int) ((V2C-FCO2_ckd_mt_100_v1) / FCO2_ckd_mt_100_dv);
3895 
3896  int NPTC = I2-I1+3;
3897  if (NPTC > FCO2_ckd_mt_100_npt) NPTC = FCO2_ckd_mt_100_npt+1;
3898 
3899  V2C = V1C + FCO2_ckd_mt_100_dv * (Numeric)(NPTC-1);
3900 
3901  if (NPTC < 1)
3902  {
3903  out3 << "WARNING:\n"
3904  << " CKD_MT 1.00 CO2 continuum:\n"
3905  << " no elements of internal continuum coefficients could be found for the\n"
3906  << " input frequency range.\n"
3907  << " Leave the function without calculating the absorption.";
3908  return;
3909  }
3910 
3911  Numeric FCO2T0[NPTC+addF77fields]; // [cm^3/molecules]
3912 
3913  for (Index J = 1 ; J <= NPTC ; ++J)
3914  {
3915  Index I = I1+J;
3916  if ( (I < 1) || (I > FCO2_ckd_mt_100_npt) )
3917  {
3918  FCO2T0[J] = 0.0e0;
3919  }
3920  else
3921  {
3922  FCO2T0[J] = FCO2_ckd_mt_100[I];
3923  }
3924  }
3925 
3926  // ---------------------- subroutine FRNCO2 ------------------------------
3927 
3928 
3929 
3930 
3931  // Loop pressure/temperature:
3932  for ( Index i = 0 ; i < n_p ; ++i )
3933  {
3934  Numeric Tave = t_abs[i]; // [K]
3935  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
3936  // FIXME Numeric vmrco2 = vmr[i]; // [1]
3937  Numeric Rhoave = (Pave/PO) * (TO/Tave); // [hPa]
3938  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
3939  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
3940 
3941 
3942  // Molecular cross section calculated by CKD.
3943  // The cross sectionis calculated on the predefined
3944  // CKD wavenumber grid.
3945  Numeric k[NPTC+addF77fields]; // [1/cm]
3946  k[0] = 0.00e0; // not used array field
3947  for (Index J = 1 ; J <= NPTC ; ++J)
3948  {
3949  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
3950  Numeric FCO2 = FCO2T0[J];
3951 
3952  // continuum has been increased in the nu2 band by a factor of 7
3953  if ( (VJ > 500.0e0) && (VJ < 900.0e0) )
3954  {
3955  FCO2 = 7.000e0 * FCO2;
3956  }
3957 
3958  // CKD cross section times number density with radiative field [1]
3959  // the VMRCO2 will be multiplied in absCalc
3960  k[J] = ((WTOT * Rhoave) * (FCO2*1.000e-20) * RADFN_FUN(VJ,XKT));
3961 
3962  }
3963 
3964 
3965  // Loop input frequency array. The previously calculated cross section
3966  // has therefore to be interpolated on the input frequencies.
3967  for ( Index s = 0 ; s < n_f ; ++s )
3968  {
3969  // calculate the associated wave number (= 1/wavelength)
3970  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
3971  if ( (V > 0.000e0) && (V < FCO2_ckd_mt_100_v2) )
3972  {
3973  // arts cross section [1/m]
3974  // interpolate the k vector on the f_mono grid
3975  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
3976  }
3977  }
3978  }
3979 
3980 }
3981 
3982 
3983 // =================================================================================
3984 // CKD version MT 1.00 N2-N2 collision induced absorption (rotational band)
3985 // Model reference:
3986 // Borysow, A, and L. Frommhold,
3987 // "Collision-induced rototranslational absorption spectra of N2-N2
3988 // pairs for temperatures from 50 to 300 K", The
3989 // Astrophysical Journal, 311, 1043-1057, 1986.
4021  const Numeric Cin,
4022  const String& model,
4023  ConstVectorView f_mono,
4024  ConstVectorView p_abs,
4025  ConstVectorView t_abs,
4026  ConstVectorView vmr )
4027 {
4028 
4029  // check the model name about consistency
4030  if ((model != "user") && (model != "CKDMT100"))
4031  {
4032  ostringstream os;
4033  os << "!!ERROR!!\n"
4034  << "CKD_MT1.00 N2 CIA rotational band:\n"
4035  << "INPUT model name is: " << model << ".\n"
4036  << "VALID model names are user and CKDMT100\n";
4037  throw runtime_error(os.str());
4038  }
4039 
4040 
4041  // scaling factor of the N2-N2 CIA rot. band absorption
4042  Numeric ScalingFac = 0.0000e0;
4043  if ( model == "user" )
4044  {
4045  ScalingFac = Cin; // input scaling factor of calculated absorption
4046  }
4047  else
4048  {
4049  ScalingFac = 1.0000e0;
4050  }
4051 
4052  const Index n_p = p_abs.nelem(); // Number of pressure levels
4053  const Index n_f = f_mono.nelem(); // Number of frequencies
4054 
4055 
4056  // Check that dimensions of p_abs, t_abs, and vmr agree:
4057  assert ( n_p==t_abs.nelem() );
4058  assert ( n_p==vmr.nelem() );
4059 
4060  // Check that dimensions of xsec are consistent with n_f
4061  // and n_p. It should be [n_f,n_p]:
4062  assert ( n_f==xsec.nrows() );
4063  assert ( n_p==xsec.ncols() );
4064 
4065 
4066  // ************************** CKD stuff ************************************
4067 
4068  // FIXME const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4069  const Numeric T1 = 273.0e0;
4070  const Numeric TO = 296.0e0;
4071  const Numeric PO = 1013.0e0;
4072 
4073 
4074  // wavenumber range where CKD H2O self continuum is valid
4075  const Numeric VABS_min = -1.000e1; // [cm^-1]
4076  const Numeric VABS_max = 3.500e2; // [cm^-1]
4077 
4078 
4079  // It is assumed here that f_mono is monotonically increasing with index!
4080  // In future change this return into a change of the loop over
4081  // the frequency f_mono. n_f_new < n_f
4082  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4083  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4084  if ( (V1ABS < VABS_min) || (V1ABS > VABS_max) ||
4085  (V2ABS < VABS_min) || (V2ABS > VABS_max) )
4086  {
4087  out3 << "WARNING:\n"
4088  << " CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4089  << " input frequency vector exceeds range of model validity\n"
4090  << " " << N2N2_CT296_ckd_mt_100_v1 << "<->" << N2N2_CT220_ckd_mt_100_v2 << "cm^-1\n";
4091  }
4092 
4093 
4094  // ------------------- subroutine N2R296/N2R220 ----------------------------
4095 
4097  {
4098  ostringstream os;
4099  os << "!!ERROR!!\n"
4100  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4101  << "parameter V1 not the same for different ref. temperatures.\n";
4102  throw runtime_error(os.str());
4103  }
4105  {
4106  ostringstream os;
4107  os << "!!ERROR!!\n"
4108  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4109  << "parameter V2 not the same for different ref. temperatures.\n";
4110  throw runtime_error(os.str());
4111  }
4113  {
4114  ostringstream os;
4115  os << "!!ERROR!!\n"
4116  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4117  << "parameter DV not the same for different ref. temperatures.\n";
4118  throw runtime_error(os.str());
4119  }
4121  {
4122  ostringstream os;
4123  os << "!!ERROR!!\n"
4124  << "CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4125  << "parameter NPT not the same for different ref. temperatures.\n";
4126  throw runtime_error(os.str());
4127  }
4128 
4129  // retrieve the appropriate array sequence of the self continuum
4130  // arrays of the CKD model.
4132  Numeric V1C = V1ABS - DVC;
4133  Numeric V2C = V2ABS + DVC;
4134 
4135  int I1 = (int) ((V1C-N2N2_CT296_ckd_mt_100_v1) / N2N2_CT296_ckd_mt_100_dv);
4136  if (V1C < N2N2_CT296_ckd_mt_100_v1) I1 = -1;
4138 
4139  int I2 = (int) ((V2C-N2N2_CT296_ckd_mt_100_v1) / N2N2_CT296_ckd_mt_100_dv);
4140 
4141  int NPTC = I2-I1+3;
4143 
4144  V2C = V1C + N2N2_CT296_ckd_mt_100_dv * (Numeric)(NPTC-1);
4145 
4146  if (NPTC < 1)
4147  {
4148  out3 << "WARNING:\n"
4149  << " CKD_MT 1.00 N2-N2 CIA rotational band:\n"
4150  << " no elements of internal continuum coefficients could be found for the\n"
4151  << " input frequency range.\n"
4152  << " Leave the function without calculating the absorption.\n";
4153  return;
4154  }
4155 
4156  Numeric C0[NPTC+addF77fields]; // [cm^3/molecules]
4157  Numeric C1[NPTC+addF77fields]; // [cm^3/molecules]
4158 
4159  for (Index J = 1 ; J <= NPTC ; ++J)
4160  {
4161  Index I = I1+J;
4162  if ( (I < 1) || (I > N2N2_CT296_ckd_mt_100_npt) )
4163  {
4164  C0[J] = 0.0e0; // at T=296 K
4165  C1[J] = 0.0e0; // at T=260 K
4166  }
4167  else
4168  {
4169  C0[J] = N2N2_CT296_ckd_mt_100[I]; // at T=296 K
4170  C1[J] = N2N2_CT220_ckd_mt_100[I]; // at T=260 K
4171  }
4172  }
4173 
4174  // ------------------- subroutine N2R296/N2R220 ----------------------------
4175 
4176 
4177 
4178 
4179  // Loop pressure/temperature:
4180  for ( Index i = 0 ; i < n_p ; ++i )
4181  {
4182  Numeric Tave = t_abs[i]; // [K]
4183  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
4184  Numeric vmrn2 = vmr[i]; // [1]
4185  Numeric facfac = vmrn2 * (Pave/PO) * (Pave/PO) *
4186  (T1/Tave) * (T1/Tave);
4187 
4188  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
4189  Numeric Tfac = (Tave - TO) / (220.0e0 - TO);
4190 
4191  // Molecular cross section calculated by CKD.
4192  // The cross sectionis calculated on the predefined
4193  // CKD wavenumber grid.
4194  Numeric k[NPTC+addF77fields]; // [1/cm]
4195  k[0] = 0.00e0; // not used array field
4196  for (Index J = 1 ; J <= NPTC ; ++J)
4197  {
4198  k[J] = 0.000e0;
4199  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4200  Numeric SN2 = 0.000e0;
4201  if ( (C0[J] > 0.000e0) && (C1[J] > 0.000e0) )
4202  {
4203  SN2 = facfac* C0[J] * pow( (C1[J]/C0[J]), Tfac );
4204  }
4205 
4206  // CKD cross section with radiative field
4207  k[J] = SN2 * RADFN_FUN(VJ,XKT); // [1]
4208  }
4209 
4210 
4211  // Loop input frequency array. The previously calculated cross section
4212  // has therefore to be interpolated on the input frequencies.
4213  for ( Index s = 0 ; s < n_f ; ++s )
4214  {
4215  // calculate the associated wave number (= 1/wavelength)
4216  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4217  if ( (V > 0.000e0) && (V < N2N2_CT220_ckd_mt_100_v2) )
4218  {
4219  // arts cross section [1/m]
4220  // interpolate the k vector on the f_mono grid
4221  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4222  }
4223  }
4224  }
4225 
4226 }
4227 
4228 // =================================================================================
4229 
4230 // CKD version MT 1.00 N2-N2 collision induced absorption (fundamental band)
4231 // Model reference:
4232 // version_1 of the Nitrogen Collision Induced Fundamental
4233 // Lafferty, W.J., A.M. Solodov,A. Weber, W.B. Olson and
4234 // J._M. Hartmann, Infrared collision-induced absorption by
4235 // N2 near 4.3 microns for atmospheric applications:
4236 // Measurements and emprirical modeling, Appl. Optics, 35,
4237 // 5911-5917, (1996).
4272  const Numeric Cin,
4273  const String& model,
4274  ConstVectorView f_mono,
4275  ConstVectorView p_abs,
4276  ConstVectorView t_abs,
4277  ConstVectorView vmr )
4278 {
4279 
4280  // check the model name about consistency
4281  if ((model != "user") && (model != "CKDMT100"))
4282  {
4283  ostringstream os;
4284  os << "!!ERROR!!\n"
4285  << "CKD_MT1.00 N2 CIA fundamental band:\n"
4286  << "INPUT model name is: " << model << ".\n"
4287  << "VALID model names are user and CKDMT100\n";
4288  throw runtime_error(os.str());
4289  }
4290 
4291 
4292  // scaling factor of the N2-N2 CIA fundamental band absorption
4293  Numeric ScalingFac = 1.0000e0;
4294  if ( model == "user" )
4295  {
4296  ScalingFac = Cin; // input scaling factor of calculated absorption
4297  }
4298 
4299 
4300  const Index n_p = p_abs.nelem(); // Number of pressure levels
4301  const Index n_f = f_mono.nelem(); // Number of frequencies
4302 
4303 
4304  // Check that dimensions of p_abs, t_abs, and vmr agree:
4305  assert ( n_p==t_abs.nelem() );
4306  assert ( n_p==vmr.nelem() );
4307 
4308  // Check that dimensions of xsec are consistent with n_f
4309  // and n_p. It should be [n_f,n_p]:
4310  assert ( n_f==xsec.nrows() );
4311  assert ( n_p==xsec.ncols() );
4312 
4313 
4314  // ************************** CKD stuff ************************************
4315 
4316  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4317  const Numeric T1 = 273.0e0;
4318  const Numeric TO = 296.0e0;
4319  const Numeric PO = 1013.0e0;
4320  const Numeric a1 = 0.8387e0;
4321  const Numeric a2 = 0.0754e0;
4322 
4323 
4324  // It is assumed here that f_mono is monotonically increasing with index!
4325  // In future change this return into a change of the loop over
4326  // the frequency f_mono. n_f_new < n_f
4327  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4328  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4329  if ( (V1ABS < N2N2_N2F_ckd_mt_100_v1) || (V1ABS > N2N2_N2F_ckd_mt_100_v2) ||
4330  (V2ABS < N2N2_N2F_ckd_mt_100_v1) || (V2ABS > N2N2_N2F_ckd_mt_100_v2) )
4331  {
4332  out3 << "WARNING:\n"
4333  << " CKD_MT 1.00 N2-N2 CIA fundamental band:\n"
4334  << " input frequency vector exceeds range of model validity\n"
4335  << " " << N2N2_N2F_ckd_mt_100_v1 << "<->" << N2N2_N2F_ckd_mt_100_v2 << "cm^-1\n";
4336  }
4337 
4338 
4339  // ------------------- subroutine N2_VER_1 ----------------------------
4340 
4341  // retrieve the appropriate array sequence of the self continuum
4342  // arrays of the CKD model.
4344  Numeric V1C = V1ABS - DVC;
4345  Numeric V2C = V2ABS + DVC;
4346 
4347  int I1 = (int) ((V1C-N2N2_N2F_ckd_mt_100_v1) / N2N2_N2F_ckd_mt_100_dv);
4348  if (V1C < N2N2_N2F_ckd_mt_100_v1) I1 = -1;
4350 
4351  int I2 = (int) ((V2C-N2N2_N2F_ckd_mt_100_v1) / N2N2_N2F_ckd_mt_100_dv);
4352 
4353  int NPTC = I2-I1+3;
4354  if (NPTC > N2N2_N2F_ckd_mt_100_npt) NPTC = N2N2_N2F_ckd_mt_100_npt+1;
4355 
4356  V2C = V1C + N2N2_N2F_ckd_mt_100_dv * (Numeric)(NPTC-1);
4357 
4358  if (NPTC < 1)
4359  {
4360  out3 << "WARNING:\n"
4361  << " CKD_MT 1.00 N2-N2 CIA fundamental band:\n"
4362  << " no elements of internal continuum coefficients could be found for the\n"
4363  << " input frequency range.\n";
4364  return;
4365  }
4366 
4367  Numeric xn2[NPTC+addF77fields];
4368  Numeric xn2t[NPTC+addF77fields];
4369 
4370  for (Index J = 1 ; J <= NPTC ; ++J)
4371  {
4372  xn2[J] = 0.000e0;
4373  xn2t[J] = 0.000e0;
4374  Index I = I1+J;
4375  if ( (I > 0) && (I <= N2N2_N2F_ckd_mt_100_npt) )
4376  {
4377  xn2[J] = N2N2_N2F_ckd_mt_100[I];
4378  xn2t[J] = N2N2_N2Ft_ckd_mt_100[I];
4379  }
4380  }
4381 
4382  // ------------------- subroutine N2_VER_1 ----------------------------
4383 
4384 
4385 
4386 
4387  // Loop pressure/temperature:
4388  for ( Index i = 0 ; i < n_p ; ++i )
4389  {
4390  Numeric Tave = t_abs[i]; // [K]
4391  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
4392  Numeric vmrn2 = vmr[i]; // [1]
4393  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
4394  Numeric tau_fac= WTOT * (Pave/PO) * (T1/Tave);
4395 
4396  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B) / (h*c)
4397 
4398  // FIXME Numeric Tfac = (Tave - TO) / (220.0e0 - TO); // [1]
4399  Numeric xktfac = (1.000e0/TO) - (1.000e0/Tave); // [1/K]
4400  Numeric factor = 0.000e0;
4401  if (vmrn2 > VMRCalcLimit)
4402  {
4403  factor = (1.000e0 / xLosmt) * (1.000e0/vmrn2) * (a1 - a2*(Tave/TO));
4404  }
4405 
4406  // Molecular cross section calculated by CKD.
4407  // The cross sectionis calculated on the predefined
4408  // CKD wavenumber grid.
4409  Numeric k[NPTC+addF77fields]; // [1/cm]
4410  k[0] = 0.000e0; // not used array field
4411  for (Index J = 1 ; J <= NPTC ; ++J)
4412  {
4413  k[J] = 0.000e0;
4414  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4415  Numeric SN2 = 0.000e0;
4416  if (xn2[J] > 0.000e0)
4417  {
4418  Numeric C0 = factor * xn2[J] * exp(xn2t[J]*xktfac) / VJ;
4419  SN2 = tau_fac * C0;
4420  }
4421 
4422  // CKD cross section with radiative field
4423  k[J] = SN2 * RADFN_FUN(VJ,XKT); // [1/cm]
4424  }
4425 
4426 
4427  // Loop input frequency array. The previously calculated cross section
4428  // has therefore to be interpolated on the input frequencies.
4429  for ( Index s = 0 ; s < n_f ; ++s )
4430  {
4431  // calculate the associated wave number (= 1/wavelength)
4432  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4433  if ( (V > N2N2_N2F_ckd_mt_100_v1) && (V < N2N2_N2F_ckd_mt_100_v2) )
4434  {
4435  // arts cross section [1/m]
4436  // interpolate the k vector on the f_mono grid
4437  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4438  }
4439  }
4440  }
4441 
4442 }
4443 
4444 // =================================================================================
4445 
4446 // CKD version MT 1.00 O2-O2 collision induced absorption (fundamental band)
4447 // Model reference:
4448 // F. Thibault, V. Menoux, R. Le Doucen, L. Rosenman,
4449 // J.-M. Hartmann, Ch. Boulet,
4450 // "Infrared collision-induced absorption by O2 near 6.4 microns for
4451 // atmospheric applications: measurements and emprirical modeling",
4452 // Appl. Optics, 35, 5911-5917, (1996).
4485  const Numeric Cin,
4486  const String& model,
4487  ConstVectorView f_mono,
4488  ConstVectorView p_abs,
4489  ConstVectorView t_abs,
4490  ConstVectorView vmr )
4491 {
4492 
4493  // check the model name about consistency
4494  if ((model != "user") && (model != "CKDMT100"))
4495  {
4496  ostringstream os;
4497  os << "!!ERROR!!\n"
4498  << "CKD_MT1.00 O2 CIA fundamental band:\n"
4499  << "INPUT model name is: " << model << ".\n"
4500  << "VALID model names are user and CKDMT100\n";
4501  throw runtime_error(os.str());
4502  }
4503 
4504 
4505  // scaling factor of the O2-O2 CIA fundamental band absorption
4506  Numeric ScalingFac = 1.0000e0;
4507  if ( model == "user" )
4508  {
4509  ScalingFac = Cin; // input scaling factor of calculated absorption
4510  }
4511 
4512 
4513  const Index n_p = p_abs.nelem(); // Number of pressure levels
4514  const Index n_f = f_mono.nelem(); // Number of frequencies
4515 
4516 
4517  // Check that dimensions of p_abs, t_abs, and vmr agree:
4518  assert ( n_p==t_abs.nelem() );
4519  assert ( n_p==vmr.nelem() );
4520 
4521  // Check that dimensions of xsec are consistent with n_f
4522  // and n_p. It should be [n_f,n_p]:
4523  assert ( n_f==xsec.nrows() );
4524  assert ( n_p==xsec.ncols() );
4525 
4526 
4527  // ************************** CKD stuff ************************************
4528 
4529  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4530  const Numeric T1 = 273.0e0;
4531  const Numeric TO = 296.0e0;
4532  const Numeric PO = 1013.0e0;
4533 
4534 
4535  // It is assumed here that f_mono is monotonically increasing with index!
4536  // In future change this return into a change of the loop over
4537  // the frequency f_mono. n_f_new < n_f
4538  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4539  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4540  if ( (V1ABS < O2O2_O2F_ckd_mt_100_v1) || (V1ABS > O2O2_O2F_ckd_mt_100_v2) ||
4541  (V2ABS < O2O2_O2F_ckd_mt_100_v1) || (V2ABS > O2O2_O2F_ckd_mt_100_v2) )
4542  {
4543  out3 << "WARNING:\n"
4544  << " CKD_MT 1.00 O2-O2 CIA fundamental band:\n"
4545  << " input frequency vector exceeds range of model validity\n"
4546  << " " << O2O2_O2F_ckd_mt_100_v1 << "<->" << O2O2_O2F_ckd_mt_100_v2 << "cm^-1\n";
4547  }
4548 
4549 
4550  // ------------------- subroutine O2_VER_1 ----------------------------
4551 
4552  // retrieve the appropriate array sequence of the CKD model array.
4554  Numeric V1C = V1ABS - DVC;
4555  Numeric V2C = V2ABS + DVC;
4556 
4557  int I1 = (int) ((V1C-O2O2_O2F_ckd_mt_100_v1) / O2O2_O2F_ckd_mt_100_dv);
4558  if (V1C < O2O2_O2F_ckd_mt_100_v1) I1 = -1;
4560 
4561  int I2 = (int) ((V2C-O2O2_O2F_ckd_mt_100_v1) / O2O2_O2F_ckd_mt_100_dv);
4562 
4563  int NPTC = I2-I1+3;
4564  if (NPTC > O2O2_O2F_ckd_mt_100_npt) NPTC = O2O2_O2F_ckd_mt_100_npt+1;
4565 
4566  V2C = V1C + O2O2_O2F_ckd_mt_100_dv * (Numeric)(NPTC-1);
4567 
4568  if (NPTC < 1)
4569  {
4570  out3 << "WARNING:\n"
4571  << " CKD_MT 1.00 O2 CIA fundamental band:\n"
4572  << " no elements of internal continuum coefficients could be found for the\n"
4573  << " input frequency range.\n"
4574  << " Leave the function without calculating the absorption.\n";
4575  return;
4576  }
4577 
4578  Numeric xo2[NPTC+addF77fields];
4579  Numeric xo2t[NPTC+addF77fields];
4580 
4581  for (Index J = 1 ; J <= NPTC ; ++J)
4582  {
4583  xo2[J] = 0.000e0;
4584  xo2t[J] = 0.000e0;
4585  Index I = I1+J;
4586  if ( (I > 0) && (I <= O2O2_O2F_ckd_mt_100_npt) )
4587  {
4588  xo2[J] = O2O2_O2Fo_ckd_mt_100[I];
4589  xo2t[J] = O2O2_O2Ft_ckd_mt_100[I];
4590  }
4591  }
4592 
4593  // ------------------- subroutine O2_VER_1 ----------------------------
4594 
4595 
4596 
4597 
4598  // Loop pressure/temperature:
4599  for ( Index i = 0 ; i < n_p ; ++i )
4600  {
4601  Numeric Tave = t_abs[i]; // [K]
4602  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
4603  // FIXME Numeric vmro2 = vmr[i]; // [1]
4604  Numeric WTOT = xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
4605  Numeric tau_fac= WTOT * (Pave/PO) * (T1/Tave);
4606 
4607  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
4608 
4609  Numeric xktfac = (1.000e0/TO) - (1.000e0/Tave); // [1/K]
4610  Numeric factor = (1.000e0 / xLosmt);
4611 
4612  // Molecular cross section calculated by CKD.
4613  // The cross sectionis calculated on the predefined
4614  // CKD wavenumber grid.
4615  Numeric k[NPTC+addF77fields]; // [1/cm]
4616  k[0] = 0.00e0; // not used array field
4617  for (Index J = 1 ; J <= NPTC ; ++J)
4618  {
4619  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4620  Numeric SO2 = 0.0e0;
4621  if (xo2[J] > 0.0e0)
4622  {
4623  Numeric C0 = factor * xo2[J] * exp(xo2t[J]*xktfac) / VJ;
4624  SO2 = tau_fac * C0;
4625  }
4626 
4627  // CKD cross section without radiative field
4628  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1]
4629  }
4630 
4631 
4632  // Loop input frequency array. The previously calculated cross section
4633  // has therefore to be interpolated on the input frequencies.
4634  for ( Index s = 0 ; s < n_f ; ++s )
4635  {
4636  // calculate the associated wave number (= 1/wavelength)
4637  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4638  if ( (V > O2O2_O2F_ckd_mt_100_v1) && (V < O2O2_O2F_ckd_mt_100_v2) )
4639  {
4640  // arts cross section [1/m]
4641  // interpolate the k vector on the f_mono grid
4642  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4643  }
4644  }
4645  }
4646 
4647 }
4648 
4649 // =================================================================================
4650 
4651 // CKD version MT 1.00 O2 v0<-v0 band absorption
4652 // Model reference:
4653 // CKD_MT 1.00 implementation of oxygen collision induced fundamental model of
4654 // O2 continuum formulated by
4655 // Mate et al. over the spectral region 7550-8486 cm-1:
4656 // B. Mate, C. Lugez, G.T. Fraser, W.J. Lafferty,
4657 // "Absolute Intensities for the O2 1.27 micron
4658 // continuum absorption",
4659 // J. Geophys. Res., 104, 30,585-30,590, 1999.
4660 //
4661 // The units of these continua coefficients are 1 / (amagat_O2*amagat_air)
4662 //
4663 // Also, refer to the paper "Observed Atmospheric
4664 // Collision Induced Absorption in Near Infrared Oxygen Bands",
4665 // Mlawer, Clough, Brown, Stephen, Landry, Goldman, & Murcray,
4666 // Journal of Geophysical Research (1997).
4706  const Numeric Cin,
4707  const String& model,
4708  ConstVectorView f_mono,
4709  ConstVectorView p_abs,
4710  ConstVectorView t_abs,
4711  ConstVectorView vmr,
4712  ConstVectorView n2_abs)
4713 {
4714 
4715 
4716  // check the model name about consistency
4717  if ((model != "user") && (model != "CKDMT100"))
4718  {
4719  ostringstream os;
4720  os << "!!ERROR!!\n"
4721  << "CKD_MT1.00 O2 band at 1.27 micrometer:\n"
4722  << "INPUT model name is: " << model << ".\n"
4723  << "VALID model names are user and CKDMT100\n";
4724  throw runtime_error(os.str());
4725  }
4726 
4727 
4728  // scaling factor of the O2 v0<-v0 band absorption
4729  Numeric ScalingFac = 1.0000e0;
4730  if ( model == "user" )
4731  {
4732  ScalingFac = Cin; // input scaling factor of calculated absorption
4733  };
4734 
4735  const Index n_p = p_abs.nelem(); // Number of pressure levels
4736  const Index n_f = f_mono.nelem(); // Number of frequencies
4737 
4738 
4739  // Check that dimensions of p_abs, t_abs, and vmr agree:
4740  assert ( n_p==t_abs.nelem() );
4741  assert ( n_p==vmr.nelem() );
4742 
4743  // Check that dimensions of xsec are consistent with n_f
4744  // and n_p. It should be [n_f,n_p]:
4745  assert ( n_f==xsec.nrows() );
4746  assert ( n_p==xsec.ncols() );
4747 
4748 
4749  // ************************** CKD stuff ************************************
4750 
4751  // FIXME const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4752  const Numeric T1 = 273.0e0;
4753  // FIXME const Numeric TO = 296.0e0;
4754  const Numeric PO = 1013.0e0;
4755 
4756  // It is assumed here that f_mono is monotonically increasing with index!
4757  // In future change this return into a change of the loop over
4758  // the frequency f_mono. n_f_new < n_f
4759  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4760  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4761  if ( (V1ABS < O2_00_ckd_mt_100_v1) || (V1ABS > O2_00_ckd_mt_100_v2) ||
4762  (V2ABS < O2_00_ckd_mt_100_v1) || (V2ABS > O2_00_ckd_mt_100_v2) )
4763  {
4764  out3 << "WARNING:\n"
4765  << " CKD_MT 1.00 O2 v0<-v0 band:\n"
4766  << " input frequency vector exceeds range of model validity\n"
4767  << " " << O2_00_ckd_mt_100_v1 << "<->" << O2_00_ckd_mt_100_v2 << "cm^-1\n";
4768  }
4769 
4770 
4771  // ------------------- subroutine O2INF1 ----------------------------
4772 
4773  // retrieve the appropriate array sequence of the CKD model array.
4775  Numeric V1C = V1ABS - DVC;
4776  Numeric V2C = V2ABS + DVC;
4777 
4778  int I1 = (int) ((V1C-O2_00_ckd_mt_100_v1) / O2_00_ckd_mt_100_dv);
4779  if (V1C < O2_00_ckd_mt_100_v1) I1 = I1-1;
4781 
4782  int I2 = (int) ((V2C-O2_00_ckd_mt_100_v1) / O2_00_ckd_mt_100_dv);
4783 
4784  int NPTC = I2-I1+3;
4785 
4786  V2C = V1C + O2_00_ckd_mt_100_dv * (Numeric)(NPTC-1);
4787 
4788  if (NPTC < 1)
4789  {
4790  out3 << "WARNING:\n"
4791  << " CKD_MT 1.00 O2 v0<-v0 band:\n"
4792  << " no elements of internal continuum coefficients could be found for the\n"
4793  << " input frequency range.\n"
4794  << " Leave the function without calculating the absorption.\n";
4795  return;
4796  }
4797 
4798  Numeric CO[(int)(NPTC+addF77fields)];
4799 
4800 
4801  for (Index J = 1 ; J <= NPTC ; ++J)
4802  {
4803  CO[J] = 0.000e0;
4804  Index I = I1+J;
4805  if ( (I > 0) && (I <= O2_00_ckd_mt_100_npt) )
4806  {
4807  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4808  CO[J] = O2_00_ckd_mt_100[I] / VJ;
4809  }
4810  }
4811 
4812  // ------------------- subroutine O2INF1 ----------------------------
4813 
4814 
4815 
4816 
4817  // Loop pressure/temperature:
4818  for ( Index i = 0 ; i < n_p ; ++i )
4819  {
4820  Numeric Tave = t_abs[i]; // [K]
4821  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
4822  Numeric vmro2 = vmr[i]; // [1]
4823  Numeric vmrn2 = n2_abs[i]; // [1]
4824  Numeric ADJWO2 = (vmro2 + 0.300e0*vmrn2) / 0.446e0 *
4825  (Pave/PO) * (Pave/PO) * (T1/Tave) * (T1/Tave);
4826  Numeric XKT = Tave / 1.4387752e0; // = (T*k_B) / (h*c)
4827 
4828  // Molecular cross section calculated by CKD.
4829  // The cross sectionis calculated on the predefined
4830  // CKD wavenumber grid. The abs. coeff. is then the
4831  // cross section times the number density.
4832  Numeric k[NPTC+addF77fields]; // [1/cm]
4833  k[0] = 0.00e0; // not used array field
4834  for (Index J = 1 ; J <= NPTC ; ++J)
4835  {
4836  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
4837  Numeric SO2 = 0.0e0;
4838  if (CO[J] > 0.0e0)
4839  {
4840  SO2 = ADJWO2 * CO[J];
4841  }
4842 
4843  // CKD (cross section * number density) with radiative field
4844  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1/cm]
4845  }
4846 
4847 
4848  // Loop input frequency array. The previously calculated cross section
4849  // has therefore to be interpolated on the input frequencies.
4850  for ( Index s = 0 ; s < n_f ; ++s )
4851  {
4852  // calculate the associated wave number (= 1/wavelength)
4853  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4854  if ( (V > O2_00_ckd_mt_100_v1) && (V < O2_00_ckd_mt_100_v2) )
4855  {
4856  // arts cross section [1/m]
4857  // interpolate the k vector on the f_mono grid
4858  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
4859  }
4860  }
4861  }
4862 
4863 }
4864 
4865 // =================================================================================
4866 
4867 // CKD version MT 1.00 O2 v1<-v0 band absorption
4868 // Model reference:
4869 // CKD_MT 1.00 implementation of oxygen v1<-v0 band model of
4870 // Mlawer, Clough, Brown, Stephen, Landry, Goldman, Murcray,
4871 // "Observed Atmospheric Collision Induced Absorption in Near Infrared Oxygen Bands",
4872 // Journal of Geophysical Research, vol 103, no. D4, pp. 3859-3863, 1998.
4911  const Numeric Cin,
4912  const String& model,
4913  ConstVectorView f_mono,
4914  ConstVectorView p_abs,
4915  ConstVectorView t_abs,
4916  ConstVectorView vmr )
4917 {
4918 
4919  // check the model name about consistency
4920  if ((model != "user") && (model != "CKDMT100"))
4921  {
4922  ostringstream os;
4923  os << "!!ERROR!!\n"
4924  << "CKD_MT1.00 O2 band at 1.06 micrometer:\n"
4925  << "INPUT model name is: " << model << ".\n"
4926  << "VALID model names are user and CKDMT100\n";
4927  throw runtime_error(os.str());
4928  }
4929 
4930 
4931  // scaling factor of the O2 v1<-v0 band absorption
4932  Numeric ScalingFac = 1.0000e0;
4933  if ( model == "user" )
4934  {
4935  ScalingFac = Cin; // input scaling factor of calculated absorption
4936  };
4937 
4938  const Index n_p = p_abs.nelem(); // Number of pressure levels
4939  const Index n_f = f_mono.nelem(); // Number of frequencies
4940 
4941 
4942  // Check that dimensions of p_abs, t_abs, and vmr agree:
4943  assert ( n_p==t_abs.nelem() );
4944  assert ( n_p==vmr.nelem() );
4945 
4946  // Check that dimensions of xsec are consistent with n_f
4947  // and n_p. It should be [n_f,n_p]:
4948  assert ( n_f==xsec.nrows() );
4949  assert ( n_p==xsec.ncols() );
4950 
4951 
4952  // ************************** CKD stuff ************************************
4953 
4954  const Numeric xLosmt = 2.686763e19; // Loschmidt Number [molecules/cm^3]
4955  const Numeric T1 = 273.0e0;
4956  const Numeric TO = 296.0e0;
4957  const Numeric PO = 1013.0e0;
4958  // FIXME const Numeric vmr_argon = 9.000e-3; // VMR of argon is assumed to be const.
4959 
4960 
4961  // CKD_MT 1.00 implementation of oxygen v1<-v0 band model of
4962  // Mlawer, Clough, Brown, Stephen, Landry, Goldman, Murcray,
4963  // "Observed Atmospheric Collision Induced Absorption in Near Infrared Oxygen Bands",
4964  // Journal of Geophysical Research, vol 103, no. D4, pp. 3859-3863, 1998.
4965  const Numeric V1S = O2_10_ckd_mt_100_v1;
4966  const Numeric V2S = O2_10_ckd_mt_100_v2;
4967  const Numeric DVS = O2_10_ckd_mt_100_dv;
4968  const Numeric V1_osc = 9375.000e0;
4969  const Numeric HW1 = 58.960e0;
4970  const Numeric V2_osc = 9439.000e0;
4971  const Numeric HW2 = 45.040e0;
4972  const Numeric S1 = 1.166e-4;
4973  const Numeric S2 = 3.086e-5;
4974 
4975 
4976  // It is assumed here that f_mono is monotonically increasing with index!
4977  // In future change this return into a change of the loop over
4978  // the frequency f_mono. n_f_new < n_f
4979  Numeric V1ABS = f_mono[0] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4980  Numeric V2ABS = f_mono[n_f-1] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
4981  if ( (V1ABS < O2_10_ckd_mt_100_v1) || (V1ABS > O2_10_ckd_mt_100_v2) ||
4982  (V2ABS < O2_10_ckd_mt_100_v1) || (V2ABS > O2_10_ckd_mt_100_v2) )
4983  {
4984  out3 << "WARNING:\n"
4985  << " CKD_MT 1.00 O2 v1<-v0 band:\n"
4986  << " input frequency vector exceeds range of model validity\n"
4987  << " " << O2_10_ckd_mt_100_v1 << "<->" << O2_10_ckd_mt_100_v2 << "cm^-1\n";
4988  }
4989 
4990 
4991  // ------------------- subroutine O2INF2 ----------------------------
4992 
4993  // retrieve the appropriate array sequence of the CKD model array.
4994  Numeric DVC = DVS;
4995  Numeric V1C = V1ABS - DVC;
4996  Numeric V2C = V2ABS + DVC;
4997 
4998  int NPTC = (int)( ((V2C-V1C)/DVC) + 3 );
4999 
5000  V2C = V1C + ( DVC * (Numeric)(NPTC-1) );
5001 
5002  if (NPTC < 1)
5003  {
5004  out3 << "WARNING:\n"
5005  << " CKD_MT 1.00 O2 v1<-v0 band:\n"
5006  << " no elements of internal continuum coefficients could be found for the\n"
5007  << " input frequency range.\n"
5008  << " Leave the function without calculating the absorption.\n";
5009  return;
5010  }
5011 
5012  Numeric C[NPTC+addF77fields];
5013  C[0] = 0.000e0; // not used field of array
5014 
5015  for (Index J = 1 ; J <= NPTC ; ++J)
5016  {
5017  C[J] = 0.000e0;
5018  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
5019 
5020  if ( (VJ > V1S) && (VJ < V2S) )
5021  {
5022  Numeric DV1 = VJ - V1_osc;
5023  Numeric DV2 = VJ - V2_osc;
5024 
5025  Numeric DAMP1 = 1.00e0;
5026  Numeric DAMP2 = 1.00e0;
5027 
5028  if ( DV1 < 0.00e0 )
5029  {
5030  DAMP1 = exp(DV1 / 176.100e0);
5031  }
5032 
5033  if ( DV2 < 0.00e0 )
5034  {
5035  DAMP2 = exp(DV2 / 176.100e0);
5036  }
5037 
5038  Numeric O2INF = 0.31831e0 *
5039  ( ((S1 * DAMP1 / HW1)/(1.000e0 + pow((DV1/HW1),(Numeric)2.0e0) )) +
5040  ((S2 * DAMP2 / HW2)/(1.000e0 + pow((DV2/HW2),(Numeric)2.0e0) )) ) * 1.054e0;
5041  C[J] = O2INF / VJ;
5042  }
5043  }
5044 
5045 
5046  // ------------------- subroutine O2INF2 ----------------------------
5047 
5048 
5049  // Loop pressure/temperature:
5050  for ( Index i = 0 ; i < n_p ; ++i )
5051  {
5052  Numeric Tave = t_abs[i]; // [K]
5053  Numeric Pave = (p_abs[i]*1.000e-2); // [hPa]
5054  Numeric vmro2 = vmr[i]; // [1]
5055  Numeric WTOT = 1.000e-20 * xLosmt * (Pave/PO) * (T1/Tave); // [molecules/cm^2]
5056  Numeric ADJWO2 = (vmro2 / 0.209e0) * WTOT * (Pave/PO) * (TO/Tave);
5057  Numeric XKT = Tave / 1.4387752; // = (T*k_B) / (h*c)
5058 
5059  // Molecular cross section calculated by CKD.
5060  // The cross sectionis calculated on the predefined
5061  // CKD wavenumber grid.
5062  Numeric k[NPTC+addF77fields]; // [1/cm]
5063  k[0] = 0.00e0; // not used array field
5064  for (Index J = 1 ; J <= NPTC ; ++J)
5065  {
5066  Numeric VJ = V1C + (DVC * (Numeric)(J-1));
5067  Numeric SO2 = 0.0e0;
5068  if (C[J] > 0.0e0)
5069  {
5070  SO2 = ADJWO2 * C[J];
5071  }
5072 
5073  // CKD cross section without radiative field
5074  k[J] = SO2 * RADFN_FUN(VJ,XKT); // [1]
5075  }
5076 
5077 
5078  // Loop input frequency array. The previously calculated cross section
5079  // has therefore to be interpolated on the input frequencies.
5080  for ( Index s = 0 ; s < n_f ; ++s )
5081  {
5082  // calculate the associated wave number (= 1/wavelength)
5083  Numeric V = f_mono[s] / (SPEED_OF_LIGHT * 1.00e2); // [cm^-1]
5084  if ( (V > V1S) && (V < V2S) )
5085  {
5086  // arts cross section [1/m]
5087  // interpolate the k vector on the f_mono grid
5088  xsec(s,i) += ScalingFac * 1.000e2 * XINT_FUN(V1C,V2C,DVC,k,V);
5089  }
5090  }
5091  }
5092 
5093 }
5094 
5095 // #################################################################################
5096 
5097 // CKD version 2.4 H2O continuum absorption model
5133  int isf,
5134  const Numeric Cin,
5135  const String& model,
5136  ConstVectorView f_mono,
5137  ConstVectorView p_abs,
5138  ConstVectorView t_abs,
5139  ConstVectorView vmr,
5140  ConstVectorView n2_abs )
5141 {
5142  //
5143  //
5144  // external function to call (original F77 code translated with f2c)
5145  /* INPUT PARAMETERS: */
5146  /* P [hPa] TOTAL PRESSURE */
5147  /* T [K] TEMPERATURE */
5148  /* VMRH2O [1] H2O VOLUME MIXING RATIO */
5149  /* VMRN2 [1] N2 VOLUME MIXING RATIO */
5150  /* VMRO2 [1] O2 VOLUME MIXING RATIO */
5151  /* FREQ [Hz] FREQUENCY OF CALCULATION */
5152  extern double artsckd_(double p, double t,
5153  double vmrh2o, double vmrn2, double vmro2,
5154  double freq, int ivc);
5155  //
5156  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5157  Numeric XFAC = 1.0000; // scaling factor
5158  // ---------------------------------------------------------------------------------------
5159 
5160 
5161  // check the model name about consistency
5162  if ((model != "user") && (model != "CKD24"))
5163  {
5164  ostringstream os;
5165  os << "!!ERROR!!\n"
5166  << "CKDv2.4.2 H2O self/foreign continuum:\n"
5167  << "INPUT model name is: " << model << ".\n"
5168  << "VALID model names are user and CKD24\n";
5169  throw runtime_error(os.str());
5170  }
5171 
5172 
5173  // select the parameter set (!!model dominates values!!):
5174  if ( model == "CKD24" )
5175  {
5176  XFAC = 1.0000;
5177  }
5178  else if ( model == "user" )
5179  {
5180  XFAC = Cin;
5181  }
5182  else
5183  {
5184  if (isf == 0) {
5185  ostringstream os;
5186  os << "H2O-SelfContCKD24: ERROR! Wrong model values given.\n"
5187  << "allowed models are: 'CKD24', 'user'" << '\n';
5188  throw runtime_error(os.str());
5189  }
5190  if (isf == 1) {
5191  ostringstream os;
5192  os << "H2O-ForeignContCKD: ERROR! Wrong model values given.\n"
5193  << "allowed models are: 'CKD24', 'user'" << '\n';
5194  throw runtime_error(os.str());
5195  }
5196  }
5197 
5198  if (isf == 0) {
5199  out3 << "H2O-SelfContCKD24: (model=" << model << ") parameter values in use:\n"
5200  << " XFAC = " << XFAC << "\n";
5201  }
5202  if (isf == 1) {
5203  out3 << "H2O-ForeignContCKD: (model=" << model << ") parameter values in use:\n"
5204  << " XFAC = " << XFAC << "\n";
5205  }
5206 
5207 
5208  const Index n_p = p_abs.nelem(); // Number of pressure levels
5209  const Index n_f = f_mono.nelem(); // Number of frequencies
5210 
5211 
5212  // Check that dimensions of p_abs, t_abs, and vmr agree:
5213  assert ( n_p==t_abs.nelem() );
5214  assert ( n_p==vmr.nelem() );
5215 
5216  // Check that dimensions of xsec are consistent with n_f
5217  // and n_p. It should be [n_f,n_p]:
5218  assert ( n_f==xsec.nrows() );
5219  assert ( n_p==xsec.ncols() );
5220 
5221  // ivc = 1 : N2-N2 CKD version of Borysow-Fromhold model
5222  // ivc = 21 : H2O CKD2.4 self cont part
5223  // ivc = 22 : H2O CKD2.4 foreign cont part
5224  // ivc = 31 : MPMf87/s93 self cont part
5225  // ivc = 32 : MPMf87/s93 foreign cont part
5226  int ivc = 55;
5227  if (isf == 0) {
5228  ivc = 21; // CKD2.4 self continuum
5229  // ivc = 31; // MPMf87/s93 self continuum
5230  }
5231  if (isf == 1) {
5232  ivc = 22; // CKD2.4 foreign continuum
5233  //ivc = 32; // MPMf87/s93 foreign continuum
5234  }
5235  if ((ivc != 1) && (ivc != 21) && (ivc != 22) && (ivc != 31) && (ivc != 32)) {
5236  ostringstream os;
5237  os << "!!ERROR: CKD24 H2O model: wrong input parameter isf (=0,1) given!\n"
5238  << "retrun without calculation!" << "\n"
5239  << "actual value of isf is " << isf << "\n";
5240  throw runtime_error(os.str());
5241  return;
5242  }
5243  // ivc = 1;
5244 
5245  // Loop pressure/temperature:
5246  for ( Index i=0; i<n_p; ++i )
5247  {
5248  double T = (double) t_abs[i]; // [K]
5249  double p = (double) (p_abs[i]*1.000e-2); // [hPa]
5250  double vmrh2o = (double) vmr[i]; // [1]
5251  double vmrn2 = (double) n2_abs[i]; // [1]
5252  double vmro2 = 0.0e0; // [1]
5253 
5254  //cout << "------------------------------------------------\n";
5255  //cout << "CKD2.4 H2O: ivc =" << ivc << "\n";
5256  //cout << "CKD2.4 H2O: T =" << T << " K\n";
5257  //cout << "CKD2.4 H2O: p =" << p << " hPa\n";
5258  //cout << "CKD2.4 H2O: vmrh2o=" << vmrh2o << "\n";
5259  //cout << "CKD2.4 H2O: vmrn2 =" << vmrn2 << "\n";
5260  //cout << "CKD2.4 H2O: vmro2 =" << vmro2 << "\n";
5261  // Loop frequency:
5262  for ( Index s=0; s<n_f; ++s )
5263  {
5264  // the second vmr of N2 will be multiplied at the stage of
5265  // absorption calculation: abs = vmr * xsec.
5266  double f = (double) f_mono[s]; // [Hz]
5267  if (ivc == 1) { // ---------- N2 -----------------
5268  if (n2_abs[i] > 0.0e0) {
5269  //cout << "CKD2.4 N2: f =" << f << " Hz\n";
5270  double cont = artsckd_(p, T, vmrh2o, vmrn2, vmro2, f, ivc);
5271  xsec(s,i) += (Numeric) (cont / vmr[i]);
5272  //cout << "CKD2.4 N2: abs =" << cont << " 1/m\n";
5273  }
5274  } else { // ---------------- H2O -----------------
5275  if (vmr[i] > 0.0e0) {
5276  //cout << "CKD2.4 H2O: f =" << f << " Hz\n";
5277  double cont = artsckd_(p, T, vmrh2o, vmrn2, vmro2, f, ivc);
5278  xsec(s,i) += (Numeric) (cont / vmr[i]);
5279  //cout << "CKD2.4 H2O: abs =" << cont << " 1/m\n";
5280  }
5281  }
5282  }
5283  }
5284  return;
5285 }
5286 //
5287 // #################################################################################
5288 //
5314  const Numeric Cin,
5315  const String& model,
5316  ConstVectorView f_mono,
5317  ConstVectorView p_abs,
5318  ConstVectorView t_abs,
5319  ConstVectorView vmr)
5320 {
5321  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5322  // standard values for the Pardo et al. model (IEEE, Trans. Ant. Prop.,
5323  // Vol 49, No 12, pp. 1683-1694, 2001)
5324  const Numeric C_ATM = 0.0315; // [1/m]
5325  // ---------------------------------------------------------------------------------------
5326 
5327  // select the parameter set (!!model dominates parameters!!):
5328  Numeric C;
5329  if ( model == "ATM" )
5330  {
5331  C = C_ATM;
5332  }
5333  else if ( model == "user" )
5334  {
5335  C = Cin;
5336  }
5337  else
5338  {
5339  ostringstream os;
5340  os << "H2O-ForeignContATM01: ERROR! Wrong model values given.\n"
5341  << "allowed models are: 'ATM', 'user'" << '\n';
5342  throw runtime_error(os.str());
5343  }
5344  out3 << "H2O-ForeignContATM01: (model=" << model << ") parameter values in use:\n"
5345  << " C_f = " << C << "\n";
5346 
5347  const Index n_p = p_abs.nelem(); // Number of pressure levels
5348  const Index n_f = f_mono.nelem(); // Number of frequencies
5349 
5350  // Check that dimensions of p_abs, t_abs, and vmr agree:
5351  assert ( n_p==t_abs.nelem() );
5352  assert ( n_p==vmr.nelem() );
5353 
5354  // Check that dimensions of xsec are consistent with n_f
5355  // and n_p. It should be [n_f,n_p]:
5356  assert ( n_f==xsec.nrows() );
5357  assert ( n_p==xsec.ncols() );
5358 
5359  // Loop over pressure/temperature grid:
5360  for ( Index i=0; i<n_p; ++i )
5361  {
5362  // since this is an effective "dry air" continuum, it is not really
5363  // it is not specifically attributed to N2, so we need the total
5364  // dry air part in total which is equal to the total minus the
5365  // water vapor pressure:
5366  Numeric pd = p_abs[i] * ( 1.00000e0 - vmr[i] ); // [Pa]
5367  // since the H2O VMR will be multiplied in absCalc, we omit it here
5368  Numeric pwdummy = p_abs[i] ; // [Pa]
5369  // Loop over frequency grid:
5370  for ( Index s=0; s<n_f; ++s )
5371  {
5372  // Becaue this is an effective "dry air" continuum, it is not really
5373  // specific N2 but mainly caused by N2. Therefore the N2 vmr must be
5374  // canceled out here which is later in absCalc multiplied
5375  // (calculation: abs = vmr * xsec):
5376  xsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
5377  pow( (f_mono[s]/(Numeric)2.25e11), (Numeric)2. ) * // quadratic f dependence [1]
5378  pow( ((Numeric)300.0/t_abs[i]), (Numeric)3. ) * // free T dependence [1]
5379  (pd/1.01300e5) * // p_dry dependence [1]
5380  (pwdummy/1.01300e5); // p_H2O dependence [1]
5381  }
5382  }
5383 }
5384 //
5385 // #################################################################################
5386 //
5387 // MPM93 H2O pseudo continuum line parameters:
5388 // see publication side of National Telecommunications and Information Administration
5389 // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
5390 // and ftp side for downloading the MPM93 original source code:
5391 // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
5427  const Numeric fcenter,
5428  const Numeric b1,
5429  const Numeric b2,
5430  const Numeric b3,
5431  const Numeric b4,
5432  const Numeric b5,
5433  const Numeric b6,
5434  const String& model,
5435  ConstVectorView f_mono,
5436  ConstVectorView p_abs,
5437  ConstVectorView t_abs,
5438  ConstVectorView vmr )
5439 {
5440 
5441  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5442  // standard values for the MPM93 H2O continuum model
5443  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
5444  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
5445  const Numeric MPM93fo_orig = 1780.000e9; // [Hz]
5446  const Numeric MPM93b1_orig = 22300.000; // [Hz/Pa]
5447  const Numeric MPM93b2_orig = 0.952; // [1]
5448  const Numeric MPM93b3_orig = 17.600e4; // [Hz/Pa]
5449  const Numeric MPM93b4_orig = 30.500; // [1]
5450  const Numeric MPM93b5_orig = 2.000; // [1]
5451  const Numeric MPM93b6_orig = 5.000; // [1]
5452  // ---------------------------------------------------------------------------------------
5453 
5454 
5455  // select the parameter set (!!model goes for values!!):
5456  Numeric MPM93fopcl, MPM93b1pcl, MPM93b2pcl,
5457  MPM93b3pcl, MPM93b4pcl, MPM93b5pcl,
5458  MPM93b6pcl;
5459  if ( model == "MPM93" )
5460  {
5461  MPM93fopcl = MPM93fo_orig;
5462  MPM93b1pcl = MPM93b1_orig;
5463  MPM93b2pcl = MPM93b2_orig;
5464  MPM93b3pcl = MPM93b3_orig;
5465  MPM93b4pcl = MPM93b4_orig;
5466  MPM93b5pcl = MPM93b5_orig;
5467  MPM93b6pcl = MPM93b6_orig;
5468  }
5469  else if ( model == "user" )
5470  {
5471  MPM93fopcl = fcenter;
5472  MPM93b1pcl = b1;
5473  MPM93b2pcl = b2;
5474  MPM93b3pcl = b3;
5475  MPM93b4pcl = b4;
5476  MPM93b5pcl = b5;
5477  MPM93b6pcl = b6;
5478  }
5479  else
5480  {
5481  ostringstream os;
5482  os << "H2O-ContMPM93: ERROR! Wrong model values given.\n"
5483  << "allowed models are: 'MPM93', 'user'" << '\n';
5484  throw runtime_error(os.str());
5485  }
5486  out3 << "H2O-ContMPM93: (model=" << model << ") parameter values in use:\n"
5487  << " fo = " << MPM93fopcl << "\n"
5488  << " b1 = " << MPM93b1pcl << "\n"
5489  << " b2 = " << MPM93b2pcl << "\n"
5490  << " b3 = " << MPM93b3pcl << "\n"
5491  << " b4 = " << MPM93b4pcl << "\n"
5492  << " b5 = " << MPM93b5pcl << "\n"
5493  << " b6 = " << MPM93b6pcl << "\n";
5494 
5495  const Index n_p = p_abs.nelem(); // Number of pressure levels
5496  const Index n_f = f_mono.nelem(); // Number of frequencies
5497 
5498  // Check that dimensions of p_abs, t_abs, and vmr agree:
5499  assert ( n_p==t_abs.nelem() );
5500  assert ( n_p==vmr.nelem() );
5501 
5502  // Check that dimensions of xsec are consistent with n_f
5503  // and n_p. It should be [n_f,n_p]:
5504  assert ( n_f==xsec.nrows() );
5505  assert ( n_p==xsec.ncols() );
5506 
5507 
5508  // Loop pressure/temperature:
5509  for ( Index i=0; i<n_p; ++i )
5510  {
5511  Numeric th = 300.0 / t_abs[i];
5512  // the vmr of H2O will be multiplied at the stage of absorption calculation:
5513  // abs / vmr * xsec.
5514  Numeric strength = MPM93b1pcl * p_abs[i] * pow( th, (Numeric)3.5 )
5515  * exp(MPM93b2pcl * (1 - th));
5516  Numeric gam = MPM93b3pcl * 0.001 *
5517  ( MPM93b4pcl * p_abs[i] * vmr[i] * pow( th, MPM93b6pcl ) +
5518  p_abs[i]*(1.000-vmr[i]) * pow( th, MPM93b5pcl ) );
5519  // Loop frequency:
5520  for ( Index s=0; s<n_f; ++s )
5521  {
5522  // xsec = abs/vmr [1/m] but MPM89 is in [dB/km] --> conversion necessary
5523  xsec(s,i) += dB_km_to_1_m * 0.1820 *
5524  f_mono[s] * strength *
5525  MPMLineShapeFunction(gam, MPM93fopcl, f_mono[s]);
5526  }
5527  }
5528  return;
5529 }
5530 //
5531 // #################################################################################
5532 // ################################# OXYGEN MODELS #################################
5533 // #################################################################################
5564  const Numeric CCin, // continuum scale factor
5565  const Numeric CLin, // line strength scale factor
5566  const Numeric CWin, // line broadening scale factor
5567  const Numeric COin, // line coupling scale factor
5568  const String& model,
5569  ConstVectorView f_mono,
5570  ConstVectorView p_abs,
5571  ConstVectorView t_abs,
5572  ConstVectorView h2o_abs,
5573  ConstVectorView vmr )
5574 {
5575  //
5576  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
5577  // 0 1 2 3 4 5 6
5578  // f0 a1 a2 a3 a4 a5 a6
5579  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa] [1]
5580  const Numeric mpm85[48][7] = {
5581  { 49.452379 , 0.12 , 11.830 , 8.40 , 0.0 , 5.600 , 1.700 },
5582  { 49.962257 , 0.34 , 10.720 , 8.50 , 0.0 , 5.600 , 1.700 },
5583  { 50.474238 , 0.94 , 9.690 , 8.60 , 0.0 , 5.600 , 1.700 },
5584  { 50.987748 , 2.46 , 8.690 , 8.70 , 0.0 , 5.500 , 1.700 },
5585  { 51.503350 , 6.08 , 7.740 , 8.90 , 0.0 , 5.600 , 1.800 },
5586  { 52.021409 , 14.14 , 6.840 , 9.20 , 0.0 , 5.500 , 1.800 },
5587  { 52.542393 , 31.02 , 6.000 , 9.40 , 0.0 , 5.700 , 1.800 },
5588  { 53.066906 , 64.10 , 5.220 , 9.70 , 0.0 , 5.300 , 1.900 },
5589  { 53.595748 , 124.70 , 4.480 , 10.00 , 0.0 , 5.400 , 1.800 },
5590  { 54.129999 , 228.00 , 3.810 , 10.20 , 0.0 , 4.800 , 2.000 },
5591  { 54.671157 , 391.80 , 3.190 , 10.50 , 0.0 , 4.800 , 1.900 },
5592  { 55.221365 , 631.60 , 2.620 , 10.79 , 0.0 , 4.170 , 2.100 },
5593  { 55.783800 , 953.50 , 2.115 , 11.10 , 0.0 , 3.750 , 2.100 },
5594  { 56.264777 , 548.90 , 0.010 , 16.46 , 0.0 , 7.740 , 0.900 },
5595  { 56.363387 , 1344.00 , 1.655 , 11.44 , 0.0 , 2.970 , 2.300 },
5596  { 56.968180 , 1763.00 , 1.255 , 11.81 , 0.0 , 2.120 , 2.500 },
5597  { 57.612481 , 2141.00 , 0.910 , 12.21 , 0.0 , 0.940 , 3.700 },
5598  { 58.323874 , 2386.00 , 0.621 , 12.66 , 0.0 , -0.550 , -3.100 },
5599  { 58.446589 , 1457.00 , 0.079 , 14.49 , 0.0 , 5.970 , 0.800 },
5600  { 59.164204 , 2404.00 , 0.386 , 13.19 , 0.0 , -2.440 , 0.100 },
5601  { 59.590982 , 2112.00 , 0.207 , 13.60 , 0.0 , 3.440 , 0.500 },
5602  { 60.306057 , 2124.00 , 0.207 , 13.82 , 0.0 , -4.130 , 0.700 },
5603  { 60.434775 , 2461.00 , 0.386 , 12.97 , 0.0 , 1.320 , -1.000 },
5604  { 61.150558 , 2504.00 , 0.621 , 12.48 , 0.0 , -0.360 , 5.800 },
5605  { 61.800152 , 2298.00 , 0.910 , 12.07 , 0.0 , -1.590 , 2.900 },
5606  { 62.411212 , 1933.00 , 1.255 , 11.71 , 0.0 , -2.660 , 2.300 },
5607  { 62.486253 , 1517.00 , 0.078 , 14.68 , 0.0 , -4.770 , 0.900 },
5608  { 62.997974 , 1503.00 , 1.660 , 11.39 , 0.0 , -3.340 , 2.200 },
5609  { 63.568515 , 1087.00 , 2.110 , 11.08 , 0.0 , -4.170 , 2.000 },
5610  { 64.127764 , 733.50 , 2.620 , 10.78 , 0.0 , -4.480 , 2.000 },
5611  { 64.678900 , 463.50 , 3.190 , 10.50 , 0.0 , -5.100 , 1.800 },
5612  { 65.224067 , 274.80 , 3.810 , 10.20 , 0.0 , -5.100 , 1.900 },
5613  { 65.764769 , 153.00 , 4.480 , 10.00 , 0.0 , -5.700 , 1.800 },
5614  { 66.302088 , 80.09 , 5.220 , 9.70 , 0.0 , -5.500 , 1.800 },
5615  { 66.836827 , 39.46 , 6.000 , 9.40 , 0.0 , -5.900 , 1.700 },
5616  { 67.369595 , 18.32 , 6.840 , 9.20 , 0.0 , -5.600 , 1.800 },
5617  { 67.900862 , 8.01 , 7.740 , 8.90 , 0.0 , -5.800 , 1.700 },
5618  { 68.431001 , 3.30 , 8.690 , 8.70 , 0.0 , -5.700 , 1.700 },
5619  { 68.960306 , 1.28 , 9.690 , 8.60 , 0.0 , -5.600 , 1.700 },
5620  { 69.489021 , 0.47 , 10.720 , 8.50 , 0.0 , -5.600 , 1.700 },
5621  { 70.017342 , 0.16 , 11.830 , 8.40 , 0.0 , -5.600 , 1.700 },
5622  { 118.750341 , 945.00 , 0.000 , 15.92 , 0.0 , -0.440 , 0.900 },
5623  { 368.498350 , 67.90 , 0.020 , 19.20 , 0.6 , 0.000 , 0.000 },
5624  { 424.763120 , 638.00 , 0.011 , 19.16 , 0.6 , 0.000 , 0.000 },
5625  { 487.249370 , 235.00 , 0.011 , 19.20 , 0.6 , 0.000 , 0.000 },
5626  { 715.393150 , 99.60 , 0.089 , 18.10 , 0.6 , 0.000 , 0.000 },
5627  { 773.838730 , 671.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000 },
5628  { 834.145330 , 180.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000 },
5629 };
5630 
5631  // number of lines of Liebe O2-line catalog (0-47 lines)
5632  const Index i_first = 0;
5633  const Index i_last = 47; // all the spec. lines up to 1THz
5634  // const Index i_last = 40; // only the 60GHz complex + 118GHz line
5635 
5636 
5637  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5638  // standard values for the MPM85 model (Liebe, Radio Science, 20, 1069-1089, 1985):
5639  const Numeric CC_MPM85 = 1.00000;
5640  const Numeric CL_MPM85 = 1.00000;
5641  const Numeric CW_MPM85 = 1.00000;
5642  const Numeric CO_MPM85 = 1.00000;
5643  int AppCutoff = 0;
5644  // ---------------------------------------------------------------------------------------
5645 
5646 
5647  // select the parameter set (!!model dominates values!!):
5648  Numeric CC, CL, CW, CO;
5649  if ( model == "MPM85" )
5650  {
5651  CC = CC_MPM85;
5652  CL = CL_MPM85;
5653  CW = CW_MPM85;
5654  CO = CO_MPM85;
5655  }
5656  else if ( model == "MPM85Lines" )
5657  {
5658  CC = 0.000;
5659  CL = CL_MPM85;
5660  CW = CW_MPM85;
5661  CO = CO_MPM85;
5662  }
5663  else if ( model == "MPM85Continuum" )
5664  {
5665  CC = CC_MPM85;
5666  CL = 0.000;
5667  CW = 0.000;
5668  CO = 0.000;
5669  }
5670  else if ( model == "MPM85NoCoupling" )
5671  {
5672  CC = CC_MPM85;
5673  CL = CL_MPM85;
5674  CW = CW_MPM85;
5675  CO = 0.000;
5676  }
5677  else if ( model == "MPM85NoCutoff" )
5678  {
5679  CC = CC_MPM85;
5680  CL = CL_MPM85;
5681  CW = CW_MPM85;
5682  CO = CO_MPM85;
5683  AppCutoff = 1;
5684  }
5685  else if ( model == "user" )
5686  {
5687  CC = CCin;
5688  CL = CLin;
5689  CW = CWin;
5690  CO = COin;
5691  }
5692  else
5693  {
5694  ostringstream os;
5695  os << "O2-MPM85: ERROR! Wrong model values given.\n"
5696  << "Valid models are: 'MPM85' 'MPM85Lines' 'MPM85Continuum' 'MPM85NoCoupling' 'MPM85NoCutoff'"
5697  << "and 'user'" << '\n';
5698  throw runtime_error(os.str());
5699  }
5700  out3 << "O2-MPM85: (model=" << model << ") parameter values in use:\n"
5701  << " CC = " << CC << "\n"
5702  << " CL = " << CL << "\n"
5703  << " CW = " << CW << "\n"
5704  << " CO = " << CO << "\n";
5705 
5706 
5707  // O2 continuum parameters of MPM92:
5708  const Numeric S0 = 6.140e-4; // line strength [ppm]
5709  const Numeric G0 = 5.600e-3; // line width [GHz/kPa]
5710  const Numeric X0 = 0.800; // temperature dependence of line width [1]
5711 
5712  const Index n_p = p_abs.nelem(); // Number of pressure levels
5713  const Index n_f = f_mono.nelem(); // Number of frequencies
5714 
5715  // const = VMR * ISORATIO = 0.20946 * 0.99519
5716  // this constant is already incorporated into the line strength, so we
5717  // have top devide the line strength by this value since arts multiplies xsec
5718  // by these variables later in absCalc.
5719  const Numeric VMRISO = 0.2085;
5720 
5721  // Check that dimensions of p_abs, t_abs, and vmr agree:
5722  assert ( n_p==t_abs.nelem() );
5723  assert ( n_p==vmr.nelem() );
5724 
5725  // Check that dimensions of xsec are consistent with n_f
5726  // and n_p. It should be [n_f,n_p]:
5727  assert ( n_f==xsec.nrows() );
5728  assert ( n_p==xsec.ncols() );
5729 
5730  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
5731  for ( Index i=0; i<n_p; ++i )
5732  {
5733  // check if O2-VMR will cause an underflow due to division by zero:
5734  if (vmr[i] < VMRCalcLimit)
5735  {
5736  ostringstream os;
5737  os << "ERROR: MPM87 O2 full absorption model has detected a O2 volume mixing ratio of "
5738  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
5739  << "Therefore no calculation is performed.\n";
5740  throw runtime_error(os.str());
5741  return;
5742  }
5743 
5744  // relative inverse temperature [1]
5745  Numeric theta = (300.0 / t_abs[i]);
5746  // H2O partial pressure [kPa]
5747  Numeric pwv = Pa_to_kPa * p_abs[i] * h2o_abs[i];
5748  // dry air partial pressure [kPa]
5749  Numeric pda = (Pa_to_kPa * p_abs[i]) - pwv;
5750  // here the total pressure is devided by the O2 vmr for the
5751  // P_dry calculation because we calculate xsec and not abs: abs = vmr * xsec
5752  Numeric pda_dummy = pda;
5753  // O2 continuum strength [ppm]
5754  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
5755  // O2 continuum pseudo line broadening [GHz]
5756  Numeric gam_cont = G0 * ( pda + 1.10*pwv ) * pow( theta, X0 ); // GHz
5757 
5758  // Loop over input frequency
5759  for ( Index s=0; s<n_f; ++s )
5760  {
5761  // input frequency in [GHz]
5762  Numeric ff = f_mono[s] * Hz_to_GHz;
5763  // O2 continuum absorption [1/m]
5764  // cross section: xsec = absorption / var
5765  // the vmr of O2 will be multiplied at the stage of absorption calculation:
5766  // here the rolloff parameter FAC is implemented!
5767  // Numeric FAC = 1.000 / ( pow( ff, 2) + pow( 60.000, 2) );
5768  // if we let the non-proofen rollofff away as in further version:
5769  Numeric FAC = 1.000 ;
5770  Numeric Nppc = CC * strength_cont * FAC * ff * gam_cont /
5771  ( pow( ff, (Numeric)2.)
5772  + pow( gam_cont, (Numeric)2.) );
5773 
5774  // Loop over MPM85 O2 spectral lines:
5775  Numeric Nppl = 0.0;
5776  for ( Index l = i_first; l <= i_last; ++l )
5777  {
5778  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
5779  Numeric strength = CL * mpm85[l][1] * 1.000e-6 * pda_dummy *
5780  pow(theta, (Numeric)3.) * exp(mpm85[l][2]*(1.000-theta)) /
5781  mpm85[l][0];
5782  // line broadening parameter [GHz]
5783  Numeric gam = CW * ( mpm85[l][3] * 1.000e-3 *
5784  ( ( pda * pow(theta, ((Numeric)0.80-mpm85[l][4]))) +
5785  (1.10 * pwv * theta) ) );
5786  // line mixing parameter [1]
5787  Numeric delta = CO * mpm85[l][5] * 1.000e-3 *
5788  pda * pow(theta, mpm85[l][6]);
5789  // absorption [dB/km] like in the original MPM92
5790  Nppl += strength * MPMLineShapeO2Function(gam, mpm85[l][0], ff, delta);
5791  }
5792  // in MPM85 there is a cutoff for O2 line absorption if abs_l < 0
5793  // absorption cannot be less than 0 according to MPM87 philosophy.
5794  // since this cutoff is only 'detectable' in the source code and not in the
5795  // publications we assume this cutoff also for MPM85 since it is also
5796  // implemented in MPM87.
5797  if (AppCutoff == 0)
5798  {
5799  if (Nppl < 0.000) Nppl = 0.0000;
5800  }
5801  //
5802  // O2 line absorption [1/m]
5803  // cross section: xsec = absorption / var
5804  // the vmr of O2 will be multiplied at the stage of absorption calculation:
5805  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
5806  }
5807  }
5808  return;
5809 }
5810 //
5811 // #################################################################################
5812 //
5847  const Numeric CCin, // continuum scale factor
5848  const Numeric CLin, // line strength scale factor
5849  const Numeric CWin, // line broadening scale factor
5850  const Numeric COin, // line coupling scale factor
5851  const String& model,
5852  ConstVectorView f_mono,
5853  ConstVectorView p_abs,
5854  ConstVectorView t_abs,
5855  ConstVectorView h2o_abs,
5856  ConstVectorView vmr )
5857 {
5858  //
5859  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
5860  // 0 1 2 3 4 5 6
5861  // f0 a1 a2 a3 a4 a5 a6
5862  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa]
5863  const Numeric mpm87[48][7] = {
5864  { 49.452379 , 0.12 , 11.830 , 8.40 , 0.0 , 6.600 , 1.700}, // 0
5865  { 49.962257 , 0.34 , 10.720 , 8.50 , 0.0 , 6.600 , 1.700}, // 1
5866  { 50.474238 , 0.94 , 9.690 , 8.60 , 0.0 , 6.600 , 1.700}, // 2
5867  { 50.987748 , 2.46 , 8.690 , 8.70 , 0.0 , 6.500 , 1.700}, // 3
5868  { 51.503350 , 6.08 , 7.740 , 8.90 , 0.0 , 6.627 , 1.800}, // 4
5869  { 52.021409 , 14.14 , 6.840 , 9.20 , 0.0 , 6.347 , 1.800}, // 5
5870  { 52.542393 , 31.02 , 6.000 , 9.40 , 0.0 , 6.046 , 1.800}, // 6
5871  { 53.066906 , 64.10 , 5.220 , 9.70 , 0.0 , 5.719 , 1.900}, // 7
5872  { 53.595748 , 124.70 , 4.480 , 10.00 , 0.0 , 5.400 , 1.800}, // 8
5873  { 54.129999 , 228.00 , 3.810 , 10.20 , 0.0 , 5.157 , 2.000}, // 9
5874  { 54.671157 , 391.80 , 3.190 , 10.50 , 0.0 , 4.783 , 1.900}, // 10
5875  { 55.221365 , 631.60 , 2.620 , 10.79 , 0.0 , 4.339 , 2.100}, // 11
5876  { 55.783800 , 953.50 , 2.115 , 11.10 , 0.0 , 4.011 , 2.100}, // 12
5877  { 56.264777 , 548.90 , 0.010 , 16.46 , 0.0 , 2.772 , 0.900}, // 13
5878  { 56.363387 , 1344.00 , 1.655 , 11.44 , 0.0 , 3.922 , 2.300}, // 14
5879  { 56.968180 , 1763.00 , 1.255 , 11.81 , 0.0 , 3.398 , 2.500}, // 15
5880  { 57.612481 , 2141.00 , 0.910 , 12.21 , 0.0 , 1.145 , 3.200}, // 16
5881  { 58.323874 , 2386.00 , 0.621 , 12.66 , 0.0 , -0.317 , -2.500}, // 17
5882  { 58.446589 , 1457.00 , 0.079 , 14.49 , 0.0 , 6.270 , 0.800}, // 18
5883  { 59.164204 , 2404.00 , 0.386 , 13.19 , 0.0 , -4.119 , 0.100}, // 19
5884  { 59.590982 , 2112.00 , 0.207 , 13.60 , 0.0 , 6.766 , 0.500}, // 20
5885  { 60.306057 , 2124.00 , 0.207 , 13.82 , 0.0 , -6.183 , 0.700}, // 21
5886  { 60.434775 , 2461.00 , 0.386 , 12.97 , 0.0 , 3.290 , -0.400}, // 22
5887  { 61.150558 , 2504.00 , 0.621 , 12.48 , 0.0 , -1.591 , 3.500}, // 23
5888  { 61.800152 , 2298.00 , 0.910 , 12.07 , 0.0 , -2.068 , 2.900}, // 24
5889  { 62.411212 , 1933.00 , 1.255 , 11.71 , 0.0 , -4.158 , 2.300}, // 25
5890  { 62.486253 , 1517.00 , 0.078 , 14.68 , 0.0 , -4.068 , 0.900}, // 26
5891  { 62.997974 , 1503.00 , 1.660 , 11.39 , 0.0 , -4.482 , 2.200}, // 27
5892  { 63.568515 , 1087.00 , 2.110 , 11.08 , 0.0 , -4.442 , 2.000}, // 28
5893  { 64.127764 , 733.50 , 2.620 , 10.78 , 0.0 , -4.687 , 2.000}, // 29
5894  { 64.678900 , 463.50 , 3.190 , 10.50 , 0.0 , -5.074 , 1.800}, // 30
5895  { 65.224067 , 274.80 , 3.810 , 10.20 , 0.0 , -5.403 , 1.900}, // 31
5896  { 65.764769 , 153.00 , 4.480 , 10.00 , 0.0 , -5.610 , 1.800}, // 32
5897  { 66.302088 , 80.09 , 5.220 , 9.70 , 0.0 , -5.896 , 1.800}, // 33
5898  { 66.836827 , 39.46 , 6.000 , 9.40 , 0.0 , -6.194 , 1.700}, // 34
5899  { 67.369595 , 18.32 , 6.840 , 9.20 , 0.0 , -6.468 , 1.800}, // 35
5900  { 67.900862 , 8.01 , 7.740 , 8.90 , 0.0 , -6.718 , 1.700}, // 36
5901  { 68.431001 , 3.30 , 8.690 , 8.70 , 0.0 , -6.700 , 1.700}, // 37
5902  { 68.960306 , 1.28 , 9.690 , 8.60 , 0.0 , -6.600 , 1.700}, // 38
5903  { 69.489021 , 0.47 , 10.720 , 8.50 , 0.0 , -6.600 , 1.700}, // 39
5904  { 70.017342 , 0.16 , 11.830 , 8.40 , 0.0 , -6.600 , 1.700}, // 40
5905  { 118.750341 , 945.00 , 0.000 , 16.30 , 0.0 , -0.134 , 0.800}, // 41
5906  { 368.498350 , 67.90 , 0.020 , 19.20 , 0.6 , 0.000 , 0.000}, // 42
5907  { 424.763120 , 638.00 , 0.011 , 19.16 , 0.6 , 0.000 , 0.000}, // 43
5908  { 487.249370 , 235.00 , 0.011 , 19.20 , 0.6 , 0.000 , 0.000}, // 44
5909  { 715.393150 , 99.60 , 0.089 , 18.10 , 0.6 , 0.000 , 0.000}, // 45
5910  { 773.838730 , 671.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000}, // 46
5911  { 834.145330 , 180.00 , 0.079 , 18.10 , 0.6 , 0.000 , 0.000} // 47
5912  };
5913 
5914  // number of lines of Liebe O2-line catalog (0-47 lines)
5915  const Index i_first = 0;
5916  const Index i_last = 47; // all the spec. lines up to 1THz
5917  // const Index i_last = 40; // only the 60GHz complex + 118GHz line
5918 
5919 
5920  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
5921  // standard values for the MPM87 model (NITA Report 87-224):
5922  const Numeric CC_MPM87 = 1.00000;
5923  const Numeric CL_MPM87 = 1.00000;
5924  const Numeric CW_MPM87 = 1.00000;
5925  const Numeric CO_MPM87 = 1.00000;
5926  int AppCutoff = 0;
5927  // ---------------------------------------------------------------------------------------
5928 
5929 
5930  // select the parameter set (!!model dominates values!!):
5931  Numeric CC, CL, CW, CO;
5932  if ( model == "MPM87" )
5933  {
5934  CC = CC_MPM87;
5935  CL = CL_MPM87;
5936  CW = CW_MPM87;
5937  CO = CO_MPM87;
5938  }
5939  else if ( model == "MPM87Lines" )
5940  {
5941  CC = 0.000;
5942  CL = CL_MPM87;
5943  CW = CW_MPM87;
5944  CO = CO_MPM87;
5945  }
5946  else if ( model == "MPM87Continuum" )
5947  {
5948  CC = CC_MPM87;
5949  CL = 0.000;
5950  CW = 0.000;
5951  CO = 0.000;
5952  }
5953  else if ( model == "MPM87NoCoupling" )
5954  {
5955  CC = CC_MPM87;
5956  CL = CL_MPM87;
5957  CW = CW_MPM87;
5958  CO = 0.000;
5959  }
5960  else if ( model == "MPM87NoCutoff" )
5961  {
5962  // !!ATTENTION!!
5963  // In the window regions the total absorption can get negative values.
5964  // So be carefull with this selection!
5965  CC = CC_MPM87;
5966  CL = CL_MPM87;
5967  CW = CW_MPM87;
5968  CO = CO_MPM87;
5969  AppCutoff = 1;
5970  }
5971  else if ( model == "user" )
5972  {
5973  CC = CCin;
5974  CL = CLin;
5975  CW = CWin;
5976  CO = COin;
5977  }
5978  else
5979  {
5980  ostringstream os;
5981  os << "O2-MPM87: ERROR! Wrong model values given.\n"
5982  << "Valid models are: 'MPM87' 'MPM87Lines' 'MPM87Continuum' 'MPM87NoCoupling' 'MPM87NoCutoff'"
5983  << "and 'user'" << '\n';
5984  throw runtime_error(os.str());
5985  }
5986  out3 << "O2-MPM87: (model=" << model << ") parameter values in use:\n"
5987  << " CC = " << CC << "\n"
5988  << " CL = " << CL << "\n"
5989  << " CW = " << CW << "\n"
5990  << " CO = " << CO << "\n";
5991 
5992 
5993  // O2 continuum parameters of MPM92:
5994  const Numeric S0 = 6.140e-4; // line strength [ppm]
5995  const Numeric G0 = 4.800e-3; // line width [GHz/kPa] !! 14% lower than in all the other versions !!
5996  const Numeric X0 = 0.800; // temperature dependence of line width [1]
5997 
5998  const Index n_p = p_abs.nelem(); // Number of pressure levels
5999  const Index n_f = f_mono.nelem(); // Number of frequencies
6000 
6001  // const = VMR * ISORATIO = 0.20946 * 0.99519
6002  // this constant is already incorporated into the line strength, so we
6003  // have top devide the line strength by this value since arts multiplies xsec
6004  // by these variables later in absCalc.
6005  const Numeric VMRISO = 0.2085;
6006 
6007  // Check that dimensions of p_abs, t_abs, and vmr agree:
6008  assert ( n_p==t_abs.nelem() );
6009  assert ( n_p==vmr.nelem() );
6010 
6011  // Check that dimensions of xsec are consistent with n_f
6012  // and n_p. It should be [n_f,n_p]:
6013  assert ( n_f==xsec.nrows() );
6014  assert ( n_p==xsec.ncols() );
6015 
6016  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6017  for ( Index i=0; i<n_p; ++i )
6018  {
6019  // check if O2-VMR will cause an underflow due to division by zero:
6020  if (vmr[i] < VMRCalcLimit)
6021  {
6022  ostringstream os;
6023  os << "ERROR: MPM87 O2 full absorption model has detected a O2 volume mixing ratio of "
6024  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6025  << "Therefore no calculation is performed.\n";
6026  throw runtime_error(os.str());
6027  return;
6028  }
6029 
6030  // relative inverse temperature [1]
6031  Numeric theta = (300.0 / t_abs[i]);
6032  // H2O partial pressure [kPa]
6033  Numeric pwv = Pa_to_kPa * p_abs[i] * h2o_abs[i];
6034  // dry air partial pressure [kPa]
6035  Numeric pda = (Pa_to_kPa * p_abs[i]) - pwv;
6036  // here the total pressure is devided by the O2 vmr for the
6037  // P_dry calculation because we calculate xsec and not abs: abs = vmr * xsec
6038  Numeric pda_dummy = pda;
6039  // O2 continuum strength [ppm]
6040  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6041  // O2 continuum pseudo line broadening [GHz]
6042  Numeric gam_cont = G0 * ( pda + 1.10*pwv ) * pow( theta, X0 ); // GHz
6043 
6044  // Loop over input frequency
6045  for ( Index s=0; s<n_f; ++s )
6046  {
6047  // input frequency in [GHz]
6048  Numeric ff = f_mono[s] * Hz_to_GHz;
6049  // O2 continuum absorption [1/m]
6050  // cross section: xsec = absorption / var
6051  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6052  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6053  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6054 
6055  // Loop over MPM87 O2 spectral lines:
6056  Numeric Nppl = 0.0;
6057  for ( Index l = i_first; l <= i_last; ++l )
6058  {
6059  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6060  Numeric strength = CL * mpm87[l][1] * 1.000e-6 * pda_dummy *
6061  pow(theta, (Numeric)3.) * exp(mpm87[l][2]*(1.000-theta)) /
6062  mpm87[l][0];
6063  // line broadening parameter [GHz]
6064  Numeric gam = CW * ( mpm87[l][3] * 1.000e-3 *
6065  ( ( pda * pow(theta, ((Numeric)0.80-mpm87[l][4]))) +
6066  (1.10 * pwv * theta) ) );
6067  // line mixing parameter [1]
6068  Numeric delta = CO * mpm87[l][5] * 1.000e-3 *
6069  pda * pow(theta, mpm87[l][6]);
6070  // absorption [dB/km] like in the original MPM92
6071  Nppl += strength * MPMLineShapeO2Function(gam, mpm87[l][0], ff, delta);
6072  }
6073  // in MPM87 there is a cutoff for O2 line absorption if abs_l < 0
6074  // absorption cannot be less than 0 according to MPM87 source code.
6075  if (AppCutoff == 0)
6076  {
6077  if (Nppl < 0.000) Nppl = 0.0000;
6078  }
6079  //
6080  // O2 line absorption [1/m]
6081  // cross section: xsec = absorption / var
6082  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6083  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6084  }
6085  }
6086  return;
6087 }
6088 //
6089 // #################################################################################
6090 //
6122  const Numeric CCin, // continuum scale factor
6123  const Numeric CLin, // line strength scale factor
6124  const Numeric CWin, // line broadening scale factor
6125  const Numeric COin, // line coupling scale factor
6126  const String& model,
6127  ConstVectorView f_mono,
6128  ConstVectorView p_abs,
6129  ConstVectorView t_abs,
6130  ConstVectorView h2o_abs,
6131  ConstVectorView vmr )
6132 {
6133  //
6134  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6135  // 0 1 2 3 4 5 6
6136  // f0 a1 a2 a3 a4 a5 a6
6137  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [1/kPa]
6138  const Numeric mpm89[44][7] = {
6139  { 50.474238, 0.94 , 9.694 , 8.60 , 0.0 , 1.600 , 5.520 }, // 0
6140  { 50.987749, 2.46 , 8.694 , 8.70 , 0.0 , 1.400 , 5.520 }, // 1
6141  { 51.503350, 6.08 , 7.744 , 8.90 , 0.0 , 1.165 , 5.520 }, // 2
6142  { 52.021410, 14.14 , 6.844 , 9.20 , 0.0 , 0.883 , 5.520 }, // 3
6143  { 52.542394, 31.02 , 6.004 , 9.40 , 0.0 , 0.579 , 5.520 }, // 4
6144  { 53.066907, 64.10 , 5.224 , 9.70 , 0.0 , 0.252 , 5.520 }, // 5
6145  { 53.595749, 124.70 , 4.484 , 10.00 , 0.0 , -0.066 , 5.520 }, // 6
6146  { 54.130000, 228.00 , 3.814 , 10.20 , 0.0 , -0.314 , 5.520 }, // 7
6147  { 54.671159, 391.80 , 3.194 , 10.50 , 0.0 , -0.706 , 5.520 }, // 8
6148  { 55.221367, 631.60 , 2.624 , 10.79 , 0.0 , -1.151 , 5.514 }, // 9
6149  { 55.783802, 953.50 , 2.119 , 11.10 , 0.0 , -0.920 , 5.025 }, // 10
6150  { 56.264775, 548.90 , 0.015 , 16.46 , 0.0 , 2.881 , -0.069 }, // 11
6151  { 56.363389, 1344.00 , 1.660 , 11.44 , 0.0 , -0.596 , 4.750 }, // 12
6152  { 56.968206, 1763.00 , 1.260 , 11.81 , 0.0 , -0.556 , 4.104 }, // 13
6153  { 57.612484, 2141.00 , 0.915 , 12.21 , 0.0 , -2.414 , 3.536 }, // 14
6154  { 58.323877, 2386.00 , 0.626 , 12.66 , 0.0 , -2.635 , 2.686 }, // 15
6155  { 58.446590, 1457.00 , 0.084 , 14.49 , 0.0 , 6.848 , -0.647 }, // 16
6156  { 59.164207, 2404.00 , 0.391 , 13.19 , 0.0 , -6.032 , 1.858 }, // 17
6157  { 59.590983, 2112.00 , 0.212 , 13.60 , 0.0 , 8.266 , -1.413 }, // 18
6158  { 60.306061, 2124.00 , 0.212 , 13.82 , 0.0 , -7.170 , 0.916 }, // 19
6159  { 60.434776, 2461.00 , 0.391 , 12.97 , 0.0 , 5.664 , -2.323 }, // 20
6160  { 61.150560, 2504.00 , 0.626 , 12.48 , 0.0 , 1.731 , -3.039 }, // 21
6161  { 61.800154, 2298.00 , 0.915 , 12.07 , 0.0 , 1.738 , -3.797 }, // 22
6162  { 62.411215, 1933.00 , 1.260 , 11.71 , 0.0 , -0.048 , -4.277 }, // 23
6163  { 62.486260, 1517.00 , 0.083 , 14.68 , 0.0 , -4.290 , 0.238 }, // 24
6164  { 62.997977, 1503.00 , 1.665 , 11.39 , 0.0 , 0.134 , -4.860 }, // 25
6165  { 63.568518, 1087.00 , 2.115 , 11.08 , 0.0 , 0.541 , -5.079 }, // 26
6166  { 64.127767, 733.50 , 2.620 , 10.78 , 0.0 , 0.814 , -5.525 }, // 27
6167  { 64.678903, 463.50 , 3.195 , 10.50 , 0.0 , 0.415 , -5.520 }, // 28
6168  { 65.224071, 274.80 , 3.815 , 10.20 , 0.0 , 0.069 , -5.520 }, // 29
6169  { 65.764772, 153.00 , 4.485 , 10.00 , 0.0 , -0.143 , -5.520 }, // 30
6170  { 66.302091, 80.09 , 5.225 , 9.70 , 0.0 , -0.428 , -5.520 }, // 31
6171  { 66.836830, 39.46 , 6.005 , 9.40 , 0.0 , -0.726 , -5.520 }, // 32
6172  { 67.369598, 18.32 , 6.845 , 9.20 , 0.0 , -1.002 , -5.520 }, // 33
6173  { 67.900867, 8.01 , 7.745 , 8.90 , 0.0 , -1.255 , -5.520 }, // 34
6174  { 68.431005, 3.30 , 8.695 , 8.70 , 0.0 , -1.500 , -5.520 }, // 35
6175  { 68.960311, 1.28 , 9.695 , 8.60 , 0.0 , -1.700 , -5.520 }, // 36
6176  { 118.750343, 945.00 , 0.009 , 16.30 , 0.0 , -0.247 , 0.003 }, // 37
6177  { 368.498350, 67.90 , 0.049 , 19.20 , 0.6 , 0.000 , 0.000 }, // 38
6178  { 424.763124, 638.00 , 0.044 , 19.16 , 0.6 , 0.000 , 0.000 }, // 39
6179  { 487.249370, 235.00 , 0.049 , 19.20 , 0.6 , 0.000 , 0.000 }, // 40
6180  { 715.393150, 99.60 , 0.145 , 18.10 , 0.6 , 0.000 , 0.000 }, // 41
6181  { 773.839675, 671.00 , 0.130 , 18.10 , 0.6 , 0.000 , 0.000 }, // 42
6182  { 834.145330, 180.00 , 0.147 , 18.10 , 0.6 , 0.000 , 0.000 } // 43
6183  };
6184 
6185  // number of lines of Liebe O2-line catalog (0-43 lines)
6186  const Index i_first = 0;
6187  const Index i_last = 43; // all the spec. lines up to 1THz
6188  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6189 
6190 
6191  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6192  // standard values for the MPM89 model (IJIMW, Vol 10, pp. 631-650, 1989):
6193  const Numeric CC_MPM89 = 1.00000;
6194  const Numeric CL_MPM89 = 1.00000;
6195  const Numeric CW_MPM89 = 1.00000;
6196  const Numeric CO_MPM89 = 1.00000;
6197  int AppCutoff = 0;
6198  // ---------------------------------------------------------------------------------------
6199 
6200 
6201  // select the parameter set (!!model dominates values!!):
6202  Numeric CC, CL, CW, CO;
6203  if ( model == "MPM89" )
6204  {
6205  CC = CC_MPM89;
6206  CL = CL_MPM89;
6207  CW = CW_MPM89;
6208  CO = CO_MPM89;
6209  }
6210  else if ( model == "MPM89Lines" )
6211  {
6212  CC = 0.000;
6213  CL = CL_MPM89;
6214  CW = CW_MPM89;
6215  CO = CO_MPM89;
6216  }
6217  else if ( model == "MPM89Continuum" )
6218  {
6219  CC = CC_MPM89;
6220  CL = 0.000;
6221  CW = 0.000;
6222  CO = 0.000;
6223  }
6224  else if ( model == "MPM89NoCoupling" )
6225  {
6226  CC = CC_MPM89;
6227  CL = CL_MPM89;
6228  CW = CW_MPM89;
6229  CO = 0.000;
6230  }
6231  else if ( model == "MPM89NoCutoff" )
6232  {
6233  CC = CC_MPM89;
6234  CL = CL_MPM89;
6235  CW = CW_MPM89;
6236  CO = CO_MPM89;
6237  AppCutoff = 1;
6238  }
6239  else if ( model == "user" )
6240  {
6241  CC = CCin;
6242  CL = CLin;
6243  CW = CWin;
6244  CO = COin;
6245  }
6246  else
6247  {
6248  ostringstream os;
6249  os << "O2-MPM89: ERROR! Wrong model values given.\n"
6250  << "Valid models are: 'MPM89' 'MPM89Lines' 'MPM89Continuum' 'MPM89NoCoupling' 'MPM89NoCutoff'"
6251  << "and 'user'" << '\n';
6252  throw runtime_error(os.str());
6253  }
6254  out3 << "O2-MPM89: (model=" << model << ") parameter values in use:\n"
6255  << " CC = " << CC << "\n"
6256  << " CL = " << CL << "\n"
6257  << " CW = " << CW << "\n"
6258  << " CO = " << CO << "\n";
6259 
6260 
6261  // O2 continuum parameters of MPM92:
6262  const Numeric S0 = 6.140e-4; // line strength [ppm]
6263  const Numeric G0 = 5.60e-3; // line width [GHz/kPa]
6264  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6265 
6266  const Index n_p = p_abs.nelem(); // Number of pressure levels
6267  const Index n_f = f_mono.nelem(); // Number of frequencies
6268 
6269  // const = VMR * ISORATIO = 0.20946 * 0.99519
6270  // this constant is already incorporated into the line strength, so we
6271  // have top devide the line strength by this value since arts multiplies xsec
6272  // by these variables later in absCalc.
6273  const Numeric VMRISO = 0.2085;
6274 
6275  // Check that dimensions of p_abs, t_abs, and vmr agree:
6276  assert ( n_p==t_abs.nelem() );
6277  assert ( n_p==vmr.nelem() );
6278 
6279  // Check that dimensions of xsec are consistent with n_f
6280  // and n_p. It should be [n_f,n_p]:
6281  assert ( n_f==xsec.nrows() );
6282  assert ( n_p==xsec.ncols() );
6283 
6284  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6285  for ( Index i=0; i<n_p; ++i )
6286  {
6287  // check if O2-VMR will cause an underflow due to division by zero:
6288  if (vmr[i] < VMRCalcLimit)
6289  {
6290  ostringstream os;
6291  os << "ERROR: MPM89 O2 full absorption model has detected a O2 volume mixing ratio of "
6292  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6293  << "Therefore no calculation is performed.\n";
6294  throw runtime_error(os.str());
6295  return;
6296  }
6297 
6298  // relative inverse temperature [1]
6299  Numeric theta = (300.0 / t_abs[i]);
6300  // H2O partial pressure [kPa]
6301  Numeric pwv = Pa_to_kPa * p_abs[i] * h2o_abs[i];
6302  // dry air partial pressure [kPa]
6303  Numeric pda = (Pa_to_kPa * p_abs[i]) - pwv;
6304  // here the total pressure is devided by the O2 vmr for the
6305  // P_dry calculation because we calculate xsec and not abs: abs = vmr * xsec
6306  Numeric pda_dummy = pda;
6307  // O2 continuum strength [ppm]
6308  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6309  // O2 continuum pseudo line broadening [GHz]
6310  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6311 
6312  // Loop over input frequency
6313  for ( Index s=0; s<n_f; ++s )
6314  {
6315  // input frequency in [GHz]
6316  Numeric ff = f_mono[s] * Hz_to_GHz;
6317  // O2 continuum absorption [1/m]
6318  // cross section: xsec = absorption / var
6319  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6320  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6321  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6322 
6323  // Loop over MPM89 O2 spectral lines:
6324  Numeric Nppl = 0.0;
6325  for ( Index l = i_first; l <= i_last; ++l )
6326  {
6327  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6328  Numeric strength = CL * mpm89[l][1] * 1.000e-6 * pda_dummy *
6329  pow(theta, (Numeric)3.) * exp(mpm89[l][2]*(1.000-theta)) /
6330  mpm89[l][0];
6331  // line broadening parameter [GHz]
6332  Numeric gam = CW * ( mpm89[l][3] * 1.000e-3 *
6333  ( ( pda * pow(theta, ((Numeric)0.80-mpm89[l][4]))) +
6334  (1.10 * pwv * theta) ) );
6335  // line mixing parameter [1]
6336  Numeric delta = CO * ( (mpm89[l][5] + mpm89[l][6] * theta) * 1.000e-3 *
6337  pda * pow(theta, (Numeric)0.8) );
6338  // absorption [dB/km] like in the original MPM92
6339  Nppl += strength * MPMLineShapeO2Function(gam, mpm89[l][0], ff, delta);
6340  }
6341  // in MPM89 we adopt the cutoff for O2 line absorption if abs_l < 0
6342  // absorption cannot be less than 0 according to MPM87 source code.
6343  if (AppCutoff == 0)
6344  {
6345  if (Nppl < 0.000) Nppl = 0.0000;
6346  }
6347  //
6348  // O2 line absorption [1/m]
6349  // cross section: xsec = absorption / var
6350  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6351  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6352  }
6353  }
6354  return;
6355 }
6356 //
6357 // #################################################################################
6358 //
6359 //
6392  const Numeric CCin, // continuum scale factor
6393  const Numeric CLin, // line strength scale factor
6394  const Numeric CWin, // line broadening scale factor
6395  const Numeric COin, // line coupling scale factor
6396  const String& model,
6397  ConstVectorView f_mono,
6398  ConstVectorView p_abs,
6399  ConstVectorView t_abs,
6400  ConstVectorView h2o_abs,
6401  ConstVectorView vmr )
6402 {
6403  //
6404  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6405  // 0 1 2 3 4 5 6
6406  // f0 a1 a2 a3 a4 a5 a6
6407  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [10³/hPa]
6408  const Numeric mpm92[44][7] = {
6409  { 50.474238, 0.094, 9.694, 0.850, 0.0, 0.210, 0.685}, // 0
6410  { 50.987749, 0.246, 8.694, 0.870, 0.0, 0.190, 0.680}, // 1
6411  { 51.503350, 0.608, 7.744, 0.890, 0.0, 0.171, 0.673}, // 2
6412  { 52.021410, 1.414, 6.844, 0.920, 0.0, 0.144, 0.664}, // 3
6413  { 52.542394, 3.102, 6.004, 0.940, 0.0, 0.118, 0.653}, // 4
6414  { 53.066907, 6.410, 5.224, 0.970, 0.0, 0.114, 0.621}, // 5
6415  { 53.595749, 12.470, 4.484, 1.000, 0.0, 0.200, 0.508}, // 6
6416  { 54.130000, 22.800, 3.814, 1.020, 0.0, 0.291, 0.375}, // 7
6417  { 54.671159, 39.180, 3.194, 1.050, 0.0, 0.325, 0.265}, // 8
6418  { 55.221367, 63.160, 2.624, 1.080, 0.0, 0.224, 0.295}, // 9
6419  { 55.783802, 95.350, 2.119, 1.110, 0.0, -0.144, 0.613}, // 0
6420  { 56.264775, 54.890, 0.015, 1.646, 0.0, 0.339, -0.098}, // 11
6421  { 56.363389, 134.400, 1.660, 1.144, 0.0, -0.258, 0.655}, // 12
6422  { 56.968206, 176.300, 1.260, 1.181, 0.0, -0.362, 0.645}, // 13
6423  { 57.612484, 214.100, 0.915, 1.221, 0.0, -0.533, 0.606}, // 14
6424  { 58.323877, 238.600, 0.626, 1.266, 0.0, -0.178, 0.044}, // 15
6425  { 58.446590, 145.700, 0.084, 1.449, 0.0, 0.650, -0.127}, // 16
6426  { 59.164207, 240.400, 0.391, 1.319, 0.0, -0.628, 0.231}, // 17
6427  { 59.590983, 211.200, 0.212, 1.360, 0.0, 0.665, -0.078}, // 18
6428  { 60.306061, 212.400, 0.212, 1.382, 0.0, -0.613, 0.070}, // 19
6429  { 60.434776, 246.100, 0.391, 1.297, 0.0, 0.606, -0.282}, // 20
6430  { 61.150560, 250.400, 0.626, 1.248, 0.0, 0.090, -0.058}, // 21
6431  { 61.800154, 229.800, 0.915, 1.207, 0.0, 0.496, -0.662}, // 22
6432  { 62.411215, 193.300, 1.260, 1.171, 0.0, 0.313, -0.676}, // 23
6433  { 62.486260, 151.700, 0.083, 1.468, 0.0, -0.433, 0.084}, // 24
6434  { 62.997977, 150.300, 1.665, 1.139, 0.0, 0.208, -0.668}, // 25
6435  { 63.568518, 108.700, 2.115, 1.110, 0.0, 0.094, -0.614}, // 26
6436  { 64.127767, 73.350, 2.620, 1.080, 0.0, -0.270, -0.289}, // 27
6437  { 64.678903, 46.350, 3.195, 1.050, 0.0, -0.366, -0.259}, // 28
6438  { 65.224071, 27.480, 3.815, 1.020, 0.0, -0.326, -0.368}, // 29
6439  { 65.764772, 15.300, 4.485, 1.000, 0.0, -0.232, -0.500}, // 30
6440  { 66.302091, 8.009, 5.225, 0.970, 0.0, -0.146, -0.609}, // 31
6441  { 66.836830, 3.946, 6.005, 0.940, 0.0, -0.147, -0.639}, // 32
6442  { 67.369598, 1.832, 6.845, 0.920, 0.0, -0.174, -0.647}, // 33
6443  { 67.900867, 0.801, 7.745, 0.890, 0.0, -0.198, -0.655}, // 34
6444  { 68.431005, 0.330, 8.695, 0.870, 0.0, -0.210, -0.660}, // 35
6445  { 68.960311, 0.128, 9.695, 0.850, 0.0, -0.220, -0.665}, // 36
6446  { 118.750343, 94.500, 0.009, 1.630, 0.0, -0.031, 0.008}, // 37
6447  { 368.498350, 6.790, 0.049, 1.920, 0.6, 0.000, 0.000}, // 38
6448  { 424.763124, 63.800, 0.044, 1.926, 0.6, 0.000, 0.000}, // 39
6449  { 487.249370, 23.500, 0.049, 1.920, 0.6, 0.000, 0.000}, // 40
6450  { 715.393150, 9.960, 0.145, 1.810, 0.6, 0.000, 0.000}, // 41
6451  { 773.839675, 67.100, 0.130, 1.810, 0.6, 0.000, 0.000}, // 42
6452  { 834.145330, 18.000, 0.147, 1.810, 0.6, 0.000, 0.000}}; // 43
6453 
6454  // number of lines of Liebe O2-line catalog (0-43 lines)
6455  const Index i_first = 0;
6456  const Index i_last = 43; // all the spec. lines up to 1THz
6457  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6458 
6459 
6460  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6461  // standard values for the MPM92 model (JQSRT, Vol 48, pp. 629-643, 1992):
6462  const Numeric CC_MPM92 = 1.00000;
6463  const Numeric CL_MPM92 = 1.00000;
6464  const Numeric CW_MPM92 = 1.00000;
6465  const Numeric CO_MPM92 = 1.00000;
6466  int AppCutoff = 0;
6467  // ---------------------------------------------------------------------------------------
6468 
6469 
6470  // select the parameter set (!!model dominates values!!):
6471  Numeric CC, CL, CW, CO;
6472  if ( model == "MPM92" )
6473  {
6474  CC = CC_MPM92;
6475  CL = CL_MPM92;
6476  CW = CW_MPM92;
6477  CO = CO_MPM92;
6478  }
6479  else if ( model == "MPM92Lines" )
6480  {
6481  CC = 0.000;
6482  CL = CL_MPM92;
6483  CW = CW_MPM92;
6484  CO = CO_MPM92;
6485  }
6486  else if ( model == "MPM92Continuum" )
6487  {
6488  CC = CC_MPM92;
6489  CL = 0.000;
6490  CW = 0.000;
6491  CO = 0.000;
6492  }
6493  else if ( model == "MPM92NoCoupling" )
6494  {
6495  CC = CC_MPM92;
6496  CL = CL_MPM92;
6497  CW = CW_MPM92;
6498  CO = 0.000;
6499  }
6500  else if ( model == "MPM92NoCutoff" )
6501  {
6502  CC = CC_MPM92;
6503  CL = CL_MPM92;
6504  CW = CW_MPM92;
6505  CO = CO_MPM92;
6506  AppCutoff = 1;
6507  }
6508  else if ( model == "user" )
6509  {
6510  CC = CCin;
6511  CL = CLin;
6512  CW = CWin;
6513  CO = COin;
6514  }
6515  else
6516  {
6517  ostringstream os;
6518  os << "O2-MPM92: ERROR! Wrong model values given.\n"
6519  << "Valid models are: 'MPM92' 'MPM92Lines' 'MPM92Continuum' 'MPM92NoCoupling' 'MPM92NoCutoff'"
6520  << "and 'user'" << '\n';
6521  throw runtime_error(os.str());
6522  }
6523  out3 << "O2-MPM92: (model=" << model << ") parameter values in use:\n"
6524  << " CC = " << CC << "\n"
6525  << " CL = " << CL << "\n"
6526  << " CW = " << CW << "\n"
6527  << " CO = " << CO << "\n";
6528 
6529 
6530  // const = VMR * ISORATIO = 0.20946 * 0.99519
6531  // this constant is already incorporated into the line strength, so we
6532  // have top devide the line strength by this value since arts multiplies xsec
6533  // by these variables later in absCalc.
6534  const Numeric VMRISO = 0.2085;
6535 
6536  // O2 continuum parameters of MPM92:
6537  const Numeric S0 = 6.140e-5; // line strength [ppm]
6538  const Numeric G0 = 0.560e-3; // line width [GHz/hPa]
6539  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6540 
6541  const Index n_p = p_abs.nelem(); // Number of pressure levels
6542  const Index n_f = f_mono.nelem(); // Number of frequencies
6543 
6544  // Check that dimensions of p_abs, t_abs, and vmr agree:
6545  assert ( n_p==t_abs.nelem() );
6546  assert ( n_p==vmr.nelem() );
6547 
6548  // Check that dimensions of xsec are consistent with n_f
6549  // and n_p. It should be [n_f,n_p]:
6550  assert ( n_f==xsec.nrows() );
6551  assert ( n_p==xsec.ncols() );
6552 
6553  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6554  for ( Index i=0; i<n_p; ++i )
6555  {
6556  // check if O2-VMR will cause an underflow due to division by zero:
6557  if (vmr[i] < VMRCalcLimit)
6558  {
6559  ostringstream os;
6560  os << "ERROR: MPM92 O2 full absorption model has detected a O2 volume mixing ratio of "
6561  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6562  << "Therefore no calculation is performed.\n";
6563  throw runtime_error(os.str());
6564  return;
6565  }
6566 
6567  // relative inverse temperature [1]
6568  Numeric theta = (300.0 / t_abs[i]);
6569  // H2O partial pressure [hPa]
6570  Numeric pwv = Pa_to_hPa * p_abs[i] * h2o_abs[i];
6571  // dry air partial pressure [hPa]
6572  Numeric pda = (Pa_to_hPa * p_abs[i]) - pwv;
6573  // here the total pressure is devided by the O2 vmr for the
6574  // P_dry calculation because we calculate xsec and not abs: abs = vmr * xsec
6575  Numeric pda_dummy = pda;
6576  // O2 continuum strength [ppm]
6577  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6578  // O2 continuum pseudo line broadening [GHz]
6579  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6580 
6581  // Loop over input frequency
6582  for ( Index s=0; s<n_f; ++s )
6583  {
6584  // input frequency in [GHz]
6585  Numeric ff = f_mono[s] * Hz_to_GHz;
6586  // O2 continuum absorption [1/m]
6587  // cross section: xsec = absorption / var
6588  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6589  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6590  ( pow( ff, (Numeric)2.) + pow( gam_cont, (Numeric)2.) );
6591 
6592  // Loop over MPM92 O2 spectral lines:
6593  Numeric Nppl = 0.0;
6594  for ( Index l = i_first; l <= i_last; ++l )
6595  {
6596  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6597  Numeric strength = CL * 1.000e-6 * pda_dummy * mpm92[l][1] / mpm92[l][0] *
6598  pow(theta, (Numeric)3.) * exp(mpm92[l][2]*(1.0-theta));
6599  // line broadening parameter [GHz]
6600  Numeric gam = CW * ( mpm92[l][3] * 0.001 *
6601  ( ( pda * pow(theta, ((Numeric)0.8-mpm92[l][4]))) +
6602  (1.10 * pwv * theta) ) );
6603  // line mixing parameter [1]
6604  // if (l < 11) CD = 1.1000;
6605  Numeric delta = CO * ( (mpm92[l][5] + mpm92[l][6] * theta) *
6606  (pda+pwv) * 0.001 * pow(theta, (Numeric)0.8) );
6607  // absorption [dB/km] like in the original MPM92
6608  Nppl += strength * MPMLineShapeO2Function(gam, mpm92[l][0], ff, delta);
6609  }
6610  // in MPM92 we adopt the cutoff for O2 line absorption if abs_l < 0
6611  // absorption cannot be less than 0 according to MPM87 and MPM93 source code.
6612  if (AppCutoff == 0)
6613  {
6614  if (Nppl < 0.000) Nppl = 0.0000;
6615  }
6616  //
6617  // O2 line absorption [1/m]
6618  // cross section: xsec = absorption / var
6619  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6620  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6621  }
6622  }
6623  return;
6624 }
6625 //
6626 // #################################################################################
6627 //
6661  const Numeric CCin, // continuum scale factor
6662  const Numeric CLin, // line strength scale factor
6663  const Numeric CWin, // line broadening scale factor
6664  const Numeric COin, // line coupling scale factor
6665  const String& model,
6666  ConstVectorView f_mono,
6667  ConstVectorView p_abs,
6668  ConstVectorView t_abs,
6669  ConstVectorView h2o_abs, // VMR 0f H2O
6670  ConstVectorView vmr ) // VMR of O2
6671 {
6672  //
6673  // Coefficients are from Liebe et al., AGARD CP-May93, Paper 3/1-10
6674  // 0 1 2 3 4 5 6
6675  // f0 a1 a2 a3 a4 a5 a6
6676  // [GHz] [kHz/hPa] [1] [MHz/hPa] [1] [10³/hPa]
6677  const Numeric mpm93[44][7] = {
6678  { 50.474238, 0.094, 9.694, 0.890, 0.0, 0.240, 0.790}, // 0
6679  { 50.987749, 0.246, 8.694, 0.910, 0.0, 0.220, 0.780}, // 1
6680  { 51.503350, 0.608, 7.744, 0.940, 0.0, 0.197, 0.774}, // 2
6681  { 52.021410, 1.414, 6.844, 0.970, 0.0, 0.166, 0.764}, // 3
6682  { 52.542394, 3.102, 6.004, 0.990, 0.0, 0.136, 0.751}, // 4
6683  { 53.066907, 6.410, 5.224, 1.020, 0.0, 0.131, 0.714}, // 5
6684  { 53.595749, 12.470, 4.484, 1.050, 0.0, 0.230, 0.584}, // 6
6685  { 54.130000, 22.800, 3.814, 1.070, 0.0, 0.335, 0.431}, // 7
6686  { 54.671159, 39.180, 3.194, 1.100, 0.0, 0.374, 0.305}, // 8
6687  { 55.221367, 63.160, 2.624, 1.130, 0.0, 0.258, 0.339}, // 9
6688  { 55.783802, 95.350, 2.119, 1.170, 0.0, -0.166, 0.705}, // 10
6689  { 56.264775, 54.890, 0.015, 1.730, 0.0, 0.390, -0.113}, // 11
6690  { 56.363389, 134.400, 1.660, 1.200, 0.0, -0.297, 0.753}, // 12
6691  { 56.968206, 176.300, 1.260, 1.240, 0.0, -0.416, 0.742}, // 13
6692  { 57.612484, 214.100, 0.915, 1.280, 0.0, -0.613, 0.697}, // 14
6693  { 58.323877, 238.600, 0.626, 1.330, 0.0, -0.205, 0.051}, // 15
6694  { 58.446590, 145.700, 0.084, 1.520, 0.0, 0.748, -0.146}, // 16
6695  { 59.164207, 240.400, 0.391, 1.390, 0.0, -0.722, 0.266}, // 17
6696  { 59.590983, 211.200, 0.212, 1.430, 0.0, 0.765, -0.090}, // 18
6697  { 60.306061, 212.400, 0.212, 1.450, 0.0, -0.705, 0.081}, // 19
6698  { 60.434776, 246.100, 0.391, 1.360, 0.0, 0.697, -0.324}, // 20
6699  { 61.150560, 250.400, 0.626, 1.310, 0.0, 0.104, -0.067}, // 21
6700  { 61.800154, 229.800, 0.915, 1.270, 0.0, 0.570, -0.761}, // 22
6701  { 62.411215, 193.300, 1.260, 1.230, 0.0, 0.360, -0.777}, // 23
6702  { 62.486260, 151.700, 0.083, 1.540, 0.0, -0.498, 0.097}, // 24
6703  { 62.997977, 150.300, 1.665, 1.200, 0.0, 0.239, -0.768}, // 25
6704  { 63.568518, 108.700, 2.115, 1.170, 0.0, 0.108, -0.706}, // 26
6705  { 64.127767, 73.350, 2.620, 1.130, 0.0, -0.311, -0.332}, // 27
6706  { 64.678903, 46.350, 3.195, 1.100, 0.0, -0.421, -0.298}, // 28
6707  { 65.224071, 27.480, 3.815, 1.070, 0.0, -0.375, -0.423}, // 29
6708  { 65.764772, 15.300, 4.485, 1.050, 0.0, -0.267, -0.575}, // 30
6709  { 66.302091, 8.009, 5.225, 1.020, 0.0, -0.168, -0.700}, // 31
6710  { 66.836830, 3.946, 6.005, 0.990, 0.0, -0.169, -0.735}, // 32
6711  { 67.369598, 1.832, 6.845, 0.970, 0.0, -0.200, -0.744}, // 33
6712  { 67.900867, 0.801, 7.745, 0.940, 0.0, -0.228, -0.753}, // 34
6713  { 68.431005, 0.330, 8.695, 0.920, 0.0, -0.240, -0.760}, // 35
6714  { 68.960311, 0.128, 9.695, 0.900, 0.0, -0.250, -0.765}, // 36
6715  { 118.750343, 94.500, 0.009, 1.630, 0.0, -0.036, 0.009}, // 37
6716  { 368.498350, 6.790, 0.049, 1.920, 0.6, 0.000, 0.000}, // 38
6717  { 424.763124, 63.800, 0.044, 1.930, 0.6, 0.000, 0.000}, // 39
6718  { 487.249370, 23.500, 0.049, 1.920, 0.6, 0.000, 0.000}, // 40
6719  { 715.393150, 9.960, 0.145, 1.810, 0.6, 0.000, 0.000}, // 41
6720  { 773.839675, 67.100, 0.130, 1.820, 0.6, 0.000, 0.000}, // 42
6721  { 834.145330, 18.000, 0.147, 1.810 , 0.6, 0.000, 0.000}}; // 43
6722  // number of lines of Liebe O2-line catalog (0-43 lines)
6723  const Index i_first = 0;
6724  const Index i_last = 43; // all the spec. lines up to 1THz
6725  // const Index i_last = 37; // only the 60GHz complex + 118GHz line
6726 
6727 
6728  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
6729  // standard values for the MPM87 model (Radio Science, 20(5), 1985, 1069):
6730  const Numeric CC_MPM93 = 1.00000;
6731  const Numeric CL_MPM93 = 1.00000;
6732  const Numeric CW_MPM93 = 1.00000;
6733  const Numeric CO_MPM93 = 1.00000;
6734  int AppCutoff = 0;
6735  // ---------------------------------------------------------------------------------------
6736 
6737 
6738  // select the parameter set (!!model dominates values!!):
6739  Numeric CC, CL, CW, CO;
6740  if ( model == "MPM93" )
6741  {
6742  CC = CC_MPM93;
6743  CL = CL_MPM93;
6744  CW = CW_MPM93;
6745  CO = CO_MPM93;
6746  }
6747  else if ( model == "MPM93Lines" )
6748  {
6749  CC = 0.000;
6750  CL = CL_MPM93;
6751  CW = CW_MPM93;
6752  CO = CO_MPM93;
6753  }
6754  else if ( model == "MPM93Continuum" )
6755  {
6756  CC = CC_MPM93;
6757  CL = 0.000;
6758  CW = 0.000;
6759  CO = 0.000;
6760  }
6761  else if ( model == "MPM93NoCoupling" )
6762  {
6763  CC = CC_MPM93;
6764  CL = CL_MPM93;
6765  CW = CW_MPM93;
6766  CO = 0.000;
6767  }
6768  else if ( model == "MPM93NoCutoff" )
6769  {
6770  // !!ATTENTION!!
6771  // In the window regions the total absorption can get negative values.
6772  // So be carefull with this selection!
6773  CC = CC_MPM93;
6774  CL = CL_MPM93;
6775  CW = CW_MPM93;
6776  CO = CO_MPM93;
6777  AppCutoff = 1;
6778  }
6779  else if ( model == "user" )
6780  {
6781  CC = CCin;
6782  CL = CLin;
6783  CW = CWin;
6784  CO = COin;
6785  }
6786  else
6787  {
6788  ostringstream os;
6789  os << "O2-MPM93: ERROR! Wrong model values given.\n"
6790  << "Valid models are: 'MPM93' 'MPM93Lines' 'MPM93Continuum' 'MPM93NoCoupling' 'MPM93NoCutoff'"
6791  << "and 'user'" << '\n';
6792  throw runtime_error(os.str());
6793  }
6794  out3 << "O2-MPM93: (model=" << model << ") parameter values in use:\n"
6795  << " CC = " << CC << "\n"
6796  << " CL = " << CL << "\n"
6797  << " CW = " << CW << "\n"
6798  << " CO = " << CO << "\n";
6799 
6800 
6801  // const = VMR * ISORATIO = 0.20946 * 0.99519
6802  // this constant is already incorporated into the line strength, so we
6803  // have top devide the line strength by this value since arts multiplies xsec
6804  // by these variables later in absCalc.
6805  const Numeric VMRISO = 0.2085;
6806 
6807  // O2 continuum parameters of MPM93:
6808  const Numeric S0 = 6.140e-5; // line strength [ppm]
6809  const Numeric G0 = 0.560e-3; // line width [GHz/hPa]
6810  const Numeric X0 = 0.800; // temperature dependence of line width [1]
6811 
6812  const Index n_p = p_abs.nelem(); // Number of pressure levels
6813  const Index n_f = f_mono.nelem(); // Number of frequencies
6814 
6815  // Check that dimensions of p_abs, t_abs, and vmr agree:
6816  assert ( n_p==t_abs.nelem() );
6817  assert ( n_p==vmr.nelem() );
6818 
6819  // Check that dimensions of xsec are consistent with n_f
6820  // and n_p. It should be [n_f,n_p]:
6821  assert ( n_f==xsec.nrows() );
6822  assert ( n_p==xsec.ncols() );
6823 
6824  // Loop pressure/temperature (pressure in hPa therefore the factor 0.01)
6825  for ( Index i=0; i<n_p; ++i )
6826  {
6827  // check if O2-VMR will cause an underflow due to division by zero:
6828  if (vmr[i] < VMRCalcLimit)
6829  {
6830  ostringstream os;
6831  os << "ERROR: MPM93 O2 full absorption model has detected a O2 volume mixing ratio of "
6832  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
6833  << "Therefore no calculation is performed.\n";
6834  throw runtime_error(os.str());
6835  return;
6836  }
6837 
6838  // relative inverse temperature [1]
6839  Numeric theta = (300.0 / t_abs[i]);
6840  // H2O partial pressure [hPa]
6841  Numeric pwv = Pa_to_hPa * p_abs[i] * h2o_abs[i];
6842  // dry air partial pressure [hPa]
6843  Numeric pda = (Pa_to_hPa * p_abs[i]) - pwv;
6844  // here the total pressure is devided by the O2 vmr for the
6845  // P_dry calculation because we calculate xsec and not abs: abs = vmr * xsec
6846  // old version without VMRISO: Numeric pda_dummy = pda / vmr[i];
6847  Numeric pda_dummy = pda;
6848  // O2 continuum strength [ppm]
6849  Numeric strength_cont = S0 * pda_dummy * pow( theta, (Numeric)2. );
6850  // O2 continuum pseudo line broadening [GHz]
6851  Numeric gam_cont = G0 * (pwv+pda) * pow( theta, X0 ); // GHz
6852 
6853  // Loop over input frequency
6854  for ( Index s=0; s<n_f; ++s )
6855  {
6856  // input frequency in [GHz]
6857  Numeric ff = f_mono[s] * Hz_to_GHz;
6858  // O2 continuum absorption [1/m]
6859  // cross section: xsec = absorption / var
6860  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6861  Numeric Nppc = CC * strength_cont * ff * gam_cont /
6862  ( pow( ff, (Numeric)2.)
6863  + pow( gam_cont, (Numeric)2.) );
6864 
6865  // Loop over MPM93 O2 spectral lines:
6866  Numeric Nppl = 0.0;
6867  for ( Index l = i_first; l <= i_last; ++l )
6868  {
6869  // line strength [ppm] S=A(1,I)*P*V**3*EXP(A(2,I)*(1.-V))*1.E-6
6870  Numeric strength = CL * 1.000e-6 * pda_dummy *
6871  mpm93[l][1] / mpm93[l][0] *
6872  pow(theta, (Numeric)3.) * exp(mpm93[l][2]*(1.0-theta));
6873  // line broadening parameter [GHz]
6874  Numeric gam = CW * ( mpm93[l][3] * 0.001 *
6875  ( ( pda * pow(theta, ((Numeric)0.8-mpm93[l][4]))) +
6876  (1.10 * pwv * theta) ) );
6877  // line mixing parameter [1]
6878  // if (l < 11) CD = 1.1000;
6879  Numeric delta = CO * ( (mpm93[l][5] + mpm93[l][6] * theta) *
6880  (pda+pwv) * pow(theta, (Numeric)0.8)
6881  * (Numeric)0.001 );
6882  // absorption [dB/km] like in the original MPM93
6883  Nppl += strength * MPMLineShapeO2Function(gam, mpm93[l][0], ff, delta);
6884  }
6885  // in MPM93 there is a cutoff for O2 line absorption if abs_l < 0
6886  // absorption cannot be less than 0 according to MPM93 philosophy.
6887  if (AppCutoff == 0)
6888  {
6889  if (Nppl < 0.000) Nppl = 0.0000;// <---!!IMPORTANT FEATURE!!
6890  }
6891  //
6892  // O2 line absorption [1/m]
6893  // cross section: xsec = absorption / var
6894  // the vmr of O2 will be multiplied at the stage of absorption calculation:
6895  xsec(s,i) += dB_km_to_1_m * 0.1820 * ff * (Nppl+Nppc) / VMRISO;
6896  }
6897  }
6898  return;
6899 }
6900 //
6901 // #################################################################################
6902 //
6903 // Oxygen complex at 60 GHz plus mm O2 lines plus O2 continuum
6904 //
6905 // REFERENCES FOR EQUATIONS AND COEFFICIENTS:
6906 // P.W. Rosenkranz, CHAP. 2 and appendix, in ATMOSPHERIC REMOTE SENSING
6907 // BY MICROWAVE RADIOMETRY (M.A. Janssen, ed., 1993).
6908 // H.J. Liebe et al, JQSRT V.48, PP.629-643 (1992).
6909 // M.J. Schwartz, Ph.D. thesis, M.I.T. (1997).
6910 // SUBMILLIMETER LINE INTENSITIES FROM HITRAN96.
6911 // This version differs from Liebe's MPM92 in two significant respects:
6912 // 1. It uses the modification of the 1- line width temperature dependence
6913 // recommended by Schwartz: (1/T).
6914 // 2. It uses the same temperature dependence (X) for submillimeter
6915 // line widths as in the 60 GHz band: (1/T)**0.8
6916 //
6917 // history:
6918 // 05-01-95 P. Rosenkranz
6919 // 11-05-97 P. Rosenkranz - 1- line modification.
6920 // 12-16-98 pwr - updated submm freq's and intensities from HITRAN96
6921 //
6958  const Numeric CCin, // model parameter
6959  const Numeric CLin, // model parameter
6960  const Numeric CWin, // model parameter
6961  const Numeric COin, // model parameter
6962  const String& model, // model selection string
6963  const String& version, // PWR98, PWR93 or PWR88
6964  ConstVectorView f_mono,
6965  ConstVectorView p_abs,
6966  ConstVectorView t_abs,
6967  ConstVectorView vmrh2o,
6968  ConstVectorView vmr )
6969 {
6970  const Index n_lines = 40; // all O2 lines in this model (range: 50-850 GHz)
6971  //
6972  // lines are arranged 1-,1+,3-,3+,etc. in spin-rotation spectrum
6973  // line center frequency in [GHz]
6974  const Numeric F93[n_lines] = { 118.7503, 56.2648, 62.4863, 58.4466, // 00-03
6975  60.3061, 59.5910, 59.1642, 60.4348, // 04-07
6976  58.3239, 61.1506, 57.6125, 61.8002, // 08-11
6977  56.9682, 62.4112, 56.3634, 62.9980, // 12-15
6978  55.7838, 63.5685, 55.2214, 64.1278, // 16-19
6979  54.6712, 64.6789, 54.1300, 65.2241, // 20-23
6980  53.5957, 65.7648, 53.0669, 66.3021, // 24-27
6981  52.5424, 66.8368, 52.0214, 67.3696, // 28-31
6982  51.5034, 67.9009, 368.4984, 424.7631, // 32-35
6983  487.2494, 715.3932, 773.8397, 834.1453}; // 36-39
6984 
6985  // intensities in the submm range are updated according to HITRAN96
6986  const Numeric F98[n_lines] = { 118.7503, 56.2648, 62.4863, 58.4466, 60.3061, 59.5910,
6987  59.1642, 60.4348, 58.3239, 61.1506, 57.6125, 61.8002,
6988  56.9682, 62.4112, 56.3634, 62.9980, 55.7838, 63.5685,
6989  55.2214, 64.1278, 54.6712, 64.6789, 54.1300, 65.2241,
6990  53.5957, 65.7648, 53.0669, 66.3021, 52.5424, 66.8368,
6991  52.0214, 67.3696, 51.5034, 67.9009, 368.4984, 424.7632,
6992  487.2494, 715.3931, 773.8397, 834.1458};
6993 
6994 
6995  // line strength at T=300K in [cm² * Hz]
6996  const Numeric S93[n_lines] = { 0.2936E-14, 0.8079E-15, 0.2480E-14, 0.2228E-14,
6997  0.3351E-14, 0.3292E-14, 0.3721E-14, 0.3891E-14,
6998  0.3640E-14, 0.4005E-14, 0.3227E-14, 0.3715E-14,
6999  0.2627E-14, 0.3156E-14, 0.1982E-14, 0.2477E-14,
7000  0.1391E-14, 0.1808E-14, 0.9124E-15, 0.1230E-14,
7001  0.5603E-15, 0.7842E-15, 0.3228E-15, 0.4689E-15,
7002  0.1748E-15, 0.2632E-15, 0.8898E-16, 0.1389E-15,
7003  0.4264E-16, 0.6899E-16, 0.1924E-16, 0.3229E-16,
7004  0.8191E-17, 0.1423E-16, 0.6460E-15, 0.7047E-14,
7005  0.3011E-14, 0.1826E-14, 0.1152E-13, 0.3971E-14};
7006 
7007  // intensities in the submm range are updated according to HITRAN96
7008  const Numeric S98[n_lines] = { 0.2936E-14, 0.8079E-15, 0.2480E-14, 0.2228E-14,
7009  0.3351E-14, 0.3292E-14, 0.3721E-14, 0.3891E-14,
7010  0.3640E-14, 0.4005E-14, 0.3227E-14, 0.3715E-14,
7011  0.2627E-14, 0.3156E-14, 0.1982E-14, 0.2477E-14,
7012  0.1391E-14, 0.1808E-14, 0.9124E-15, 0.1230E-14,
7013  0.5603E-15, 0.7842E-15, 0.3228E-15, 0.4689E-15,
7014  0.1748E-15, 0.2632E-15, 0.8898E-16, 0.1389E-15,
7015  0.4264E-16, 0.6899E-16, 0.1924E-16, 0.3229E-16,
7016  0.8191E-17, 0.1423E-16, 0.6494E-15, 0.7083E-14,
7017  0.3025E-14, 0.1835E-14, 0.1158E-13, 0.3993E-14};
7018 
7019  // temperature exponent of the line strength in [1]
7020  const Numeric BE[n_lines] = { 0.009, 0.015, 0.083, 0.084,
7021  0.212, 0.212, 0.391, 0.391,
7022  0.626, 0.626, 0.915, 0.915,
7023  1.260, 1.260, 1.660, 1.665,
7024  2.119, 2.115, 2.624, 2.625,
7025  3.194, 3.194, 3.814, 3.814,
7026  4.484, 4.484, 5.224, 5.224,
7027  6.004, 6.004, 6.844, 6.844,
7028  7.744, 7.744, 0.048, 0.044,
7029  0.049, 0.145, 0.141, 0.145};
7030 
7031  // widths in MHz/mbar for the O2 continuum
7032  const Numeric WB300 = 0.56; // [MHz/mbar]=[MHz/hPa]
7033  const Numeric X = 0.80; // [1]
7034 
7035  // line width parameter [GHz/bar]
7036  const Numeric W300[n_lines] = { 1.630, 1.646, 1.468, 1.449,
7037  1.382, 1.360, 1.319, 1.297,
7038  1.266, 1.248, 1.221, 1.207,
7039  1.181, 1.171, 1.144, 1.139,
7040  1.110, 1.108, 1.079, 1.078,
7041  1.050, 1.050, 1.020, 1.020,
7042  1.000, 1.000, 0.970, 0.970,
7043  0.940, 0.940, 0.920, 0.920,
7044  0.890, 0.890, 1.920, 1.920,
7045  1.920, 1.810, 1.810, 1.810};
7046 
7047  // y parameter for the calculation of Y [1/bar]
7048  const Numeric Y93[n_lines] = { -0.0233, 0.2408, -0.3486, 0.5227,
7049  -0.5430, 0.5877, -0.3970, 0.3237,
7050  -0.1348, 0.0311, 0.0725, -0.1663,
7051  0.2832, -0.3629, 0.3970, -0.4599,
7052  0.4695, -0.5199, 0.5187, -0.5597,
7053  0.5903, -0.6246, 0.6656, -0.6942,
7054  0.7086, -0.7325, 0.7348, -0.7546,
7055  0.7702, -0.7864, 0.8083, -0.8210,
7056  0.8439, -0.8529, 0.0000, 0.0000,
7057  0.0000, 0.0000, 0.0000, 0.0000};
7058 
7059  // y parameter for the calculation of Y [1/bar].
7060  // These values are from P. W. Rosenkranz, Interference coefficients for the
7061  // overlapping oxygen lines in air, JQSRT, 1988, Volume 39, 287-297.
7062  const Numeric Y88[n_lines] = { -0.0244, 0.2772, -0.4068, 0.6270,
7063  -0.6183, 0.6766, -0.4119, 0.3290,
7064  0.0317, -0.1591, 0.1145, -0.2068,
7065  0.3398, -0.4158, 0.3922, -0.4482,
7066  0.4011, -0.4442, 0.4339, -0.4687,
7067  0.4783, -0.5074, 0.5157, -0.5403,
7068  0.5400, -0.5610, 0.5719, -0.5896,
7069  0.6046, -0.6194, 0.6347, -0.6468,
7070  0.6627, -0.6718, 0.0000, 0.0000,
7071  0.0000, 0.0000, 0.0000, 0.0000};
7072 
7073  // v parameter for the calculation of Y [1/bar]
7074  const Numeric V[n_lines] ={ 0.0079, -0.0978, 0.0844, -0.1273,
7075  0.0699, -0.0776, 0.2309, -0.2825,
7076  0.0436, -0.0584, 0.6056, -0.6619,
7077  0.6451, -0.6759, 0.6547, -0.6675,
7078  0.6135, -0.6139, 0.2952, -0.2895,
7079  0.2654, -0.2590, 0.3750, -0.3680,
7080  0.5085, -0.5002, 0.6206, -0.6091,
7081  0.6526, -0.6393, 0.6640, -0.6475,
7082  0.6729, -0.6545, 0.0000, 0.0000,
7083  0.0000, 0.0000, 0.0000, 0.0000};
7084  // range of lines to take into account for the line absorption part
7085  const Index first_line = 0; // first line for calculation
7086  const Index last_line = 39; // last line for calculation
7087 
7088  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7089  // standard values for the Rosenkranz model
7090  // (P. W. Rosenkranz, Chapter 2, pp 74, in M. A. Janssen,
7091  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993):
7092  const Numeric CC_PWR93 = 1.00000;
7093  const Numeric CL_PWR93 = 1.00000;
7094  const Numeric CW_PWR93 = 1.00000;
7095  const Numeric CO_PWR93 = 1.00000;
7096  // ---------------------------------------------------------------------------------------
7097 
7098 
7099  // select the parameter set (!!model dominates values!!):
7100  Numeric CC, CL, CW, CO, Y300[n_lines], S300[n_lines], F[n_lines];
7101  // FIXME int oldnewflag = 0;
7102 
7103  if ( model == "Rosenkranz" )
7104  {
7105  CC = CC_PWR93;
7106  CL = CL_PWR93;
7107  CW = CW_PWR93;
7108  CO = CO_PWR93;
7109  }
7110  else if ( model == "RosenkranzLines" )
7111  {
7112  CC = 0.000;
7113  CL = CL_PWR93;
7114  CW = CW_PWR93;
7115  CO = CO_PWR93;
7116  }
7117  else if ( model == "RosenkranzContinuum" )
7118  {
7119  CC = CC_PWR93;
7120  CL = 0.000;
7121  CW = 0.000;
7122  CO = 0.000;
7123  }
7124  else if ( model == "RosenkranzNoCoupling" )
7125  {
7126  CC = CC_PWR93;
7127  CL = CL_PWR93;
7128  CW = CW_PWR93;
7129  CO = 0.000;
7130  }
7131  else if ( model == "user" )
7132  {
7133  CC = CCin;
7134  CL = CLin;
7135  CW = CWin;
7136  CO = COin;
7137  }
7138  else
7139  {
7140  ostringstream os;
7141  os << "O2-PWR93: ERROR! Wrong model values given.\n"
7142  << "Valid models are: 'Rosenkranz', 'RosenkranzLines', RosenkranzContinuum, "
7143  << "'RosenkranzNoCoupling', and 'user'" << '\n';
7144  throw runtime_error(os.str());
7145  }
7146  out3 << "O2-PWR93: (model=" << model << ") parameter values in use:\n"
7147  << " CC = " << CC << "\n"
7148  << " CL = " << CL << "\n"
7149  << " CW = " << CW << "\n"
7150  << " CO = " << CO << "\n";
7151 
7152 
7153  // determin if version Rosenkranz 1993 or Rosenkranz 1988 is selected
7154  if ( (version != "PWR98") && (version != "PWR93") && (version != "PWR88") )
7155  {
7156  ostringstream os;
7157  os << "O2-PWR93/PWR88: ERROR! Wrong version is selected.\n"
7158  << "Valid versions are:\n"
7159  << " 'PWR98' updates of F and S to HISTRAN96 and M.J.Schwartz, MIT, 1997\n"
7160  << " suggestions implemented.\n"
7161  << " 'PWR93' for the oxygen absorption model described in \n"
7162  << " P. W. Rosenkranz, Chapter 2, in M. A. Janssen,\n"
7163  << " Atmospheric Remote Sensing by Microwave Radiometry,\n"
7164  << " John Wiley & Sons, Inc., 1993.\n"
7165  << " 'PWR88' for the oxygen absorption model described in \n"
7166  << " P. W. Rosenkranz, Interference coefficients for the \n"
7167  << " overlapping oxygen lines in air, \n"
7168  << " JQSRT, 1988, Volume 39, 287-297.\n";
7169  throw runtime_error(os.str());
7170  }
7171 
7172 
7173  // select version dependent parameters
7174  if ( version == "PWR88" ) {
7175  for ( Index i=0; i<n_lines; ++i )
7176  {
7177  F[i] = F93[i];
7178  S300[i] = S93[i];
7179  Y300[i] = Y88[i];
7180  };
7181  }
7182  if ( version == "PWR93" ) {
7183  for ( Index i=0; i<n_lines; ++i )
7184  {
7185  F[i] = F93[i];
7186  S300[i] = S93[i];
7187  Y300[i] = Y93[i];
7188  };
7189  }
7190  if ( version == "PWR98" ) {
7191  for ( Index i=0; i<n_lines; ++i )
7192  {
7193  F[i] = F98[i];
7194  S300[i] = S98[i];
7195  Y300[i] = Y93[i];
7196  };
7197  }
7198 
7199  const Index n_p = p_abs.nelem(); // Number of pressure levels
7200  const Index n_f = f_mono.nelem(); // Number of frequencies
7201 
7202  // Check that dimensions of p_abs, t_abs, and vmr agree:
7203  assert ( n_p==t_abs.nelem() );
7204  assert ( n_p==vmr.nelem() );
7205 
7206  // Check that dimensions of xsec are consistent with n_f
7207  // and n_p. It should be [n_f,n_p]:
7208  assert ( n_f==xsec.nrows() );
7209  assert ( n_p==xsec.ncols() );
7210 
7211  // Loop pressure/temperature:
7212  for ( Index i=0; i<n_p; ++i )
7213  {
7214  // check if O2-VMR will cause an underflow due to division by zero:
7215  if (vmr[i] < VMRCalcLimit)
7216  {
7217  ostringstream os;
7218  os << "ERROR: PWR93 O2 full absorption model has detected a O2 volume mixing ratio of "
7219  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
7220  << "Therefore no calculation is performed.\n";
7221  throw runtime_error(os.str());
7222  return;
7223  }
7224  // relative inverse temperature [1]
7225  Numeric TH = 3.0000e2 / t_abs[i];
7226  Numeric TH1 = (TH-1.000e0);
7227  Numeric B = pow(TH, X);
7228  // partial pressure of H2O and dry air [hPa]
7229  Numeric PRESWV = Pa_to_hPa * (p_abs[i] * vmrh2o[i]);
7230  Numeric PRESDA = Pa_to_hPa * (p_abs[i] * (1.000e0 - vmrh2o[i]));
7231  Numeric DEN = 0.001*(PRESDA*B + 1.1*PRESWV*TH); // [hPa]
7232  Numeric DENS = 0.001*(PRESDA + 1.1*PRESWV)*TH; // [hPa]
7233  Numeric DFNR = WB300*DEN; // [GHz]
7234 
7235  // continuum absorption [1/m/GHz]
7236  Numeric CCONT = CC * 1.23e-10 * pow( TH, (Numeric)2. ) * p_abs[i];
7237 
7238  // Loop over input frequency
7239  for ( Index s=0; s<n_f; ++s )
7240  {
7241  // initial O2 line absorption at position ff
7242  // Numeric O2ABS = 0.000e0;cd safff
7243 
7244  // input frequency in [GHz]
7245  Numeric ff = Hz_to_GHz * f_mono[s];
7246 
7247  // continuum absorption [Neper/km]
7248  Numeric CONT = CCONT * (ff * ff * DFNR / (ff*ff + DFNR*DFNR));
7249 
7250  // Loop over Rosnekranz '93 spectral line frequency:
7251  Numeric SUM = 0.000e0;
7252  for ( Index l=first_line; l<=last_line; ++l )
7253  {
7254  Numeric DF = CW * W300[l] * DEN; // [hPa]
7255  // 118 line update according to M. J. Schwartz, MIT, 1997
7256  if ( (version == "PWR98") && (fabs((F[l]-118.75)) < 0.10) )
7257  {
7258  DF = CW * W300[l] * DENS; // [hPa]
7259  }
7260  Numeric Y = CO * 0.001 * 0.01 * p_abs[i] * B * ( Y300[l] + V[l]*TH1 );
7261  Numeric STR = CL * S300[l] * exp(-BE[l] * TH1);
7262  Numeric SF1 = ( DF + (ff-F[l])*Y ) / ( (ff-F[l])*(ff-F[l]) + DF*DF );
7263  Numeric SF2 = ( DF - (ff+F[l])*Y ) / ( (ff+F[l])*(ff+F[l]) + DF*DF );
7264  SUM += STR * (SF1+SF2) * (ff/F[l]) * (ff/F[l]);
7265  }
7266  // O2 absorption [Neper/km]
7267  // Rosenkranz uses the factor 0.5034e12 in the calculation of the abs coeff.
7268  // This factor is the product of several terms:
7269  // 0.5034e12 = ISORATIO * VMR * (Hz/GHz) * (k_B*300K)^-1
7270  // = 0.995262 * 0.20946 * 10^-9 * 2.414322e21(hPa*cm^2*km)^-1
7271  // |---- 0.2085 ----| |---- 2.414322e12(hPa*cm^2*km)^-1 ---|
7272  // |---- 0.2085 ----| |---- 2.414322e10( Pa*cm^2*km)^-1 ---|
7273  // O2ABS = 2.4143e12 * SUM * PRESDA * pow(TH, 3.0) / PI;
7274  // O2ABS = CONT + (2.414322e10 * SUM * p_abs[i] * pow(TH, 3.0) / PI);
7275  // unit conversion x Nepers/km = y 1/m ---> y = x * 1.000e-3
7276  // therefore 2.414322e10 --> 2.414322e7
7277  // xsec [1/m]
7278  xsec(s,i) += CONT + (2.414322e7 * SUM * p_abs[i] * pow(TH, (Numeric)3.) / PI);
7279  }
7280  }
7281  return;
7282 }
7283 //
7284 // #################################################################################
7285 //
7286 // MPM93 O2 continuum:
7287 // see publication side of National Telecommunications and Information Administration
7288 // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
7289 // and ftp side for downloading the MPM93 original source code:
7290 // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
7324  const Numeric S0in, // model parameter
7325  const Numeric G0in, // model parameter
7326  const Numeric XS0in, // model parameter
7327  const Numeric XG0in, // model parameter
7328  const String& model,
7329  ConstVectorView f_mono,
7330  ConstVectorView p_abs,
7331  ConstVectorView t_abs,
7332  ConstVectorView h2o_abs,
7333  ConstVectorView vmr )
7334 {
7335 
7336  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7337  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
7338  // "Propagation modeling of moist air and suspended water/ice
7339  // particles at frequencies below 1000 GHz",
7340  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7341  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7342  // const Numeric S0_MPM93 = 6.140e-13/0.20946; // line strength/VMR-O2 [1/Pa]
7343  const Numeric S0_MPM93 = 6.140e-13; // line strength [1/Pa]
7344  const Numeric G0_MPM93 = 0.560e4; // line width [Hz/Pa]
7345  const Numeric XS0_MPM93 = 2.000; // temperature dependence of line strength
7346  const Numeric XG0_MPM93 = 0.800; // temperature dependence of line width
7347  // ---------------------------------------------------------------------------------------
7348 
7349 
7350  // select the parameter set (!!model dominates parameters!!):
7351  Numeric S0, G0, XS0, XG0;
7352  if ( model == "MPM93" )
7353  {
7354  S0 = S0_MPM93;
7355  G0 = G0_MPM93;
7356  XS0 = XS0_MPM93;
7357  XG0 = XG0_MPM93;
7358  }
7359  else if ( model == "user" )
7360  {
7361  S0 = S0in;
7362  G0 = G0in;
7363  XS0 = XS0in;
7364  XG0 = XG0in;
7365  }
7366  else
7367  {
7368  ostringstream os;
7369  os << "O2-SelfContMPM93: ERROR! Wrong model values given.\n"
7370  << "Valid models are: 'MPM93' and 'user'" << '\n';
7371  throw runtime_error(os.str());
7372  }
7373  out3 << "O2-SelfContMPM93: (model=" << model << ") parameter values in use:\n"
7374  << " S0 = " << S0 << "\n"
7375  << " G0 = " << G0 << "\n"
7376  << " XS0 = " << XS0 << "\n"
7377  << " XG0 = " << XG0 << "\n";
7378 
7379 
7380  const Index n_p = p_abs.nelem(); // Number of pressure levels
7381  const Index n_f = f_mono.nelem(); // Number of frequencies
7382 
7383  // Check that dimensions of p_abs, t_abs, and vmr agree:
7384  assert ( n_p==t_abs.nelem() );
7385  assert ( n_p==vmr.nelem() );
7386 
7387  // Check that dimensions of xsec are consistent with n_f
7388  // and n_p. It should be [n_f,n_p]:
7389  assert ( n_f==xsec.nrows() );
7390  assert ( n_p==xsec.ncols() );
7391 
7392  // const = VMR * ISORATIO = 0.20946 * 0.99519
7393  // this constant is already incorporated into the line strength, so we
7394  // have top devide the line strength by this value since arts multiplies xsec
7395  // by these variables later in absCalc.
7396  const Numeric VMRISO = 0.2085;
7397 
7398 
7399  // Loop pressure/temperature:
7400  for ( Index i=0; i<n_p; ++i )
7401  {
7402  if (vmr[i] < VMRCalcLimit) // make sure that division by zero is excluded
7403  {
7404  ostringstream os;
7405  os << "ERROR: MPM93 O2 continuum absorption model has detected a O2 volume mixing ratio of "
7406  << vmr[i] << " which is below the threshold of " << VMRCalcLimit << ".\n"
7407  << "Therefore no calculation is performed.\n";
7408  throw runtime_error(os.str());
7409  return;
7410  }
7411  Numeric th = 300.0 / t_abs[i]; // Theta
7412  // continuum strength
7413  Numeric strength = S0 * p_abs[i] * (1.0000 - h2o_abs[i]) * pow( th, XS0 );
7414  // G0 from the input has to be converted to unit GHz/hPa --> * 1.0e-7
7415  Numeric gamma = G0 * p_abs[i] * pow( th, XG0 ); // Hz
7416 
7417  // Loop frequency:
7418  for ( Index s=0; s<n_f; ++s )
7419  {
7420  // the vmr of O2 will be multiplied at the stage of absorption calculation:
7421  // abs / vmr * xsec.
7422  xsec(s,i) += (4.0 * PI / SPEED_OF_LIGHT) * // unit factor [1/(m*Hz)]
7423  (strength / VMRISO) * // strength [1]
7424  ( pow( f_mono[s], (Numeric)2.) * gamma / // line shape [Hz]
7425  ( pow( f_mono[s], (Numeric)2.) + pow( gamma, (Numeric)2.) ) );
7426  }
7427  }
7428  return;
7429 }
7430 //
7431 // #################################################################################
7432 //
7433 // 3) O2-air : P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
7434 // "Atmospheric Remote Sensing by Microwave Radiometry",
7435 // John Wiley & Sons, Inc., 1993. Also stated in
7436 // Liebe et al. JQSRT, Vol 48, Nr 5/6, pp. 629-643, 1992.
7437 // Default continuum parameters are C=1.6E-17*10E-9, x=0.8
7469  const Numeric S0in, // model parameter
7470  const Numeric G0in, // model parameter
7471  const Numeric XS0in, // model parameter
7472  const Numeric XG0in, // model parameter
7473  const String& model,
7474  ConstVectorView f_mono,
7475  ConstVectorView p_abs, // total pressure [Pa]
7476  ConstVectorView t_abs,
7477  ConstVectorView h2o_abs, // H2O VMR
7478  ConstVectorView vmr ) // O2 VMR
7479 {
7480 
7481  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7482  // P. W. Rosenkranz, Chapter 2, in M. A. Janssen,
7483  // Atmospheric Remote Sensing by Microwave Radiometry, John Wiley & Sons, Inc., 1993
7484  // ftp://mesa.mit.edu/phil/lbl_rt
7485  const Numeric S0_PWR93 = 1.11e-14; // [K²/(Hz*Pa*m)] line strength
7486  const Numeric G0_PWR93 = 5600.000; // line width [Hz/Pa]
7487  const Numeric XS0_PWR93 = 2.000; // temperature dependence of line strength
7488  const Numeric XG0_PWR93 = 0.800; // temperature dependence of line width
7489  // ---------------------------------------------------------------------------------------
7490 
7491  // select the parameter set (!!model dominates values!!):
7492  Numeric S0, G0, XS0, XG0;
7493  if ( model == "Rosenkranz" )
7494  {
7495  S0 = S0_PWR93;
7496  G0 = G0_PWR93;
7497  XS0 = XS0_PWR93;
7498  XG0 = XG0_PWR93;
7499  }
7500  else if ( model == "user" )
7501  {
7502  S0 = S0in;
7503  G0 = G0in;
7504  XS0 = XS0in;
7505  XG0 = XG0in;
7506  }
7507  else
7508  {
7509  ostringstream os;
7510  os << "O2-SelfContPWR93: ERROR! Wrong model values given.\n"
7511  << "Valid models are: 'Rosenkranz' and 'user'" << '\n';
7512  throw runtime_error(os.str());
7513  }
7514  out3 << "O2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
7515  << " S0 = " << S0 << "\n"
7516  << " G0 = " << G0 << "\n"
7517  << " XS0 = " << XS0 << "\n"
7518  << " XG0 = " << XG0 << "\n";
7519 
7520 
7521  const Index n_p = p_abs.nelem(); // Number of pressure levels
7522  const Index n_f = f_mono.nelem(); // Number of frequencies
7523 
7524  // Check that dimensions of p_abs, t_abs, and vmr agree:
7525  assert ( n_p==t_abs.nelem() );
7526  assert ( n_p==vmr.nelem() );
7527 
7528  // Check that dimensions of xsec are consistent with n_f
7529  // and n_p. It should be [n_f,n_p]:
7530  assert ( n_f==xsec.nrows() );
7531  assert ( n_p==xsec.ncols() );
7532 
7533  // loop over all pressure levels:
7534  for ( Index i=0; i<n_p; ++i )
7535  {
7536  Numeric TH = 300.00 / t_abs[i]; // relative temperature [1]
7537 
7538  Numeric ph2o = p_abs[i] * h2o_abs[i]; // water vapor partial pressure [Pa]
7539  Numeric pdry = p_abs[i] - ph2o; // dry air partial pressure [Pa]
7540 
7541 
7542  // pseudo broadening term [Hz]
7543  Numeric gamma = G0 * (pdry * pow( TH, XG0 ) + 1.100 * ph2o * TH);
7544 
7545  // Loop over frequency grid:
7546  for ( Index s=0; s<n_f; ++s )
7547  {
7548  // division by vmr of O2 is necessary because of the absorption calculation
7549  // abs = vmr * xsec.
7550  xsec(s,i) += S0 * p_abs[i] / pow( t_abs[i], XS0 ) *
7551  ( pow( f_mono[s], (Numeric)2. )
7552  * gamma / ( pow( f_mono[s], 2 )
7553  + pow( gamma, (Numeric)2. ) ) ) ;
7554  }
7555  }
7556 }
7557 //
7558 //
7559 // #################################################################################
7560 //
7598 void Standard_O2_continuum( MatrixView xsec, // cross section
7599  const Numeric Cin, // model parameter
7600  const Numeric G0in, // model parameter
7601  const Numeric G0Ain, // model parameter
7602  const Numeric G0Bin, // model parameter
7603  const Numeric XG0din, // model parameter
7604  const Numeric XG0win, // model parameter
7605  const String& model, // model parameter
7606  ConstVectorView f_mono, // frequency grid
7607  ConstVectorView p_abs, // P_tot grid
7608  ConstVectorView t_abs, // T grid
7609  ConstVectorView h2o_abs, // VMR H2O profile
7610  ConstVectorView vmr ) // VMR O2 profile
7611 {
7612 
7613  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7614  // P. W. Rosenkranz, Chapter 2, in M. A. Janssen,
7615  // Atmospheric Remote Sensing by Microwave Radiometry, John Wiley & Sons, Inc., 1993
7616  // ftp://mesa.mit.edu/phil/lbl_rt
7617  const Numeric C_PWR93 = (1.108e-14/pow((Numeric)3.0e2,(Numeric)2.)); // [1/(Hz*Pa*m)] line strength
7618  const Numeric G0_PWR93 = 5600.000; // line width [Hz/Pa]
7619  const Numeric G0A_PWR93 = 1.000; // line width [1]
7620  const Numeric G0B_PWR93 = 1.100; // line width [1]
7621  const Numeric XG0d_PWR93 = 0.800; // temperature dependence of line width [1]
7622  const Numeric XG0w_PWR93 = 1.000; // temperature dependence of line width [1]
7623  //
7624  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
7625  // "Propagation modeling of moist air and suspended water/ice
7626  // particles at frequencies below 1000 GHz",
7627  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7628  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7629  // const Numeric C_MPM93 = 1.23e-19; // line strength/VMR [1/m*1/Hz*1/Pa]
7630  const Numeric C_MPM93 = 6.14e-13*(4.0*PI/SPEED_OF_LIGHT)/0.2085; // line strength [1/m*1/Hz*1/Pa]
7631  // 0.2085 = VMR * ISORATIO = 0.20946 * 0.99519
7632  const Numeric G0_MPM93 = 5600.000; // line width [Hz/Pa]
7633  const Numeric G0A_MPM93 = 1.000; // line width [1]
7634  const Numeric G0B_MPM93 = 1.000; // line width [1]
7635  const Numeric XG0d_MPM93 = 0.800; // temperature dependence of line strength [1]
7636  const Numeric XG0w_MPM93 = 0.800; // temperature dependence of line width [1]
7637  // ---------------------------------------------------------------------------------------
7638 
7639  // select the parameter set (!!model dominates values!!):
7640  Numeric C, G0, G0A, G0B, XG0d, XG0w;
7641  if ( model == "Rosenkranz" )
7642  {
7643  C = C_PWR93;
7644  G0 = G0_PWR93;
7645  G0A = G0A_PWR93;
7646  G0B = G0B_PWR93;
7647  XG0d = XG0d_PWR93;
7648  XG0w = XG0w_PWR93;
7649  }
7650  else if ( model == "MPM93" )
7651  {
7652  C = C_MPM93;
7653  G0 = G0_MPM93;
7654  G0A = G0A_MPM93;
7655  G0B = G0B_MPM93;
7656  XG0d = XG0d_MPM93;
7657  XG0w = XG0w_MPM93;
7658  }
7659  else if ( model == "user" )
7660  {
7661  C = Cin;
7662  G0 = G0in;
7663  G0A = G0Ain;
7664  G0B = G0Bin;
7665  XG0d = XG0din;
7666  XG0w = XG0win;
7667  }
7668  else
7669  {
7670  ostringstream os;
7671  os << "O2-GenerealCont: ERROR! Wrong model values given.\n"
7672  << "Valid models are: 'Rosenkranz', 'MPM93' and 'user'" << '\n';
7673  throw runtime_error(os.str());
7674  }
7675  out3 << "O2-GeneralCont: (model=" << model << ") parameter values in use:\n"
7676  << " C = " << C << "\n"
7677  << " G0 = " << G0 << "\n"
7678  << " G0A = " << G0A << "\n"
7679  << " G0B = " << G0B << "\n"
7680  << " XG0d = " << XG0d << "\n"
7681  << " XG0w = " << XG0w << "\n";
7682 
7683 
7684  const Index n_p = p_abs.nelem(); // Number of pressure levels
7685  const Index n_f = f_mono.nelem(); // Number of frequencies
7686 
7687  // Check that dimensions of p_abs, t_abs, and vmr agree:
7688  assert ( n_p==t_abs.nelem() );
7689  assert ( n_p==vmr.nelem() );
7690 
7691  // Check that dimensions of xsec are consistent with n_f
7692  // and n_p. It should be [n_f,n_p]:
7693  assert ( n_f==xsec.nrows() );
7694  assert ( n_p==xsec.ncols() );
7695 
7696  // const = VMR * ISORATIO = 0.20946 * 0.99519
7697  // this constant is already incorporated into the line strength, so we
7698  // have top devide the line strength by this value since arts multiplies xsec
7699  // by these variables later in absCalc.
7700  // FIXME const Numeric VMRISO = 0.2085;
7701 
7702  // loop over all pressure levels:
7703  for ( Index i=0; i<n_p; ++i )
7704  {
7705  Numeric TH = 3.0e2 / t_abs[i]; // relative temperature [1]
7706 
7707  Numeric ph2o = p_abs[i] * h2o_abs[i]; // water vapor partial pressure [Pa]
7708  Numeric pdry = p_abs[i] - ph2o; // dry air partial pressure [Pa]
7709 
7710 
7711  // pseudo broadening term [Hz]
7712  Numeric gamma = G0 * (G0A * pdry * pow( TH, XG0d ) + G0B * ph2o * pow( TH, XG0w ));
7713 
7714  // Loop over frequency grid:
7715  for ( Index s=0; s<n_f; ++s )
7716  {
7717  // division by vmr of O2 is necessary because of the absorption calculation
7718  // abs = vmr * xsec.
7719  xsec(s,i) += C * p_abs[i] * pow( TH, (Numeric)2. ) *
7720  ( gamma * pow( f_mono[s], (Numeric)2. ) /
7721  ( pow( f_mono[s], 2 ) + pow( gamma, (Numeric)2. ) ) );
7722  }
7723  }
7724 }
7725 //
7726 // #################################################################################
7727 // ################################ NITROGEN MODELS ################################
7728 // #################################################################################
7729 //
7730 // Borysow-Frommhold 1986 N2-N2 CIA absorption model;
7731 // see publication A. Borysow and L. Frommhold,
7732 // The Astrophysical Journal, vol.311, pp.1043-1057, 1986
7733 // see http://adsabs.harvard.edu/article_service.html for a scanned
7734 // version of the paper
7763  const Numeric Cin,
7764  const String& model,
7765  ConstVectorView f_mono,
7766  ConstVectorView p_abs,
7767  ConstVectorView t_abs,
7768  ConstVectorView vmr )
7769 {
7770  //
7771  //
7772  // external function to call (original F77 code translated with f2c)
7773  extern Numeric n2n2tks_(double t, double f);
7774  //
7775  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7776  // standard values for the MPM93 H2O continuum model
7777  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7778  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7779  Numeric XFAC = 1.0000; // scaling factor
7780  // ---------------------------------------------------------------------------------------
7781 
7782  // select the parameter set (!!model dominates values!!):
7783  if ( model == "BF86" )
7784  {
7785  XFAC = 1.0000;
7786  }
7787  else if ( model == "user" )
7788  {
7789  XFAC = Cin;
7790  }
7791  else
7792  {
7793  ostringstream os;
7794  os << "N2-SelfContBorysow: ERROR! Wrong model values given.\n"
7795  << "allowed models are: 'BF86', 'user'" << '\n';
7796  throw runtime_error(os.str());
7797  }
7798 
7799  out3 << "N2-SelfContBorysow: (model=" << model << ") parameter values in use:\n"
7800  << " XFAC = " << XFAC << "\n";
7801 
7802  const Index n_p = p_abs.nelem(); // Number of pressure levels
7803  const Index n_f = f_mono.nelem(); // Number of frequencies
7804 
7805 
7806  const Numeric AMAG2DEN = 44.53807; // inverse of N2 mol volume at std p/T
7807  const Numeric RIDGAS = 8.314510; // ideal gas constant
7808 
7809  // Check that dimensions of p_abs, t_abs, and vmr agree:
7810  assert ( n_p==t_abs.nelem() );
7811  assert ( n_p==vmr.nelem() );
7812 
7813  // Check that dimensions of xsec are consistent with n_f
7814  // and n_p. It should be [n_f,n_p]:
7815  assert ( n_f==xsec.nrows() );
7816  assert ( n_p==xsec.ncols() );
7817 
7818  // Loop pressure/temperature:
7819  for ( Index i=0; i<n_p; ++i )
7820  {
7821  //cout << "------------------------------------------------\n";
7822  double T = (double) t_abs[i];
7823  //cout << "N2-N2 BF86: T =" << T << " K\n";
7824  //cout << "N2-N2 BF86: p =" << p_abs[i] << " Pa\n";
7825  //cout << "N2-N2 BF86: VMR =" << vmr[i] << "\n";
7826  Numeric XAMA = (p_abs[i]) / ( AMAG2DEN * RIDGAS * t_abs[i] );
7827  Numeric XAMA2 = pow(XAMA,(Numeric)2.);
7828  //cout << "N2-N2 BF86: XAMA =" << XAMA << "\n";
7829 
7830  // Loop frequency:
7831  for ( Index s=0; s<n_f; ++s )
7832  {
7833  // the second vmr of N2 will be multiplied at the stage of
7834  // absorption calculation: abs = vmr * xsec.
7835  double f = (double) f_mono[s];
7836  //cout << "N2-N2 BF86: f =" << f << " Hz\n";
7837  double cont = n2n2tks_(T, f);
7838  xsec(s,i) += (Numeric) (cont * 1.000e2 * vmr[i] * XAMA2);
7839  //cout << "N2-N2 BF86: cont =" << cont << " cm-1 * amagat-2\n";
7840  //cout << "N2-N2 BF86: abs =" << (vmr[i] * xsec(s,i)) << " m-1\n";
7841  }
7842  }
7843  return;
7844 }
7845 //
7846 // #################################################################################
7847 //
7848 // MPM93 N2 continuum:
7849 // see publication side of National Telecommunications and Information Administration
7850 // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
7851 // and ftp side for downloading the MPM93 original source code:
7852 // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
7886  const Numeric Cin,
7887  const Numeric Gin,
7888  const Numeric xTin,
7889  const Numeric xfin,
7890  const String& model,
7891  ConstVectorView f_mono,
7892  ConstVectorView p_abs,
7893  ConstVectorView t_abs,
7894  ConstVectorView h2o_abs,
7895  ConstVectorView vmr )
7896 {
7897 
7898  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
7899  // standard values for the MPM93 H2O continuum model
7900  // (AGARD 52nd Specialists Meeting of the Electromagnetic Wave
7901  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21):
7902  const Numeric xT_MPM93 = 3.500; // temperature exponent [1]
7903  const Numeric xf_MPM93 = 1.500; // frequency exponent [1]
7904  const Numeric gxf_MPM93 = 9.000*xf_MPM93; // needed for the unit conversion of G_MPM93
7905  const Numeric S_MPM93 = 2.296e-31; // line strength [1/Pa² * 1/Hz]
7906  const Numeric G_MPM93 = 1.930e-5*pow((Numeric)10.000, -gxf_MPM93); // frequency factor [1/Hz^xf]
7907  // ---------------------------------------------------------------------------------------
7908 
7909  // select the parameter set (!!model dominates values!!):
7910  Numeric S0, G0, xf, xT, gxf;
7911  if ( model == "MPM93" )
7912  {
7913  S0 = S_MPM93;
7914  G0 = G_MPM93;
7915  xT = xT_MPM93;
7916  xf = xf_MPM93;
7917  gxf = gxf_MPM93;
7918  }
7919  else if ( model == "MPM93Scale" )
7920  {
7921  S0 = Cin * S_MPM93;
7922  G0 = G_MPM93;
7923  xT = xT_MPM93;
7924  xf = xf_MPM93;
7925  gxf = gxf_MPM93;
7926  }
7927  else if ( model == "user" )
7928  {
7929  S0 = Cin;
7930  G0 = Gin;
7931  xT = xTin;
7932  xf = xfin;
7933  gxf = 9.000*xf;
7934  }
7935  else
7936  {
7937  ostringstream os;
7938  os << "N2-SelfContMPM93 : ERROR! Wrong model values given.\n"
7939  << "allowed models are: 'MPM93', 'MPM93Scale' or 'user'" << '\n';
7940  throw runtime_error(os.str());
7941  }
7942 
7943  out3 << "N2-SelfContMPM93: (model=" << model << ") parameter values in use:\n"
7944  << " S0 = " << S0 << "\n"
7945  << " G0 = " << G0 << "\n"
7946  << " xT = " << xT << "\n"
7947  << " xf = " << xf << "\n";
7948 
7949  // unit conversion internally:
7950  //const Numeric S0unitconv = 1.000e+13; // x [1/(hPa²*GHz)] => y [1/(pa²*Hz)]
7951  //const Numeric G0unitconv = pow(10.000, gxf);
7952 
7953  const Index n_p = p_abs.nelem(); // Number of pressure levels
7954  const Index n_f = f_mono.nelem(); // Number of frequencies
7955 
7956  // Check that dimensions of p_abs, t_abs, and vmr agree:
7957  assert ( n_p==t_abs.nelem() );
7958  assert ( n_p==vmr.nelem() );
7959 
7960  // Check that dimensions of xsec are consistent with n_f
7961  // and n_p. It should be [n_f,n_p]:
7962  assert ( n_f==xsec.nrows() );
7963  assert ( n_p==xsec.ncols() );
7964 
7965  Numeric fac = 4.0 * PI / SPEED_OF_LIGHT; // = 4 * pi / c
7966  // Loop pressure/temperature:
7967  for ( Index i=0; i<n_p; ++i )
7968  {
7969  Numeric th = 300.0 / t_abs[i];
7970  Numeric strength = S0 *
7971  pow( (p_abs[i] * ((Numeric)1.0000 - h2o_abs[i])),
7972  (Numeric)2. )
7973  * pow( th, xT );
7974 
7975  // Loop frequency:
7976  for ( Index s=0; s<n_f; ++s )
7977  {
7978  // FIXME Numeric f = f_mono[s] * Hz_to_GHz; // frequency in GHz
7979  // the vmr of N2 will be multiplied at the stage of absorption calculation:
7980  // abs / vmr * xsec.
7981  xsec(s,i) += fac * strength * // strength
7982  pow(f_mono[s], (Numeric)2.) / // frequency dependence
7983  ( 1.000 + G0 * pow( f_mono[s], xf) ) *
7984  vmr[i]; // N2 vmr
7985  }
7986  }
7987  return;
7988 }
7989 //
7990 // #################################################################################
7991 //
8018  const Numeric Cin,
8019  const String& model,
8020  ConstVectorView f_mono,
8021  ConstVectorView p_abs,
8022  ConstVectorView t_abs,
8023  ConstVectorView vmr,
8024  ConstVectorView h2ovmr )
8025 {
8026  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8027  // standard values for the Pardo et al. model (IEEE, Trans. Ant. Prop.,
8028  // Vol 49, No 12, pp. 1683-1694, 2001)
8029  const Numeric C_ATM = 2.612e-6; // [1/m]
8030  // ---------------------------------------------------------------------------------------
8031 
8032  // select the parameter set (!!model dominates parameters!!):
8033  Numeric C;
8034  if ( model == "ATM" )
8035  {
8036  C = C_ATM;
8037  }
8038  else if ( model == "user" )
8039  {
8040  C = Cin;
8041  }
8042  else
8043  {
8044  ostringstream os;
8045  os << "N2-DryContATM01: ERROR! Wrong model values given.\n"
8046  << "allowed models are: 'ATM', 'user'" << '\n';
8047  throw runtime_error(os.str());
8048  }
8049  out3 << "N2-DryContATM01: (model=" << model << ") parameter values in use:\n"
8050  << " C_s = " << C << "\n";
8051 
8052  const Index n_p = p_abs.nelem(); // Number of pressure levels
8053  const Index n_f = f_mono.nelem(); // Number of frequencies
8054 
8055  // Check that dimensions of p_abs, t_abs, and vmr agree:
8056  assert ( n_p==t_abs.nelem() );
8057  assert ( n_p==vmr.nelem() );
8058 
8059  // Check that dimensions of xsec are consistent with n_f
8060  // and n_p. It should be [n_f,n_p]:
8061  assert ( n_f==xsec.nrows() );
8062  assert ( n_p==xsec.ncols() );
8063 
8064  // Loop over pressure/temperature grid:
8065  for ( Index i=0; i<n_p; ++i )
8066  {
8067  // since this is an effective "dry air" continuum, it is not really
8068  // it is not specifically attributed to N2, so we need the total
8069  // dry air part in total which is equal to the total minus the
8070  // water vapor pressure:
8071  Numeric pd = p_abs[i] * ( 1.00000e0 - h2ovmr[i] ); // [Pa]
8072  // Loop over frequency grid:
8073  if (vmr[i] > VMRCalcLimit )
8074  {
8075  for ( Index s=0; s<n_f; ++s )
8076  {
8077  // Becaue this is an effective "dry air" continuum, it is not really
8078  // specific N2 but mainly caused by N2. Therefore the N2 vmr must be
8079  // canceled out here which is later in absCalc multiplied
8080  // (calculation: abs = vmr * xsec):
8081  xsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8082  pow( (f_mono[s]/(Numeric)2.25e11), (Numeric)2. ) * // quadratic f dependence [Hz²]
8083  pow( ((Numeric)300.0/t_abs[i]), (Numeric)3.5 ) * // free T dependence [1]
8084  pow( (pd/(Numeric)1.01300e5), (Numeric)2. ) / // quadratic p dependence [Pa²]
8085  vmr[i]; // cancel the vmr dependency
8086  }
8087  }
8088  }
8089 }
8090 //
8091 // #################################################################################
8092 //
8120  const Numeric Cin,
8121  const Numeric xin,
8122  const String& model,
8123  ConstVectorView f_mono,
8124  ConstVectorView p_abs,
8125  ConstVectorView t_abs,
8126  ConstVectorView vmr )
8127 {
8128  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8129  // standard values for the Rosenkranz model (Chapter 2, pp 74, in M. A. Janssen,
8130  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8131  const Numeric C_PWR = 1.05e-38; // [1/(Pa²*Hz²*m)]
8132  const Numeric x_PWR = 3.55; // [1]
8133  // ---------------------------------------------------------------------------------------
8134 
8135  // select the parameter set (!!model dominates parameters!!):
8136  Numeric C, x;
8137  if ( model == "Rosenkranz" )
8138  {
8139  C = C_PWR;
8140  x = x_PWR;
8141  }
8142  else if ( model == "user" )
8143  {
8144  C = Cin;
8145  x = xin;
8146  }
8147  else
8148  {
8149  ostringstream os;
8150  os << "N2-SelfContPWR93: ERROR! Wrong model values given.\n"
8151  << "allowed models are: 'Rosenkranz', 'user'" << '\n';
8152  throw runtime_error(os.str());
8153  }
8154  out3 << "N2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
8155  << " C_s = " << C << "\n"
8156  << " x_s = " << x << "\n";
8157 
8158  const Index n_p = p_abs.nelem(); // Number of pressure levels
8159  const Index n_f = f_mono.nelem(); // Number of frequencies
8160 
8161  // Check that dimensions of p_abs, t_abs, and vmr agree:
8162  assert ( n_p==t_abs.nelem() );
8163  assert ( n_p==vmr.nelem() );
8164 
8165  // Check that dimensions of xsec are consistent with n_f
8166  // and n_p. It should be [n_f,n_p]:
8167  assert ( n_f==xsec.nrows() );
8168  assert ( n_p==xsec.ncols() );
8169 
8170  // Loop over pressure/temperature grid:
8171  for ( Index i=0; i<n_p; ++i )
8172  {
8173  // Loop over frequency grid:
8174  for ( Index s=0; s<n_f; ++s )
8175  {
8176  // The second vmr of N2 will be multiplied at the stage of absorption
8177  // calculation: abs = vmr * xsec.
8178  xsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8179  pow( f_mono[s], (Numeric)2. ) * // quadratic f dependence [Hz²]
8180  pow( (Numeric)300.0/t_abs[i], x ) * // free T dependence [1]
8181  pow( p_abs[i], (Numeric)2. ) * // quadratic p dependence [Pa²]
8182  vmr[i]; // second N2-VMR at the stage
8183  // of absorption calculation
8184  }
8185  }
8186 }
8187 //
8188 // #################################################################################
8189 //
8190 // 4) N2-N2 : P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
8191 // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8192 //
8223  const Numeric Cin,
8224  const Numeric xfin,
8225  const Numeric xtin,
8226  const Numeric xpin,
8227  const String& model,
8228  ConstVectorView f_mono,
8229  ConstVectorView p_abs,
8230  ConstVectorView t_abs,
8231  ConstVectorView vmr )
8232 {
8233 
8234  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8235  // standard values for the Rosenkranz model, Chapter 2, pp 74, in M. A. Janssen,
8236  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8237  const Numeric C_GM = 1.05e-38; // [1/(Pa²*Hz²*m)]
8238  const Numeric xf_GM = 2.00; // [1]
8239  const Numeric xt_GM = 3.55; // [1]
8240  const Numeric xp_GM = 2.00; // [1]
8241  // ---------------------------------------------------------------------------------------
8242 
8243  // select the parameter set (!!model dominates over values!!):
8244  Numeric C, xt, xf, xp;
8245  if ( model == "Rosenkranz" )
8246  {
8247  C = C_GM;
8248  xt = xt_GM;
8249  xf = xf_GM;
8250  xp = xp_GM;
8251  }
8252  else if ( model == "user" )
8253  {
8254  C = Cin;
8255  xt = xtin;
8256  xf = xfin;
8257  xp = xpin;
8258  }
8259  else
8260  {
8261  ostringstream os;
8262  os << "N2-SelfContStandardType: ERROR! Wrong model values given.\n"
8263  << "allowed models are: 'Rosenkranz', 'user'" << '\n';
8264  throw runtime_error(os.str());
8265  }
8266  out3 << "N2-SelfContStandardType: (model=" << model << ") parameter values in use:\n"
8267  << " C = " << C << "\n"
8268  << " xt = " << xt << "\n"
8269  << " xf = " << xf << "\n"
8270  << " xp = " << xp << "\n";
8271 
8272 
8273  const Index n_p = p_abs.nelem(); // Number of pressure levels
8274  const Index n_f = f_mono.nelem(); // Number of frequencies
8275 
8276  // Check that dimensions of p_abs, t_abs, and vmr agree:
8277  assert ( n_p==t_abs.nelem() );
8278  assert ( n_p==vmr.nelem() );
8279 
8280  // Check that dimensions of xsec are consistent with n_f
8281  // and n_p. It should be [n_f,n_p]:
8282  assert ( n_f==xsec.nrows() );
8283  assert ( n_p==xsec.ncols() );
8284 
8285  // Loop over pressure/temperature grid:
8286  for ( Index i=0; i<n_p; ++i )
8287  {
8288  //cout << "vmr[" << i << "]= " << vmr[i] << "\n";
8289  // Loop over frequency grid:
8290  for ( Index s=0; s<n_f; ++s )
8291  {
8292  // The second N2-VMR will be multiplied at the stage of absorption
8293  // calculation: abs = vmr * xsec.
8294  xsec(s,i) += C * // strength [1/(m*Hz²Pa²)]
8295  pow( ((Numeric)300.00/t_abs[i]), xt ) * // T dependence [1]
8296  pow( f_mono[s], xf ) * // f dependence [Hz^xt]
8297  pow( p_abs[i], xp ) * // p dependence [Pa^xp]
8298  pow( vmr[i], (xp-(Numeric)1.) ); // last N2-VMR at the stage
8299  // of absorption calculation
8300  }
8301  }
8302 }
8303 //
8304 // #################################################################################
8305 // ############################## CARBON DIOXIDE MODELS ############################
8306 // #################################################################################
8307 //
8335  const Numeric Cin,
8336  const Numeric xin,
8337  const String& model,
8338  ConstVectorView f_mono,
8339  ConstVectorView p_abs,
8340  ConstVectorView t_abs,
8341  ConstVectorView vmr )
8342 {
8343  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8344  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
8345  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8346  const Numeric C_PWR = 7.43e-37; // [ 1/(Pa²*Hz²*m) ]
8347  const Numeric x_PWR = 5.08; // [ 1 ]
8348  // ---------------------------------------------------------------------------------------
8349 
8350  // select the parameter set (!!model dominates values!!):
8351  Numeric C, x;
8352  if ( model == "Rosenkranz" )
8353  {
8354  C = C_PWR;
8355  x = x_PWR;
8356  }
8357  else if ( model == "user" )
8358  {
8359  C = Cin;
8360  x = xin;
8361  }
8362  else
8363  {
8364  ostringstream os;
8365  os << "CO2-SelfContPWR93 : ERROR! Wrong model values given.\n"
8366  << "allowed models are: 'Rosenkranz', 'user'" << "\n";
8367  throw runtime_error(os.str());
8368  }
8369 
8370  out3 << "CO2-SelfContPWR93: (model=" << model << ") parameter values in use:\n"
8371  << " C = " << C << "\n"
8372  << " x = " << x << "\n";
8373 
8374  const Index n_p = p_abs.nelem(); // Number of pressure levels
8375  const Index n_f = f_mono.nelem(); // Number of frequencies
8376 
8377  // Check that dimensions of p_abs, t_abs, and vmr agree:
8378  assert ( n_p==t_abs.nelem() );
8379  assert ( n_p==vmr.nelem() );
8380 
8381  // Check that dimensions of xsec are consistent with n_f
8382  // and n_p. It should be [n_f,n_p]:
8383  assert ( n_f==xsec.nrows() );
8384  assert ( n_p==xsec.ncols() );
8385 
8386  // Loop over pressure/temperature grid:
8387  for ( Index i=0; i<n_p; ++i )
8388  {
8389  // Dummy scalar holds everything except the quadratic frequency dependence.
8390  // The second vmr of CO2 will be multiplied at the stage of absorption
8391  // calculation: abs = vmr * xsec.
8392  Numeric dummy =
8393  C * pow( (Numeric)300./t_abs[i], x ) * pow( p_abs[i], (Numeric)2. ) * vmr[i];
8394 
8395  // Loop over frequency grid:
8396  for ( Index s=0; s<n_f; ++s )
8397  {
8398  xsec(s,i) += dummy * pow( f_mono[s], (Numeric)2. );
8399  }
8400  }
8401 }
8402 //
8403 // #################################################################################
8404 //
8434  const Numeric Cin,
8435  const Numeric xin,
8436  const String& model,
8437  ConstVectorView f_mono,
8438  ConstVectorView p_abs,
8439  ConstVectorView t_abs,
8440  ConstVectorView n2_abs,
8441  ConstVectorView vmr )
8442 {
8443 
8444  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8445  // "Atmospheric Remote Sensing by Microwave Radiometry", John Wiley & Sons, Inc., 1993
8446  const Numeric C_PWR = 2.71e-37; // default: 2.71*10^-37 1/(Pa²*Hz²*m)
8447  const Numeric x_PWR = 4.7; // default: 4.7
8448  // ---------------------------------------------------------------------------------------
8449 
8450  // select the parameter set (!!model dominates values!!):
8451  Numeric C, x;
8452  if ( model == "Rosenkranz" )
8453  {
8454  C = C_PWR;
8455  x = x_PWR;
8456  }
8457  else if ( model == "user" )
8458  {
8459  C = Cin;
8460  x = xin;
8461  }
8462  else
8463  {
8464  ostringstream os;
8465  os << "CO2-ForeignContPWR93: ERROR! Wrong model values given.\n"
8466  << "allowed models are: 'Rosenkranz', 'user'" << "\n";
8467  throw runtime_error(os.str());
8468  }
8469 
8470  out3 << "CO2-ForeignContPWR93: (model=" << model << ") parameter values in use:\n"
8471  << " C = " << C << "\n"
8472  << " x = " << x << "\n";
8473 
8474  const Index n_p = p_abs.nelem(); // Number of pressure levels
8475  const Index n_f = f_mono.nelem(); // Number of frequencies
8476 
8477  // Check that dimensions of p_abs, t_abs, and vmr agree:
8478  assert ( n_p==t_abs.nelem() );
8479  assert ( n_p==vmr.nelem() );
8480 
8481  // Check that dimensions of xsec are consistent with n_f
8482  // and n_p. It should be [n_f,n_p]:
8483  assert ( n_f==xsec.nrows() );
8484  assert ( n_p==xsec.ncols() );
8485 
8486  // Loop pressure/temperature:
8487  for ( Index i=0; i<n_p; ++i )
8488  {
8489  // Dummy scalar holds everything except the quadratic frequency dependence.
8490  // The vmr of CO2 will be multiplied at the stage of absorption
8491  // calculation: abs = vmr * xsec.
8492  Numeric dummy = C * pow( (Numeric)300./t_abs[i], x ) * p_abs[i] * p_abs[i] * n2_abs[i];
8493 
8494  // Loop frequency:
8495  for ( Index s=0; s<n_f; ++s )
8496  {
8497  xsec(s,i) += dummy * pow( f_mono[s], (Numeric)2. );
8498  }
8499  }
8500 }
8501 //
8502 // #################################################################################
8503 // ################################### CLOUD AND RAIN MODELS #######################
8504 // #################################################################################
8505 //
8539  const Numeric CCin, // input parameter
8540  const Numeric CGin, // input parameter
8541  const Numeric CEin, // input parameter
8542  const String& model, // model
8543  ConstVectorView f_mono, // frequency vector
8544  ConstVectorView p_abs, // pressure vector
8545  ConstVectorView t_abs, // temperature vector
8546  ConstVectorView vmr) // suspended water droplet density vector
8547 {
8548 
8549  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8550  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
8551  // "Propagation modeling of moist air and suspended water/ice
8552  // particles at frequencies below 1000 GHz",
8553  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
8554  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
8555  const Numeric CC_MPM93 = 1.00000;
8556  const Numeric CG_MPM93 = 1.00000;
8557  const Numeric CE_MPM93 = 1.00000;
8558  // ---------------------------------------------------------------------------------------
8559 
8560 
8561  // select the parameter set (!!model dominates values!!):
8562  Numeric CC, CG, CE;
8563  if ( model == "MPM93" )
8564  {
8565  CC = CC_MPM93;
8566  CG = CG_MPM93;
8567  CE = CE_MPM93;
8568  }
8569  else if ( model == "user" )
8570  {
8571  CC = CCin;
8572  CG = CGin;
8573  CE = CEin;
8574  }
8575  else
8576  {
8577  ostringstream os;
8578  os << "liquidcloud-MPM93: ERROR! Wrong model values given.\n"
8579  << "Valid models are: 'MPM93' and 'user'" << '\n';
8580  throw runtime_error(os.str());
8581  }
8582  out3 << "liquidcloud-MPM93: (model=" << model << ") parameter values in use:\n"
8583  << " CC = " << CC << "\n"
8584  << " CG = " << CG << "\n"
8585  << " CE = " << CE << "\n";
8586 
8587 
8588  const Numeric m = 1.00e3; // specific weight of the droplet, fixed value: 1.00e3 kg/m³
8589  const Numeric low_lim_den = 0.000; // lower limit of suspended droplet particle density vector [kg/m³]
8590  const Numeric high_lim_den = 10.00e-3; // lower limit of suspended droplet particle density vector [kg/m³]
8591 
8592  const Index n_p = p_abs.nelem(); // Number of pressure levels
8593  const Index n_f = f_mono.nelem(); // Number of frequencies
8594 
8595  // Check that dimensions of p_abs, t_abs, and vmr agree:
8596  assert ( n_p==t_abs.nelem() );
8597  assert ( n_p==vmr.nelem() );
8598 
8599  // Check that dimensions of xsec are consistent with n_f
8600  // and n_p. It should be [n_f,n_p]:
8601  assert ( n_f==xsec.nrows() );
8602  assert ( n_p==xsec.ncols() );
8603 
8604  // Loop pressure/temperature:
8605  for ( Index i=0; i<n_p; ++i )
8606  {
8607  // water vapor saturation pressure over liquid water [Pa]
8608  // Numeric es = WVSatPressureLiquidWater(t_abs[i]);
8609  // water vapor partial pressure [Pa]
8610  // Numeric e = p_abs[i] * vmr[i];
8611  // relative humidity [1]
8612  // Numeric RH = e / es;
8613 
8614  // Check limits of suspended water droplet density ("vmr") [kg/m³]
8615  if ( (vmr[i] > low_lim_den) && (vmr[i] < high_lim_den) )
8616  {
8617  // relative inverse temperature [1]
8618  Numeric theta = 300.000 / t_abs[i];
8619  // relaxation frequencies [GHz]
8620  Numeric gamma1 = CG * 20.20 - 146.40*(theta-1.000) + 316.00*(theta-1.000)*(theta-1.000);
8621  // Numeric gamma1 = 20.1 * exp( 7.88 * theta ); // see Liebe et al. IJIMW, 1992, p667, Eq. (2b)
8622  Numeric gamma2 = 39.80 * gamma1;
8623  // static and high-frequency permittivities
8624  Numeric epsilon0 = CE * 103.30 * (theta-1.000) + 77.66;
8625  Numeric epsilon1 = 0.0671 * epsilon0;
8626  Numeric epsilon2 = 3.52;
8627 
8628  // Loop frequency:
8629  for ( Index s=0; s<n_f; ++s )
8630  {
8631  // real part of the complex permittivity of water (double-debye model)
8632  Numeric Reepsilon = epsilon0 -
8633  pow((f_mono[s]*Hz_to_GHz),(Numeric)2.) *
8634  ( ((epsilon0-epsilon1)/
8635  (pow((f_mono[s]*Hz_to_GHz),(Numeric)2.)
8636  + pow(gamma1,(Numeric)2.))) +
8637  ((epsilon1-epsilon2)/
8638  (pow((f_mono[s]*Hz_to_GHz),(Numeric)2.)
8639  + pow(gamma2,(Numeric)2.))) );
8640  // imaginary part of the complex permittivity of water (double-debye model)
8641  Numeric Imepsilon = (f_mono[s]*Hz_to_GHz) *
8642  ( (gamma1*(epsilon0-epsilon1)/
8643  (pow((f_mono[s]*Hz_to_GHz),(Numeric)2.)
8644  + pow(gamma1,(Numeric)2.))) +
8645  (gamma2*(epsilon1-epsilon2)/
8646  (pow((f_mono[s]*Hz_to_GHz),(Numeric)2.)
8647  + pow(gamma2,(Numeric)2.))) );
8648  // the imaginary part of the complex refractivity of suspended liquid water particle [ppm]
8649  // In MPM93 w is in g/m³ and m is in g/cm³. Because of the units used in arts,
8650  // a factor of 1.000e6 must be multiplied with the ratio (w/m):
8651  // MPM93: (w/m)_MPM93 in (g/m³)/(g/cm³)
8652  // arts: (w/m)_arts in (kg/m³)/(kg/m³)
8653  // =====> (w/m)_MPM93 = 1.0e6 * (w/m)_arts
8654  // the factor of 1.0e6 is included below in xsec calculation.
8655  Numeric ImNw = 1.500 / m *
8656  ( 3.000 * Imepsilon
8657  / ( pow((Reepsilon+(Numeric)2.000),(Numeric)2.)
8658  + pow(Imepsilon,(Numeric)2.) ) );
8659  // liquid water particle absorption cross section [1/m]
8660  // The vmr of H2O will be multiplied at the stage of absorption
8661  // calculation: abs = vmr * xsec.
8662  // xsec = abs/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
8663  xsec(s,i) += CC * 1.000e6 * dB_km_to_1_m * 0.1820 * (f_mono[s]*Hz_to_GHz) * ImNw;
8664  }
8665  } else
8666  {
8667  if ( (vmr[i] < low_lim_den) || (vmr[i] > high_lim_den) )
8668  {
8669  ostringstream os;
8670  os << "ERROR in MPM93WaterDropletAbs:\n"
8671  << " suspended water droplet density (valid range 0.00-10.00e-3 kg/m3):" << vmr[i] << "\n"
8672  << " ==> no calculation performed!\n";
8673  throw runtime_error(os.str());
8674  }
8675  }
8676  }
8677 
8678 }
8679 //
8680 // #################################################################################
8681 //
8715  const Numeric CCin, // input parameter
8716  const Numeric CAin, // input parameter
8717  const Numeric CBin, // input parameter
8718  const String& model, // model
8719  ConstVectorView f_mono, // frequency vector
8720  ConstVectorView p_abs, // pressure vector
8721  ConstVectorView t_abs, // temperature vector
8722  ConstVectorView vmr ) // suspended ice particle density vector,
8723  // valid range: 0-10.0e-3 kg/m³
8724 {
8725 
8726  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8727  // standard values for the MPM93 model (J. Liebe and G. A. Hufford and M. G. Cotton,
8728  // "Propagation modeling of moist air and suspended water/ice
8729  // particles at frequencies below 1000 GHz",
8730  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
8731  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21)
8732  const Numeric CC_MPM93 = 1.00000;
8733  const Numeric CA_MPM93 = 1.00000;
8734  const Numeric CB_MPM93 = 1.00000;
8735  // ---------------------------------------------------------------------------------------
8736 
8737 
8738  // select the parameter set (!!model dominates values!!):
8739  Numeric CC, CA, CB;
8740  if ( model == "MPM93" )
8741  {
8742  CC = CC_MPM93;
8743  CA = CA_MPM93;
8744  CB = CB_MPM93;
8745  }
8746  else if ( model == "user" )
8747  {
8748  CC = CCin;
8749  CA = CAin;
8750  CB = CBin;
8751  }
8752  else
8753  {
8754  ostringstream os;
8755  os << "icecloud-MPM93: ERROR! Wrong model values given.\n"
8756  << "Valid models are: 'MPM93' and 'user'" << '\n';
8757  throw runtime_error(os.str());
8758  }
8759  out3 << "icecloud-MPM93: (model=" << model << ") parameter values in use:\n"
8760  << " CC = " << CC << "\n"
8761  << " CA = " << CA << "\n"
8762  << " CB = " << CB << "\n";
8763 
8764 
8765  const Numeric m = 0.916e3; // specific weight of ice particles, fixed value: 0.916e3 kg/m³
8766  const Numeric low_lim_den = 0.000; // lower limit of suspended ice particle density vector [kg/m³]
8767  const Numeric high_lim_den = 10.00e-3; // lower limit of suspended ice particle density vector [kg/m³]
8768 
8769  const Index n_p = p_abs.nelem(); // Number of pressure levels
8770  const Index n_f = f_mono.nelem(); // Number of frequencies
8771 
8772  // Check that dimensions of p_abs, t_abs, and vmr agree:
8773  assert ( n_p==t_abs.nelem() );
8774  assert ( n_p==vmr.nelem() );
8775 
8776  // Check that dimensions of xsec are consistent with n_f
8777  // and n_p. It should be [n_f,n_p]:
8778  assert ( n_f==xsec.nrows() );
8779  assert ( n_p==xsec.ncols() );
8780 
8781 
8782 
8783  // Loop pressure/temperature:
8784  for ( Index i=0; i<n_p; ++i )
8785  {
8786  // water vapor saturation pressure over ice [Pa]
8787  // Numeric es = WVSatPressureIce(t_abs[i]);
8788  // water vapor partial pressure [Pa]
8789  // Numeric e = p_abs[i] * vmr[i];
8790  // relative humidity [1]
8791  // Numeric RH = e / es;
8792 
8793  // Check limits of suspended water ice crystal density ("vmr") [kg/m³]
8794  if ( (vmr[i] > low_lim_den) && (vmr[i] < high_lim_den) )
8795  {
8796  // relative inverse temperature [1]
8797  Numeric theta = 300.000 / t_abs[i];
8798  // inverse frequency T-dependency function [Hz]
8799  Numeric ai = CA * (62.000 * theta - 11.600) * exp(-22.100 * (theta-1.000)) * 1.000e-4;
8800  // linear frequency T-dependency function [1/Hz]
8801  Numeric bi = CB * 0.542e-6 *
8802  ( -24.17 + (116.79/theta)
8803  + pow((theta/(theta-(Numeric)0.9927)),(Numeric)2.) );
8804 
8805  // Loop frequency:
8806  for ( Index s=0; s<n_f; ++s )
8807  {
8808  // real part of the complex permittivity of ice
8809  Numeric Reepsilon = 3.15;
8810  // imaginary part of the complex permittivity of water
8811  Numeric Imepsilon = ( ( ai/(f_mono[s]*Hz_to_GHz) ) +
8812  ( bi*(f_mono[s]*Hz_to_GHz) ) );
8813  // the imaginary part of the complex refractivity of suspended ice particles.
8814  // In MPM93 w is in g/m³ and m is in g/cm³. Because of the units used in arts,
8815  // a factor of 1.000e6 must be multiplied with the ratio (w/m):
8816  // MPM93: (w/m)_MPM93 in (g/m³)/(g/cm³)
8817  // arts: (w/m)_arts in (kg/m³)/(kg/m³)
8818  // =====> (w/m)_MPM93 = 1.0e6 * (w/m)_arts
8819  // the factor of 1.0e6 is included below in xsec calculation.
8820  Numeric ImNw = 1.500 / m *
8821  ( 3.000 * Imepsilon
8822  / ( pow((Reepsilon+(Numeric)2.000),(Numeric)2.)
8823  + pow(Imepsilon,(Numeric)2.) ) );
8824  // ice particle absorption cross section [1/m]
8825  // The vmr of H2O will be multiplied at the stage of absorption
8826  // calculation: abs = vmr * xsec.
8827  // xsec = abs/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
8828  xsec(s,i) += CC * 1.000e6 * dB_km_to_1_m * 0.1820 * (f_mono[s]*Hz_to_GHz) * ImNw;
8829  }
8830  } else
8831  {
8832  if ( (vmr[i] < low_lim_den) || (vmr[i] > high_lim_den) )
8833  {
8834  ostringstream os;
8835  os << "ERROR in MPM93IceCrystalAbs:\n"
8836  << " suspended ice particle density (valid range: 0-10.0e-3 kg/m3):" << vmr[i] << "\n"
8837  << " ==> no calculation performed!\n";
8838  throw runtime_error(os.str());
8839  }
8840  }
8841  }
8842  return;
8843 }
8844 //
8845 // #################################################################################
8846 //
8877  const Numeric CEin, // input parameter
8878  const Numeric CAin, // input parameter
8879  const Numeric CBin, // input parameter
8880  const String& model, // model
8881  ConstVectorView f_mono, // frequency vector
8882  ConstVectorView p_abs, // pressure vector
8883  ConstVectorView t_abs, // temperature vector
8884  ConstVectorView vmr) // rain rate profile [mm/h]
8885 {
8886 
8887  // --------- STANDARD MODEL PARAMETERS ---------------------------------------------------
8888  // standard values for the MPM93 model based on Olsen, R.L.,
8889  // D.V. Rogers, and D. B. Hodge, "The aR^b relation in the
8890  // calculation of rain attenuation", IEEE Trans. Antennas Propagat.,
8891  // vol. AP-26, pp. 318-329, 1978,
8892  const Numeric CE_MPM93 = 1.00000;
8893  const Numeric CA_MPM93 = 1.00000;
8894  const Numeric CB_MPM93 = 1.00000;
8895  // ---------------------------------------------------------------------------------------
8896 
8897 
8898  // select the parameter set (!!model dominates values!!):
8899  Numeric CE, CA, CB;
8900  if ( model == "MPM93" )
8901  {
8902  CE = CE_MPM93;
8903  CA = CA_MPM93;
8904  CB = CB_MPM93;
8905  }
8906  else if ( model == "user" )
8907  {
8908  CE = CEin;
8909  CA = CAin;
8910  CB = CBin;
8911  }
8912  else
8913  {
8914  ostringstream os;
8915  os << "rain-MPM93: ERROR! Wrong model values given.\n"
8916  << "Valid models are: 'MPM93' and 'user'" << '\n';
8917  throw runtime_error(os.str());
8918  }
8919  out3 << "rain-MPM93: (model=" << model << ") parameter values in use:\n"
8920  << " CE = " << CE << "\n"
8921  << " CA = " << CA << "\n"
8922  << " CB = " << CB << "\n";
8923 
8924 
8925  const Numeric low_lim_rr = 0.000; // lower limit of allowed rain rate [mm/h]
8926  const Numeric high_lim_rr = 150.000; // upper limit of allowed rain rate [mm/h]
8927 
8928  const Index n_p = p_abs.nelem(); // Number of pressure levels
8929  const Index n_f = f_mono.nelem(); // Number of frequencies
8930 
8931  // Check that dimensions of p_abs, t_abs, and vmr agree:
8932  assert ( n_p==t_abs.nelem() );
8933  assert ( n_p==vmr.nelem() );
8934 
8935  // Check that dimensions of xsec are consistent with n_f
8936  // and n_p. It should be [n_f,n_p]:
8937  assert ( n_f==xsec.nrows() );
8938  assert ( n_p==xsec.ncols() );
8939 
8940  // Loop pressure/temperature:
8941  for ( Index i=0; i<n_p; ++i )
8942  {
8943  // Extinction by rain is parameterized as:
8944  // ext_rain = a_rain * rr ^ b_rain
8945  // a_rain and b_rain each depend on frequency by power laws:
8946  // a_rain = Ga * freq ^ Ea
8947  // b_rain = Gb * freq ^ Eb
8948  Numeric Ga = 0.;
8949  Numeric Ea = 0.;
8950  Numeric Gb = 0.;
8951  Numeric Eb = 0.;
8952  // FIXME Numeric a_rain;
8953  // FIXME Numeric b_rain;
8954  // FIXME Numeric ext_rain;
8955 
8956  // Check limits of rain rate ("vmr") [mm/h]
8957  if ( (vmr[i] >= low_lim_rr) && (vmr[i] < high_lim_rr) )
8958  {
8959  // Loop frequency:
8960  for ( Index s=0; s<n_f; ++s )
8961  {
8962  // for rain rate < 25 mm/h, take parameters from Olsen et al.'s
8963  // own power law fit to their Laws-Parsons-Low data;
8964  // for rain rate > 25 mm/h, take C. Melsheimer's power law fit
8965  // to Olsen et al.'s Laws-Parson-High data
8966  if ( vmr[i] <= 25 )
8967  {
8968  // power law coeff. Ga and exponent Ea for a, piecewise:
8969  if ( f_mono[s] <= 2.9e9 )
8970  {
8971  Ga = 6.39e-5;
8972  Ea = 2.03;
8973  }
8974  else if ( f_mono[s] <= 54.0e9 )
8975  {
8976  Ga = 4.21e-5;
8977  Ea = 2.42;
8978  }
8979  else if ( f_mono[s] <= 180e9 )
8980  {
8981  Ga = 4.09e-2;
8982  Ea = 0.699;
8983  }
8984  else if ( f_mono[s] <= 1000e9 )
8985  {
8986  Ga = 3.38;
8987  Ea = -0.151;
8988  }
8989  else
8990  {
8991  ostringstream os;
8992  os << "ERROR in MPM93RainExt:\n"
8993  << " frequency (valid range 0-1000 GHz):" << f_mono[s]*Hz_to_GHz << "\n"
8994  << " ==> no calculation performed!\n";
8995  throw runtime_error(os.str());
8996  }
8997  // power law coeff. Gb and exponent Eb for b, piecewise:
8998  if ( f_mono[s] <= 8.5e9 )
8999  {
9000  Gb = 0.851;
9001  Eb = 0.158;
9002  }
9003  else if ( f_mono[s] <= 25.0e9 )
9004  {
9005  Gb = 1.41;
9006  Eb = -0.0779;
9007  }
9008  else if ( f_mono[s] <= 164.0e9 )
9009  {
9010  Gb = 2.63;
9011  Eb = -0.272;
9012  }
9013  else if ( f_mono[s] <= 1000e9 )
9014  {
9015  Gb = 0.616;
9016  Eb = 0.0126;
9017  }
9018  else
9019  {
9020  ostringstream os;
9021  os << "ERROR in MPM93RainExt:\n"
9022  << " frequency (valid range 0-1000 GHz):" << f_mono[s]*Hz_to_GHz << "\n"
9023  << " ==> no calculation performed!\n";
9024  throw runtime_error(os.str());
9025  }
9026 
9027  }
9028  else if (vmr[i] > 25)
9029  {
9030  // power law coeff. Ga and exponent Ea for a, piecewise:
9031  if ( f_mono[s] <= 4.9e9 )
9032  {
9033  Ga = 5.30e-5;
9034  Ea = 1.87;
9035  }
9036  else if ( f_mono[s] <= 10.7e9 )
9037  {
9038  Ga = 5.03e-6;
9039  Ea = 3.35;
9040  }
9041  else if ( f_mono[s] <= 40.1e9 )
9042  {
9043  Ga = 2.53e-5;
9044  Ea = 2.67;
9045  }
9046  else if ( f_mono[s] <= 59.1e9 )
9047  {
9048  Ga = 3.58e-3;
9049  Ea = 1.33;
9050  }
9051  else if ( f_mono[s] <= 100e9 )
9052  {
9053  Ga = 0.143;
9054  Ea = 0.422;
9055  }
9056  else
9057  {
9058  ostringstream os;
9059  os << "ERROR in MPM93RainExt:\n"
9060  << " frequency (valid range for rain rate > 25mm/h: 0-100 GHz):" << f_mono[s]*Hz_to_GHz << "\n"
9061  << " ==> no calculation performed!\n";
9062  throw runtime_error(os.str());
9063  }
9064  // power law coeff. Gb and exponent Eb for b, piecewise:
9065  if ( f_mono[s] <= 6.2e9 )
9066  {
9067  Gb = 0.911;
9068  Eb = 0.190;
9069  }
9070  else if ( f_mono[s] <= 23.8e9 )
9071  {
9072  Gb = 1.71;
9073  Eb = -0.156;
9074  }
9075  else if ( f_mono[s] <= 48.4e9 )
9076  {
9077  Gb = 3.08;
9078  Eb = -0.342;
9079  }
9080  else if ( f_mono[s] <= 68.2e9 )
9081  {
9082  Gb = 1.28;
9083  Eb = -0.116;
9084  }
9085  else if ( f_mono[s] <= 100e9 )
9086  {
9087  Gb = 0.932;
9088  Eb = -0.0408;
9089  }
9090  else
9091  {
9092  ostringstream os;
9093  os << "ERROR in MPM93RainExt:\n"
9094  << " frequency (valid range for rain rate > 25mm/h: 0-100 GHz):" << f_mono[s]*Hz_to_GHz << "\n"
9095  << " ==> no calculation performed!\n";
9096  throw runtime_error(os.str());
9097  }
9098  }
9099  //Factor a_rain
9100  Numeric a_rain = Ga * pow((f_mono[s]*Hz_to_GHz),Ea);
9101  //Factor b_rain
9102  Numeric b_rain = Gb * pow((f_mono[s]*Hz_to_GHz),Eb);
9103  // Extinction coefficient [dB/km], with scaling
9104  // parameters CA and CB
9105  Numeric ext_rain = CA * a_rain * pow(vmr[i],(CB*b_rain));
9106  // rain extinction cross section [1/m]
9107  // The vmr will be multiplied at the stage of extinction
9108  // calculation: ext = vmr * xsec.
9109  // xsec = ext/vmr [1/m] but MPM93 is in [dB/km] --> conversion necessary
9110  xsec(s,i) += CE * dB_km_to_1_m * ext_rain / vmr[i];
9111  }
9112  } else
9113  {
9114  if ( (vmr[i] < low_lim_rr) || (vmr[i] > high_lim_rr) )
9115  {
9116  ostringstream os;
9117  os << "ERROR in MPM93RainExt:\n"
9118  << " rain rate (valid range 0.00-150.00 mm/h):" << vmr[i] << "\n"
9119  << " ==> no calculation performed!\n";
9120  throw runtime_error(os.str());
9121  }
9122  }
9123  }
9124 
9125 }
9126 //
9127 // #################################################################################
9128 // ################################# HELP FUNCTIONS ################################
9129 // #################################################################################
9130 //
9152  const Numeric fl,
9153  const Numeric f)
9154 {
9155  /*
9156  this routine calculates the line shape function of Van Vleck and Weisskopf
9157  with the factor (f/f_o)¹. for the MPM pseudo continuum line.
9158 
9159  creation TKS, 4.11.00
9160 
9161  input: gamma [Hz] line width of line L
9162  fl [Hz] central frequency of line L
9163  f [Hz] frequency position of calculation
9164 
9165  output: value [1/Hz] line shape function value at f for the line parameters
9166  of line L
9167 
9168  */
9169 
9170  double f_minus, f_plus ; /* internal variables */
9171  double value; /* return value */
9172 
9173  // line at fl
9174  f_minus = 1.000 / ((f-fl)*(f-fl) + gamma*gamma);
9175 
9176  // mirror line at -fl
9177  f_plus = 1.000 / ((f+fl)*(f+fl) + gamma*gamma);
9178 
9179  // VVW line shape function value
9180  value = fabs(f/fl) * gamma * (f_minus + f_plus);
9181 
9182  return value;
9183 }
9184 //
9185 // #################################################################################
9186 //
9209  const Numeric fl,
9210  const Numeric f,
9211  const Numeric delta)
9212 {
9213  /*
9214  this routine calculates the line shape function of Van Vleck and Weisskopf
9215  for O2 with line mixing.
9216 
9217  creation TKS, 14.07.01
9218 
9219  input: gamma [GHz] line width of line L
9220  fl [GHz] central frequency of line L
9221  f [GHz] frequency position of calculation
9222  delta [1] line mixing parameter
9223 
9224  output: value [1] line shape function value at f for the line parameters
9225  of line L
9226 
9227  */
9228 
9229  double f_minus, f_plus ; /* internal variables */
9230  double value; /* return value */
9231 
9232  // line at fl
9233  f_minus = (gamma - delta * (fl-f)) / ((fl-f)*(fl-f) + gamma*gamma);
9234 
9235  // mirror line at -fl
9236  f_plus = (gamma - delta * (fl+f)) / ((fl+f)*(fl+f) + gamma*gamma);
9237 
9238  // VVW line shape function value
9239  value = f * (f_minus + f_plus);
9240 
9241  return value;
9242 }
9243 //
9244 // #################################################################################
9245 //
9269 {
9270 
9271  // check of temperature range
9272  if (t < 0.000)
9273  {
9274  ostringstream os;
9275  os << "In WVSatPressureLiquidWater:\n"
9276  << "temperature negative: T=" << t <<"K \n";
9277  throw runtime_error(os.str());
9278  }
9279 
9280  // COMPUTES SATURATION H2O VAPOR PRESSURE (OVER LIQUID)
9281  // USING LIEBE'S APPROXIMATION (CORRECTED)
9282  // input : T in Kelvin
9283  // output : es in Pa
9284  // PWR 4/8/92
9285  /*
9286  Numeric TH = 300.0 / t;
9287  Numeric es_PWR98 = 100.00 * 35.3 * exp(22.64*(1.-TH)) * pow(TH,5.0);
9288  */
9289 
9290  // MPM93 calculation
9291  Numeric theta = 373.16 / t;
9292  Numeric exponent = ( -7.90298 * (theta-1.000) +
9293  5.02808 * log10(theta) -
9294  1.3816e-7 * ( pow( (Numeric)10.00,
9295  ((Numeric)11.344*
9296  ((Numeric)1.00-((Numeric)1.00
9297  /theta))) )
9298  - (Numeric)1.000 ) +
9299  8.1328e-3 * ( pow( (Numeric)10.00,
9300  ((Numeric)-3.49149
9301  *(theta-(Numeric)1.00)))
9302  - 1.000) +
9303  log10(1013.246) );
9304  Numeric es_MPM93 = 100.000 * pow((Numeric)10.00,exponent);
9305 
9306  return es_MPM93; // [Pa]
9307 }
9308 //
9309 // #################################################################################
9310 //
9334 {
9335 
9336  // check of temperature range
9337  if (t < 0.000)
9338  {
9339  ostringstream os;
9340  os << "In WVSatPressureIce:\n"
9341  << "temperature negative: T=" << t <<"K \n";
9342  throw runtime_error(os.str());
9343  }
9344 
9345  // MPM93 calculation
9346  Numeric theta = 273.16 / t;
9347  Numeric exponent = (-9.09718 * (theta-1.000) -
9348  3.56654 * log10(theta) +
9349  0.876793 * (1.000-(1.000/theta)) +
9350  log10(6.1071) );
9351 
9352  Numeric es_MPM93 = 100.000 * pow((Numeric)10.00,exponent);
9353 
9354  return es_MPM93;
9355 }
9356 //
9357 // #################################################################################
9358 // #################### CONTROL OF ADDITIONAL ABSORPTION MODEL #####################
9359 // #################################################################################
9360 //
9361 //
9393  const String& name,
9395  const String& model,
9396  ConstVectorView f_mono,
9397  ConstVectorView p_abs,
9398  ConstVectorView t_abs,
9399  ConstVectorView n2_abs,
9400  ConstVectorView h2o_abs,
9401  ConstVectorView vmr )
9402 {
9403  //
9404  /* In the following all the possible tags are listed here and
9405  after a first consistency check about the input parameters the
9406  appropriate internal function is called,
9407 
9408  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9409  ATTENTION PLEASE UPDATE THIS COMMENT IF ANY CHANGES ARE MADE CONCERNING
9410  THE ASSOCIATED MODELS TO EACH TAG
9411  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9412 
9413  ----------------------------------------------------------------------------------------------------
9414  TAG VALID MODELS
9415  ----------------------------------------------------------------------------------------------------
9416  *CONTAGMODINFO* H2O-SelfContStandardType: Rosenkranz, user
9417  *CONTAGMODINFO* H2O-ForeignContStandardType: Rosenkranz, user
9418  *CONTAGMODINFO* H2O-ForeignContMaTippingType: MaTipping, user
9419  *CONTAGMODINFO* H2O-MPM87: MPM87, MPM87Lines, MPM87Continuum, user
9420  *CONTAGMODINFO* H2O-MPM89: MPM89, MPM89Lines, MPM89Continuum, user
9421  *CONTAGMODINFO* H2O-MPM93: MPM93, MPM93Lines, MPM93Continuum, user
9422  *CONTAGMODINFO* H2O-PWR98: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9423  *CONTAGMODINFO* H2O-CP98: CruzPol, CruzPolLine, CruzPolContinuum, user
9424  *CONTAGMODINFO* H2O-CKD24: CKD24, user
9425  *CONTAGMODINFO* O2-MPM85: MPM85, MPM85Lines, MPM85Continuum, MPM85NoCoupling, MPM85NoCutoff, user
9426  *CONTAGMODINFO* O2-MPM87: MPM87, MPM87Lines, MPM87Continuum, MPM87NoCoupling, MPM87NoCutoff, user
9427  *CONTAGMODINFO* O2-MPM89: MPM89, MPM89Lines, MPM89Continuum, MPM89NoCoupling, MPM89NoCutoff, user
9428  *CONTAGMODINFO* O2-MPM92: MPM92, MPM92Lines, MPM92Continuum, MPM92NoCoupling, MPM92NoCutoff, user
9429  *CONTAGMODINFO* O2-MPM93: MPM93, MPM93Lines, MPM93Continuum, MPM93NoCoupling, MPM92NoCutoff, user
9430  *CONTAGMODINFO* O2-PWR93: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9431  *CONTAGMODINFO* O2-PWR88: Rosenkranz, RosenkranzLines, RosenkranzContinuum, user
9432  *CONTAGMODINFO* O2-SelfContMPM93: MPM93, user
9433  *CONTAGMODINFO* O2-SelfContPWR93: Rosenkranz, user
9434  *CONTAGMODINFO* O2-GenerealCont: Rosenkranz, MPM93, user
9435  *CONTAGMODINFO* N2-BFCIA86: BF86, user
9436  *CONTAGMODINFO* N2-SelfContMPM93: MPM93, user, MPM93Scale
9437  *CONTAGMODINFO* N2-SelfContPWR93: Rosenkranz, user
9438  *CONTAGMODINFO* N2-SelfContStandardType: Rosenkranz, user
9439  *CONTAGMODINFO* CO2-SelfContPWR93: Rosenkranz, user
9440  *CONTAGMODINFO* CO2-ForeignContPWR93: Rosenkranz, user
9441  *CONTAGMODINFO* liquidcloud-MPM93: MPM93, user
9442  *CONTAGMODINFO* icecloud-MPM93: MPM93, user
9443  *CONTAGMODINFO* rain-MPM93: MPM93, user
9444  ----------------------------------------------------------------------------------------------------
9445  */
9446  // ============= H2O continuum ========================================================
9447  if ( "H2O-SelfContStandardType"==name )
9448  {
9449  //
9450  // specific continuum parameters and units:
9451  // OUTPUT
9452  // xsec : [1/m],
9453  // INPUT
9454  // parameters[0] : continuum coefficient (C_s) [1/m / (Hz²*Pa²)]
9455  // parameters[1] : temperature exponent (x_s) [1]
9456  // f_mono : [Hz]
9457  // p_abs : [Pa]
9458  // t_abs : [K]
9459  // vmr : [1]
9460  //
9461  const int Nparam = 2;
9462  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9463  {
9464  out3 << "Continuum model " << name << " is running with \n"
9465  << "user defined parameters according to model " << model << ".\n";
9467  parameters[0],
9468  parameters[1],
9469  model,
9470  f_mono,
9471  p_abs,
9472  t_abs,
9473  vmr );
9474  }
9475  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9476  {
9477  ostringstream os;
9478  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9479  << "parameters for the model " << model << ",\n"
9480  << "but you specified " << parameters.nelem() << " parameters.\n";
9481  throw runtime_error(os.str());
9482  return;
9483  }
9484  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9485  {
9486  out3 << "Continuum model " << name << " running with \n"
9487  << "the parameters for model " << model << ".\n";
9489  0.00,
9490  0.00,
9491  model,
9492  f_mono,
9493  p_abs,
9494  t_abs,
9495  vmr );
9496  }
9497  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9498  {
9499  ostringstream os;
9500  os << "ERROR: Continuum model " << name << " requires NO input\n"
9501  << "parameters for the model " << model << ",\n"
9502  << "but you specified " << parameters.nelem() << " parameters.\n"
9503  << "This ambiguity can not be solved by arts.\n"
9504  << "Please see the arts user guide chapter 3.\n";
9505  throw runtime_error(os.str());
9506  return;
9507  }
9508  }
9509  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9510  else if ( "H2O-ForeignContStandardType"==name )
9511  {
9512  //
9513  // specific continuum parameters units:
9514  // a) output
9515  // xsec : [1/m],
9516  // b) input
9517  // parameters[0] : [1/m / (Hz²*Pa²)]
9518  // parameters[1] : [1]
9519  // f_mono : [Hz]
9520  // p_abs : [Pa]
9521  // t_abs : [K]
9522  // vmr : [1]
9523  //
9524  const int Nparam = 2;
9525  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9526  {
9527  out3 << "Continuum model " << name << " is running with \n"
9528  << "user defined parameters according to model " << model << ".\n";
9530  parameters[0],
9531  parameters[1],
9532  model,
9533  f_mono,
9534  p_abs,
9535  t_abs,
9536  vmr );
9537  }
9538  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9539  {
9540  ostringstream os;
9541  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9542  << "parameters for the model " << model << ",\n"
9543  << "but you specified " << parameters.nelem() << " parameters.\n";
9544  throw runtime_error(os.str());
9545  return;
9546  }
9547  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9548  {
9549  out3 << "Continuum model " << name << " running with \n"
9550  << "the parameters for model " << model << ".\n";
9552  0.00,
9553  0.00,
9554  model,
9555  f_mono,
9556  p_abs,
9557  t_abs,
9558  vmr );
9559  }
9560  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9561  {
9562  ostringstream os;
9563  os << "ERROR: Continuum model " << name << " requires NO input\n"
9564  << "parameters for the model " << model << ",\n"
9565  << "but you specified " << parameters.nelem() << " parameters.\n"
9566  << "This ambiguity can not be solved by arts.\n"
9567  << "Please see the arts user guide chapter 3.\n";
9568  }
9569  }
9570  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9571  else if ( "H2O-ForeignContMaTippingType"==name )
9572  {
9573  //
9574  // specific continuum parameters units:
9575  // a) output
9576  // xsec : [1/m],
9577  // b) input
9578  // parameters[0] : [1/m / (Hz²*Pa²)]
9579  // parameters[1] : [1]
9580  // f_mono : [Hz]
9581  // p_abs : [Pa]
9582  // t_abs : [K]
9583  // vmr : [1]
9584  //
9585  const int Nparam = 2;
9586  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9587  {
9588  out3 << "Continuum model " << name << " is running with \n"
9589  << "user defined parameters according to model " << model << ".\n";
9591  parameters[0],
9592  parameters[1],
9593  model,
9594  f_mono,
9595  p_abs,
9596  t_abs,
9597  vmr );
9598  }
9599  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9600  {
9601  ostringstream os;
9602  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9603  << "parameters for the model " << model << ",\n"
9604  << "but you specified " << parameters.nelem() << " parameters.\n";
9605  throw runtime_error(os.str());
9606  return;
9607  }
9608  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9609  {
9610  out3 << "Continuum model " << name << " running with \n"
9611  << "the parameters for model " << model << ".\n";
9613  0.00,
9614  0.00,
9615  model,
9616  f_mono,
9617  p_abs,
9618  t_abs,
9619  vmr );
9620  }
9621  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9622  {
9623  ostringstream os;
9624  os << "ERROR: Continuum model " << name << " requires NO input\n"
9625  << "parameters for the model " << model << ",\n"
9626  << "but you specified " << parameters.nelem() << " parameters.\n"
9627  << "This ambiguity can not be solved by arts.\n"
9628  << "Please see the arts user guide chapter 3.\n";
9629  }
9630  }
9631  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9632  else if ( "H2O-ContMPM93"==name )
9633  {
9634  // self and foreign continuum term are simultaneously calculated
9635  // since the parameterization can not be divided up in these two
9636  // terms because they are not additive terms.
9637  //
9638  // specific continuum parameters and units:
9639  // OUTPUT
9640  // xsec : [1/m],
9641  // INPUT
9642  // parameters[0] : pseudo continuum line frequency [Hz]
9643  // parameters[1] : pseudo continuum line strength parameter [Hz/Pa]
9644  // parameters[2] : pseudo continuum line strength temperature parameter [1]
9645  // parameters[3] : pseudo continuum line broadening parameter [Hz/Pa]
9646  // parameters[4] : pseudo continuum line broadening parameter [1]
9647  // parameters[5] : pseudo continuum line broadening parameter [1]
9648  // parameters[6] : pseudo continuum line broadening parameter [1]
9649  // f_mono : [Hz]
9650  // p_abs : [Pa]
9651  // t_abs : [K]
9652  // vmr : [1]
9653  //
9654  const int Nparam = 7;
9655  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9656  {
9657  out3 << "Continuum model " << name << " is running with \n"
9658  << "user defined parameters according to model " << model << ".\n";
9659  MPM93_H2O_continuum( xsec,
9660  parameters[0],
9661  parameters[1],
9662  parameters[2],
9663  parameters[3],
9664  parameters[4],
9665  parameters[5],
9666  parameters[6],
9667  model,
9668  f_mono,
9669  p_abs,
9670  t_abs,
9671  vmr );
9672  }
9673  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9674  {
9675  ostringstream os;
9676  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9677  << "parameters for the model " << model << ",\n"
9678  << "but you specified " << parameters.nelem() << " parameters.\n";
9679  throw runtime_error(os.str());
9680  return;
9681  }
9682  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9683  {
9684  out3 << "Continuum model " << name << " running with \n"
9685  << "the parameters for model " << model << ".\n";
9686  MPM93_H2O_continuum( xsec,
9687  0.00,
9688  0.00,
9689  0.00,
9690  0.00,
9691  0.00,
9692  0.00,
9693  0.00,
9694  model,
9695  f_mono,
9696  p_abs,
9697  t_abs,
9698  vmr );
9699  }
9700  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9701  {
9702  ostringstream os;
9703  os << "ERROR: Continuum model " << name << " requires NO input\n"
9704  << "parameters for the model " << model << ",\n"
9705  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
9706  << "This ambiguity can not be solved by arts.\n"
9707  << "Please see the arts user guide chapter 3.\n";
9708  throw runtime_error(os.str());
9709  return;
9710  }
9711  }
9712  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9713  else if ( "H2O-ForeignContATM01"==name )
9714  {
9715  // Foreign wet continuum term.
9716  //
9717  // Pardo et al., IEEE, Trans. Ant. Prop.,
9718  // Vol 49, No 12, pp. 1683-1694, 2001.
9719  //
9720  // specific continuum parameters and units:
9721  // OUTPUT
9722  // xsec : [1/m],
9723  // INPUT
9724  // parameters[0] : pseudo continuum line frequency [Hz]
9725  // f_mono : [Hz]
9726  // p_abs : [Pa]
9727  // t_abs : [K]
9728  // vmr : [1]
9729  //
9730  const int Nparam = 1;
9731  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9732  {
9733  out3 << "Continuum model " << name << " is running with \n"
9734  << "user defined parameters according to model " << model << ".\n";
9736  parameters[0],
9737  model,
9738  f_mono,
9739  p_abs,
9740  t_abs,
9741  vmr );
9742  }
9743  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9744  {
9745  ostringstream os;
9746  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9747  << "parameters for the model " << model << ",\n"
9748  << "but you specified " << parameters.nelem() << " parameters.\n";
9749  throw runtime_error(os.str());
9750  return;
9751  }
9752  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9753  {
9754  out3 << "Continuum model " << name << " running with \n"
9755  << "the parameters for model " << model << ".\n";
9757  0.000,
9758  model,
9759  f_mono,
9760  p_abs,
9761  t_abs,
9762  vmr );
9763  }
9764  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9765  {
9766  ostringstream os;
9767  os << "ERROR: Continuum model " << name << " requires NO input\n"
9768  << "parameters for the model " << model << ",\n"
9769  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
9770  << "This ambiguity can not be solved by arts.\n"
9771  << "Please see the arts user guide chapter 3.\n";
9772  throw runtime_error(os.str());
9773  return;
9774  }
9775  }
9776  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9777  else if ( "H2O-SelfContCKD222"==name )
9778  {
9779  // OUTPUT:
9780  // xsec cross section (absorption/volume mixing ratio) of
9781  // H2O self continuum according to CKD2.2.2 [1/m]
9782  // INPUT:
9783  // parameters[0] strength scaling factor [1]
9784  // model allows user defined input parameter set
9785  // (Cin) or choice of
9786  // pre-defined parameters of specific models (see note below).
9787  // f_mono predefined frequency grid [Hz]
9788  // p_abs predefined pressure grid [Pa]
9789  // t_abs predefined temperature grid [K]
9790  // vmr H2O volume mixing ratio profile [1]
9791  // n2_abs N2 volume mixing ratio profile [1]
9792  //
9793  // WWW resource: ftp.aer.com/aer_contnm_ckd
9794  const int Nparam = 1;
9795  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9796  {
9797  out3 << "Continuum model " << name << " is running with \n"
9798  << "user defined parameters according to model " << model << ".\n";
9799  CKD_222_self_h2o( xsec,
9800  parameters[0],
9801  model,
9802  f_mono,
9803  p_abs,
9804  t_abs,
9805  vmr,
9806  n2_abs );
9807  }
9808  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9809  {
9810  ostringstream os;
9811  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9812  << "parameters for the model " << model << ",\n"
9813  << "but you specified " << parameters.nelem() << " parameters.\n";
9814  throw runtime_error(os.str());
9815  return;
9816  }
9817  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9818  {
9819  out3 << "Continuum model " << name << " running with \n"
9820  << "the parameters for model " << model << ".\n";
9821  CKD_222_self_h2o( xsec,
9822  0.000,
9823  model,
9824  f_mono,
9825  p_abs,
9826  t_abs,
9827  vmr,
9828  n2_abs );
9829  }
9830  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9831  {
9832  ostringstream os;
9833  os << "ERROR: continuum model " << name << " requires NO input\n"
9834  << "parameters for the model " << model << ",\n"
9835  << "but you specified " << parameters.nelem() << " parameters.\n"
9836  << "This ambiguity can not be solved by arts.\n"
9837  << "Please see the arts user guide chapter 3.\n";
9838  throw runtime_error(os.str());
9839  }
9840  }
9841  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9842  else if ( "H2O-ForeignContCKD222"==name )
9843  {
9844  // OUTPUT:
9845  // xsec cross section (absorption/volume mixing ratio) of
9846  // H2O foreign continuum according to CKD2.2.2 [1/m]
9847  // INPUT:
9848  // parameters[0] strength scaling factor [1]
9849  // model allows user defined input parameter set
9850  // (Cin) or choice of
9851  // pre-defined parameters of specific models (see note below).
9852  // f_mono predefined frequency grid [Hz]
9853  // p_abs predefined pressure grid [Pa]
9854  // t_abs predefined temperature grid [K]
9855  // vmr H2O volume mixing ratio profile [1]
9856  // n2_abs N2 volume mixing ratio profile [1]
9857  //
9858  // WWW resource: ftp.aer.com/aer_contnm_ckd
9859  const int Nparam = 1;
9860  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9861  {
9862  out3 << "Continuum model " << name << " is running with \n"
9863  << "user defined parameters according to model " << model << ".\n";
9864  CKD_222_foreign_h2o( xsec,
9865  parameters[0],
9866  model,
9867  f_mono,
9868  p_abs,
9869  t_abs,
9870  vmr,
9871  n2_abs );
9872  }
9873  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9874  {
9875  ostringstream os;
9876  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9877  << "parameters for the model " << model << ",\n"
9878  << "but you specified " << parameters.nelem() << " parameters.\n";
9879  throw runtime_error(os.str());
9880  return;
9881  }
9882  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9883  {
9884  out3 << "Continuum model " << name << " running with \n"
9885  << "the parameters for model " << model << ".\n";
9886  CKD_222_foreign_h2o( xsec,
9887  0.000,
9888  model,
9889  f_mono,
9890  p_abs,
9891  t_abs,
9892  vmr,
9893  n2_abs );
9894  }
9895  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9896  {
9897  ostringstream os;
9898  os << "ERROR: continuum model " << name << " requires NO input\n"
9899  << "parameters for the model " << model << ",\n"
9900  << "but you specified " << parameters.nelem() << " parameters.\n"
9901  << "This ambiguity can not be solved by arts.\n"
9902  << "Please see the arts user guide chapter 3.\n";
9903  throw runtime_error(os.str());
9904  }
9905  }
9906  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9907  else if ( "H2O-SelfContCKD242"==name )
9908  {
9909  // OUTPUT:
9910  // xsec cross section (absorption/volume mixing ratio) of
9911  // H2O self continuum according to CKD2.4.2 [1/m]
9912  // INPUT:
9913  // parameters[0] strength scaling factor [1]
9914  // model allows user defined input parameter set
9915  // (Cin) or choice of
9916  // pre-defined parameters of specific models (see note below).
9917  // f_mono predefined frequency grid [Hz]
9918  // p_abs predefined pressure grid [Pa]
9919  // t_abs predefined temperature grid [K]
9920  // vmr H2O volume mixing ratio profile [1]
9921  // n2_abs N2 volume mixing ratio profile [1]
9922  //
9923  // WWW resource: ftp.aer.com/aer_contnm_ckd
9924  const int Nparam = 1;
9925  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9926  {
9927  out3 << "Continuum model " << name << " is running with \n"
9928  << "user defined parameters according to model " << model << ".\n";
9929  CKD_242_self_h2o( xsec,
9930  parameters[0],
9931  model,
9932  f_mono,
9933  p_abs,
9934  t_abs,
9935  vmr,
9936  n2_abs );
9937  }
9938  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
9939  {
9940  ostringstream os;
9941  os << "Continuum model " << name << " requires " << Nparam << " input\n"
9942  << "parameters for the model " << model << ",\n"
9943  << "but you specified " << parameters.nelem() << " parameters.\n";
9944  throw runtime_error(os.str());
9945  return;
9946  }
9947  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
9948  {
9949  out3 << "Continuum model " << name << " running with \n"
9950  << "the parameters for model " << model << ".\n";
9951  CKD_242_self_h2o( xsec,
9952  0.000,
9953  model,
9954  f_mono,
9955  p_abs,
9956  t_abs,
9957  vmr,
9958  n2_abs );
9959  }
9960  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
9961  {
9962  ostringstream os;
9963  os << "ERROR: continuum model " << name << " requires NO input\n"
9964  << "parameters for the model " << model << ",\n"
9965  << "but you specified " << parameters.nelem() << " parameters.\n"
9966  << "This ambiguity can not be solved by arts.\n"
9967  << "Please see the arts user guide chapter 3.\n";
9968  throw runtime_error(os.str());
9969  }
9970  }
9971  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9972  else if ( "H2O-ForeignContCKD242"==name )
9973  {
9974  // OUTPUT:
9975  // xsec cross section (absorption/volume mixing ratio) of
9976  // H2O foreign continuum according to CKD2.4.2 [1/m]
9977  // INPUT:
9978  // parameters[0] strength scaling factor [1]
9979  // model allows user defined input parameter set
9980  // (Cin) or choice of
9981  // pre-defined parameters of specific models (see note below).
9982  // f_mono predefined frequency grid [Hz]
9983  // p_abs predefined pressure grid [Pa]
9984  // t_abs predefined temperature grid [K]
9985  // vmr H2O volume mixing ratio profile [1]
9986  // n2_abs N2 volume mixing ratio profile [1]
9987  //
9988  // WWW resource: ftp.aer.com/aer_contnm_ckd
9989  const int Nparam = 1;
9990  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
9991  {
9992  out3 << "Continuum model " << name << " is running with \n"
9993  << "user defined parameters according to model " << model << ".\n";
9994  CKD_242_foreign_h2o( xsec,
9995  parameters[0],
9996  model,
9997  f_mono,
9998  p_abs,
9999  t_abs,
10000  vmr,
10001  n2_abs );
10002  }
10003  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10004  {
10005  ostringstream os;
10006  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10007  << "parameters for the model " << model << ",\n"
10008  << "but you specified " << parameters.nelem() << " parameters.\n";
10009  throw runtime_error(os.str());
10010  return;
10011  }
10012  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10013  {
10014  out3 << "Continuum model " << name << " running with \n"
10015  << "the parameters for model " << model << ".\n";
10016  CKD_242_foreign_h2o( xsec,
10017  0.000,
10018  model,
10019  f_mono,
10020  p_abs,
10021  t_abs,
10022  vmr,
10023  n2_abs );
10024  }
10025  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10026  {
10027  ostringstream os;
10028  os << "ERROR: continuum model " << name << " requires NO input\n"
10029  << "parameters for the model " << model << ",\n"
10030  << "but you specified " << parameters.nelem() << " parameters.\n"
10031  << "This ambiguity can not be solved by arts.\n"
10032  << "Please see the arts user guide chapter 3.\n";
10033  throw runtime_error(os.str());
10034  }
10035  }
10036  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10037  else if ( "H2O-SelfContCKDMT100"==name )
10038  {
10039  // OUTPUT:
10040  // xsec cross section (absorption/volume mixing ratio) of
10041  // H2O self continuum according to CKD MT 1.00 [1/m]
10042  // INPUT:
10043  // parameters[0] strength scaling factor [1]
10044  // model allows user defined input parameter set
10045  // (Cin) or choice of
10046  // pre-defined parameters of specific models (see note below).
10047  // f_mono predefined frequency grid [Hz]
10048  // p_abs predefined pressure grid [Pa]
10049  // t_abs predefined temperature grid [K]
10050  // vmr H2O volume mixing ratio profile [1]
10051  // n2_abs N2 volume mixing ratio profile [1]
10052  //
10053  // WWW resource: ftp.aer.com/aer_contnm_ckd
10054  const int Nparam = 1;
10055  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10056  {
10057  out3 << "Continuum model " << name << " is running with \n"
10058  << "user defined parameters according to model " << model << ".\n";
10059  CKD_mt_100_self_h2o( xsec,
10060  parameters[0],
10061  model,
10062  f_mono,
10063  p_abs,
10064  t_abs,
10065  vmr,
10066  n2_abs );
10067  }
10068  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10069  {
10070  ostringstream os;
10071  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10072  << "parameters for the model " << model << ",\n"
10073  << "but you specified " << parameters.nelem() << " parameters.\n";
10074  throw runtime_error(os.str());
10075  return;
10076  }
10077  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10078  {
10079  out3 << "Continuum model " << name << " running with \n"
10080  << "the parameters for model " << model << ".\n";
10081  CKD_mt_100_self_h2o( xsec,
10082  0.000,
10083  model,
10084  f_mono,
10085  p_abs,
10086  t_abs,
10087  vmr,
10088  n2_abs );
10089  }
10090  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10091  {
10092  ostringstream os;
10093  os << "ERROR: continuum model " << name << " requires NO input\n"
10094  << "parameters for the model " << model << ",\n"
10095  << "but you specified " << parameters.nelem() << " parameters.\n"
10096  << "This ambiguity can not be solved by arts.\n"
10097  << "Please see the arts user guide chapter 3.\n";
10098  throw runtime_error(os.str());
10099  }
10100  }
10101  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10102  else if ( "H2O-ForeignContCKDMT100"==name )
10103  {
10104  // OUTPUT:
10105  // xsec cross section (absorption/volume mixing ratio) of
10106  // H2O foreign continuum according to CKD MT 1.00 [1/m]
10107  // INPUT:
10108  // parameters[0] strength scaling factor [1]
10109  // model allows user defined input parameter set
10110  // (Cin) or choice of
10111  // pre-defined parameters of specific models (see note below).
10112  // f_mono predefined frequency grid [Hz]
10113  // p_abs predefined pressure grid [Pa]
10114  // t_abs predefined temperature grid [K]
10115  // vmr H2O volume mixing ratio profile [1]
10116  // n2_abs N2 volume mixing ratio profile [1]
10117  //
10118  // WWW resource: ftp.aer.com/aer_contnm_ckd
10119  const int Nparam = 1;
10120  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10121  {
10122  out3 << "Continuum model " << name << " is running with \n"
10123  << "user defined parameters according to model " << model << ".\n";
10124  CKD_mt_100_foreign_h2o( xsec,
10125  parameters[0],
10126  model,
10127  f_mono,
10128  p_abs,
10129  t_abs,
10130  vmr,
10131  n2_abs );
10132  }
10133  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10134  {
10135  ostringstream os;
10136  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10137  << "parameters for the model " << model << ",\n"
10138  << "but you specified " << parameters.nelem() << " parameters.\n";
10139  throw runtime_error(os.str());
10140  return;
10141  }
10142  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10143  {
10144  out3 << "Continuum model " << name << " running with \n"
10145  << "the parameters for model " << model << ".\n";
10146  CKD_mt_100_foreign_h2o( xsec,
10147  0.000,
10148  model,
10149  f_mono,
10150  p_abs,
10151  t_abs,
10152  vmr,
10153  n2_abs );
10154  }
10155  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10156  {
10157  ostringstream os;
10158  os << "ERROR: continuum model " << name << " requires NO input\n"
10159  << "parameters for the model " << model << ",\n"
10160  << "but you specified " << parameters.nelem() << " parameters.\n"
10161  << "This ambiguity can not be solved by arts.\n"
10162  << "Please see the arts user guide chapter 3.\n";
10163  throw runtime_error(os.str());
10164  }
10165  }
10166  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10167  else if ( "H2O-SelfContCKD24"==name )
10168  {
10169  // OUTPUT:
10170  // xsec cross section (absorption/volume mixing ratio) of
10171  // H2O continuum according to CKD2.4 [1/m]
10172  // INPUT:
10173  // parameters[0] strength scaling factor [1]
10174  // model allows user defined input parameter set
10175  // (Cin) or choice of
10176  // pre-defined parameters of specific models (see note below).
10177  // f_mono predefined frequency grid [Hz]
10178  // p_abs predefined pressure grid [Pa]
10179  // t_abs predefined temperature grid [K]
10180  // vmr H2O volume mixing ratio profile [1]
10181  // n2_abs N2 volume mixing ratio profile [1]
10182  //
10183  // WWW resource: ftp.aer.com/aer_contnm_ckd
10184  const int Nparam = 1;
10185  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10186  {
10187  out3 << "Continuum model " << name << " is running with \n"
10188  << "user defined parameters according to model " << model << ".\n";
10189  CKD24_H20( xsec,
10190  0,
10191  parameters[0],
10192  model,
10193  f_mono,
10194  p_abs,
10195  t_abs,
10196  vmr,
10197  n2_abs );
10198  }
10199  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10200  {
10201  ostringstream os;
10202  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10203  << "parameters for the model " << model << ",\n"
10204  << "but you specified " << parameters.nelem() << " parameters.\n";
10205  throw runtime_error(os.str());
10206  return;
10207  }
10208  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10209  {
10210  out3 << "Continuum model " << name << " running with \n"
10211  << "the parameters for model " << model << ".\n";
10212  CKD24_H20( xsec,
10213  0,
10214  0.000,
10215  model,
10216  f_mono,
10217  p_abs,
10218  t_abs,
10219  vmr,
10220  n2_abs );
10221  }
10222  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10223  {
10224  ostringstream os;
10225  os << "ERROR: continuum model " << name << " requires NO input\n"
10226  << "parameters for the model " << model << ",\n"
10227  << "but you specified " << parameters.nelem() << " parameters.\n"
10228  << "This ambiguity can not be solved by arts.\n"
10229  << "Please see the arts user guide chapter 3.\n";
10230  throw runtime_error(os.str());
10231  }
10232  }
10233  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10234  else if ( "H2O-ForeignContCKD24"==name )
10235  {
10236  // OUTPUT:
10237  // xsec cross section (absorption/volume mixing ratio) of
10238  // H2O continuum according to CKD2.4 [1/m]
10239  // INPUT:
10240  // Cin strength scaling factor [1]
10241  // model allows user defined input parameter set
10242  // (Cin) or choice of
10243  // pre-defined parameters of specific models (see note below).
10244  // f_mono predefined frequency grid [Hz]
10245  // p_abs predefined pressure grid [Pa]
10246  // t_abs predefined temperature grid [K]
10247  // vmr H2O volume mixing ratio profile [1]
10248  // n2_abs N2 volume mixing ratio profile [1]
10249  //
10250  // WWW resource: ftp.aer.com/aer_contnm_ckd
10251  const int Nparam = 1;
10252  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10253  {
10254  out3 << "Continuum model " << name << " is running with \n"
10255  << "user defined parameters according to model " << model << ".\n";
10256  CKD24_H20( xsec,
10257  1,
10258  parameters[0],
10259  model,
10260  f_mono,
10261  p_abs,
10262  t_abs,
10263  vmr,
10264  n2_abs );
10265  }
10266  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10267  {
10268  ostringstream os;
10269  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10270  << "parameters for the model " << model << ",\n"
10271  << "but you specified " << parameters.nelem() << " parameters.\n";
10272  throw runtime_error(os.str());
10273  return;
10274  }
10275  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10276  {
10277  out3 << "Continuum model " << name << " running with \n"
10278  << "the parameters for model " << model << ".\n";
10279  CKD24_H20( xsec,
10280  1,
10281  0,
10282  model,
10283  f_mono,
10284  p_abs,
10285  t_abs,
10286  vmr,
10287  n2_abs );
10288  }
10289  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10290  {
10291  ostringstream os;
10292  os << "ERROR: continuum model " << name << " requires NO input\n"
10293  << "parameters for the model " << model << ",\n"
10294  << "but you specified " << parameters.nelem() << " parameters.\n"
10295  << "This ambiguity can not be solved by arts.\n"
10296  << "Please see the arts user guide chapter 3.\n";
10297  throw runtime_error(os.str());
10298  }
10299  }
10300  // ============= H2O full models ======================================================
10301  else if ( "H2O-CP98"==name )
10302  {
10303  //
10304  // specific continuum parameters and units:
10305  // OUTPUT
10306  // xsec : [1/m],
10307  // INPUT
10308  // parameters[0] : continuum scale factor (CC) [1]
10309  // parameters[1] : line strength scale factor (CL) [1]
10310  // parameters[2] : line broadening scale factor (CW) [1]
10311  // f_mono : [Hz]
10312  // p_abs : [Pa]
10313  // t_abs : [K]
10314  // vmr : [1]
10315  //
10316  const int Nparam = 3;
10317  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10318  {
10319  out3 << "Full model " << name << " is running with \n"
10320  << "user defined parameters according to model " << model << ".\n";
10321  CP98H2OAbsModel( xsec,
10322  parameters[0],
10323  parameters[1],
10324  parameters[2],
10325  model,
10326  f_mono,
10327  p_abs,
10328  t_abs,
10329  vmr );
10330  }
10331  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10332  {
10333  ostringstream os;
10334  os << "Full model " << name << " requires " << Nparam << " input\n"
10335  << "parameters for the model " << model << ",\n"
10336  << "but you specified " << parameters.nelem() << " parameters.\n";
10337  throw runtime_error(os.str());
10338  return;
10339  }
10340  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10341  {
10342  out3 << "Full model " << name << " running with \n"
10343  << "the parameters for model " << model << ".\n";
10344  CP98H2OAbsModel( xsec,
10345  0.00,
10346  0.00,
10347  0.00,
10348  model,
10349  f_mono,
10350  p_abs,
10351  t_abs,
10352  vmr );
10353  }
10354  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10355  {
10356  ostringstream os;
10357  os << "ERROR: Full model " << name << " requires NO input\n"
10358  << "parameters for the model " << model << ",\n"
10359  << "but you specified " << parameters.nelem() << " parameters.\n"
10360  << "This ambiguity can not be solved by arts.\n"
10361  << "Please see the arts user guide chapter 3.\n";
10362  throw runtime_error(os.str());
10363  }
10364  }
10365  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10366  else if ( "H2O-MPM87"==name )
10367  {
10368  //
10369  // specific continuum parameters and units:
10370  // a) output
10371  // xsec : [1/m],
10372  // b) input
10373  // parameters[0] : continuum scale factor (CC) [1]
10374  // parameters[1] : line strength scale factor (CL) [1]
10375  // parameters[2] : line broadening scale factor (CW) [1]
10376  // f_mono : [Hz]
10377  // p_abs : [Pa]
10378  // t_abs : [K]
10379  // vmr : [1]
10380  //
10381  const int Nparam = 3;
10382  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10383  {
10384  out3 << "Full model " << name << " is running with \n"
10385  << "user defined parameters according to model " << model << ".\n";
10386  MPM87H2OAbsModel( xsec,
10387  parameters[0],
10388  parameters[1],
10389  parameters[2],
10390  model,
10391  f_mono,
10392  p_abs,
10393  t_abs,
10394  vmr );
10395  }
10396  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10397  {
10398  ostringstream os;
10399  os << "Full model " << name << " requires " << Nparam << " input\n"
10400  << "parameters for the model " << model << ",\n"
10401  << "but you specified " << parameters.nelem() << " parameters.\n";
10402  throw runtime_error(os.str());
10403  return;
10404  }
10405  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10406  {
10407  out3 << "Full model " << name << " running with \n"
10408  << "the parameters for model " << model << ".\n";
10409  MPM87H2OAbsModel( xsec,
10410  0.00,
10411  0.00,
10412  0.00,
10413  model,
10414  f_mono,
10415  p_abs,
10416  t_abs,
10417  vmr );
10418  }
10419  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10420  {
10421  ostringstream os;
10422  os << "ERROR: Full model " << name << " requires NO input\n"
10423  << "parameters for the model " << model << ",\n"
10424  << "but you specified " << parameters.nelem() << " parameters.\n"
10425  << "This ambiguity can not be solved by arts.\n"
10426  << "Please see the arts user guide chapter 3.\n";
10427  throw runtime_error(os.str());
10428  return;
10429  }
10430  }
10431  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10432  else if ( "H2O-MPM89"==name )
10433  {
10434  //
10435  // specific continuum parameters and units:
10436  // a) output
10437  // xsec : [1/m],
10438  // b) input
10439  // parameters[0] : continuum scale factor (CC) [1]
10440  // parameters[1] : line strength scale factor (CL) [1]
10441  // parameters[2] : line broadening scale factor (CW [1]
10442  // f_mono : [Hz]
10443  // p_abs : [Pa]
10444  // t_abs : [K]
10445  // vmr : [1]
10446  //
10447  const int Nparam = 3;
10448  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10449  {
10450  out3 << "Full model " << name << " is running with \n"
10451  << "user defined parameters according to model " << model << ".\n";
10452  MPM89H2OAbsModel( xsec,
10453  parameters[0],
10454  parameters[1],
10455  parameters[2],
10456  model,
10457  f_mono,
10458  p_abs,
10459  t_abs,
10460  vmr );
10461  }
10462  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10463  {
10464  ostringstream os;
10465  os << "Full model " << name << " requires " << Nparam << " input\n"
10466  << "parameters for the model " << model << ",\n"
10467  << "but you specified " << parameters.nelem() << " parameters.\n";
10468  throw runtime_error(os.str());
10469  return;
10470  }
10471  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10472  {
10473  out3 << "Full model " << name << " running with \n"
10474  << "the parameters for model " << model << ".\n";
10475  MPM89H2OAbsModel( xsec,
10476  0.00,
10477  0.00,
10478  0.00,
10479  model,
10480  f_mono,
10481  p_abs,
10482  t_abs,
10483  vmr );
10484  }
10485  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10486  {
10487  ostringstream os;
10488  os << "ERROR: Full model " << name << " requires NO input\n"
10489  << "parameters for the model " << model << ",\n"
10490  << "but you specified " << parameters.nelem() << " parameters.\n"
10491  << "This ambiguity can not be solved by arts.\n"
10492  << "Please see the arts user guide chapter 3.\n";
10493  throw runtime_error(os.str());
10494  return;
10495  }
10496  }
10497  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10498  else if ( "H2O-MPM93"==name )
10499  {
10500  //
10501  // specific continuum parameters and units:
10502  // OUTPUT
10503  // xsec : [1/m],
10504  // INPUT
10505  // parameters[0] : continuum scale factor (CC) [1]
10506  // parameters[1] : line strength scale factor (CL) [1]
10507  // parameters[2] : line broadening scale factor (CW) [1]
10508  // f_mono : [Hz]
10509  // p_abs : [Pa]
10510  // t_abs : [K]
10511  // vmr : [1]
10512  //
10513  const int Nparam = 3;
10514  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10515  {
10516  out3 << "Full model " << name << " is running with \n"
10517  << "user defined parameters according to model " << model << ".\n";
10518  MPM93H2OAbsModel( xsec,
10519  parameters[0],
10520  parameters[1],
10521  parameters[2],
10522  model,
10523  f_mono,
10524  p_abs,
10525  t_abs,
10526  vmr );
10527  }
10528  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10529  {
10530  ostringstream os;
10531  os << "Full model " << name << " requires " << Nparam << " input\n"
10532  << "parameters for the model " << model << ",\n"
10533  << "but you specified " << parameters.nelem() << " parameters.\n";
10534  throw runtime_error(os.str());
10535  return;
10536  }
10537  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10538  {
10539  out3 << "Full model " << name << " running with \n"
10540  << "the parameters for model " << model << ".\n";
10541  MPM93H2OAbsModel( xsec,
10542  0.00,
10543  0.00,
10544  0.00,
10545  model,
10546  f_mono,
10547  p_abs,
10548  t_abs,
10549  vmr );
10550  }
10551  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10552  {
10553  ostringstream os;
10554  os << "ERROR: Full model " << name << " requires NO input\n"
10555  << "parameters for the model " << model << ",\n"
10556  << "but you specified " << parameters.nelem() << " parameters.\n"
10557  << "This ambiguity can not be solved by arts.\n"
10558  << "Please see the arts user guide chapter 3.\n";
10559  throw runtime_error(os.str());
10560  return;
10561  }
10562  }
10563  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10564  else if ( "H2O-PWR98"==name )
10565  {
10566  // specific continuum parameters and units:
10567  // OUTPUT
10568  // xsec : [1/m],
10569  // INPUT
10570  // parameters[0] : continuum scale factor (CC) [1]
10571  // parameters[1] : line strength scale factor (CL) [1]
10572  // parameters[2] : line broadening scale factor (CW) [1]
10573  // f_mono : [Hz]
10574  // p_abs : [Pa]
10575  // t_abs : [K]
10576  // vmr : [1]
10577  //
10578  const int Nparam = 3;
10579  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10580  {
10581  out3 << "Full model " << name << " is running with \n"
10582  << "user defined parameters according to model " << model << ".\n";
10583  PWR98H2OAbsModel( xsec,
10584  parameters[0],
10585  parameters[1],
10586  parameters[2],
10587  model,
10588  f_mono,
10589  p_abs,
10590  t_abs,
10591  vmr );
10592  }
10593  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10594  {
10595  ostringstream os;
10596  os << "Full model " << name << " requires " << Nparam << " input\n"
10597  << "parameters for the model " << model << ",\n"
10598  << "but you specified " << parameters.nelem() << " parameters.\n";
10599  throw runtime_error(os.str());
10600  return;
10601  }
10602  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10603  {
10604  out3 << "Full model " << name << " running with \n"
10605  << "the parameters for model " << model << ".\n";
10606  PWR98H2OAbsModel( xsec,
10607  0.00,
10608  0.00,
10609  0.00,
10610  model,
10611  f_mono,
10612  p_abs,
10613  t_abs,
10614  vmr );
10615  }
10616  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10617  {
10618  ostringstream os;
10619  os << "ERROR: Full model " << name << " requires NO input\n"
10620  << "parameters for the model " << model << ",\n"
10621  << "but you specified " << parameters.nelem() << " parameters.\n"
10622  << "This ambiguity can not be solved by arts.\n"
10623  << "Please see the arts user guide chapter 3.\n";
10624  throw runtime_error(os.str());
10625  return;
10626  }
10627  }
10628  // ============= O2 continuum =========================================================
10629  else if ( "O2-CIAfunCKDMT100"==name )
10630  {
10631  // Model reference:
10632  // F. Thibault, V. Menoux, R. Le Doucen, L. Rosenman,
10633  // J.-M. Hartmann, Ch. Boulet,
10634  // "Infrared collision-induced absorption by O2 near 6.4 microns for
10635  // atmospheric applications: measurements and emprirical modeling",
10636  // Appl. Optics, 35, 5911-5917, (1996).
10637  //
10638  // specific continuum parameters and units:
10639  // OUTPUT
10640  // xsec : [1/m],
10641  // INPUT
10642  // parameters[0] : continuum scaling
10643  // model : model option ("CKD" or "user")
10644  // f_mono : [Hz]
10645  // p_abs : [Pa]
10646  // t_abs : [K]
10647  // h2o_abs : [1]
10648  // vmr : [1]
10649  //
10650  const int Nparam = 1;
10651  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10652  {
10653  out3 << "Continuum model " << name << " is running with \n"
10654  << "user defined parameters according to model " << model << ".\n";
10655  CKD_mt_CIAfun_o2( xsec,
10656  parameters[0],
10657  model,
10658  f_mono,
10659  p_abs,
10660  t_abs,
10661  vmr );
10662  }
10663  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10664  {
10665  ostringstream os;
10666  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10667  << "parameters for the model " << model << ",\n"
10668  << "but you specified " << parameters.nelem() << " parameters.\n";
10669  throw runtime_error(os.str());
10670  return;
10671  }
10672  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10673  {
10674  out3 << "Continuum model " << name << " running with \n"
10675  << "the parameters for model " << model << ".\n";
10676  CKD_mt_CIAfun_o2( xsec,
10677  0.00e0,
10678  model,
10679  f_mono,
10680  p_abs,
10681  t_abs,
10682  vmr );
10683  }
10684  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10685  {
10686  ostringstream os;
10687  os << "ERROR: Continuum model " << name << " requires NO input\n"
10688  << "parameters for the model " << model << ",\n"
10689  << "but you specified " << parameters.nelem() << " parameters.\n"
10690  << "This ambiguity can not be solved by arts.\n"
10691  << "Please see the arts user guide chapter 3.\n";
10692  throw runtime_error(os.str());
10693  return;
10694  }
10695  }
10696  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10697  else if ( "O2-v0v0CKDMT100"==name )
10698  {
10699  // Model reference:
10700  // B. Mate, C. Lugez, G.T. Fraser, W.J. Lafferty,
10701  // "Absolute Intensities for the O2 1.27 micron
10702  // continuum absorption",
10703  // J. Geophys. Res., 104, 30,585-30,590, 1999.
10704  //
10705  // specific continuum parameters and units:
10706  // OUTPUT
10707  // xsec : [1/m],
10708  // INPUT
10709  // parameters[0] : continuum scaling
10710  // model : model option ("CKD" or "user")
10711  // f_mono : [Hz]
10712  // p_abs : [Pa]
10713  // t_abs : [K]
10714  // vmr : [1]
10715  // n2_abs : [1]
10716  // h2o_abs : [1]
10717  //
10718  const int Nparam = 1;
10719  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10720  {
10721  out3 << "Continuum model " << name << " is running with \n"
10722  << "user defined parameters according to model " << model << ".\n";
10723  CKD_mt_v0v0_o2( xsec,
10724  parameters[0],
10725  model,
10726  f_mono,
10727  p_abs,
10728  t_abs,
10729  vmr,
10730  n2_abs );
10731  }
10732  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10733  {
10734  ostringstream os;
10735  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10736  << "parameters for the model " << model << ",\n"
10737  << "but you specified " << parameters.nelem() << " parameters.\n";
10738  throw runtime_error(os.str());
10739  return;
10740  }
10741  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10742  {
10743  out3 << "Continuum model " << name << " running with \n"
10744  << "the parameters for model " << model << ".\n";
10745  CKD_mt_v0v0_o2( xsec,
10746  0.0e0,
10747  model,
10748  f_mono,
10749  p_abs,
10750  t_abs,
10751  vmr,
10752  n2_abs );
10753  }
10754  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10755  {
10756  ostringstream os;
10757  os << "ERROR: Continuum model " << name << " requires NO input\n"
10758  << "parameters for the model " << model << ",\n"
10759  << "but you specified " << parameters.nelem() << " parameters.\n"
10760  << "This ambiguity can not be solved by arts.\n"
10761  << "Please see the arts user guide chapter 3.\n";
10762  throw runtime_error(os.str());
10763  return;
10764  }
10765  }
10766  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10767  else if ( "O2-v1v0CKDMT100"==name )
10768  {
10769  // Model reference:
10770  // Mlawer, Clough, Brown, Stephen, Landry, Goldman, Murcray,
10771  // "Observed Atmospheric Collision Induced Absorption in Near Infrared Oxygen Bands",
10772  // Journal of Geophysical Research, vol 103, no. D4, pp. 3859-3863, 1998.
10773  //
10774  // specific continuum parameters and units:
10775  // OUTPUT
10776  // xsec : [1/m],
10777  // INPUT
10778  // parameters[0] : continuum scaling
10779  // model : model option ("CKD" or "user")
10780  // f_mono : [Hz]
10781  // p_abs : [Pa]
10782  // t_abs : [K]
10783  // vmr : [1]
10784  // n2_abs : [1]
10785  // h2o_abs : [1]
10786  //
10787  const int Nparam = 1;
10788  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10789  {
10790  out3 << "Continuum model " << name << " is running with \n"
10791  << "user defined parameters according to model " << model << ".\n";
10792  CKD_mt_v1v0_o2( xsec,
10793  parameters[0],
10794  model,
10795  f_mono,
10796  p_abs,
10797  t_abs,
10798  vmr );
10799  }
10800  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10801  {
10802  ostringstream os;
10803  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10804  << "parameters for the model " << model << ",\n"
10805  << "but you specified " << parameters.nelem() << " parameters.\n";
10806  throw runtime_error(os.str());
10807  return;
10808  }
10809  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10810  {
10811  out3 << "Continuum model " << name << " running with \n"
10812  << "the parameters for model " << model << ".\n";
10813  CKD_mt_v1v0_o2( xsec,
10814  0.0e0,
10815  model,
10816  f_mono,
10817  p_abs,
10818  t_abs,
10819  vmr );
10820  }
10821  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10822  {
10823  ostringstream os;
10824  os << "ERROR: Continuum model " << name << " requires NO input\n"
10825  << "parameters for the model " << model << ",\n"
10826  << "but you specified " << parameters.nelem() << " parameters.\n"
10827  << "This ambiguity can not be solved by arts.\n"
10828  << "Please see the arts user guide chapter 3.\n";
10829  throw runtime_error(os.str());
10830  return;
10831  }
10832  }
10833  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10834  else if ( "O2-SelfContStandardType"==name )
10835  {
10836  // MPM93, Rosenkranz 1993 O2 continuum:
10837  // see publication side of National Telecommunications and Information Administration
10838  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
10839  // and ftp side for downloading the MPM93 original source code:
10840  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
10841  //
10842  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
10843  // "Atmospheric Remote Sensing by Microwave Radiometry",
10844  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
10845  // (see also JQSRT, Vol.48, No.5/6 pp.629-643, 1992)
10846  //
10847  // specific continuum parameters and units:
10848  // OUTPUT
10849  // xsec : [1/m],
10850  // INPUT
10851  // parameters[0] : continuum coefficient (C) [1/m*1/Hz*1/Pa]
10852  // parameters[1] : frequency coefficient (G0) [Hz/Pa]
10853  // parameters[3] : line width parameter (G0A) [1]
10854  // parameters[3] : line width parameter (G0B) [1]
10855  // parameters[2] : temperature exponent (XG0d) [1]
10856  // parameters[2] : temperature exponent (x_s) [1]
10857  // parameters[5] : continuum coefficient (XG0w) [1]
10858  // model : model option ("MPM93", "Rosenkranz", or "user")
10859  // f_mono : [Hz]
10860  // p_abs : [Pa]
10861  // t_abs : [K]
10862  // h2o_abs : [1]
10863  // vmr : [1]
10864  //
10865  const int Nparam = 6;
10866  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10867  {
10868  out3 << "Continuum model " << name << " is running with \n"
10869  << "user defined parameters according to model " << model << ".\n";
10870  Standard_O2_continuum( xsec,
10871  parameters[0],
10872  parameters[1],
10873  parameters[2],
10874  parameters[3],
10875  parameters[4],
10876  parameters[5],
10877  model,
10878  f_mono,
10879  p_abs,
10880  t_abs,
10881  h2o_abs,
10882  vmr );
10883  }
10884  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10885  {
10886  ostringstream os;
10887  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10888  << "parameters for the model " << model << ",\n"
10889  << "but you specified " << parameters.nelem() << " parameters.\n";
10890  throw runtime_error(os.str());
10891  return;
10892  }
10893  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10894  {
10895  out3 << "Continuum model " << name << " running with \n"
10896  << "the parameters for model " << model << ".\n";
10897  Standard_O2_continuum( xsec,
10898  0.00,
10899  0.00,
10900  0.00,
10901  0.00,
10902  0.00,
10903  0.00,
10904  model,
10905  f_mono,
10906  p_abs,
10907  t_abs,
10908  h2o_abs,
10909  vmr );
10910  }
10911  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10912  {
10913  ostringstream os;
10914  os << "ERROR: Continuum model " << name << " requires NO input\n"
10915  << "parameters for the model " << model << ",\n"
10916  << "but you specified " << parameters.nelem() << " parameters.\n"
10917  << "This ambiguity can not be solved by arts.\n"
10918  << "Please see the arts user guide chapter 3.\n";
10919  throw runtime_error(os.str());
10920  return;
10921  }
10922  }
10923  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10924  else if ( "O2-SelfContMPM93"==name )
10925  {
10926  // MPM93 O2 continuum:
10927  // see publication side of National Telecommunications and Information Administration
10928  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
10929  // and ftp side for downloading the MPM93 original source code:
10930  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
10931 
10932  //
10933  // specific continuum parameters and units:
10934  // OUTPUT
10935  // xsec : [1/m],
10936  // INPUT
10937  // parameters[0] : continuum coefficient (C) [1/m / (Hz²*Pa²)]
10938  // parameters[1] : temperature exponent (x_s) [1]
10939  // f_mono : [Hz]
10940  // p_abs : [Pa]
10941  // t_abs : [K]
10942  // h2o_abs : [1]
10943  // vmr : [1]
10944  //
10945  const int Nparam = 4;
10946  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
10947  {
10948  out3 << "Continuum model " << name << " is running with \n"
10949  << "user defined parameters according to model " << model << ".\n";
10950  MPM93_O2_continuum( xsec,
10951  parameters[0],
10952  parameters[1],
10953  parameters[2],
10954  parameters[3],
10955  model,
10956  f_mono,
10957  p_abs,
10958  t_abs,
10959  h2o_abs,
10960  vmr );
10961  }
10962  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
10963  {
10964  ostringstream os;
10965  os << "Continuum model " << name << " requires " << Nparam << " input\n"
10966  << "parameters for the model " << model << ",\n"
10967  << "but you specified " << parameters.nelem() << " parameters.\n";
10968  throw runtime_error(os.str());
10969  return;
10970  }
10971  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
10972  {
10973  out3 << "Continuum model " << name << " running with \n"
10974  << "the parameters for model " << model << ".\n";
10975  MPM93_O2_continuum( xsec,
10976  0.00,
10977  0.00,
10978  0.00,
10979  0.00,
10980  model,
10981  f_mono,
10982  p_abs,
10983  t_abs,
10984  h2o_abs,
10985  vmr );
10986  }
10987  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
10988  {
10989  ostringstream os;
10990  os << "ERROR: Continuum model " << name << " requires NO input\n"
10991  << "parameters for the model " << model << ",\n"
10992  << "but you specified " << parameters.nelem() << " parameters.\n"
10993  << "This ambiguity can not be solved by arts.\n"
10994  << "Please see the arts user guide chapter 3.\n";
10995  throw runtime_error(os.str());
10996  return;
10997  }
10998  }
10999  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11000  else if ( "O2-SelfContPWR93"==name )
11001  {
11002  // data information about this continuum:
11003  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
11004  // "Atmospheric Remote Sensing by Microwave Radiometry",
11005  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
11006  // (see also JQSRT, Vol.48, No.5/6 pp.629-643, 1992)
11007  //
11008  // specific continuum parameters and units:
11009  // OUTPUT
11010  // xsec : [1/m],
11011  // INPUT
11012  // parameters[0] : continuum coefficient (C) [K²/(Hz*Pa*m)]
11013  // parameters[1] : temperature exponent (x) [1]
11014  // f_mono : [Hz]
11015  // p_abs : [Pa]
11016  // t_abs : [K]
11017  // vmr : [1]
11018  //
11019  const int Nparam = 4;
11020  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11021  {
11022  out3 << "Continuum model " << name << " is running with \n"
11023  << "user defined parameters according to model " << model << ".\n";
11025  parameters[0],
11026  parameters[1],
11027  parameters[2],
11028  parameters[3],
11029  model,
11030  f_mono,
11031  p_abs,
11032  t_abs,
11033  h2o_abs,
11034  vmr );
11035  }
11036  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11037  {
11038  ostringstream os;
11039  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11040  << "parameters for the model " << model << ",\n"
11041  << "but you specified " << parameters.nelem() << " parameters.\n";
11042  throw runtime_error(os.str());
11043  return;
11044  }
11045  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11046  {
11047  out3 << "Continuum model " << name << " running with \n"
11048  << "the parameters for model " << model << ".\n";
11050  0.00,
11051  0.00,
11052  0.00,
11053  0.00,
11054  model,
11055  f_mono,
11056  p_abs,
11057  t_abs,
11058  h2o_abs,
11059  vmr );
11060  }
11061  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11062  {
11063  ostringstream os;
11064  os << "ERROR: Continuum model " << name << " requires NO input\n"
11065  << "parameters for the model " << model << ",\n"
11066  << "but you specified " << parameters.nelem() << " parameters.\n"
11067  << "This ambiguity can not be solved by arts.\n"
11068  << "Please see the arts user guide chapter 3.\n";
11069  throw runtime_error(os.str());
11070  return;
11071  }
11072  }
11073  // ============= O2 full model ========================================================
11074  else if ( "O2-PWR88"==name )
11075  {
11076  // REFERENCE FOR EQUATIONS AND COEFFICIENTS:
11077  // P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING
11078  // BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED. 1993)
11079  // AND
11080  // H.J. LIEBE ET AL, JQSRT V.48, PP.629-643 (1992)
11081  // (EXCEPT: SUBMILLIMETER LINE INTENSITIES FROM HITRAN92)
11082  // AND
11083  // P. W. ROSENKRANZ, INTERFERENCE COEFFICIENTS FOR THE
11084  // OVERLAPPING OXYGEN LINES IN AIR, JQSRT, 1988, VOLUME 39, 287-297.
11085  //
11086  // the only difference to the 1993 version is the line mixing
11087  // parameter Y, which is taken from the above reference JQSRT, 1988.
11088  //
11089  // specific continuum parameters and units:
11090  // OUTPUT
11091  // xsec : [1/m],
11092  // INPUT
11093  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11094  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11095  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11096  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11097  // f_mono : [Hz]
11098  // p_abs : [Pa]
11099  // t_abs : [K]
11100  // h2o_abs, : [1]
11101  // vmr : [1]
11102  //
11103  const int Nparam = 4;
11104  const char *version="PWR88";
11105  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11106  {
11107  out3 << "Full model " << name << " is running with \n"
11108  << "user defined parameters according to model " << model << ".\n";
11109  PWR93O2AbsModel( xsec,
11110  parameters[0], // continuum term scale factor
11111  parameters[1], // line strength scale factor
11112  parameters[2], // line broadening scale factor
11113  parameters[3], // line coupling scale factor
11114  model,
11115  version,
11116  f_mono,
11117  p_abs,
11118  t_abs,
11119  h2o_abs,
11120  vmr );
11121  }
11122  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11123  {
11124  ostringstream os;
11125  os << "Full model " << name << " requires " << Nparam << " input\n"
11126  << "parameters for the model " << model << ",\n"
11127  << "but you specified " << parameters.nelem() << " parameters.\n";
11128  throw runtime_error(os.str());
11129  return;
11130  }
11131  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11132  {
11133  out3 << "Full model " << name << " running with \n"
11134  << "the parameters for model " << model << ".\n";
11135  PWR93O2AbsModel( xsec,
11136  0.00,
11137  0.00,
11138  0.00,
11139  0.00,
11140  model,
11141  version,
11142  f_mono,
11143  p_abs,
11144  t_abs,
11145  h2o_abs,
11146  vmr );
11147  }
11148  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11149  {
11150  ostringstream os;
11151  os << "ERROR: Full model " << name << " requires NO input\n"
11152  << "parameters for the model " << model << ",\n"
11153  << "but you specified " << parameters.nelem() << " parameters.\n"
11154  << "This ambiguity can not be solved by arts.\n"
11155  << "Please see the arts user guide chapter 3.\n";
11156  throw runtime_error(os.str());
11157  return;
11158  }
11159  }
11160  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11161  else if ( "O2-PWR93"==name )
11162  {
11163  // REFERENCE FOR EQUATIONS AND COEFFICIENTS:
11164  // P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING
11165  // BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED. 1993)
11166  // AND H.J. LIEBE ET AL, JQSRT V.48, PP.629-643 (1992)
11167  // (EXCEPT: SUBMILLIMETER LINE INTENSITIES FROM HITRAN92)
11168  //
11169  // specific continuum parameters and units:
11170  // OUTPUT
11171  // xsec : [1/m],
11172  // INPUT
11173  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11174  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11175  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11176  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11177  // f_mono : [Hz]
11178  // p_abs : [Pa]
11179  // t_abs : [K]
11180  // h2o_abs, : [1]
11181  // vmr : [1]
11182  //
11183  const int Nparam = 4;
11184  const char *version="PWR93";
11185  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11186  {
11187  out3 << "Full model " << name << " is running with \n"
11188  << "user defined parameters according to model " << model << ".\n";
11189  PWR93O2AbsModel( xsec,
11190  parameters[0], // continuum term scale factor
11191  parameters[1], // line strength scale factor
11192  parameters[2], // line broadening scale factor
11193  parameters[3], // line coupling scale factor
11194  model,
11195  version,
11196  f_mono,
11197  p_abs,
11198  t_abs,
11199  h2o_abs,
11200  vmr );
11201  }
11202  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11203  {
11204  ostringstream os;
11205  os << "Full model " << name << " requires " << Nparam << " input\n"
11206  << "parameters for the model " << model << ",\n"
11207  << "but you specified " << parameters.nelem() << " parameters.\n";
11208  throw runtime_error(os.str());
11209  return;
11210  }
11211  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11212  {
11213  out3 << "Full model " << name << " running with \n"
11214  << "the parameters for model " << model << ".\n";
11215  PWR93O2AbsModel( xsec,
11216  0.00,
11217  0.00,
11218  0.00,
11219  0.00,
11220  model,
11221  version,
11222  f_mono,
11223  p_abs,
11224  t_abs,
11225  h2o_abs,
11226  vmr );
11227  }
11228  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11229  {
11230  ostringstream os;
11231  os << "ERROR: Full model " << name << " requires NO input\n"
11232  << "parameters for the model " << model << ",\n"
11233  << "but you specified " << parameters.nelem() << " parameters.\n"
11234  << "This ambiguity can not be solved by arts.\n"
11235  << "Please see the arts user guide chapter 3.\n";
11236  throw runtime_error(os.str());
11237  return;
11238  }
11239  }
11240  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11241  else if ( "O2-PWR98"==name )
11242  {
11243  // REFERENCES FOR EQUATIONS AND COEFFICIENTS:
11244  // P.W. Rosenkranz, CHAP. 2 and appendix, in ATMOSPHERIC REMOTE SENSING
11245  // BY MICROWAVE RADIOMETRY (M.A. Janssen, ed., 1993).
11246  // H.J. Liebe et al, JQSRT V.48, PP.629-643 (1992).
11247  // M.J. Schwartz, Ph.D. thesis, M.I.T. (1997).
11248  // SUBMILLIMETER LINE INTENSITIES FROM HITRAN96.
11249  // This version differs from Liebe's MPM92 in two significant respects:
11250  // 1. It uses the modification of the 1- line width temperature dependence
11251  // recommended by Schwartz: (1/T).
11252  // 2. It uses the same temperature dependence (X) for submillimeter
11253  // line widths as in the 60 GHz band: (1/T)**0.8
11254  //
11255  // specific continuum parameters and units:
11256  // OUTPUT
11257  // xsec : [1/m],
11258  // INPUT
11259  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11260  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11261  // parameters[1] : line broadening scale factor, default CW = 1.000 [1]
11262  // parameters[1] : line coupling scale factor, default CO = 1.000 [1]
11263  // f_mono : [Hz]
11264  // p_abs : [Pa]
11265  // t_abs : [K]
11266  // h2o_abs, : [1]
11267  // vmr : [1]
11268  //
11269  const int Nparam = 4;
11270  const char *version="PWR98";
11271  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11272  {
11273  out3 << "Full model " << name << " is running with \n"
11274  << "user defined parameters according to model " << model << ".\n";
11275  PWR93O2AbsModel( xsec,
11276  parameters[0], // continuum term scale factor
11277  parameters[1], // line strength scale factor
11278  parameters[2], // line broadening scale factor
11279  parameters[3], // line coupling scale factor
11280  model,
11281  version,
11282  f_mono,
11283  p_abs,
11284  t_abs,
11285  h2o_abs,
11286  vmr );
11287  }
11288  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11289  {
11290  ostringstream os;
11291  os << "Full model " << name << " requires " << Nparam << " input\n"
11292  << "parameters for the model " << model << ",\n"
11293  << "but you specified " << parameters.nelem() << " parameters.\n";
11294  throw runtime_error(os.str());
11295  return;
11296  }
11297  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11298  {
11299  out3 << "Full model " << name << " running with \n"
11300  << "the parameters for model " << model << ".\n";
11301  PWR93O2AbsModel( xsec,
11302  0.00,
11303  0.00,
11304  0.00,
11305  0.00,
11306  model,
11307  version,
11308  f_mono,
11309  p_abs,
11310  t_abs,
11311  h2o_abs,
11312  vmr );
11313  }
11314  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11315  {
11316  ostringstream os;
11317  os << "ERROR: Full model " << name << " requires NO input\n"
11318  << "parameters for the model " << model << ",\n"
11319  << "but you specified " << parameters.nelem() << " parameters.\n"
11320  << "This ambiguity can not be solved by arts.\n"
11321  << "Please see the arts user guide chapter 3.\n";
11322  throw runtime_error(os.str());
11323  return;
11324  }
11325  }
11326  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11327  else if ( "O2-MPM93"==name )
11328  {
11329  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
11330  // "Propagation modeling of moist air and suspended water/ice
11331  // particles at frequencies below 1000 GHz",
11332  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
11333  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
11334  //
11335  // specific continuum parameters and units:
11336  // OUTPUT
11337  // xsec : [1/m],
11338  // INPUT
11339  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11340  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11341  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11342  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11343  // f_mono : [Hz]
11344  // p_abs : [Pa]
11345  // t_abs : [K]
11346  // h2o_abs, : [1]
11347  // vmr : [1]
11348  //
11349  const int Nparam = 4;
11350  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11351  {
11352  out3 << "Full model " << name << " is running with \n"
11353  << "user defined parameters according to model " << model << ".\n";
11354  MPM93O2AbsModel( xsec,
11355  parameters[0], // continuum term scale factor
11356  parameters[1], // line strength scale factor
11357  parameters[2], // line broadening scale factor
11358  parameters[3], // line coupling scale factor
11359  model,
11360  f_mono,
11361  p_abs,
11362  t_abs,
11363  h2o_abs,
11364  vmr );
11365  }
11366  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11367  {
11368  ostringstream os;
11369  os << "Full model " << name << " requires " << Nparam << " input\n"
11370  << "parameters for the model " << model << ",\n"
11371  << "but you specified " << parameters.nelem() << " parameters.\n";
11372  throw runtime_error(os.str());
11373  return;
11374  }
11375  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11376  {
11377  out3 << "Full model " << name << " running with \n"
11378  << "the parameters for model " << model << ".\n";
11379  MPM93O2AbsModel( xsec,
11380  0.00,
11381  0.00,
11382  0.00,
11383  0.00,
11384  model,
11385  f_mono,
11386  p_abs,
11387  t_abs,
11388  h2o_abs,
11389  vmr );
11390  }
11391  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11392  {
11393  ostringstream os;
11394  os << "ERROR: Full model " << name << " requires NO input\n"
11395  << "parameters for the model " << model << ",\n"
11396  << "but you specified " << parameters.nelem() << " parameters.\n"
11397  << "This ambiguity can not be solved by arts.\n"
11398  << "Please see the arts user guide chapter 3.\n";
11399  throw runtime_error(os.str());
11400  return;
11401  }
11402  }
11403  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11404  else if ( "O2-MPM92"==name )
11405  {
11406  // H. J. Liebe, P. W. Rosenkranz and G. A. Hufford,
11407  // Atmospheric 60-GHz Oxygen Spectrum: New Laboratory
11408  // Measurements and Line Parameters
11409  // JQSRT, Vol 48, pp. 629-643, 1992
11410  //
11411  // specific continuum parameters and units:
11412  // OUTPUT
11413  // xsec : [1/m],
11414  // INPUT
11415  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11416  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11417  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11418  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11419  // f_mono : [Hz]
11420  // p_abs : [Pa]
11421  // t_abs : [K]
11422  // h2o_abs, : [1]
11423  // vmr : [1]
11424  //
11425  const int Nparam = 4;
11426  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11427  {
11428  out3 << "Full model " << name << " is running with \n"
11429  << "user defined parameters according to model " << model << ".\n";
11430  MPM92O2AbsModel( xsec,
11431  parameters[0], // continuum term scale factor
11432  parameters[1], // line strength scale factor
11433  parameters[2], // line broadening scale factor
11434  parameters[3], // line coupling scale factor
11435  model,
11436  f_mono,
11437  p_abs,
11438  t_abs,
11439  h2o_abs,
11440  vmr );
11441  }
11442  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11443  {
11444  ostringstream os;
11445  os << "Full model " << name << " requires " << Nparam << " input\n"
11446  << "parameters for the model " << model << ",\n"
11447  << "but you specified " << parameters.nelem() << " parameters.\n";
11448  throw runtime_error(os.str());
11449  return;
11450  }
11451  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11452  {
11453  out3 << "Full model " << name << " running with \n"
11454  << "the parameters for model " << model << ".\n";
11455  MPM92O2AbsModel( xsec,
11456  0.00,
11457  0.00,
11458  0.00,
11459  0.00,
11460  model,
11461  f_mono,
11462  p_abs,
11463  t_abs,
11464  h2o_abs,
11465  vmr );
11466  }
11467  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11468  {
11469  ostringstream os;
11470  os << "ERROR: Full model " << name << " requires NO input\n"
11471  << "parameters for the model " << model << ",\n"
11472  << "but you specified " << parameters.nelem() << " parameters.\n"
11473  << "This ambiguity can not be solved by arts.\n"
11474  << "Please see the arts user guide chapter 3.\n";
11475  throw runtime_error(os.str());
11476  return;
11477  }
11478  }
11479  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11480  else if ( "O2-MPM89"==name )
11481  {
11482  // H. J. Liebe,
11483  // MPM - an atmospheric millimeter-wave propagation model,
11484  // Int. J. Infrared and Mill. Waves, Vol 10, pp. 631-650, 1989.
11485  //
11486  // specific continuum parameters and units:
11487  // OUTPUT
11488  // xsec : [1/m],
11489  // INPUT
11490  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11491  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11492  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11493  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11494  // f_mono : [Hz]
11495  // p_abs : [Pa]
11496  // t_abs : [K]
11497  // h2o_abs, : [1]
11498  // vmr : [1]
11499  //
11500  const int Nparam = 4;
11501  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11502  {
11503  out3 << "Full model " << name << " is running with \n"
11504  << "user defined parameters according to model " << model << ".\n";
11505  MPM89O2AbsModel( xsec,
11506  parameters[0], // continuum term scale factor
11507  parameters[1], // line strength scale factor
11508  parameters[2], // line broadening scale factor
11509  parameters[3], // line coupling scale factor
11510  model,
11511  f_mono,
11512  p_abs,
11513  t_abs,
11514  h2o_abs,
11515  vmr );
11516  }
11517  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11518  {
11519  ostringstream os;
11520  os << "Full model " << name << " requires " << Nparam << " input\n"
11521  << "parameters for the model " << model << ",\n"
11522  << "but you specified " << parameters.nelem() << " parameters.\n";
11523  throw runtime_error(os.str());
11524  return;
11525  }
11526  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11527  {
11528  out3 << "Full model " << name << " running with \n"
11529  << "the parameters for model " << model << ".\n";
11530  MPM89O2AbsModel( xsec,
11531  0.00,
11532  0.00,
11533  0.00,
11534  0.00,
11535  model,
11536  f_mono,
11537  p_abs,
11538  t_abs,
11539  h2o_abs,
11540  vmr );
11541  }
11542  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11543  {
11544  ostringstream os;
11545  os << "ERROR: Full model " << name << " requires NO input\n"
11546  << "parameters for the model " << model << ",\n"
11547  << "but you specified " << parameters.nelem() << " parameters.\n"
11548  << "This ambiguity can not be solved by arts.\n"
11549  << "Please see the arts user guide chapter 3.\n";
11550  throw runtime_error(os.str());
11551  return;
11552  }
11553  }
11554  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11555  else if ( "O2-MPM87"==name )
11556  {
11557  // H. J. Liebe and D. H. Layton,
11558  // Millimeter-wave properties of the atmosphere:
11559  // Laboratory studies and propagation modelling,
11560  // NITA Report 87-224,
11561  // U.S. Dept. of Commerce, National Telecommunications and Information
11562  // Administration, Institute for Communication Sciences, rep. 87-224,
11563  // 325 Broadway, Boulder, CO 80303-3328
11564  //
11565  // specific continuum parameters and units:
11566  // OUTPUT
11567  // xsec : [1/m],
11568  // INPUT
11569  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11570  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11571  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11572  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11573  // f_mono : [Hz]
11574  // p_abs : [Pa]
11575  // t_abs : [K]
11576  // h2o_abs, : [1]
11577  // vmr : [1]
11578  //
11579  const int Nparam = 4;
11580  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11581  {
11582  out3 << "Full model " << name << " is running with \n"
11583  << "user defined parameters according to model " << model << ".\n";
11584  MPM87O2AbsModel( xsec,
11585  parameters[0], // continuum term scale factor
11586  parameters[1], // line strength scale factor
11587  parameters[2], // line broadening scale factor
11588  parameters[3], // line coupling scale factor
11589  model,
11590  f_mono,
11591  p_abs,
11592  t_abs,
11593  h2o_abs,
11594  vmr );
11595  }
11596  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11597  {
11598  ostringstream os;
11599  os << "Full model " << name << " requires " << Nparam << " input\n"
11600  << "parameters for the model " << model << ",\n"
11601  << "but you specified " << parameters.nelem() << " parameters.\n";
11602  throw runtime_error(os.str());
11603  return;
11604  }
11605  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11606  {
11607  out3 << "Full model " << name << " running with \n"
11608  << "the parameters for model " << model << ".\n";
11609  MPM87O2AbsModel( xsec,
11610  0.00,
11611  0.00,
11612  0.00,
11613  0.00,
11614  model,
11615  f_mono,
11616  p_abs,
11617  t_abs,
11618  h2o_abs,
11619  vmr );
11620  }
11621  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11622  {
11623  ostringstream os;
11624  os << "ERROR: Full model " << name << " requires NO input\n"
11625  << "parameters for the model " << model << ",\n"
11626  << "but you specified " << parameters.nelem() << " parameters.\n"
11627  << "This ambiguity can not be solved by arts.\n"
11628  << "Please see the arts user guide chapter 3.\n";
11629  throw runtime_error(os.str());
11630  return;
11631  }
11632  }
11633  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11634  else if ( "O2-MPM85"==name )
11635  {
11636  // H. J. Liebe and D. H. Layton,
11637  // An updated model for millimeter wave propagation in moist air
11638  // Radio Science, vol. 20, pp. 1069-1089, 1985
11639  //
11640  // specific continuum parameters and units:
11641  // OUTPUT
11642  // xsec : [1/m],
11643  // INPUT
11644  // parameters[0] : continuum term scale factor, default CC = 1.000 [1]
11645  // parameters[1] : line strength scale factor, default CL = 1.000 [1]
11646  // parameters[2] : line broadening scale factor, default CW = 1.000 [1]
11647  // parameters[3] : line coupling scale factor, default CO = 1.000 [1]
11648  // f_mono : [Hz]
11649  // p_abs : [Pa]
11650  // t_abs : [K]
11651  // h2o_abs, : [1]
11652  // vmr : [1]
11653  //
11654  const int Nparam = 4;
11655  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11656  {
11657  out3 << "Full model " << name << " is running with \n"
11658  << "user defined parameters according to model " << model << ".\n";
11659  MPM85O2AbsModel( xsec,
11660  parameters[0], // continuum term scale factor
11661  parameters[1], // line strength scale factor
11662  parameters[2], // line broadening scale factor
11663  parameters[3], // line coupling scale factor
11664  model,
11665  f_mono,
11666  p_abs,
11667  t_abs,
11668  h2o_abs,
11669  vmr );
11670  }
11671  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11672  {
11673  ostringstream os;
11674  os << "Full model " << name << " requires " << Nparam << " input\n"
11675  << "parameters for the model " << model << ",\n"
11676  << "but you specified " << parameters.nelem() << " parameters.\n";
11677  throw runtime_error(os.str());
11678  return;
11679  }
11680  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11681  {
11682  out3 << "Full model " << name << " running with \n"
11683  << "the parameters for model " << model << ".\n";
11684  MPM85O2AbsModel( xsec,
11685  0.00,
11686  0.00,
11687  0.00,
11688  0.00,
11689  model,
11690  f_mono,
11691  p_abs,
11692  t_abs,
11693  h2o_abs,
11694  vmr );
11695  }
11696  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11697  {
11698  ostringstream os;
11699  os << "ERROR: Full model " << name << " requires NO input\n"
11700  << "parameters for the model " << model << ",\n"
11701  << "but you specified " << parameters.nelem() << " parameters.\n"
11702  << "This ambiguity can not be solved by arts.\n"
11703  << "Please see the arts user guide chapter 3.\n";
11704  throw runtime_error(os.str());
11705  return;
11706  }
11707  }
11708  // ============= N2 continuum =========================================================
11709  else if ( "N2-SelfContMPM93"==name )
11710  {
11711  // MPM93 N2 continuum:
11712  // see publication side of National Telecommunications and Information Administration
11713  // http://www.its.bldrdoc.gov/pub/all_pubs/all_pubs.html
11714  // and ftp side for downloading the MPM93 original source code:
11715  // ftp://ftp.its.bldrdoc.gov/pub/mpm93/
11716  //
11717  // specific continuum parameters and units:
11718  // OUTPUT
11719  // xsec : [1/m],
11720  // INPUT
11721  // parameters[0] : strength parameter [1/m * 1/(Hz²*Pa²)]
11722  // parameters[1] : broadening parameter [1]
11723  // parameters[2] : temperature exponent [1]
11724  // parameters[3] : frequency exponent [1]
11725  // f_mono : [Hz]
11726  // p_abs : [Pa]
11727  // t_abs : [K]
11728  // h2o_abs : [1]
11729  // vmr : [1]
11730  //
11731  const int Nparam = 4;
11732  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11733  {
11734  out3 << "Continuum model " << name << " is running with \n"
11735  << "user defined parameters according to model " << model << ".\n";
11736  MPM93_N2_continuum( xsec,
11737  parameters[0],
11738  parameters[1],
11739  parameters[2],
11740  parameters[3],
11741  model,
11742  f_mono,
11743  p_abs,
11744  t_abs,
11745  h2o_abs,
11746  vmr );
11747  }
11748  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11749  {
11750  ostringstream os;
11751  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11752  << "parameters for the model " << model << ",\n"
11753  << "but you specified " << parameters.nelem() << " parameters.\n";
11754  throw runtime_error(os.str());
11755  return;
11756  }
11757  else if ( (model == "MPM93Scale") && (parameters.nelem() == 1) ) // --------------------
11758  {
11759  out3 << "Continuum model " << name << " running with \n"
11760  << "the parameters for model " << model << ".\n";
11761  MPM93_N2_continuum( xsec,
11762  parameters[0],
11763  0.00,
11764  0.00,
11765  0.00,
11766  model,
11767  f_mono,
11768  p_abs,
11769  t_abs,
11770  h2o_abs,
11771  vmr );
11772  }
11773  else if ( (model == "MPM93Scale") && (parameters.nelem() != 1) ) // --------------------
11774  {
11775  ostringstream os;
11776  os << "Continuum model " << name << " requires 1 scaling input\n"
11777  << "parameters for the model " << model << ",\n"
11778  << "but you specified " << parameters.nelem() << " parameters.\n";
11779  throw runtime_error(os.str());
11780  return;
11781  }
11782  else if ( (model != "user") && (model != "MPM93Scale") && (parameters.nelem() == 0) ) // --
11783  {
11784  out3 << "Continuum model " << name << " running with \n"
11785  << "the parameters for model " << model << ".\n";
11786  MPM93_N2_continuum( xsec,
11787  0.00,
11788  0.00,
11789  0.00,
11790  0.00,
11791  model,
11792  f_mono,
11793  p_abs,
11794  t_abs,
11795  h2o_abs,
11796  vmr );
11797  }
11798  /* --------------------------------------------------------------------------
11799  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11800  {
11801  ostringstream os;
11802  os << "ERROR: Continuum model " << name << " requires NO input\n"
11803  << "parameters for the model " << model << ",\n"
11804  << "but you specified " << parameters.nelem() << " parameters.\n"
11805  << "This ambiguity can not be solved by arts.\n"
11806  << "Please see the arts user guide chapter 3.\n";
11807  throw runtime_error(os.str());
11808  return;
11809  }
11810  ----------------------------------------------------------------------*/
11811  }
11812  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11813  else if ( "N2-DryContATM01"==name )
11814  {
11815  // data information about this continuum:
11816  // Pardo et al. model model (IEEE, Trans. Ant. Prop.,
11817  // Vol 49, No 12, pp. 1683-1694, 2001)
11818  //
11819  // specific continuum parameters and units:
11820  // a) output
11821  // xsec : [1/m],
11822  // b) input
11823  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
11824  // f_mono : [Hz]
11825  // p_abs : [Pa]
11826  // t_abs : [K]
11827  // vmr : [1] for N2
11828  // h2ovmr : [1] for H2O
11829  //
11830  const int Nparam = 1;
11831  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11832  {
11833  out3 << "Continuum model " << name << " is running with \n"
11834  << "user defined parameters according to model " << model << ".\n";
11836  parameters[0], // coefficient
11837  model,
11838  f_mono,
11839  p_abs,
11840  t_abs,
11841  vmr,
11842  h2o_abs );
11843  }
11844  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11845  {
11846  ostringstream os;
11847  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11848  << "parameters for the model " << model << ",\n"
11849  << "but you specified " << parameters.nelem() << " parameters.\n";
11850  throw runtime_error(os.str());
11851  return;
11852  }
11853  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11854  {
11855  out3 << "Continuum model " << name << " running with \n"
11856  << "the parameters for model " << model << ".\n";
11858  0.000, // coefficient
11859  model,
11860  f_mono,
11861  p_abs,
11862  t_abs,
11863  vmr,
11864  h2o_abs );
11865  }
11866  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11867  {
11868  ostringstream os;
11869  os << "ERROR: Continuum model " << name << " requires NO input\n"
11870  << "parameters for the model " << model << ",\n"
11871  << "but you specified " << parameters.nelem() << " parameters.\n"
11872  << "This ambiguity can not be solved by arts.\n"
11873  << "Please see the arts user guide chapter 3.\n";
11874  throw runtime_error(os.str());
11875  return;
11876  }
11877  }
11878  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11879  else if ( "N2-SelfContPWR93"==name )
11880  {
11881  // data information about this continuum:
11882  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
11883  // "Atmospheric Remote Sensing by Microwave Radiometry",
11884  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
11885  //
11886  // specific continuum parameters and units:
11887  // a) output
11888  // xsec : [1/m],
11889  // b) input
11890  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
11891  // parameters[1] : continuum temperature exponent [1]
11892  // f_mono : [Hz]
11893  // p_abs : [Pa]
11894  // t_abs : [K]
11895  // vmr : [1]
11896  //
11897  const int Nparam = 2;
11898  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11899  {
11900  out3 << "Continuum model " << name << " is running with \n"
11901  << "user defined parameters according to model " << model << ".\n";
11903  parameters[0], // coefficient
11904  parameters[1], // temp. exponent
11905  model,
11906  f_mono,
11907  p_abs,
11908  t_abs,
11909  vmr );
11910  }
11911  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11912  {
11913  ostringstream os;
11914  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11915  << "parameters for the model " << model << ",\n"
11916  << "but you specified " << parameters.nelem() << " parameters.\n";
11917  throw runtime_error(os.str());
11918  return;
11919  }
11920  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11921  {
11922  out3 << "Continuum model " << name << " running with \n"
11923  << "the parameters for model " << model << ".\n";
11925  0.00,
11926  0.00,
11927  model,
11928  f_mono,
11929  p_abs,
11930  t_abs,
11931  vmr );
11932  }
11933  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
11934  {
11935  ostringstream os;
11936  os << "ERROR: Continuum model " << name << " requires NO input\n"
11937  << "parameters for the model " << model << ",\n"
11938  << "but you specified " << parameters.nelem() << " parameters.\n"
11939  << "This ambiguity can not be solved by arts.\n"
11940  << "Please see the arts user guide chapter 3.\n";
11941  throw runtime_error(os.str());
11942  return;
11943  }
11944  }
11945  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11946  else if ( "N2-SelfContStandardType"==name )
11947  {
11948  // data information about this continuum:
11949  // A completely general expression for the N2 continuum
11950  //
11951  // specific continuum parameters and units:
11952  // OUTPUT
11953  // xsec : [1/m],
11954  // INPUT
11955  // parameters[0] : continuum coefficient (C) [1/m * 1/(Hz*Pa)²]
11956  // parameters[1] : frequency exponent (xf) [1]
11957  // parameters[2] : temperature exponent (xt) [1]
11958  // parameters[3] : pressure exponent (xp) [1]
11959  // f_mono : [Hz]
11960  // p_abs : [Pa]
11961  // t_abs : [K]
11962  // vmr : [1]
11963  const int Nparam = 4;
11964  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
11965  {
11966  out3 << "Continuum model " << name << " is running with \n"
11967  << "user defined parameters according to model " << model << ".\n";
11969  parameters[0],
11970  parameters[1],
11971  parameters[2],
11972  parameters[3],
11973  model,
11974  f_mono,
11975  p_abs,
11976  t_abs,
11977  vmr );
11978  }
11979  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
11980  {
11981  ostringstream os;
11982  os << "Continuum model " << name << " requires " << Nparam << " input\n"
11983  << "parameters for the model " << model << ",\n"
11984  << "but you specified " << parameters.nelem() << " parameters.\n";
11985  throw runtime_error(os.str());
11986  return;
11987  }
11988  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
11989  {
11990  out3 << "Continuum model " << name << " running with \n"
11991  << "the parameters for model " << model << ".\n";
11993  0.000,
11994  0.000,
11995  0.000,
11996  0.000,
11997  model,
11998  f_mono,
11999  p_abs,
12000  t_abs,
12001  vmr );
12002  }
12003  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12004  {
12005  ostringstream os;
12006  os << "ERROR: Continuum model " << name << " requires NO input\n"
12007  << "parameters for the model " << model << ",\n"
12008  << "but you specified " << parameters.nelem() << " parameters.\n"
12009  << "This ambiguity can not be solved by arts.\n"
12010  << "Please see the arts user guide chapter 3.\n";
12011  throw runtime_error(os.str());
12012  return;
12013  }
12014  }
12015  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12016  else if ( "N2-SelfContBorysow"==name )
12017  {
12018  // data information about this continuum:
12019  // A. Borysow and L. Frommhold, The Astrophysical Journal,
12020  // Vol. 311, pp.1043-1057, 1986
12021  const int Nparam = 1;
12022  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12023  {
12024  out3 << "Continuum model " << name << " is running with \n"
12025  << "user defined parameters according to model " << model << ".\n";
12026  BF86_CIA_N2( xsec,
12027  parameters[0], // scaling factor
12028  model,
12029  f_mono,
12030  p_abs,
12031  t_abs,
12032  vmr );
12033  }
12034  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12035  {
12036  ostringstream os;
12037  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12038  << "parameters for the model " << model << ",\n"
12039  << "but you specified " << parameters.nelem() << " parameters.\n";
12040  throw runtime_error(os.str());
12041  return;
12042  }
12043  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12044  {
12045  out3 << "Continuum model " << name << " running with \n"
12046  << "the parameters for model " << model << ".\n";
12047  BF86_CIA_N2( xsec,
12048  0.0,
12049  model,
12050  f_mono,
12051  p_abs,
12052  t_abs,
12053  vmr );
12054  }
12055  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12056  {
12057  ostringstream os;
12058  os << "ERROR: Continuum model " << name << " requires NO input\n"
12059  << "parameters for the model " << model << ",\n"
12060  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12061  << "This ambiguity can not be solved by arts.\n"
12062  << "Please see the arts user guide chapter 3.\n";
12063  throw runtime_error(os.str());
12064  return;
12065  }
12066  }
12067  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12068  else if ( "N2-CIArotCKDMT100"==name )
12069  {
12070  // data information about this continuum:
12071  // A. Borysow and L. Frommhold, The Astrophysical Journal,
12072  // Vol. 311, pp.1043-1057, 1986
12073  const int Nparam = 1;
12074  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12075  {
12076  out3 << "Continuum model " << name << " is running with \n"
12077  << "user defined parameters according to model " << model << ".\n";
12078  CKD_mt_CIArot_n2( xsec,
12079  parameters[0], // scaling factor
12080  model,
12081  f_mono,
12082  p_abs,
12083  t_abs,
12084  vmr );
12085  }
12086  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12087  {
12088  ostringstream os;
12089  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12090  << "parameters for the model " << model << ",\n"
12091  << "but you specified " << parameters.nelem() << " parameters.\n";
12092  throw runtime_error(os.str());
12093  return;
12094  }
12095  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12096  {
12097  out3 << "Continuum model " << name << " running with \n"
12098  << "the parameters for model " << model << ".\n";
12099  CKD_mt_CIArot_n2( xsec,
12100  0.0,
12101  model,
12102  f_mono,
12103  p_abs,
12104  t_abs,
12105  vmr );
12106  }
12107  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12108  {
12109  ostringstream os;
12110  os << "ERROR: Continuum model " << name << " requires NO input\n"
12111  << "parameters for the model " << model << ",\n"
12112  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12113  << "This ambiguity can not be solved by arts.\n"
12114  << "Please see the arts user guide chapter 3.\n";
12115  throw runtime_error(os.str());
12116  return;
12117  }
12118  }
12119  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12120  else if ( "N2-CIAfunCKDMT100"==name )
12121  {
12122  // data information about this continuum:
12123  // Lafferty, W.J., A.M. Solodov,A. Weber, W.B. Olson and J._M. Hartmann,
12124  // Infrared collision-induced absorption by
12125  // N2 near 4.3 microns for atmospheric applications:
12126  // Measurements and emprirical modeling,
12127  // Appl. Optics, 35, 5911-5917, (1996)
12128 
12129  const int Nparam = 1;
12130  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12131  {
12132  out3 << "Continuum model " << name << " is running with \n"
12133  << "user defined parameters according to model " << model << ".\n";
12134  CKD_mt_CIAfun_n2( xsec,
12135  parameters[0], // scaling factor
12136  model,
12137  f_mono,
12138  p_abs,
12139  t_abs,
12140  vmr );
12141  }
12142  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12143  {
12144  ostringstream os;
12145  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12146  << "parameters for the model " << model << ",\n"
12147  << "but you specified " << parameters.nelem() << " parameters.\n";
12148  throw runtime_error(os.str());
12149  return;
12150  }
12151  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12152  {
12153  out3 << "Continuum model " << name << " running with \n"
12154  << "the parameters for model " << model << ".\n";
12155  CKD_mt_CIAfun_n2( xsec,
12156  0.0,
12157  model,
12158  f_mono,
12159  p_abs,
12160  t_abs,
12161  vmr );
12162  }
12163  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12164  {
12165  ostringstream os;
12166  os << "ERROR: Continuum model " << name << " requires NO input\n"
12167  << "parameters for the model " << model << ",\n"
12168  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12169  << "This ambiguity can not be solved by arts.\n"
12170  << "Please see the arts user guide chapter 3.\n";
12171  throw runtime_error(os.str());
12172  return;
12173  }
12174  }
12175  // ============= CO2 continuum ========================================================
12176  else if ( "CO2-CKD241"==name )
12177  {
12178  // data information about this continuum:
12179  // CKDv2.4.1 model at http://www.rtweb.aer.com/continuum_frame.html
12180  // This continuum accounts for the far wings of the many COS lines/bands since
12181  // the line is used with a cutoff in the line shape with +/- 25 cm^-1.
12182  //
12183  // specific continuum parameters and units:
12184  // OUTPUT
12185  // xsec : [1/m],
12186  // INPUT
12187  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12188  // parameters[1] : continuum temperature exponent [1]
12189  // f_mono : [Hz]
12190  // p_abs : [Pa]
12191  // t_abs : [K]
12192  // vmr : [1]
12193  // h2o_abs : [1]
12194  //
12195  const int Nparam = 1;
12196  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12197  {
12198  out3 << "Continuum model " << name << " is running with \n"
12199  << "user defined parameters according to model " << model << ".\n";
12200  CKD_241_co2( xsec,
12201  parameters[0], // abs. scaling
12202  model,
12203  f_mono,
12204  p_abs,
12205  t_abs,
12206  vmr );
12207  }
12208  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12209  {
12210  ostringstream os;
12211  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12212  << "parameters for the model " << model << ",\n"
12213  << "but you specified " << parameters.nelem() << " parameters.\n";
12214  throw runtime_error(os.str());
12215  return;
12216  }
12217  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12218  {
12219  out3 << "Continuum model " << name << " running with \n"
12220  << "the parameters for model " << model << ".\n";
12221  CKD_241_co2( xsec,
12222  0.00,
12223  model,
12224  f_mono,
12225  p_abs,
12226  t_abs,
12227  vmr );
12228  }
12229  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12230  {
12231  ostringstream os;
12232  os << "ERROR: Continuum model " << name << " requires NO input\n"
12233  << "parameters for the model " << model << ",\n"
12234  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12235  << "This ambiguity can not be solved by arts.\n"
12236  << "Please see the arts user guide chapter 3.\n";
12237  throw runtime_error(os.str());
12238  return;
12239  }
12240  }
12241  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12242  else if ( "CO2-CKDMT100"==name )
12243  {
12244  // data information about this continuum:
12245  // CKD model at http://www.rtweb.aer.com/continuum_frame.html
12246  // This continuum accounts for the far wings of the many COS lines/bands since
12247  // the line is used with a cutoff in the line shape with +/- 25 cm^-1.
12248  //
12249  // specific continuum parameters and units:
12250  // OUTPUT
12251  // xsec : [1/m],
12252  // INPUT
12253  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12254  // parameters[1] : continuum temperature exponent [1]
12255  // f_mono : [Hz]
12256  // p_abs : [Pa]
12257  // t_abs : [K]
12258  // vmr : [1]
12259  // h2o_abs : [1]
12260  //
12261  const int Nparam = 1;
12262  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12263  {
12264  out3 << "Continuum model " << name << " is running with \n"
12265  << "user defined parameters according to model " << model << ".\n";
12266  CKD_mt_co2( xsec,
12267  parameters[0], // abs. scaling
12268  model,
12269  f_mono,
12270  p_abs,
12271  t_abs,
12272  vmr );
12273  }
12274  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12275  {
12276  ostringstream os;
12277  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12278  << "parameters for the model " << model << ",\n"
12279  << "but you specified " << parameters.nelem() << " parameters.\n";
12280  throw runtime_error(os.str());
12281  return;
12282  }
12283  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12284  {
12285  out3 << "Continuum model " << name << " running with \n"
12286  << "the parameters for model " << model << ".\n";
12287  CKD_mt_co2( xsec,
12288  0.00,
12289  model,
12290  f_mono,
12291  p_abs,
12292  t_abs,
12293  vmr );
12294  }
12295  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12296  {
12297  ostringstream os;
12298  os << "ERROR: Continuum model " << name << " requires NO input\n"
12299  << "parameters for the model " << model << ",\n"
12300  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12301  << "This ambiguity can not be solved by arts.\n"
12302  << "Please see the arts user guide chapter 3.\n";
12303  throw runtime_error(os.str());
12304  return;
12305  }
12306  }
12307  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12308  else if ( "CO2-SelfContPWR93"==name )
12309  {
12310  // data information about this continuum:
12311  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
12312  // "Atmospheric Remote Sensing by Microwave Radiometry",
12313  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
12314  //
12315  // specific continuum parameters and units:
12316  // OUTPUT
12317  // xsec : [1/m],
12318  // INPUT
12319  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12320  // parameters[1] : continuum temperature exponent [1]
12321  // f_mono : [Hz]
12322  // p_abs : [Pa]
12323  // t_abs : [K]
12324  // vmr : [1]
12325  //
12326  const int Nparam = 2;
12327  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12328  {
12329  out3 << "Continuum model " << name << " is running with \n"
12330  << "user defined parameters according to model " << model << ".\n";
12332  parameters[0], // coefficient
12333  parameters[1], // temp. exponent
12334  model,
12335  f_mono,
12336  p_abs,
12337  t_abs,
12338  vmr );
12339  }
12340  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12341  {
12342  ostringstream os;
12343  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12344  << "parameters for the model " << model << ",\n"
12345  << "but you specified " << parameters.nelem() << " parameters.\n";
12346  throw runtime_error(os.str());
12347  return;
12348  }
12349  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12350  {
12351  out3 << "Continuum model " << name << " running with \n"
12352  << "the parameters for model " << model << ".\n";
12354  0.00,
12355  0.00,
12356  model,
12357  f_mono,
12358  p_abs,
12359  t_abs,
12360  vmr );
12361  }
12362  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12363  {
12364  ostringstream os;
12365  os << "ERROR: Continuum model " << name << " requires NO input\n"
12366  << "parameters for the model " << model << ",\n"
12367  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12368  << "This ambiguity can not be solved by arts.\n"
12369  << "Please see the arts user guide chapter 3.\n";
12370  throw runtime_error(os.str());
12371  return;
12372  }
12373  }
12374  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12375  else if ( "CO2-ForeignContPWR93"==name )
12376  {
12377  // data information about this continuum:
12378  // P. W. Rosenkranz Chapter 2, pp 74, in M. A. Janssen,
12379  // "Atmospheric Remote Sensing by Microwave Radiometry",
12380  // John Wiley & Sons, Inc., 1993, ISBN 0-471-62891-3
12381  //
12382  // specific continuum parameters and units:
12383  // OUTPUT
12384  // xsec : [1/m],
12385  // INPUT
12386  // parameters[0] : continuum strength coefficient [1/m * 1/(Hz*Pa)²]
12387  // parameters[1] : continuum temperature exponent [1]
12388  // f_mono : [Hz]
12389  // p_abs : [Pa]
12390  // t_abs : [K]
12391  // n2_abs : [1]
12392  // vmr : [1]
12393  //
12394  const int Nparam = 2;
12395  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12396  {
12397  out3 << "Continuum model " << name << " is running with \n"
12398  << "user defined parameters according to model " << model << ".\n";
12400  parameters[0],
12401  parameters[1],
12402  model,
12403  f_mono,
12404  p_abs,
12405  t_abs,
12406  n2_abs,
12407  vmr );
12408  }
12409  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12410  {
12411  ostringstream os;
12412  os << "Continuum model " << name << " requires " << Nparam << " input\n"
12413  << "parameters for the model " << model << ",\n"
12414  << "but you specified " << parameters.nelem() << " parameters.\n";
12415  throw runtime_error(os.str());
12416  return;
12417  }
12418  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12419  {
12420  out3 << "Continuum model " << name << " running with \n"
12421  << "the parameters for model " << model << ".\n";
12423  0.00,
12424  0.00,
12425  model,
12426  f_mono,
12427  p_abs,
12428  t_abs,
12429  n2_abs,
12430  vmr );
12431  }
12432  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12433  {
12434  ostringstream os;
12435  os << "ERROR: Continuum model " << name << " requires NO input\n"
12436  << "parameters for the model " << model << ",\n"
12437  << "but you specified " << parameters.nelem() << " parameters. " << "\n"
12438  << "This ambiguity can not be solved by arts.\n"
12439  << "Please see the arts user guide chapter 3.\n";
12440  throw runtime_error(os.str());
12441  return;
12442  }
12443  }
12444  // ============= cloud and fog absorption from MPM93 ==================================
12445  else if ( "liquidcloud-MPM93"==name )
12446  {
12447  // Suspended water droplet absorption parameterization from MPM93 model
12448  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
12449  // "Propagation modeling of moist air and suspended water/ice
12450  // particles at frequencies below 1000 GHz",
12451  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
12452  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
12453  //
12454  // specific continuum parameters and units:
12455  // OUTPUT
12456  // xsec : [1/m],
12457  // INPUT
12458  // parameters[0] : [1]
12459  // parameters[1] : [1]
12460  // parameters[2] : [1]
12461  // model : [1]
12462  // f_mono : [Hz]
12463  // p_abs : [Pa]
12464  // t_abs : [K]
12465  // vmr : [1]
12466  //
12467  // liquid water droplet parameters:
12468  // suspended water droplet density range: 0-10 g/m³
12469  // specific droplet weight value: 1 g/cm³
12470  //
12471  // valid atmospheric condition:
12472  // temperature : 233 to 323 K
12473  // relative humidity: 1 to 100 %
12474  //
12475  const int Nparam = 3;
12476  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12477  {
12478  out3 << "MPM93 liquid water cloud absorption model " << name << " is running with \n"
12479  << "user defined parameters according to model " << model << ".\n";
12480  MPM93WaterDropletAbs(xsec,
12481  parameters[0], // scaling factror
12482  parameters[1], // scaling factror
12483  parameters[2], // scaling factror
12484  model, // model option
12485  f_mono,
12486  p_abs,
12487  t_abs,
12488  vmr );
12489  }
12490  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12491  {
12492  ostringstream os;
12493  os << "MPM93 liquid water cloud absorption model " << name << " requires\n"
12494  << Nparam << " input parameter for the model " << model << ",\n"
12495  << "but you specified " << parameters.nelem() << " parameters.\n";
12496  throw runtime_error(os.str());
12497  return;
12498  }
12499  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12500  {
12501  out3 << "MPM93 liquid water cloud absorption model " << name << " running with \n"
12502  << "the parameter for model " << model << ".\n";
12503  MPM93WaterDropletAbs(xsec,
12504  0.000, // scaling factror
12505  0.000, // scaling factror
12506  0.000, // scaling factror
12507  model, // model option
12508  f_mono,
12509  p_abs,
12510  t_abs,
12511  vmr );
12512  }
12513  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12514  {
12515  ostringstream os;
12516  os << "ERROR: MPM93 liquid water cloud absorption model " << name << " requires NO input\n"
12517  << "parameters for the model " << model << ",\n"
12518  << "but you specified " << parameters.nelem() << " parameters.\n"
12519  << "This ambiguity can not be solved by arts.\n"
12520  << "Please see the arts user guide chapter 4.\n";
12521  throw runtime_error(os.str());
12522  return;
12523  }
12524  }
12525  // ============= ice particle absorption from MPM93 ===================================
12526  else if ( "icecloud-MPM93"==name )
12527  {
12528  // Ice particle absorption parameterization from MPM93 model
12529  // H. J. Liebe and G. A. Hufford and M. G. Cotton,
12530  // "Propagation modeling of moist air and suspended water/ice
12531  // particles at frequencies below 1000 GHz",
12532  // AGARD 52nd Specialists Meeting of the Electromagnetic Wave
12533  // Propagation Panel, Palma de Mallorca, Spain, 1993, May 17-21
12534  //
12535  // specific continuum parameters and units:
12536  // OUTPUT
12537  // xsec : [1/m],
12538  // INPUT
12539  // parameters[0] : [1]
12540  // parameters[1] : [1]
12541  // parameters[2] : [1]
12542  // model : [1]
12543  // f_mono : [Hz]
12544  // p_abs : [Pa]
12545  // t_abs : [K]
12546  // vmr : [1]
12547  //
12548  // ice crystal parameters:
12549  // suspended water droplet density range: 0-10 g/m³
12550  // specific droplet weight value: 1 g/cm³
12551  //
12552  // valid atmospheric condition:
12553  // temperature : 233 to 323 K
12554  // relative humidity: 1 to 100 %
12555  //
12556  const int Nparam = 3;
12557  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12558  {
12559  out3 << "MPM93 ice water cloud absorption model " << name << " is running with \n"
12560  << "user defined parameters according to model " << model << ".\n";
12561  MPM93IceCrystalAbs(xsec,
12562  parameters[0], // scaling factror
12563  parameters[1], // scaling factror
12564  parameters[2], // scaling factror
12565  model, // model option
12566  f_mono,
12567  p_abs,
12568  t_abs,
12569  vmr );
12570  }
12571  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12572  {
12573  ostringstream os;
12574  os << "MPM93 ice water cloud absorption model " << name << " requires \n"
12575  << Nparam << " input parameter for the model " << model << ",\n"
12576  << "but you specified " << parameters.nelem() << " parameters.\n";
12577  throw runtime_error(os.str());
12578  return;
12579  }
12580  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12581  {
12582  out3 << "MPM93 ice water cloud absorption model " << name << " running with \n"
12583  << "the parameter for model " << model << ".\n";
12584  MPM93IceCrystalAbs(xsec,
12585  0.000, // scaling factror
12586  0.000, // scaling factror
12587  0.000, // scaling factror
12588  model, // model option
12589  f_mono,
12590  p_abs,
12591  t_abs,
12592  vmr );
12593  }
12594  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12595  {
12596  ostringstream os;
12597  os << "ERROR: MPM93 ice water cloud absorption model " << name << " requires NO input\n"
12598  << "parameters for the model " << model << ",\n"
12599  << "but you specified " << parameters.nelem() << " parameters.\n"
12600  << "This ambiguity can not be solved by arts.\n"
12601  << "Please see the arts user guide chapter 4.\n";
12602  throw runtime_error(os.str());
12603  return;
12604  }
12605  }
12606  // ============= rain extinction from MPM93 ===========================================
12607  else if ( "rain-MPM93"==name )
12608  {
12609  // Rain extinction parameterization from MPM93 model, described in
12610  // H. J. Liebe,
12611  // "MPM - An Atmospheric Millimeter-Wave Propagation Model",
12612  // Int. J. Infrared and Millimeter Waves, vol. 10(6),
12613  // pp. 631-650, 1989
12614  // and based on
12615  // Olsen, R.L., D.V. Rogers, and D. B. Hodge, "The aR^b relation in the
12616  // calculation of rain attenuation", IEEE Trans. Antennas Propagat.,
12617  // vol. AP-26, pp. 318-329, 1978.
12618  //
12619  // specific continuum parameters and units:
12620  // OUTPUT
12621  // xsec : [1/m],
12622  // INPUT
12623  // parameters[0] : [1]
12624  // parameters[1] : [1]
12625  // parameters[2] : [1]
12626  // model : [1]
12627  // f_mono : [Hz]
12628  // p_abs : [Pa]
12629  // t_abs : [K]
12630  // vmr : [mm/h]
12631  //
12632  // rain parameters:
12633  // rain rate range: 0-150 mm/h
12634  //
12635  // valid atmospheric condition:
12636  // temperature : (preferably above 273 K...)
12637  //
12638  const int Nparam = 3;
12639  if ( (model == "user") && (parameters.nelem() == Nparam) ) // -------------------------
12640  {
12641  out3 << "MPM93 rain extinction model " << name << " is running with \n"
12642  << "user defined parameters according to model " << model << ".\n";
12643  MPM93RainExt(xsec,
12644  parameters[0], // scaling factror
12645  parameters[1], // scaling factror
12646  parameters[2], // scaling factror
12647  model, // model option
12648  f_mono,
12649  p_abs,
12650  t_abs,
12651  vmr );
12652  }
12653  else if ( (model == "user") && (parameters.nelem() != Nparam) ) // --------------------
12654  {
12655  ostringstream os;
12656  os << "MPM93 rain extinction model " << name << " requires \n"
12657  << Nparam << " input parameter for the model " << model << ",\n"
12658  << "but you specified " << parameters.nelem() << " parameters.\n";
12659  throw runtime_error(os.str());
12660  return;
12661  }
12662  else if ( (model != "user") && (parameters.nelem() == 0) ) // --------------------
12663  {
12664  out3 << "MPM93 rain extinction model " << name << " running with \n"
12665  << "the parameter for model " << model << ".\n";
12666  MPM93RainExt(xsec,
12667  0.000, // scaling factror
12668  0.000, // scaling factror
12669  0.000, // scaling factror
12670  model, // model option
12671  f_mono,
12672  p_abs,
12673  t_abs,
12674  vmr );
12675  }
12676  else if ( (model != "user") && (parameters.nelem() != 0) ) // --------------------
12677  {
12678  ostringstream os;
12679  os << "ERROR: MPM93 rain extinction model " << name << " requires NO input\n"
12680  << "parameters for the model " << model << ",\n"
12681  << "but you specified " << parameters.nelem() << " parameters.\n"
12682  << "This ambiguity can not be solved by arts.\n"
12683  << "Please see the arts user guide chapter 4.\n";
12684  throw runtime_error(os.str());
12685  return;
12686  }
12687  }
12688  else // -----------------------------------------------------------------------
12689  {
12690  // none of the continuum or full model tags were selected -> error message.
12691  ostringstream os;
12692  os << "ERROR: Continuum/ full model tag `" << name << "' not yet implemented in arts!";
12693  throw runtime_error(os.str());
12694  return;
12695  }
12696  return;
12697 }
12698 //
12699 // #################################################################################
12700 //
12725 {
12726  // The species lookup data:
12727  extern const Array<SpeciesRecord> species_data;
12728 
12729  // For the list of valid continuum models:
12730  ArrayOfString valid_models;
12731 
12732  bool found = false;
12733 
12734  // Loop all species:
12736  i<species_data.end();
12737  ++i )
12738  {
12739  String specnam = i->Name();
12740 
12741  // Loop all isotopes:
12742  for ( Array<IsotopeRecord>::const_iterator j=i->Isotope().begin();
12743  j<i->Isotope().end();
12744  ++j )
12745  {
12746  String isonam = j->Name();
12747 
12748  // The specified name consists of a species part and an
12749  // isotope part, e.g., H2O-ContStandardSelf. We need to
12750  // construct a similar String from the species lookup data
12751  // by concatenating species name and isotope name.
12752 
12753  String fullnam = specnam + "-" + isonam;
12754  // cout << fullnam << "\n";
12755 
12756  // See if this is a continuum tag, so that we can add it to
12757  // the list:
12758  if ( 0 > j->Abundance() )
12759  {
12760  valid_models.push_back(fullnam);
12761  }
12762 
12763  if ( name == fullnam )
12764  {
12765  found = true;
12766  }
12767  }
12768  }
12769 
12770  // ----------------------------------------------------------------------
12771  // Have we found it?
12772  if (!found)
12773  {
12774  ostringstream os;
12775  os << "The String `" << name << "' matches none of the known\n"
12776  << "continuum models. Known continuum models are:";
12777  for ( ArrayOfString::const_iterator i=valid_models.begin();
12778  i<valid_models.end();
12779  ++i )
12780  {
12781  os << "\n" << *i;
12782  }
12783  throw runtime_error(os.str());
12784  }
12785 }
12786 //
12787 //
12788 // #################################################################################
12789 // ############################# f2c code implementation ###########################
12790 // #################################################################################
12791 //
12792 //
12793 // ------------------- begin of f2c.h file --------------------------------
12794 //
12795 /* f2c.h -- Standard Fortran to C header file */
12796 #ifndef F2C_INCLUDE
12797 #define F2C_INCLUDE
12798 
12799 typedef long int integer;
12800 typedef unsigned long int uinteger;
12801 typedef char *address;
12802 typedef short int shortint;
12803 typedef float real;
12804 typedef double doublereal;
12805 typedef struct { real r, i; } complex;
12806 typedef struct { doublereal r, i; } doublecomplex;
12807 typedef long int logical;
12808 typedef short int shortlogical;
12809 typedef char logical1;
12810 typedef char integer1;
12811 #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
12812 typedef long long longint; /* system-dependent */
12813 typedef unsigned long long ulongint; /* system-dependent */
12814 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
12815 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
12816 #endif
12817 
12818 #define TRUE_ (1)
12819 #define FALSE_ (0)
12820 
12821 /* Extern is for use with -E */
12822 #ifndef Extern
12823 #define Extern extern
12824 #endif
12825 
12826 /* I/O stuff */
12827 
12828 #ifdef f2c_i2
12829 /* for -i2 */
12830 typedef short flag;
12831 typedef short ftnlen;
12832 typedef short ftnint;
12833 #else
12834 typedef long int flag;
12835 typedef long int ftnlen;
12836 typedef long int ftnint;
12837 #endif
12838 
12839 /*external read, write*/
12840 typedef struct
12844  char *cifmt;
12846 } cilist;
12847 
12848 /*internal read, write*/
12849 typedef struct
12851  char *iciunit;
12853  char *icifmt;
12856 } icilist;
12857 
12858 /*open*/
12859 typedef struct
12862  char *ofnm;
12864  char *osta;
12865  char *oacc;
12866  char *ofm;
12868  char *oblnk;
12869 } olist;
12870 
12871 /*close*/
12872 typedef struct
12875  char *csta;
12876 } cllist;
12877 
12878 /*rewind, backspace, endfile*/
12879 typedef struct
12882 } alist;
12883 
12884 /* inquire */
12885 typedef struct
12888  char *infile;
12890  ftnint *inex; /*parameters in standard's order*/
12894  char *inname;
12896  char *inacc;
12898  char *inseq;
12900  char *indir;
12902  char *infmt;
12904  char *inform;
12906  char *inunf;
12910  char *inblank;
12912 } inlist;
12913 
12914 #define VOID void
12915 
12916 union Multitype { /* for multiple entry points */
12920  /* longint j; */
12925  };
12926 
12927 typedef union Multitype Multitype;
12928 
12929 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
12930 
12931 struct Vardesc { /* for Namelist */
12932  char *name;
12933  char *addr;
12935  int type;
12936  };
12937 typedef struct Vardesc Vardesc;
12938 
12939 struct Namelist {
12940  char *name;
12942  int nvars;
12943  };
12944 typedef struct Namelist Namelist;
12945 
12946 #define abs(x) ((x) >= 0 ? (x) : -(x))
12947 #define dabs(x) (doublereal)abs(x)
12948 #define min(a,b) ((a) <= (b) ? (a) : (b))
12949 #define max(a,b) ((a) >= (b) ? (a) : (b))
12950 #define dmin(a,b) (doublereal)min(a,b)
12951 #define dmax(a,b) (doublereal)max(a,b)
12952 #define bit_test(a,b) ((a) >> (b) & 1)
12953 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
12954 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
12955 
12956 /* procedure parameter types for -A and -C++ */
12957 
12958 #define F2C_proc_par_types 1
12959 #ifdef __cplusplus
12960 typedef int /* Unknown procedure type */ (*U_fp)(...);
12961 typedef shortint (*J_fp)(...);
12962 typedef integer (*I_fp)(...);
12963 typedef real (*R_fp)(...);
12964 typedef doublereal (*D_fp)(...), (*E_fp)(...);
12965 typedef /* Complex */ VOID (*C_fp)(...);
12966 typedef /* Double Complex */ VOID (*Z_fp)(...);
12967 typedef logical (*L_fp)(...);
12968 typedef shortlogical (*K_fp)(...);
12969 typedef /* Character */ VOID (*H_fp)(...);
12970 typedef /* Subroutine */ int (*S_fp)(...);
12971 #else
12972 typedef int /* Unknown procedure type */ (*U_fp)();
12973 typedef shortint (*J_fp)();
12974 typedef integer (*I_fp)();
12975 typedef real (*R_fp)();
12976 typedef doublereal (*D_fp)(), (*E_fp)();
12977 typedef /* Complex */ VOID (*C_fp)();
12978 typedef /* Double Complex */ VOID (*Z_fp)();
12979 typedef logical (*L_fp)();
12980 typedef shortlogical (*K_fp)();
12981 typedef /* Character */ VOID (*H_fp)();
12982 typedef /* Subroutine */ int (*S_fp)();
12983 #endif
12984 /* E_fp is for real functions when -R is not specified */
12985 typedef VOID C_f; /* complex function */
12986 typedef VOID H_f; /* character function */
12987 typedef VOID Z_f; /* double complex function */
12988 typedef doublereal E_f; /* real function with -R not specified */
12989 
12990 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
12991 
12992 #ifndef Skip_f2c_Undefs
12993 #undef cray
12994 #undef gcos
12995 #undef mc68010
12996 #undef mc68020
12997 #undef mips
12998 #undef pdp11
12999 #undef sgi
13000 #undef sparc
13001 #undef sun
13002 #undef sun2
13003 #undef sun3
13004 #undef sun4
13005 #undef u370
13006 #undef u3b
13007 #undef u3b2
13008 #undef u3b5
13009 #undef unix
13010 #undef vax
13011 #endif
13012 #endif
13013 
13014 // ------------------- end of f2c.h file --------------------------------
13015 
13016 
13017 // ------------------ begin of Borysow N2N2 F77 code --------------------
13018 
13019 
13020 /* n2n2tks.f -- translated by f2c (version 20010821).
13021  You must link the resulting object file with the libraries:
13022  -lf2c -lm (in that order)
13023 */
13024 
13025 /* Common Block Declarations */
13026 
13027 struct s_blockin_ {
13028  double temp, fnumin, fnumax, dnu;
13030 
13031 #define blockin_1 blockin_
13032 
13033 struct s_app3a_ {
13034  double slit, dx, wnrmax3;
13036 
13037 #define app3a_1 app3a_
13038 
13039 struct s_app3b_ {
13040  int nsri, ns, nsriup;
13042 
13043 #define app3b_1 app3b_
13044 
13045 struct s_rsilo_ {
13046  double rsilo[201];
13048 
13049 #define rsilo_1 rsilo_
13050 
13051 struct s_bou43_ {
13052  int initb;
13054 
13055 #define bou43_1 bou43_
13056 
13057 union u_bba_ {
13058  struct s_m_1 {
13059  double omeg[201], rsi[201], rsigg[201], alfa;
13060  } m_1;
13061  struct s_m_2 {
13062  double omeg[201], rsi[201], rsigg[201], beta;
13063  } m_2;
13065 
13066 #define bba_1 (bba_.m_1)
13067 #define bba_2 (bba_.m_2)
13068 
13069 struct s_bbc_ {
13070  int nsol;
13072 
13073 #define bbc_1 bbc_
13074 
13075 struct s_bf_ {
13076  double g0bf, delbf, om0;
13078 
13079 #define bf_1 bf_
13080 
13081 struct like_1_ {
13082  int like;
13083  char lgas[5];
13084 };
13085 
13086 #define like_1 (*(struct like_1_ *) &like_)
13087 
13088 struct s_k1k0_ {
13089  int ik1k0;
13091 
13092 #define k1k0_1 k1k0_
13093 
13094 struct s_bbb_ {
13095  int ibound;
13097 
13098 #define bbb_1 bbb_
13099 
13100 struct energ_1_ {
13101  double eb[246] /* was [41][6] */;
13102  int niv[6];
13103 };
13104 
13105 #define energ_1 (*(struct energ_1_ *) &energ_)
13106 
13107 struct s_dimer_ {
13108  int nlines;
13110 
13111 #define dimer_1 dimer_
13112 
13113 struct n2part_1_ {
13114  double q1, wn2[2], b01, d01;
13115  int jrange2;
13116 };
13117 struct n2part_2_ {
13118  double q, wn2[2], b0, d0;
13119  int jrange1;
13120 };
13121 
13122 #define n2part_1 (*(struct n2part_1_ *) &n2part_)
13123 #define n2part_2 (*(struct n2part_2_ *) &n2part_)
13124 
13125 union u_bl3_ {
13126  struct s_m_1 {
13127  double rsi[401];
13128  } m_1;
13129  struct s_m_2 {
13130  double rsibb[401];
13131  } m_2;
13133 
13134 #define bl3_1 (bl3_.m_1)
13135 #define bl3_2 (bl3_.m_2)
13136 
13137 union u_bbbb_ {
13138  struct s_m_1 {
13139  int idelv, iv, ivp, idell, il, ilp;
13140  } m_1;
13141  struct s_m_2 {
13143  } m_2;
13145 
13146 #define bbbb_1 (bbbb_.m_1)
13147 #define bbbb_2 (bbbb_.m_2)
13148 
13149 /* Initialized data */
13150 
13151 struct s_energe_ {
13152  double e_1[246];
13153  int e_2[6];
13154  } energ_ = { {-54.99996, -54.86228, -54.58697, -54.17413, -53.62391,
13155  -52.93648, -52.11211, -51.15108, -50.05374, -48.82049, -47.45179,
13156  -45.94815, -44.31014, -42.53841, -40.63365, -38.59665, -36.42824,
13157  -34.12937, -31.70105, -29.14439, -26.46061, -23.65103, -20.71709,
13158  -17.66041, -14.48271, -11.18593, -7.77221, -4.24393, -.60374,
13159  3.14531, 6.99978, 10.95566, 15.00818, 19.15136, 23.37787,
13160  27.67681, 32.03237, 36.42278, 40.83668, 45.29436, 49.79246,
13161  -31.89437, -31.77215, -31.52779, -31.16143, -30.67334, -30.06382,
13162  -29.33328, -28.48222, -27.51123, -26.42099, -25.21229, -23.88603,
13163  -22.44322, -20.88502, -19.21272, -17.42777, -15.53182, -13.52669,
13164  -11.41446, -9.1975, -6.87848, -4.46049, -1.94714, .65736, 3.34788,
13165  6.11816, 8.95978, 11.8613, 14.80383, 17.75924, 20.71774,
13166  23.71589, 0., 0., 0., 0., 0., 0., 0., 0., 0., -16.05019, -15.9464,
13167  -15.73896, -15.42815, -15.0144, -14.4983, -13.88057, -13.16213,
13168  -12.34407, -11.42771, -10.41455, -9.30639, -8.10531, -6.81376,
13169  -5.43459, -3.97121, -2.42768, -.80899, .87859, 2.62689, 4.42334,
13170  6.24733, 8.06983, 9.90464, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13171  0., 0., 0., 0., 0., 0., 0., -6.49343, -6.41131, -6.24732,
13172  -6.00202, -5.67623, -5.27111, -4.78813, -4.22919, -3.59665,
13173  -2.89345, -2.12325, -1.29074, -.40202, .5345, 1.50455, 2.48212,
13174  3.46665, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13175  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., -1.76583, -1.70887,
13176  -1.59552, -1.427, -1.20523, -.93302, -.61434, -.25504, .13641, 0.,
13177  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13178  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13179  -.17133, -.14341, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13180  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
13181  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, {41, 32, 24, 17, 9, 2} }
13182  ;
13183 
13184 struct s_n2part_ {
13185  double fill_1[1];
13186  double e_2[4];
13187  int fill_3[1];
13188  } n2part_ = { {0}, {2., 1., 1.98957, 5.8e-6}, {0} };
13189 
13190 struct s_like_ {
13191  int fill_1[1];
13192  char e_2[5];
13193  } like_ = { {0}, "N2N2" };
13194 
13195 
13196 /* Table of constant values */
13197 
13198 // FIXME static integer c__9 = 9;
13199 // FIXME static integer c__1 = 1;
13200 // FIXME static integer c__5 = 5;
13201 static int cs__1 = 1;
13202 static int cs__0 = 0;
13203 static double c_b24 = 2.9723;
13204 static double c_b25 = -.99569;
13205 static double c_b26 = .09464;
13206 static double c_b27 = 1.2962e-12;
13207 static double c_b28 = -.13048;
13208 static double c_b29 = -.03128;
13209 static double c_b30 = 3.7969e-14;
13210 static double c_b31 = 1.03681;
13211 static double c_b32 = -.14336;
13212 static int cs__2 = 2;
13213 static int cs__3 = 3;
13214 static double c_b43 = .180926;
13215 static double c_b44 = -1.69153;
13216 static double c_b45 = .18605;
13217 static double c_b46 = .3;
13218 static double c_b47 = 0.;
13219 static double c_b49 = 6.6017e-16;
13220 static double c_b50 = 2.59982;
13221 static double c_b51 = -.31831;
13222 static double c_b52 = 1.2481e-12;
13223 static double c_b53 = -.57028;
13224 static double c_b54 = .05983;
13225 static double c_b55 = 5.2681e-13;
13226 static double c_b56 = -.24719;
13227 static double c_b57 = .00519;
13228 static double c_b58 = 2.7518e15;
13229 static double c_b59 = -25.38969;
13230 static double c_b60 = 2.46542;
13231 static int cs__4 = 4;
13232 static int cs__5 = 5;
13233 // FIXME static integer c__2 = 2;
13234 static double c_b78 = .0825299;
13235 static double c_b79 = -1.25562;
13236 static double c_b80 = .12981;
13237 static double c_b84 = 3.6611e-15;
13238 static double c_b85 = 1.47688;
13239 static double c_b86 = -.16537;
13240 static double c_b87 = 6.1264e-10;
13241 static double c_b88 = -2.25011;
13242 static double c_b89 = .15289;
13243 static double c_b90 = 7.982e-10;
13244 static double c_b91 = -2.76152;
13245 static double c_b92 = .21847;
13246 static double c_b93 = 5.2868e-22;
13247 static double c_b94 = 7.66253;
13248 static double c_b95 = -.77527;
13249 static double c_b112 = 119.261;
13250 static double c_b113 = -3.78587;
13251 static double c_b114 = .34024;
13252 static double c_b115 = 9.3777e-12;
13253 static double c_b116 = -.66548;
13254 static double c_b117 = .0033;
13255 static double c_b118 = 3.0395e-13;
13256 static double c_b119 = .24728;
13257 static double c_b120 = -.06607;
13258 static double c_b183 = 1e-6;
13259 static double c_b186 = 1.5;
13260 
13261 #define temp (blockin_1.temp)
13262 #define fnumin (blockin_1.fnumin)
13263 #define fnumax (blockin_1.fnumax)
13264 #define dnu (blockin_1.dnu)
13265 #define slit (app3a_1.slit)
13266 #define dx (app3a_1.dx)
13267 #define rsilo (rsilo_1.rsilo)
13268 #define omeg (bba_1.omeg)
13269 #define rsi (bba_1.rsi)
13270 #define rsigg (bba_1.rsigg)
13271 #define nsol (bbc_1.nsol)
13272 #define like (like_1.like)
13273 #define ik1k0 (k1k0_1.ik1k0)
13274 #define ibound (bbb_1.ibound)
13275 
13276 /* TKS ****** SUBROUTINE N2N2TKS(T, F) ***************************************/
13277 Numeric n2n2tks_(double t, double f)
13278 {
13279  /* System generated locals */
13280  int s__1;
13281  double ret_val;
13282 
13283  /* Local variables */
13284  double hexa[10], quad[10], freq[10], e;
13285  int i__;
13286  double s, x, t1, t2, t3, t4;
13287  int ij, nf, jj;
13288  double rslow1, si;
13289  int nr;
13290  double ss[1], tt[2];
13291  extern /* Subroutine */ int bound32_(double *, double *, int
13292  *), bound54_(double *, double *, int *);
13293  double tksabs[5];
13294  extern /* Subroutine */ int spline_(int *, int *, int *,
13295  double *, double *, double *, double *,
13296  double *, double *, int *, double *);
13297  double dtrans[10], abscoef[10];
13298  extern /* Subroutine */ int addspec_(double *, double *,
13299  double *, double *, double *, double *,
13300  double *, int *, double *, double *, int *,
13301  int *, int *, int *, int *, int *);
13302  double eps, alfatot[10];
13303  extern /* Subroutine */ int partsum_(double *);
13304 
13305 /* ========================================= */
13306 /* Copyright (C) Aleksandra Borysow, 1987) */
13307 /* ==================================================================== */
13308 /* PROGRAM PREPARED BY ALEKSANDRA BORYSOW (APRIL'1987) */
13309 /* (UNIVERSITY OF TEXAS AT AUSTIN, PHYSICS DEPARTMENT) */
13310 /* ORIGINAL VERSION: WRITTEN ON CYBER */
13311 
13312 /* PROGRAM GENERATES N2-N2 COLLISION-INDUCED SPECTRA AT */
13313 /* TEMPERATURES BETWEEN 50 TO 300 K. */
13314 /* CIA SPECTRA MODELED AFTER PAPER (*) */
13315 /* ALEKSANDRA BORYSOW AND LOTHAR FROMMHOLD, */
13316 /* ASTROPHYSICAL JOURNAL, VOL. 311, PAGES 1043-1057, (1986) */
13317 
13318 /* REVISED BY GLENN ORTON (1989) - TO WORK ON SUN WORKSTATIONS */
13319 /* AND ON THE VAX MACHINES (FORTRAN-77) */
13320 /* PASSES STANDARD TEST ON SUN, AT 200K (JULY 1992) */
13321 /* ==================================================================== */
13322 
13323 /* ALSO IN REVISION: DOUBLE PRECISION FOR ALL F.P. VARIABLES */
13324 
13325 /* ==================================================================== */
13326 
13327 /* HISTORY: */
13328 
13329 /* 2001-02-28 THOMAS KUHN: */
13330 /* CHANGE OF LINES */
13331 /* RSILO(I)=DLOG(RSI(I)*1.E80) */
13332 /* TO */
13333 /* RSILO(I)=(DLOG(RSI(I))+80.0D0*DLOG(10.0D0)) */
13334 /* BECAUSE OF OVERFLOW PROBLEMS. */
13335 /* COSMETICS FOR THE CODE TO BE FASTER READABLE. */
13336 /* CHANGE OF OUTPUT FILE NAME. */
13337 /* CHANGE OF OUTPUT FILE CONTENT */
13338 
13339 /* ==================================================================== */
13340 
13341 /* TKS* IMPLICIT REAL*8 (A-H,O-Z) */
13342 
13343 /* TKS INPUT/OUTPUT VARIABLES */
13344 /* REAL T, F */
13345 
13346  ret_val = 0.;
13347 
13348 /* TEMP = TEMPERATURE IN KELVIN, SHOULD BE BETWEEN 50. AND 300. */
13349 /* FNUMIN = LOWEST FREQUENCY IN CM-1, FOR LISTING OF ALPHA(FNU) */
13350 /* FNUMAX = HIGHEST FREQUENCY IN CM-1, FOR LISTING OF ALPHA(FNU) */
13351 /* LINE SHAPE MODELLING WILL BE MOST ACCURATE WITHIN RANGE OF */
13352 /* R-T SPECTRAL INTENSITIES AS 1:100. */
13353 /* DNU = FREQUENCY INCREMENT IN CM-1. DNU SHOULD BE CHOSEN SO */
13354 /* THAT NOT MORE THAN 10 STEPS ARE NEEDED TO GO FROM */
13355 /* FNUMIN TO FNUMAX (ELSE ARRAY DIMENSIONS OF FREQ,ABSCOEF */
13356 /* MUST BE ADJUSTED IN ADDEM). */
13357 
13358 
13359 /* USER: */
13360 /* ----- */
13361 /* EDIT ONLY HERE: TEMP (K), MIN. FREQ. (CM^-1)= FNUMIN, */
13362 /* MAX. FREQ. = FNUMAX, STEP = DNU, SLITWIDTH (CM^-1)=SLIT */
13363 /* (SLIT=4.3 IS EQUIVALENT TO THAT OF VOYAGER SPECTRA, ONLY BOUND BOUND */
13364 /* SPECTRA ARE CONVOLUTED WITH THIS SLITWIDTH, THE FREE FREE SPECTRA */
13365 /* ARE FAR TOO BROAD FOR THE SLITWIDTH FUNCTION TO MATTER, */
13366 /* LEAVE LIKE = 1 (FOR LIKE PAIRS, AS N2-N2) */
13367 /* THE PROGRAM WILL ASSUME EQUILIBRIUM N2, */
13368 /* ALLOWED TEMPERATURE RANGE: 50-300K (DO NOT EXTEND IT BEYOND THESE LIMITS!) */
13369 /* IF QUESTIONS: CONTACT ABORYSOW@NBI.DK */
13370 /* TKS* NF=INT((FNUMAX-FNUMIN)/DNU+0.5)+1 */
13371 /* TKS* IF (NF.GT.10) NF=10 */
13372 /* TKS* FNUMAX=FNUMIN+FLOAT(NF-1)*DNU */
13373 
13374 /* TKS INPUT TEMPERATURE (K) CHECK OF RANGE */
13375  if (t < 50. || t > 300.) {
13376  ostringstream os;
13377  os << "out of T range ( 50<T<300)! return without calc.!" <<"\n";
13378  throw runtime_error(os.str());
13379  goto L999;
13380  }
13381  temp = t;
13382 
13383 /* *********************** INPUT DATA FROM USER *********************** */
13384 /* FNUMIN = MINIMUM FREQENCY [CM^-1] */
13385  fnumin = f / 29979245800.;
13386 /* FNUMAX = MAXIMUM FREQENCY [CM^-1] */
13387  fnumax = fnumin;
13388 /* ONLY ONE FREQUENCY PER CALL */
13389  nf = 1;
13390 /* DEFAULT VALUE OF FREQUENCY STEP [CM^-1] */
13391  dnu = 10.;
13392 /* DEFAULT VALUE */
13393  like = 1;
13394 /* SLIT = SLITWIDTH [CM^-1] */
13395 /* SLIT=4.3 IS EQUIVALENT TO THAT OF VOYAGER SPECTRA, ONLY BOUND BOUND */
13396 /* SPECTRA ARE CONVOLUTED WITH THIS SLITWIDTH, THE FREE FREE SPECTRA */
13397 /* ARE FAR TOO BROAD FOR THE SLITWIDTH FUNCTION TO MATTER. */
13398  slit = 4.3;
13399 /* ******************************************************************** */
13400 
13401 /* TKS* WRITE (6,14) LGAS,TEMP,FNUMIN,FNUMAX,DNU,NF-1 */
13402 /* TKS*14 FORMAT(' ABSORPTION SPECTRA OF ',A5,' AT',F8.1,' K'/ */
13403 /* TKS* $ 1X,43(1H=),/ */
13404 /* TKS* 1' MIN.FREQ.=',F8.1,' CM-1',10X,'MAX.FREQ.=',F8.1,' CM-1',10X, */
13405 /* TKS* 2'FREQ.INCREMENT=',F8.2,' CM-1',5X,'IN',I5,' STEPS'//) */
13406 
13407 
13408  partsum_(&temp);
13409 
13410 
13411 /* THE N2-N2 SPECTRA FOR 50-300K */
13412 /* ================================ */
13413 
13414  x = log(temp);
13415  s__1 = nf;
13416  for (i__ = 1; i__ <= s__1; ++i__) {
13417 /* FREQ(I)=FNUMIN+FLOAT(I-1)*DNU */
13418  freq[i__ - 1] = fnumin;
13419  alfatot[i__ - 1] = 0.;
13420 /* L10: */
13421  abscoef[i__ - 1] = 0.;
13422  }
13423 
13424 
13425 /* ==================================================================== */
13426 
13427 
13428  jj = 1;
13429 L442:
13430 /* L1023: */
13431  ++jj;
13432  if (jj == 42) {
13433  goto L444;
13434  }
13435  goto L442;
13436 /* EB(JJ,IV) JJ-ROTATIONAL LEVEL "L", IV- VIBRATIONAL LEVEL "V"; */
13437 L444:
13438 
13439 
13440 
13441 /* ==================================================================== */
13442 
13443 /* QUADRUPOLAR INDUCTION: (50-300K) LAMBDA1,LAMBDA2,LAMBDA,L=2023&0223 */
13444 /* ------------------------------------------------------------------- */
13445 
13446  eps = 1e-5;
13447  tt[0] = 10.;
13448  bound32_(&temp, rsi, &nsol);
13449  ij = 0;
13450  rslow1 = 0.;
13451  s__1 = nsol;
13452  for (i__ = 1; i__ <= s__1; ++i__) {
13453  ++ij;
13454 /* MOD CAN BE ONLY 0 OR 1 OR 2 */
13455  if (ij % 3 == 0) {
13456  rslow1 = 1.5e-60;
13457  }
13458  if (ij % 3 == 1) {
13459  rslow1 = 1.7e-60;
13460  }
13461  if (ij % 3 == 2) {
13462  rslow1 = 1.6e-60;
13463  }
13464  if (rsi[i__ - 1] < 1e-60) {
13465  rsi[i__ - 1] = rslow1;
13466  }
13467 /* TKS* RSILO(I)=DLOG(RSI(I)*1.D80) */
13468  rsilo[i__ - 1] = log(rsi[i__ - 1]) + log(10.) * 80.;
13469  omeg[i__ - 1] = (double) (i__ - 1) * dx;
13470 /* L88: */
13471  }
13472 
13473 /* L9991: */
13474 
13475  spline_(&nsol, &cs__1, &cs__0, &eps, omeg, rsilo, tt, ss, &si, &nr, rsigg)
13476  ;
13477 
13478  ik1k0 = 1;
13479  ibound = 1;
13480 /* B-C LINESHAPE HERE */
13481 /* THESE VALUES (S,T1,T2) REPLACE VALUES GIVEN IN PAPER (*): */
13482 /* PUBLISHED IN AN ERRATUM, ASTROPHYSICAL JOURNAL, VOL.320, P.437 */
13483 /* (1987) */
13484  s = c_b24 * exp((c_b26 * x + c_b25) * x);
13485  t1 = c_b27 * exp((c_b29 * x + c_b28) * x);
13486  t2 = c_b30 * exp((c_b32 * x + c_b31) * x);
13487  e = 0.;
13488  t3 = 0.;
13489  t4 = 0.;
13490 
13491  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13492  like, &cs__2, &cs__0, &cs__2, &cs__3);
13493  s__1 = nf;
13494  for (i__ = 1; i__ <= s__1; ++i__) {
13495  quad[i__ - 1] = abscoef[i__ - 1];
13496 /* L20: */
13497  alfatot[i__ - 1] = abscoef[i__ - 1] + alfatot[i__ - 1];
13498  }
13499 
13500 
13501 
13502 /* ==================================================================== */
13503 
13504 /* HEXADECAPOLE COMPONENTS: LAMBDA1,LAMBDA2,LAMBDA,L=4045&0445 */
13505 /* ----------------------------------------------------------- */
13506 
13507  bound54_(&temp, rsi, &nsol);
13508  ij = 0;
13509  s__1 = nsol;
13510  for (i__ = 1; i__ <= s__1; ++i__) {
13511  ++ij;
13512 /* MOD CAN BE ONLY 0 OR 1 OR 2 */
13513  if (ij % 3 == 0) {
13514  rslow1 = 1.5e-60;
13515  }
13516  if (ij % 3 == 1) {
13517  rslow1 = 1.7e-60;
13518  }
13519  if (ij % 3 == 2) {
13520  rslow1 = 1.6e-60;
13521  }
13522  if (rsi[i__ - 1] < 1e-60) {
13523  rsi[i__ - 1] = rslow1;
13524  }
13525 /* TKS RSILO(I)=DLOG(RSI(I)*1.E80) */
13526  rsilo[i__ - 1] = log(rsi[i__ - 1]) + log(10.) * 80.;
13527 /* L111: */
13528  omeg[i__ - 1] = (double) (i__ - 1) * dx;
13529  }
13530  spline_(&nsol, &cs__1, &cs__0, &eps, omeg, rsilo, tt, ss, &si, &nr, rsigg)
13531  ;
13532 
13533 /* --------------------------- */
13534 /* TEMPERATURES 50-140K */
13535 /* --------------------------- */
13536 
13537  if (temp >= 140.) {
13538  goto L333;
13539  }
13540 
13541  s = c_b43 * exp((c_b45 * x + c_b44) * x);
13542  e = c_b46 * exp((c_b47 * x + c_b47) * x);
13543  t1 = c_b49 * exp((c_b51 * x + c_b50) * x);
13544  t2 = c_b52 * exp((c_b54 * x + c_b53) * x);
13545  t3 = c_b55 * exp((c_b57 * x + c_b56) * x);
13546  t4 = c_b58 * exp((c_b60 * x + c_b59) * x);
13547 
13548  ik1k0 = 0;
13549  ibound = 1;
13550  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13551  like, &cs__4, &cs__0, &cs__4, &cs__5);
13552  s__1 = nf;
13553  for (i__ = 1; i__ <= s__1; ++i__) {
13554  hexa[i__ - 1] = abscoef[i__ - 1];
13555  /*
13556  s_wsle(&io___25);
13557  do_lio(&c__9, &c__1, " T=50-140K: HEXA(", (ftnlen)17);
13558  do_lio(&c__2, &c__1, (char *)&i__, (ftnlen)sizeof(int));
13559  do_lio(&c__9, &c__1, ") =", (ftnlen)3);
13560  do_lio(&c__5, &c__1, (char *)&abscoef[i__ - 1], (ftnlen)sizeof(
13561  double));
13562  e_wsle();
13563  */
13564 /* L50: */
13565  alfatot[i__ - 1] += abscoef[i__ - 1];
13566  }
13567  goto L334;
13568 
13569 /* --------------------------- */
13570 /* TEMPERATURES 140-300K */
13571 /* --------------------------- */
13572 
13573 L333:
13574  ik1k0 = 0;
13575  ibound = 1;
13576  s = c_b78 * exp((c_b80 * x + c_b79) * x);
13577  e = c_b46 * exp((c_b47 * x + c_b47) * x);
13578  t1 = c_b84 * exp((c_b86 * x + c_b85) * x);
13579  t2 = c_b87 * exp((c_b89 * x + c_b88) * x);
13580  t3 = c_b90 * exp((c_b92 * x + c_b91) * x);
13581  t4 = c_b93 * exp((c_b95 * x + c_b94) * x);
13582 
13583  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13584  like, &cs__4, &cs__0, &cs__4, &cs__5);
13585  s__1 = nf;
13586  for (i__ = 1; i__ <= s__1; ++i__) {
13587  hexa[i__ - 1] = abscoef[i__ - 1];
13588  /*
13589  s_wsle(&io___26);
13590  do_lio(&c__9, &c__1, " T=140-300K: HEXA(", (ftnlen)18);
13591  do_lio(&c__2, &c__1, (char *)&i__, (ftnlen)sizeof(int));
13592  do_lio(&c__9, &c__1, ") =", (ftnlen)3);
13593  do_lio(&c__5, &c__1, (char *)&abscoef[i__ - 1], (ftnlen)sizeof(
13594  double));
13595  e_wsle();
13596  */
13597 /* L550: */
13598  alfatot[i__ - 1] += abscoef[i__ - 1];
13599  }
13600 
13601 /* ==================================================================== */
13602 
13603 /* DOUBLE TRANSITIONS: LAMBDA1,LAMBDA2,LAMBDA,L=2,2,3,3 */
13604 /* ---------------------------------------------------- */
13605 
13606 /* --------------------------- */
13607 /* TEMPERATURES 50-300K */
13608 /* --------------------------- */
13609 
13610 L334:
13611  ik1k0 = 1;
13612  ibound = 0;
13613 /* X S=Y(X,1.19261D-58, -3.78587,0.34024) */
13614  s = c_b112 * exp((c_b114 * x + c_b113) * x);
13615  t1 = c_b115 * exp((c_b117 * x + c_b116) * x);
13616  t2 = c_b118 * exp((c_b120 * x + c_b119) * x);
13617  t3 = 0.;
13618  t4 = 0.;
13619  addspec_(&s, &e, &t1, &t2, &t3, &t4, &temp, &nf, freq, abscoef, &cs__0, &
13620  like, &cs__2, &cs__2, &cs__3, &cs__3);
13621  s__1 = nf;
13622  for (i__ = 1; i__ <= s__1; ++i__) {
13623  dtrans[i__ - 1] = abscoef[i__ - 1];
13624 /* L650: */
13625  alfatot[i__ - 1] += abscoef[i__ - 1];
13626  }
13627 
13628 /* ==================================================================== */
13629 
13630 /* ANISOTROPIC OVERLAP NEGLECTED (LAMBDA1,LAMBDA2,LAMBDA,L=0212) */
13631 /* SINCE THIS TERM IS EXTREMELY SMALL */
13632 
13633 /* ==================================================================== */
13634 
13635 /* TKS* PRINT 154, FREQ(1),FREQ(NF),FREQ(2)-FREQ(1),TEMP */
13636 /* TKS* PRINT 156, (ALFATOT(I),I=1,NF) */
13637 /* TKS*154 FORMAT(///' ABSORPTION COEFFICIENT ALPHA(FNU), FROM ',F5.1, */
13638 /* TKS* $' CM-1 TO',F7.1,' CM-1, AT',F6.2,' CM-1 INCREMENTS, AT T=', */
13639 /* TKS* $F7.2,' K, IN UNITS OF CM-1 AMAGAT-2'/) */
13640 /* TKS*156 FORMAT(' ',10D13.5) */
13641 /* TKS* OPEN(UNIT=10, FILE='OUT', STATUS='UNKNOWN') */
13642 /* TKS* WRITE(10, 2929) (FREQ(I), ALFATOT(I), I=1, NF) */
13643 /* TKS*C WRITE(10, 2929) (FREQ(I), QUAD(I), HEXA(I) ALFATOT(I), I=1, NF) */
13644 /* TKS*2929 FORMAT(F10.3, E12.4) */
13645 
13646 /* TKS* STOP */
13647 
13648 
13649 
13650 /* TKS FILL OUTPUT VARIABLE */
13651  tksabs[0] = quad[0];
13652  tksabs[1] = hexa[0];
13653  tksabs[2] = dtrans[0];
13654  tksabs[3] = alfatot[0];
13655  ret_val = alfatot[0];
13656 /* TKS print*,'QUAD(1),HEXA(1),DTRANS(1)=',QUAD(1),HEXA(1),DTRANS(1) */
13657 L999:
13658  return ret_val;
13659 } /* n2n2tks_ */
13660 
13661 #undef temp
13662 #undef fnumin
13663 #undef fnumax
13664 #undef dnu
13665 #undef slit
13666 #undef dx
13667 #undef rsilo
13668 #undef omeg
13669 #undef rsi
13670 #undef rsigg
13671 #undef nsol
13672 #undef like
13673 #undef ik1k0
13674 #undef ibound
13675 
13676 #define wnrmax3 (app3a_1.wnrmax3)
13677 #define rsilo (rsilo_1.rsilo)
13678 #define omeg (bba_2.omeg)
13679 #define rsigg (bba_2.rsigg)
13680 #define beta (bba_2.beta)
13681 #define nsol (bbc_1.nsol)
13682 #define ibound (bbb_1.ibound)
13683 #define q1 (n2part_1.q1)
13684 #define wn2 (n2part_1.wn2)
13685 #define b01 (n2part_1.b01)
13686 #define d01 (n2part_1.d01)
13687 #define jrange2 (n2part_1.jrange2)
13688 
13689 
13690 
13691 /* ########################################################################## */
13692 
13693 
13694 /* Subroutine */ int addspec_(double *g0, double *ep, double *
13695  tau1, double *tau2, double *tau5, double *tau6,
13696  double *temp, int *nf, double *freq, double *abscoef,
13697  int * /* mp */, int *like, int *lambda1, int *lambda2,
13698  int *lambda, int * /* lvalue */)
13699 {
13700  /* Initialized data */
13701 
13702  static double closchm = 2.68675484e19;
13703  static double boltzwn = .6950304;
13704  static double hbar = 1.054588757e-27;
13705  static double pi = 3.1415926535898;
13706  static double clight = 2.997925e10;
13707 
13708  /* Format strings */
13709  /*
13710  static char fmt_20[] = "(/\002 LAMBDA1,LAMBDA2, LAMBDA,LVALUE=\002,2i3,2"
13711  "x,2i3,\002 COMPONENT.\002/15x,\002LINE SHAPE PARAMETERS:\002,6d1"
13712  "2.3,5x,\002G(0)=\002,d12.3/)";
13713  */
13714 
13715  /* System generated locals */
13716  int s__1, s__2, s__3, s__4, s__5, s__6;
13717  double d__1, d__2;
13718 
13719  /* Builtin functions */
13720  /*
13721  integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void),
13722  s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
13723  e_wsle(void);
13724  */
13725 
13726  /* Local variables */
13727  int list, jsum;
13728  extern double bgama_(double *, double *, double *,
13729  double *, double *, double *, double *);
13730  int i__, j;
13731  double calib, p;
13732  int i1, j1, i2, j2;
13733  double p1, p2, omega1, omega2;
13734  int ip, jp, iq;
13735  double twopic;
13736  int jplusl, ip1, jp1, ip2, jp2;
13737  double fac, cgs, xbg, wkf, frq, wki;
13738  extern double specfct_(double *, double *, double *,
13739  double *, int *, double *), clebsqr_(int *,
13740  int *, int *);
13741  double cg1s, cg2s;
13742 
13743  /* Fortran I/O blocks */
13744  /*
13745  static cilist io___38 = { 0, 6, 0, fmt_20, 0 };
13746  static cilist io___40 = { 0, 6, 0, 0, 0 };
13747  */
13748 
13749 
13750 /* THIS PROGRAM GENERATES LISTING OF R-T CIA ALFA(OMEGA) */
13751 /* IF EITHER LAMBDA1 OR LAMBDA2 EQUAL TO ZERO - SINGLE TRANSITIONS; */
13752 /* DOUBLE TRANSITIONS ARE ASSUMED OTHERWISE. */
13753 /* LIKE=1 FOR LIKE SYSTEMS (AS H2-H2), SET LIKE=0 ELSE. */
13754 
13755 /* COMMON/BB/OMEG(201),RSI(201),RSIGG(201),NSOL,BETA */
13756 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
13757 /* DIMENSION ABSCOEF(NF),FREQ(NF) */
13758  /* Parameter adjustments */
13759  --abscoef;
13760  --freq;
13761 
13762  /* Function Body */
13763 
13764  twopic = 2. * pi * clight;
13765  if (*like != 1) {
13766  *like = 0;
13767  }
13768 /* TAKE CARE OF FACTOR OF 1.E-60 HERE. */
13769 /* Computing 2nd power */
13770  d__1 = pi;
13771 /* Computing 2nd power */
13772  d__2 = closchm * 1e-30;
13773  calib = twopic * (d__1 * d__1 * 4. / (hbar * 3. * clight)) * (d__2 * d__2)
13774  ;
13775  calib /= (double) (*like + 1);
13776  beta = 1. / (boltzwn * *temp);
13777  list = *nf;
13778  s__1 = list;
13779  for (i__ = 1; i__ <= s__1; ++i__) {
13780 /* L88: */
13781  abscoef[i__] = 0.;
13782  }
13783 
13784 /* ROTATIONAL SPECTRUM FOR THE DETAILED LISTING ******************* */
13785  /*
13786  s_wsfe(&io___38);
13787  do_fio(&c__1, (char *)&(*lambda1), (ftnlen)sizeof(int));
13788  do_fio(&c__1, (char *)&(*lambda2), (ftnlen)sizeof(int));
13789  do_fio(&c__1, (char *)&(*lambda), (ftnlen)sizeof(int));
13790  do_fio(&c__1, (char *)&(*lvalue), (ftnlen)sizeof(int));
13791  do_fio(&c__1, (char *)&(*g0), (ftnlen)sizeof(double));
13792  do_fio(&c__1, (char *)&(*ep), (ftnlen)sizeof(double));
13793  do_fio(&c__1, (char *)&(*tau1), (ftnlen)sizeof(double));
13794  do_fio(&c__1, (char *)&(*tau2), (ftnlen)sizeof(double));
13795  do_fio(&c__1, (char *)&(*tau5), (ftnlen)sizeof(double));
13796  do_fio(&c__1, (char *)&(*tau6), (ftnlen)sizeof(double));
13797  d__1 = *g0 * bgama_(&c_b47, tau1, tau2, ep, tau5, tau6, temp);
13798  do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(double));
13799  e_wsfe();
13800  */
13801  if (*lambda1 == 0 || *lambda2 == 0) {
13802  goto L152;
13803  }
13804  jplusl = jrange2 + max(*lambda1,*lambda2);
13805 
13806  /*
13807  s_wsle(&io___40);
13808  do_lio(&c__9, &c__1, "LAMBDA1,LAMBDA2,ABSCOEF(1)=", (ftnlen)27);
13809  do_lio(&c__2, &c__1, (char *)&(*lambda1), (ftnlen)sizeof(int));
13810  do_lio(&c__2, &c__1, (char *)&(*lambda2), (ftnlen)sizeof(int));
13811  do_lio(&c__5, &c__1, (char *)&abscoef[1], (ftnlen)sizeof(double));
13812  e_wsle();
13813  */
13814  jsum = 0;
13815  s__1 = jrange2;
13816  for (i1 = 1; i1 <= s__1; ++i1) {
13817  j1 = i1 - 1;
13818  s__2 = jplusl;
13819  for (ip1 = 1; ip1 <= s__2; ++ip1) {
13820  jp1 = ip1 - 1;
13821  cg1s = clebsqr_(&j1, lambda1, &jp1);
13822  if (cg1s <= 0.) {
13823  goto L150;
13824  } else {
13825  goto L130;
13826  }
13827 L130:
13828  s__3 = j1 * (j1 + 1);
13829  p1 = (double) (2 * j1 + 1) * wn2[1 + j1 % 2 - 1] * exp(
13830  -1.4387859 / *temp * ((b01 - (double) s__3 * d01) * (
13831  double) s__3)) / q1;
13832  ++jsum;
13833  s__3 = jp1 * ip1;
13834  s__4 = j1 * i1;
13835  omega1 = (b01 - (double) s__3 * d01) * (double) s__3 - (
13836  b01 - (double) s__4 * d01) * (double) s__4;
13837  s__3 = jrange2;
13838  for (i2 = 1; i2 <= s__3; ++i2) {
13839  j2 = i2 - 1;
13840  s__4 = jplusl;
13841  for (ip2 = 1; ip2 <= s__4; ++ip2) {
13842  jp2 = ip2 - 1;
13843  cg2s = clebsqr_(&j2, lambda2, &jp2);
13844  if (cg2s <= 0.) {
13845  goto L148;
13846  } else {
13847  goto L132;
13848  }
13849 L132:
13850  s__5 = j2 * (j2 + 1);
13851  p2 = (double) (2 * j2 + 1) * wn2[1 + j2 % 2 - 1] *
13852  exp(-1.4387859 / *temp * ((b01 - (double)
13853  s__5 * d01) * (double) s__5)) / q1;
13854  s__5 = jp2 * ip2;
13855  s__6 = j2 * i2;
13856  omega2 = (b01 - (double) s__5 * d01) * (double)
13857  s__5 - (b01 - (double) s__6 * d01) * (
13858  double) s__6;
13859  fac = calib * p1 * p2 * cg1s * cg2s;
13860  s__5 = list;
13861  for (i__ = 1; i__ <= s__5; ++i__) {
13862  frq = freq[i__] - omega1 - omega2;
13863  wki = freq[i__] * (1. - exp(-beta * freq[i__]));
13864  wkf = wki * fac;
13865  xbg = *g0 * bgama_(&frq, tau1, tau2, ep, tau5, tau6,
13866  temp);
13867  if (ibound == 0) {
13868  goto L555;
13869  }
13870  if (abs(frq) <= wnrmax3) {
13871  xbg += specfct_(&frq, omeg, rsilo, rsigg, &nsol, &
13872  beta);
13873  }
13874 L555:
13875  abscoef[i__] += xbg * wkf;
13876 /* L146: */
13877  }
13878 L148:
13879  ;
13880  }
13881  }
13882 L150:
13883  ;
13884  }
13885  }
13886  goto L2222;
13887 /* SINGLE TRANSITIONS AT NITROGEN'S ROTATIONAL FREQUENCIES */
13888 /* ======================================================= */
13889 L152:
13890  jplusl = jrange2 + *lambda;
13891  s__2 = jrange2;
13892  for (i__ = 1; i__ <= s__2; ++i__) {
13893  j = i__ - 1;
13894  s__1 = jplusl;
13895  for (ip = 1; ip <= s__1; ++ip) {
13896  jp = ip - 1;
13897  cgs = clebsqr_(&j, lambda, &jp);
13898  if (cgs <= 0.) {
13899  goto L200;
13900  } else {
13901  goto L210;
13902  }
13903 L210:
13904  s__4 = j * (j + 1);
13905  p = (double) (2 * j + 1) * wn2[1 + j % 2 - 1] * exp(
13906  -1.4387859 / *temp * ((b01 - (double) s__4 * d01) * (
13907  double) s__4)) / q1;
13908  ++jsum;
13909  s__4 = jp * ip;
13910  s__3 = j * i__;
13911  omega1 = (b01 - (double) s__4 * d01) * (double) s__4 - (
13912  b01 - (double) s__3 * d01) * (double) s__3;
13913  fac = calib * p * cgs;
13914  s__4 = list;
13915  for (iq = 1; iq <= s__4; ++iq) {
13916  frq = freq[iq] - omega1;
13917 /* XWKI=FREQ(IQ)*(1.-EXP(-BETA*FREQ(IQ))) */
13918  wki = freq[iq] * (1. - exp(-beta * freq[iq]));
13919  wkf = wki * fac;
13920  xbg = *g0 * bgama_(&frq, tau1, tau2, ep, tau5, tau6, temp);
13921  if (ibound == 0) {
13922  goto L444;
13923  }
13924  if (abs(frq) <= wnrmax3) {
13925  xbg += specfct_(&frq, omeg, rsilo, rsigg, &nsol, &beta);
13926  }
13927 L444:
13928  abscoef[iq] += xbg * wkf;
13929 /* L199: */
13930  }
13931 L200:
13932  ;
13933  }
13934  }
13935 
13936 L2222:
13937 /* TKS 2222 PRINT 44,(ABSCOEF(I),I=1,LIST) */
13938 /* L44: */
13939  return 0;
13940 } /* addspec_ */
13941 
13942 #undef wnrmax3
13943 #undef rsilo
13944 #undef omeg
13945 #undef rsigg
13946 #undef beta
13947 #undef nsol
13948 #undef ibound
13949 #undef q1
13950 #undef wn2
13951 #undef b01
13952 #undef d01
13953 #undef jrange2
13954 
13955 #define q (n2part_2.q)
13956 #define wn2 (n2part_2.wn2)
13957 #define b0 (n2part_2.b0)
13958 #define d0 (n2part_2.d0)
13959 #define jrange1 (n2part_2.jrange1)
13960 
13961 /* Subroutine */ int partsum_(double *temp)
13962 {
13963  /* System generated locals */
13964  int s__1;
13965 
13966  /* Local variables */
13967  int j;
13968  double dq;
13969 
13970 /* N2 ROTATIONAL PARTITION SUM Q = Q(T). */
13971 
13972 
13973 
13974 /* Q,B0,D0,WN2 - PARTITION FCT., ROT.CONSTANTS, WEIGHTS FOR N2 */
13975  q = 0.;
13976  j = 0;
13977 L50:
13978  s__1 = j * (j + 1);
13979  dq = (double) (2 * j + 1) * wn2[1 + j % 2 - 1] * exp(-1.4387859 * ((
13980  b0 - (double) s__1 * d0) * (double) s__1) / *temp);
13981  q += dq;
13982  ++j;
13983  if (dq > q / 900.) {
13984  goto L50;
13985  }
13986  jrange1 = j;
13987 /* TKS PRINT 30, Q, JRANGE1 */
13988 
13989 /* L30: */
13990  return 0;
13991 } /* partsum_ */
13992 
13993 #undef q
13994 #undef wn2
13995 #undef b0
13996 #undef d0
13997 #undef jrange1
13998 
13999 #define slit (app3a_1.slit)
14000 #define dx (app3a_1.dx)
14001 #define wnrmax3 (app3a_1.wnrmax3)
14002 #define nsri (app3b_1.nsri)
14003 #define ns (app3b_1.ns)
14004 #define nsriup (app3b_1.nsriup)
14005 #define rsi (bl3_1.rsi)
14006 
14007 /* Subroutine */ int profile_(double *x, double *y)
14008 {
14009  /* System generated locals */
14010  int s__1;
14011 
14012  /* Local variables */
14013  int i__;
14014  double slope;
14015  int n1;
14016  double x0;
14017  int nc;
14018  double dr;
14019  int no;
14020  double xi;
14021  int nu;
14022 
14023 /* A TRIANGULAR SLIT FUNCTION IS USED. */
14024 
14025 
14026 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14027 
14028  if (*y < 0.) {
14029  goto L105;
14030  } else if (*y == 0) {
14031  goto L106;
14032  } else {
14033  goto L1;
14034  }
14035 L1:
14036  x0 = nsri + 1. + *x / dx;
14037  nc = (int) x0;
14038  n1 = nc + 1;
14039  slope = *y / slit;
14040  nu = (int) (x0 - ns);
14041  if (nu < 1) {
14042  nu = 1;
14043  }
14044  if (nu > nsriup) {
14045  return 0;
14046  }
14047  no = (int) (x0 + ns);
14048  if (no > nsriup) {
14049  no = nsriup;
14050  }
14051  if (no < 1) {
14052  return 0;
14053  }
14054  if (nc > nsriup) {
14055  nc = nsriup;
14056  }
14057  if (nc <= 1) {
14058  goto L101;
14059  }
14060  s__1 = nc;
14061  for (i__ = nu; i__ <= s__1; ++i__) {
14062  xi = (i__ - 1.) * dx - wnrmax3;
14063  dr = slope * (xi - (*x - slit));
14064  if (dr <= 0.) {
14065  goto L100;
14066  }
14067  rsi[i__ - 1] += dr;
14068 L100:
14069  ;
14070  }
14071 L101:
14072 
14073  if (nc >= nsriup) {
14074  return 0;
14075  }
14076  if (n1 < 1) {
14077  n1 = 1;
14078  }
14079  s__1 = no;
14080  for (i__ = n1; i__ <= s__1; ++i__) {
14081  xi = (i__ - 1.) * dx - wnrmax3;
14082  dr = *y - slope * (xi - *x);
14083  if (dr <= 0.) {
14084  goto L102;
14085  }
14086  rsi[i__ - 1] += dr;
14087 L102:
14088  ;
14089  }
14090  return 0;
14091 L105:
14092 /* TKS 105 PRINT 10,SLIT */
14093 /* TKS 10 FORMAT(/' A TRIANGULAR SLIT FUNCTION OF',F6.3,' CM-1 HALFWIDTH IS */
14094 /* TKS ' USED'/) */
14095 L106:
14096  return 0;
14097 } /* profile_ */
14098 
14099 #undef slit
14100 #undef dx
14101 #undef wnrmax3
14102 #undef nsri
14103 #undef ns
14104 #undef nsriup
14105 #undef rsi
14106 
14107 
14108 /* X FUNCTION SPECFCT(FREQ,OMEGA,PHI,PHI2,N,RTEMP) */
14109 
14110 double specfct_(double *freq, double *omega, double *phi,
14111  double *phi2, int *n, double *rtemp)
14112 {
14113  /* System generated locals */
14114  double ret_val;
14115 
14116  /* Local variables */
14117  double tfac, f, gp, si;
14118  int nr;
14119  extern /* Subroutine */ int ixpolat_(int *, int *, int *,
14120  double *, double *, double *, double *,
14121  double *, double *, int *, double *);
14122 
14123 
14124 /* THIS INTERPOLATES THE SPECTRAL FUNCTION PHI(FREQ) DEFINED AT */
14125 /* OMEGA(N) AS PHI(N). PHI2 IS THE SECOND DERIVATIVE AT OMEGA */
14126 /* WHICH MUST BE OBTAINED FIRST (USE SPLINE FOR THAT PURPOSE). */
14127 /* RTEMP IS THE RECIPROCAL TEMPERATURE IN CM-1 UNITS. */
14128 /* NOTE THAT WE INTERPOLATE 1.E80 TIMES THE LOGARITHM OF PHI(OMEGA) */
14129 /* NOTE THAT IN GSO'S REVISION, THIS FACTOR IS REMOVED. */
14130 /* (REVISION MODIFIED) */
14131 
14132 
14133 
14134 /* PRINT*,'FREQ =',FREQ */
14135 /* PRINT*,'OMEGA=',OMEGA */
14136 /* PRINT*,'RTEMP=',RTEMP */
14137 /* PRINT*,'PHI =',PHI */
14138 /* PRINT*,'PHI2 =',PHI2 */
14139  /* Parameter adjustments */
14140  --phi2;
14141  --phi;
14142  --omega;
14143 
14144  /* Function Body */
14145  tfac = 0.;
14146  f = *freq;
14147  if (f >= 0.) {
14148  goto L20;
14149  } else {
14150  goto L10;
14151  }
14152 L10:
14153  f = abs(f);
14154  tfac = -(*rtemp) * f;
14155 L20:
14156  if (f <= omega[*n]) {
14157  goto L30;
14158  }
14159  ret_val = exp(-(phi[*n - 1] - phi[*n]) * (f - omega[*n]) / (omega[*n] -
14160  omega[*n - 1]) + phi[*n] + tfac) * 1e-80;
14161 /* print*,' (A) SPECFCT=',SPECFCT */
14162 /* X SPECFCT=DEXP(-(PHI(N-1)-PHI(N))*(F-OMEGA(N))/ */
14163 /* X $(OMEGA(N)-OMEGA(N-1))+PHI(N)+TFAC) */
14164  return ret_val;
14165 /* 30 PRINT*,'SI,NR,PHI2=', */
14166 /* & SI,NR,PHI2 */
14167 /* CALL IXPOLAT(N,1,0,1.D-6,OMEGA,PHI,F,GP,SI,NR,PHI2) */
14168 L30:
14169  ixpolat_(n, &cs__1, &cs__0, &c_b183, &omega[1], &phi[1], &f, &gp, &si, &
14170  nr, &phi2[1]);
14171  ret_val = exp(tfac + gp) * 1e-80;
14172 /* X SPECFCT=DEXP(TFAC+GP) */
14173 /* print*,' (B) GP,SPECFCT=',GP,SPECFCT */
14174 
14175  return ret_val;
14176 } /* specfct_ */
14177 #define slit (app3a_1.slit)
14178 #define dx (app3a_1.dx)
14179 #define wnrmax3 (app3a_1.wnrmax3)
14180 #define nsri (app3b_1.nsri)
14181 #define ns (app3b_1.ns)
14182 #define nsriup (app3b_1.nsriup)
14183 #define eb (energ_1.eb)
14184 #define niv (energ_1.niv)
14185 #define nlines (dimer_1.nlines)
14186 #define rsibb (bl3_2.rsibb)
14187 #define ldelvi (bbbb_2.ldelvi)
14188 #define ivi (bbbb_2.ivi)
14189 #define ivip (bbbb_2.ivip)
14190 #define ldelel (bbbb_2.ldelel)
14191 #define ll (bbbb_2.ll)
14192 #define llp (bbbb_2.llp)
14193 
14194 /* Subroutine */ int bound32_(double *temp, double *rsi, int *
14195  nsol)
14196 {
14197  /* Initialized data */
14198 
14199  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,
14200  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,
14201  3,4,4,4,4,4,4,4,4 };
14202  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,
14203  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,
14204  0,1,0,1,0,1,0,1 };
14205  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,
14206  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,
14207  4,5,4,5,4,5,4,5 };
14208  static int ldelels[63] = { 1,3,1,3,1,3,1,3,1,3,-3,-1,1,3,-3,-1,1,3,
14209  -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,
14210  -1,-1,-1,-3,-3,3,3,-3,-3,-3,-3,-3,3,3,1,1,-1,-1 };
14211  static double as[63] = { 4.4844e-40,4.4356e-40,2.9345e-40,2.885e-40,
14212  1.6441e-40,1.5899e-40,7.2882e-41,6.7748e-41,1.0378e-41,1.3041e-42,
14213  1.5006e-41,1.537e-41,1.6139e-41,1.7143e-41,1.9985e-41,2.0169e-41,
14214  2.0994e-41,2.2094e-41,1.636e-41,1.6281e-41,1.6714e-41,1.7326e-41,
14215  8.0425e-42,8.0862e-42,8.0093e-42,8.1366e-42,2.4471e-42,2.5406e-42,
14216  2.6629e-42,2.8064e-42,4.6227e-42,4.715e-42,4.8513e-42,5.0133e-42,
14217  3.9968e-42,3.984e-42,3.981e-42,3.9687e-42,1.1806e-42,1.3458e-42,
14218  3.8746e-42,3.9219e-42,7.3334e-43,1.339e-42,1.3041e-42,7.1401e-43,
14219  1.3461e-42,6.5776e-43,6.9847e-43,1.3517e-42,7.5545e-43,1.3268e-42,
14220  6.9847e-43,1.3517e-42,7.464e-43,2.1322e-43,2.6037e-43,2.0823e-43,
14221  2.0632e-43,2.1067e-43,2.0531e-43,2.1218e-43,2.3006e-43 };
14222  static double bs[63] = { 4.3e-4,4.6e-4,8.3e-4,8.9e-4,.0017,.00186,
14223  .0041,.00457,0.,0.,9.99e-4,5.23e-4,1.49e-4,-1.68e-4,.001837,
14224  .001153,6.6e-4,2.54e-4,.003603,.002677,.002101,.001738,.00595,
14225  .006843,0.,.007035,.001025,6.42e-4,2.54e-4,-1.64e-4,.002342,
14226  .001975,.00164,.001328,.004943,.004999,.005461,.006839,0.,.010993,
14227  0.,0.,.001367,.005262,0.,.001601,.00451,0.,.001828,.004175,.04816,
14228  .007033,.001828,.004175,.009338,.003733,.008508,.006979,0.,
14229  .005035,0.,.004169,0. };
14230  static double twopic = 1.88365183e11;
14231  static double pi = 3.141592654;
14232 
14233  /* System generated locals */
14234  int s__1;
14235  double d__1;
14236 
14237  /* Local variables */
14238  double alfa;
14239  int nnii, nsol2;
14240  double a, b;
14241  int i__, l, n;
14242  double stoke, stoki, am, pf;
14243  int lp;
14244  double rm;
14245  int nr, iv;
14246  double stokip;
14247  int ivp;
14248  extern double clebsqr_(int *, int *, int *);
14249  extern /* Subroutine */ int profile_(double *, double *);
14250 
14251 
14252 #define eb_ref(a_1,a_2) eb[(a_2)*41 + a_1 - 42]
14253 
14254 
14255 
14256 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14257 
14258 
14259 /* STORED VALUES */
14260  /* Parameter adjustments */
14261  --rsi;
14262 
14263  /* Function Body */
14264 
14265 
14266 /* EB(I,K) - BOUND ENERGIES */
14267 /* AM = (MTX.EL. (L,BETA,L') )**2 */
14268 /* M(L,L',V,V') OF PAPER (*) ARE TO BE CORRECTED: */
14269 /* M(L,L',V,V') = AM * (2L+1) * C(L,3,L')**2 */
14270 /* NSRI - HOW MANY POINTS FOR B-B SPECTRAL FUNCTION TO BE GIVEN */
14271 /* WNRMAX3 - THE FREQUENCY RANGE OF B-B CONTRIBUTION */
14272 /* SLIT- THE HALFWIDTH OF THE SPECTRAL PROFILE CONVOLUTED WITH */
14273 /* B-B SPECTRUM, IN [CM-1]. */
14274 /* A,B, COEFFICIENTS , EQ. 7, A.BORYSOW, L.FROMMHOLD, */
14275 /* AP. J. VOL.311, 1043-1057, (1986) */
14276 
14277  nsri = 190;
14278  wnrmax3 = 45.;
14279  nsriup = (nsri << 1) + 1;
14280  dx = wnrmax3 / (double) nsri;
14281  ns = (int) (slit / dx);
14282 
14283  for (i__ = 1; i__ <= 401; ++i__) {
14284 /* L300: */
14285  rsibb[i__ - 1] = 0.;
14286  }
14287 
14288  alfa = 1. / (*temp * .69519);
14289  rm = 2.32498211e-23;
14290 /* RM - REDUCED MASS FOR N2-N2 */
14291 
14292  d__1 = rm * 1.380662e-16 * *temp * 2. * pi / 4.3906208382975998e-53;
14293  pf = pow(d__1, c_b186);
14294 /* SCALE DOWN BY 1.D60 */
14295  pf *= 1e-60;
14296 
14297  nr = 0;
14298 L555:
14299  ++nr;
14300  ldelvi = ldelvis[nr - 1];
14301  ivi = ivis[nr - 1];
14302  ivip = ivips[nr - 1];
14303  ldelel = ldelels[nr - 1];
14304  a = as[nr - 1];
14305  b = bs[nr - 1];
14306 /* WRITE (6,334) LDELVI,IVI,IVIP, LDELEL,A,B */
14307 /* L334: */
14308 
14309 /* LDELVI=DELTA(V)=V'-V */
14310 /* IVI = V; IVIP = V' */
14311 /* LDELEL = DELTA(L) = L'-L */
14312 
14313  iv = ivi + 1;
14314  ivp = ivip + 1;
14315 /* THESE ARE ENERGY COLUMNS (V, V') */
14316 
14317  nnii = niv[iv - 1];
14318 
14319  s__1 = nnii;
14320  for (l = 1; l <= s__1; ++l) {
14321 /* LOOP OVER INITIAL L-VALUES... */
14322 
14323  am = a * exp(-b * (double) ((l - 1) * l));
14324 /* L - NUMBER OF ROW, (L-1) - ROTATIONAL LEVEL */
14325  lp = l + ldelel;
14326  ll = l - 1;
14327  llp = lp - 1;
14328 /* LL,LLP ARE INITIAL L AND FINAL L' ANGULAR MOMENTUM QUANTUM NUMBERS */
14329 
14330  if (lp > niv[ivp - 1] || lp < 1) {
14331  goto L20;
14332  }
14333  if (eb_ref(lp, ivp) == 0.) {
14334  goto L20;
14335  }
14336  if (eb_ref(l, iv) == 0.) {
14337  goto L20;
14338  }
14339  stoke = eb_ref(lp, ivp) - eb_ref(l, iv);
14340 
14341  stoki = am * exp(-alfa * eb_ref(l, iv)) / pf * (double) ((ll << 1)
14342  + 1) * clebsqr_(&ll, &cs__3, &llp);
14343 
14344  profile_(&stoke, &stoki);
14345  if (stoki > 0.) {
14346  ++nlines;
14347  }
14348 
14349  stokip = am * exp(-alfa * eb_ref(lp, ivp)) / pf * (double) ((llp
14350  << 1) + 1) * clebsqr_(&llp, &cs__3, &ll);
14351 
14352  d__1 = -stoke;
14353  profile_(&d__1, &stokip);
14354  if (stokip > 0.) {
14355  ++nlines;
14356  }
14357 
14358 L20:
14359  ;
14360  }
14361  if (nr == 63) {
14362  goto L56;
14363  }
14364  goto L555;
14365 L56:
14366 
14367 /* 32 ENTRIES FOR (3220)+(3202) IN TABLE 6, 63 IN ALL: */
14368 /* DATA EXPANDED AND INCLUDE NOW ALL POSSIBLE B-B TRANSITIONS */
14369 
14370  s__1 = nsriup;
14371  for (n = 1; n <= s__1; ++n) {
14372 /* L90: */
14373  rsibb[n - 1] = rsibb[n - 1] / twopic / slit;
14374  }
14375 
14376  *nsol = nsri + 1;
14377  nsol2 = *nsol + 1;
14378 /* RSI - CONTRIBUTION FOR POSITIVE FREQUENCY SHIFTS */
14379 
14380  s__1 = *nsol;
14381  for (i__ = 1; i__ <= s__1; ++i__) {
14382 /* L22: */
14383  rsi[i__] = rsibb[*nsol - 1 + i__ - 1];
14384  }
14385 
14386 /* PRINT 999, (RSI(I),I=1,NSOL) */
14387 /* L999: */
14388 
14389  return 0;
14390 } /* bound32_ */
14391 
14392 #undef slit
14393 #undef dx
14394 #undef wnrmax3
14395 #undef nsri
14396 #undef ns
14397 #undef nsriup
14398 #undef eb
14399 #undef niv
14400 #undef nlines
14401 #undef rsibb
14402 #undef ldelvi
14403 #undef ivi
14404 #undef ivip
14405 #undef ldelel
14406 #undef ll
14407 #undef llp
14408 
14409 
14410 #undef eb_ref
14411 
14412 #define slit (app3a_1.slit)
14413 #define dx (app3a_1.dx)
14414 #define wnrmax3 (app3a_1.wnrmax3)
14415 #define nsri (app3b_1.nsri)
14416 #define ns (app3b_1.ns)
14417 #define nsriup (app3b_1.nsriup)
14418 #define eb (energ_1.eb)
14419 #define niv (energ_1.niv)
14420 #define nlines (dimer_1.nlines)
14421 #define rsibb (bl3_2.rsibb)
14422 
14423 /* Subroutine */ int bound54_(double *temp, double *rsi, int *
14424  nsol)
14425 {
14426  /* Initialized data */
14427 
14428  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,
14429  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
14430  };
14431  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,
14432  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 };
14433  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,
14434  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 };
14435  static int ldelels[54] = { 1,3,5,1,3,5,1,3,5,1,3,5,-5,-3,-1,1,3,5,-5,
14436  -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,
14437  1,3,5,-5,-3,-1,1,3,5 };
14438  static double as[54] = { 7.9332e-42,7.8207e-42,7.7235e-42,4.5815e-42,
14439  4.4834e-42,4.4059e-42,2.173e-42,2.0824e-42,2.025e-42,7.7222e-43,
14440  7.0351e-43,6.6815e-43,4.9611e-43,5.2232e-43,5.2979e-43,5.4652e-43,
14441  5.6827e-43,5.9277e-43,5.733e-43,6.062e-43,6.0862e-43,6.2104e-43,
14442  6.3809e-43,6.5698e-43,3.9501e-43,4.1599e-43,4.1033e-43,4.1097e-43,
14443  4.1339e-43,4.153e-43,1.5858e-43,1.5976e-43,1.5478e-43,1.5066e-43,
14444  1.4554e-43,1.3848e-43,9.9241e-44,1.0109e-43,1.0396e-43,1.0758e-43,
14445  1.1176e-43,1.1636e-43,1.646e-43,1.647e-43,1.6617e-43,1.6837e-43,
14446  1.7085e-43,1.7327e-43,1.1797e-43,1.1593e-43,1.1405e-43,1.1174e-43,
14447  1.0853e-43,1.0401e-43 };
14448  static double bs[54] = { 6.12e-4,6.35e-4,6.77e-4,.001137,.001201,
14449  .001341,.00229,.002449,.00287,.005426,.005876,.00745,.001,8.83e-4,
14450  6.09e-4,3.92e-4,2.07e-4,3.7e-5,.001625,.001624,.001305,.001084,
14451  9.27e-4,8.21e-4,.002978,.003273,.002994,.002954,.003153,.003668,
14452  .005799,.006423,.006733,.00796,.010937,.019179,.001229,9.93e-4,
14453  7.67e-4,5.43e-4,3.09e-4,5.1e-5,.002456,.0023,.00221,.002193,
14454  .002273,.002506,.004556,.004825,.005454,.006725,.009431,.016672 };
14455  static double twopic = 1.88365183e11;
14456  static double pi = 3.141592654;
14457 
14458  /* System generated locals */
14459  int s__1;
14460  double d__1;
14461 
14462  /* Local variables */
14463  double alfa;
14464  int nnii, ivip, nsol2;
14465  double a, b;
14466  int i__, l, n;
14467  double stoke, stoki, am, pf;
14468  int ll, lp;
14469  double rm;
14470  int nr, ldelel, iv, ldelvi;
14471  double stokip;
14472  int ivi, llp, ivp;
14473  extern double clebsqr_(int *, int *, int *);
14474  extern /* Subroutine */ int profile_(double *, double *);
14475 
14476 
14477 #define eb_ref(a_1,a_2) eb[(a_2)*41 + a_1 - 42]
14478 
14479 
14480 
14481 /* COMMON/APP3/SLIT,DX,NSRI,WNRMAX3,NS,NSRIUP */
14482 /* STORED VALUES */
14483 
14484 /* TKS THIS DATA STRUCTURE HAS 55 ENTRIES AND NOT 54!! */
14485 /* TKS DATA LDELVIS /0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, */
14486 /* TKS & 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2, */
14487 /* TKS & 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2/ */
14488 /* TKS WE HAVE SSKIPPED THE LAST "2" IN THIS DATA STATEMENT */
14489  /* Parameter adjustments */
14490  --rsi;
14491 
14492  /* Function Body */
14493 
14494 
14495 
14496 
14497 
14498 
14499 
14500 
14501  nsri = 190;
14502  wnrmax3 = 47.;
14503  nsriup = (nsri << 1) + 1;
14504  dx = wnrmax3 / (double) nsri;
14505  ns = (int) (slit / dx);
14506 
14507  for (i__ = 1; i__ <= 401; ++i__) {
14508 /* L300: */
14509  rsibb[i__ - 1] = 0.;
14510  }
14511  alfa = 1. / (*temp * .69519);
14512  rm = 2.32498211e-23;
14513 /* RM - REDUCED MASS FOR N2-N2 */
14514 
14515  d__1 = rm * 1.380662e-16 * *temp * 2. * pi / 4.3906208382975998e-53;
14516  pf = pow(d__1, c_b186);
14517 /* SCALE DOWNWARD BY 1.D60 */
14518  pf *= 1e-60;
14519 
14520  nr = 0;
14521 L555:
14522  ++nr;
14523  ldelvi = ldelvis[nr - 1];
14524  ivi = ivis[nr - 1];
14525  ivip = ivips[nr - 1];
14526  ldelel = ldelels[nr - 1];
14527  a = as[nr - 1];
14528  b = bs[nr - 1];
14529 /* WRITE (6,334) LDELVI,IVI,IVIP, LDELEL,A,B */
14530 /* L334: */
14531 /* LDELVI=DELTA(V)=V'-V */
14532 /* IVI = V */
14533 /* LDELEL = DELTA(L) = L'-L */
14534 
14535  iv = ivi + 1;
14536  ivp = ivip + 1;
14537  nnii = niv[iv - 1];
14538  s__1 = nnii;
14539  for (l = 1; l <= s__1; ++l) {
14540  am = a * exp(-b * (double) (l * (l + 1)));
14541  lp = l + ldelel;
14542  ll = l - 1;
14543  llp = lp - 1;
14544  if (lp > niv[ivp - 1] || lp < 1) {
14545  goto L20;
14546  }
14547  if (eb_ref(lp, ivp) == 0.) {
14548  goto L20;
14549  }
14550  if (eb_ref(l, iv) == 0.) {
14551  goto L20;
14552  }
14553 
14554  stoke = eb_ref(lp, ivp) - eb_ref(l, iv);
14555  stoki = am * exp(-alfa * eb_ref(l, iv)) / pf * (double) ((ll << 1)
14556  + 1) * clebsqr_(&ll, &cs__5, &llp);
14557  profile_(&stoke, &stoki);
14558  if (stoki > 0.) {
14559  ++nlines;
14560  }
14561  stokip = am * exp(-alfa * eb_ref(lp, ivp)) / pf * (double) ((llp
14562  << 1) + 1) * clebsqr_(&llp, &cs__5, &ll);
14563  d__1 = -stoke;
14564  profile_(&d__1, &stokip);
14565  if (stokip > 0.) {
14566  ++nlines;
14567  }
14568 L20:
14569  ;
14570  }
14571  if (nr == 54) {
14572  goto L56;
14573  }
14574 
14575  goto L555;
14576 L56:
14577 /* 54 ENTRIES FOR (5440)=(5404) IN TABLE 6 */
14578 
14579  s__1 = nsriup;
14580  for (n = 1; n <= s__1; ++n) {
14581 /* L90: */
14582  rsibb[n - 1] = rsibb[n - 1] / twopic / slit;
14583  }
14584 
14585  *nsol = nsri + 1;
14586  nsol2 = *nsol + 1;
14587 
14588  s__1 = *nsol;
14589  for (i__ = 1; i__ <= s__1; ++i__) {
14590 /* L22: */
14591  rsi[i__] = rsibb[*nsol - 1 + i__ - 1];
14592  }
14593 
14594 /* PRINT 999, (RSI(I),I=1,NSOL) */
14595 /* L999: */
14596 
14597  return 0;
14598 } /* bound54_ */
14599 
14600 #undef slit
14601 #undef dx
14602 #undef wnrmax3
14603 #undef nsri
14604 #undef ns
14605 #undef nsriup
14606 #undef eb
14607 #undef niv
14608 #undef nlines
14609 #undef rsibb
14610 
14611 
14612 #undef eb_ref
14613 
14614 
14615 double clebsqr_0_(int n__, int *l, int *lambda, int *lp)
14616 {
14617  /* System generated locals */
14618  int s__1, s__2;
14619  double ret_val, d__1;
14620 
14621  /* Local variables */
14622  extern double fctl_(int *);
14623  double f;
14624  int i__;
14625  double p;
14626  int i0, i1;
14627  double fc;
14628 
14629 /* SQUARE OF CLEBSCH-GORDAN COEFFICIENT (L,LAMBDA,0,0;LP,0) */
14630 /* FOR INTEGER ARGUMENTS ONLY */
14631 /* NOTE THAT LAMBDA SHOULD BE SMALL, MAYBE @10 OR SO. */
14632 
14633 
14634  switch(n__) {
14635  case 1: goto L_threej2;
14636  }
14637 
14638  fc = (double) ((*lp << 1) + 1);
14639  goto L2;
14640 
14641 
14642 L_threej2:
14643 /* THIS ENTRY RETURNS THE SQUARED 3-J SYMBOL L LAMBDA LP */
14644 /* 0 0 0 */
14645 /* INSTEAD OF THE CLEBSCH-GORDAN COEFFICIENT */
14646 /* (LIMITATION TO INTEGER ARGUMENTS ONLY) */
14647 
14648 /* NOTE THAT THE THREE-J SYMBOLS ARE COMPLETELY SYMMETRIC IN THE */
14649 /* ARGUMENTS. IT WOULD BE ADVANTAGEOUS TO REORDER THE INPUT ARGUMENT */
14650 /* LIST SO THAT LAMBDA BECOMES THE SMALLEST OF THE 3 ARGUMENTS. */
14651  fc = 1.;
14652 L2:
14653  ret_val = 0.;
14654  if (*l + *lambda < *lp || *lambda + *lp < *l || *l + *lp < *lambda) {
14655  return ret_val;
14656  }
14657  if ((*l + *lp + *lambda) % 2 != 0) {
14658  return ret_val;
14659  }
14660  if (*l < 0 || *lp < 0 || *lambda < 0) {
14661  return ret_val;
14662  }
14663  f = 1. / (double) (*l + *lp + 1 - *lambda);
14664  if (*lambda == 0) {
14665  goto L22;
14666  }
14667  i1 = (*l + *lp + *lambda) / 2;
14668  i0 = (*l + *lp - *lambda) / 2 + 1;
14669  s__1 = i1;
14670  for (i__ = i0; i__ <= s__1; ++i__) {
14671 /* L20: */
14672  f = f * (double) i__ / (double) (((i__ << 1) + 1) << 1);
14673  }
14674 L22:
14675  s__1 = *lambda + *l - *lp;
14676  s__2 = *lambda + *lp - *l;
14677  p = fc * f * fctl_(&s__1) * fctl_(&s__2);
14678  s__1 = (*lambda + *l - *lp) / 2;
14679  s__2 = (*lambda + *lp - *l) / 2;
14680 /* Computing 2nd power */
14681  d__1 = fctl_(&s__1) * fctl_(&s__2);
14682  ret_val = p / (d__1 * d__1);
14683  return ret_val;
14684 } /* clebsqr_ */
14685 
14686 double clebsqr_(int *l, int *lambda, int *lp)
14687 {
14688  return clebsqr_0_(0, l, lambda, lp);
14689  }
14690 
14691 double threej2_(void)
14692 {
14693  return clebsqr_0_(1, (int *)0, (int *)0, (int *)0);
14694  }
14695 
14696 double fctl_(int *n)
14697 {
14698  /* System generated locals */
14699  int s__1;
14700  double ret_val, d__1;
14701 
14702  /* Local variables */
14703  int i__, j;
14704  double z__;
14705 
14706 
14707 
14708  ret_val = 1.;
14709  if (*n <= 1) {
14710  return ret_val;
14711  }
14712  if (*n > 15) {
14713  goto L20;
14714  }
14715  j = 1;
14716  s__1 = *n;
14717  for (i__ = 2; i__ <= s__1; ++i__) {
14718 /* L10: */
14719  j *= i__;
14720  }
14721  ret_val = (double) j;
14722  return ret_val;
14723 L20:
14724  z__ = (double) (*n + 1);
14725  d__1 = z__ - .5;
14726  ret_val = exp(-z__) * pow(z__, d__1) * ((((-2.294720936e-4 / z__ -
14727  .00268132716) / z__ + .003472222222) / z__ + .08333333333) / z__
14728  + 1.) * 2.506628274631;
14729  return ret_val;
14730 } /* fctl_ */
14731 #define ik1k0 (k1k0_1.ik1k0)
14732 
14733 double bgama_(double *fnu, double *t1, double *t2, double
14734  *eps, double *t3, double *t4, double *temp)
14735 {
14736  /* Initialized data */
14737 
14738  static double pi = 3.1415926535898;
14739  static double clight = 29979245800.;
14740  static double hbar = 1.0545887e-27;
14741  static double boltz = 1.380662e-16;
14742 
14743  /* System generated locals */
14744  double ret_val, d__1, d__2, d__3, d__4;
14745 
14746  /* Local variables */
14747  double omega, z__, k0, t0, bgambc, zp, xk1;
14748 
14749 /* SPECTRAL FUNCTION "EBC", FOR REFERENCE: */
14750 /* SEE "PHENOMENA INDUCED BY INTERMOLECULAR INTERACTIONS", */
14751 /* ED. G. BIRNBAUM; J. BORYSOW AND L. FROMMHOLD, P.67, (1985) */
14752 /* ============================================ */
14753 
14754 
14755 /* IF IK1K0=1 ONLY B-C; EBC OTHERWISE */
14756 
14757  omega = 2. * pi * clight * *fnu;
14758  t0 = hbar / (boltz * 2. * *temp);
14759 /* Computing 2nd power */
14760  d__1 = omega * *t1;
14761  z__ = sqrt((d__1 * d__1 + 1.) * (*t2 * *t2 + t0 * t0)) / *t1;
14762  if (z__ - 2. <= 0.) {
14763  goto L10;
14764  } else {
14765  goto L12;
14766  }
14767 L10:
14768 /* Computing 2nd power */
14769  d__2 = z__ / 3.75;
14770  d__1 = d__2 * d__2;
14771 /* Computing 2nd power */
14772  d__4 = z__ / 2.;
14773  d__3 = d__4 * d__4;
14774  xk1 = z__ * z__ * log(z__ / 2.) * ((((((3.2411e-4 * d__1 + .00301532) *
14775  d__1 + .02658733) * d__1 + .15084934) * d__1 + .51498869) * d__1
14776  + .87890594) * d__1 + .5) + ((((((-4.686e-5 * d__3 - .00110404) *
14777  d__3 - .01919402) * d__3 - .18156897) * d__3 - .67278579) * d__3
14778  + .15443144) * d__3 + 1.);
14779  goto L20;
14780 L12:
14781  d__1 = 2. / z__;
14782  xk1 = sqrt(z__) * exp(-z__) * ((((((-6.8245e-4 * d__1 + .00325614) * d__1
14783  - .00780353) * d__1 + .01504268) * d__1 - .0365562) * d__1 +
14784  .23498619) * d__1 + 1.25331414);
14785 L20:
14786 /* Computing 2nd power */
14787  d__1 = *t1 * omega;
14788  bgambc = *t1 / pi * exp(*t2 / *t1 + t0 * omega) * xk1 / (d__1 * d__1 + 1.)
14789  ;
14790  if (ik1k0 == 1) {
14791  goto L55;
14792  }
14793 /* Computing 2nd power */
14794  d__1 = omega * *t4;
14795  zp = sqrt((d__1 * d__1 + 1.) * (*t3 * *t3 + t0 * t0)) / *t4;
14796  if (zp - 2. <= 0.) {
14797  goto L22;
14798  } else {
14799  goto L24;
14800  }
14801 L22:
14802 /* Computing 2nd power */
14803  d__2 = zp / 3.75;
14804  d__1 = d__2 * d__2;
14805 /* Computing 2nd power */
14806  d__4 = zp / 2.;
14807  d__3 = d__4 * d__4;
14808  k0 = -log(zp / 2.) * ((((((.0045813 * d__1 + .0360768) * d__1 + .2659732)
14809  * d__1 + 1.2067492) * d__1 + 3.0899424) * d__1 + 3.5156229) *
14810  d__1 + 1.) + ((((((7.4e-6 * d__3 + 1.075e-4) * d__3 + .00262698) *
14811  d__3 + .0348859) * d__3 + .23069756) * d__3 + .4227842) * d__3 -
14812  .57721566);
14813  goto L30;
14814 L24:
14815  d__1 = 2. / zp;
14816  k0 = exp(-zp) * ((((((5.3208e-4 * d__1 - .0025154) * d__1 + .00587872) *
14817  d__1 - .01062446) * d__1 + .02189568) * d__1 - .07832358) * d__1
14818  + 1.25331414) / sqrt(zp);
14819 L30:
14820  ret_val = (bgambc + *eps * (*t3 / pi) * exp(*t3 / *t4 + t0 * omega) * k0)
14821  / (*eps + 1.);
14822  goto L66;
14823 L55:
14824  ret_val = bgambc;
14825 L66:
14826  return ret_val;
14827 } /* bgama_ */
14828 
14829 #undef ik1k0
14830 
14831 
14832 /* Subroutine */ int spline_0_(int n__, int *l, int *m, int *k,
14833  double *eps, double *x, double *y, double *t,
14834  double *ss, double *si, int *nr, double *s2)
14835 {
14836  /* System generated locals */
14837  int s__1, s__2;
14838  double d__1, d__2;
14839 
14840  /* Local variables */
14841  double epsi, prod, h__;
14842  int i__, j, n;
14843  double w, omega;
14844  int n1;
14845  double s3;
14846  int ic;
14847  double sm, delsqs, ht1, ht2, ss2, yp1, eta, ypn;
14848 
14849 
14850 
14851 /* SPLINE INTERPOLATION AND QUADRATURE, THIRD ORDER AFTER GREVILLE. */
14852 /* INPUT ARGUMENTS L...Y, OUTPUT SS...NR. */
14853 /* L DATA POINTS X(1), Y(1) ... X(L),Y(L) */
14854 /* EPS=ERROR CRITERION, TYPICALLY EPS=1.D-5 FOR 5 DECI. PLACES ACCURA */
14855 /* M ARGUMENTS T(1)..T(M) FOR WHICH FUNCTION VALUES SS(1)..SS(M), FOR */
14856 /* K=0; OR FIRST OR SECOND DERIVATIVE FOR K=1 OR -1, RESPECTIVELY. */
14857 /* NOTE THAT M HAS TO BE AT LEAST EQUAL TO 1. */
14858 /* SI=INTEGRAL (OVER WHOLE INTERVAL) FOR K=2 ONLY. */
14859 /* FOR 'NATURAL' SPLINE FUNCTIONS, S2(1)=S2(L)=0. MUST BE INPUT*NOTE* */
14860 /* N0 INDICATES THE NUMBER OF OUT-OF-RANGE CALLS. X(1)<T(I)<X(L) */
14861 /* EXTRAPOLATE WITH CAUTION. (ASSUMPTION D2Y/DX2 = 0.) */
14862 /* S2(I) IS THE 2ND DERIVATIVE AT X=X(I) AND IS COMPUTED INTERNALLY. */
14863 /* DIMENSION X(L),Y(L),T(M),SS(M),S2(L) */
14864 
14865  /* Parameter adjustments */
14866  --x;
14867  --y;
14868  --t;
14869  --ss;
14870  --s2;
14871 
14872  /* Function Body */
14873  switch(n__) {
14874  case 1: goto L_ixpolat;
14875  }
14876 
14877  n = *l;
14878  n1 = n - 1;
14879  *nr = 0;
14880 /* L4: */
14881  s__1 = n1;
14882  for (i__ = 2; i__ <= s__1; ++i__) {
14883 /* L52: */
14884  s__2 = i__ - 1;
14885  s2[i__] = 3. * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) - (y[
14886  s__2 + 1] - y[s__2]) / (x[s__2 + 1] - x[s__2])) / (x[i__ + 1]
14887  - x[i__ - 1]) / 1.5;
14888  }
14889  omega = 1.0717968;
14890  ic = 0;
14891 /* 'NATURAL' SPLINE FUNCTIONS OF THIRD ORDER. */
14892  s2[1] = 0.;
14893  s2[n] = 0.;
14894 L5:
14895  eta = 0.;
14896  ++ic;
14897  sm = abs(s2[1]);
14898  s__2 = n;
14899  for (i__ = 2; i__ <= s__2; ++i__) {
14900  if ((d__1 = s2[i__], abs(d__1)) > sm) {
14901  sm = (d__2 = s2[i__], abs(d__2));
14902  }
14903 /* L25: */
14904  }
14905  epsi = *eps * sm;
14906 /* L6: */
14907  s__2 = n1;
14908  for (i__ = 2; i__ <= s__2; ++i__) {
14909 /* L7: */
14910  s__1 = i__ - 1;
14911  w = (3. * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) - (y[s__1 +
14912  1] - y[s__1]) / (x[s__1 + 1] - x[s__1])) / (x[i__ + 1] - x[
14913  i__ - 1]) - (x[i__] - x[i__ - 1]) * .5 / (x[i__ + 1] - x[i__
14914  - 1]) * s2[i__ - 1] - (.5 - (x[i__] - x[i__ - 1]) * .5 / (x[
14915  i__ + 1] - x[i__ - 1])) * s2[i__ + 1] - s2[i__]) * omega;
14916 /* L8: */
14917  if (abs(w) - eta <= 0.) {
14918  goto L10;
14919  } else {
14920  goto L9;
14921  }
14922 L9:
14923  eta = abs(w);
14924 L10:
14925  s2[i__] += w;
14926  }
14927 /* L13: */
14928  if (eta - epsi >= 0.) {
14929  goto L5;
14930  } else {
14931  goto L14;
14932  }
14933 /* ENTRY IXPOLAT */
14934 
14935 L_ixpolat:
14936 /* THIS ENTRY USEFUL WHEN ITERATION PREVIOUSLY COMPLETED */
14937 
14938  n = *l;
14939  n1 = n - 1;
14940  *nr = 0;
14941  ic = -1;
14942 L14:
14943  if (*k - 2 != 0) {
14944  goto L15;
14945  } else {
14946  goto L20;
14947  }
14948 L15:
14949  s__2 = *m;
14950  for (j = 1; j <= s__2; ++j) {
14951 /* L16: */
14952  i__ = 1;
14953 /* L54: */
14954  if ((d__1 = t[j] - x[1]) < 0.) {
14955  goto L58;
14956  } else if (d__1 == 0) {
14957  goto L17;
14958  } else {
14959  goto L55;
14960  }
14961 L55:
14962  if ((d__1 = t[j] - x[n]) < 0.) {
14963  goto L57;
14964  } else if (d__1 == 0) {
14965  goto L59;
14966  } else {
14967  goto L158;
14968  }
14969 L56:
14970  if ((d__1 = t[j] - x[i__]) < 0.) {
14971  goto L60;
14972  } else if (d__1 == 0) {
14973  goto L17;
14974  } else {
14975  goto L57;
14976  }
14977 L57:
14978  ++i__;
14979  goto L56;
14980 
14981 L58:
14982  ++(*nr);
14983  ht1 = t[j] - x[1];
14984  ht2 = t[j] - x[2];
14985  yp1 = (y[cs__1 + 1] - y[cs__1]) / (x[cs__1 + 1] - x[cs__1]) + (x[1] -
14986  x[2]) * (s2[1] * 2. + s2[2]) / 6.;
14987  if (*k < 0) {
14988  goto L72;
14989  } else if (*k == 0) {
14990  goto L70;
14991  } else {
14992  goto L71;
14993  }
14994 L71:
14995  ss[j] = yp1 + ht1 * s2[1];
14996  goto L61;
14997 L70:
14998  ss[j] = y[1] + yp1 * ht1 + s2[1] * ht1 * ht1 / 2.;
14999  goto L61;
15000 L72:
15001  ss[j] = s2[i__];
15002  goto L61;
15003 L158:
15004  ht2 = t[j] - x[n];
15005  ht1 = t[j] - x[n1];
15006  ++(*nr);
15007  ypn = (y[n1 + 1] - y[n1]) / (x[n1 + 1] - x[n1]) + (x[n] - x[n1]) * (
15008  s2[n1] + s2[n] * 2.) / 6.;
15009  if (*k < 0) {
15010  goto L82;
15011  } else if (*k == 0) {
15012  goto L80;
15013  } else {
15014  goto L81;
15015  }
15016 L81:
15017  ss[j] = ypn + ht2 * s2[n];
15018  goto L61;
15019 L80:
15020  ss[j] = y[n] + ypn * ht2 + s2[n] * ht2 * ht2 / 2.;
15021  goto L61;
15022 L82:
15023  ss[j] = s2[n];
15024  goto L61;
15025 
15026 L59:
15027  i__ = n;
15028 L60:
15029  --i__;
15030 L17:
15031  ht1 = t[j] - x[i__];
15032  ht2 = t[j] - x[i__ + 1];
15033  prod = ht1 * ht2;
15034  s3 = (s2[i__ + 1] - s2[i__]) / (x[i__ + 1] - x[i__]);
15035  ss2 = s2[i__] + ht1 * s3;
15036  delsqs = (s2[i__] + s2[i__ + 1] + ss2) / 6.;
15037 
15038  if (*k < 0) {
15039  goto L43;
15040  } else if (*k == 0) {
15041  goto L41;
15042  } else {
15043  goto L42;
15044  }
15045 L41:
15046  ss[j] = y[i__] + ht1 * ((y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]))
15047  + prod * delsqs;
15048  goto L61;
15049 L42:
15050  ss[j] = (y[i__ + 1] - y[i__]) / (x[i__ + 1] - x[i__]) + (ht1 + ht2) *
15051  delsqs + prod * s3 / 6.;
15052  goto L61;
15053 L43:
15054  ss[j] = ss2;
15055 L61:
15056  ;
15057  }
15058 L20:
15059  *si = 0.;
15060 
15061  s__2 = n1;
15062  for (i__ = 1; i__ <= s__2; ++i__) {
15063  h__ = x[i__ + 1] - x[i__];
15064 /* L62: */
15065 /* Computing 3rd power */
15066  d__1 = h__;
15067  *si = *si + h__ * .5 * (y[i__] + y[i__ + 1]) - d__1 * (d__1 * d__1) *
15068  (s2[i__] + s2[i__ + 1]) / 24.;
15069  }
15070 
15071  if (*k == 2) {
15072  *nr = ic;
15073  }
15074 
15075  return 0;
15076 } /* spline_ */
15077 
15078 /* Subroutine */ int spline_(int *l, int *m, int *k,
15079  double *eps, double *x, double *y, double *t,
15080  double *ss, double *si, int *nr, double *s2)
15081 {
15082  return spline_0_(0, l, m, k, eps, x, y, t, ss, si, nr, s2);
15083  }
15084 
15085 /* Subroutine */ int ixpolat_(int *l, int *m, int *k,
15086  double *eps, double *x, double *y, double *t,
15087  double *ss, double *si, int *nr, double *s2)
15088 {
15089  return spline_0_(1, l, m, k, eps, x, y, t, ss, si, nr, s2);
15090  }
15091 
15092 
15093 // ---------------------- end of Borysow N2N2 F77 code -------------------------
15094 
15095 
15096 // ---------------------- begin of monortm CKD F77 code -------------------------
15097 
15098 
15099 /* Common Block Declarations */
15100 
15101 struct fh2oa_1_ {
15102  double fh2o[2003];
15103 };
15104 
15105 #define fh2oa_1 (*(struct fh2oa_1_ *) &fh2oa_)
15106 
15107 struct fh2ob_1_ {
15108  double v1, v2, dv;
15109  int nptfh2o;
15110 };
15111 struct fh2ob_2_ {
15112  double v1, v2, dv;
15113  int npts;
15114 };
15115 
15116 #define fh2ob_1 (*(struct fh2ob_1_ *) &fh2ob_)
15117 #define fh2ob_2 (*(struct fh2ob_2_ *) &fh2ob_)
15118 
15119 struct sh2oa_1_ {
15120  double swv296[2003];
15121 };
15122 
15123 #define sh2oa_1 (*(struct sh2oa_1_ *) &sh2oa_)
15124 
15125 struct sh2ob_1_ {
15126  double v1, v2, dv;
15128 };
15129 struct sh2ob_2_ {
15130  double v1, v2, dv;
15131  int npts;
15132 };
15133 
15134 #define sh2ob_1 (*(struct sh2ob_1_ *) &sh2ob_)
15135 #define sh2ob_2 (*(struct sh2ob_2_ *) &sh2ob_)
15136 
15137 struct s260a_1_ {
15138  double swv260[2003];
15139 };
15140 
15141 #define s260a_1 (*(struct s260a_1_ *) &s260a_)
15142 
15143 struct s260b_1_ {
15144  double v1___, v2___, dv___;
15146 };
15147 struct s260b_2_ {
15148  double v1, v2, dv;
15149  int npts;
15150 };
15151 
15152 #define s260b_1 (*(struct s260b_1_ *) &s260b_)
15153 #define s260b_2 (*(struct s260b_2_ *) &s260b_)
15154 
15155 struct consts_1_ {
15158 };
15159 
15160 #define consts_1 (*(struct consts_1_ *) &consts_)
15161 
15162 /* Initialized data */
15163 
15164 struct s_fh2oa_ {
15165  double e_1[2003];
15166  } fh2oa_ = { {.012859, .011715, .011038, .011715, .012859, .015326,
15167  .016999, .018321, .019402, .01957, .019432, .017572, .01676,
15168  .01548, .013984, .012266, .010467, .0094526, .0080485, .0069484,
15169  .0061416, .0050941, .0044836, .0038133, .0034608, .0031487,
15170  .0024555, .0020977, .0017266, .001492, .0012709, 9.8081e-4,
15171  8.5063e-4, 6.8822e-4, 5.3809e-4, 4.4679e-4, 3.3774e-4, 2.7979e-4,
15172  2.1047e-4, 1.6511e-4, 1.2993e-4, 9.3033e-5, 7.436e-5, 5.6428e-5,
15173  4.5442e-5, 3.4575e-5, 2.7903e-5, 2.1374e-5, 1.6075e-5, 1.3022e-5,
15174  1.0962e-5, 8.5959e-6, 6.9125e-6, 5.3808e-6, 4.3586e-6, 3.6394e-6,
15175  2.9552e-6, 2.3547e-6, 1.8463e-6, 1.6036e-6, 1.3483e-6, 1.1968e-6,
15176  1.0333e-6, 8.4484e-7, 6.7195e-7, 5.0947e-7, 4.2343e-7, 3.4453e-7,
15177  2.783e-7, 2.3063e-7, 1.9951e-7, 1.7087e-7, 1.4393e-7, 1.2575e-7,
15178  1.075e-7, 8.2325e-8, 5.7524e-8, 4.4482e-8, 3.8106e-8, 3.4315e-8,
15179  2.9422e-8, 2.5069e-8, 2.2402e-8, 1.9349e-8, 1.6152e-8, 1.2208e-8,
15180  8.966e-9, 7.1322e-9, 6.1028e-9, 5.2938e-9, 4.535e-9, 3.4977e-9,
15181  2.9511e-9, 2.4734e-9, 2.0508e-9, 1.8507e-9, 1.6373e-9, 1.5171e-9,
15182  1.3071e-9, 1.2462e-9, 1.2148e-9, 1.259e-9, 1.3153e-9, 1.3301e-9,
15183  1.4483e-9, 1.6944e-9, 2.0559e-9, 2.2954e-9, 2.6221e-9, 3.2606e-9,
15184  4.2392e-9, 5.2171e-9, 6.2553e-9, 8.2548e-9, 9.5842e-9, 1.128e-8,
15185  1.3628e-8, 1.7635e-8, 2.1576e-8, 2.4835e-8, 3.0014e-8, 3.8485e-8,
15186  4.744e-8, 5.5202e-8, 7.0897e-8, 9.6578e-8, 1.3976e-7, 1.8391e-7,
15187  2.3207e-7, 2.996e-7, 4.0408e-7, 5.926e-7, 7.8487e-7, 1.0947e-6,
15188  1.4676e-6, 1.9325e-6, 2.6587e-6, 3.4534e-6, 4.4376e-6, 5.8061e-6,
15189  7.0141e-6, 8.4937e-6, 1.0186e-5, 1.2034e-5, 1.3837e-5, 1.6595e-5,
15190  1.9259e-5, 2.162e-5, 2.3681e-5, 2.7064e-5, 3.251e-5, 3.546e-5,
15191  3.9109e-5, 4.2891e-5, 4.7757e-5, 5.0981e-5, 5.0527e-5, 4.8618e-5,
15192  4.4001e-5, 3.7982e-5, 3.2667e-5, 2.7794e-5, 2.491e-5, 2.4375e-5,
15193  2.7316e-5, 3.2579e-5, 3.5499e-5, 3.801e-5, 4.1353e-5, 4.3323e-5,
15194  4.3004e-5, 3.979e-5, 3.7718e-5, 3.636e-5, 3.2386e-5, 2.7409e-5,
15195  2.3626e-5, 2.0631e-5, 1.8371e-5, 1.5445e-5, 1.2989e-5, 1.1098e-5,
15196  9.6552e-6, 8.0649e-6, 7.2365e-6, 5.9137e-6, 5.2759e-6, 4.886e-6,
15197  4.1321e-6, 3.5918e-6, 2.764e-6, 2.4892e-6, 2.1018e-6, 1.7848e-6,
15198  1.5855e-6, 1.3569e-6, 1.1986e-6, 9.4693e-7, 7.4097e-7, 6.3443e-7,
15199  4.8131e-7, 4.0942e-7, 3.3316e-7, 2.8488e-7, 2.3461e-7, 1.7397e-7,
15200  1.4684e-7, 1.0953e-7, 8.5396e-8, 6.9261e-8, 5.4001e-8, 4.543e-8,
15201  3.2791e-8, 2.5995e-8, 2.0225e-8, 1.571e-8, 1.3027e-8, 1.0229e-8,
15202  8.5277e-9, 6.5249e-9, 5.0117e-9, 3.9906e-9, 3.2332e-9, 2.7847e-9,
15203  2.457e-9, 2.3359e-9, 2.0599e-9, 1.8436e-9, 1.6559e-9, 1.491e-9,
15204  1.2794e-9, 9.8229e-10, 8.0054e-10, 6.0769e-10, 4.5646e-10,
15205  3.3111e-10, 2.4428e-10, 1.8007e-10, 1.3291e-10, 9.7974e-11,
15206  7.8271e-11, 6.3833e-11, 5.4425e-11, 4.6471e-11, 4.0209e-11,
15207  3.5227e-11, 3.1212e-11, 2.884e-11, 2.7762e-11, 2.7935e-11,
15208  3.2012e-11, 3.9525e-11, 5.0303e-11, 6.8027e-11, 9.3954e-11,
15209  1.2986e-10, 1.8478e-10, 2.5331e-10, 3.4827e-10, 4.6968e-10,
15210  6.238e-10, 7.9106e-10, 1.0026e-9, 1.2102e-9, 1.4146e-9, 1.6154e-9,
15211  1.751e-9, 1.8575e-9, 1.8742e-9, 1.87e-9, 1.8582e-9, 1.9657e-9,
15212  2.1204e-9, 2.0381e-9, 2.0122e-9, 2.0436e-9, 2.1213e-9, 2.0742e-9,
15213  1.987e-9, 2.0465e-9, 2.1556e-9, 2.2222e-9, 2.1977e-9, 2.1047e-9,
15214  1.9334e-9, 1.7357e-9, 1.5754e-9, 1.4398e-9, 1.4018e-9, 1.5459e-9,
15215  1.7576e-9, 2.1645e-9, 2.948e-9, 4.4439e-9, 5.8341e-9, 8.0757e-9,
15216  1.1658e-8, 1.6793e-8, 2.2694e-8, 2.9468e-8, 3.9278e-8, 5.2145e-8,
15217  6.4378e-8, 7.7947e-8, 8.5321e-8, 9.7848e-8, 1.0999e-7, 1.1489e-7,
15218  1.2082e-7, 1.2822e-7, 1.4053e-7, 1.5238e-7, 1.5454e-7, 1.5018e-7,
15219  1.4048e-7, 1.2359e-7, 1.0858e-7, 9.3486e-8, 8.1638e-8, 7.769e-8,
15220  8.4625e-8, 1.0114e-7, 1.143e-7, 1.2263e-7, 1.3084e-7, 1.338e-7,
15221  1.3573e-7, 1.3441e-7, 1.2962e-7, 1.2638e-7, 1.1934e-7, 1.1371e-7,
15222  1.0871e-7, 9.8843e-8, 9.1877e-8, 9.105e-8, 9.3213e-8, 9.2929e-8,
15223  1.0155e-7, 1.1263e-7, 1.237e-7, 1.3636e-7, 1.54e-7, 1.7656e-7,
15224  2.1329e-7, 2.3045e-7, 2.5811e-7, 2.9261e-7, 3.4259e-7, 4.077e-7,
15225  4.8771e-7, 5.8081e-7, 7.2895e-7, 8.7482e-7, 1.0795e-6, 1.3384e-6,
15226  1.7208e-6, 2.0677e-6, 2.5294e-6, 3.1123e-6, 3.79e-6, 4.7752e-6,
15227  5.6891e-6, 6.6261e-6, 7.6246e-6, 8.773e-6, 9.6672e-6, 1.098e-5,
15228  1.1287e-5, 1.167e-5, 1.1635e-5, 1.1768e-5, 1.2039e-5, 1.2253e-5,
15229  1.3294e-5, 1.4005e-5, 1.3854e-5, 1.342e-5, 1.3003e-5, 1.2645e-5,
15230  1.1715e-5, 1.1258e-5, 1.1516e-5, 1.2494e-5, 1.3655e-5, 1.4931e-5,
15231  1.4649e-5, 1.3857e-5, 1.312e-5, 1.1791e-5, 1.0637e-5, 8.276e-6,
15232  6.5821e-6, 5.1959e-6, 4.0158e-6, 3.0131e-6, 2.0462e-6, 1.4853e-6,
15233  1.0365e-6, 7.3938e-7, 4.9752e-7, 3.4148e-7, 2.4992e-7, 1.8363e-7,
15234  1.4591e-7, 1.138e-7, 9.0588e-8, 7.3697e-8, 6.0252e-8, 5.1868e-8,
15235  4.266e-8, 3.6163e-8, 3.2512e-8, 2.9258e-8, 2.4238e-8, 2.1209e-8,
15236  1.6362e-8, 1.3871e-8, 1.2355e-8, 9.694e-9, 7.7735e-9, 6.2278e-9,
15237  5.2282e-9, 4.3799e-9, 3.5545e-9, 2.7527e-9, 2.095e-9, 1.6344e-9,
15238  1.2689e-9, 1.0403e-9, 8.488e-10, 6.3461e-10, 4.7657e-10,
15239  3.522e-10, 2.7879e-10, 2.3021e-10, 1.6167e-10, 1.1732e-10,
15240  8.9206e-11, 7.0596e-11, 5.831e-11, 4.4084e-11, 3.1534e-11,
15241  2.5068e-11, 2.2088e-11, 2.2579e-11, 2.2637e-11, 2.5705e-11,
15242  3.2415e-11, 4.6116e-11, 6.5346e-11, 9.4842e-11, 1.2809e-10,
15243  1.8211e-10, 2.4052e-10, 3.027e-10, 3.5531e-10, 4.2402e-10,
15244  4.673e-10, 4.7942e-10, 4.6813e-10, 4.5997e-10, 4.5788e-10,
15245  4.0311e-10, 3.7367e-10, 3.3149e-10, 2.9281e-10, 2.5231e-10,
15246  2.1152e-10, 1.9799e-10, 1.8636e-10, 1.9085e-10, 2.0786e-10,
15247  2.2464e-10, 2.3785e-10, 2.5684e-10, 2.7499e-10, 2.6962e-10,
15248  2.6378e-10, 2.6297e-10, 2.6903e-10, 2.7035e-10, 2.5394e-10,
15249  2.5655e-10, 2.7184e-10, 2.9013e-10, 3.0585e-10, 3.0791e-10,
15250  3.1667e-10, 3.4343e-10, 3.7365e-10, 4.0269e-10, 4.726e-10,
15251  5.6584e-10, 6.9791e-10, 8.6569e-10, 1.0393e-9, 1.2067e-9,
15252  1.5047e-9, 1.8583e-9, 2.2357e-9, 2.6498e-9, 3.2483e-9, 3.9927e-9,
15253  4.6618e-9, 5.5555e-9, 6.6609e-9, 8.2139e-9, 1.0285e-8, 1.3919e-8,
15254  1.8786e-8, 2.515e-8, 3.313e-8, 4.5442e-8, 6.337e-8, 9.0628e-8,
15255  1.2118e-7, 1.5927e-7, 2.1358e-7, 2.7825e-7, 3.7671e-7, 4.4894e-7,
15256  5.4442e-7, 6.224e-7, 7.3004e-7, 8.3384e-7, 8.7933e-7, 8.808e-7,
15257  8.6939e-7, 8.6541e-7, 8.2055e-7, 7.7278e-7, 7.5989e-7, 8.6909e-7,
15258  9.7945e-7, 1.0394e-6, 1.0646e-6, 1.1509e-6, 1.2017e-6, 1.1915e-6,
15259  1.1259e-6, 1.1549e-6, 1.1938e-6, 1.2356e-6, 1.2404e-6, 1.1716e-6,
15260  1.1149e-6, 1.0073e-6, 8.9845e-7, 7.6639e-7, 6.1517e-7, 5.0887e-7,
15261  4.1269e-7, 3.2474e-7, 2.5698e-7, 1.8893e-7, 1.4009e-7, 1.034e-7,
15262  7.7724e-8, 5.7302e-8, 4.2178e-8, 2.9603e-8, 2.1945e-8, 1.6301e-8,
15263  1.2806e-8, 1.0048e-8, 7.897e-9, 6.1133e-9, 4.9054e-9, 4.1985e-9,
15264  3.6944e-9, 3.2586e-9, 2.7362e-9, 2.3647e-9, 2.1249e-9, 1.8172e-9,
15265  1.6224e-9, 1.5158e-9, 1.2361e-9, 1.0682e-9, 9.2312e-10, 7.922e-10,
15266  6.8174e-10, 5.6147e-10, 4.8268e-10, 4.1534e-10, 3.3106e-10,
15267  2.8275e-10, 2.4584e-10, 2.0742e-10, 1.784e-10, 1.4664e-10,
15268  1.239e-10, 1.0497e-10, 8.5038e-11, 6.7008e-11, 5.6355e-11,
15269  4.3323e-11, 3.6914e-11, 3.2262e-11, 3.0749e-11, 3.0318e-11,
15270  2.9447e-11, 2.9918e-11, 3.0668e-11, 3.1315e-11, 3.0329e-11,
15271  2.8259e-11, 2.6065e-11, 2.3578e-11, 2.0469e-11, 1.6908e-11,
15272  1.4912e-11, 1.1867e-11, 9.973e-12, 8.1014e-12, 6.7528e-12,
15273  6.3133e-12, 5.8599e-12, 6.0145e-12, 6.5105e-12, 7.0537e-12,
15274  7.4973e-12, 7.8519e-12, 8.5039e-12, 9.1995e-12, 1.0694e-11,
15275  1.1659e-11, 1.2685e-11, 1.3087e-11, 1.3222e-11, 1.2634e-11,
15276  1.1077e-11, 9.6259e-12, 8.3202e-12, 7.4857e-12, 6.8069e-12,
15277  6.7496e-12, 7.3116e-12, 8.0171e-12, 8.6394e-12, 9.2659e-12,
15278  1.0048e-11, 1.0941e-11, 1.2226e-11, 1.3058e-11, 1.5193e-11,
15279  1.8923e-11, 2.3334e-11, 2.8787e-11, 3.6693e-11, 4.8295e-11,
15280  6.426e-11, 8.8269e-11, 1.1865e-10, 1.5961e-10, 2.0605e-10,
15281  2.7349e-10, 3.7193e-10, 4.8216e-10, 6.1966e-10, 7.715e-10,
15282  1.0195e-9, 1.2859e-9, 1.6535e-9, 2.0316e-9, 2.3913e-9, 3.0114e-9,
15283  3.7495e-9, 4.6504e-9, 5.9145e-9, 7.684e-9, 1.0304e-8, 1.301e-8,
15284  1.6441e-8, 2.1475e-8, 2.5892e-8, 2.9788e-8, 3.382e-8, 4.0007e-8,
15285  4.4888e-8, 4.5765e-8, 4.6131e-8, 4.6239e-8, 4.4849e-8, 4.0729e-8,
15286  3.6856e-8, 3.6164e-8, 3.7606e-8, 4.1457e-8, 4.375e-8, 5.115e-8,
15287  5.6054e-8, 6.1586e-8, 6.4521e-8, 6.6494e-8, 6.9024e-8, 6.8893e-8,
15288  7.0901e-8, 6.976e-8, 7.1485e-8, 7.074e-8, 7.3764e-8, 7.6618e-8,
15289  8.4182e-8, 9.3838e-8, 1.0761e-7, 1.2851e-7, 1.4748e-7, 1.8407e-7,
15290  2.2109e-7, 2.6392e-7, 2.9887e-7, 3.4493e-7, 4.0336e-7, 4.3551e-7,
15291  4.9231e-7, 5.0728e-7, 5.3781e-7, 5.3285e-7, 5.4496e-7, 5.5707e-7,
15292  5.6944e-7, 6.1123e-7, 6.4317e-7, 6.4581e-7, 6.1999e-7, 6.0191e-7,
15293  5.7762e-7, 5.7241e-7, 5.7013e-7, 6.016e-7, 6.6905e-7, 7.4095e-7,
15294  8.2121e-7, 8.0947e-7, 7.6145e-7, 7.2193e-7, 6.3722e-7, 5.4316e-7,
15295  4.2186e-7, 3.2528e-7, 2.5207e-7, 1.8213e-7, 1.2658e-7, 8.6746e-8,
15296  6.0216e-8, 4.1122e-8, 2.8899e-8, 2.174e-8, 1.799e-8, 1.5593e-8,
15297  1.397e-8, 1.2238e-8, 1.0539e-8, 9.2386e-9, 7.8481e-9, 6.8704e-9,
15298  5.7615e-9, 5.0434e-9, 4.6886e-9, 4.377e-9, 3.9768e-9, 3.5202e-9,
15299  3.1854e-9, 2.9009e-9, 2.5763e-9, 2.2135e-9, 1.9455e-9, 1.6248e-9,
15300  1.3368e-9, 1.0842e-9, 8.4254e-10, 6.7414e-10, 5.4667e-10,
15301  4.5005e-10, 3.4932e-10, 2.6745e-10, 2.2053e-10, 1.8162e-10,
15302  1.4935e-10, 1.1618e-10, 9.1888e-11, 8.0672e-11, 6.8746e-11,
15303  6.2668e-11, 5.5715e-11, 4.5074e-11, 3.7669e-11, 3.2082e-11,
15304  2.8085e-11, 2.4838e-11, 1.9791e-11, 1.6964e-11, 1.3887e-11,
15305  1.1179e-11, 9.7499e-12, 7.8255e-12, 6.3698e-12, 5.3265e-12,
15306  4.6588e-12, 4.4498e-12, 3.9984e-12, 3.7513e-12, 3.7176e-12,
15307  3.9148e-12, 4.2702e-12, 5.009e-12, 6.5801e-12, 8.7787e-12,
15308  1.2718e-11, 1.8375e-11, 2.5304e-11, 3.5403e-11, 4.8842e-11,
15309  6.484e-11, 8.0911e-11, 1.0136e-10, 1.2311e-10, 1.4203e-10,
15310  1.5869e-10, 1.8093e-10, 2.137e-10, 2.5228e-10, 2.8816e-10,
15311  3.4556e-10, 3.986e-10, 4.435e-10, 4.776e-10, 5.2357e-10,
15312  6.0827e-10, 6.3635e-10, 6.5886e-10, 6.8753e-10, 7.2349e-10,
15313  7.2789e-10, 6.8232e-10, 6.6081e-10, 6.4232e-10, 6.3485e-10,
15314  6.4311e-10, 7.2235e-10, 7.7263e-10, 8.1668e-10, 9.0324e-10,
15315  9.7643e-10, 1.0535e-9, 1.0195e-9, 1.0194e-9, 1.0156e-9,
15316  9.6792e-10, 9.2725e-10, 8.7347e-10, 8.4484e-10, 8.2647e-10,
15317  8.4363e-10, 9.1261e-10, 1.0051e-9, 1.1511e-9, 1.4037e-9,
15318  1.8066e-9, 2.4483e-9, 3.2739e-9, 4.3194e-9, 5.6902e-9, 7.7924e-9,
15319  9.7376e-9, 1.2055e-8, 1.4303e-8, 1.6956e-8, 1.9542e-8, 2.2233e-8,
15320  2.5186e-8, 2.7777e-8, 2.8943e-8, 2.8873e-8, 2.9417e-8, 2.7954e-8,
15321  2.7524e-8, 2.704e-8, 3.1254e-8, 3.6843e-8, 3.7797e-8, 3.8713e-8,
15322  4.0135e-8, 4.2824e-8, 4.3004e-8, 4.0279e-8, 4.2781e-8, 4.522e-8,
15323  4.8948e-8, 5.0172e-8, 4.8499e-8, 4.7182e-8, 4.2204e-8, 3.7701e-8,
15324  3.0972e-8, 2.4654e-8, 1.9543e-8, 1.4609e-8, 1.1171e-8, 8.3367e-9,
15325  6.3791e-9, 5.079e-9, 4.0655e-9, 3.3658e-9, 2.7882e-9, 2.4749e-9,
15326  2.2287e-9, 2.0217e-9, 1.8191e-9, 1.5897e-9, 1.4191e-9, 1.2448e-9,
15327  1.0884e-9, 9.3585e-10, 7.9429e-10, 7.3214e-10, 6.5008e-10,
15328  5.7549e-10, 5.43e-10, 4.7251e-10, 4.3451e-10, 3.8446e-10,
15329  3.5589e-10, 3.4432e-10, 2.8209e-10, 2.462e-10, 2.1278e-10,
15330  1.8406e-10, 1.6314e-10, 1.3261e-10, 1.1696e-10, 9.6865e-11,
15331  7.6814e-11, 6.6411e-11, 5.0903e-11, 4.0827e-11, 3.0476e-11,
15332  2.323e-11, 1.7707e-11, 1.3548e-11, 1.0719e-11, 9.3026e-12,
15333  8.7967e-12, 8.3136e-12, 7.3918e-12, 6.5293e-12, 5.9243e-12,
15334  5.3595e-12, 3.5266e-12, 2.2571e-12, 1.615e-12, 1.1413e-12,
15335  8.4998e-13, 7.0803e-13, 5.1747e-13, 4.0694e-13, 3.6528e-13,
15336  3.367e-13, 3.1341e-13, 2.939e-13, 2.868e-13, 3.1283e-13,
15337  3.7294e-13, 5.0194e-13, 6.7919e-13, 1.0455e-12, 1.523e-12,
15338  2.3932e-12, 3.4231e-12, 5.0515e-12, 7.3193e-12, 9.9406e-12,
15339  1.2193e-11, 1.4742e-11, 1.9269e-11, 2.1816e-11, 2.275e-11,
15340  2.2902e-11, 2.3888e-11, 2.4902e-11, 2.216e-11, 2.0381e-11,
15341  1.9903e-11, 2.0086e-11, 1.9304e-11, 2.0023e-11, 2.2244e-11,
15342  2.545e-11, 3.1228e-11, 3.456e-11, 3.6923e-11, 3.7486e-11,
15343  3.8124e-11, 3.8317e-11, 3.4737e-11, 3.3037e-11, 3.1724e-11,
15344  2.984e-11, 2.8301e-11, 2.5857e-11, 2.3708e-11, 1.9452e-11,
15345  1.6232e-11, 1.5174e-11, 1.4206e-11, 1.4408e-11, 1.5483e-11,
15346  1.8642e-11, 2.3664e-11, 3.0181e-11, 4.016e-11, 5.2287e-11,
15347  7.2754e-11, 1.0511e-10, 1.4531e-10, 2.0998e-10, 2.6883e-10,
15348  3.3082e-10, 4.2638e-10, 5.3132e-10, 6.3617e-10, 7.1413e-10,
15349  8.5953e-10, 9.9715e-10, 1.0796e-9, 1.0978e-9, 1.1052e-9,
15350  1.1095e-9, 1.0641e-9, 9.7881e-10, 9.659e-10, 1.0332e-9, 1.1974e-9,
15351  1.3612e-9, 1.5829e-9, 1.8655e-9, 2.1465e-9, 2.4779e-9, 2.737e-9,
15352  2.9915e-9, 3.3037e-9, 3.6347e-9, 3.9587e-9, 4.4701e-9, 5.0122e-9,
15353  5.8044e-9, 6.1916e-9, 6.9613e-9, 7.7863e-9, 8.282e-9, 9.4359e-9,
15354  9.7387e-9, 1.0656e-8, 1.0746e-8, 1.121e-8, 1.1905e-8, 1.2194e-8,
15355  1.3145e-8, 1.3738e-8, 1.3634e-8, 1.3011e-8, 1.2511e-8, 1.1805e-8,
15356  1.2159e-8, 1.239e-8, 1.3625e-8, 1.5678e-8, 1.7886e-8, 1.9933e-8,
15357  1.9865e-8, 1.9e-8, 1.7812e-8, 1.5521e-8, 1.2593e-8, 9.5635e-9,
15358  7.2987e-9, 5.2489e-9, 3.5673e-9, 2.4206e-9, 1.6977e-9, 1.2456e-9,
15359  9.3744e-10, 7.8379e-10, 6.996e-10, 6.6451e-10, 6.8521e-10,
15360  7.4234e-10, 8.6658e-10, 9.4972e-10, 1.0791e-9, 1.2359e-9,
15361  1.3363e-9, 1.5025e-9, 1.5368e-9, 1.6152e-9, 1.6184e-9, 1.6557e-9,
15362  1.7035e-9, 1.6916e-9, 1.7237e-9, 1.7175e-9, 1.6475e-9, 1.5335e-9,
15363  1.4272e-9, 1.3282e-9, 1.3459e-9, 1.4028e-9, 1.5192e-9, 1.7068e-9,
15364  1.9085e-9, 2.1318e-9, 2.102e-9, 1.9942e-9, 1.8654e-9, 1.6391e-9,
15365  1.3552e-9, 1.0186e-9, 7.854e-10, 5.7022e-10, 3.9247e-10,
15366  2.5441e-10, 1.6699e-10, 1.1132e-10, 6.8989e-11, 4.5255e-11,
15367  3.1106e-11, 2.3161e-11, 1.7618e-11, 1.438e-11, 1.1601e-11,
15368  9.7148e-12, 8.4519e-12, 6.5392e-12, 5.4113e-12, 4.7624e-12,
15369  4.0617e-12, 3.6173e-12, 2.8608e-12, 2.2724e-12, 1.7436e-12,
15370  1.3424e-12, 1.0358e-12, 7.3064e-13, 5.45e-13, 4.0551e-13,
15371  2.8642e-13, 2.1831e-13, 1.686e-13, 1.2086e-13, 1.015e-13,
15372  9.355e-14, 8.4105e-14, 7.3051e-14, 6.9796e-14, 7.9949e-14,
15373  1.0742e-13, 1.5639e-13, 2.1308e-13, 3.1226e-13, 4.6853e-13,
15374  6.6917e-13, 1.0088e-12, 1.4824e-12, 2.2763e-12, 3.3917e-12,
15375  4.4585e-12, 6.3187e-12, 8.4189e-12, 1.1302e-11, 1.3431e-11,
15376  1.5679e-11, 1.9044e-11, 2.2463e-11, 2.3605e-11, 2.3619e-11,
15377  2.3505e-11, 2.3805e-11, 2.2549e-11, 1.9304e-11, 1.8382e-11,
15378  1.7795e-11, 1.8439e-11, 1.9146e-11, 2.1966e-11, 2.6109e-11,
15379  3.1883e-11, 3.7872e-11, 4.3966e-11, 4.8789e-11, 5.3264e-11,
15380  5.9705e-11, 6.3744e-11, 7.0163e-11, 7.9114e-11, 8.8287e-11,
15381  9.9726e-11, 1.1498e-10, 1.37e-10, 1.6145e-10, 1.9913e-10,
15382  2.2778e-10, 2.6216e-10, 2.977e-10, 3.3405e-10, 3.7821e-10,
15383  3.9552e-10, 4.1322e-10, 4.0293e-10, 4.0259e-10, 3.8853e-10,
15384  3.7842e-10, 3.8551e-10, 4.4618e-10, 5.0527e-10, 5.0695e-10,
15385  5.1216e-10, 5.193e-10, 5.5794e-10, 5.332e-10, 5.2008e-10,
15386  5.6888e-10, 6.1883e-10, 6.9006e-10, 6.9505e-10, 6.6768e-10,
15387  6.329e-10, 5.6753e-10, 5.0327e-10, 3.983e-10, 3.1147e-10,
15388  2.4416e-10, 1.886e-10, 1.3908e-10, 9.9156e-11, 7.3779e-11,
15389  5.6048e-11, 4.2457e-11, 3.4505e-11, 2.9881e-11, 2.7865e-11,
15390  2.8471e-11, 3.1065e-11, 3.4204e-11, 3.914e-11, 4.3606e-11,
15391  4.9075e-11, 5.3069e-11, 5.5236e-11, 5.5309e-11, 5.3832e-11,
15392  5.3183e-11, 5.1783e-11, 5.2042e-11, 5.4422e-11, 5.5656e-11,
15393  5.4409e-11, 5.2659e-11, 5.1696e-11, 5.1726e-11, 4.9003e-11,
15394  4.905e-11, 5.17e-11, 5.6818e-11, 6.3129e-11, 6.6542e-11,
15395  6.4367e-11, 5.9908e-11, 5.447e-11, 4.7903e-11, 3.9669e-11,
15396  2.9651e-11, 2.2286e-11, 1.6742e-11, 1.1827e-11, 7.7739e-12,
15397  4.8805e-12, 3.1747e-12, 2.0057e-12, 1.255e-12, 8.7434e-13,
15398  6.2755e-13, 4.9752e-13, 4.0047e-13, 3.5602e-13, 3.093e-13,
15399  2.4903e-13, 1.9316e-13, 1.4995e-13, 1.2059e-13, 8.7242e-14,
15400  6.4511e-14, 5.33e-14, 4.3741e-14, 3.4916e-14, 2.656e-14,
15401  1.6923e-14, 1.1816e-14, 6.7071e-15, 3.6474e-15, 2.0686e-15,
15402  1.1925e-15, 6.8948e-16, 3.9661e-16, 2.2576e-16, 1.2669e-16,
15403  6.9908e-17, 3.7896e-17, 2.028e-17, 1.1016e-17, 6.7816e-18,
15404  6.0958e-18, 8.9913e-18, 1.7201e-17, 3.4964e-17, 7.0722e-17,
15405  1.402e-16, 2.7167e-16, 5.1478e-16, 9.55e-16, 1.7376e-15,
15406  3.1074e-15, 5.4789e-15, 9.564e-15, 1.6635e-14, 2.9145e-14,
15407  5.2179e-14, 8.8554e-14, 1.4764e-13, 2.3331e-13, 3.5996e-13,
15408  5.2132e-13, 6.3519e-13, 7.3174e-13, 8.3752e-13, 9.8916e-13,
15409  1.1515e-12, 1.4034e-12, 1.6594e-12, 2.1021e-12, 2.7416e-12,
15410  3.4135e-12, 4.5517e-12, 5.5832e-12, 7.2303e-12, 9.9484e-12,
15411  1.2724e-11, 1.6478e-11, 2.0588e-11, 2.5543e-11, 3.3625e-11,
15412  4.1788e-11, 5.0081e-11, 6.0144e-11, 6.9599e-11, 8.4408e-11,
15413  9.7143e-11, 1.0805e-10, 1.1713e-10, 1.2711e-10, 1.3727e-10,
15414  1.4539e-10, 1.6049e-10, 1.768e-10, 2.0557e-10, 2.4967e-10,
15415  3.0096e-10, 3.5816e-10, 4.0851e-10, 4.6111e-10, 5.2197e-10,
15416  5.5043e-10, 6.0324e-10, 6.4983e-10, 6.7498e-10, 7.0545e-10,
15417  7.068e-10, 7.5218e-10, 7.5723e-10, 7.784e-10, 8.0081e-10,
15418  8.0223e-10, 7.7271e-10, 7.1676e-10, 6.7819e-10, 6.4753e-10,
15419  6.5844e-10, 7.0163e-10, 7.7503e-10, 8.8152e-10, 9.9022e-10,
15420  1.0229e-9, 9.9296e-10, 8.9911e-10, 7.7813e-10, 6.3785e-10,
15421  4.7491e-10, 3.528e-10, 2.4349e-10, 1.6502e-10, 1.1622e-10,
15422  8.6715e-11, 6.736e-11, 5.391e-11, 4.5554e-11, 4.13e-11,
15423  3.9728e-11, 3.9e-11, 3.9803e-11, 4.1514e-11, 4.3374e-11,
15424  4.6831e-11, 4.8921e-11, 5.1995e-11, 5.7242e-11, 6.2759e-11,
15425  7.0801e-11, 7.4555e-11, 7.9754e-11, 8.7616e-11, 9.1171e-11,
15426  1.0349e-10, 1.1047e-10, 1.2024e-10, 1.299e-10, 1.3725e-10,
15427  1.5005e-10, 1.5268e-10, 1.5535e-10, 1.5623e-10, 1.5009e-10,
15428  1.4034e-10, 1.3002e-10, 1.2225e-10, 1.1989e-10, 1.2411e-10,
15429  1.3612e-10, 1.5225e-10, 1.7202e-10, 1.9471e-10, 1.9931e-10,
15430  1.9079e-10, 1.7478e-10, 1.5259e-10, 1.2625e-10, 9.3332e-11,
15431  6.8796e-11, 4.6466e-11, 2.9723e-11, 1.8508e-11, 1.2106e-11,
15432  8.0142e-12, 5.4066e-12, 3.9329e-12, 3.1665e-12, 2.742e-12,
15433  2.3996e-12, 2.3804e-12, 2.3242e-12, 2.4476e-12, 2.5331e-12,
15434  2.3595e-12, 2.2575e-12, 2.1298e-12, 2.0088e-12, 1.8263e-12,
15435  1.6114e-12, 1.4422e-12, 1.2946e-12, 1.0837e-12, 9.1282e-13,
15436  7.2359e-13, 5.3307e-13, 3.8837e-13, 2.6678e-13, 1.6769e-13,
15437  1.0826e-13, 7.2364e-14, 4.5201e-14, 3.0808e-14, 2.2377e-14,
15438  1.704e-14, 9.2181e-15, 5.2934e-15, 3.5774e-15, 3.1431e-15,
15439  3.7647e-15, 5.6428e-15, 9.5139e-15, 1.7322e-14, 2.8829e-14,
15440  4.7708e-14, 6.9789e-14, 9.7267e-14, 1.4662e-13, 1.9429e-13,
15441  2.5998e-13, 3.6636e-13, 4.796e-13, 6.5129e-13, 7.7638e-13,
15442  9.3774e-13, 1.1467e-12, 1.3547e-12, 1.5686e-12, 1.6893e-12,
15443  1.9069e-12, 2.1352e-12, 2.3071e-12, 2.4759e-12, 2.8247e-12,
15444  3.4365e-12, 4.3181e-12, 5.6107e-12, 7.0017e-12, 8.6408e-12,
15445  1.0974e-11, 1.3742e-11, 1.6337e-11, 2.0157e-11, 2.3441e-11,
15446  2.6733e-11, 3.0247e-11, 3.3737e-11, 3.8618e-11, 4.1343e-11,
15447  4.387e-11, 4.4685e-11, 4.4881e-11, 4.5526e-11, 4.3628e-11,
15448  4.4268e-11, 4.6865e-11, 5.3426e-11, 5.402e-11, 5.3218e-11,
15449  5.4587e-11, 5.636e-11, 5.774e-11, 5.6426e-11, 6.0399e-11,
15450  6.6981e-11, 7.4319e-11, 7.7977e-11, 7.5539e-11, 7.161e-11,
15451  6.4606e-11, 5.5498e-11, 4.3944e-11, 3.3769e-11, 2.5771e-11,
15452  1.9162e-11, 1.3698e-11, 1.0173e-11, 7.8925e-12, 6.1938e-12,
15453  4.7962e-12, 4.0811e-12, 3.3912e-12, 2.8625e-12, 2.4504e-12,
15454  2.2188e-12, 2.2139e-12, 2.2499e-12, 2.2766e-12, 2.3985e-12,
15455  2.5459e-12, 2.9295e-12, 3.4196e-12, 3.6155e-12, 4.0733e-12,
15456  4.461e-12, 4.9372e-12, 5.4372e-12, 5.7304e-12, 6.164e-12,
15457  6.1278e-12, 6.294e-12, 6.4947e-12, 6.8174e-12, 7.519e-12,
15458  8.2608e-12, 8.4971e-12, 8.3484e-12, 8.1888e-12, 7.8552e-12,
15459  7.8468e-12, 7.5943e-12, 7.9096e-12, 8.6869e-12, 9.1303e-12,
15460  9.2547e-12, 8.9322e-12, 8.2177e-12, 7.3408e-12, 5.7956e-12,
15461  4.447e-12, 3.5881e-12, 2.6748e-12, 1.7074e-12, 9.67e-13,
15462  5.2645e-13, 2.9943e-13, 1.7316e-13, 1.0039e-13, 5.7859e-14,
15463  3.2968e-14, 1.8499e-14, 1.0192e-14, 5.5015e-15, 2.904e-15,
15464  1.4968e-15, 7.5244e-16, 3.6852e-16, 1.7568e-16, 8.1464e-17,
15465  3.6717e-17, 1.6076e-17, 6.8341e-18, 2.8195e-18, 1.1286e-18, 0.,
15466  0., 0., 0., 0., 0., 0., 0., 0., 1.407e-18, 3.0405e-18, 6.4059e-18,
15467  1.3169e-17, 2.6443e-17, 5.1917e-17, 9.9785e-17, 1.8802e-16,
15468  3.4788e-16, 6.3328e-16, 1.137e-15, 2.0198e-15, 3.5665e-15,
15469  6.3053e-15, 1.1309e-14, 2.1206e-14, 3.2858e-14, 5.5165e-14,
15470  8.6231e-14, 1.2776e-13, 1.778e-13, 2.5266e-13, 3.6254e-13,
15471  5.1398e-13, 6.8289e-13, 8.7481e-13, 1.1914e-12, 1.6086e-12,
15472  2.0469e-12, 2.5761e-12, 3.4964e-12, 4.498e-12, 5.5356e-12,
15473  6.7963e-12, 8.572e-12, 1.07e-11, 1.2983e-11, 1.627e-11,
15474  1.9609e-11, 2.2668e-11, 2.5963e-11, 3.0918e-11, 3.493e-11,
15475  3.933e-11, 4.4208e-11, 4.6431e-11, 5.1141e-11, 5.4108e-11,
15476  5.8077e-11, 6.505e-11, 7.2126e-11, 8.1064e-11, 8.1973e-11,
15477  8.1694e-11, 8.3081e-11, 8.024e-11, 7.9225e-11, 7.6256e-11,
15478  7.8468e-11, 8.0041e-11, 8.1585e-11, 8.3485e-11, 8.3774e-11,
15479  8.587e-11, 8.6104e-11, 8.8516e-11, 9.0814e-11, 9.2522e-11,
15480  8.8913e-11, 7.8381e-11, 6.8568e-11, 5.6797e-11, 4.4163e-11,
15481  3.2369e-11, 2.3259e-11, 1.6835e-11, 1.1733e-11, 8.5273e-12,
15482  6.3805e-12, 4.8983e-12, 3.8831e-12, 3.261e-12, 2.8577e-12,
15483  2.521e-12, 2.2913e-12, 2.0341e-12, 1.8167e-12, 1.6395e-12,
15484  1.489e-12, 1.3516e-12, 1.2542e-12, 1.291e-12, 1.3471e-12,
15485  1.4689e-12, 1.5889e-12, 1.6989e-12, 1.8843e-12, 2.0902e-12,
15486  2.3874e-12, 2.7294e-12, 3.3353e-12, 4.0186e-12, 4.5868e-12,
15487  5.2212e-12, 5.8856e-12, 6.5991e-12, 7.2505e-12, 7.6637e-12,
15488  8.5113e-12, 9.4832e-12, 9.9678e-12, 1.0723e-11, 1.0749e-11,
15489  1.138e-11, 1.1774e-11, 1.1743e-11, 1.2493e-11, 1.2559e-11,
15490  1.2332e-11, 1.1782e-11, 1.1086e-11, 1.0945e-11, 1.1178e-11,
15491  1.2083e-11, 1.3037e-11, 1.473e-11, 1.645e-11, 1.7403e-11,
15492  1.7004e-11, 1.5117e-11, 1.3339e-11, 1.0844e-11, 8.0915e-12,
15493  5.6615e-12, 3.7196e-12, 2.5194e-12, 1.6569e-12, 1.1201e-12,
15494  8.2335e-13, 6.027e-13, 4.8205e-13, 4.1313e-13, 3.6243e-13,
15495  3.2575e-13, 2.773e-13, 2.5292e-13, 2.3062e-13, 2.1126e-13,
15496  2.1556e-13, 2.1213e-13, 2.2103e-13, 2.1927e-13, 2.0794e-13,
15497  1.9533e-13, 1.6592e-13, 1.4521e-13, 1.1393e-13, 8.3772e-14,
15498  6.2077e-14, 4.3337e-14, 2.7165e-14, 1.6821e-14, 9.5407e-15,
15499  5.3093e-15, 3.032e-15, 1.7429e-15, 9.9828e-16, 5.6622e-16,
15500  3.1672e-16, 1.7419e-16, 9.3985e-17, 4.9656e-17, 2.5652e-17,
15501  1.2942e-17, 6.3695e-18, 3.0554e-18, 1.4273e-18, -0., -0., -0.,
15502  -0., -0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15503  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15504  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15505  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15506  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15507  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15508  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15509  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15510  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15511  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15512  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15513  0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.} };
15514 
15515 struct s_fh2ob_ {
15516  double e_1[3];
15517  int e_2;
15518  } fh2ob_ = { {-20., 2e4, 10.}, 2003 };
15519 
15520 struct s_sh2oa_ {
15521  double e_1[2003];
15522  } sh2oa_ = { {.11109, .10573, .10162, .10573, .11109, .12574, .13499,
15523  .14327, .15065, .15164, .15022, .13677, .13115, .12253, .11271,
15524  .1007, .087495, .080118, .06994, .062034, .056051, .047663,
15525  .04245, .03669, .033441, .030711, .025205, .022113, .01888,
15526  .016653, .014626, .012065, .010709, .0091783, .0077274, .0067302,
15527  .0056164, .0049089, .0041497, .0035823, .0031124, .0026414,
15528  .0023167, .0020156, .0017829, .0015666, .0013928, .0012338,
15529  .0010932, 9.7939e-4, 8.8241e-4, 7.9173e-4, 7.1296e-4, 6.4179e-4,
15530  5.8031e-4, 5.2647e-4, 4.7762e-4, 4.3349e-4, 3.9355e-4, 3.5887e-4,
15531  3.2723e-4, 2.9919e-4, 2.7363e-4, 2.5013e-4, 2.2876e-4, 2.0924e-4,
15532  1.9193e-4, 1.7618e-4, 1.6188e-4, 1.4891e-4, 1.3717e-4, 1.2647e-4,
15533  1.1671e-4, 1.0786e-4, 9.9785e-5, 9.235e-5, 8.5539e-5, 7.9377e-5,
15534  7.3781e-5, 6.8677e-5, 6.3993e-5, 5.9705e-5, 5.5788e-5, 5.2196e-5,
15535  4.8899e-5, 4.5865e-5, 4.3079e-5, 4.0526e-5, 3.8182e-5, 3.6025e-5,
15536  3.4038e-5, 3.2203e-5, 3.0511e-5, 2.8949e-5, 2.7505e-5, 2.617e-5,
15537  2.4933e-5, 2.3786e-5, 2.2722e-5, 2.1736e-5, 2.0819e-5, 1.9968e-5,
15538  1.9178e-5, 1.8442e-5, 1.776e-5, 1.7127e-5, 1.6541e-5, 1.5997e-5,
15539  1.5495e-5, 1.5034e-5, 1.4614e-5, 1.423e-5, 1.3883e-5, 1.3578e-5,
15540  1.3304e-5, 1.3069e-5, 1.2876e-5, 1.2732e-5, 1.2626e-5, 1.2556e-5,
15541  1.2544e-5, 1.2604e-5, 1.2719e-5, 1.2883e-5, 1.3164e-5, 1.3581e-5,
15542  1.4187e-5, 1.4866e-5, 1.5669e-5, 1.6717e-5, 1.8148e-5, 2.0268e-5,
15543  2.2456e-5, 2.5582e-5, 2.9183e-5, 3.3612e-5, 3.9996e-5, 4.6829e-5,
15544  5.5055e-5, 6.5897e-5, 7.536e-5, 8.7213e-5, 1.0046e-4, 1.1496e-4,
15545  1.2943e-4, 1.5049e-4, 1.6973e-4, 1.8711e-4, 2.0286e-4, 2.2823e-4,
15546  2.678e-4, 2.8766e-4, 3.1164e-4, 3.364e-4, 3.6884e-4, 3.9159e-4,
15547  3.8712e-4, 3.7433e-4, 3.4503e-4, 3.1003e-4, 2.8027e-4, 2.5253e-4,
15548  2.3408e-4, 2.2836e-4, 2.4442e-4, 2.7521e-4, 2.9048e-4, 3.0489e-4,
15549  3.2646e-4, 3.388e-4, 3.3492e-4, 3.0987e-4, 2.9482e-4, 2.8711e-4,
15550  2.6068e-4, 2.2683e-4, 1.9996e-4, 1.7788e-4, 1.6101e-4, 1.3911e-4,
15551  1.2013e-4, 1.0544e-4, 9.4224e-5, 8.1256e-5, 7.3667e-5, 6.2233e-5,
15552  5.5906e-5, 5.1619e-5, 4.514e-5, 4.0273e-5, 3.3268e-5, 3.0258e-5,
15553  2.644e-5, 2.3103e-5, 2.0749e-5, 1.8258e-5, 1.6459e-5, 1.4097e-5,
15554  1.2052e-5, 1.0759e-5, 9.14e-6, 8.1432e-6, 7.146e-6, 6.4006e-6,
15555  5.6995e-6, 4.9372e-6, 4.4455e-6, 3.9033e-6, 3.474e-6, 3.1269e-6,
15556  2.8059e-6, 2.5558e-6, 2.2919e-6, 2.0846e-6, 1.8983e-6, 1.7329e-6,
15557  1.5929e-6, 1.4631e-6, 1.3513e-6, 1.2461e-6, 1.1519e-6, 1.0682e-6,
15558  9.9256e-7, 9.2505e-7, 8.6367e-7, 8.0857e-7, 7.5674e-7, 7.0934e-7,
15559  6.658e-7, 6.258e-7, 5.8853e-7, 5.5333e-7, 5.2143e-7, 4.9169e-7,
15560  4.6431e-7, 4.3898e-7, 4.1564e-7, 3.9405e-7, 3.7403e-7, 3.5544e-7,
15561  3.3819e-7, 3.2212e-7, 3.0714e-7, 2.9313e-7, 2.8003e-7, 2.6777e-7,
15562  2.5628e-7, 2.4551e-7, 2.354e-7, 2.2591e-7, 2.1701e-7, 2.0866e-7,
15563  2.0082e-7, 1.9349e-7, 1.8665e-7, 1.8027e-7, 1.7439e-7, 1.6894e-7,
15564  1.64e-7, 1.5953e-7, 1.5557e-7, 1.5195e-7, 1.4888e-7, 1.4603e-7,
15565  1.4337e-7, 1.4093e-7, 1.3828e-7, 1.3569e-7, 1.327e-7, 1.2984e-7,
15566  1.2714e-7, 1.2541e-7, 1.2399e-7, 1.2102e-7, 1.1878e-7, 1.1728e-7,
15567  1.1644e-7, 1.1491e-7, 1.1305e-7, 1.1235e-7, 1.1228e-7, 1.1224e-7,
15568  1.1191e-7, 1.1151e-7, 1.1098e-7, 1.1068e-7, 1.1109e-7, 1.1213e-7,
15569  1.1431e-7, 1.1826e-7, 1.2322e-7, 1.3025e-7, 1.4066e-7, 1.5657e-7,
15570  1.7214e-7, 1.9449e-7, 2.2662e-7, 2.6953e-7, 3.1723e-7, 3.7028e-7,
15571  4.4482e-7, 5.3852e-7, 6.2639e-7, 7.2175e-7, 7.7626e-7, 8.7248e-7,
15572  9.6759e-7, 1.0102e-6, 1.062e-6, 1.1201e-6, 1.2107e-6, 1.2998e-6,
15573  1.313e-6, 1.2856e-6, 1.235e-6, 1.1489e-6, 1.0819e-6, 1.012e-6,
15574  9.4795e-7, 9.2858e-7, 9.806e-7, 1.0999e-6, 1.1967e-6, 1.2672e-6,
15575  1.3418e-6, 1.3864e-6, 1.433e-6, 1.4592e-6, 1.4598e-6, 1.4774e-6,
15576  1.4726e-6, 1.482e-6, 1.505e-6, 1.4984e-6, 1.5181e-6, 1.5888e-6,
15577  1.685e-6, 1.769e-6, 1.9277e-6, 2.1107e-6, 2.3068e-6, 2.5347e-6,
15578  2.8069e-6, 3.1345e-6, 3.5822e-6, 3.9051e-6, 4.3422e-6, 4.8704e-6,
15579  5.5351e-6, 6.3454e-6, 7.269e-6, 8.2974e-6, 9.7609e-6, 1.1237e-5,
15580  1.3187e-5, 1.5548e-5, 1.8784e-5, 2.1694e-5, 2.5487e-5, 3.0092e-5,
15581  3.5385e-5, 4.2764e-5, 4.9313e-5, 5.58e-5, 6.2968e-5, 7.106e-5,
15582  7.7699e-5, 8.7216e-5, 8.9335e-5, 9.2151e-5, 9.2779e-5, 9.4643e-5,
15583  9.7978e-5, 1.0008e-4, 1.0702e-4, 1.1026e-4, 1.0828e-4, 1.055e-4,
15584  1.0432e-4, 1.0428e-4, 9.898e-5, 9.4992e-5, 9.5159e-5, 1.0058e-4,
15585  1.0738e-4, 1.155e-4, 1.1229e-4, 1.0596e-4, 1.0062e-4, 9.1742e-5,
15586  8.4492e-5, 6.8099e-5, 5.6295e-5, 4.6502e-5, 3.8071e-5, 3.0721e-5,
15587  2.3297e-5, 1.8688e-5, 1.483e-5, 1.2049e-5, 9.6754e-6, 7.9192e-6,
15588  6.6673e-6, 5.6468e-6, 4.8904e-6, 4.2289e-6, 3.688e-6, 3.2396e-6,
15589  2.8525e-6, 2.5363e-6, 2.2431e-6, 1.9949e-6, 1.7931e-6, 1.6164e-6,
15590  1.4431e-6, 1.2997e-6, 1.1559e-6, 1.0404e-6, 9.43e-7, 8.4597e-7,
15591  7.6133e-7, 6.8623e-7, 6.2137e-7, 5.6345e-7, 5.1076e-7, 4.6246e-7,
15592  4.1906e-7, 3.8063e-7, 3.461e-7, 3.1554e-7, 2.8795e-7, 2.6252e-7,
15593  2.3967e-7, 2.1901e-7, 2.0052e-7, 1.8384e-7, 1.6847e-7, 1.5459e-7,
15594  1.4204e-7, 1.3068e-7, 1.2036e-7, 1.1095e-7, 1.0237e-7, 9.4592e-8,
15595  8.753e-8, 8.1121e-8, 7.5282e-8, 6.9985e-8, 6.5189e-8, 6.0874e-8,
15596  5.6989e-8, 5.353e-8, 5.0418e-8, 4.7745e-8, 4.5367e-8, 4.3253e-8,
15597  4.1309e-8, 3.9695e-8, 3.8094e-8, 3.6482e-8, 3.4897e-8, 3.35e-8,
15598  3.2302e-8, 3.0854e-8, 2.9698e-8, 2.8567e-8, 2.76e-8, 2.6746e-8,
15599  2.5982e-8, 2.551e-8, 2.5121e-8, 2.4922e-8, 2.4909e-8, 2.5013e-8,
15600  2.5216e-8, 2.5589e-8, 2.6049e-8, 2.6451e-8, 2.6978e-8, 2.7687e-8,
15601  2.86e-8, 2.9643e-8, 3.0701e-8, 3.2058e-8, 3.3695e-8, 3.5558e-8,
15602  3.7634e-8, 3.9875e-8, 4.2458e-8, 4.548e-8, 4.8858e-8, 5.2599e-8,
15603  5.703e-8, 6.2067e-8, 6.7911e-8, 7.4579e-8, 8.1902e-8, 8.9978e-8,
15604  9.987e-8, 1.1102e-7, 1.2343e-7, 1.3732e-7, 1.5394e-7, 1.7318e-7,
15605  1.9383e-7, 2.1819e-7, 2.4666e-7, 2.8109e-7, 3.2236e-7, 3.776e-7,
15606  4.4417e-7, 5.2422e-7, 6.1941e-7, 7.4897e-7, 9.2041e-7, 1.1574e-6,
15607  1.4126e-6, 1.7197e-6, 2.1399e-6, 2.6266e-6, 3.3424e-6, 3.8418e-6,
15608  4.514e-6, 5.0653e-6, 5.8485e-6, 6.5856e-6, 6.8937e-6, 6.9121e-6,
15609  6.9005e-6, 6.9861e-6, 6.82e-6, 6.6089e-6, 6.5809e-6, 7.3496e-6,
15610  8.0311e-6, 8.3186e-6, 8.426e-6, 9.0644e-6, 9.4965e-6, 9.4909e-6,
15611  9.016e-6, 9.1494e-6, 9.3629e-6, 9.5944e-6, 9.5459e-6, 8.9919e-6,
15612  8.604e-6, 7.8613e-6, 7.1567e-6, 6.2677e-6, 5.1899e-6, 4.4188e-6,
15613  3.7167e-6, 3.0636e-6, 2.5573e-6, 2.0317e-6, 1.6371e-6, 1.3257e-6,
15614  1.0928e-6, 8.9986e-7, 7.4653e-7, 6.1111e-7, 5.1395e-7, 4.35e-7,
15615  3.7584e-7, 3.2633e-7, 2.8413e-7, 2.4723e-7, 2.1709e-7, 1.9294e-7,
15616  1.7258e-7, 1.5492e-7, 1.382e-7, 1.2389e-7, 1.1189e-7, 1.0046e-7,
15617  9.0832e-8, 8.2764e-8, 7.4191e-8, 6.7085e-8, 6.0708e-8, 5.4963e-8,
15618  4.9851e-8, 4.5044e-8, 4.0916e-8, 3.722e-8, 3.3678e-8, 3.0663e-8,
15619  2.7979e-8, 2.5495e-8, 2.3286e-8, 2.1233e-8, 1.9409e-8, 1.777e-8,
15620  1.626e-8, 1.4885e-8, 1.3674e-8, 1.2543e-8, 1.1551e-8, 1.0655e-8,
15621  9.8585e-9, 9.1398e-9, 8.4806e-9, 7.8899e-9, 7.3547e-9, 6.867e-9,
15622  6.4131e-9, 5.993e-9, 5.6096e-9, 5.2592e-9, 4.9352e-9, 4.6354e-9,
15623  4.3722e-9, 4.125e-9, 3.9081e-9, 3.7118e-9, 3.5372e-9, 3.3862e-9,
15624  3.2499e-9, 3.1324e-9, 3.0313e-9, 2.9438e-9, 2.8686e-9, 2.805e-9,
15625  2.7545e-9, 2.7149e-9, 2.6907e-9, 2.6724e-9, 2.6649e-9, 2.6642e-9,
15626  2.6725e-9, 2.6871e-9, 2.7056e-9, 2.7357e-9, 2.7781e-9, 2.8358e-9,
15627  2.9067e-9, 2.9952e-9, 3.102e-9, 3.2253e-9, 3.3647e-9, 3.5232e-9,
15628  3.7037e-9, 3.9076e-9, 4.1385e-9, 4.3927e-9, 4.6861e-9, 5.0238e-9,
15629  5.4027e-9, 5.8303e-9, 6.3208e-9, 6.8878e-9, 7.5419e-9, 8.313e-9,
15630  9.1952e-9, 1.0228e-8, 1.1386e-8, 1.2792e-8, 1.4521e-8, 1.6437e-8,
15631  1.8674e-8, 2.116e-8, 2.4506e-8, 2.8113e-8, 3.2636e-8, 3.7355e-8,
15632  4.2234e-8, 4.9282e-8, 5.7358e-8, 6.6743e-8, 7.8821e-8, 9.4264e-8,
15633  1.1542e-7, 1.3684e-7, 1.6337e-7, 2.0056e-7, 2.3252e-7, 2.6127e-7,
15634  2.9211e-7, 3.3804e-7, 3.7397e-7, 3.8205e-7, 3.881e-7, 3.9499e-7,
15635  3.9508e-7, 3.7652e-7, 3.5859e-7, 3.6198e-7, 3.7871e-7, 4.0925e-7,
15636  4.2717e-7, 4.8241e-7, 5.2008e-7, 5.653e-7, 5.9531e-7, 6.1994e-7,
15637  6.508e-7, 6.6355e-7, 6.9193e-7, 6.993e-7, 7.3058e-7, 7.4678e-7,
15638  7.9193e-7, 8.3627e-7, 9.1267e-7, 1.0021e-6, 1.1218e-6, 1.2899e-6,
15639  1.4447e-6, 1.7268e-6, 2.0025e-6, 2.3139e-6, 2.5599e-6, 2.892e-6,
15640  3.3059e-6, 3.5425e-6, 3.9522e-6, 4.0551e-6, 4.2818e-6, 4.2892e-6,
15641  4.421e-6, 4.5614e-6, 4.6739e-6, 4.9482e-6, 5.1118e-6, 5.0986e-6,
15642  4.9417e-6, 4.9022e-6, 4.8449e-6, 4.8694e-6, 4.8111e-6, 4.9378e-6,
15643  5.3231e-6, 5.7362e-6, 6.235e-6, 6.0951e-6, 5.7281e-6, 5.4585e-6,
15644  4.9032e-6, 4.3009e-6, 3.4776e-6, 2.8108e-6, 2.2993e-6, 1.7999e-6,
15645  1.387e-6, 1.075e-6, 8.5191e-7, 6.7951e-7, 5.5336e-7, 4.6439e-7,
15646  4.0243e-7, 3.5368e-7, 3.1427e-7, 2.7775e-7, 2.4486e-7, 2.1788e-7,
15647  1.9249e-7, 1.7162e-7, 1.5115e-7, 1.3478e-7, 1.2236e-7, 1.1139e-7,
15648  1.0092e-7, 9.0795e-8, 8.2214e-8, 7.4691e-8, 6.7486e-8, 6.0414e-8,
15649  5.4584e-8, 4.8754e-8, 4.3501e-8, 3.8767e-8, 3.4363e-8, 3.0703e-8,
15650  2.7562e-8, 2.4831e-8, 2.2241e-8, 1.9939e-8, 1.8049e-8, 1.6368e-8,
15651  1.4863e-8, 1.346e-8, 1.2212e-8, 1.1155e-8, 1.0185e-8, 9.3417e-9,
15652  8.5671e-9, 7.8292e-9, 7.1749e-9, 6.5856e-9, 6.0588e-9, 5.5835e-9,
15653  5.135e-9, 4.7395e-9, 4.3771e-9, 4.0476e-9, 3.756e-9, 3.4861e-9,
15654  3.2427e-9, 3.024e-9, 2.8278e-9, 2.6531e-9, 2.4937e-9, 2.3511e-9,
15655  2.2245e-9, 2.1133e-9, 2.0159e-9, 1.933e-9, 1.8669e-9, 1.8152e-9,
15656  1.7852e-9, 1.7752e-9, 1.7823e-9, 1.8194e-9, 1.8866e-9, 1.9759e-9,
15657  2.0736e-9, 2.2083e-9, 2.3587e-9, 2.4984e-9, 2.6333e-9, 2.816e-9,
15658  3.0759e-9, 3.372e-9, 3.6457e-9, 4.0668e-9, 4.4541e-9, 4.7976e-9,
15659  5.0908e-9, 5.4811e-9, 6.1394e-9, 6.3669e-9, 6.5714e-9, 6.8384e-9,
15660  7.1918e-9, 7.3741e-9, 7.2079e-9, 7.2172e-9, 7.2572e-9, 7.3912e-9,
15661  7.6188e-9, 8.3291e-9, 8.7885e-9, 9.2412e-9, 1.0021e-8, 1.0752e-8,
15662  1.1546e-8, 1.1607e-8, 1.1949e-8, 1.2346e-8, 1.2516e-8, 1.2826e-8,
15663  1.3053e-8, 1.3556e-8, 1.4221e-8, 1.5201e-8, 1.6661e-8, 1.8385e-8,
15664  2.0585e-8, 2.3674e-8, 2.7928e-8, 3.3901e-8, 4.1017e-8, 4.9595e-8,
15665  6.0432e-8, 7.6304e-8, 9.0764e-8, 1.0798e-7, 1.2442e-7, 1.4404e-7,
15666  1.6331e-7, 1.8339e-7, 2.0445e-7, 2.2288e-7, 2.3083e-7, 2.3196e-7,
15667  2.3919e-7, 2.3339e-7, 2.3502e-7, 2.3444e-7, 2.6395e-7, 2.9928e-7,
15668  3.0025e-7, 3.0496e-7, 3.1777e-7, 3.4198e-7, 3.4739e-7, 3.2696e-7,
15669  3.41e-7, 3.5405e-7, 3.7774e-7, 3.8285e-7, 3.6797e-7, 3.58e-7,
15670  3.2283e-7, 2.9361e-7, 2.4881e-7, 2.0599e-7, 1.7121e-7, 1.3641e-7,
15671  1.1111e-7, 8.9413e-8, 7.3455e-8, 6.2078e-8, 5.2538e-8, 4.5325e-8,
15672  3.9005e-8, 3.4772e-8, 3.1203e-8, 2.8132e-8, 2.525e-8, 2.2371e-8,
15673  2.0131e-8, 1.7992e-8, 1.6076e-8, 1.4222e-8, 1.249e-8, 1.1401e-8,
15674  1.0249e-8, 9.2279e-9, 8.5654e-9, 7.6227e-9, 6.9648e-9, 6.2466e-9,
15675  5.7252e-9, 5.38e-9, 4.696e-9, 4.2194e-9, 3.7746e-9, 3.3813e-9,
15676  3.0656e-9, 2.6885e-9, 2.4311e-9, 2.1572e-9, 1.8892e-9, 1.7038e-9,
15677  1.4914e-9, 1.3277e-9, 1.1694e-9, 1.0391e-9, 9.2779e-10,
15678  8.3123e-10, 7.4968e-10, 6.8385e-10, 6.2915e-10, 5.7784e-10,
15679  5.2838e-10, 4.8382e-10, 4.4543e-10, 4.1155e-10, 3.7158e-10,
15680  3.3731e-10, 3.0969e-10, 2.8535e-10, 2.6416e-10, 2.4583e-10,
15681  2.2878e-10, 2.1379e-10, 2.0073e-10, 1.8907e-10, 1.7866e-10,
15682  1.6936e-10, 1.6119e-10, 1.5424e-10, 1.4847e-10, 1.4401e-10,
15683  1.4068e-10, 1.3937e-10, 1.3943e-10, 1.4281e-10, 1.4766e-10,
15684  1.5701e-10, 1.7079e-10, 1.8691e-10, 2.0081e-10, 2.174e-10,
15685  2.4847e-10, 2.6463e-10, 2.7087e-10, 2.7313e-10, 2.8352e-10,
15686  2.9511e-10, 2.8058e-10, 2.7227e-10, 2.7356e-10, 2.8012e-10,
15687  2.8034e-10, 2.9031e-10, 3.103e-10, 3.3745e-10, 3.8152e-10,
15688  4.0622e-10, 4.2673e-10, 4.3879e-10, 4.5488e-10, 4.7179e-10,
15689  4.614e-10, 4.6339e-10, 4.6716e-10, 4.7024e-10, 4.7931e-10,
15690  4.8503e-10, 4.9589e-10, 4.9499e-10, 5.0363e-10, 5.3184e-10,
15691  5.6451e-10, 6.0932e-10, 6.6469e-10, 7.4076e-10, 8.3605e-10,
15692  9.4898e-10, 1.0935e-9, 1.2593e-9, 1.4913e-9, 1.8099e-9, 2.1842e-9,
15693  2.7284e-9, 3.2159e-9, 3.7426e-9, 4.5226e-9, 5.3512e-9, 6.1787e-9,
15694  6.8237e-9, 7.9421e-9, 9.0002e-9, 9.6841e-9, 9.9558e-9, 1.0232e-8,
15695  1.0591e-8, 1.0657e-8, 1.0441e-8, 1.0719e-8, 1.1526e-8, 1.2962e-8,
15696  1.4336e-8, 1.615e-8, 1.8417e-8, 2.0725e-8, 2.3426e-8, 2.5619e-8,
15697  2.7828e-8, 3.0563e-8, 3.3438e-8, 3.6317e-8, 4.04e-8, 4.4556e-8,
15698  5.0397e-8, 5.3315e-8, 5.9185e-8, 6.5311e-8, 6.9188e-8, 7.7728e-8,
15699  7.9789e-8, 8.6598e-8, 8.7768e-8, 9.1773e-8, 9.7533e-8, 1.0007e-7,
15700  1.065e-7, 1.0992e-7, 1.0864e-7, 1.0494e-7, 1.0303e-7, 1.0031e-7,
15701  1.0436e-7, 1.0537e-7, 1.1184e-7, 1.2364e-7, 1.3651e-7, 1.4881e-7,
15702  1.4723e-7, 1.4118e-7, 1.3371e-7, 1.1902e-7, 1.0007e-7, 7.9628e-8,
15703  6.4362e-8, 5.0243e-8, 3.8133e-8, 2.94e-8, 2.3443e-8, 1.9319e-8,
15704  1.6196e-8, 1.4221e-8, 1.2817e-8, 1.1863e-8, 1.1383e-8, 1.1221e-8,
15705  1.1574e-8, 1.1661e-8, 1.2157e-8, 1.2883e-8, 1.3295e-8, 1.4243e-8,
15706  1.424e-8, 1.4614e-8, 1.4529e-8, 1.4685e-8, 1.4974e-8, 1.479e-8,
15707  1.489e-8, 1.4704e-8, 1.4142e-8, 1.3374e-8, 1.2746e-8, 1.2172e-8,
15708  1.2336e-8, 1.2546e-8, 1.3065e-8, 1.409e-8, 1.5215e-8, 1.654e-8,
15709  1.6144e-8, 1.5282e-8, 1.4358e-8, 1.2849e-8, 1.0998e-8, 8.6956e-9,
15710  7.0881e-9, 5.5767e-9, 4.2792e-9, 3.2233e-9, 2.502e-9, 1.9985e-9,
15711  1.5834e-9, 1.3015e-9, 1.0948e-9, 9.4141e-10, 8.1465e-10,
15712  7.1517e-10, 6.2906e-10, 5.5756e-10, 4.9805e-10, 4.3961e-10,
15713  3.9181e-10, 3.5227e-10, 3.167e-10, 2.8667e-10, 2.5745e-10,
15714  2.3212e-10, 2.0948e-10, 1.897e-10, 1.7239e-10, 1.5659e-10,
15715  1.4301e-10, 1.3104e-10, 1.2031e-10, 1.1095e-10, 1.0262e-10,
15716  9.513e-11, 8.8595e-11, 8.2842e-11, 7.7727e-11, 7.3199e-11,
15717  6.9286e-11, 6.5994e-11, 6.3316e-11, 6.1244e-11, 5.9669e-11,
15718  5.8843e-11, 5.8832e-11, 5.9547e-11, 6.1635e-11, 6.4926e-11,
15719  7.0745e-11, 7.8802e-11, 8.6724e-11, 1.0052e-10, 1.1575e-10,
15720  1.3626e-10, 1.5126e-10, 1.6751e-10, 1.9239e-10, 2.1748e-10,
15721  2.2654e-10, 2.2902e-10, 2.324e-10, 2.4081e-10, 2.393e-10,
15722  2.2378e-10, 2.2476e-10, 2.2791e-10, 2.4047e-10, 2.5305e-10,
15723  2.8073e-10, 3.1741e-10, 3.6592e-10, 4.1495e-10, 4.6565e-10,
15724  5.099e-10, 5.5607e-10, 6.1928e-10, 6.6779e-10, 7.335e-10,
15725  8.1434e-10, 8.9635e-10, 9.9678e-10, 1.1256e-9, 1.2999e-9,
15726  1.4888e-9, 1.7642e-9, 1.9606e-9, 2.2066e-9, 2.4601e-9, 2.7218e-9,
15727  3.0375e-9, 3.1591e-9, 3.2852e-9, 3.2464e-9, 3.3046e-9, 3.271e-9,
15728  3.2601e-9, 3.3398e-9, 3.7446e-9, 4.0795e-9, 4.0284e-9, 4.0584e-9,
15729  4.1677e-9, 4.5358e-9, 4.4097e-9, 4.2744e-9, 4.5449e-9, 4.8147e-9,
15730  5.2656e-9, 5.2476e-9, 5.0275e-9, 4.7968e-9, 4.3654e-9, 3.953e-9,
15731  3.2447e-9, 2.6489e-9, 2.1795e-9, 1.788e-9, 1.4309e-9, 1.1256e-9,
15732  9.1903e-10, 7.6533e-10, 6.3989e-10, 5.5496e-10, 4.9581e-10,
15733  4.5722e-10, 4.3898e-10, 4.3505e-10, 4.3671e-10, 4.5329e-10,
15734  4.6827e-10, 4.9394e-10, 5.1122e-10, 5.1649e-10, 5.0965e-10,
15735  4.9551e-10, 4.8928e-10, 4.7947e-10, 4.7989e-10, 4.9071e-10,
15736  4.8867e-10, 4.726e-10, 4.5756e-10, 4.54e-10, 4.5993e-10,
15737  4.4042e-10, 4.3309e-10, 4.4182e-10, 4.6735e-10, 5.0378e-10,
15738  5.2204e-10, 5.0166e-10, 4.6799e-10, 4.3119e-10, 3.8803e-10,
15739  3.3291e-10, 2.6289e-10, 2.1029e-10, 1.7011e-10, 1.3345e-10,
15740  1.0224e-10, 7.8207e-11, 6.2451e-11, 5.0481e-11, 4.1507e-11,
15741  3.5419e-11, 3.0582e-11, 2.69e-11, 2.3778e-11, 2.1343e-11,
15742  1.9182e-11, 1.7162e-11, 1.5391e-11, 1.3877e-11, 1.2619e-11,
15743  1.145e-11, 1.0461e-11, 9.6578e-12, 8.9579e-12, 8.3463e-12,
15744  7.8127e-12, 7.3322e-12, 6.9414e-12, 6.6037e-12, 6.3285e-12,
15745  6.1095e-12, 5.9387e-12, 5.8118e-12, 5.726e-12, 5.6794e-12,
15746  5.6711e-12, 5.7003e-12, 5.767e-12, 5.8717e-12, 6.0151e-12,
15747  6.1984e-12, 6.4232e-12, 6.6918e-12, 7.0065e-12, 7.3705e-12,
15748  7.7873e-12, 8.2612e-12, 8.7972e-12, 9.4009e-12, 1.0079e-11,
15749  1.084e-11, 1.1692e-11, 1.2648e-11, 1.3723e-11, 1.4935e-11,
15750  1.6313e-11, 1.7905e-11, 1.974e-11, 2.1898e-11, 2.4419e-11,
15751  2.7426e-11, 3.0869e-11, 3.4235e-11, 3.7841e-11, 4.1929e-11,
15752  4.6776e-11, 5.2123e-11, 5.8497e-11, 6.5294e-11, 7.4038e-11,
15753  8.4793e-11, 9.6453e-11, 1.1223e-10, 1.2786e-10, 1.4882e-10,
15754  1.7799e-10, 2.0766e-10, 2.4523e-10, 2.8591e-10, 3.3386e-10,
15755  4.0531e-10, 4.7663e-10, 5.4858e-10, 6.3377e-10, 7.1688e-10,
15756  8.4184e-10, 9.5144e-10, 1.0481e-9, 1.1356e-9, 1.2339e-9,
15757  1.3396e-9, 1.4375e-9, 1.5831e-9, 1.7323e-9, 1.9671e-9, 2.2976e-9,
15758  2.6679e-9, 3.0777e-9, 3.4321e-9, 3.8192e-9, 4.2711e-9, 4.4903e-9,
15759  4.8931e-9, 5.2253e-9, 5.404e-9, 5.6387e-9, 5.6704e-9, 6.0345e-9,
15760  6.1079e-9, 6.2576e-9, 6.4039e-9, 6.3776e-9, 6.1878e-9, 5.8616e-9,
15761  5.7036e-9, 5.584e-9, 5.6905e-9, 5.8931e-9, 6.2478e-9, 6.8291e-9,
15762  7.4528e-9, 7.6078e-9, 7.3898e-9, 6.7573e-9, 5.9827e-9, 5.0927e-9,
15763  4.0099e-9, 3.1933e-9, 2.4296e-9, 1.8485e-9, 1.4595e-9, 1.2017e-9,
15764  1.0164e-9, 8.7433e-10, 7.7108e-10, 7.0049e-10, 6.5291e-10,
15765  6.1477e-10, 5.9254e-10, 5.815e-10, 5.7591e-10, 5.849e-10,
15766  5.8587e-10, 5.9636e-10, 6.2408e-10, 6.5479e-10, 7.048e-10,
15767  7.2313e-10, 7.5524e-10, 8.0863e-10, 8.3386e-10, 9.2342e-10,
15768  9.6754e-10, 1.0293e-9, 1.0895e-9, 1.133e-9, 1.221e-9, 1.2413e-9,
15769  1.2613e-9, 1.2671e-9, 1.2225e-9, 1.1609e-9, 1.0991e-9, 1.06e-9,
15770  1.057e-9, 1.0818e-9, 1.1421e-9, 1.227e-9, 1.337e-9, 1.4742e-9,
15771  1.4946e-9, 1.4322e-9, 1.321e-9, 1.1749e-9, 1.0051e-9, 7.8387e-10,
15772  6.1844e-10, 4.6288e-10, 3.4164e-10, 2.5412e-10, 1.9857e-10,
15773  1.5876e-10, 1.2966e-10, 1.092e-10, 9.4811e-11, 8.3733e-11,
15774  7.3906e-11, 6.7259e-11, 6.1146e-11, 5.7119e-11, 5.3546e-11,
15775  4.8625e-11, 4.4749e-11, 4.1089e-11, 3.7825e-11, 3.4465e-11,
15776  3.1018e-11, 2.8109e-11, 2.561e-11, 2.2859e-11, 2.049e-11,
15777  1.8133e-11, 1.5835e-11, 1.3949e-11, 1.2295e-11, 1.0799e-11,
15778  9.6544e-12, 8.7597e-12, 7.999e-12, 7.3973e-12, 6.9035e-12,
15779  6.4935e-12, 6.1195e-12, 5.8235e-12, 5.5928e-12, 5.4191e-12,
15780  5.2993e-12, 5.2338e-12, 5.2272e-12, 5.2923e-12, 5.4252e-12,
15781  5.6523e-12, 5.9433e-12, 6.3197e-12, 6.9016e-12, 7.5016e-12,
15782  8.2885e-12, 9.405e-12, 1.0605e-11, 1.2257e-11, 1.3622e-11,
15783  1.5353e-11, 1.7543e-11, 1.9809e-11, 2.2197e-11, 2.4065e-11,
15784  2.6777e-11, 2.9751e-11, 3.2543e-11, 3.5536e-11, 3.9942e-11,
15785  4.6283e-11, 5.4556e-11, 6.549e-11, 7.6803e-11, 9.0053e-11,
15786  1.0852e-10, 1.2946e-10, 1.4916e-10, 1.7748e-10, 2.0073e-10,
15787  2.2485e-10, 2.5114e-10, 2.7715e-10, 3.1319e-10, 3.3305e-10,
15788  3.5059e-10, 3.5746e-10, 3.6311e-10, 3.7344e-10, 3.6574e-10,
15789  3.7539e-10, 3.9434e-10, 4.351e-10, 4.334e-10, 4.2588e-10,
15790  4.3977e-10, 4.6062e-10, 4.7687e-10, 4.6457e-10, 4.8578e-10,
15791  5.2344e-10, 5.6752e-10, 5.8702e-10, 5.6603e-10, 5.3784e-10,
15792  4.9181e-10, 4.3272e-10, 3.5681e-10, 2.8814e-10, 2.332e-10,
15793  1.8631e-10, 1.4587e-10, 1.1782e-10, 9.8132e-11, 8.2528e-11,
15794  6.9174e-11, 6.1056e-11, 5.3459e-11, 4.7116e-11, 4.1878e-11,
15795  3.8125e-11, 3.6347e-11, 3.5071e-11, 3.3897e-11, 3.3541e-11,
15796  3.3563e-11, 3.5469e-11, 3.8111e-11, 3.8675e-11, 4.1333e-11,
15797  4.3475e-11, 4.6476e-11, 4.9761e-11, 5.138e-11, 5.4135e-11,
15798  5.3802e-11, 5.5158e-11, 5.6864e-11, 5.9311e-11, 6.3827e-11,
15799  6.7893e-11, 6.823e-11, 6.6694e-11, 6.6018e-11, 6.4863e-11,
15800  6.5893e-11, 6.3813e-11, 6.4741e-11, 6.863e-11, 7.0255e-11,
15801  7.0667e-11, 6.881e-11, 6.4104e-11, 5.8136e-11, 4.7242e-11,
15802  3.7625e-11, 3.1742e-11, 2.5581e-11, 1.8824e-11, 1.3303e-11,
15803  9.6919e-12, 7.5353e-12, 6.0986e-12, 5.0742e-12, 4.3094e-12,
15804  3.719e-12, 3.252e-12, 2.8756e-12, 2.568e-12, 2.3139e-12,
15805  2.1025e-12, 1.9257e-12, 1.7777e-12, 1.6539e-12, 1.5508e-12,
15806  1.4657e-12, 1.3966e-12, 1.3417e-12, 1.2998e-12, 1.27e-12,
15807  1.2514e-12, 1.2437e-12, 1.2463e-12, 1.2592e-12, 1.2823e-12,
15808  1.3157e-12, 1.3596e-12, 1.4144e-12, 1.4806e-12, 1.5588e-12,
15809  1.6497e-12, 1.7544e-12, 1.8738e-12, 2.0094e-12, 2.1626e-12,
15810  2.3354e-12, 2.5297e-12, 2.7483e-12, 2.9941e-12, 3.2708e-12,
15811  3.5833e-12, 3.9374e-12, 4.3415e-12, 4.8079e-12, 5.3602e-12,
15812  5.9816e-12, 6.7436e-12, 7.6368e-12, 8.6812e-12, 9.8747e-12,
15813  1.135e-11, 1.3181e-11, 1.5406e-11, 1.7868e-11, 2.0651e-11,
15814  2.4504e-11, 2.9184e-11, 3.4159e-11, 3.9979e-11, 4.8704e-11,
15815  5.7856e-11, 6.7576e-11, 7.9103e-11, 9.437e-11, 1.1224e-10,
15816  1.3112e-10, 1.5674e-10, 1.8206e-10, 2.0576e-10, 2.3187e-10,
15817  2.7005e-10, 3.0055e-10, 3.3423e-10, 3.6956e-10, 3.8737e-10,
15818  4.263e-10, 4.5154e-10, 4.8383e-10, 5.3582e-10, 5.8109e-10,
15819  6.3741e-10, 6.3874e-10, 6.387e-10, 6.5818e-10, 6.5056e-10,
15820  6.5291e-10, 6.3159e-10, 6.3984e-10, 6.4549e-10, 6.5444e-10,
15821  6.7035e-10, 6.7665e-10, 6.9124e-10, 6.8451e-10, 6.9255e-10,
15822  6.9923e-10, 7.0396e-10, 6.7715e-10, 6.0371e-10, 5.3774e-10,
15823  4.6043e-10, 3.7635e-10, 2.9484e-10, 2.2968e-10, 1.8185e-10,
15824  1.4191e-10, 1.1471e-10, 9.479e-11, 7.9613e-11, 6.7989e-11,
15825  5.9391e-11, 5.281e-11, 4.7136e-11, 4.2618e-11, 3.8313e-11,
15826  3.4686e-11, 3.1669e-11, 2.911e-11, 2.6871e-11, 2.5074e-11,
15827  2.4368e-11, 2.3925e-11, 2.4067e-11, 2.4336e-11, 2.4704e-11,
15828  2.5823e-11, 2.7177e-11, 2.9227e-11, 3.1593e-11, 3.573e-11,
15829  4.0221e-11, 4.3994e-11, 4.8448e-11, 5.3191e-11, 5.8552e-11,
15830  6.3458e-11, 6.6335e-11, 7.2457e-11, 7.9091e-11, 8.2234e-11,
15831  8.7668e-11, 8.7951e-11, 9.2952e-11, 9.6157e-11, 9.5926e-11,
15832  1.012e-10, 1.0115e-10, 9.9577e-11, 9.6633e-11, 9.2891e-11,
15833  9.3315e-11, 9.5584e-11, 1.0064e-10, 1.0509e-10, 1.1455e-10,
15834  1.2443e-10, 1.2963e-10, 1.2632e-10, 1.1308e-10, 1.0186e-10,
15835  8.588e-11, 6.7863e-11, 5.1521e-11, 3.778e-11, 2.8842e-11,
15836  2.2052e-11, 1.7402e-11, 1.4406e-11, 1.1934e-11, 1.0223e-11,
15837  8.9544e-12, 7.9088e-12, 7.0675e-12, 6.2222e-12, 5.6051e-12,
15838  5.0502e-12, 4.5578e-12, 4.2636e-12, 3.9461e-12, 3.7599e-12,
15839  3.5215e-12, 3.2467e-12, 3.0018e-12, 2.6558e-12, 2.3928e-12,
15840  2.0707e-12, 1.7575e-12, 1.5114e-12, 1.2941e-12, 1.1004e-12,
15841  9.5175e-13, 8.2894e-13, 7.3253e-13, 6.5551e-13, 5.9098e-13,
15842  5.3548e-13, 4.8697e-13, 4.4413e-13, 4.06e-13, 3.7188e-13,
15843  3.4121e-13, 3.1356e-13, 2.8856e-13, 2.659e-13, 2.4533e-13,
15844  2.2663e-13, 2.096e-13, 1.9407e-13, 1.799e-13, 1.6695e-13,
15845  1.5512e-13, 1.4429e-13, 1.3437e-13, 1.2527e-13, 1.1693e-13,
15846  1.0927e-13, 1.0224e-13, 9.5767e-14, 8.9816e-14, 8.4335e-14,
15847  7.9285e-14, 7.4626e-14, 7.0325e-14, 6.6352e-14, 6.2676e-14,
15848  5.9274e-14, 5.6121e-14, 5.3195e-14, 5.0479e-14, 4.7953e-14,
15849  4.5602e-14, 4.3411e-14, 4.1367e-14, 3.9456e-14, 3.767e-14,
15850  3.5996e-14, 3.4427e-14, 3.2952e-14, 3.1566e-14, 3.0261e-14,
15851  2.903e-14, 2.7868e-14, 2.677e-14, 2.573e-14, 2.4745e-14,
15852  2.3809e-14, 2.2921e-14, 2.2076e-14, 2.1271e-14, 2.0504e-14,
15853  1.9772e-14, 1.9073e-14, 1.8404e-14, 1.7764e-14, 1.7151e-14,
15854  1.6564e-14, 1.6e-14, 1.5459e-14, 1.4939e-14, 1.4439e-14,
15855  1.3958e-14, 1.3495e-14, 1.3049e-14, 1.262e-14, 1.2206e-14,
15856  1.1807e-14, 1.1422e-14, 1.105e-14, 1.0691e-14, 1.0345e-14,
15857  1.001e-14, 9.687e-15, 9.3747e-15, 9.0727e-15, 8.7808e-15,
15858  8.4986e-15, 8.2257e-15, 7.9617e-15, 7.7064e-15, 7.4594e-15,
15859  7.2204e-15, 6.9891e-15, 6.7653e-15, 6.5488e-15, 6.3392e-15,
15860  6.1363e-15, 5.9399e-15, 5.7499e-15, 5.5659e-15, 5.3878e-15,
15861  5.2153e-15, 5.0484e-15, 4.8868e-15, 4.7303e-15, 4.5788e-15,
15862  4.4322e-15, 4.2902e-15, 4.1527e-15, 4.0196e-15, 3.8907e-15,
15863  3.7659e-15, 3.6451e-15, 3.5281e-15, 3.4149e-15, 3.3052e-15,
15864  3.1991e-15, 3.0963e-15, 2.9967e-15, 2.9004e-15, 2.8071e-15,
15865  2.7167e-15, 2.6293e-15, 2.5446e-15, 2.4626e-15, 2.3833e-15,
15866  2.3064e-15, 2.232e-15, 2.16e-15, 2.0903e-15, 2.0228e-15,
15867  1.9574e-15, 1.8942e-15, 1.8329e-15, 1.7736e-15, 1.7163e-15,
15868  1.6607e-15, 1.6069e-15, 1.5548e-15, 1.5044e-15, 1.4557e-15,
15869  1.4084e-15, 1.3627e-15, 1.3185e-15, 1.2757e-15, 1.2342e-15,
15870  1.1941e-15, 1.1552e-15, 1.1177e-15, 1.0813e-15, 1.0461e-15,
15871  1.012e-15, 9.79e-16, 9.4707e-16, 9.1618e-16, 8.8628e-16,
15872  8.5734e-16, 8.2933e-16, 8.0223e-16, 7.76e-16, 7.5062e-16,
15873  7.2606e-16, 7.0229e-16, 6.7929e-16, 6.5703e-16, 6.355e-16,
15874  6.1466e-16, 5.9449e-16, 5.7498e-16, 5.561e-16, 5.3783e-16,
15875  5.2015e-16, 5.0305e-16, 4.865e-16, 4.7049e-16, 4.55e-16,
15876  4.4002e-16, 4.2552e-16, 4.1149e-16, 3.9792e-16, 3.8479e-16,
15877  3.7209e-16, 3.5981e-16, 3.4792e-16, 3.3642e-16, 3.253e-16,
15878  3.1454e-16, 3.0413e-16, 2.9406e-16, 2.8432e-16, 2.749e-16,
15879  2.6579e-16, 2.5697e-16, 2.4845e-16, 2.402e-16, 2.3223e-16,
15880  2.2451e-16, 2.1705e-16, 2.0984e-16, 2.0286e-16, 1.9611e-16,
15881  1.8958e-16, 1.8327e-16, 1.7716e-16, 1.7126e-16, 1.6555e-16,
15882  1.6003e-16, 1.5469e-16, 1.4952e-16, 1.4453e-16, 1.397e-16,
15883  1.3503e-16 } };
15884 
15885 struct s_sh2ob_ {
15886  double e_1[3];
15887  int e_2;
15888  } sh2ob_ = { {-20., 2e4, 10.}, 2003 };
15889 
15890 struct s_s260a_ {
15891  double e_1[2003];
15892  } s260a_ = { {.1775, .17045, .16457, .17045, .1775, .20036, .21347, .22454,
15893  .23428, .23399, .23022, .20724, .19712, .18317, .16724, .1478,
15894  .12757, .11626, .10098, .089033, .07977, .067416, .059588,
15895  .051117, .046218, .042179, .034372, .029863, .025252, .022075,
15896  .019209, .015816, .013932, .011943, .010079, .0087667, .0074094,
15897  .0064967, .0055711, .0048444, .0042552, .0036953, .0032824,
15898  .0029124, .0026102, .002337, .00211, .0019008, .0017145, .0015573,
15899  .0014206, .0012931, .0011803, .0010774, 9.8616e-4, 9.0496e-4,
15900  8.3071e-4, 7.6319e-4, 7.0149e-4, 6.4637e-4, 5.9566e-4, 5.4987e-4,
15901  5.0768e-4, 4.688e-4, 4.3317e-4, 4.0037e-4, 3.7064e-4, 3.4325e-4,
15902  3.1809e-4, 2.9501e-4, 2.7382e-4, 2.543e-4, 2.363e-4, 2.1977e-4,
15903  2.0452e-4, 1.9042e-4, 1.774e-4, 1.6544e-4, 1.5442e-4, 1.4425e-4,
15904  1.3486e-4, 1.2618e-4, 1.1817e-4, 1.1076e-4, 1.0391e-4, 9.7563e-5,
15905  9.1696e-5, 8.6272e-5, 8.1253e-5, 7.6607e-5, 7.2302e-5, 6.8311e-5,
15906  6.4613e-5, 6.1183e-5, 5.8001e-5, 5.5048e-5, 5.2307e-5, 4.9761e-5,
15907  4.7395e-5, 4.5197e-5, 4.3155e-5, 4.1256e-5, 3.9491e-5, 3.7849e-5,
15908  3.6324e-5, 3.4908e-5, 3.3594e-5, 3.2374e-5, 3.1244e-5, 3.0201e-5,
15909  2.924e-5, 2.8356e-5, 2.7547e-5, 2.6814e-5, 2.6147e-5, 2.5551e-5,
15910  2.5029e-5, 2.4582e-5, 2.4203e-5, 2.3891e-5, 2.3663e-5, 2.3531e-5,
15911  2.3483e-5, 2.3516e-5, 2.3694e-5, 2.4032e-5, 2.4579e-5, 2.5234e-5,
15912  2.6032e-5, 2.7119e-5, 2.8631e-5, 3.0848e-5, 3.3262e-5, 3.6635e-5,
15913  4.0732e-5, 4.5923e-5, 5.3373e-5, 6.1875e-5, 7.2031e-5, 8.598e-5,
15914  9.8642e-5, 1.1469e-4, 1.3327e-4, 1.539e-4, 1.7513e-4, 2.0665e-4,
15915  2.3609e-4, 2.622e-4, 2.8677e-4, 3.259e-4, 3.8624e-4, 4.157e-4,
15916  4.5207e-4, 4.9336e-4, 5.45e-4, 5.8258e-4, 5.8086e-4, 5.6977e-4,
15917  5.3085e-4, 4.802e-4, 4.3915e-4, 4.0343e-4, 3.7853e-4, 3.7025e-4,
15918  3.9637e-4, 4.4675e-4, 4.7072e-4, 4.9022e-4, 5.2076e-4, 5.3676e-4,
15919  5.2755e-4, 4.8244e-4, 4.5473e-4, 4.3952e-4, 3.9614e-4, 3.4086e-4,
15920  2.9733e-4, 2.6367e-4, 2.3767e-4, 2.0427e-4, 1.7595e-4, 1.5493e-4,
15921  1.3851e-4, 1.1874e-4, 1.0735e-4, 9.049e-5, 8.1149e-5, 7.4788e-5,
15922  6.5438e-5, 5.8248e-5, 4.8076e-5, 4.3488e-5, 3.7856e-5, 3.3034e-5,
15923  2.9592e-5, 2.6088e-5, 2.3497e-5, 2.0279e-5, 1.7526e-5, 1.5714e-5,
15924  1.3553e-5, 1.2145e-5, 1.0802e-5, 9.7681e-6, 8.8196e-6, 7.8291e-6,
15925  7.1335e-6, 6.4234e-6, 5.8391e-6, 5.3532e-6, 4.9079e-6, 4.5378e-6,
15926  4.1716e-6, 3.8649e-6, 3.5893e-6, 3.3406e-6, 3.1199e-6, 2.9172e-6,
15927  2.7348e-6, 2.5644e-6, 2.4086e-6, 2.2664e-6, 2.1359e-6, 2.0159e-6,
15928  1.9051e-6, 1.8031e-6, 1.7074e-6, 1.6185e-6, 1.5356e-6, 1.4584e-6,
15929  1.3861e-6, 1.3179e-6, 1.2545e-6, 1.1951e-6, 1.1395e-6, 1.0873e-6,
15930  1.0384e-6, 9.925e-7, 9.4935e-7, 9.0873e-7, 8.705e-7, 8.3446e-7,
15931  8.0046e-7, 7.6834e-7, 7.38e-7, 7.0931e-7, 6.8217e-7, 6.5648e-7,
15932  6.3214e-7, 6.0909e-7, 5.8725e-7, 5.6655e-7, 5.4693e-7, 5.2835e-7,
15933  5.1077e-7, 4.9416e-7, 4.7853e-7, 4.6381e-7, 4.5007e-7, 4.3728e-7,
15934  4.255e-7, 4.145e-7, 4.0459e-7, 3.9532e-7, 3.8662e-7, 3.7855e-7,
15935  3.7041e-7, 3.6254e-7, 3.542e-7, 3.4617e-7, 3.3838e-7, 3.3212e-7,
15936  3.2655e-7, 3.1865e-7, 3.1203e-7, 3.067e-7, 3.0252e-7, 2.9749e-7,
15937  2.9184e-7, 2.8795e-7, 2.8501e-7, 2.8202e-7, 2.7856e-7, 2.7509e-7,
15938  2.7152e-7, 2.6844e-7, 2.6642e-7, 2.6548e-7, 2.6617e-7, 2.6916e-7,
15939  2.7372e-7, 2.8094e-7, 2.9236e-7, 3.1035e-7, 3.2854e-7, 3.5481e-7,
15940  3.9377e-7, 4.4692e-7, 5.0761e-7, 5.7715e-7, 6.7725e-7, 8.0668e-7,
15941  9.3716e-7, 1.0797e-6, 1.1689e-6, 1.3217e-6, 1.4814e-6, 1.5627e-6,
15942  1.6519e-6, 1.7601e-6, 1.906e-6, 2.0474e-6, 2.0716e-6, 2.0433e-6,
15943  1.9752e-6, 1.8466e-6, 1.7526e-6, 1.6657e-6, 1.587e-6, 1.5633e-6,
15944  1.652e-6, 1.8471e-6, 1.9953e-6, 2.0975e-6, 2.2016e-6, 2.2542e-6,
15945  2.3081e-6, 2.3209e-6, 2.2998e-6, 2.3056e-6, 2.2757e-6, 2.2685e-6,
15946  2.2779e-6, 2.2348e-6, 2.2445e-6, 2.3174e-6, 2.4284e-6, 2.529e-6,
15947  2.734e-6, 2.972e-6, 3.2332e-6, 3.5392e-6, 3.9013e-6, 4.3334e-6,
15948  4.9088e-6, 5.3428e-6, 5.9142e-6, 6.6106e-6, 7.4709e-6, 8.5019e-6,
15949  9.6835e-6, 1.0984e-5, 1.2831e-5, 1.4664e-5, 1.708e-5, 2.0103e-5,
15950  2.4148e-5, 2.7948e-5, 3.2855e-5, 3.9046e-5, 4.6429e-5, 5.6633e-5,
15951  6.6305e-5, 7.6048e-5, 8.7398e-5, 1.0034e-4, 1.1169e-4, 1.2813e-4,
15952  1.3354e-4, 1.3952e-4, 1.4204e-4, 1.4615e-4, 1.5144e-4, 1.5475e-4,
15953  1.6561e-4, 1.7135e-4, 1.6831e-4, 1.6429e-4, 1.6353e-4, 1.6543e-4,
15954  1.5944e-4, 1.5404e-4, 1.5458e-4, 1.6287e-4, 1.7277e-4, 1.8387e-4,
15955  1.7622e-4, 1.636e-4, 1.5273e-4, 1.3667e-4, 1.2364e-4, 9.7576e-5,
15956  7.914e-5, 6.4241e-5, 5.1826e-5, 4.1415e-5, 3.1347e-5, 2.5125e-5,
15957  2.0027e-5, 1.6362e-5, 1.3364e-5, 1.1117e-5, 9.4992e-6, 8.1581e-6,
15958  7.1512e-6, 6.2692e-6, 5.5285e-6, 4.9e-6, 4.3447e-6, 3.8906e-6,
15959  3.4679e-6, 3.1089e-6, 2.8115e-6, 2.5496e-6, 2.2982e-6, 2.0861e-6,
15960  1.8763e-6, 1.7035e-6, 1.5548e-6, 1.4107e-6, 1.2839e-6, 1.1706e-6,
15961  1.0709e-6, 9.8099e-7, 8.9901e-7, 8.2394e-7, 7.5567e-7, 6.9434e-7,
15962  6.3867e-7, 5.8845e-7, 5.4263e-7, 5.0033e-7, 4.6181e-7, 4.2652e-7,
15963  3.9437e-7, 3.6497e-7, 3.3781e-7, 3.1292e-7, 2.9011e-7, 2.6915e-7,
15964  2.4989e-7, 2.3215e-7, 2.1582e-7, 2.0081e-7, 1.87e-7, 1.7432e-7,
15965  1.6264e-7, 1.5191e-7, 1.4207e-7, 1.3306e-7, 1.2484e-7, 1.1737e-7,
15966  1.1056e-7, 1.0451e-7, 9.906e-8, 9.4135e-8, 8.9608e-8, 8.5697e-8,
15967  8.1945e-8, 7.8308e-8, 7.4808e-8, 7.1686e-8, 6.8923e-8, 6.5869e-8,
15968  6.3308e-8, 6.084e-8, 5.8676e-8, 5.6744e-8, 5.5016e-8, 5.3813e-8,
15969  5.2792e-8, 5.2097e-8, 5.1737e-8, 5.1603e-8, 5.1656e-8, 5.1989e-8,
15970  5.2467e-8, 5.2918e-8, 5.3589e-8, 5.456e-8, 5.5869e-8, 5.7403e-8,
15971  5.8968e-8, 6.0973e-8, 6.3432e-8, 6.6245e-8, 6.9353e-8, 7.2686e-8,
15972  7.6541e-8, 8.0991e-8, 8.595e-8, 9.1429e-8, 9.7851e-8, 1.0516e-7,
15973  1.1349e-7, 1.2295e-7, 1.3335e-7, 1.4488e-7, 1.5864e-7, 1.7412e-7,
15974  1.914e-7, 2.1078e-7, 2.3369e-7, 2.5996e-7, 2.8848e-7, 3.2169e-7,
15975  3.5991e-7, 4.0566e-7, 4.5969e-7, 5.3094e-7, 6.1458e-7, 7.1155e-7,
15976  8.3045e-7, 9.9021e-7, 1.2042e-6, 1.4914e-6, 1.8145e-6, 2.221e-6,
15977  2.7831e-6, 3.4533e-6, 4.4446e-6, 5.1989e-6, 6.2289e-6, 7.1167e-6,
15978  8.3949e-6, 9.6417e-6, 1.0313e-5, 1.0485e-5, 1.0641e-5, 1.0898e-5,
15979  1.0763e-5, 1.0506e-5, 1.0497e-5, 1.1696e-5, 1.2654e-5, 1.3029e-5,
15980  1.3175e-5, 1.4264e-5, 1.4985e-5, 1.4999e-5, 1.4317e-5, 1.4616e-5,
15981  1.4963e-5, 1.5208e-5, 1.4942e-5, 1.3879e-5, 1.3087e-5, 1.1727e-5,
15982  1.0515e-5, 9.0073e-6, 7.3133e-6, 6.1181e-6, 5.0623e-6, 4.1105e-6,
15983  3.3915e-6, 2.6711e-6, 2.1464e-6, 1.7335e-6, 1.4302e-6, 1.1847e-6,
15984  9.9434e-7, 8.2689e-7, 7.0589e-7, 6.075e-7, 5.3176e-7, 4.6936e-7,
15985  4.1541e-7, 3.6625e-7, 3.2509e-7, 2.9156e-7, 2.6308e-7, 2.3819e-7,
15986  2.1421e-7, 1.9366e-7, 1.7626e-7, 1.5982e-7, 1.4567e-7, 1.3354e-7,
15987  1.2097e-7, 1.1029e-7, 1.0063e-7, 9.2003e-8, 8.4245e-8, 7.7004e-8,
15988  7.0636e-8, 6.4923e-8, 5.9503e-8, 5.4742e-8, 5.045e-8, 4.647e-8,
15989  4.2881e-8, 3.955e-8, 3.6541e-8, 3.3803e-8, 3.1279e-8, 2.8955e-8,
15990  2.6858e-8, 2.4905e-8, 2.3146e-8, 2.1539e-8, 2.0079e-8, 1.8746e-8,
15991  1.7517e-8, 1.6396e-8, 1.5369e-8, 1.4426e-8, 1.3543e-8, 1.2724e-8,
15992  1.1965e-8, 1.1267e-8, 1.0617e-8, 1.001e-8, 9.4662e-9, 8.9553e-9,
15993  8.4988e-9, 8.0807e-9, 7.7043e-9, 7.3721e-9, 7.0707e-9, 6.8047e-9,
15994  6.5702e-9, 6.3634e-9, 6.1817e-9, 6.0239e-9, 5.8922e-9, 5.7824e-9,
15995  5.7019e-9, 5.6368e-9, 5.594e-9, 5.5669e-9, 5.5583e-9, 5.5653e-9,
15996  5.5837e-9, 5.6243e-9, 5.6883e-9, 5.78e-9, 5.8964e-9, 6.0429e-9,
15997  6.2211e-9, 6.4282e-9, 6.6634e-9, 6.9306e-9, 7.2336e-9, 7.5739e-9,
15998  7.9562e-9, 8.3779e-9, 8.8575e-9, 9.3992e-9, 1.0004e-8, 1.0684e-8,
15999  1.145e-8, 1.232e-8, 1.3311e-8, 1.4455e-8, 1.5758e-8, 1.7254e-8,
16000  1.8927e-8, 2.093e-8, 2.3348e-8, 2.6074e-8, 2.9221e-8, 3.277e-8,
16001  3.7485e-8, 4.2569e-8, 4.8981e-8, 5.5606e-8, 6.2393e-8, 7.1901e-8,
16002  8.2921e-8, 9.5513e-8, 1.1111e-7, 1.3143e-7, 1.5971e-7, 1.8927e-7,
16003  2.2643e-7, 2.786e-7, 3.2591e-7, 3.7024e-7, 4.2059e-7, 4.9432e-7,
16004  5.5543e-7, 5.7498e-7, 5.921e-7, 6.1005e-7, 6.1577e-7, 5.9193e-7,
16005  5.6602e-7, 5.7403e-7, 6.005e-7, 6.4723e-7, 6.7073e-7, 7.5415e-7,
16006  8.0982e-7, 8.7658e-7, 9.143e-7, 9.4459e-7, 9.8347e-7, 9.8768e-7,
16007  1.0153e-6, 1.0066e-6, 1.0353e-6, 1.0353e-6, 1.0722e-6, 1.1138e-6,
16008  1.1923e-6, 1.2947e-6, 1.4431e-6, 1.6537e-6, 1.8662e-6, 2.2473e-6,
16009  2.6464e-6, 3.1041e-6, 3.4858e-6, 4.0167e-6, 4.6675e-6, 5.0983e-6,
16010  5.7997e-6, 6.0503e-6, 6.4687e-6, 6.5396e-6, 6.7986e-6, 7.0244e-6,
16011  7.2305e-6, 7.6732e-6, 7.9783e-6, 7.9846e-6, 7.7617e-6, 7.7657e-6,
16012  7.7411e-6, 7.8816e-6, 7.8136e-6, 8.0051e-6, 8.5799e-6, 9.1659e-6,
16013  9.8646e-6, 9.492e-6, 8.767e-6, 8.2034e-6, 7.2297e-6, 6.2324e-6,
16014  4.9315e-6, 3.9128e-6, 3.1517e-6, 2.4469e-6, 1.8815e-6, 1.4627e-6,
16015  1.1698e-6, 9.4686e-7, 7.8486e-7, 6.697e-7, 5.8811e-7, 5.2198e-7,
16016  4.6809e-7, 4.1671e-7, 3.7006e-7, 3.3066e-7, 2.9387e-7, 2.6415e-7,
16017  2.3409e-7, 2.0991e-7, 1.9132e-7, 1.7519e-7, 1.5939e-7, 1.4368e-7,
16018  1.305e-7, 1.1883e-7, 1.0772e-7, 9.6884e-8, 8.7888e-8, 7.8956e-8,
16019  7.1024e-8, 6.3824e-8, 5.7256e-8, 5.1769e-8, 4.7037e-8, 4.2901e-8,
16020  3.897e-8, 3.5467e-8, 3.2502e-8, 2.9827e-8, 2.7389e-8, 2.5111e-8,
16021  2.3056e-8, 2.1267e-8, 1.961e-8, 1.8133e-8, 1.6775e-8, 1.5491e-8,
16022  1.4329e-8, 1.3265e-8, 1.23e-8, 1.142e-8, 1.0593e-8, 9.8475e-9,
16023  9.1585e-9, 8.5256e-9, 7.9525e-9, 7.4226e-9, 6.9379e-9, 6.495e-9,
16024  6.0911e-9, 5.7242e-9, 5.3877e-9, 5.0821e-9, 4.8051e-9, 4.5554e-9,
16025  4.3315e-9, 4.1336e-9, 3.9632e-9, 3.8185e-9, 3.708e-9, 3.6296e-9,
16026  3.5804e-9, 3.5776e-9, 3.6253e-9, 3.7115e-9, 3.8151e-9, 3.9804e-9,
16027  4.1742e-9, 4.3581e-9, 4.5306e-9, 4.7736e-9, 5.1297e-9, 5.5291e-9,
16028  5.9125e-9, 6.4956e-9, 7.0362e-9, 7.5318e-9, 7.9947e-9, 8.6438e-9,
16029  9.7227e-9, 1.013e-8, 1.0549e-8, 1.1064e-8, 1.1702e-8, 1.2043e-8,
16030  1.1781e-8, 1.1838e-8, 1.1917e-8, 1.2131e-8, 1.2476e-8, 1.3611e-8,
16031  1.436e-8, 1.5057e-8, 1.6247e-8, 1.7284e-8, 1.842e-8, 1.8352e-8,
16032  1.8722e-8, 1.9112e-8, 1.9092e-8, 1.9311e-8, 1.9411e-8, 1.9884e-8,
16033  2.0508e-8, 2.151e-8, 2.3143e-8, 2.505e-8, 2.7596e-8, 3.1231e-8,
16034  3.626e-8, 4.341e-8, 5.224e-8, 6.3236e-8, 7.7522e-8, 9.8688e-8,
16035  1.1859e-7, 1.4341e-7, 1.6798e-7, 1.9825e-7, 2.2898e-7, 2.6257e-7,
16036  2.9884e-7, 3.3247e-7, 3.4936e-7, 3.5583e-7, 3.715e-7, 3.658e-7,
16037  3.7124e-7, 3.703e-7, 4.1536e-7, 4.6656e-7, 4.6677e-7, 4.7507e-7,
16038  4.9653e-7, 5.3795e-7, 5.4957e-7, 5.2238e-7, 5.469e-7, 5.6569e-7,
16039  5.9844e-7, 5.9835e-7, 5.6522e-7, 5.4123e-7, 4.7904e-7, 4.2851e-7,
16040  3.5603e-7, 2.8932e-7, 2.3655e-7, 1.8592e-7, 1.4943e-7, 1.1971e-7,
16041  9.8482e-8, 8.3675e-8, 7.127e-8, 6.2496e-8, 5.4999e-8, 4.9821e-8,
16042  4.5387e-8, 4.134e-8, 3.7453e-8, 3.3298e-8, 3.012e-8, 2.7032e-8,
16043  2.4236e-8, 2.15e-8, 1.8988e-8, 1.7414e-8, 1.5706e-8, 1.4192e-8,
16044  1.3204e-8, 1.1759e-8, 1.0737e-8, 9.6309e-9, 8.8179e-9, 8.2619e-9,
16045  7.2264e-9, 6.4856e-9, 5.8037e-9, 5.2093e-9, 4.7205e-9, 4.1749e-9,
16046  3.7852e-9, 3.3915e-9, 3.0089e-9, 2.7335e-9, 2.4398e-9, 2.2031e-9,
16047  1.9786e-9, 1.789e-9, 1.6266e-9, 1.483e-9, 1.3576e-9, 1.2518e-9,
16048  1.1587e-9, 1.0726e-9, 9.9106e-10, 9.1673e-10, 8.5084e-10,
16049  7.9147e-10, 7.2882e-10, 6.7342e-10, 6.2593e-10, 5.8294e-10,
16050  5.4435e-10, 5.0997e-10, 4.7806e-10, 4.4931e-10, 4.2357e-10,
16051  4.0023e-10, 3.7909e-10, 3.5999e-10, 3.4285e-10, 3.2776e-10,
16052  3.1468e-10, 3.0377e-10, 2.9479e-10, 2.8877e-10, 2.8512e-10,
16053  2.8617e-10, 2.8976e-10, 3.0001e-10, 3.1718e-10, 3.3898e-10,
16054  3.5857e-10, 3.8358e-10, 4.3131e-10, 4.5741e-10, 4.6948e-10,
16055  4.7594e-10, 4.9529e-10, 5.1563e-10, 4.9475e-10, 4.8369e-10,
16056  4.8829e-10, 5.0047e-10, 5.0203e-10, 5.1954e-10, 5.5352e-10,
16057  5.9928e-10, 6.7148e-10, 7.1121e-10, 7.4317e-10, 7.6039e-10,
16058  7.8313e-10, 8.0684e-10, 7.8553e-10, 7.8312e-10, 7.8537e-10,
16059  7.8872e-10, 8.0185e-10, 8.1004e-10, 8.2608e-10, 8.2525e-10,
16060  8.3857e-10, 8.792e-10, 9.2451e-10, 9.8661e-10, 1.0629e-9,
16061  1.1659e-9, 1.2922e-9, 1.4387e-9, 1.6254e-9, 1.8425e-9, 2.1428e-9,
16062  2.5477e-9, 3.0379e-9, 3.757e-9, 4.4354e-9, 5.1802e-9, 6.2769e-9,
16063  7.4894e-9, 8.7474e-9, 9.8037e-9, 1.1582e-8, 1.3293e-8, 1.4471e-8,
16064  1.5025e-8, 1.558e-8, 1.6228e-8, 1.6413e-8, 1.602e-8, 1.6393e-8,
16065  1.7545e-8, 1.959e-8, 2.1449e-8, 2.3856e-8, 2.705e-8, 3.0214e-8,
16066  3.3733e-8, 3.6487e-8, 3.9353e-8, 4.266e-8, 4.6385e-8, 4.9955e-8,
16067  5.5313e-8, 6.0923e-8, 6.8948e-8, 7.3649e-8, 8.2602e-8, 9.2212e-8,
16068  9.908e-8, 1.1319e-7, 1.179e-7, 1.2941e-7, 1.3199e-7, 1.3914e-7,
16069  1.4843e-7, 1.53e-7, 1.6419e-7, 1.7095e-7, 1.6988e-7, 1.6494e-7,
16070  1.6327e-7, 1.6067e-7, 1.6909e-7, 1.7118e-7, 1.8106e-7, 1.9857e-7,
16071  2.1696e-7, 2.3385e-7, 2.2776e-7, 2.1402e-7, 1.9882e-7, 1.7362e-7,
16072  1.4308e-7, 1.1158e-7, 8.8781e-8, 6.8689e-8, 5.2062e-8, 4.0427e-8,
16073  3.2669e-8, 2.7354e-8, 2.32e-8, 2.058e-8, 1.8676e-8, 1.7329e-8,
16074  1.6621e-8, 1.6433e-8, 1.6953e-8, 1.7134e-8, 1.7948e-8, 1.9107e-8,
16075  1.9875e-8, 2.1416e-8, 2.1556e-8, 2.2265e-8, 2.2171e-8, 2.2534e-8,
16076  2.3029e-8, 2.2828e-8, 2.3143e-8, 2.2965e-8, 2.2223e-8, 2.1108e-8,
16077  2.0265e-8, 1.9516e-8, 1.9941e-8, 2.0312e-8, 2.108e-8, 2.2611e-8,
16078  2.421e-8, 2.6069e-8, 2.5097e-8, 2.3318e-8, 2.1543e-8, 1.8942e-8,
16079  1.596e-8, 1.2386e-8, 9.934e-9, 7.7502e-9, 5.9462e-9, 4.5113e-9,
16080  3.5523e-9, 2.8844e-9, 2.3394e-9, 1.9584e-9, 1.6749e-9, 1.4624e-9,
16081  1.2809e-9, 1.1359e-9, 1.0087e-9, 9.0166e-10, 8.1079e-10,
16082  7.2219e-10, 6.4922e-10, 5.8803e-10, 5.329e-10, 4.859e-10,
16083  4.4111e-10, 4.0184e-10, 3.6644e-10, 3.3529e-10, 3.0789e-10,
16084  2.8286e-10, 2.6089e-10, 2.4125e-10, 2.2355e-10, 2.0783e-10,
16085  1.937e-10, 1.8088e-10, 1.6948e-10, 1.5929e-10, 1.5013e-10,
16086  1.4193e-10, 1.347e-10, 1.2841e-10, 1.2307e-10, 1.1865e-10,
16087  1.1502e-10, 1.1243e-10, 1.1099e-10, 1.1066e-10, 1.1216e-10,
16088  1.1529e-10, 1.2171e-10, 1.3128e-10, 1.4153e-10, 1.5962e-10,
16089  1.8048e-10, 2.0936e-10, 2.3165e-10, 2.5746e-10, 2.96e-10,
16090  3.3707e-10, 3.5267e-10, 3.5953e-10, 3.6822e-10, 3.8363e-10,
16091  3.8286e-10, 3.5883e-10, 3.6154e-10, 3.6653e-10, 3.8507e-10,
16092  4.025e-10, 4.4435e-10, 4.9889e-10, 5.6932e-10, 6.3599e-10,
16093  7.0281e-10, 7.5777e-10, 8.1279e-10, 8.891e-10, 9.34e-10,
16094  1.0076e-9, 1.0945e-9, 1.1898e-9, 1.3108e-9, 1.4725e-9, 1.7028e-9,
16095  1.9619e-9, 2.3527e-9, 2.6488e-9, 3.0327e-9, 3.4396e-9, 3.8797e-9,
16096  4.4115e-9, 4.6853e-9, 4.9553e-9, 4.9551e-9, 5.1062e-9, 5.0996e-9,
16097  5.1119e-9, 5.2283e-9, 5.8297e-9, 6.3439e-9, 6.2675e-9, 6.3296e-9,
16098  6.5173e-9, 7.1685e-9, 7.0528e-9, 6.8856e-9, 7.3182e-9, 7.699e-9,
16099  8.3461e-9, 8.1946e-9, 7.7153e-9, 7.2411e-9, 6.4511e-9, 5.7336e-9,
16100  4.6105e-9, 3.6962e-9, 2.9944e-9, 2.4317e-9, 1.9399e-9, 1.5331e-9,
16101  1.2633e-9, 1.0613e-9, 9.0136e-10, 7.9313e-10, 7.1543e-10,
16102  6.6485e-10, 6.4225e-10, 6.398e-10, 6.4598e-10, 6.7428e-10,
16103  7.027e-10, 7.4694e-10, 7.7946e-10, 7.9395e-10, 7.8716e-10,
16104  7.6933e-10, 7.622e-10, 7.4825e-10, 7.4805e-10, 7.6511e-10,
16105  7.6492e-10, 7.4103e-10, 7.1979e-10, 7.1686e-10, 7.3403e-10,
16106  7.1142e-10, 7.0212e-10, 7.1548e-10, 7.5253e-10, 8.0444e-10,
16107  8.2378e-10, 7.8004e-10, 7.1712e-10, 6.4978e-10, 5.7573e-10,
16108  4.8675e-10, 3.7945e-10, 3.0118e-10, 2.4241e-10, 1.91e-10,
16109  1.4816e-10, 1.1567e-10, 9.4183e-11, 7.766e-11, 6.527e-11,
16110  5.6616e-11, 4.9576e-11, 4.4137e-11, 3.9459e-11, 3.5759e-11,
16111  3.2478e-11, 2.9419e-11, 2.6703e-11, 2.4365e-11, 2.2412e-11,
16112  2.0606e-11, 1.9067e-11, 1.78e-11, 1.6695e-11, 1.5729e-11,
16113  1.4887e-11, 1.4135e-11, 1.3519e-11, 1.2992e-11, 1.2563e-11,
16114  1.2223e-11, 1.1962e-11, 1.1775e-11, 1.1657e-11, 1.1605e-11,
16115  1.1619e-11, 1.1697e-11, 1.1839e-11, 1.2046e-11, 1.2319e-11,
16116  1.2659e-11, 1.307e-11, 1.3553e-11, 1.4113e-11, 1.4754e-11,
16117  1.548e-11, 1.6298e-11, 1.7214e-11, 1.8236e-11, 1.9372e-11,
16118  2.0635e-11, 2.2036e-11, 2.359e-11, 2.5317e-11, 2.7242e-11,
16119  2.94e-11, 3.1849e-11, 3.4654e-11, 3.7923e-11, 4.1695e-11,
16120  4.6055e-11, 5.094e-11, 5.5624e-11, 6.0667e-11, 6.6261e-11,
16121  7.2692e-11, 7.9711e-11, 8.7976e-11, 9.6884e-11, 1.0775e-10,
16122  1.2093e-10, 1.3531e-10, 1.5404e-10, 1.7315e-10, 1.9862e-10,
16123  2.3341e-10, 2.7014e-10, 3.1716e-10, 3.6957e-10, 4.3233e-10,
16124  5.2566e-10, 6.2251e-10, 7.2149e-10, 8.3958e-10, 9.5931e-10,
16125  1.1388e-9, 1.2973e-9, 1.4442e-9, 1.5638e-9, 1.6974e-9, 1.8489e-9,
16126  1.983e-9, 2.172e-9, 2.3662e-9, 2.6987e-9, 3.1697e-9, 3.6907e-9,
16127  4.2625e-9, 4.7946e-9, 5.3848e-9, 6.0897e-9, 6.473e-9, 7.1483e-9,
16128  7.7432e-9, 8.0851e-9, 8.5013e-9, 8.5909e-9, 9.189e-9, 9.3124e-9,
16129  9.5936e-9, 9.8787e-9, 9.9036e-9, 9.6712e-9, 9.2036e-9, 9.0466e-9,
16130  8.938e-9, 9.1815e-9, 9.5092e-9, 1.0027e-8, 1.0876e-8, 1.1744e-8,
16131  1.1853e-8, 1.1296e-8, 1.0134e-8, 8.8245e-9, 7.393e-9, 5.715e-9,
16132  4.4884e-9, 3.4027e-9, 2.6054e-9, 2.079e-9, 1.7267e-9, 1.4724e-9,
16133  1.2722e-9, 1.1234e-9, 1.0186e-9, 9.468e-10, 8.8854e-10,
16134  8.5127e-10, 8.3157e-10, 8.2226e-10, 8.3395e-10, 8.3294e-10,
16135  8.4725e-10, 8.8814e-10, 9.3697e-10, 1.0112e-9, 1.0412e-9,
16136  1.0948e-9, 1.181e-9, 1.2267e-9, 1.369e-9, 1.4512e-9, 1.5568e-9,
16137  1.6552e-9, 1.7321e-9, 1.8797e-9, 1.921e-9, 1.9686e-9, 1.9917e-9,
16138  1.9357e-9, 1.8486e-9, 1.7575e-9, 1.7113e-9, 1.7163e-9, 1.7623e-9,
16139  1.8536e-9, 1.9765e-9, 2.1334e-9, 2.3237e-9, 2.3259e-9, 2.1833e-9,
16140  1.9785e-9, 1.7308e-9, 1.4596e-9, 1.1198e-9, 8.7375e-10,
16141  6.5381e-10, 4.8677e-10, 3.6756e-10, 2.9155e-10, 2.3735e-10,
16142  1.959e-10, 1.6638e-10, 1.4549e-10, 1.2947e-10, 1.1511e-10,
16143  1.0548e-10, 9.6511e-11, 9.0469e-11, 8.517e-11, 7.7804e-11,
16144  7.1971e-11, 6.6213e-11, 6.1063e-11, 5.5881e-11, 5.0508e-11,
16145  4.5932e-11, 4.1997e-11, 3.7672e-11, 3.3972e-11, 3.0318e-11,
16146  2.6769e-11, 2.3874e-11, 2.1336e-11, 1.9073e-11, 1.7313e-11,
16147  1.5904e-11, 1.4684e-11, 1.3698e-11, 1.2873e-11, 1.2175e-11,
16148  1.1542e-11, 1.1024e-11, 1.0602e-11, 1.0267e-11, 1.0012e-11,
16149  9.8379e-12, 9.7482e-12, 9.7564e-12, 9.8613e-12, 1.0092e-11,
16150  1.0418e-11, 1.0868e-11, 1.1585e-11, 1.2351e-11, 1.3372e-11,
16151  1.4841e-11, 1.6457e-11, 1.8681e-11, 2.055e-11, 2.2912e-11,
16152  2.5958e-11, 2.9137e-11, 3.2368e-11, 3.4848e-11, 3.8462e-11,
16153  4.219e-11, 4.5629e-11, 4.9022e-11, 5.4232e-11, 6.19e-11,
16154  7.1953e-11, 8.5368e-11, 9.9699e-11, 1.1734e-10, 1.4185e-10,
16155  1.7017e-10, 1.9813e-10, 2.3859e-10, 2.7304e-10, 3.0971e-10,
16156  3.5129e-10, 3.9405e-10, 4.5194e-10, 4.8932e-10, 5.2436e-10,
16157  5.4098e-10, 5.5542e-10, 5.7794e-10, 5.6992e-10, 5.879e-10,
16158  6.1526e-10, 6.8034e-10, 6.7956e-10, 6.6864e-10, 6.9329e-10,
16159  7.2971e-10, 7.6546e-10, 7.5078e-10, 7.8406e-10, 8.3896e-10,
16160  9.0111e-10, 9.1994e-10, 8.7189e-10, 8.1426e-10, 7.3097e-10,
16161  6.3357e-10, 5.1371e-10, 4.0936e-10, 3.2918e-10, 2.6255e-10,
16162  2.0724e-10, 1.6879e-10, 1.4165e-10, 1.1989e-10, 1.0125e-10,
16163  8.9629e-11, 7.8458e-11, 6.8826e-11, 6.0935e-11, 5.5208e-11,
16164  5.2262e-11, 5.026e-11, 4.8457e-11, 4.7888e-11, 4.8032e-11,
16165  5.0838e-11, 5.4668e-11, 5.579e-11, 6.0056e-11, 6.3811e-11,
16166  6.8848e-11, 7.459e-11, 7.8249e-11, 8.3371e-11, 8.3641e-11,
16167  8.6591e-11, 8.9599e-11, 9.3487e-11, 1.0066e-10, 1.0765e-10,
16168  1.0851e-10, 1.0619e-10, 1.0557e-10, 1.046e-10, 1.0796e-10,
16169  1.0523e-10, 1.0674e-10, 1.1261e-10, 1.1431e-10, 1.1408e-10,
16170  1.0901e-10, 9.9105e-11, 8.8077e-11, 6.9928e-11, 5.4595e-11,
16171  4.5401e-11, 3.6313e-11, 2.6986e-11, 1.9463e-11, 1.4577e-11,
16172  1.1583e-11, 9.5492e-12, 8.077e-12, 6.9642e-12, 6.0966e-12,
16173  5.4046e-12, 4.8431e-12, 4.3815e-12, 3.9987e-12, 3.679e-12,
16174  3.4113e-12, 3.1868e-12, 2.9992e-12, 2.8434e-12, 2.7153e-12,
16175  2.612e-12, 2.5311e-12, 2.4705e-12, 2.429e-12, 2.4053e-12,
16176  2.3988e-12, 2.4087e-12, 2.4349e-12, 2.4771e-12, 2.5355e-12,
16177  2.6103e-12, 2.7019e-12, 2.811e-12, 2.9383e-12, 3.0848e-12,
16178  3.2518e-12, 3.4405e-12, 3.6527e-12, 3.8902e-12, 4.1555e-12,
16179  4.451e-12, 4.7801e-12, 5.1462e-12, 5.5539e-12, 6.0086e-12,
16180  6.5171e-12, 7.0884e-12, 7.7357e-12, 8.4831e-12, 9.3096e-12,
16181  1.0282e-11, 1.1407e-11, 1.269e-11, 1.4148e-11, 1.5888e-11,
16182  1.7992e-11, 2.0523e-11, 2.3342e-11, 2.6578e-11, 3.0909e-11,
16183  3.6228e-11, 4.2053e-11, 4.9059e-11, 5.9273e-11, 7.0166e-11,
16184  8.2298e-11, 9.7071e-11, 1.1673e-10, 1.401e-10, 1.6621e-10,
16185  2.0127e-10, 2.3586e-10, 2.705e-10, 3.095e-10, 3.6584e-10,
16186  4.1278e-10, 4.6591e-10, 5.222e-10, 5.5246e-10, 6.15e-10,
16187  6.5878e-10, 7.1167e-10, 7.9372e-10, 8.6975e-10, 9.6459e-10,
16188  9.7368e-10, 9.8142e-10, 1.0202e-9, 1.02e-9, 1.0356e-9, 1.0092e-9,
16189  1.0269e-9, 1.0366e-9, 1.049e-9, 1.0717e-9, 1.0792e-9, 1.1016e-9,
16190  1.0849e-9, 1.0929e-9, 1.0971e-9, 1.0969e-9, 1.046e-9, 9.2026e-10,
16191  8.1113e-10, 6.8635e-10, 5.5369e-10, 4.2908e-10, 3.3384e-10,
16192  2.648e-10, 2.081e-10, 1.6915e-10, 1.4051e-10, 1.1867e-10,
16193  1.0158e-10, 8.899e-11, 7.9175e-11, 7.044e-11, 6.3453e-11,
16194  5.7009e-11, 5.1662e-11, 4.7219e-11, 4.3454e-11, 4.0229e-11,
16195  3.7689e-11, 3.6567e-11, 3.5865e-11, 3.5955e-11, 3.5928e-11,
16196  3.6298e-11, 3.7629e-11, 3.93e-11, 4.1829e-11, 4.4806e-11,
16197  5.0534e-11, 5.6672e-11, 6.2138e-11, 6.8678e-11, 7.6111e-11,
16198  8.4591e-11, 9.2634e-11, 9.8085e-11, 1.083e-10, 1.1949e-10,
16199  1.2511e-10, 1.3394e-10, 1.3505e-10, 1.4342e-10, 1.4874e-10,
16200  1.492e-10, 1.5872e-10, 1.5972e-10, 1.5821e-10, 1.5425e-10,
16201  1.4937e-10, 1.5089e-10, 1.5521e-10, 1.6325e-10, 1.6924e-10,
16202  1.8265e-10, 1.9612e-10, 2.0176e-10, 1.9359e-10, 1.7085e-10,
16203  1.5197e-10, 1.2646e-10, 9.8552e-11, 7.453e-11, 5.5052e-11,
16204  4.2315e-11, 3.2736e-11, 2.6171e-11, 2.1909e-11, 1.8286e-11,
16205  1.5752e-11, 1.3859e-11, 1.2288e-11, 1.1002e-11, 9.7534e-12,
16206  8.8412e-12, 8.0169e-12, 7.2855e-12, 6.8734e-12, 6.4121e-12,
16207  6.1471e-12, 5.778e-12, 5.3478e-12, 4.9652e-12, 4.4043e-12,
16208  3.9862e-12, 3.4684e-12, 2.9681e-12, 2.5791e-12, 2.2339e-12,
16209  1.9247e-12, 1.6849e-12, 1.4863e-12, 1.3291e-12, 1.2021e-12,
16210  1.0947e-12, 1.0015e-12, 9.1935e-13, 8.4612e-13, 7.8036e-13,
16211  7.21e-13, 6.6718e-13, 6.1821e-13, 5.7353e-13, 5.3269e-13,
16212  4.9526e-13, 4.6093e-13, 4.2937e-13, 4.0034e-13, 3.7361e-13,
16213  3.4895e-13, 3.2621e-13, 3.052e-13, 2.8578e-13, 2.6782e-13,
16214  2.512e-13, 2.3581e-13, 2.2154e-13, 2.0832e-13, 1.9605e-13,
16215  1.8466e-13, 1.7408e-13, 1.6425e-13, 1.5511e-13, 1.4661e-13,
16216  1.3869e-13, 1.3131e-13, 1.2444e-13, 1.1803e-13, 1.1205e-13,
16217  1.0646e-13, 1.0124e-13, 9.6358e-14, 9.1789e-14, 8.7509e-14,
16218  8.3498e-14, 7.9735e-14, 7.6202e-14, 7.2882e-14, 6.976e-14,
16219  6.6822e-14, 6.4053e-14, 6.1442e-14, 5.8978e-14, 5.665e-14,
16220  5.4448e-14, 5.2364e-14, 5.0389e-14, 4.8516e-14, 4.6738e-14,
16221  4.5048e-14, 4.3441e-14, 4.1911e-14, 4.0453e-14, 3.9063e-14,
16222  3.7735e-14, 3.6467e-14, 3.5254e-14, 3.4093e-14, 3.298e-14,
16223  3.1914e-14, 3.0891e-14, 2.9909e-14, 2.8965e-14, 2.8058e-14,
16224  2.7185e-14, 2.6344e-14, 2.5535e-14, 2.4755e-14, 2.4002e-14,
16225  2.3276e-14, 2.2576e-14, 2.1899e-14, 2.1245e-14, 2.0613e-14,
16226  2.0002e-14, 1.9411e-14, 1.8839e-14, 1.8285e-14, 1.7749e-14,
16227  1.723e-14, 1.6727e-14, 1.624e-14, 1.5768e-14, 1.531e-14,
16228  1.4867e-14, 1.4436e-14, 1.4019e-14, 1.3614e-14, 1.3221e-14,
16229  1.284e-14, 1.2471e-14, 1.2112e-14, 1.1764e-14, 1.1425e-14,
16230  1.1097e-14, 1.0779e-14, 1.0469e-14, 1.0169e-14, 9.8775e-15,
16231  9.5943e-15, 9.3193e-15, 9.0522e-15, 8.7928e-15, 8.5409e-15,
16232  8.2962e-15, 8.0586e-15, 7.8278e-15, 7.6036e-15, 7.3858e-15,
16233  7.1742e-15, 6.9687e-15, 6.7691e-15, 6.5752e-15, 6.3868e-15,
16234  6.2038e-15, 6.026e-15, 5.8533e-15, 5.6856e-15, 5.5226e-15,
16235  5.3642e-15, 5.2104e-15, 5.061e-15, 4.9158e-15, 4.7748e-15,
16236  4.6378e-15, 4.5047e-15, 4.3753e-15, 4.2497e-15, 4.1277e-15,
16237  4.0091e-15, 3.8939e-15, 3.782e-15, 3.6733e-15, 3.5677e-15,
16238  3.4651e-15, 3.3655e-15, 3.2686e-15, 3.1746e-15, 3.0832e-15,
16239  2.9944e-15, 2.9082e-15, 2.8244e-15, 2.7431e-15, 2.664e-15,
16240  2.5872e-15, 2.5126e-15, 2.4401e-15, 2.3697e-15, 2.3014e-15,
16241  2.2349e-15, 2.1704e-15, 2.1077e-15, 2.0468e-15, 1.9877e-15,
16242  1.9302e-15, 1.8744e-15, 1.8202e-15, 1.7675e-15, 1.7164e-15,
16243  1.6667e-15, 1.6184e-15, 1.5716e-15, 1.526e-15, 1.4818e-15,
16244  1.4389e-15, 1.3971e-15, 1.3566e-15, 1.3172e-15, 1.279e-15,
16245  1.2419e-15, 1.2058e-15, 1.1708e-15, 1.1368e-15, 1.1037e-15,
16246  1.0716e-15, 1.0405e-15, 1.0102e-15, 9.8079e-16, 9.5224e-16,
16247  9.2451e-16, 8.9758e-16, 8.7142e-16, 8.4602e-16, 8.2136e-16,
16248  7.974e-16, 7.7414e-16, 7.5154e-16, 7.2961e-16, 7.083e-16,
16249  6.8761e-16, 6.6752e-16, 6.4801e-16, 6.2906e-16, 6.1066e-16,
16250  5.928e-16, 5.7545e-16, 5.586e-16, 5.4224e-16, 5.2636e-16,
16251  5.1094e-16, 4.9596e-16} };
16252 
16253 struct s_s260b_ {
16254  double e_1[3];
16255  int e_2;
16256  } s260b_ = { {-20., 2e4, 10.}, 2003 };
16257 
16258 struct s_consts_ {
16259  double e_1[9];
16260  } consts_ = { {3.1415927410125732, 6.62606876e-27, 1.3806503e-16,
16261  29979245800., 6.02214199e23, 2.6867775e19, 83144720.,
16262  1.191042722e-12, 1.4387752} };
16263 
16264 
16265 /* Table of constant values */
16266 
16267 /*
16268 static integer c__9 = 9;
16269 static integer c__1 = 1;
16270 static integer c__2 = 2;
16271 static integer c__5 = 5;
16272 static int cs__0 = 0;
16273 */
16274 // FIXME static double c_b125 = 0.;
16275 
16276 /* ############################################################################ */
16277 /* path: $Source: /srv/svn/cvs/cvsroot/arts/src/continua.cc,v $ */
16278 /* author: $Author $ */
16279 /* revision: $Revision: 1.26.2.21 $ */
16280 /* created: $Date: 2005/06/09 11:01:30 $ */
16281 /* ############################################################################ */
16282 
16283 /* CKD2.4 TEST */
16284 /* TKS, 2002-02-28 */
16285 /* CALL : g77 -c testckd.f ; g77 testckd.o -o testckd */
16286 
16287 /* ############################################################################ */
16288 /* ----------------------------------------------------------------------------- */
16289 
16290 /* INPUT PARAMETERS: */
16291 /* P [hPa] TOTAL PRESSURE */
16292 /* T [K] TEMPERATURE */
16293 /* VMRH2O [1] H2O VOLUME MIXING RATIO */
16294 /* VMRN2 [1] N2 VOLUME MIXING RATIO */
16295 /* VMRO2 [1] O2 VOLUME MIXING RATIO */
16296 /* FREQ [Hz] FREQUENCY OF ABSORPTION CALCULATION */
16297 
16298 
16299 /* OUTPUT PARAMETER: */
16300 /* artsckd_ [1/m] ABSORPTION COEFFICIENT */
16301 
16302 /* ----------------------------------------------------------------------------- */
16303 
16304 double artsckd_(double p, double t, double vmrh2o,
16305  double vmrn2, double vmro2, double freq, int ivc)
16306 {
16307  /* Initialized data */
16308 
16309  static double xslf = 1.;
16310  static double xfrg = 1.;
16311  static double xcn2 = 1.;
16312 
16313  /* System generated locals */
16314  double ret_val=0.0e0;
16315  // FIXME double d__1, d__2, d__3, d__4;
16316 
16317  /* Local variables */
16318  // FIXME int iosa;
16319  double w_wv__, oc_n2, radct;
16320  double w_other__, w_n2__, w_o2__;
16321  double of_wv, os_wv, p0, xn_wv__, t0, rhofac, wn, xn, xn0, tksvpt, rft;
16322 
16323  extern int initi_(double, double , double *,
16324  double *, double *, double *, double *,
16325  double *, double *, double *, double *,
16326  double *, double *);
16327  extern double fwv_(int , double , double *, double *,
16328  double *, double *, double *, double *);
16329  extern double swv_(int , double , double , double *, double *
16330  , double *, double *, double *, double *,
16331  double *);
16332  extern double conti_n2__(double , double , double *,
16333  double *, double *, double *, double *);
16334 
16335 
16336 /* PROGRAM: MODM */
16337 /* ------- */
16338 
16339 /* AUTHOR: Sid-Ahmed Boukabara */
16340 /* ------ */
16341 
16342 /* AFFILIATION: ATMOSPHERIC AND ENVIRONMENTAL RESEARCH INC. */
16343 /* ----------- */
16344 
16345 /* DATE OF CREATION : October 1998 */
16346 /* ---------------- */
16347 
16348 /* AIM: This program is aimed at the calculation of the */
16349 /* --- atmospheric optical depths. The spectral validity depends */
16350 /* only on the region covered by the file:"spectral_lines.dat" */
16351 /* The components treated here are the water vapor, the */
16352 /* oxygen, the ozone, the nitrogen and nitrogen dioxide. */
16353 
16354 /* - IVC : Flag of contin. vers.: CKD2.4(if=2) MPMf87/s93 (if=3) */
16355 /* - ICP : Flag to take(if =1) or not (if=0) the line coupling */
16356 /* - NWN : Number of wavenumbers to be treated */
16357 /* - WN : Vector of NWN wavenumbers [in cm-1], one should note that */
16358 /* this input could be a scalar (associated with NWN=1) */
16359 /* - NLAY : Number of layers to be treated. */
16360 /* - P : Vector of NLAY pressures (in mbar), one should note that */
16361 /* this input could be a scalar (associated with NLAY=1) */
16362 /* - T : Vector of NLAY temperatures [in Kelvin] */
16363 /* - W_WV : Vector of NLAY water vapor column amounts [in molecules/cm2] */
16364 /* - W_O2 : Vector of NLAY oxygen column amounts [in molecules/cm2] */
16365 /* - W_N2 : Vector of NLAY nitrogen column amounts [in molecules/cm2] */
16366 /* - W_OTHER : Vector of NLAY of other species column amounts [in molecules/cm2] */
16367 /* - CLW : Vector of NLAY Cloud Liquid Water amounts [in kg/m2 or mm] */
16368 /* When Cloud is present, the frequency must be consistent */
16369 /* with Rayleigh absorption (no scattering performed in */
16370 /* monortm). */
16371 /* - XSLF : Scaling factor of the self WV continuum (usually XSLF=1) */
16372 /* - XFRG : Scaling factor of the foreign WV continuum (usually XFRG=1) */
16373 /* - XCN2 : Scaling factor of the N2 continuum (usually XCN2=1) */
16374 /* - O : An array of NWNxNLAY elts containing the total optical depths */
16375 /* due to all the active species [in nepers] */
16376 /* - OS_WV : An array of NWNxNLAY elts containing the water vapor optical */
16377 /* depth (due to self continuum), [in Nepers] */
16378 /* - OF_WV : An array of NWNxNLAY elts containing the water vapor optical */
16379 /* depth (due to foreign continuum), [in Nepers] */
16380 /* - OC_N2 : An array of NWNxNLAY elts containing the nitrogen optical */
16381 /* depth (due to continuum), [in Nepers] */
16382 /* - O_CLW : An array of NWNxNLAY elts containing the CLW optical */
16383 /* depth , [in Nepers] */
16384 
16385 /* History of the modifications: */
16386 /* ***************************** */
16387 /* - written in 1999 by Sid Ahmed Boukabara, Ross Hoffman */
16388 /* and Tony Clough. */
16389 /* - validated against ARM sondes in the */
16390 /* microwave spectrum (23.8 and 31.4 GHz). SAB, 2000. */
16391 /* - extended to more species by Sid Ahmed Boukabara in 03/2000. */
16392 /* - cleaned up and commented in 2001 for first public release. */
16393 /* Also put under CVS configuration management. SAB. */
16394 /* - Extended O2 lines to submillimeter. Extensive validation */
16395 /* by comparison to Rosenkranz model and MWR data. */
16396 /* Update of the LBLATM module (accepts inputs at pressure */
16397 /* grid, along with altitude grid). */
16398 /* Fixed the handling of N2 amount coming from LBLATM (which */
16399 /* depends on the number of molecules NMOL). */
16400 /* Adopted accurate constants values. */
16401 /* Sid Ahmed Boukabara. Dec 14th 2001. */
16402 /* - Updated on January 7th 2002. ARM option (INP=2) updated and */
16403 /* made more efficient after Jim's comments. (INP=3) option optimized. */
16404 /* WV line intensities modified in the microwave (see Tony's email). */
16405 
16406 /* Comments should be forwarded to Sid Ahmed Boukabara (sboukaba@aer.com) */
16407 /* or Tony Clough (clough@aer.com). */
16408 
16409 /* ============================================================================ */
16410 
16411 
16412 /* TKS functions: */
16413 
16414 /* scaling factor (SLF cont) */
16415 /* scaling factor (FRG cont) */
16416 /* scaling factor (N2 cont) */
16417 
16418 
16419  w_wv__ = 0.0e0;
16420  w_o2__ = 0.0e0;
16421  w_n2__ = 0.0e0;
16422  w_other__ = 0.0e0;
16423  ret_val = 0.0e0;
16424  rft = 0.0e0;
16425  os_wv = 0.0e0;
16426  of_wv = 0.0e0;
16427  oc_n2 = 0.0e0;
16428 
16429 /* ---INPUTS & GENERAL CONTROL PARAMETERS */
16430 
16431  /* set H2O, O2 and N2 number density to column amount [molec/cm2] */
16432  /* TKSVPT = P[Pa] / T[K] */
16433  tksvpt = (p * 100.0) / t;
16434  /* 7.242923e16 = k_B [J/K] * 1.0e-6 [m^3/cm^3] */
16435  w_wv__ = vmrh2o * 7.242923e16 * tksvpt;
16436  w_o2__ = vmro2 * 7.242923e16 * tksvpt;
16437  w_n2__ = vmrn2 * 7.242923e16 * tksvpt;
16438  w_other__ = (1.0000E0-vmrh2o-vmro2-vmrn2) * 7.242923e16 * tksvpt;
16439 
16440  /* frequency [Hz] to wave number [cm-1] */
16441  wn = freq / 29979245800.0;
16442  //cout << "CKD2.4 H2O column amounts [molec/cm2] =" << w_wv__ << "\n";
16443  //cout << "CKD2.4 O2 column amounts [molec/cm2] =" << w_o2__ << "\n";
16444  //cout << "CKD2.4 H2O column amounts [molec/cm2] =" << w_n2__ << "\n";
16445  //cout << "CKD2.4 others column amounts [molec/cm2] =" << w_other__ << "\n";
16446  //cout << "freq=" << freq << " Hz, wave num=" << wn << " cm-1\n";
16447 
16448 /* ---------------------------------------------------------------------------- */
16449 
16450 /* --- INITIALIZATION ----------------------------------------- */
16451  initi_(p, t, &radct, &t0, &p0, &w_wv__, &w_o2__, &w_n2__, &w_other__, &
16452  xn0, &xn, &xn_wv__, &rhofac);
16453  //cout << "CKD2.4 t0=" << t0 << " p0=" << p0 << "\n";
16454  //cout << "radct =" << radct << "\n";
16455  //cout << "xn0 =" << xn0 << "\n";
16456  //cout << "xn =" << xn << "\n";
16457  //cout << "xn_wv__ =" << xn_wv__ << "\n";
16458  //cout << "rhofac =" << rhofac << "\n";
16459 
16460  /* --- RAD_FIELD_TERM ----------------------------------------- */
16461  rft = wn * tanh(radct * wn / (t * 2));
16462  //cout << "rft =" << rft << "\n";
16463 
16464  /* --- H2O CONTINUUM TERM ------------------------------------- */
16465 
16466  if (ivc == 21) {
16467  /* CKD2.4 CONT_SELF_WV [Np/m] */
16468  os_wv = 1.0000e2 * swv_(2, wn, t, &t0, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xslf);
16469  //cout << "CKD2.4 ivc=21, H2O self cont [in Np/m] =" << os_wv << "\n";
16470  return os_wv;
16471  }
16472  if (ivc == 31) {
16473  /* MPMf87/s93 CONT_SELF_WV [Np/m] */
16474  os_wv = 1.0000e2 * swv_(3, wn, t, &t0, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xslf);
16475  //cout << "CKD2.4 ivc=31, H2O self cont [in Np/m] =" << os_wv << "\n";
16476  return os_wv;
16477  }
16478  if (ivc == 22) {
16479  /* CKD2.4 CONT_FRGN_WV [Np/m] */
16480  of_wv = 1.0000e2 * fwv_(2, wn, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xfrg);
16481  //cout << "CKD2.4 ivc=22, H2O foreign cont [in Np/m] =" << of_wv << "\n";
16482  return of_wv;
16483  }
16484  if (ivc == 32) {
16485  /* MPMf87/s93 CONT_FRGN_WV [Np/m] */
16486  of_wv = 1.0000e2 * fwv_(3, wn, &w_wv__, &rft, &xn, &xn_wv__, &xn0, &xfrg);
16487  //cout << "CKD2.4 ivc=32, H2O foreign cont [in Np/m] =" << of_wv << "\n";
16488  return of_wv ;
16489  }
16490 
16491  /* --- N2 CONTINUUM TERM [Np/m] ----------------------------------- */
16492  if (ivc == 1) {
16493  oc_n2 = 1.0000e2 * conti_n2__(wn, t, &t0, &w_n2__, &rft, &rhofac, &xcn2);
16494  //cout << "CKD2.4 ivc=1, N2 cont [in Np/m] =" << oc_n2 << "\n";
16495  return oc_n2;
16496  }
16497 
16498  /* --- TOTAL ABSORPTION IN [in Np/m] --------------------------- */
16499  // cout << "CKD2.4 H2O s+f cont [in Np/m] =" << ((os_wv+of_wv) * 1.0000e2) << "\n";
16500  //ret_val = ((os_wv + of_wv + oc_n2) * 1.0000e2);
16501 
16502 // FIXME L999:
16503 
16504  return ret_val; // [Np/m]
16505 } /* artsckd_ */
16506 
16507 
16508 /* ############################################################################ */
16509 /* foreign continuum functions -------------------------------------------- */
16510 double fwv_(int ivc, double wn, double *w_wv__, double *rft,
16511  double *xn, double *xn_wv__, double *xn0, double *xfrg)
16512 {
16513  /* System generated locals */
16514  double ret_val = 0.0e0;
16515 
16516  /* Local variables */
16517  extern double fwv24_(double , double *, double *,
16518  double *, double *, double *, double *),
16519  fwv_mpmf87s93__(double , double *, double *,
16520  double *, double *, double *, double *);
16521 
16522  ret_val = 0.0e0;
16523 
16524 /* --- CKD2.4 CONTINUUM ------------------------------------- */
16525  if (ivc == 2 && *w_wv__ > 0.) {
16526  ret_val = fwv24_(wn, w_wv__, rft, xn, xn_wv__, xn0, xfrg);
16527  }
16528 
16529 
16530 /* --- MPMf87s93 CONTINUUM ---------------------------------- */
16531  if (ivc == 3 && *w_wv__ > 0.) {
16532  ret_val = fwv_mpmf87s93__(wn, w_wv__, rft, xn, xn_wv__, xn0, xfrg);
16533  }
16534 
16535  return ret_val;
16536 } /* fwv_ */
16537 
16538 double fwv_mpmf87s93__(double wn, double *w_wv__, double *rft,
16539  double *xn, double *xn_wv__, double *xn0, double *xfrg)
16540 {
16541  /* System generated locals */
16542  double ret_val=0.0e0;
16543 
16544  /* Local variables */
16545  extern double xlgr_(double *, double *);
16546  int i__, j;
16547  double x[4], fscal, xf;
16548 
16549  ret_val = 0.0e0;
16550 
16551  j = (int) ((wn - fh2ob_1.v1) / fh2ob_1.dv) + 1;
16552 
16553  for (i__ = 1; i__ <= 4; ++i__) {
16554  x[i__ - 1] = fh2oa_1.fh2o[j + i__ - 3];
16555  }
16556 
16557  xf = (wn - (fh2ob_1.v1 + fh2ob_1.dv * (double) (j - 1))) /
16558  fh2ob_1.dv;
16559  fscal = .8;
16560  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_wv__ * *rft * ((*xn - *xn_wv__) / *
16561  xn0)) * fscal * *xfrg;
16562 
16563 /* L999: */
16564  return ret_val;
16565 } /* fwv_mpmf87s93__ */
16566 
16567 double fwv24_(double wn, double *w_wv__, double *rft,
16568  double *xn, double *xn_wv__, double *xn0, double *
16569  xfrg)
16570 {
16571  /* Initialized data */
16572 
16573  static double v0f1 = 350.;
16574  static double hwsqf1 = 4e4;
16575  static double betaf1 = 5e-9;
16576  static double factrf1 = -.7;
16577  static double v0f1a = 630.;
16578  static double hwsqf1a = 4225.;
16579  static double betaf1a = 2e-8;
16580  static double factrf1a = .75;
16581  static double v0f2 = 1130.;
16582  static double hwsqf2 = 108900.;
16583  static double betaf2 = 8e-11;
16584  static double factrf2 = -.97;
16585  static double v0f3 = 1975.;
16586  static double hwsqf3 = 62500.;
16587  static double betaf3 = 5e-6;
16588  static double factrf3 = -.65;
16589 
16590  /* System generated locals */
16591  double ret_val=0.0e0;
16592  double d__1;
16593 
16594  /* Local variables */
16595  extern double xlgr_(double *, double *);
16596  int i__, j;
16597  double x[4], fscal, xf, vf2, vf4, vf6;
16598 
16599  ret_val = 0.0e0;
16600 
16601  j = (int) ((wn - fh2ob_1.v1) / fh2ob_1.dv) + 1;
16602  for (i__ = 1; i__ <= 4; ++i__) {
16603  x[i__ - 1] = fh2oa_1.fh2o[j + i__ - 3];
16604  }
16605 
16606  xf = (wn - (fh2ob_1.v1 + fh2ob_1.dv * (double) (j - 1))) /
16607  fh2ob_1.dv;
16608 
16609 /* ---added correction to the forgn continuum */
16610 /* Computing 2nd power */
16611  d__1 = wn - v0f1;
16612  vf2 = d__1 * d__1;
16613  vf6 = vf2 * vf2 * vf2;
16614  fscal = factrf1 * (hwsqf1 / (vf2 + betaf1 * vf6 + hwsqf1)) + 1.;
16615 /* Computing 2nd power */
16616  d__1 = wn - v0f1a;
16617  vf2 = d__1 * d__1;
16618  vf6 = vf2 * vf2 * vf2;
16619  fscal *= factrf1a * (hwsqf1a / (vf2 + betaf1a * vf6 + hwsqf1a)) + 1.;
16620 /* Computing 2nd power */
16621  d__1 = wn - v0f2;
16622  vf2 = d__1 * d__1;
16623  vf6 = vf2 * vf2 * vf2;
16624  fscal *= factrf2 * (hwsqf2 / (vf2 + betaf2 * vf6 + hwsqf2)) + 1.;
16625 /* Computing 2nd power */
16626  d__1 = wn - v0f3;
16627  vf2 = d__1 * d__1;
16628  vf4 = vf2 * vf2;
16629  fscal *= factrf3 * (hwsqf3 / (vf2 + betaf3 * vf4 + hwsqf3)) + 1.;
16630  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_wv__ * *rft * ((*xn - *xn_wv__) / *
16631  xn0)) * fscal * *xfrg;
16632 
16633 /* L999: */
16634  return ret_val;
16635 } /* fwv24_ */
16636 
16637 
16638 
16639 /* self continuum function ------------------------------------------------ */
16640 double swv_(int ivc, double wn, double t, double *t0,
16641  double *w_wv__, double *rft, double *xn, double *
16642  xn_wv__, double *xn0, double *xslf)
16643 {
16644  /* System generated locals */
16645  double ret_val;
16646 
16647  /* Local variables */
16648  extern double swv_mpmf87s93__(double , double , double *
16649  , double *, double *, double *, double *,
16650  double *, double *);
16651  extern double swv24_(double , double ,
16652  double *, double *, double *, double *,
16653  double *, double *, double *);
16654 
16655  ret_val = 0.;
16656 
16657 /* CKD2.4 CONTINUUM */
16658  if (ivc == 2 && *w_wv__ > 0.) {
16659 /* CNT_SLF_WV CKD2.4 */
16660  ret_val = swv24_(wn, t, t0, w_wv__, rft, xn, xn_wv__, xn0, xslf);
16661  }
16662 
16663  if (ivc == 3 && *w_wv__ > 0.) {
16664 /* MPMf87s93 CKD2.4 CONT. */
16665 /* CNT_SLF_WV */
16666  ret_val = swv_mpmf87s93__(wn, t, t0, w_wv__, rft, xn, xn_wv__, xn0,
16667  xslf);
16668  }
16669 
16670  return ret_val;
16671 } /* swv_ */
16672 
16673 
16674 
16675 double swv24_(double wn, double t, double *t0, double *
16676  w_wv__, double *rft, double * /* xn */, double *xn_wv__,
16677  double *xn0, double *xslf)
16678 {
16679  /* Initialized data */
16680 
16681  static double v0s1 = 0.;
16682  static double hwsq1 = 1e4;
16683  static double betas1 = 1e-4;
16684  static double factrs1 = .688;
16685  static double v0s2 = 1050.;
16686  static double hwsq2 = 4e4;
16687  static double factrs2 = -.2333;
16688  static double v0s3 = 1310.;
16689  static double hwsq3 = 14400.;
16690  static double betas3 = 5e-6;
16691  static double factrs3 = -.15;
16692 
16693  /* System generated locals */
16694  double ret_val, d__1, d__2;
16695 
16696  /* Local variables */
16697  double sfac;
16698  extern double xlgr_(double *, double *);
16699  int j;
16700  double x[4], xf, vs2, vs4;
16701 
16702 /* ---UNITS(CM**3/MOL)*1.E-20 */
16703 
16704  ret_val = 0.;
16705 
16706  j = (int) ((wn - sh2ob_1.v1) / sh2ob_1.dv) + 1;
16707  d__1 = s260a_1.swv260[j - 2] / sh2oa_1.swv296[j - 2];
16708  d__2 = (t - *t0) / (260. - *t0);
16709  x[0] = sh2oa_1.swv296[j - 2] * pow(d__1, d__2);
16710  d__1 = s260a_1.swv260[j - 1] / sh2oa_1.swv296[j - 1];
16711  d__2 = (t - *t0) / (260. - *t0);
16712  x[1] = sh2oa_1.swv296[j - 1] * pow(d__1, d__2);
16713  d__1 = s260a_1.swv260[j] / sh2oa_1.swv296[j];
16714  d__2 = (t - *t0) / (260. - *t0);
16715  x[2] = sh2oa_1.swv296[j] * pow(d__1, d__2);
16716  d__1 = s260a_1.swv260[j + 1] / sh2oa_1.swv296[j + 1];
16717  d__2 = (t - *t0) / (260. - *t0);
16718  x[3] = sh2oa_1.swv296[j + 1] * pow(d__1, d__2);
16719  xf = (wn - (sh2ob_1.v1 + sh2ob_1.dv * (double) (j - 1))) /
16720  sh2ob_1.dv;
16721  sfac = 1.;
16722 /* Computing 2nd power */
16723  d__1 = wn - v0s1;
16724  vs2 = d__1 * d__1;
16725  vs4 = vs2 * vs2;
16726 /* Computing 2nd power */
16727  d__1 = wn;
16728  sfac *= factrs1 * (hwsq1 / (d__1 * d__1 + betas1 * vs4 + hwsq1)) + 1.;
16729 /* Computing 2nd power */
16730  d__1 = wn - v0s2;
16731  vs2 = d__1 * d__1;
16732  sfac *= factrs2 * (hwsq2 / (vs2 + hwsq2)) + 1.;
16733 /* Computing 2nd power */
16734  d__1 = wn - v0s3;
16735  vs2 = d__1 * d__1;
16736  vs4 = vs2 * vs2;
16737  sfac *= factrs3 * (hwsq3 / (vs2 + betas3 * vs4 + hwsq3)) + 1.;
16738  ret_val = *w_wv__ * *rft * (*xn_wv__ / *xn0) * xlgr_(&xf, x) * 1e-20 *
16739  sfac * *xslf;
16740 
16741  return ret_val;
16742 } /* swv24_ */
16743 
16744 double swv_mpmf87s93__(double wn, double t, double *t0,
16745  double *w_wv__, double *rft, double * /* xn */, double *
16746  xn_wv__, double *xn0, double *xslf)
16747 {
16748  /* System generated locals */
16749  double ret_val, d__1, d__2;
16750 
16751  /* Local variables */
16752  double sfac;
16753  extern double xlgr_(double *, double *);
16754  int j;
16755  double x[4], xf;
16756 
16757 /* ---UNITS(CM**3/MOL)*1.E-20 */
16758 
16759  ret_val = 0.;
16760 
16761  j = (int) ((wn - sh2ob_1.v1) / sh2ob_1.dv) + 1;
16762  d__1 = s260a_1.swv260[j - 2] / sh2oa_1.swv296[j - 2];
16763  d__2 = (t - *t0) / (260. - *t0);
16764  x[0] = sh2oa_1.swv296[j - 2] * pow(d__1, d__2);
16765  d__1 = s260a_1.swv260[j - 1] / sh2oa_1.swv296[j - 1];
16766  d__2 = (t - *t0) / (260. - *t0);
16767  x[1] = sh2oa_1.swv296[j - 1] * pow(d__1, d__2);
16768  d__1 = s260a_1.swv260[j] / sh2oa_1.swv296[j];
16769  d__2 = (t - *t0) / (260. - *t0);
16770  x[2] = sh2oa_1.swv296[j] * pow(d__1, d__2);
16771  d__1 = s260a_1.swv260[j + 1] / sh2oa_1.swv296[j + 1];
16772  d__2 = (t - *t0) / (260. - *t0);
16773  x[3] = sh2oa_1.swv296[j + 1] * pow(d__1, d__2);
16774  xf = (wn - (sh2ob_1.v1 + sh2ob_1.dv * (double) (j - 1))) /
16775  sh2ob_1.dv;
16776  sfac = 3.;
16777  ret_val = *w_wv__ * *rft * (*xn_wv__ / *xn0) * xlgr_(&xf, x) * 1e-20 *
16778  sfac * *xslf;
16779 
16780 /* L999: */
16781  return ret_val;
16782 } /* swv_mpmf87s93__ */
16783 
16784 /* --- N2 continuum ------------------------------------------------------- */
16785 double conti_n2__(double wn, double t, double *t0,
16786  double *w_n2__, double *rft, double *rhofac, double *
16787  xcn2)
16788 {
16789  /* Initialized data */
16790 
16791  static double v1 = -10.;
16792  static double dv = 5.;
16793  static double ct296[73] = { 4.303e-7,4.85e-7,4.979e-7,4.85e-7,
16794  4.303e-7,3.715e-7,3.292e-7,3.086e-7,2.92e-7,2.813e-7,2.804e-7,
16795  2.738e-7,2.726e-7,2.724e-7,2.635e-7,2.621e-7,2.547e-7,2.428e-7,
16796  2.371e-7,2.228e-7,2.1e-7,1.991e-7,1.822e-7,1.697e-7,1.555e-7,
16797  1.398e-7,1.281e-7,1.138e-7,1.012e-7,9.078e-8,7.879e-8,6.944e-8,
16798  6.084e-8,5.207e-8,4.54e-8,3.897e-8,3.313e-8,2.852e-8,2.413e-8,
16799  2.045e-8,1.737e-8,1.458e-8,1.231e-8,1.031e-8,8.586e-9,7.162e-9,
16800  5.963e-9,4.999e-9,4.226e-9,3.607e-9,3.09e-9,2.669e-9,2.325e-9,
16801  2.024e-9,1.783e-9,1.574e-9,1.387e-9,1.236e-9,1.098e-9,9.777e-10,
16802  8.765e-10,7.833e-10,7.022e-10,6.317e-10,5.65e-10,5.1e-10,
16803  4.572e-10,4.115e-10,3.721e-10,3.339e-10,3.005e-10,2.715e-10,
16804  2.428e-10 };
16805  static double ct220[73] = { 4.946e-7,5.756e-7,5.964e-7,5.756e-7,
16806  4.946e-7,4.145e-7,3.641e-7,3.482e-7,3.34e-7,3.252e-7,3.299e-7,
16807  3.206e-7,3.184e-7,3.167e-7,2.994e-7,2.943e-7,2.794e-7,2.582e-7,
16808  2.468e-7,2.237e-7,2.038e-7,1.873e-7,1.641e-7,1.474e-7,1.297e-7,
16809  1.114e-7,9.813e-8,8.309e-8,7.059e-8,6.068e-8,5.008e-8,4.221e-8,
16810  3.537e-8,2.885e-8,2.407e-8,1.977e-8,1.605e-8,1.313e-8,1.057e-8,
16811  8.482e-9,6.844e-9,5.595e-9,4.616e-9,3.854e-9,3.257e-9,2.757e-9,
16812  2.372e-9,2.039e-9,1.767e-9,1.548e-9,1.346e-9,1.181e-9,1.043e-9,
16813  9.11e-10,8.103e-10,7.189e-10,6.314e-10,5.635e-10,4.976e-10,
16814  4.401e-10,3.926e-10,3.477e-10,3.085e-10,2.745e-10,2.416e-10,
16815  2.155e-10,1.895e-10,1.678e-10,1.493e-10,1.31e-10,1.154e-10,
16816  1.019e-10,8.855e-11 };
16817 
16818  /* System generated locals */
16819  double ret_val, d__1, d__2;
16820 
16821  /* Local variables */
16822  extern double xlgr_(double *, double *);
16823  int j;
16824  double x[4], xf;
16825 
16826 /* TKS INTEGER NPTCONTN2 */
16827 /* TKS INTEGER NPTCONTN2B */
16828 /* TKS & V1B,V2B,DVB */
16829 /* TKS DATA V2 / 350.0 / */
16830 /* TKS DATA NPTCONTN2 / 73 / */
16831 /* TKS DATA V1B, V2B, DVB, NPTCONTN2B / -10., 350., 5.0, 73 / */
16832 
16833 
16834 
16835  ret_val = 0.;
16836 /* TKS -- begin implementation of TKS */
16837  if (wn <= 0.) {
16838  ret_val = 0.;
16839  return ret_val;
16840  }
16841  if (wn > 350.) {
16842  ret_val = 0.;
16843  return ret_val;
16844  }
16845 /* TKS -- end implementation of TKS */
16846 
16847  if (*w_n2__ == 0.) {
16848  ret_val = 0.;
16849  return ret_val;
16850  }
16851 
16852  j = (int) ((wn - v1) / dv) + 1;
16853  d__1 = ct296[j - 2] / ct220[j - 2];
16854  d__2 = (t - *t0) / (220. - *t0);
16855  x[0] = ct296[j - 2] * pow(d__1, d__2);
16856  d__1 = ct296[j - 1] / ct220[j - 1];
16857  d__2 = (t - *t0) / (220. - *t0);
16858  x[1] = ct296[j - 1] * pow(d__1, d__2);
16859  d__1 = ct296[j] / ct220[j];
16860  d__2 = (t - *t0) / (220. - *t0);
16861  x[2] = ct296[j] * pow(d__1, d__2);
16862  d__1 = ct296[j + 1] / ct220[j + 1];
16863  d__2 = (t - *t0) / (220. - *t0);
16864  x[3] = ct296[j + 1] * pow(d__1, d__2);
16865  xf = (wn - (v1 + dv * (double) (j - 1))) / dv;
16866  ret_val = xlgr_(&xf, x) * 1e-20 * (*w_n2__ / .26867775 * *rft * *rhofac) *
16867  *xcn2;
16868 
16869  return ret_val;
16870 } /* conti_n2__ */
16871 
16872 /* --- 4 points Lagrange interpolation ----------------------------------- */
16873 double xlgr_(double *xf, double *x)
16874 {
16875  /* System generated locals */
16876  double ret_val;
16877 
16878  /* Local variables */
16879  double a[4], b;
16880 
16881 
16882 
16883 
16884 /* with continous derivatives */
16885  /* Parameter adjustments */
16886  --x;
16887 
16888  /* Function Body */
16889  b = *xf * .5 * (1. - *xf);
16890  a[0] = -b * (1. - *xf);
16891  a[1] = 1. - (3. - *xf * 2.) * *xf * *xf + b * *xf;
16892  a[2] = (3. - *xf * 2.) * *xf * *xf + b * (1. - *xf);
16893  a[3] = -(b * *xf);
16894  ret_val = a[0] * x[1] + a[1] * x[2] + a[2] * x[3] + a[3] * x[4];
16895 
16896 /* L999: */
16897  return ret_val;
16898 } /* xlgr_ */
16899 
16900 /* --- initializations ---------------------------------------------------- */
16901 int initi_(double p, double t, double *radct,
16902  double *t0, double *p0, double *w_wv__, double *
16903  w_o2__, double *w_n2__, double *w_other__, double *xn0,
16904  double *xn, double *xn_wv__, double *rhofac)
16905 {
16906  /* Initialized data */
16907 
16908  static double wvmolmass = 18.016;
16909  static double drymolmass = 28.97;
16910 
16911  double wdry, ratiomix, wvpress;
16912 
16913 /* [K] */
16914  *t0 = 296.;
16915 /* [hPa] */
16916  *p0 = 1013.25;
16917 
16918 /* [K/cm-1] */
16919  *radct = consts_1.planck * consts_1.clight / consts_1.boltz;
16920  *xn0 = *p0 / (consts_1.boltz * *t0) * 1e3;
16921  *xn = p / (consts_1.boltz * t) * 1e3;
16922  wdry = *w_o2__ + *w_n2__ + *w_other__;
16923  ratiomix = *w_wv__ * wvmolmass / (wdry * drymolmass);
16924  wvpress = ratiomix / (ratiomix + wvmolmass / drymolmass) * p;
16925  *xn_wv__ = wvpress / (consts_1.boltz * t) * 1e3;
16926  *rhofac = *w_n2__ / (wdry + *w_wv__) * (p / *p0) * (273.15 / t);
16927 
16928 /* L999: */
16929  return 0;
16930 } /* initi_ */
16931 
16932 /* ############################################################################ */
16933 /* ---Block data to be consistent with LBLRTM/LBLATM */
16934 /* Subroutine */ int phys_consts__(void)
16935 {
16936  return 0;
16937 } /* phys_consts__ */
16938 
16939 
16940 /* Pi was obtained from PI = 2.*ASIN(1.) */
16941 /* --------------------------------------------- */
16942 /* Constants from NIST 01/11/2002 */
16943 /* --------------------------------------------- */
16944 /* --------------------------------------------- */
16945 /* units are generally cgs */
16946 /* The first and second radiation constants are taken from NIST. */
16947 /* They were previously obtained from the relations: */
16948 /* RADCN1 = 2.*PLANCK*CLIGHT*CLIGHT*1.E-07 */
16949 /* RADCN2 = PLANCK*CLIGHT/BOLTZ */
16950 /* --------------------------------------------- */
16951 
16952 /* ############################################################################ */
16953 /* Subroutine */ int bsa296_(void)
16954 {
16955  return 0;
16956 } /* bsa296_ */
16957 
16958 
16959 
16960 
16961 
16962 
16963 
16964 /* Subroutine */ int bsb296_(void)
16965 {
16966  return 0;
16967 } /* bsb296_ */
16968 
16969 
16970 
16971 
16972 
16973 
16974 
16975 /* ---------------------------------------------------------------------------- */
16976 
16977 
16978 /* Subroutine */ int bs260a_(void)
16979 {
16980  return 0;
16981 } /* bs260a_ */
16982 
16983 
16984 
16985 
16986 
16987 
16988 
16989 
16990 /* Subroutine */ int bs260b_(void)
16991 {
16992  return 0;
16993 } /* bs260b_ */
16994 
16995 
16996 
16997 
16998 
16999 
17000 
17001 /* ---------------------------------------------------------------------------- */
17002 
17003 
17004 /* Subroutine */ int bfh2oa_(void)
17005 {
17006  return 0;
17007 } /* bfh2oa_ */
17008 
17009 
17010 
17011 
17012 
17013 
17014 
17015 
17016 /* Subroutine */ int bfh2ob_(void)
17017 {
17018  return 0;
17019 } /* bfh2ob_ */
17020 
17021 
17022 // ---------------------- end of monortm CKD F77 code --------------------------
n2n2tks_
Numeric n2n2tks_(double t, double f)
Definition: continua.cc:13277
bfh2oa_
int bfh2oa_(void)
Definition: continua.cc:17004
threej2_
double threej2_(void)
Definition: continua.cc:14691
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:14832
s_fh2ob_::e_2
int e_2
Definition: continua.cc:15517
fh2ob_1_::nptfh2o
int nptfh2o
Definition: continua.cc:15109
c_b43
static double c_b43
Definition: continua.cc:13214
Vardesc::addr
char * addr
Definition: continua.cc:12933
c_b79
static double c_b79
Definition: continua.cc:13235
s_app3b_::ns
int ns
Definition: continua.cc:13040
Namelist::vars
Vardesc ** vars
Definition: continua.cc:12941
u_bbbb_::s_m_1
Definition: continua.cc:13138
s260b_
struct s_s260b_ s260b_
N2N2_N2F_ckd_mt_100_v2
const Numeric N2N2_N2F_ckd_mt_100_v2
Definition: continua.h:3338
inlist::inopen
ftnint * inopen
Definition: continua.cc:12891
Rosenkranz_CO2_self_continuum
void Rosenkranz_CO2_self_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8334
c_b32
static double c_b32
Definition: continua.cc:13211
cllist::cerr
flag cerr
Definition: continua.cc:12873
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:13034
cilist::ciunit
ftnint ciunit
Definition: continua.cc:12842
cilist::cierr
flag cierr
Definition: continua.cc:12841
fh2ob_1_::v1
double v1
Definition: continua.cc:15108
MatrixView
The MatrixView class.
Definition: matpackI.h:476
c_b112
static double c_b112
Definition: continua.cc:13249
consts_1_
Definition: continua.cc:15155
dB_km_to_1_m
const Numeric dB_km_to_1_m
Definition: continua.cc:385
inlist::inrecl
ftnint * inrecl
Definition: continua.cc:12908
n2part_1_::q1
double q1
Definition: continua.cc:13114
conti_n2__
double conti_n2__(double wn, double t, double *t0, double *w_n2__, double *rft, double *rhofac, double *xcn2)
Definition: continua.cc:16785
fh2ob_1_
Definition: continua.cc:15107
inlist::inblanklen
ftnlen inblanklen
Definition: continua.cc:12911
c_b25
static double c_b25
Definition: continua.cc:13204
N2N2_CT296_ckd_mt_100
const double N2N2_CT296_ckd_mt_100[N2N2_CT296_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3283
CKD_241_co2
void CKD_241_co2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:3611
fh2ob_2_
Definition: continua.cc:15111
O2O2_O2F_ckd_mt_100_v1
const Numeric O2O2_O2F_ckd_mt_100_v1
Definition: continua.h:3403
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:969
u_bbbb_::s_m_1::il
int il
Definition: continua.cc:13139
olist::oblnk
char * oblnk
Definition: continua.cc:12868
bfh2ob_
int bfh2ob_(void)
Definition: continua.cc:17016
absorption.h
Declarations required for the calculation of absorption coefficients.
alist::aerr
flag aerr
Definition: continua.cc:12880
u_bba_::s_m_1
Definition: continua.cc:13058
b0
#define b0
Definition: continua.cc:13957
dimer_
struct s_dimer_ dimer_
c_b26
static double c_b26
Definition: continua.cc:13205
s_fh2ob_::e_1
double e_1[3]
Definition: continua.cc:15516
s_blockin_
Definition: continua.cc:13027
n2part_2_::jrange1
int jrange1
Definition: continua.cc:13119
u_bl3_
Definition: continua.cc:13125
inlist::innum
ftnint * innum
Definition: continua.cc:12892
c_b86
static double c_b86
Definition: continua.cc:13239
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:16901
O2O2_O2F_ckd_mt_100_npt
const int O2O2_O2F_ckd_mt_100_npt
Definition: continua.h:3406
u_bba_
Definition: continua.cc:13057
sh2oa_1_::swv296
double swv296[2003]
Definition: continua.cc:15120
u_bba_::s_m_1::alfa
double alfa
Definition: continua.cc:13059
cs__2
static int cs__2
Definition: continua.cc:13212
Pa_to_kPa
const Numeric Pa_to_kPa
Definition: continua.cc:367
c_b89
static double c_b89
Definition: continua.cc:13242
Rosenkranz_O2_continuum
void Rosenkranz_O2_continuum(MatrixView xsec, const Numeric S0in, const Numeric G0in, const Numeric XS0in, const Numeric XG0in, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:7468
O2_00_ckd_mt_100_v2
const Numeric O2_00_ckd_mt_100_v2
Definition: continua.h:3473
bsa296_
int bsa296_(void)
Definition: continua.cc:16953
inlist::infmtlen
ftnlen infmtlen
Definition: continua.cc:12903
s260b_2_::dv
double dv
Definition: continua.cc:15148
bs260b_
int bs260b_(void)
Definition: continua.cc:16990
K_fp
shortlogical(* K_fp)()
Definition: continua.cc:12980
s260b_2_::v1
double v1
Definition: continua.cc:15148
bsb296_
int bsb296_(void)
Definition: continua.cc:16964
XINT_FUN
Numeric XINT_FUN(const Numeric V1A, const Numeric, const Numeric DVA, const Numeric A[], const Numeric VI)
Definition: continua.cc:1962
s_n2part_
Definition: continua.cc:13184
inlist
Definition: continua.cc:12886
eb_ref
#define eb_ref(a_1, a_2)
c_b54
static double c_b54
Definition: continua.cc:13224
sh2ob_1_::dv
double dv
Definition: continua.cc:15126
energ_1_
Definition: continua.cc:13100
ik1k0
#define ik1k0
Definition: continua.cc:14731
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:3279
s_app3a_::dx
double dx
Definition: continua.cc:13034
cilist::cifmt
char * cifmt
Definition: continua.cc:12844
shortint
short int shortint
Definition: continua.cc:12802
O2O2_O2F_ckd_mt_100_dv
const Numeric O2O2_O2F_ckd_mt_100_dv
Definition: continua.h:3405
cllist::cunit
ftnint cunit
Definition: continua.cc:12874
q1
#define q1
Definition: continua.cc:13683
CKD_242_foreign_h2o
void CKD_242_foreign_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:2907
GHz_to_Hz
const Numeric GHz_to_Hz
Definition: continua.cc:361
inlist::inseq
char * inseq
Definition: continua.cc:12898
c_b115
static double c_b115
Definition: continua.cc:13252
O2O2_O2Fo_ckd_mt_100
const double O2O2_O2Fo_ckd_mt_100[O2O2_O2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3407
Standard_N2_self_continuum
void Standard_N2_self_continuum(MatrixView xsec, const Numeric Cin, const Numeric xfin, const Numeric xtin, const Numeric xpin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8222
beta
#define beta
Definition: continua.cc:13680
ivi
#define ivi
Definition: continua.cc:14188
c_b29
static double c_b29
Definition: continua.cc:13208
dnu
#define dnu
Definition: continua.cc:13264
FH2O_ckd_mt_100
const double FH2O_ckd_mt_100[FH2O_ckd_mt_100_npt+addF77fields]
Definition: continua.h:2657
Multitype::z
doublecomplex z
Definition: continua.cc:12924
SL296_ckd_mt_100_v2
const Numeric SL296_ckd_mt_100_v2
Definition: continua.h:1831
VOID
#define VOID
Definition: continua.cc:12914
sh2oa_
struct s_sh2oa_ sh2oa_
u_bbbb_::s_m_1::idelv
int idelv
Definition: continua.cc:13139
FCO2_ckd_mt_100_v2
const Numeric FCO2_ckd_mt_100_v2
Definition: continua.h:3065
N2N2_N2F_ckd_mt_100_dv
const Numeric N2N2_N2F_ckd_mt_100_dv
Definition: continua.h:3339
u_bbbb_
Definition: continua.cc:13137
MPM89H2OAbsModel
void MPM89H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:615
O2_10_ckd_mt_100_dv
const Numeric O2_10_ckd_mt_100_dv
Definition: continua.h:3593
Vardesc::dims
ftnlen * dims
Definition: continua.cc:12934
s260a_1_::swv260
double swv260[2003]
Definition: continua.cc:15138
rsilo_
struct s_rsilo_ rsilo_
consts_1_::gascon
double gascon
Definition: continua.cc:15156
dB_km_to_Np_m
const Numeric dB_km_to_Np_m
Definition: continua.cc:383
MPM93WaterDropletAbs
void MPM93WaterDropletAbs(MatrixView xsec, const Numeric CCin, const Numeric CGin, const Numeric CEin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8538
doublecomplex
Definition: continua.cc:12806
N2N2_CT220_ckd_mt_100
const double N2N2_CT220_ckd_mt_100[N2N2_CT220_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3313
slit
#define slit
Definition: continua.cc:14412
Standard_H2O_self_continuum
void Standard_H2O_self_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1636
MPM87O2AbsModel
void MPM87O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:5846
SL296_ckd_mt_100_dv
const Numeric SL296_ckd_mt_100_dv
Definition: continua.h:1832
like_1_::like
int like
Definition: continua.cc:13082
inlist::inblank
char * inblank
Definition: continua.cc:12910
n2part_2_::b0
double b0
Definition: continua.cc:13118
c_b93
static double c_b93
Definition: continua.cc:13246
Z_f
VOID Z_f
Definition: continua.cc:12987
CKD_222_foreign_h2o
void CKD_222_foreign_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:2381
fh2ob_
struct s_fh2ob_ fh2ob_
Namelist
Definition: continua.cc:12939
N2N2_CT296_ckd_mt_100_dv
const Numeric N2N2_CT296_ckd_mt_100_dv
Definition: continua.h:3281
hPa_to_Pa
const Numeric hPa_to_Pa
Definition: continua.cc:369
u_bbbb_::s_m_1::ilp
int ilp
Definition: continua.cc:13139
s_sh2oa_::e_1
double e_1[2003]
Definition: continua.cc:15521
s_app3a_
Definition: continua.cc:13033
s_rsilo_
Definition: continua.cc:13045
s_app3b_
Definition: continua.cc:13039
FH2O_ckd_0
const double FH2O_ckd_0[FH2O_ckd_0_npt+addF77fields]
Definition: continua.h:971
s260b_1_::dv___
double dv___
Definition: continua.cc:15144
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:16640
u_bbbb_::s_m_2::ll
int ll
Definition: continua.cc:13142
c_b44
static double c_b44
Definition: continua.cc:13215
inlist::innamlen
ftnlen innamlen
Definition: continua.cc:12895
inlist::innrec
ftnint * innrec
Definition: continua.cc:12909
s_bbb_::ibound
int ibound
Definition: continua.cc:13095
s_consts_
Definition: continua.cc:16258
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.h:1491
SL260_ckd_mt_100_dv
const Numeric SL260_ckd_mt_100_dv
Definition: continua.h:2243
u_bl3_::s_m_2::rsibb
double rsibb[401]
Definition: continua.cc:13130
CKD_242_self_h2o
void CKD_242_self_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:2606
like_
struct s_like_ like_
Standard_H2O_foreign_continuum
void Standard_H2O_foreign_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1758
s260a_1_
Definition: continua.cc:15137
cilist
Definition: continua.cc:12841
N2N2_N2F_ckd_mt_100
const double N2N2_N2F_ckd_mt_100[N2N2_N2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3341
SL296_ckd_0_v2
const Numeric SL296_ckd_0_v2
Definition: continua.h:555
N2N2_N2F_ckd_mt_100_npt
const int N2N2_N2F_ckd_mt_100_npt
Definition: continua.h:3340
addF77fields
const int addF77fields
Definition: continua.h:530
CKD_mt_CIArot_n2
void CKD_mt_CIArot_n2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:4020
s_s260a_
Definition: continua.cc:15890
E_fp
doublereal(*)(* E_fp)()
Definition: continua.cc:12976
inlist::informlen
ftnint informlen
Definition: continua.cc:12905
s_n2part_::fill_1
double fill_1[1]
Definition: continua.cc:13185
s_s260a_::e_1
double e_1[2003]
Definition: continua.cc:15891
FCO2_ckd_mt_100_npt
const int FCO2_ckd_mt_100_npt
Definition: continua.h:3067
temp
#define temp
Definition: continua.cc:13261
s_s260b_
Definition: continua.cc:16253
u_bba_::m_1
struct u_bba_::s_m_1 m_1
blockin_
struct s_blockin_ blockin_
inlist::inerr
flag inerr
Definition: continua.cc:12886
olist::ofnmlen
ftnlen ofnmlen
Definition: continua.cc:12863
BF86_CIA_N2
void BF86_CIA_N2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:7762
CKD24_H20
void CKD24_H20(MatrixView xsec, int isf, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView n2_abs)
Definition: continua.cc:5132
s260b_2_::v2
double v2
Definition: continua.cc:15148
H_f
VOID H_f
Definition: continua.cc:12986
u_bbbb_::s_m_1::idell
int idell
Definition: continua.cc:13139
sh2ob_2_::dv
double dv
Definition: continua.cc:15130
array.h
This file contains the definition of Array.
SL260_ckd_mt_100_npt
const int SL260_ckd_mt_100_npt
Definition: continua.h:2244
sh2oa_1_
Definition: continua.cc:15119
q
#define q
Definition: continua.cc:13955
n2part_1_
Definition: continua.cc:13113
c_b114
static double c_b114
Definition: continua.cc:13251
c_b31
static double c_b31
Definition: continua.cc:13210
n2part_2_
Definition: continua.cc:13117
consts_1_::radcn2
double radcn2
Definition: continua.cc:15157
c_b46
static double c_b46
Definition: continua.cc:13217
I_fp
integer(* I_fp)()
Definition: continua.cc:12974
s260b_2_::npts
int npts
Definition: continua.cc:15149
d0
#define d0
Definition: continua.cc:13958
consts_1_::pi
double pi
Definition: continua.cc:15156
O2_00_ckd_mt_100
const double O2_00_ckd_mt_100[O2_00_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3476
inlist::inname
char * inname
Definition: continua.cc:12894
s_blockin_::dnu
double dnu
Definition: continua.cc:13028
Namelist::nvars
int nvars
Definition: continua.cc:12942
u_bbbb_::s_m_2::ivip
int ivip
Definition: continua.cc:13142
flag
long int flag
Definition: continua.cc:12834
CKD_mt_co2
void CKD_mt_co2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:3808
c_b84
static double c_b84
Definition: continua.cc:13237
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:13694
c_b28
static double c_b28
Definition: continua.cc:13207
SL260_ckd_0_dv
const Numeric SL260_ckd_0_dv
Definition: continua.h:1385
fh2ob_1_::v2
double v2
Definition: continua.cc:15108
continua.h
This header file contains all the declarations of the implemented continua and full absorption (lines...
c_b52
static double c_b52
Definition: continua.cc:13222
ldelvi
#define ldelvi
Definition: continua.cc:14187
s_like_::fill_1
int fill_1[1]
Definition: continua.cc:13191
FH2O_ckd_mt_100_dv
const Numeric FH2O_ckd_mt_100_dv
Definition: continua.h:2655
MPM93_N2_continuum
void MPM93_N2_continuum(MatrixView xsec, const Numeric Cin, const Numeric Gin, const Numeric xTin, const Numeric xfin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:7885
fh2oa_1
#define fh2oa_1
Definition: continua.cc:15105
c_b56
static double c_b56
Definition: continua.cc:13226
dx
#define dx
Definition: continua.cc:14413
energ_
struct s_energe_ energ_
PWR98H2OAbsModel
void PWR98H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1299
s_bf_::om0
double om0
Definition: continua.cc:13076
clebsqr_0_
double clebsqr_0_(int n__, int *l, int *lambda, int *lp)
Definition: continua.cc:14615
c_b119
static double c_b119
Definition: continua.cc:13256
matpackI.h
olist::ofm
char * ofm
Definition: continua.cc:12866
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:15085
MPM93IceCrystalAbs
void MPM93IceCrystalAbs(MatrixView xsec, const Numeric CCin, const Numeric CAin, const Numeric CBin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8714
fh2oa_
struct s_fh2oa_ fh2oa_
s260a_1
#define s260a_1
Definition: continua.cc:15141
CKD_mt_CIAfun_o2
void CKD_mt_CIAfun_o2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:4484
O2_00_ckd_mt_100_npt
const int O2_00_ckd_mt_100_npt
Definition: continua.h:3475
Array
This can be used to make arrays out of anything.
Definition: array.h:48
nlines
#define nlines
Definition: continua.cc:14420
u_bbbb_::s_m_1::ivp
int ivp
Definition: continua.cc:13139
n2part_2_::q
double q
Definition: continua.cc:13118
u_bba_::s_m_2::beta
double beta
Definition: continua.cc:13062
fctl_
double fctl_(int *n)
Definition: continua.cc:14696
c_b120
static double c_b120
Definition: continua.cc:13257
icilist::icifmt
char * icifmt
Definition: continua.cc:12853
consts_1_::boltz
double boltz
Definition: continua.cc:15156
Namelist::name
char * name
Definition: continua.cc:12940
s_energe_
Definition: continua.cc:13151
s_bf_
Definition: continua.cc:13075
Multitype
Definition: continua.cc:12916
N2N2_CT220_ckd_mt_100_dv
const Numeric N2N2_CT220_ckd_mt_100_dv
Definition: continua.h:3311
cs__0
static int cs__0
Definition: continua.cc:13202
Rosenkranz_N2_self_continuum
void Rosenkranz_N2_self_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8119
Multitype::r
real r
Definition: continua.cc:12921
s_dimer_
Definition: continua.cc:13107
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:12724
c_b24
static double c_b24
Definition: continua.cc:13203
consts_1_::planck
double planck
Definition: continua.cc:15156
c_b92
static double c_b92
Definition: continua.cc:13245
c_b80
static double c_b80
Definition: continua.cc:13236
N2N2_CT296_ckd_mt_100_npt
const int N2N2_CT296_ckd_mt_100_npt
Definition: continua.h:3282
O2_00_ckd_mt_100_v1
const Numeric O2_00_ckd_mt_100_v1
Definition: continua.h:3472
FH2O_ckd_mt_100_v2
const Numeric FH2O_ckd_mt_100_v2
Definition: continua.h:2654
bl3_
union u_bl3_ bl3_
FCO2_ckd_mt_100
const double FCO2_ckd_mt_100[FCO2_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3068
profile_
int profile_(double *x, double *y)
Definition: continua.cc:14007
c_b55
static double c_b55
Definition: continua.cc:13225
n2part_2_::d0
double d0
Definition: continua.cc:13118
u_bba_::s_m_2::rsi
double rsi[201]
Definition: continua.cc:13062
species_data
Array< SpeciesRecord > species_data
Definition: species_data.cc:36
s260b_1_::v1___
double v1___
Definition: continua.cc:15144
messages.h
Declarations having to do with the four output streams.
O2O2_O2F_ckd_mt_100_v2
const Numeric O2O2_O2F_ckd_mt_100_v2
Definition: continua.h:3404
fwv_mpmf87s93__
double fwv_mpmf87s93__(double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16538
c_b45
static double c_b45
Definition: continua.cc:13216
logical
long int logical
Definition: continua.cc:12807
O2_10_ckd_mt_100_v1
const Numeric O2_10_ckd_mt_100_v1
Definition: continua.h:3591
FH2O_ckd_mt_100_npt
const int FH2O_ckd_mt_100_npt
Definition: continua.h:2656
s_blockin_::fnumax
double fnumax
Definition: continua.cc:13028
ivip
#define ivip
Definition: continua.cc:14189
Multitype::g
integer1 g
Definition: continua.cc:12917
u_bbbb_::m_1
struct u_bbbb_::s_m_1 m_1
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.h:1497
R_fp
real(* R_fp)()
Definition: continua.cc:12975
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:61
Multitype::i
integer i
Definition: continua.cc:12919
dB_km_GHz
const Numeric dB_km_GHz
Definition: continua.cc:375
abs
#define abs(x)
Definition: continua.cc:12946
jrange1
#define jrange1
Definition: continua.cc:13959
Vardesc
Definition: continua.cc:12931
s_rsilo_::rsilo
double rsilo[201]
Definition: continua.cc:13046
cllist
Definition: continua.cc:12873
fh2ob_2_::dv
double dv
Definition: continua.cc:15112
clebsqr_
double clebsqr_(int *l, int *lambda, int *lp)
Definition: continua.cc:14686
logical1
char logical1
Definition: continua.cc:12809
fwv24_
double fwv24_(double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16567
dB_to_Np
const Numeric dB_to_Np
Definition: continua.cc:359
c_b118
static double c_b118
Definition: continua.cc:13255
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: arts.h:147
address
char * address
Definition: continua.cc:12801
inlist::indirlen
ftnlen indirlen
Definition: continua.cc:12901
consts_1_::radcn1
double radcn1
Definition: continua.cc:15156
sh2oa_1
#define sh2oa_1
Definition: continua.cc:15123
FCO2_ckd_mt_100_dv
const Numeric FCO2_ckd_mt_100_dv
Definition: continua.h:3066
fh2oa_1_::fh2o
double fh2o[2003]
Definition: continua.cc:15102
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.h:937
s_app3b_::nsriup
int nsriup
Definition: continua.cc:13040
s_n2part_::fill_3
int fill_3[1]
Definition: continua.cc:13187
c_b183
static double c_b183
Definition: continua.cc:13258
E_f
doublereal E_f
Definition: continua.cc:12988
fnumax
#define fnumax
Definition: continua.cc:13263
s260b_2_
Definition: continua.cc:15147
FCO2_ckd_mt_100_v1
const Numeric FCO2_ckd_mt_100_v1
Definition: continua.h:3064
rsilo
#define rsilo
Definition: continua.cc:13677
c_b95
static double c_b95
Definition: continua.cc:13248
s260b_1_
Definition: continua.cc:15143
shortlogical
short int shortlogical
Definition: continua.cc:12808
c_b30
static double c_b30
Definition: continua.cc:13209
fh2ob_1
#define fh2ob_1
Definition: continua.cc:15116
doublereal
double doublereal
Definition: continua.cc:12804
FH2O_ckd_mt_100_v1
const Numeric FH2O_ckd_mt_100_v1
Definition: continua.h:2653
specfct_
double specfct_(double *freq, double *omega, double *phi, double *phi2, int *n, double *rtemp)
Definition: continua.cc:14110
N2N2_CT220_ckd_mt_100_v1
const Numeric N2N2_CT220_ckd_mt_100_v1
Definition: continua.h:3309
doublecomplex::r
doublereal r
Definition: continua.cc:12806
ns
#define ns
Definition: continua.cc:14416
omeg
#define omeg
Definition: continua.cc:13678
u_bba_::s_m_2::rsigg
double rsigg[201]
Definition: continua.cc:13062
phys_consts__
int phys_consts__(void)
Definition: continua.cc:16934
olist::ounit
ftnint ounit
Definition: continua.cc:12861
olist::ofnm
char * ofnm
Definition: continua.cc:12862
alist
Definition: continua.cc:12880
consts_1_::avogad
double avogad
Definition: continua.cc:15156
inlist::infile
char * infile
Definition: continua.cc:12888
s_energe_::e_1
double e_1[246]
Definition: continua.cc:13152
sh2ob_1_::nptslfwv
int nptslfwv
Definition: continua.cc:15127
c_b88
static double c_b88
Definition: continua.cc:13241
Pardo_ATM_N2_dry_continuum
void Pardo_ATM_N2_dry_continuum(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView h2ovmr)
Definition: continua.cc:8017
energ_1_::niv
int niv[6]
Definition: continua.cc:13102
S_fp
int(* S_fp)()
Definition: continua.cc:12982
cs__4
static int cs__4
Definition: continua.cc:13231
s260a_
struct s_s260a_ s260a_
N2N2_CT220_ckd_mt_100_v2
const Numeric N2N2_CT220_ckd_mt_100_v2
Definition: continua.h:3310
app3b_
struct s_app3b_ app3b_
icilist::icirlen
ftnint icirlen
Definition: continua.cc:12854
u_bba_::s_m_1::rsigg
double rsigg[201]
Definition: continua.cc:13059
WVSatPressureLiquidWater
Numeric WVSatPressureLiquidWater(const Numeric t)
Definition: continua.cc:9268
sh2ob_1_
Definition: continua.cc:15125
fh2ob_2_::v2
double v2
Definition: continua.cc:15112
MPM89O2AbsModel
void MPM89O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:6121
MPM87H2OAbsModel
void MPM87H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:431
FH2O_ckd_0_v2
const Numeric FH2O_ckd_0_v2
Definition: continua.h:968
sh2ob_2_
Definition: continua.cc:15129
bgama_
double bgama_(double *fnu, double *t1, double *t2, double *eps, double *t3, double *t4, double *temp)
Definition: continua.cc:14733
cs__1
static int cs__1
Definition: continua.cc:13201
s_blockin_::temp
double temp
Definition: continua.cc:13028
SL260_ckd_mt_100
const double SL260_ckd_mt_100[SL260_ckd_mt_100_npt+addF77fields]
Definition: continua.h:2245
u_bl3_::s_m_2
Definition: continua.cc:13129
SL260_ckd_0_v1
const Numeric SL260_ckd_0_v1
Definition: continua.h:1383
MaTipping_H2O_foreign_continuum
void MaTipping_H2O_foreign_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1880
s260b_1_::nptslfwv___
int nptslfwv___
Definition: continua.cc:15145
fh2ob_2_::npts
int npts
Definition: continua.cc:15113
olist::orl
ftnint orl
Definition: continua.cc:12867
bound54_
int bound54_(double *temp, double *rsi, int *nsol)
Definition: continua.cc:14423
Vardesc::type
int type
Definition: continua.cc:12935
s_like_::e_2
char e_2[5]
Definition: continua.cc:13192
Vardesc::name
char * name
Definition: continua.cc:12932
s260b_1_::v2___
double v2___
Definition: continua.cc:15144
c_b53
static double c_b53
Definition: continua.cc:13223
integer1
char integer1
Definition: continua.cc:12810
inlist::inseqlen
ftnlen inseqlen
Definition: continua.cc:12899
olist::oerr
flag oerr
Definition: continua.cc:12860
alist::aunit
ftnint aunit
Definition: continua.cc:12881
c_b51
static double c_b51
Definition: continua.cc:13221
O2_10_ckd_mt_100_v2
const Numeric O2_10_ckd_mt_100_v2
Definition: continua.h:3592
bf_
struct s_bf_ bf_
like
#define like
Definition: continua.cc:13272
s_blockin_::fnumin
double fnumin
Definition: continua.cc:13028
c_b87
static double c_b87
Definition: continua.cc:13240
CKD_mt_v0v0_o2
void CKD_mt_v0v0_o2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView n2_abs)
Definition: continua.cc:4705
s_k1k0_
Definition: continua.cc:13088
MPM02H2OAbsModel
void MPM02H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:817
Pardo_ATM_H2O_ForeignContinuum
void Pardo_ATM_H2O_ForeignContinuum(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:5313
max
#define max(a, b)
Definition: continua.cc:12949
Standard_O2_continuum
void Standard_O2_continuum(MatrixView xsec, const Numeric Cin, const Numeric G0in, const Numeric G0Ain, const Numeric G0Bin, const Numeric XG0din, const Numeric XG0win, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:7598
niv
#define niv
Definition: continua.cc:14419
PI
const Numeric PI
c_b49
static double c_b49
Definition: continua.cc:13219
c_b113
static double c_b113
Definition: continua.cc:13250
wnrmax3
#define wnrmax3
Definition: continua.cc:14414
c_b116
static double c_b116
Definition: continua.cc:13253
real
float real
Definition: continua.cc:12803
N2N2_N2F_ckd_mt_100_v1
const Numeric N2N2_N2F_ckd_mt_100_v1
Definition: continua.h:3337
artsckd_
double artsckd_(double p, double t, double vmrh2o, double vmrn2, double vmro2, double freq, int ivc)
Definition: continua.cc:16304
s_bf_::g0bf
double g0bf
Definition: continua.cc:13076
s_energe_::e_2
int e_2[6]
Definition: continua.cc:13153
SL260_ckd_0
const double SL260_ckd_0[SL260_ckd_0_npt+addF77fields]
Definition: continua.h:1387
cs__3
static int cs__3
Definition: continua.cc:13213
SL260_ckd_mt_100_v2
const Numeric SL260_ckd_mt_100_v2
Definition: continua.h:2242
MPM93H2OAbsModel
void MPM93H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1075
bbbb_
union u_bbbb_ bbbb_
MPM93_O2_continuum
void MPM93_O2_continuum(MatrixView xsec, const Numeric S0in, const Numeric G0in, const Numeric XS0in, const Numeric XG0in, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:7323
SL260_ckd_0_v2
const Numeric SL260_ckd_0_v2
Definition: continua.h:1384
consts_1
#define consts_1
Definition: continua.cc:15160
s_k1k0_::ik1k0
int ik1k0
Definition: continua.cc:13089
integer
long int integer
Definition: continua.cc:12799
MPM93RainExt
void MPM93RainExt(MatrixView xsec, const Numeric CEin, const Numeric CAin, const Numeric CBin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:8876
c_b27
static double c_b27
Definition: continua.cc:13206
u_bbbb_::s_m_2::ldelel
int ldelel
Definition: continua.cc:13142
s_sh2ob_::e_2
int e_2
Definition: continua.cc:15887
SL296_ckd_0_v1
const Numeric SL296_ckd_0_v1
Definition: continua.h:554
Multitype::h
shortint h
Definition: continua.cc:12918
cilist::cirec
ftnint cirec
Definition: continua.cc:12845
J_fp
shortint(* J_fp)()
Definition: continua.cc:12973
n2part_1_::jrange2
int jrange2
Definition: continua.cc:13115
rsigg
#define rsigg
Definition: continua.cc:13679
CKD_mt_100_self_h2o
void CKD_mt_100_self_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:3152
rsibb
#define rsibb
Definition: continua.cc:14421
n2part_
struct s_n2part_ n2part_
VMRCalcLimit
const Numeric VMRCalcLimit
Definition: continua.cc:390
s_dimer_::nlines
int nlines
Definition: continua.cc:13108
nsri
#define nsri
Definition: continua.cc:14415
consts_1_::clight
double clight
Definition: continua.cc:15156
s_sh2oa_
Definition: continua.cc:15520
out3
Out3 out3
Level 3 output stream.
Definition: messages.cc:56
s_sh2ob_::e_1
double e_1[3]
Definition: continua.cc:15886
s_fh2oa_
Definition: continua.cc:15164
C_f
VOID C_f
Definition: continua.cc:12985
ldelel
#define ldelel
Definition: continua.cc:14190
c_b90
static double c_b90
Definition: continua.cc:13243
Multitype::d
doublereal d
Definition: continua.cc:12922
s_bbb_
Definition: continua.cc:13094
s_sh2ob_
Definition: continua.cc:15885
like_1_::lgas
char lgas[5]
Definition: continua.cc:13083
s_app3b_::nsri
int nsri
Definition: continua.cc:13040
s_fh2ob_
Definition: continua.cc:15515
inlist::inunflen
ftnlen inunflen
Definition: continua.cc:12907
energ_1_::eb
double eb[246]
Definition: continua.cc:13101
fh2ob_1_::dv
double dv
Definition: continua.cc:15108
Np_to_dB
const Numeric Np_to_dB
Definition: continua.cc:357
inlist::infilen
ftnlen infilen
Definition: continua.cc:12889
s_bbc_
Definition: continua.cc:13069
n2part_1_::d01
double d01
Definition: continua.cc:13114
s_bou43_::initb
int initb
Definition: continua.cc:13052
cs__5
static int cs__5
Definition: continua.cc:13232
olist::osta
char * osta
Definition: continua.cc:12864
complex::r
real r
Definition: continua.cc:12805
MPM85O2AbsModel
void MPM85O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:5563
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: arts.h:153
dB_km_to_Np_km
const Numeric dB_km_to_Np_km
Definition: continua.cc:381
u_bl3_::m_2
struct u_bl3_::s_m_2 m_2
consts_1_::alosmt
double alosmt
Definition: continua.cc:15156
PWR93O2AbsModel
void PWR93O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, const String &version, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmrh2o, ConstVectorView vmr)
Definition: continua.cc:6957
icilist
Definition: continua.cc:12850
partsum_
int partsum_(double *temp)
Definition: continua.cc:13961
s_consts_::e_1
double e_1[9]
Definition: continua.cc:16259
Multitype::c
complex c
Definition: continua.cc:12923
CKD_mt_100_foreign_h2o
void CKD_mt_100_foreign_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:3410
ftnlen
long int ftnlen
Definition: continua.cc:12835
parameters
Parameters parameters
Holds the command line parameters.
Definition: parameters.cc:34
RADFN_FUN
Numeric RADFN_FUN(const Numeric VI, const Numeric XKT)
Definition: continua.cc:2005
s_bbc_::nsol
int nsol
Definition: continua.cc:13070
u_bba_::s_m_2::omeg
double omeg[201]
Definition: continua.cc:13062
c_b94
static double c_b94
Definition: continua.cc:13247
u_bl3_::s_m_1::rsi
double rsi[401]
Definition: continua.cc:13127
H_fp
VOID(* H_fp)()
Definition: continua.cc:12981
inlist::infmt
char * infmt
Definition: continua.cc:12902
u_bbbb_::s_m_2::llp
int llp
Definition: continua.cc:13142
CKD_mt_CIAfun_n2
void CKD_mt_CIAfun_n2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:4271
SL260_ckd_0_npt
const int SL260_ckd_0_npt
Definition: continua.h:1386
s_n2part_::e_2
double e_2[4]
Definition: continua.cc:13186
kPa_to_Pa
const Numeric kPa_to_Pa
Definition: continua.cc:365
olist::oacc
char * oacc
Definition: continua.cc:12865
CKD_222_self_h2o
void CKD_222_self_h2o(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr, ConstVectorView)
Definition: continua.cc:2093
inlist::inunf
char * inunf
Definition: continua.cc:12906
u_bbbb_::s_m_2::ldelvi
int ldelvi
Definition: continua.cc:13142
icilist::icierr
flag icierr
Definition: continua.cc:12850
u_bbbb_::s_m_2
Definition: continua.cc:13141
sh2ob_
struct s_sh2ob_ sh2ob_
CKD_mt_v1v0_o2
void CKD_mt_v1v0_o2(MatrixView xsec, const Numeric Cin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:4910
c_b47
static double c_b47
Definition: continua.cc:13218
d01
#define d01
Definition: continua.cc:13686
LOG10_EULER_NUMBER
const Numeric LOG10_EULER_NUMBER
dB_m_Hz
const Numeric dB_m_Hz
Definition: continua.cc:374
s_bf_::delbf
double delbf
Definition: continua.cc:13076
fh2oa_1_
Definition: continua.cc:15101
u_bl3_::s_m_1
Definition: continua.cc:13126
icilist::iciend
flag iciend
Definition: continua.cc:12852
inlist::inex
ftnint * inex
Definition: continua.cc:12890
c_b91
static double c_b91
Definition: continua.cc:13244
SL296_ckd_0_npt
const int SL296_ckd_0_npt
Definition: continua.h:557
b01
#define b01
Definition: continua.cc:13685
k1k0_
struct s_k1k0_ k1k0_
O2_00_ckd_mt_100_dv
const Numeric O2_00_ckd_mt_100_dv
Definition: continua.h:3474
wn2
#define wn2
Definition: continua.cc:13956
SL296_ckd_mt_100_v1
const Numeric SL296_ckd_mt_100_v1
Definition: continua.h:1830
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:16675
C_fp
VOID(* C_fp)()
Definition: continua.cc:12977
s_s260b_::e_1
double e_1[3]
Definition: continua.cc:16254
xlgr_
double xlgr_(double *xf, double *x)
Definition: continua.cc:16873
MPM93O2AbsModel
void MPM93O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:6660
N2N2_CT296_ckd_mt_100_v2
const Numeric N2N2_CT296_ckd_mt_100_v2
Definition: continua.h:3280
bbc_
struct s_bbc_ bbc_
c_b186
static double c_b186
Definition: continua.cc:13259
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:16744
sh2ob_2_::npts
int npts
Definition: continua.cc:15131
SL260_ckd_mt_100_v1
const Numeric SL260_ckd_mt_100_v1
Definition: continua.h:2241
N2N2_CT220_ckd_mt_100_npt
const int N2N2_CT220_ckd_mt_100_npt
Definition: continua.h:3312
Z_fp
VOID(* Z_fp)()
Definition: continua.cc:12978
u_bbbb_::s_m_2::ivi
int ivi
Definition: continua.cc:13142
s_s260b_::e_2
int e_2
Definition: continua.cc:16255
s_bou43_
Definition: continua.cc:13051
n2part_1_::wn2
double wn2[2]
Definition: continua.cc:13114
uinteger
unsigned long int uinteger
Definition: continua.cc:12800
c_b78
static double c_b78
Definition: continua.cc:13234
icilist::iciunit
char * iciunit
Definition: continua.cc:12851
EULER_NUMBER
const Numeric EULER_NUMBER
Pa_to_hPa
const Numeric Pa_to_hPa
Definition: continua.cc:371
NAT_LOG_TEN
const Numeric NAT_LOG_TEN
bound32_
int bound32_(double *temp, double *rsi, int *nsol)
Definition: continua.cc:14194
s_fh2oa_::e_1
double e_1[2003]
Definition: continua.cc:15165
c_b50
static double c_b50
Definition: continua.cc:13220
c_b85
static double c_b85
Definition: continua.cc:13238
n2part_1_::b01
double b01
Definition: continua.cc:13114
L_fp
logical(* L_fp)()
Definition: continua.cc:12979
ibound
#define ibound
Definition: continua.cc:13682
rsi
#define rsi
Definition: continua.cc:14005
s_app3a_::slit
double slit
Definition: continua.cc:13034
FH2O_ckd_0_npt
const int FH2O_ckd_0_npt
Definition: continua.h:970
Rosenkranz_CO2_foreign_continuum
void Rosenkranz_CO2_foreign_continuum(MatrixView xsec, const Numeric Cin, const Numeric xin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView n2_abs, ConstVectorView vmr)
Definition: continua.cc:8433
u_bba_::s_m_2
Definition: continua.cc:13061
Hz_to_GHz
const Numeric Hz_to_GHz
Definition: continua.cc:363
fnumin
#define fnumin
Definition: continua.cc:13262
u_bbbb_::m_2
struct u_bbbb_::s_m_2 m_2
SL296_ckd_0_dv
const Numeric SL296_ckd_0_dv
Definition: continua.h:556
sh2ob_1_::v1
double v1
Definition: continua.cc:15126
u_bbbb_::s_m_1::iv
int iv
Definition: continua.cc:13139
llp
#define llp
Definition: continua.cc:14192
SL296_ckd_mt_100_npt
const int SL296_ckd_mt_100_npt
Definition: continua.h:1833
bou43_
struct s_bou43_ bou43_
FH2O_ckd_0_v1
const Numeric FH2O_ckd_0_v1
Definition: continua.h:967
c_b60
static double c_b60
Definition: continua.cc:13230
inlist::inacclen
ftnlen inacclen
Definition: continua.cc:12897
ftnint
long int ftnint
Definition: continua.cc:12836
bs260a_
int bs260a_(void)
Definition: continua.cc:16978
nsriup
#define nsriup
Definition: continua.cc:14417
c_b58
static double c_b58
Definition: continua.cc:13228
icilist::icirnum
ftnint icirnum
Definition: continua.cc:12855
CP98H2OAbsModel
void CP98H2OAbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:1506
like_1_
Definition: continua.cc:13081
c_b59
static double c_b59
Definition: continua.cc:13229
n2part_2_::wn2
double wn2[2]
Definition: continua.cc:13118
inlist::innamed
ftnint * innamed
Definition: continua.cc:12893
s_like_
Definition: continua.cc:13190
MPMLineShapeFunction
Numeric MPMLineShapeFunction(const Numeric gamma, const Numeric fl, const Numeric f)
Definition: continua.cc:9151
cilist::ciend
flag ciend
Definition: continua.cc:12843
u_bba_::s_m_1::omeg
double omeg[201]
Definition: continua.cc:13059
consts_
struct s_consts_ consts_
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:232
c_b117
static double c_b117
Definition: continua.cc:13254
inlist::inacc
char * inacc
Definition: continua.cc:12896
MPM92O2AbsModel
void MPM92O2AbsModel(MatrixView xsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Definition: continua.cc:6391
MPM93_H2O_continuum
void MPM93_H2O_continuum(MatrixView xsec, 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_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView vmr)
Definition: continua.cc:5426
MPMLineShapeO2Function
Numeric MPMLineShapeO2Function(const Numeric gamma, const Numeric fl, const Numeric f, const Numeric delta)
Definition: continua.cc:9208
nsol
#define nsol
Definition: continua.cc:13681
bbb_
struct s_bbb_ bbb_
sh2ob_1_::v2
double v2
Definition: continua.cc:15126
xsec_continuum_tag
void xsec_continuum_tag(MatrixView xsec, const String &name, ConstVectorView parameters, const String &model, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView n2_abs, ConstVectorView h2o_abs, ConstVectorView vmr)
Calculates model absorption for one continuum or full model tag.
Definition: continua.cc:9392
D_fp
doublereal(* D_fp)()
Definition: continua.cc:12976
sh2ob_1
#define sh2ob_1
Definition: continua.cc:15134
c_b57
static double c_b57
Definition: continua.cc:13227
cllist::csta
char * csta
Definition: continua.cc:12875
WVSatPressureIce
Numeric WVSatPressureIce(const Numeric t)
Definition: continua.cc:9333
N2N2_N2Ft_ckd_mt_100
const double N2N2_N2Ft_ckd_mt_100[N2N2_N2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3369
inlist::inform
char * inform
Definition: continua.cc:12904
inlist::indir
char * indir
Definition: continua.cc:12900
inlist::inunit
ftnint inunit
Definition: continua.cc:12887
SL296_ckd_mt_100
const double SL296_ckd_mt_100[SL296_ckd_mt_100_npt+addF77fields]
Definition: continua.h:1834
jrange2
#define jrange2
Definition: continua.cc:13687
complex
Definition: continua.cc:12805
fh2ob_2_::v1
double v1
Definition: continua.cc:15112
arts.h
The global header file for ARTS.
ll
#define ll
Definition: continua.cc:14191
sh2ob_2_::v1
double v1
Definition: continua.cc:15130
SL296_ckd_0
const double SL296_ckd_0[SL296_ckd_0_npt+addF77fields]
Definition: continua.h:558
olist
Definition: continua.cc:12860
sh2ob_2_::v2
double v2
Definition: continua.cc:15130
fwv_
double fwv_(int ivc, double wn, double *w_wv__, double *rft, double *xn, double *xn_wv__, double *xn0, double *xfrg)
Definition: continua.cc:16510
u_bba_::s_m_1::rsi
double rsi[201]
Definition: continua.cc:13059
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:15078
O2O2_O2Ft_ckd_mt_100
const double O2O2_O2Ft_ckd_mt_100[O2O2_O2F_ckd_mt_100_npt+addF77fields]
Definition: continua.h:3431