Skip to content

Commit d698d6a

Browse files
committed
Relax p.676 Earth-space path condition
This makes p676_gas() usable down to eldeg = 5. * src/prop.f90 (p676_gas): As stated. This relaxation is in ITU-R P676-11 over the condition in ITU-R P676-3, which was 10 deg. * test/test-2.py: Exercise eldeg = 5.
1 parent 35295f2 commit d698d6a

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.github/workflows/c-cpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI
1+
name: CI
22

33
on:
44
push:
@@ -15,7 +15,7 @@ jobs:
1515
- name: update
1616
run: |
1717
sudo apt update
18-
sudo apt install gcc-11 gfortran-11 python3
18+
sudo apt install gfortran-11 gcc-11 python3
1919
- name: configure
2020
run: cmake .
2121
env:

TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ help: [C-uc .] insert timestamp [C-cc] flip checkbox [C-uucc] partial flip check
2323
- [X] scintillation loss (P.618-13 2.4)
2424
- [ ] total loss (P.618-13)
2525
- [ ] aeronautical mobile specifics (P682)
26-
- [ ] lower elevation angle effects (<5°) P676, P619, P682
26+
- [ ] lower elevation angle effects (<5°, <10°) P676, P619, P682
2727
- [ ] tropospheric effects (P834)
2828
- [ ] effects <10 GHz (ionospheric scintillation, Faraday rotation, etc.)
2929
- [ ] Earth to space interference (P619)

src/prop.f90

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ real(C_DOUBLE) function p676_gas(eldeg, freq, P, e, temp, Vt, hs) &
756756
real(C_DOUBLE), intent(in) :: P ! dry air pressure (hPa)
757757
real(C_DOUBLE), intent(in) :: e ! vapor part. pressure e(P) (hPa)
758758
real(C_DOUBLE), intent(in) :: temp ! temperature (K)
759-
real(C_DOUBLE), intent(in), optional :: Vt ! total vaper vapor content (kg/m^2), cf p836_V()
759+
real(C_DOUBLE), intent(in), optional :: Vt ! total water vapor content (kg/m^2), cf p836_V()
760760
real(C_DOUBLE), intent(in), optional :: hs ! station height above mean sea level (km)
761761

762762
real :: go, gw, ho, hw, attw
@@ -823,7 +823,7 @@ real(C_DOUBLE) function p676_gas(eldeg, freq, P, e, temp, Vt, hs) &
823823
end block
824824
end if
825825

826-
if (eldeg>=10. .and. eldeg<=90.) then ! §2.2.1
826+
if (eldeg>=5. .and. eldeg<=90.) then ! §2.2.1
827827

828828
! ! debug intermediate values
829829
! write(*, *) 'ho', ho
@@ -836,7 +836,7 @@ real(C_DOUBLE) function p676_gas(eldeg, freq, P, e, temp, Vt, hs) &
836836
! write(*, *) 'Aw/sinθ', hw*gw / sin(deg2rad(eldeg))
837837

838838
att = (ho*go + attw) / sin(deg2rad(eldeg)) ! (29)
839-
else
839+
else ! FIXME §2.2.2
840840
stop 105
841841
end if
842842

@@ -1059,7 +1059,7 @@ end function p836_height_scale
10591059

10601060

10611061
! Water vapor density, ρ in g/m³ exceeded for ppc of an average year.
1062-
! After ITU-R P.836-6 Annex 2.
1062+
! After ITU-R P.836-6 Annex 1.
10631063

10641064
real(C_DOUBLE) function p836_rho(lat, lon, ppc, h) &
10651065
bind(c) &
@@ -1075,7 +1075,8 @@ real(C_DOUBLE) function p836_rho(lat, lon, ppc, h) &
10751075
end function p836_rho
10761076

10771077

1078-
! Total vaper vapor content, after ITU-R P.836-6 Annex 2.
1078+
! Total water vapor content.
1079+
! After ITU-R P.836-6 Annex 2.
10791080

10801081
real(C_DOUBLE) function p836_V(lat, lon, ppc, h) &
10811082
bind(c, name='p836_V') &

test/test-2.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,17 @@ def rel_error(a, b):
3535
print("lat {0:f} lon {1:f} hr {2:f} rerr {3:s}".format(lat, lon, hr, repr(rerr)));
3636
ne += (rerr>=1e-15)
3737

38+
# not in validation tables, just exercise eldeg = 5 limit
39+
40+
hs = 0.4
41+
temp = 290
42+
P = prop.p676_vapor_pressure(7.5, temp)
43+
Vt = prop.p836_V(45., 6., 1, hs)
44+
eldeg = 5
45+
fghz = 10
46+
A = prop.p676_gas(eldeg, fghz, 1013.25, P, temp, Vt, hs)
47+
rerr = rel_error(0.7464453612889095, A)
48+
print("eldeg {0:f} fghz {1:f} rerr {2:s}".format(eldeg, fghz, repr(rerr)));
49+
ne += (rerr>=1e-15)
50+
3851
sys.exit(ne)

0 commit comments

Comments
 (0)