| 1 |
jahn |
1.1 |
C $Header$ |
| 2 |
|
|
C $Name$ |
| 3 |
|
|
|
| 4 |
|
|
#include "RADTRANS_OPTIONS.h" |
| 5 |
|
|
|
| 6 |
|
|
CBOP |
| 7 |
|
|
C !ROUTINE: RADTRANS_SUNMOD |
| 8 |
|
|
|
| 9 |
|
|
C !INTERFACE: ====================================================== |
| 10 |
|
|
subroutine radtrans_sunmod(rad,iday,imon,iyr,gmt,up,no,ea, |
| 11 |
|
|
O sunz,rs) |
| 12 |
|
|
|
| 13 |
|
|
C !DESCRIPTION: |
| 14 |
|
|
c MODIFIED only by separating subroutines that were previously included |
| 15 |
|
|
c |
| 16 |
|
|
c Given year, day of year, time in hours (GMT) and latitude and |
| 17 |
|
|
c longitude, returns an accurate solar zenith and azimuth angle. |
| 18 |
|
|
c Based on IAU 1976 Earth ellipsoid. Method for computing solar |
| 19 |
|
|
c vector and local vertical from Patt and Gregg, 1994, Int. J. |
| 20 |
|
|
c Remote Sensing. Only outputs solar zenith angle. This version |
| 21 |
|
|
c utilizes a pre-calculation of the local up, north, and east |
| 22 |
|
|
c vectors, since the locations where the solar zenith angle are |
| 23 |
|
|
c calculated in the model are fixed. |
| 24 |
|
|
c |
| 25 |
|
|
c Subroutines required: sun2000 |
| 26 |
|
|
c gha2000 |
| 27 |
|
|
c jd |
| 28 |
|
|
c |
| 29 |
|
|
C !USES: =========================================================== |
| 30 |
|
|
IMPLICIT NONE |
| 31 |
|
|
|
| 32 |
|
|
C !INPUT PARAMETERS: =============================================== |
| 33 |
|
|
INTEGER iday, imon, iyr |
| 34 |
|
|
_RL rad, gmt, up(3), no(3), ea(3) |
| 35 |
|
|
c INTEGER myThid |
| 36 |
|
|
|
| 37 |
|
|
C !OUTPUT PARAMETERS: ============================================== |
| 38 |
|
|
_RL sunz, rs |
| 39 |
|
|
|
| 40 |
|
|
C !FUNCTIONS: ====================================================== |
| 41 |
|
|
|
| 42 |
|
|
C !LOCAL VARIABLES: ================================================ |
| 43 |
|
|
INTEGER j |
| 44 |
|
|
_RL radeg, sec, day, gha, ghar, sunv, sunn, sune |
| 45 |
|
|
_RL suni(3),sung(3) |
| 46 |
|
|
CEOP |
| 47 |
|
|
|
| 48 |
|
|
|
| 49 |
|
|
radeg = rad |
| 50 |
|
|
c Compute sun vector |
| 51 |
|
|
c Compute unit sun vector in geocentric inertial coordinates |
| 52 |
|
|
sec = gmt*3600.0D0 |
| 53 |
|
|
call radtrans_sun2000 (radeg, iyr, imon, iday, sec, suni, rs) |
| 54 |
|
|
|
| 55 |
|
|
c Get Greenwich mean sidereal angle |
| 56 |
|
|
day = float(iday) + sec/86400.0D0 |
| 57 |
|
|
call radtrans_gha2000 (radeg, iyr, imon, day, gha) |
| 58 |
|
|
ghar = gha/radeg |
| 59 |
|
|
|
| 60 |
|
|
c Transform Sun vector into geocentric rotating frame |
| 61 |
|
|
sung(1) = suni(1)*cos(ghar) + suni(2)*sin(ghar) |
| 62 |
|
|
sung(2) = suni(2)*cos(ghar) - suni(1)*sin(ghar) |
| 63 |
|
|
sung(3) = suni(3) |
| 64 |
|
|
c |
| 65 |
|
|
c Compute components of spacecraft and sun vector in the |
| 66 |
|
|
c vertical (up), North (no), and East (ea) vectors frame |
| 67 |
|
|
sunv = 0.0 |
| 68 |
|
|
sunn = 0.0 |
| 69 |
|
|
sune = 0.0 |
| 70 |
|
|
do j = 1,3 |
| 71 |
|
|
sunv = sunv + sung(j)*up(j) |
| 72 |
|
|
sunn = sunn + sung(j)*no(j) |
| 73 |
|
|
sune = sune + sung(j)*ea(j) |
| 74 |
|
|
enddo |
| 75 |
|
|
c |
| 76 |
|
|
c Compute the solar zenith |
| 77 |
|
|
sunz = radeg*atan2(sqrt(sunn*sunn+sune*sune),sunv) |
| 78 |
|
|
c |
| 79 |
|
|
return |
| 80 |
|
|
end |
| 81 |
|
|
c |
| 82 |
|
|
c ***************************************************************** |
| 83 |
|
|
c HERE SUBROUTINE sun2000 removed |
| 84 |
|
|
c ********************************************************************* |
| 85 |
|
|
c HERE SUBROUTINE gha2000 removed |
| 86 |
|
|
c HERE SUBROUTINE ephparms removed |
| 87 |
|
|
c HERE SUBROUTINE nutate removed |
| 88 |
|
|
c HERE FUNCTION jd removed |
| 89 |
|
|
c ************************************************************************ |