Changeset 19765 for trunk/Mars
- Timestamp:
- 10/12/19 20:06:55 (5 years ago)
- Location:
- trunk/Mars/msim
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msim/MAtmosphere.cc
r19763 r19765 137 137 138 138 MAtmRayleigh::MAtmRayleigh() : fR(MCorsikaRunHeader::fgEarthRadius), 139 fHeight{0, 300000, 1e+06, 5e+06, 1e+07},139 //fHeight{0, 300000, 1e+06, 5e+06, 1e+07}, 140 140 //fAtmA{-144.838, -124.071, 0.360027, -0.000824761, 0.00221589}, 141 141 fAtmB{1192.34, 1173.98, 1412.08, 810.682, 1}, … … 171 171 fObsLevel, // fObsLevel, // 0km 172 172 TMath::Max(fObsLevel, 7.75e5), // TMath::Max(fObsLevel, 4e5), // 4km 173 16.5e5, // 10e5, // 10km174 50.0e5, // 40e5, // 40km173 16.5e5, // 10e5, // 10km 174 50.0e5, // 40e5, // 40km 175 175 105.0e5, // 100e5 // 100km 176 176 }; … … 414 414 415 415 Double_t path_slant = 0; 416 for (Double_t h = fObsLevel; h <= 50e5; h +=dh)416 for (Double_t h=fObsLevel; h<50e5+dh/2; h+=dh) 417 417 { 418 418 // h is the true height vertical above ground 419 if (fmod(h,1e4) == 0) 420 ozone_path[(int)(h/1e4)][j] = path_slant; 419 //if (fmod(h,1e4) == 0) 420 { 421 ozone_path[TMath::FloorNint(h/1e4)][j] = path_slant; 422 } 421 423 422 424 const Double_t km = h/1e5; … … 450 452 451 453 Double_t path_slant = 0; 452 for (Double_t h = fObsLevel; h <= 30e5; h +=dh)454 for (Double_t h=fObsLevel; h<=30e5+dh/2; h+=dh) 453 455 { 454 456 // h is the true height vertical above ground 455 if (fmod(h,1e4) == 0) 456 aerosol_path[(int)(h/1e4)][j] = path_slant; 457 //if (fmod(h,1e4) == 0) 458 { 459 aerosol_path[TMath::FloorNint(h/1e4)][j] = path_slant; 460 } 457 461 458 462 const Double_t km = h/1e5; … … 482 486 } 483 487 484 if (!HasValid Aerosol())488 if (!HasValidOzone()) 485 489 return kFALSE; 486 490 … … 539 543 540 544 //******* Ozone absorption ******* 541 if (h > 50.e5)542 h = 50.e5;543 545 544 546 // Vigroux Ozone absorption coefficient a.s.l. through interpolation: … … 549 551 // Now use the pre-calculated values of the path integral 550 552 // for h and theta 551 const UInt_t H = TMath:: Nint(h/1e4);552 const UInt_t T = TMath::Min( 89, TMath::Nint(theta/STEPTHETA));553 const UInt_t H = TMath::Min(500, TMath::Nint(h/1e4)); 554 const UInt_t T = TMath::Min( 89, TMath::Nint(theta/STEPTHETA)); 553 555 554 556 const Double_t path = ozone_path[H][T]; … … 563 565 564 566 //******* Mie (aerosol) ******* 565 if (h > 30.e5)566 h = 30.e5;567 567 568 568 //const float aero_betap[15] = {0.27, 0.26, 0.25, 0.24, 0.24, 0.23, 0.20, 0.180, 0.167, 0.158, 0.150, 0.142, 0.135, 0.127, 0.120}; … … 572 572 // Now use the pre-calculated values of the path integral 573 573 // for h and theta 574 const UInt_t H = TMath::Nint(h/1e4); 575 const UInt_t T = TMath::Min(89, TMath::Nint(theta/STEPTHETA)); 576 574 const UInt_t H = TMath::Min(300, TMath::Nint(h/1e4)); 575 const UInt_t T = TMath::Min( 89, TMath::Nint(theta/STEPTHETA)); 577 576 578 577 const Double_t path = aerosol_path[H][T]; -
trunk/Mars/msim/MAtmosphere.h
r19763 r19765 98 98 Init(h);//, "ozone.txt", "aerosols.txt"); 99 99 } 100 MAtmosphere(Double_t obs=-1, const char *name1=0, const char *name2=0) : fAbsCoeffOzone(0), fAbsCoeffAerosols(0) 101 { 102 MAtmRayleigh::Init(obs); 100 103 101 MAtmosphere(const char *name1=0, const char *name2=0) : fAbsCoeffOzone(0), fAbsCoeffAerosols(0)102 {103 104 if (name1) 104 105 InitOzone(name1);
Note:
See TracChangeset
for help on using the changeset viewer.