warsa.precipitation.satellite.cmorph package

Submodules

warsa.precipitation.satellite.cmorph.download module

class CMorphFTP(local_folder, prefix, suffix, dir_lens, ftp_dir)

Bases: warsa.precipitation.satellite.download.SatelliteBasedPrecipitationDownloadFTP

ftp://ftp.cpc.ncep.noaa.gov

static get_datetime_from_file_name(filename)
class CMorphV0x025deg3hlyFTP(local_folder)

Bases: warsa.precipitation.satellite.cmorph.download.CMorphFTP

Source:
ftp://ftp.cpc.ncep.noaa.gov//precip/CMORPH_V0.x/RAW/
File format:
CMORPH_V0.x_RAW_8km-30min_2011080100.gz
static get_datetime_from_file_name(filename)
class CMorphV0x025degDailyFTP(local_folder)

Bases: warsa.precipitation.satellite.cmorph.download.CMorphFTP

Source:
ftp://ftp.cpc.ncep.noaa.gov//precip/CMORPH_V0.x/RAW/8km-30min
Format:
CMORPH_V0.x_RAW_0.25deg-DLY_00Z_20140601.bz2 CMORPH_V0.x_RAW_0.25deg-DLY_00Z_20161111.gz
static get_datetime_from_file_name(filename)
class CMorphV1x025deg3hlyFTP(local_folder)

Bases: warsa.precipitation.satellite.cmorph.download.CMorphFTP

Source:
ftp://ftp.cpc.ncep.noaa.gov//precip/CMORPH_V1.0/RAW/0.25deg-3HLY/1998/199801/
Format
CMORPH_V1.0_RAW_0.25deg-3HLY_19980101.gz
static get_datetime_from_file_name(filename)
class CMorphV1x025degDailyFTP(local_folder)

Bases: warsa.precipitation.satellite.cmorph.download.CMorphFTP

Source:
ftp://ftp.cpc.ncep.noaa.gov/precip/CMORPH_V1.0/RAW/0.25deg-DLY_00Z/1998/199801/
Format:
CMORPH_V1.0_RAW_0.25deg-DLY_00Z_19980101.gz CMORPH_V1.0_RAW_0.25deg-DLY_00Z_20160101.bz2
static get_datetime_from_file_name(filename)
class CMorphV1x8km30minFTP(local_folder)

Bases: warsa.precipitation.satellite.cmorph.download.CMorphFTP

Source
ftp://ftp.cpc.ncep.noaa.gov/precip/CMORPH_V1.0/RAW/8km-30min
Format
CMORPH_V1.0_8km-30min_199801.tar
static get_datetime_from_file_name(filename)

warsa.precipitation.satellite.cmorph.download_v0x_8km_30min module

class CMorphV0x8km30minFTP(local_folder)

Bases: object

ftp://ftp.cpc.ncep.noaa.gov/precip/CMORPH_V0.x/RAW/8km-30min/2011/201108/ CMORPH_V0.x_RAW_8km-30min_2011080100.gz

download(update=False, verbose=True, begin=None, end=None)
Parameters:
  • update – if TRUE, checks for any missing file on the local folder, otherwise starts download at the last saved file
  • verbose – if TRUE, outputs the current file being downloaded as well the time in seconds took to download each file
  • begin
  • end
download_ftp_files(missing_datetime)
static get_datetime_from_file_name(filename)
get_ftp_file_names(lines)
get_full_dir_name(dt)
get_local_files()
get_missing_datetime(datetime_begin=None, datetime_end=None)
get_missing_ftp_files(missing_datetimes)
static valid_filename(filename)
clean_path(path)
parse_ftp_dirs(folder_length, lines)

warsa.precipitation.satellite.cmorph.rasterize module

class CMorphRasterize(product_dir, output_raster_dir, suffix, **kwargs)

Bases: warsa.precipitation.satellite.rasterize.Rasterizer

get_raster_datasets_3hly(product_filename)
get_raster_datasets_daily(product_filename)
static rasterize_block(arr, nx, ny, x_res, y_res)
class CMorphV0x025deg3hlyRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)
class CMorphV0x025degDailyRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)
class CMorphV0x8km30minRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)
class CMorphV1x025deg3hlyRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)
class CMorphV1x025degDailyRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)
class CMorphV1x8km30minRasterize(product_dir, output_raster_dir, **kwargs)

Bases: warsa.precipitation.satellite.cmorph.rasterize.CMorphRasterize

get_rasters(product_filename)

A product file contains one or more rasters. For instance, a 30-minute product delivered once per hour contains two half-hour rasters per file

This is the default method, which should be overloaded if the product_filename is not a tif file. It creates just a dataset copy of the product_filename.

Parameters:product_filename – full path name of th product file
Returns:list tuples [output_filename, RasterRead] objects output_filename is obtained from the product_filename by substituting product_dir by output_raster_dir output_dataset in in the memory (driver=’MEM’)

warsa.precipitation.satellite.cmorph.time_series_v0x_025deg_3hly module

warsa.precipitation.satellite.cmorph.time_series_v0x_025deg_dly module

warsa.precipitation.satellite.cmorph.time_series_v0x_8km_30min module

warsa.precipitation.satellite.cmorph.time_series_v1_025deg_3hly module

warsa.precipitation.satellite.cmorph.time_series_v1_025deg_dly module

warsa.precipitation.satellite.cmorph.time_series_v1_8km_30min module

Module contents