Objectives

  • The objectives of this notebook is to provide examples about working with CloudSat L2 and AUX files, including:
    • Background information of CloudSat Project, its functionality and mission;
    • How to access to the CloudSat datasets via CloudSat Data Processing Center;
    • How to use a custom Python module e.g. CloudSat_tools;
  • The files required for this notebook including:

      2006303212128_02702_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf
      2006303212128_02702_CS_2B-GEOPROF-LIDAR_GRANULE_P2_R04_E02.hdf
      2006303212128_02702_CS_2C-RAIN-PROFILE_GRANULE_P_R04_E02.hdf
      2006303212128_02702_CS_ECMWF-AUX_GRANULE_P_R04_E02.hdf
    
      2006303212128_02702_CS_2B-GEOPROF_GRANULE_P_R04_E02.h5
      2006303212128_02702_CS_2B-GEOPROF-LIDAR_GRANULE_P2_R04_E02.h5
      2006303212128_02702_CS_2C-RAIN-PROFILE_GRANULE_P_R04_E02.h5
      2006303212128_02702_CS_ECMWF-AUX_GRANULE_P_R04_E02.h5
  • Files above are CloudSat L2 and AUX products, Granule 02702, observed on Oct 30 2006, Which consist with what we discussed in 01_MODIS_L1B.ipynb and 02_CALIPSO_L2.ipynb.
  • *.hdf is the HDF4 file, Section 2 introduced the way to get these files.
  • *.h5 is the HDF5 file which can be converted from HDF4 files. See 01_MODIS_L1B.ipynb and 02_CALIPSO_L2.ipynb for more information.

In [0]:
__author__ = 'ATSC-301 UBC'

About CloudSat Project

CloudSat and CALIPSO launched by the same rocket (Delta II) and use the same orbit.

**Wikipedia *CloudSat* Page**

CloudSat is a NASA Earth observation satellite, which was launched on a Delta II rocket on April 28, 2006. It uses radar to measure the altitude and properties of clouds, adding to information on the relationship between clouds and climate in order to help resolve questions about global warming.

CloudSat flies in formation in the "A Train", with several other satellites: Aqua, Aura, CALIPSO and the French PARASOL.

The mission was selected under NASA's Earth System Science Pathfinder program in 1999. Ball Aerospace & Technologies Corp. in Boulder, Colorado, designed and built the spacecraft.

CloudSat's primary mission was scheduled to continue for 22 months in order to allow more than one seasonal cycle to be observed.

*CloudSat Project* Page at Dept. of Atmospheric Science, Colorado State U.

CloudSat was selected as a NASA Earth System Science Pathfinder satellite mission in 1999 to provide observations necessary to advance our understanding of cloud abundance, distribution, structure, and radiative properties. Since 2006, CloudSat has flown the first satellite-based millimeter-wavelength cloud radar—a radar that is more than 1000 times more sensitive than existing weather radars. Unlike ground-based weather radars that use centimeter wavelengths to detect raindrop-sized particles, CloudSat's radar allows us to detect the much smaller particles of liquid water and ice that constitute the large cloud masses that make our weather.

CloudSat was co-manifested with the CALIPSO (Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observations) satellite aboard a Delta II rocket for its launch on 28 April 2006. In a series of maneuvers, CloudSat and CALIPSO joined three satellites already in orbit ( Aqua, PARASOL, and Aura) to form a constellation of satellites known as the A-Train on 1 June 2006. The satellites fly in a nearly circular orbit with an equatorial altitude of approximately 705 km. The orbit is sun-synchronous, maintaining a roughly fixed angle between the orbital plane and the mean solar meridian. CloudSat maintains a close formation with Aqua and a particularly close formation with CALIPSO, providing near-simultaneous and collocated observations with the instruments on these two platforms. Combined data products are in development using data streams from CloudSat + Aqua and CloudSat + CALIPSO.

Findout the datasets we need

Step1 - Check data Availability

Register in the **CloudSat Data Processing Center** and look at the data product information.

Here is a list of CloudSat data product with descriptions:

_
Standard Data Product Description
1B-CPR L1B Radar Backscatter Profiles. Including received echo power
2B-GEOPROF L2B Cloud Geometrical Profile. Including cloud mask, radar reflectivities
2B-CLDCLASS L2B Cloud Classification
2B-CWC-RO L2B Radar-only Liquid/Ice Water Content
2B-TAU L2B Cloud Optical Depth
2B-CWC-RVOD L2B Radar Liquid/Ice Water Content plus Visible Optical Depth
2B-FLXHR L2B Radiative fluxes and heating rates
2B-GEOPROF-LIDAR L2B CloudSat CPR plus CALIPSO Lidar Cloud mask
2B-CLDCLASS-LIDAR L2B Cloud Clasification from CPR and CALIPO Lidar
2C-RAIN-PROFILE L2C Cloud Rain Rate and Liquid/Ice Water Content
2C-PRECIP-COLUMN L2C Column Integrated Precipitation
2C-CLOUDSAT-TRMM L2C CloudSat Cloud Mask plus L2 TRMM at Orbit Intersections
Auxiliary Products Description
ECMWF-AUX ECMWF Auxiliary Data (State Variables)
MODIS-AUX MODIS Auxiliary Data (Data from 22 MODIS Channels)

Here we only use Standard L2 datasets 2B-GEOPROF, 2B-GEOPROF-LIDAR, 2C-RAIN-PROFILE and Auxiliary Product ECMWF-AUX.

Step2 - Choose the date, time and Granule

Enter in the CloudSat **Quicklook Image Archive**, select the date, time and check the orbit track in Granule number, see if the image agrees with your idea or not.

After a careful look, we choose 10/30/2006, Granule 02702.

Here is a screenshot of the CloudSat Image Archive:

====================================================================================================================================

====================================================================================================================================

Step3 - Order Datasets

Once you have made your choice, you can go to **Data Order System**. Do the following steps:

  • Click "Browse", select the the date, time, Granule Number and products.
  • Select the products you need, click "Add to Cart".
  • Move to "Cart ${you ordered file size}" and click "Place Order".
  • Check your "Order Status", it may look like this:

  • When your order complete:

Step4 - Download & convert

See 01_MODIS_L1B.ipynb and 02_CALIPSO_L2.ipynb for more information.

Import modules and tools

This notebook use a developed Python module CloudSat_tools (in _libs/CloudSat_tools) to read the datasets. So firstly we should build a new path for our customized module.


In [0]:
import sys
sys.path.insert(0, '_libs/CloudSat_tools')

In [0]:
import glob
import h5py
import scipy.io
import numpy as np
#
import orbit_tool as OT
import cloudsat_tool as CT
OT=reload(OT)
CT=reload(CT)
#
from __future__ import division
from __future__ import print_function
% matplotlib inline

Read CloudSat data through CloudSat_tools

Searching required *.h5 files in _data/CloudSat_L2/ directory, Make sure that you have the converted HDF5 files exist in it.


In [0]:
hdf5_radar=glob.glob('_data/CloudSat_L2/*CS_2B-GEOPROF_GRANULE*.h5')
print("2B-GEOPROF file found\n{}".format(hdf5_radar))
print("==================================================================")
hdf5_lidar=glob.glob('_data/CloudSat_L2/*2B-GEOPROF-LIDAR*.h5')
print("2B-GEOPROF-LIDAR file found\n{}".format(hdf5_lidar))
print("==================================================================")
hdf5_rain=glob.glob('_data/CloudSat_L2/*2C-RAIN-PROFILE*.h5')
print("2C-RAIN-PROFILE file found\n{}".format(hdf5_rain))
print("==================================================================")
hdf5_EC=glob.glob('_data/CloudSat_L2/*ECMWF-AUX*.h5')
print("ECMWF-AUX file found\n{}".format(hdf5_EC))

Read geo-location, height and time


In [0]:
help(CT.get_geo)
lat, lon, date_day, prof_sec, dem_elev = CT.get_geo(hdf5_radar[0], 1)
#lat_lidar, lon_lidar, date_day_lidar, prof_seconds_lidar, dem_elevation_lidar = readCS.get_geo(hdf5_lidar[0])
#lat_rain, lon_rain, date_day_rain, prof_seconds_rain, dem_elevation_rain = readCS.get_geo(hdf5_rain[0])
#lat_EC, lon_EC, date_day_EC, prof_seconds_EC, dem_elevation_EC = readCS.get_geo(hdf5_EC[0])

Read physical records (reflectivity, cloud top height, etc.)


In [0]:
help(CT.read_ecmwf)

In [0]:
height, reflect = CT.read_radar(hdf5_radar[0], 2)
CFrac, LayerTop, LayerBase = CT.read_lidar(hdf5_lidar[0], 2)
rain, precli, precice, clw = CT.read_rain(hdf5_rain[0], 2)
P, SLP, T, T2m, SKT, q, O3 = CT.read_ecmwf(hdf5_EC[0], 2)

In [0]:

View the orbit track


In [0]:
#help(dOrbit.draw_orbit)
lonlim=[-330, 120]; latlim=[-90, 90]
OT.draw_orbit(hdf5_radar[0], lonlim, latlim, 625, 2, 1)

Segment the orbit track

The CloudSat files we used here has the same Granule Nmber as CALIPSO files we used, so it cross the clouds in the same way, and we segment the orbit by the same criteria:

$35^\circ N < Latitude < 52^\circ N$

Here we load the figure producted by 02_CALIPSO_L2.ipynb to again, make it clear.

We use orbit_tool.segment_orbit to segment the orbit, it uses np.searchsorted.


In [0]:
xlim_indices = OT.segment_orbit(lat, [35, 52])

In [0]:
time_seg=date_day[xlim_indices[0]:xlim_indices[1]]
elev_seg=dem_elev[xlim_indices[0]:xlim_indices[1]]
lat_seg=lat[xlim_indices[0]:xlim_indices[1]]
lon_seg=lon[xlim_indices[0]:xlim_indices[1]];lon_seg=lon_seg[::-1]
height_seg=height[xlim_indices[0]:xlim_indices[1], :]
# reflectivity
reflect_seg=reflect[xlim_indices[0]:xlim_indices[1], :]
# cloud top height
LayerTop_seg=LayerTop[xlim_indices[0]:xlim_indices[1], :]
# rain rate
rain_seg=rain[xlim_indices[0]:xlim_indices[1]]
# cloud liquid water
clw_seg=clw[xlim_indices[0]:xlim_indices[1], :]
# pressure, temperature, humidity
P_seg=P[xlim_indices[0]:xlim_indices[1], :]
T_seg=T[xlim_indices[0]:xlim_indices[1], :]
q_seg=q[xlim_indices[0]:xlim_indices[1], :]

Save the result as *.mat


In [0]:
time_str=[0] * len(time_seg)
for i in range(len(time_seg)):
    time_str[i]=time_seg[i].strftime('%H:%M UCT')
    
scipy.io.savemat('_share/03_CloudSat_Radar', \
                 {'longitude': lon_seg, 'latitude': lat_seg, 'time': time_str, 'surf_elev': elev_seg, 'Cloud_ref': reflect_seg})
scipy.io.savemat('_share/03_CloudSat_Lidar', \
                 {'longitude': lon_seg, 'latitude': lat_seg, 'time': time_str, 'surf_elev': elev_seg, 'Cloud_Top_Height': LayerTop_seg})
scipy.io.savemat('_share/03_CloudSat_Rain', \
                 {'longitude': lon_seg, 'latitude': lat_seg, 'time': time_str, 'surf_elev': elev_seg, 'Cloud_Rain_Rate': rain_seg, 'Cloud_Liq_Water': clw_seg})
scipy.io.savemat('_share/03_CloudSat_ECMWF', \
                 {'longitude': lon_seg, 'latitude': lat_seg, 'time': time_str, 'surf_elev': elev_seg, 'P': P_seg, 'T': T_seg, 'q': q_seg})

Plot the result

Here is a series of figures of variables in CloudSat products.

Currently, draw_CloudSat_1Dvar and draw_CloudSat_2Dvar in orbit_tool provide a basic visualization of ClouSat variables.

I made them work through following input sequence:

OT.draw_CloudSat_1Dvar(lon, lat, time, 1Dvar, 'var_name ( unit )', 'title_name', '_figures/03_fig_name.png')
OT.draw_CloudSat_2Dvar(lon, lat, height, elev, time, 2Dvar,  colormap, 'var_name ( unit )', 'title_name', '_figures/03_fig_name.png')

For 2-D variables, we need to expand the dimension of geolocation field to 2-D, here we use longitude:


In [0]:
_, lon_seg_mesh=np.meshgrid(height_seg[0, :], lon_seg)

Rain Rate


In [0]:
title='CloudSat CloudSat Rain Rate '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_1Dvar(lon_seg, lat_seg, time_seg, rain_seg, 'CloudSat Rain Rate ( mm/hr )', title, '_figures/03_CloudSat_rain.png')

Lidar Cloud Top Height


In [0]:
title='CloudSat Lidar Cloud Top Height'+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_1Dvar(lon_seg, lat_seg, time_seg, LayerTop_seg[:, 0], 'Lidar Cloud Top Height( km )', title, '_figures/03_CloudLayerTop.png')

Radar Reflectivity


In [0]:
title='CloudSat Radar Reflectivity '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_2Dvar(lon_seg_mesh, lat_seg, height_seg, elev_seg, time_seg, reflect_seg,  plt.cm.jet,\
                 'Radar Reflectivity ( dbZ )', title, '_figures/03_RadarRef.png')

Cloud Liquid Water


In [0]:
title='CloudSat Cloud Liquid Water '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_2Dvar(lon_seg_mesh, lat_seg, height_seg, elev_seg, time_seg, clw_seg/1e3,  plt.cm.YlGnBu,\
                 'Cloud Liquid Water ( $\mathrm{kg/m^3}$ )', title, '_figures/03_CLW.png')

ECMWF Background Info.

Pressure


In [0]:
title='CloudSat ECMWF Pressure '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_2Dvar(lon_seg_mesh, lat_seg, height_seg, elev_seg, time_seg, P_seg,  plt.cm.jet,\
                 'Pressure ( hPa )', title, '_figures/03_Pres.png')

Temperature


In [0]:
title='CloudSat ECMWF Temperature '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_2Dvar(lon_seg_mesh, lat_seg, height_seg, elev_seg, time_seg, T_seg,  plt.cm.gnuplot,\
                 'Temperature ( K )', title, '_figures/03_Temp.png')

Specific Humidity


In [0]:
title='CloudSat ECMWF Specific Humidity '+time_seg[0].strftime('%Y%M%d')+'\nGranule Number: '+hdf5_radar[0][-40:-35]
OT.draw_CloudSat_2Dvar(lon_seg_mesh, lat_seg, height_seg, elev_seg, time_seg, q_seg*1e3,  plt.cm.gist_ncar_r,\
                 'Specific Humidity ( g/kg )', title, '_figures/03_q.png')

In [0]: