Connection to GIBS WMS Service times out
Posted: Mon Dec 01, 2025 2:18 pm America/New_York
I'm trying to follow this tutorial: https://github.com/nasa-gibs/gibs-api-docs/blob/main/docs/python-usage.ipynb
Last week I tried with Python 3.12 and it was a bust, as I have since learned that 3.12 isn't compatible with some crucial things (so I couldn't install/important various packages). Today I switched to 3.11 and it has been doing better.
I first tried to replicate the results of "Basic WMS connection":
That worked ok. But now I come back to it 30 mins or so later and I keep getting a timeout on this line:
A colleague in the same lab is also having the timeout issue now. Is the service down or am I/are we blocked?
Last week I tried with Python 3.12 and it was a bust, as I have since learned that 3.12 isn't compatible with some crucial things (so I couldn't install/important various packages). Today I switched to 3.11 and it has been doing better.
I first tried to replicate the results of "Basic WMS connection":
Code: Select all
# Connect to GIBS WMS Service
wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.1.1')
# Configure request for MODIS_Terra_CorrectedReflectance_TrueColor
img = wms.getmap(layers=['MODIS_Terra_CorrectedReflectance_TrueColor'], # Layers
srs='epsg:4326', # Map projection
bbox=(-180,-90,180,90), # Bounds
size=(1200, 600), # Image size
time='2021-09-21', # Time of data
format='image/png', # Image format
transparent=True) # Nodata transparency
# Save output PNG to a file
out = open('python-examples/MODIS_Terra_CorrectedReflectance_TrueColor.png', 'wb')
out.write(img.read())
out.close()
# View image
Image('python-examples/MODIS_Terra_CorrectedReflectance_TrueColor.png')Code: Select all
# Connect to GIBS WMS Service
wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.1.1')