satpy.readers.satpy_cf_nc module
Reader for files produced with the cf netcdf writer in satpy.
Introduction
The satpy_cf_nc
reader reads data written by the satpy cf_writer. Filenames for cf_writer are optional.
There are several readers using the same satpy_cf_nc.py reader.
Generic reader
satpy_cf_nc
EUMETSAT GAC FDR reader
avhrr_l1c_eum_gac_fdr_nc
Generic reader
The generic satpy_cf_nc
reader reads files of type:
'{platform_name}-{sensor}-{start_time:%Y%m%d%H%M%S}-{end_time:%Y%m%d%H%M%S}.nc'
Example:
Here is an example how to read the data in satpy:
from satpy import Scene
filenames = ['data/npp-viirs-mband-20201007075915-20201007080744.nc']
scn = Scene(reader='satpy_cf_nc', filenames=filenames)
scn.load(['M05'])
scn['M05']
Output:
<xarray.DataArray 'M05' (y: 4592, x: 3200)>
dask.array<open_dataset-d91cfbf1bf4f14710d27446d91cdc6e4M05, shape=(4592, 3200),
dtype=float32, chunksize=(4096, 3200), chunktype=numpy.ndarray>
Coordinates:
longitude (y, x) float32 dask.array<chunksize=(4096, 3200), meta=np.ndarray>
latitude (y, x) float32 dask.array<chunksize=(4096, 3200), meta=np.ndarray>
Dimensions without coordinates: y, x
Attributes:
start_time: 2020-10-07 07:59:15
start_orbit: 46350
end_time: 2020-10-07 08:07:44
end_orbit: 46350
calibration: reflectance
long_name: M05
modifiers: ('sunz_corrected',)
platform_name: Suomi-NPP
resolution: 742
sensor: viirs
standard_name: toa_bidirectional_reflectance
units: %
wavelength: 0.672 µm (0.662-0.682 µm)
date_created: 2020-10-07T08:20:02Z
instrument: VIIRS
Notes
Available datasets and attributes will depend on the data saved with the cf_writer.
EUMETSAT AVHRR GAC FDR L1C reader
The avhrr_l1c_eum_gac_fdr_nc
reader reads files of type:
''AVHRR-GAC_FDR_1C_{platform}_{start_time:%Y%m%dT%H%M%SZ}_{end_time:%Y%m%dT%H%M%SZ}_{processing_mode}_{disposition_mode}_{creation_time}_{version_int:04d}.nc'
Example:
Here is an example how to read the data in satpy:
from satpy import Scene
filenames = ['data/AVHRR-GAC_FDR_1C_N06_19810330T042358Z_19810330T060903Z_R_O_20200101T000000Z_0100.nc']
scn = Scene(reader='avhrr_l1c_eum_gac_fdr_nc', filenames=filenames)
scn.load(['brightness_temperature_channel_4'])
scn['brightness_temperature_channel_4']
Output:
<xarray.DataArray 'brightness_temperature_channel_4' (y: 11, x: 409)>
dask.array<open_dataset-55ffbf3623b32077c67897f4283640a5brightness_temperature_channel_4, shape=(11, 409),
dtype=float32, chunksize=(11, 409), chunktype=numpy.ndarray>
Coordinates:
* x (x) int16 0 1 2 3 4 5 6 7 8 ... 401 402 403 404 405 406 407 408
* y (y) int64 0 1 2 3 4 5 6 7 8 9 10
acq_time (y) datetime64[ns] dask.array<chunksize=(11,), meta=np.ndarray>
longitude (y, x) float64 dask.array<chunksize=(11, 409), meta=np.ndarray>
latitude (y, x) float64 dask.array<chunksize=(11, 409), meta=np.ndarray>
Attributes:
start_time: 1981-03-30 04:23:58
end_time: 1981-03-30 06:09:03
calibration: brightness_temperature
modifiers: ()
resolution: 1050
standard_name: toa_brightness_temperature
units: K
wavelength: 10.8 µm (10.3-11.3 µm)
Conventions: CF-1.8 ACDD-1.3
comment: Developed in cooperation with EUME...
creator_email: ops@eumetsat.int
creator_name: EUMETSAT
creator_url: https://www.eumetsat.int/
date_created: 2020-09-14T10:50:51.073707
disposition_mode: O
gac_filename: NSS.GHRR.NA.D81089.S0423.E0609.B09...
geospatial_lat_max: 89.95386902434623
geospatial_lat_min: -89.97581969005503
geospatial_lat_resolution: 1050 meters
geospatial_lat_units: degrees_north
geospatial_lon_max: 179.99952992568998
geospatial_lon_min: -180.0
geospatial_lon_resolution: 1050 meters
geospatial_lon_units: degrees_east
ground_station: GC
id: DOI:10.5676/EUM/AVHRR_GAC_L1C_FDR/...
institution: EUMETSAT
instrument: Earth Remote Sensing Instruments >...
keywords: ATMOSPHERE > ATMOSPHERIC RADIATION...
keywords_vocabulary: GCMD Science Keywords, Version 9.1
licence: EUMETSAT data policy https://www.e...
naming_authority: int.eumetsat
orbit_number_end: 9123
orbit_number_start: 9122
orbital_parameters_tle: ['1 11416U 79057A 81090.16350942...
platform: Earth Observation Satellites > NOA...
processing_level: 1C
processing_mode: R
product_version: 1.0.0
references: Devasthale, A., M. Raspaud, C. Sch...
source: AVHRR GAC Level 1 Data
standard_name_vocabulary: CF Standard Name Table v73
summary: Fundamental Data Record (FDR) of m...
sun_earth_distance_correction_factor: 0.9975244779999585
time_coverage_end: 19820803T003900Z
time_coverage_start: 19800101T000000Z
title: AVHRR GAC L1C FDR
version_calib_coeffs: PATMOS-x, v2017r1
version_pygac: 1.4.0
version_pygac_fdr: 0.1.dev107+gceb7b26.d20200910
version_satpy: 0.21.1.dev894+g5cf76e6
history: Created by pytroll/satpy on 2020-0...
name: brightness_temperature_channel_4
_satpy_id: DataID(name='brightness_temperatur...
ancillary_variables: []
- class satpy.readers.satpy_cf_nc.SatpyCFFileHandler(filename, filename_info, filetype_info, numeric_name_prefix='CHANNEL_')[source]
Bases:
BaseFileHandler
File handler for Satpy’s CF netCDF files.
Initialize file handler.
- property end_time
Get end time.
- property sensor_names
Get sensor set.
- property start_time
Get start time.