Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | benchmark |
include "atmosphere.g"
atmosphere, for now, does calculations of atmospheric profile, the integrated opatical depth on each band, the integrated optical depth for each channel of each band, the absorption coefficients, the dispersive and non-dispersive phase delay factor, the sky brightness, etc, based on a model of the atmosphere. There are five atmosphere models: tropical, mid latitude summer, mid latitude winter, subarctic summer, subarctic winter. This Distributed Object integrates the atmospheric model of Juan R. Pardo, written in FORTRAN, into the AIPS++ code base. This model, which is also used by the ALMA TELCAL group, is important for accurate simulation of millimeter observations with ALMA. The tool has to be constructed with the altitude at site, temperature at site, pressure at site, maximum altitude ( top of the modelled atmposphere ), humidity, temperature gradient with height (dT/dh),initial pressure step ( P[1]-P[0]), pressure multiplicative factor for steps ( if named dPm, then ( P[i+1]-P[i] = dPm*( P[i]-P[i-1])), scale height for water, and atmospheric type.
The following show the use of the atmosphere tool.
include 'atmosphere.g' # # Wait for results before proceeding to the next step # # # Make an atmosphere tool # myatm:= atmosphere(altitude='2550.m', temperature='270.32K', pressure='73585Pa', maxAltitude = '45000m', humidity=20, dTem_dh='-0.0056.K/m', dP='500Pa', dPm=1.25, h0='2000.m',atmtype=2); # # get startup water content # water := myatm.getStartupWaterContent() print spaste('Guessed water content is: ', water) Guessed water content is: [value=0.00160052609, unit=m] # # get profile # myatm.getProfile( thickness=thickness, temperature=temperature, water=water, pressure=pressure, O3=O3, CO=CO, N2O=N2O ) print spaste( 'thickness = ', thickness ) print spaste( '(thickness.value)[1],thickness.unit = ', (thickness.value)[1], thickness.unit ) thickness = [value=[54.2820552 68.3014666 86.0898268 108.749638 137.76137 175.148792 223.740915 287.605456 372.804489 488.798233 651.269636 888.430939 1257.26693 1895.2737 3257.98328 1750 2000 2000 3000 3000 3000 4250 4500 4500] , unit=m] (thickness.value)[1],thickness.unit = 54.2820552m # # initialize window # nbands := 2; for ( i in 1:nbands) { (fCenter.value)[i] := 88.e9; (fWidth.value)[i] := 5.e8; (fRes.value)[i] := (fWidth.value)[1]/4.0; # 4 channels } fCenter.unit := 'Hz'; fWidth.unit := 'Hz'; fRes.unit := 'Hz'; myatm.initWindow(nbands=nbands,fCenter=fCenter,fWidth=fWidth,fRes=fRes ) # # get the number of channels of ith band # n:=myatm.getNdata(iband=1); print spaste( 'getNdata() = ', n ); getNdata() = 4 # # get the integrated optical depth on each band # myatm.getOpacity( dryOpacity=dryOpacity, wetOpacity=wetOpacity); print spaste('dryOpacity = ', dryOpacity ); print spaste('wetOpacity = ', wetOpacity ); dryOpacity = [0.0181100218 0.0181100218] wetOpacity = [value=[0.00665036438 0.00665036438] , unit=mm-1] # # get the integrated optical depth for each channel of each band # myatm.getOpacitySpec( dryOpacitySpec=dryOS, wetOpacitySpec=wetOS ); print spaste( 'dryOpacitySpec = ', dryOS ); print spaste( 'wetOpacitySpec = ', wetOS ); dryOpacitySpec = [[1:2,] 0.018275032 0.0181644629 0.0180543786 0.0179462136 0.018275032 0.0181644629 0.0180543786 0.0179462136] wetOpacitySpec = [value=[[1:2,] 0.0066217328 0.0066217328 0.0066217328 0.0066217328 0.0066217328 0.0066217328 0.0066217328 0.0066217328], unit=mm-1] # # get absorption coefficients # myatm.getAbsCoeff( kH2OLines=kH2OLines, kH2OCont=kH2OCont, kO2=kO2, kDryCont=kDryCont, kO3=kO3, kCO=kCO, kN2O=kN2O ) print spaste('(kH2OLines.value[1],kH2OLines.unit) = ', (kH2OLines.value)[1], kH2OLines.unit ); (kH2OLines.value[1],kH2OLines.unit) = 0.000105215009m-1 # # get absorption coefficient derivatives # myatm.getAbsCoeffDer( kH2OLinesDer=kH2OLinesDer, kH2OContDer=kH2OContDer,kO2Der=kO2Der, kDryContDer=kDryContDer, kO3Der=kO3Der, kCODer=kCODer, kN2ODer=kN2ODer ) print spaste( '(kH2OLinesDer.value[1],kH2OLinesDer.unit) = ', kH2OLinesDer.value[1], kH2OLinesDer.unit ) (kH2OLinesDer.value[1],kH2OLinesDer.unit) = -9.73882945e-08m-1 # # get dispersive and non-dispersive phase delay factor # myatm.getPhaseFactor( dispPhase=dispPhase, nonDispPhase=nonDispPhase ); print spaste( 'dispPhase = ' , dispPhase ); print spaste( 'nonDispPhase = ', nonDispPhase ); dispPhase = [value=[740.282096 740.282096] , unit=deg.m-1] nonDispPhase = [value=[1.60255787 1.60255787] , unit=deg.m-1] # # computer sky brightness # myatm.computeSkyBrightness(airMass=1.51, tbgr='2.73K', precWater='4.05e-3m') # # get sky brightness computed by computeSkyBrightness() # tBand1 := myatm.getSkyBrightness(iopt=1); tBand2 := myatm.getSkyBrightness(iopt=2); print spaste("SkyBrightness for Blackbody = ",tBand1 ); print spaste("SkyBrightness for Rayleigh Jeans = ",tBand2 ) SkyBrightness for Blackbody =[value=[19.9391734 19.9391734] , unit=K] SkyBrightness for Rayleigh Jeans =[value=[17.9019838 17.9019838] , unit=K] # # get sky brightness by integrating the transfer equation for each channel # tBandSpec1 := myatm.getSkyBrightnessSpec(iopt=1) tBandSpec2 := test_atm.getSkyBrightnessSpec(iopt=2) print spaste('For blackbody, SkyBrightness = ', tBandSpec1) print spaste('For Rayleigh Jeans, SkyBrightness = ', tBandSpec2) For Blackbody, SkyBrightness = [value=[[1:2,] 19.9541615 19.9439307 19.9339303 19.9246711 19.9541615 19.9439307 19.9339303 19.9246711], unit=K] For Rayleigh Jeans, SkyBrightness = [value=[[1:2,] 17.9210985 17.9081171 17.895366 17.8833538 17.9210985 17.9081171 17.895366 17.8833538], unit=K] # # set sky coupling # myatm.setSkyCoupling( c=1.0 ) # # get sky coupling # sc_out := myatm.getSkyCoupling(); print spaste( 'SkyCoupling = ', sc_out ) SkyCoupling = 1.0
atmosphere | Construct an atmosphere tool |
computeSkyBrightness | compute the sky brightness by integrating the transfer equation |
getAbsCoeff | get the absorption coefficients |
getAbsCoeffDer | get the derivatives of absorption coefficients |
getNdata | return the number of channels of ith band |
getOapcity | get the integrated optical depth on each band |
getOapcitySpec | get the integrated optical depth for each channel of each band |
getPhaseFactor | get the dipersive and non-dispersive phase delay factor |
getProfile | get atmospheric profile |
getSkyBrightness | get sky brightness computed by computeSkyBrightness() |
getSkyBrightnessSpec | get sky brightness by integrating the transfer equation for each channel |
getSkyCoupling | return the sky coupling |
getStartupWaterContent | get the guessed startup water content |
initWindow | initialize window |
setSkyCoupling | set sky coupling |