Source
523
523
vv_N_NO2LinesPtr_[nc] = v_N_NO2LinesPtr;
524
524
vv_N_SO2LinesPtr_[nc] = v_N_SO2LinesPtr;
525
525
}
526
526
527
527
}
528
528
529
529
newBasicParam_ = false;
530
530
// first = false; // [-Wunused_but_set_variable]
531
531
}
532
532
533
-
Opacity RefractiveIndexProfile::getDryOpacity()
533
+
534
+
Opacity RefractiveIndexProfile::getDryOpacityUpTo(unsigned int nc, Length refalti)
534
535
{
535
-
return getDryOpacity(0);
536
+
unsigned int ires; unsigned int numlayerold; Length alti; double fractionLast;
537
+
Opacity opacityout0; Opacity opacityout1; Opacity zeroOp(0.0,"np");
538
+
539
+
if(refalti.get("km") <= altitude_.get("km")) {
540
+
return zeroOp;
541
+
}else{
542
+
fractionLast = 1.0; numlayerold = numLayer_;
543
+
opacityout0=getDryOpacity(nc); ires=numlayerold-1; alti=altitude_;
544
+
for(unsigned int i=0; i<numLayer_; i++){
545
+
if(alti.get("km") < refalti.get("km") && (alti.get("km")+v_layerThickness_[i]/1000.0) >= refalti.get("km"))
546
+
{ ires=i; fractionLast = (refalti.get("m")-alti.get("m"))/v_layerThickness_[i]; }
547
+
alti = alti + Length(v_layerThickness_[i],"m");
548
+
}
549
+
numLayer_ = ires;
550
+
opacityout0=getDryOpacity(nc);
551
+
numLayer_ = ires+1;
552
+
opacityout1=getDryOpacity(nc);
553
+
numLayer_ = numlayerold;
554
+
return opacityout0+(opacityout1-opacityout0)*fractionLast;
555
+
}
536
556
}
537
-
538
557
Opacity RefractiveIndexProfile::getDryOpacity(unsigned int nc)
539
558
{
540
559
if(!chanIndexIsValid(nc)) return Opacity(-999.0);
541
560
double kv = 0;
542
561
for(unsigned int j = 0; j < numLayer_; j++) {
543
562
kv = kv + imag(vv_N_O2LinesPtr_[nc]->at(j) + vv_N_DryContPtr_[nc]->at(j)
544
563
+ vv_N_O3LinesPtr_[nc]->at(j) + vv_N_COLinesPtr_[nc]->at(j)
545
564
+ vv_N_N2OLinesPtr_[nc]->at(j) + vv_N_NO2LinesPtr_[nc]->at(j)
546
565
+ vv_N_SO2LinesPtr_[nc]->at(j)) * v_layerThickness_[j];
547
566
}
548
567
return Opacity(kv);
549
568
}
550
569
551
-
Opacity RefractiveIndexProfile::getDryOpacity(unsigned int spwid,
552
-
unsigned int nc)
553
-
{
554
-
if(!spwidAndIndexAreValid(spwid, nc)) return Opacity(-999.0);
555
-
return getDryOpacity(v_transfertId_[spwid] + nc);
556
-
}
557
570
558
571
Opacity RefractiveIndexProfile::getAverageDryOpacity(unsigned int spwid)
559
572
{
560
573
if(!spwidAndIndexAreValid(spwid, 0)) return Opacity(-999.0);
561
574
Opacity totalaverage;
562
575
totalaverage = Opacity(0.0, "np");
563
576
for(unsigned int nc = 0; nc < getNumChan(spwid); nc++) {
564
577
totalaverage = totalaverage + getDryOpacity(spwid, nc);
565
578
}
566
579
totalaverage = totalaverage / getNumChan(spwid);