Atmospheric Optics — Line of Sight

Refraction Coefficient
Calculator

Enter two geographic points and compute the atmospheric refraction coefficient k — the number that determines how much light bends along your line of sight. Powered by real ERA5 reanalysis data from ECMWF.

ERA5 L137
Snell's Law Integration
Haversine Distance
● Free to use
Load a real-world example
Watch: How to use this tool in 60 seconds Animated walkthrough — from entering coordinates to reading your k value
Tool walkthrough
Step 1 — Enter your two points
Type the latitude, longitude and elevation for both the observer and the target. Use decimal degrees.
POINT A — OBSERVER
40.530
38.200
3,035 m
POINT B — TARGET
42.999
43.112
5,201 m
Distance auto-calculated:
493.0 km
· Bearing 57.3°
Step 2 — Atmospheric slice
The tool automatically computes which pressure levels the light ray passes through — only those levels are used in the calculation.
LOWER BOUND
699.8 hPa
at 3,035 m
MID-PATH
618.3 hPa
UPPER BOUND
536.8 hPa
at 5,201 m
Air outside this slice is excluded — using only the atmosphere the light actually travels through gives a more accurate k value.
Step 3 — Connect to ERA5 data
Paste your free Copernicus API key to fetch real measured atmospheric data. The guide below shows exactly how to get it in 2 minutes.
a1b2c3d4-e5f6-7890-abcd-ef1234567890
✓ API key entered — real ERA5 data will be requested for your coordinates and time.
Run Refraction Calculation
Step 4 — Your results
Refraction Coefficient k
0.1847
Near standard · typical for cold stable air
Avg refractivity N
271.4
Ray lift at target
1,073 m
Earth curve drop
19,076 m
Step 1 of 4 — Entering coordinates
Where was the observer, and what was the target?
Decimal degrees — positive = North/East, negative = South/West.
A
Observer (Point A)
Where you were standing
Location name
Latitude °N
?
Positive = North, negative = South. E.g. 40.530 for northern Turkey.
Longitude °E
?
Positive = East, negative = West. E.g. 38.200 for eastern Turkey.
Elevation (metres)
?
Height above sea level in metres. Determines which atmospheric slice the light ray passes through.
B
Target (Point B)
What you were looking at
Location name
Latitude °N
Longitude °E
Elevation (metres)
When was the observation?
Use UTC. ERA5 data is available every hour.
Date
?
Format: YYYY-MM-DD. ERA5 covers 1940 to ~5 days ago.
Time (UTC)
?
HH:MM in UTC. The nearest available ERA5 hour will be used.
Great-circle distance (km)
?
Auto-calculated using the Haversine formula from your coordinates. Override if you have a more precise measurement.
Units
?
Metric (metres, km) or Imperial (feet, miles). Applies to all inputs and outputs.
Observation mode
?
LOS: standard line-of-sight visibility. Surveying: precise levelling corrections. EDM: electronic distance measurement with wavelength correction.
Atmospheric slice
The calculation uses only the air between your two elevations — the exact layer the light ray travels through.
Lower bound (hPa)
?
Pressure at the observer's elevation. Higher altitude = lower hPa.
Mid-path (hPa)
Upper bound (hPa)
Automatically derived from your elevations. Only this pressure slice is used in the calculation.
ERA5 API Key
Paste your free Copernicus CDS key to fetch real measured data. Without it the tool uses the ICAO standard atmosphere. Guide below — 2 minutes to set up.
Or load ERA5 data from Python script
Run the included era5_fetch.py script, then paste the contents of era5_output.json below. This gives you full real ERA5 data without needing a server.
No API key entered — ICAO standard atmosphere will be used (pressure and temperature). Enter your ERA5 key for real measured data including humidity.
How to get your free ERA5 API key
Free service by ECMWF — registration takes 2 minutes.
1
Go to the Copernicus CDS website and create a free account
Open cds.climate.copernicus.eu in a new tab. Click the Register button in the top-right corner of the page. Fill in your name, email and a password. You'll get a confirmation email — click the verification link inside it. The service is entirely free.
cds.climate.copernicus.eu
Already have an account? Log in →
2
Log in, then open your Profile page
After verifying your email, log back in. Click your name or avatar in the top-right corner, then select Profile from the dropdown that appears.
cds.climate.copernicus.eu
3
Scroll down your Profile page and copy your API key
On the profile page, scroll down until you see a section called "API key" or "Your token". You'll see a long string like a1b2c3d4-e5f6-7890-abcd-ef1234567890. Click Copy next to it (or select the whole string and press Ctrl+C / Cmd+C). Keep this key private — treat it like a password.
cds.climate.copernicus.eu/profile
Account
API key
Licences
Downloads
API key
Use this key to access ERA5 data programmatically.
👆 Copy this
a1b2c3d4-e5f6-7890-abcd-ef1234567890
User UID: 123456
💡 Some accounts show two fields: a numeric User UID and the API key UUID. You only need the UUID — the longer string in the format shown above.
4
Accept the ERA5 dataset licence — this is required before any data downloads
Visit the ERA5 pressure levels dataset page. Scroll to the very bottom and click "Accept terms". You only do this once. Without it, API requests return a licence error even with a valid key.
cds.climate.copernicus.eu/datasets/reanalysis-era5-pressure-levels
ERA5 hourly data on pressure levels from 1940 to present
Licence to use Copernicus Products
By accepting, you agree to acknowledge ECMWF as the data source in any publications.
👆 Click to accept
Accept terms
This is the step most people miss! If you get a "licence not accepted" error when running the calculation, come back here and complete step 4.
5
Paste your key into the field above and run the calculation
Scroll back up to the API key field at the top of this section and paste your key. The green confirmation box will appear. Click Run Refraction Calculation below and the tool will request real ERA5 atmospheric data for your exact coordinates and time.
🕐 ERA5 data has a processing lag of about 5 days. For very recent observations, the ICAO standard atmosphere is used automatically.
Initialising…
Results
Computed k
refraction coefficient
Required k for visibility
refraction coefficient
What does this mean?

Full Analysis Report

All detailed results, diagrams and methodology — delivered as a PDF.

$12
Observation path
Date / Time (UTC)
Path distance
Computed k
Unlock the full analysis
Ray path diagrams  ·  Required vs computed k  ·  Sensitivity analysis  ·  Elevation angles  ·  Full atmospheric data table  ·  Methodology & data provenance
A — Visibility analysis: required k vs computed k
Minimum refraction needed for target to be geometrically visible, compared to the computed atmospheric value:
Required k
Computed k
Standard k
0.13
B — Ray height clearance along the path
Clearance chart
Shows how far above (or below) the geometric horizon the refracted ray travels at each point along the path.
C — Sensitivity analysis: how k responds to atmospheric variation
T − 2°C
Computed (base)
T + 2°C
RH − 10%
D — Elevation angles: geometric vs apparent
At Observer (A)
geometric
apparent
Refraction lifts apparent position
Observer geometric apparent
At Target (B)
geometric
apparent