/[MITgcm]/MITgcm_contrib/darwin/pkg/radtrans/radtrans_gha2000.F
ViewVC logotype

Annotation of /MITgcm_contrib/darwin/pkg/radtrans/radtrans_gha2000.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Mon Jan 4 17:08:12 2016 UTC (9 years, 6 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin_ckpt66l_20171025, ctrb_darwin_ckpt66a_20161020, ctrb_darwin_ckpt65y_20160801, ctrb_darwin_ckpt66o_20180209, ctrb_darwin_ckpt65x_20160612, ctrb_darwin_ckpt66j_20170815, ctrb_darwin_ckpt65u_20160315, ctrb_darwin_ckpt66k_20171025, ctrb_darwin_ckpt65s_20160114, ctrb_darwin_ckpt66i_20170718, ctrb_darwin_ckpt66n_20180118, ctrb_darwin_ckpt66b_20161219, ctrb_darwin_ckpt65t_20160221, ctrb_darwin_ckpt66f_20170407, ctrb_darwin_ckpt65w_20160512, ctrb_darwin_ckpt66g_20170424, ctrb_darwin_ckpt66c_20170121, ctrb_darwin_ckpt66h_20170602, ctrb_darwin_ckpt66d_20170214, ctrb_darwin_ckpt65v_20160409, ctrb_darwin_ckpt66m_20171213, ctrb_darwin_ckpt66e_20170314, ctrb_darwin_ckpt65z_20160929, HEAD
Changes since 1.1: +4 -4 lines
fix argument type

1 jahn 1.2 C $Header: /u/gcmpack/MITgcm_contrib/darwin/pkg/radtrans/radtrans_gha2000.F,v 1.1 2010/06/09 15:59:37 jahn Exp $
2     C $Name: $
3 jahn 1.1
4     #include "RADTRANS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: RADTRANS_GHA2000
8    
9     C !INTERFACE: ======================================================
10     subroutine radtrans_gha2000 (radeg, iyr, imon, day, gha)
11    
12     C !DESCRIPTION:
13     c This subroutine computes the Greenwich hour angle in degrees for the
14     c input time. It uses the model referenced in The Astronomical Almanac
15     c for 1984, Section S (Supplement) and documented in Exact
16     c closed-form geolocation algorithm for Earth survey sensors, by
17     c F.S. Patt and W.W. Gregg, Int. Journal of Remote Sensing, 1993.
18     c It includes the correction to mean sideral time for nutation
19     c as well as precession.
20    
21     c Calling Arguments
22    
23     c Name Type I/O Description
24     c
25     c iyr I*4 I Year (four digits)
26     c day R*8 I Day (time of day as fraction)
27     c gha R*8 O Greenwich hour angle (degrees)
28    
29    
30     c Subprograms referenced:
31     c
32     c JD Computes Julian day from calendar date
33     c EPHPARMS Computes mean solar longitude and anomaly and
34     c mean lunar lontitude and ascending node
35     c NUTATE Compute nutation corrections to lontitude and
36     c obliquity
37     c
38     c
39     c Program written by: Frederick S. Patt
40     c General Sciences Corporation
41     c November 2, 1992
42     c
43     c Modification History:
44     c
45     C !USES: ===========================================================
46     IMPLICIT NONE
47     #include "RADTRANS_VARS.h"
48    
49     C !INPUT PARAMETERS: ===============================================
50     INTEGER myThid
51 jahn 1.2 _RL radeg, day
52     INTEGER iyr, imon
53 jahn 1.1
54     C !OUTPUT PARAMETERS: ==============================================
55     _RL gha
56    
57     C !FUNCTIONS: ======================================================
58     INTEGER radtrans_jd
59     EXTERNAL radtrans_jd
60    
61     C !LOCAL VARIABLES: ================================================
62     integer iday,jday,nt
63     _RL fday, t, gmst, xls, gs, xlm, omega
64    
65     data nutime /-99999/
66     CEOP
67    
68     c Compute days since J2000
69     iday = int(day)
70     fday = day - iday
71     jday = radtrans_jd(iyr,imon,iday)
72     t = jday - 2451545.5D0 + fday
73     c Compute Greenwich Mean Sidereal Time (degrees)
74     gmst = 100.4606184D0 + 0.9856473663D0*t + 2.908D-13*t*t
75    
76     c Check if need to compute nutation correction for this day
77     nt = int(t)
78     if (nt.ne.nutime) then
79     nutime = nt
80     call radtrans_ephparms (t, xls, gs, xlm, omega)
81     call radtrans_nutate (radeg, t, xls, gs, xlm, omega, dpsi, eps)
82     end if
83    
84     c Include apparent time correction and time-of-day
85     gha = gmst + dpsi*cos(eps/radeg) + fday*360.0D0
86     gha = mod(gha,360.0)
87     if (gha.lt.0.0D0) gha = gha + 360.0D0
88    
89     return
90     end
91    

  ViewVC Help
Powered by ViewVC 1.1.22