Ticket #200: gpsro_driver.f90

File gpsro_driver.f90, 2.4 KB (added by Huw Lewis, 14 years ago)

package of FM routines

Line 
1PROGRAM gpsro_driver
2
3IMPLICIT NONE
4
5
6INTEGER, PARAMETER :: nlev=38 ! no. of p levels in state vec.
7INTEGER, PARAMETER :: nobs=110 ! initially assume 250 m spacing
8REAL :: roc
9REAL :: undul
10REAL :: lat
11REAL :: pres(nlev),temp(nlev),q(nlev)
12REAL :: zg(nlev)
13REAL :: a(nobs)
14REAL :: alpha(nobs)
15
16INTEGER :: i
17
18
19!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20! THIS DATA SHOULD BE REPLACED WITH THE UM MODEL INPUT
21!
22! set the atmospheric profile parameters easy values, to get the code
23! ruuning. This is where the UM data should go in.
24
25! set latitude to arb. value = 45 degrees
26
27lat = 45.0
28
29! set profile data
30
31DO i = 1,nlev
32
33! level height
34
35 zg(i) = REAL(i)*1000.0
36
37! pres (hPa)
38
39 pres(i) = 1013.0*EXP(-zg(i)/6000.0)
40
41! temp (K)
42
43 temp(i) = 270.0 ! isothermal for simplicity
44
45! Specific humidity (g/kg)
46
47 q(i) = 10.0*EXP(-zg(i)/1500.0)
48
49ENDDO
50
51!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52
53
54!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55!
56! I DON'T THINK YOU'LL NEED TO CHANGE THESE VALUES FOR THE STUDY
57! THEY SHOULD BE A REASONABLE STARTING POINT
58!
59! Now set the observation "impact heights". We'll assume that the observation
60! profile is always on a set of fixed impact heights, with a 250 m spacing.
61!
62! impact height = impact parameter - radius of curvature
63!
64!
65! radius of curvature
66
67roc = 6371000.0 ! set to mean radius of earth. OK for this study.
68
69undul = 0.0 ! ok for this study
70
71DO i = 1, nobs
72
73 a(i) = roc + 3000.0+REAL(i-1)*250.0
74
75ENDDO
76!
77!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
78
79! The routine that forward models the bending angles
80
81CALL alpha_op(nlev, & ! no. of model levs (=38)
82 nobs, & ! no. of bending angles in profile
83 roc, & ! radius of curv.
84 undul, & ! undulation (set to 0.0)
85 lat, & ! latitude of ob. location (degrees)
86 pres, & ! pressure on mod levels (hPa)
87 temp, & ! temp on model levels
88 q, & ! specific humidity (g/kg)
89 zg, & ! geopotential height of model levels (m)
90 a, & ! impact parameters
91 alpha) ! **OUTPUT** bending angles PROFILE
92
93write (6,*) 'alpha'
94
95DO i = 1,nobs
96
97 write (6,*) i,a(i)-roc,alpha(i)
98
99ENDDO
100
101
102END