Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfidan committed Dec 10, 2020
1 parent 58b5e15 commit 7624d1a
Show file tree
Hide file tree
Showing 201 changed files with 38 additions and 18 deletions.
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified .gitmodules
100755 → 100644
Empty file.
Empty file modified config/processing/rad4alp_qvp_PHA_loc.txt
100755 → 100644
Empty file.
Empty file modified config/pyart/mch_config.py
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified doc/20160624_fvj_malsgit-open_source_relations.docx
100755 → 100644
Empty file.
Empty file modified doc/20160829_pyrad_architecture_fvj.pptx
100755 → 100644
Empty file.
Empty file modified doc/git_flow_diagram.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/pyart-mch/library_reference_developers/make.bat
100644 → 100755
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/aux_io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/bridge.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/core.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/correct.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/filters.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/graph.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/map.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/retrieve.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/testing.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_developers/source/util.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/Makefile
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/aux_io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/bridge.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/conf.py
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/core.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/correct.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/filters.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/graph.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/index.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/map.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/retrieve.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/testing.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/library_reference_users/source/util.rst
100755 → 100644
Empty file.
Empty file modified doc/pyart-mch/make_pyart-mch_doc.sh
100755 → 100644
Empty file.
Empty file modified doc/pyrad-framework-cookbook/DataProcessing.tex
100755 → 100644
Empty file.
Empty file modified doc/pyrad-framework-cookbook/figures/main_concept.eps
100755 → 100644
Empty file.
Empty file modified doc/pyrad-framework-cookbook/figures/main_concept.fig
100755 → 100644
Empty file.
Empty file modified doc/pyrad-framework-cookbook/figures/main_concept.pdf
100755 → 100644
Empty file.
Empty file modified doc/pyrad-framework-cookbook/figures/titlebar.pdf
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/make.bat
100644 → 100755
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/flow.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/graph.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/proc.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/prod.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_developers/source/util.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/Makefile
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/conf.py
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/flow.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/graph.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/index.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/io.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/proc.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/prod.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/library_reference_users/source/util.rst
100755 → 100644
Empty file.
Empty file modified doc/pyrad/make_pyrad_doc.sh
100755 → 100644
Empty file.
Empty file modified doc/pyrad_architecture.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/pyrad_monitoring_fvj.docx
100755 → 100644
Empty file.
Empty file modified doc/pyrad_monitoring_fvj.pdf
100755 → 100644
Empty file.
Empty file modified doc/pyrad_user_manual.docx
100755 → 100644
Empty file.
Empty file modified doc/pyrad_user_manual.pdf
100755 → 100644
Empty file.
Empty file modified doc/python-typemaps.txt
100755 → 100644
Empty file.
Empty file modified src/libDX50/README
100755 → 100644
Empty file.
Empty file modified src/libDX50/bin/.gitignore
100755 → 100644
Empty file.
Empty file modified src/libDX50/idl_rainbow.c
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/endianness.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/idl_export.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/qCompress.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/qUncompress.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/rainbow.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/include/vars_def.h
100755 → 100644
Empty file.
Empty file modified src/libDX50/lib/.gitignore
100755 → 100644
Empty file.
Empty file modified src/libDX50/obj/.gitignore
100755 → 100644
Empty file.
Empty file modified src/libDX50/psr_reduce.c
100755 → 100644
Empty file.
Empty file modified src/libDX50/psr_uncompress.c
100755 → 100644
Empty file.
Empty file modified src/libDX50/qCompress.c
100755 → 100644
Empty file.
Empty file modified src/libDX50/qUncompress.c
100755 → 100644
Empty file.
Empty file modified src/libDX50/rainbow_compress_raw.c
100755 → 100644
Empty file.
Empty file modified src/make_all.sh
100755 → 100644
Empty file.
Empty file modified src/make_pyart.sh
100755 → 100644
Empty file.
Empty file modified src/make_pyrad.sh
100755 → 100644
Empty file.
Empty file modified src/make_pyrad_clean.sh
100755 → 100644
Empty file.
Empty file modified src/make_pytda.sh
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/continuous_integration/install.sh
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/flow/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/flow/flow_aux.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/flow/flow_control.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/flow/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/plots.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/plots_aux.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/plots_grid.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/plots_timeseries.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/plots_vol.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/graph/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/config.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/io_aux.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/mxpol_config.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_cosmo.py
100755 → 100644
Empty file.
56 changes: 38 additions & 18 deletions src/pyrad_proc/pyrad/io/read_data_dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def dem2radar_data(radar, dem_data, slice_xy=True, field_name='visibility'):

return field_dict


# @profile
def read_dem(fname, field_name = 'terrain_altitude', fill_value=None,
projparams = None):
Expand All @@ -124,8 +125,10 @@ def read_dem(fname, field_name = 'terrain_altitude', fill_value=None,
The fill value, if not provided will be infered from metadata
if possible
projparams : projection transform as can be used by pyproj, either a
OGC WKT or Proj4 string, see epsg.io for a list, if not provided
will be infered from the file, or for ASCII, LV1903 will be used
EPSG code ("EPSG:21781" for CH1903 for example), or a OGC WKT or
Proj4 string, see epsg.io for a list,
if not provided will be infered from the geotiff file
Returns
-------
Expand All @@ -142,9 +145,8 @@ def read_dem(fname, field_name = 'terrain_altitude', fill_value=None,
elif extension in ['.rst']:
return read_idrisi_data(fname, field_name, fill_value, projparams)
else:
warn('Unable to read file %s, extension must be .tif .tiff .gtif, '+
'.asc .dem .txt .rst',
fname)
warn('Unable to read file {:s}, extension must be '.format(fname) +
'.tif .tiff .gtif .asc .dem .txt .rst')
return None

# @profile
Expand All @@ -165,8 +167,10 @@ def read_geotiff_data(fname, field_name = 'terrain_altitude',
The fill value, if not provided will be infered from metadata
(recommended)
projparams : projection transform as can be used by pyproj, either a
OGC WKT or Proj4 string, see epsg.io for a list, if not provided
will be infered from the geotiff file
EPSG code integer (21781 for CH1903 for example), or a OGC WKT or
Proj4 string, see epsg.io for a list,
if not provided will be infered from the idrisi file
Returns
-------
Expand All @@ -178,6 +182,11 @@ def read_geotiff_data(fname, field_name = 'terrain_altitude',
warn("gdal is required to use read_geotiff_data but is not installed")
return None

if type(projparams) == int: # Retrieve Wkt code from EPSG number
proj = osr.SpatialReference()
proj.ImportFromEPSG(projparams)
projparams = proj.ExportToWkt()

# read the data
try:
raster = gdal.Open(fname)
Expand Down Expand Up @@ -205,13 +214,13 @@ def read_geotiff_data(fname, field_name = 'terrain_altitude',

if not fill_value:
fill_value = metadata['flag value']

raster_array = raster.ReadAsArray()
raster_array = np.ma.masked_equal(raster_array, fill_value)


field_dict = get_metadata(field_name)
field_dict['data'] = np.transpose(raster_array)[:, ::-1]
field_dict['data'] = raster_array[::-1,:]
field_dict['units'] = metadata['value units']

x = get_metadata('x')
Expand Down Expand Up @@ -263,16 +272,21 @@ def read_ascii_data(fname, field_name = 'terrain_altitude', fill_value = None,
The fill value, if not provided will be infered from metadata
(recommended)
projparams : projection transform as can be used by pyproj, either a
OGC WKT or Proj4 string, see epsg.io for a list, if not provided
the Swiss LV1903 coord system will be used
EPSG code integer (21781 for CH1903 for example), or a OGC WKT or
Proj4 string, see epsg.io for a list,
if not provided CH1903 (EPSG:21781 will be used)
Returns
-------
dem_data : dictionary
dictionary with the data and metadata
"""

if type(projparams) == int: # Retrieve Wkt code from EPSG number
proj = osr.SpatialReference()
proj.ImportFromEPSG(projparams)
projparams = proj.ExportToWkt()

# read the data
try:
asciidata = pd.read_csv(fname, header = None)
Expand Down Expand Up @@ -302,7 +316,7 @@ def read_ascii_data(fname, field_name = 'terrain_altitude', fill_value = None,
rasterarray = np.ma.masked_equal(rasterarray, fill_value)

field_dict = get_metadata(field_name)
field_dict['data'] = np.transpose(rasterarray)[:, ::-1]
field_dict['data'] = raster_array[::-1,:]
field_dict['units'] = metadata['value units']

x = get_metadata('x')
Expand Down Expand Up @@ -350,8 +364,9 @@ def read_idrisi_data(fname, field_name = 'terrain_altitude', fill_value = None,
fill_value : float
The fill value
projparams : projection transform as can be used by pyproj, either a
OGC WKT or Proj4 string, see epsg.io for a list, if not provided
will be infered from the idrisi file
EPSG code integer (21781 for CH1903 for example), or a OGC WKT or
Proj4 string, see epsg.io for a list,
if not provided will be infered from the idrisi file
Returns
-------
Expand All @@ -362,7 +377,12 @@ def read_idrisi_data(fname, field_name = 'terrain_altitude', fill_value = None,
if not _GDAL_AVAILABLE:
warn("gdal is required to use read_idrisi_data but is not installed")
return None


if type(projparams) == int: # Retrieve Wkt code from EPSG number
proj = osr.SpatialReference()
proj.ImportFromEPSG(projparams)
projparams = proj.ExportToWkt()

# read the data
try:
if fill_value == None:
Expand All @@ -378,7 +398,7 @@ def read_idrisi_data(fname, field_name = 'terrain_altitude', fill_value = None,
return None

field_dict = get_metadata(field_name)
field_dict['data'] = np.transpose(raster_array)[:, ::-1]
field_dict['data'] = raster_array[::-1,:]
field_dict['units'] = metadata['value units']

x = get_metadata('x')
Expand Down Expand Up @@ -530,5 +550,5 @@ def _prepare_for_interpolation(x_radar, y_radar, dem_coord, slice_xy=True):

def _get_lv1903_wkt():
lv1903 = osr.SpatialReference( )
lv1903.ImportFromEPSG( 21781)
lv1903.ImportFromEPSG(21781)
return lv1903.ExportToWkt()
Empty file modified src/pyrad_proc/pyrad/io/read_data_hzt.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_mxpol.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_other.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_radar.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_sensor.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/read_data_sun.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/timeseries.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/trajectory.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/io/write_data.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_aux.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_calib.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_cosmo.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_echoclass.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_intercomp.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_monitoring.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_phase.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_retrieve.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/process_traj.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/proc/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_grid_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_intercomp_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_monitoring_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_product.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_timeseries_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_traj_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/process_vol_products.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/product_aux.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/prod/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/util/__init__.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/util/radar_utils.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/util/setup.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/pyrad/util/stat_utils.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/common_colocated_gates.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_extract_trt.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_precipitation_comparison.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_process_data.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_process_data_period.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_process_data_rt.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_process_data_trt.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_process_trt_data.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_retrieve_dwh.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/scripts/main_retrieve_dwh2.py
100755 → 100644
Empty file.
Empty file modified src/pyrad_proc/setup.py
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_hzt_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_iso0_cosmo_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_rad4alp_cartesian_data_CSCS_2.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_rad4alp_data_CSCS_2.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_temp_cosmo1_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_temp_cosmo2_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/get_trt_data_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/import_solar_flux.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/rm_hzt_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/rm_rad4alp_cartesian_data_CSCS_2.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/rm_rad4alp_data_CSCS_2.sh
100755 → 100644
Empty file.
Empty file modified tools/copyData/rm_temp_cosmo1_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/processData/get_and_process_rad4alp_data_cscs.sh
100755 → 100644
Empty file.
Empty file modified tools/processData/launch_sbatch.sbatch
100755 → 100644
Empty file.

0 comments on commit 7624d1a

Please sign in to comment.