Package `RAtmosphere`

advertisement
Package ‘RAtmosphere’
February 19, 2015
Type Package
Title Standard Atmospheric profiles
Version 1.1
Date 2014-01-15
Author Gionata Biavati
Maintainer Gionata Biavati <gbiavati@bgc-jena.mpg.de>
Description This package provide an easy way to produce atmospheric profiles of Pressure,
Temperature and Density according to the standard atmosphere 1976.
It provides also profiles of molecular volume backscatter coefficients for standard atmosphere,
and approximated estimations of sunset, sunrise and solar zenith angle.
License GPL
LazyLoad yes
Repository CRAN
Date/Publication 2014-01-15 09:11:52
NeedsCompilation no
R topics documented:
RAtmosphere-package
betamol . . . . . . . .
betamol_standard . . .
standard_atmosphere .
suncalc . . . . . . . .
SZA . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Index
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
3
4
5
6
7
9
1
2
RAtmosphere-package
RAtmosphere-package
Standard atmospheric parameters for LIDAR inversion
Description
This package provide an easy way to produce atmospheric profiles of Pressure, Temperature and
Density according to the standard atmosphere 1976. It provides also: profiles of molecular volume
backscattering coefficients for standard atmosphere and, for specified temperature and pressure
profiles; approximated estimations of sunset, sunrise and solar zenith angle.
Details
Package:
Type:
Version:
Date:
License:
LazyLoad:
RAtmosphere
Package
1.1
2014-01-15
GPL
yes
Author(s)
Gionata Biavati
Maintainer: Gionata Biavati <gbiavati@bgc-jena.mpg>
References
Standard Atmosphere: http://scipp.ucsc.edu/outreach/balloon/atmos/1976StandardAtmosphere.
htm
Solar Zenith Angle Calculations: http://solardat.uoregon.edu/SolarRadiationBasics.html
Sunrize and Sunset: Teets, D.A. 2003. Predicting sunrise and sunset times, The College Mathematics Journal 34(4):317-321.
See Also
standard_atmosphere SZA suncalc betamol betamol_standard
Examples
require(RAtmosphere)
z<-10*(0:1000)
plot(standard_atmosphere(z,vout=2),z,
xlab='Pressure Pa',
ylab='Altitude [m]',
betamol
3
main='Profile of Pressure')
betamol
Molecular volume backscatter coefficient
Description
Calculation of atmospheric molecular backscatter coefficient at specified pressure, temperature and
wavelength.
Usage
betamol(P, T, lambda = 1064)
Arguments
P
Pressure in hPa. can be scalar, vector or matrix of the same dimension of T.
T
Temperature in °k. can be scalar, vector or matrix of the same dimension of P.
lambda
Scalar value in nm. It represent the wavelength of incident light.
Value
Return according to the dimension of P and T returns the volume backscatter coefficient [1/m 1/sr]
for the specified wavelength lambda.
Author(s)
Gionata Biavati
See Also
standard_atmosphere betamol_standard
Examples
##
lambda=1064 #nm
z<-10*(0:1000)
bm<-betamol(standard_atmosphere(z,vout=2,T0=T0,P0=P0,R0=R0)/100,
standard_atmosphere(z,vout=1,T0=T0,P0=P0,R0=R0),
lambda=lambda)
plot(bm,z,type='l',col=4,lwd=3,
xlab='Volume Backscatter Coefficient [1/(m sr)]',
ylab='Altitude [m]',
main ='Standard profile of volume backscatter coefficient')
4
betamol_standard
betamol_standard
Standard Molecular Backscatter Coefficient
Description
Standard Molecular Volume Backscatter Coefficient according to Standard Atmosphere for different
wavelengthUsage
betamol_standard(z, lambda = 1064, T0 = 288.15, P0 = 101325, R0 = 1.225)
Arguments
z
Vector, Matix or scalar of altitude over see level [m].
lambda
Scalar value in nm. It represent the wavelength of incident light.
T0
Scalar value. Temperature at see level [°K].
P0
Scalar value. Pressure at see level [Pa].
R0
Scalar value. Density at see level [Kgm−3 ].
Value
Returns according to the dimensions of z values of elastic volume backscatter coefficients in [1/(m
sr)]
Author(s)
Gionata Biavati
See Also
standard_atmosphere betamol
Examples
lambda=1064 #nm
z<-10*(0:1000)
plot(betamol_standard(z),z,type='l',col=4,lwd=3,
xlab='volume Backscatter Coefficient [1/(m sr)]',
ylab='Altitude [m]',
main ='volume backscatter coefficient')
standard_atmosphere
5
standard_atmosphere
Standard Atmosphere calculations
Description
This function calculate Temperature, Pressure and Density of air at a fixed quota, according to
ground temperature, density and pressure. The profile is a standard atmospheric profile according
to 1976 Standard Atmosphere.
Usage
standard_atmosphere(z, vout = 3, T0 = 288.15, P0 = 101325, R0 = 1.225)
Arguments
z
Altitude over see level in meters. It can be Vector, Matrix or scalar value.
vout
possible vaues are: 1 for temperature (output in °K) 2 for pressure (output in
Nm− 2 3 for density (output in kgm− 3)
T0
Scalar value. Temperature at see level [°K].
P0
Scalar value. Pressure at see level [Pa].
R0
Scalar value. Density at see level [kgm− 3].
Value
According to input z the function will return a Vector, a Matrix or a Scalar value, according to the
specified vout.
Note
This function is general, no latitude-longitude or seasonal specification. It is necessary to evaluate
a standard backscatter profile.
Author(s)
Gionata Biavati
References
http://scipp.ucsc.edu/outreach/balloon/atmos/1976StandardAtmosphere.htm
See Also
betamol_standard
6
suncalc
Examples
z<-100*(0:100)
par(mfrow=c(1,3))
plot(standard_atmosphere(z,vout=1),z,main='Temperature',ylab='Altitude [m]',xlab='[°K]')
plot(standard_atmosphere(z,vout=2),z,main='Pressure',ylab='Altitude [m]',xlab='[N/m2]')
plot(standard_atmosphere(z,vout=3),z,main='Density',ylab='Altitude [m]',xlab='[kg/m3]')
suncalc
Sunrise and Sunset calculations
Description
Calculation of Sunrise and Sunset for a specific Julian day of the year, latitude and Longitude
Usage
suncalc(d, Lat = 0, Long = 0, UTC = TRUE)
Arguments
d
d is the day of year
Lat
Lat is latitude in decimal degrees
Long
Long is longitude in decimal degrees (negative == West)
UTC
logical value, FALSE if local time, TRUE if in UTC Default TRUE
Value
The output is a list containing two fields: "sunrise" time for sunrise, "sunset" time in decimals for
sunset. Both are expressed with the timezone defined by the keyword UTC
Warning
For extreme latitudes in certain time of the year one can expect to do not have any sunset or sunrise.
The function will provide NaN values and generate warnings.
Author(s)
Gionata Biavati
References
Teets, D.A. 2003. Predicting sunrise and sunset times. The College Mathematics Journal 34(4):317321. http://aa.usno.navy.mil/data/docs/RS_OneYear.php
See Also
SZA
SZA
7
Examples
t<-Sys.time()+seq(-3600*12,3600*12,,by=600)
t0=as.POSIXlt(Sys.time(),tz='UTC')
plot(t,90-SZA(t,Lat=0,Lon=0),main='SZA',xlab='Time',ylab='El [°deg]')
sun=suncalc(t0[['yday']],UTC=TRUE)
t0[['hour']]<-0;t0[['min']]<-0
t1<-t0;t2<-t0
t1[['hour']]=sun[['sunrise']]
t2[['hour']]=sun[['sunset']]
abline(v=as.numeric(c(t1,t2)),col=3,lwd=4)
SZA
Solar Zenith Angle
Description
This function provide Solar Zenith Angle for a specified time , latitude and longitude.
Usage
SZA(timein = Sys.time(), Lat = 50.910335, Lon = 11.56874)
Arguments
timein
default value is the system time. It will consider all entries "POSIXct" "POSIXt"
and string format with time zone. It can be a vector, a scalar or a matrix.
Lat
Scalar. Latitude in [°N] as decimal It is the latitude of the site considered.
Lon
Scalar. Longitude in [°E] as decimal It is the longitude of the site considered.
Value
A vector, matrix or scalar according to the input timein, with values of SZA in decimal °deg.
Author(s)
Gionata Biavati
References
urlhttp://solardat.uoregon.edu/SolarRadiationBasics.html
See Also
suncalc
8
SZA
Examples
## calculate SZA
sza<-SZA('2010-01-01 12:00',Lat=0,Lon=0)
t<-Sys.time()+seq(-3600*12,3600*12,,by=1800)
plot(t,SZA(t,Lat=0,Lon=0),
main='SZA',
xlab='Time',
ylab='SZA [°deg]')
Index
∗Topic sunset
suncalc, 6
∗Topic sun
suncalc, 6
∗Topic temperature
RAtmosphere-package, 2
standard_atmosphere, 5
∗Topic zenith
SZA, 7
∗Topic angle
SZA, 7
∗Topic atmosphere
betamol, 3
betamol_standard, 4
RAtmosphere-package, 2
standard_atmosphere, 5
∗Topic backscatter coefficient
RAtmosphere-package, 2
∗Topic backscatter
betamol, 3
betamol_standard, 4
∗Topic betamol
betamol, 3
betamol_standard, 4
∗Topic calibration
betamol, 3
betamol_standard, 4
∗Topic density
RAtmosphere-package, 2
standard_atmosphere, 5
∗Topic lidar
betamol, 3
betamol_standard, 4
RAtmosphere-package, 2
∗Topic molecular
betamol, 3
betamol_standard, 4
∗Topic package
RAtmosphere-package, 2
∗Topic pressure
RAtmosphere-package, 2
standard_atmosphere, 5
∗Topic solar
SZA, 7
∗Topic standard
betamol_standard, 4
∗Topic sunrise
suncalc, 6
betamol, 2, 3, 4
betamol_standard, 2, 3, 4, 5
RAtmosphere (RAtmosphere-package), 2
RAtmosphere-package, 2
standard_atmosphere, 2–4, 5
suncalc, 2, 6, 7
SZA, 2, 6, 7
9
Related documents
Download