What are environmental variables?
Remote sensing environmental variables are measurable properties of the Earth's land, water, and atmosphere captured using satellite, airborne, or ground-based sensors.
Environmental variables are sometimes called 'geophysical parameters' in remote sensing. When classified by international Earth observation frameworks (such as NASA Earthdata or the Global Climate Observing System), they are specifically referred to as Essential Climate Variables (ECVs) or Essential Variables (EVs) when used to monitor Earth's processes, land surface dynamics, and climate change.
The Google Earth Engine Data Catalog hosts a massive, multi-petabyte repository of geospatial data. The environmental variables accessible on the platform are structured across several main scientific categories:
1. Atmosphere & Climate
Data parameters detailing the composition, dynamics, and short- to long-term conditions of the lower atmosphere:
- Temperature: Surface air temperature, land surface temperature (LST), maximum/minimum temperature, and ocean/sea surface temperature (SST).
- Precipitation: Total rainfall, snowfall, convective precipitation, and rainfall intensity.
- Atmospheric Water & Humidity: Specific humidity, relative humidity, precipitable water vapor, and dewpoint temperature.
- Wind: Wind speed, wind vector components (u and v vectors), and gust speed.
- Radiation & Solar: Downwelling shortwave/longwave radiation, solar irradiance, and photosynthetically active radiation (PAR).
- Atmospheric Composition: Ozone levels, methane concentrations (CH₄), carbon dioxide (CO₂), nitrogen dioxide (NO₂), sulfur dioxide (SO₂), and aerosol optical depth (AOD).
- Derived Bioclimatic Indexes: 19 bioclimatic variables (e.g., from WorldClim) including annual mean temperature, seasonality, and precipitation of the driest/wettest quarters.
2. Land Surface & Topography
Physical parameters of the Earth's crust, elevation, and terrain:
- Elevation & Topography: Digital Elevation Models (DEMs), slope, aspect, hillshade, terrain roughness, and topographic position index (TPI).
- Soil Properties: Soil moisture (surface and root-zone), soil organic carbon, soil pH, bulk density, and sand/silt/clay fractions.
- Land Use & Land Cover (LULC): Crop classification maps, global forest cover change, urban footprint, and global ecosystem classifications.
- Geophysical Disturbance: Areas annually burned, active thermal anomalies (fires), and time-since-fire indices.
3. Biosphere & Vegetation Indices
Variables indicating the distribution, health, and productivity of plant life:
- Vegetation Indices: Normalized Difference Vegetation Index (NDVI), Enhanced Vegetation Index (EVI), and Soil Adjusted Vegetation Index (SAVI).
- Plant Productivity: Gross Primary Productivity (GPP), Net Primary Productivity (NPP), Fraction of Absorbed Photosynthetically Active Radiation (FAPAR), and Leaf Area Index (LAI).
- Forest & Biomass: Tree canopy height, above-ground biomass, and canopy cover fraction.
4. Hydrology & Cryosphere
Water dynamics on the surface and frozen landscapes:
- Surface and Ground Water: Surface water extent, river discharge, groundwater storage anomalies, and water quality indicators (chlorophyll-a, turbidity).
- Evapotranspiration: Potential evapotranspiration (PET), actual evapotranspiration (ET), and latent heat flux.
- Cryosphere (Ice & Snow): Snow water equivalent (SWE), snow cover extent, albedo, glacier velocity, and sea ice concentration.
5. Human Dimensions & Infrastructure
Socio-environmental datasets representing human modification of landscapes:
- Human Footprint: Nighttime lights (radiance), population density, human modification index, and road network proximity.
/**
* 1. DEFINE YOUR STUDY AREA & TIME PERIOD
* Replace 'geometry' below with your hand-drawn polygon or asset link if needed.
*/
// Default study area: A 20km square box around a sample point
var studyArea = ee.Geometry.Point([-122.25, 37.87]).buffer(20000);
Map.centerObject(studyArea, 10);
Map.addLayer(studyArea, {color: 'red'}, 'Study Area Boundary', false);
var startDate = '2025-01-01';
var endDate = '2025-12-31';
/**
* 2. LOAD & PROCESS ENVIRONMENTAL VARIABLES
*/
// --- Variable A: Temperature (ERA5-Land Mean Air Temperature) ---
var temp = ee.ImageCollection("ECMWF/ERA5_LAND/MONTHLY_AGGR")
.filterBounds(studyArea)
.filterDate(startDate, endDate)
.select('temperature_2m')
.mean() // Average over the year
.subtract(273.15) // Convert Kelvin to Celsius
.clip(studyArea)
.rename('mean_temperature_celsius');
// --- Variable B: Precipitation (CHIRPS Daily Rainfall) ---
var precip = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.filterBounds(studyArea)
.filterDate(startDate, endDate)
.select('precipitation')
.sum() // Total annual rainfall
.clip(studyArea)
.rename('total_precipitation_mm');
// --- Variable C: Soil Moisture (NASA USDA Global Soil Moisture) ---
var soilMoisture = ee.ImageCollection("NASA_USDA/HSL/SMAP10KM_soil_moisture")
.filterBounds(studyArea)
.filterDate(startDate, endDate)
.select('ssm') // Surface soil moisture
.mean()
.clip(studyArea)
.rename('surface_soil_moisture');
// --- Variable D: Topography (NASADEM Elevation) ---
var elevation = ee.Image("NASA/NASADEM_HGT/001")
.select('elevation')
.clip(studyArea)
.rename('elevation_meters');
// --- Variable E: Vegetation Health (Sentinel-2 NDVI) ---
// Function to mask clouds in Sentinel-2
function maskS2clouds(image) {
var qa = image.select('QA60');
var cloudBitMask = 1 << 10;
var cirrusBitMask = 1 << 11;
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask).divide(10000);
}
var s2 = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED")
.filterBounds(studyArea)
.filterDate(startDate, endDate)
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
.map(maskS2clouds);
var ndvi = s2.median().normalizedDifference(['B8', 'B4']) // NIR and Red bands
.clip(studyArea)
.rename('ndvi_median');
/**
* 3. VISUALIZE DATA LAYERS ON THE MAP
*/
Map.addLayer(temp, {min: 0, max: 35, palette: ['blue', 'yellow', 'red']}, 'Mean Temp (°C)');
Map.addLayer(precip, {min: 200, max: 2000, palette: ['brown', 'yellow', 'blue']}, 'Total Precip (mm)');
Map.addLayer(soilMoisture, {min: 0, max: 25, palette: ['red', 'yellow', 'green']}, 'Surface Soil Moisture');
Map.addLayer(elevation, {min: 0, max: 2000, palette: ['green', 'yellow', 'brown']}, 'Elevation (m)');
Map.addLayer(ndvi, {min: 0, max: 0.8, palette: ['white', 'yellow', 'green']}, 'NDVI Median');
/**
* 4. COMBINE AND EXPORT TO GOOGLE DRIVE
* This combines all bands into a single multiband GeoTIFF file.
*/
var completeDataset = ee.Image.cat([temp, precip, soilMoisture, elevation, ndvi]);
Export.image.toDrive({
image: completeDataset,
description: 'Environmental_Variables_Export',
folder: 'GEE_Exports',
scale: 30, // Resolution in meters (Adjust higher if exporting massive areas to avoid errors)
region: studyArea,
maxPixels: 1e13,
fileFormat: 'GeoTIFF'
});
print("Layers compiled! Head to the 'Tasks' tab on the right and click 'Run' to begin the download.");Thank you for reading.












