diff --git a/RAPIDpy/gis/weight.py b/RAPIDpy/gis/weight.py index f17c020..82ae6cf 100644 --- a/RAPIDpy/gis/weight.py +++ b/RAPIDpy/gis/weight.py @@ -104,6 +104,12 @@ def rtree_create_weight_table(lsm_grid_lat, lsm_grid_lon, ogr_catchment_shapefile = ogr.Open(in_catchment_shapefile) ogr_catchment_shapefile_lyr = ogr_catchment_shapefile.GetLayer() + # MPG DEBUG: + # ldefn = ogr_catchment_shapefile_lyr.GetLayerDefn() + # for n in range(ldefn.GetFieldCount()): + # fdefn = ldefn.GetFieldDefn(n) + # print(fdefn.name) + ogr_catchment_shapefile_lyr_proj = \ ogr_catchment_shapefile_lyr.GetSpatialRef() original_catchment_proj = \ diff --git a/RAPIDpy/inflow/CreateInflowFileFromGALWEMRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromGALWEMRunoff.py new file mode 100644 index 0000000..50dbaa5 --- /dev/null +++ b/RAPIDpy/inflow/CreateInflowFileFromGALWEMRunoff.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +""" + CreateInflowFileFromGALWEMRunoff.py + RAPIDpy + + Created by Matthew P. Geheran, 2018 + Adapted from CreateInflowFileFromECMWFRunoff.py. +""" +from netCDF4 import Dataset + +from .CreateInflowFileFromGriddedRunoff import \ + CreateInflowFileFromGriddedRunoff + + +class CreateInflowFileFromGALWEMRunoff(CreateInflowFileFromGriddedRunoff): + """Create Inflow File From LDAS Runoff + + Base class for creating RAPID NetCDF input + of water inflow based on LDAS land surface model + runoff and previously created weight table. + """ + land_surface_model_name = "LDAS" + + def __init__(self, + lat_dim, # "lat", + lon_dim, # "lon", + lat_var, # "lat", + lon_var, # "lon", + runoff_vars): # ["ssrun", "bgrun"], + """Define the attributes to look for""" + self.dims_oi = [lon_dim, lat_dim] + self.vars_oi = [lon_var, lat_var] + runoff_vars + self.runoff_vars = runoff_vars + self.length_time = {"3-Hourly": 1} + + super(CreateInflowFileFromGALWEMRunoff, self).__init__() + + def data_validation(self, in_nc): + """Check the necessary dimensions and variables in the + input netcdf data""" + data_nc = Dataset(in_nc) + for dim in self.dims_oi: + if dim not in data_nc.dimensions.keys(): + data_nc.close() + raise Exception(self.error_messages[1]) + + for var in self.vars_oi: + if var not in data_nc.variables.keys(): + data_nc.close() + raise Exception(self.error_messages[2]) + + data_nc.close() + return diff --git a/RAPIDpy/inflow/CreateInflowFileFromGriddedRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromGriddedRunoff.py index b299ab7..1e96db1 100644 --- a/RAPIDpy/inflow/CreateInflowFileFromGriddedRunoff.py +++ b/RAPIDpy/inflow/CreateInflowFileFromGriddedRunoff.py @@ -11,7 +11,7 @@ from datetime import datetime import os -from netCDF4 import Dataset +from netCDF4 import Dataset, num2date, date2num import numpy as np from pytz import utc from past.builtins import xrange # pylint: disable=redefined-builtin @@ -309,7 +309,7 @@ def data_validation(self, in_nc): pass def execute(self, nc_file_list, index_list, in_weight_table, - out_nc, grid_type, mp_lock): + out_nc, grid_type, mp_lock): #, all_simulation_time): """The source code of the tool.""" if not os.path.exists(out_nc): @@ -403,6 +403,26 @@ def execute(self, nc_file_list, index_list, in_weight_table, len_time_subset, (len_lat_subset * len_lon_subset)) + # MPG ADDED: + all_simulation_time_units = ( + 'seconds since 1970-01-01 00:00:00+00:00') + # data_in_nc_start_time = num2date(data_in_nc['time'][0], + # data_in_nc['time'].units) + + # MPG FIX FOR TIME OFFSET BETWEEN LSM NC AND M3 NC: + # data_in_nc_start_time = datetime.strptime( + # file_re_match.search(nc_file).group(0), + # file_datetime_pattern) + + # DEBUG + # print 'DATA_IN_START_TIME', data_in_nc_start_time + # data_in_nc_start_time = date2num(data_in_nc_start_time, + # all_simulation_time_units) + # data_out_nc_start_idx = np.abs(data_in_nc_start_time - + # all_simulation_time).argmin() + # DEBUG + # print 'ALL_SIMULATION_TIME', num2date(all_simulation_time[data_out_nc_start_idx], all_simulation_time_units) + data_in_nc.close() if not index_new: @@ -500,10 +520,32 @@ def execute(self, nc_file_list, index_list, in_weight_table, mp_lock.acquire() data_out_nc = Dataset(out_nc, "a", format="NETCDF3_CLASSIC") if runoff_dimension_size == 3 and len_time_subset > 1: + # MPG ADDED: + # data_out_nc_end_idx = data_out_nc_start_idx + len_time_subset + # data_out_nc_end_idx = data_out_nc_start_idx + len_time_subset + # try: + # data_out_nc.variables['m3_riv'][ + # data_out_nc_start_idx:data_out_nc_end_idx, :] = \ + # inflow_data + # except IndexError: + # print ("WARNING: Inflow data dimensions inconsistent" + + # " with 'm3_riv' variable slice") + # print "NC_FILE", nc_file + # print "INFLOW_DATA.SHAPE", inflow_data.shape + # print "DATA_OUT_NC_START_IDX", data_out_nc_start_idx + # print "DATA_OUT_NC_END_IDX", data_out_nc_end_idx + + # MPG DEBUG + # import pdb + # pdb.set_trace() + data_out_nc.variables['m3_riv'][ index*len_time_subset:(index+1)*len_time_subset, :] = \ inflow_data else: + # MPG DEBUG: + # print "INDEX", index + # print "M3_RIV DIMENSIONS", data_out_nc.variables['m3_riv'].shape data_out_nc.variables['m3_riv'][index] = inflow_data data_out_nc.close() mp_lock.release() diff --git a/RAPIDpy/inflow/CreateInflowFileFromJULESRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromJULESRunoff.py new file mode 100644 index 0000000..e79f3d1 --- /dev/null +++ b/RAPIDpy/inflow/CreateInflowFileFromJULESRunoff.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +""" + CreateInflowFileFromLDASRunoff.py + RAPIDpy + Created by Matthew P. Geheran, 2018. + Adapted from CreateInflowFileFromLDASRunoff.py. +""" +from netCDF4 import Dataset + +from .CreateInflowFileFromGriddedRunoff import \ + CreateInflowFileFromGriddedRunoff + + +class CreateInflowFileFromJULESRunoff(CreateInflowFileFromGriddedRunoff): + """Create Inflow File From JULES Runoff + + Base class for creating RAPID NetCDF input + of water inflow based on JULES land surface model + runoff and previously created weight table. + """ + land_surface_model_name = "JULES" + + def __init__(self, + lat_dim, # "lat", + lon_dim, # "lon", + lat_var, # "latitude", + lon_var, # "longitude", + runoff_vars): # ["surface_runoff", "sub_surface_runoff"], + """Define the attributes to look for""" + self.dims_oi = [lon_dim, lat_dim] + self.vars_oi = [lon_var, lat_var] + runoff_vars + self.runoff_vars = runoff_vars + self.length_time = {"Hourly": 3} + + super(CreateInflowFileFromJULESRunoff, self).__init__() + + def data_validation(self, in_nc): + """Check the necessary dimensions and variables in the + input netcdf data""" + data_nc = Dataset(in_nc) + for dim in self.dims_oi: + # MPG DEBUG: + print dim + print data_nc.dimensions.keys() + if dim not in data_nc.dimensions.keys(): + data_nc.close() + raise Exception(self.error_messages[1]) + + for var in self.vars_oi: + # MPG DEBUG: + print var + print data_nc.dimensions.keys() + if var not in data_nc.variables.keys(): + data_nc.close() + raise Exception(self.error_messages[2]) + + data_nc.close() + return diff --git a/RAPIDpy/inflow/CreateInflowFileFromLDASRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromLDASRunoff.py index 014bd16..54510e2 100644 --- a/RAPIDpy/inflow/CreateInflowFileFromLDASRunoff.py +++ b/RAPIDpy/inflow/CreateInflowFileFromLDASRunoff.py @@ -40,6 +40,8 @@ def data_validation(self, in_nc): """Check the necessary dimensions and variables in the input netcdf data""" data_nc = Dataset(in_nc) + print "dims", self.dims_oi + print "vars", self.vars_oi for dim in self.dims_oi: if dim not in data_nc.dimensions.keys(): data_nc.close() diff --git a/RAPIDpy/inflow/CreateInflowFileFromNewERAInterimRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromNewERAInterimRunoff.py new file mode 100644 index 0000000..4d54921 --- /dev/null +++ b/RAPIDpy/inflow/CreateInflowFileFromNewERAInterimRunoff.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +""" + CreateInflowFileFromERAInterimRunoff.py + RAPIDpy + + Created by Alan D. Snow, 2015 + Adapted from CreateInflowFileFromECMWFRunoff.py. + License: BSD-3-Clause +""" +from netCDF4 import Dataset + +from .CreateInflowFileFromGriddedRunoff import \ + CreateInflowFileFromGriddedRunoff + + +class CreateInflowFileFromNewERAInterimRunoff(CreateInflowFileFromGriddedRunoff): + """Create Inflow File From ERA Interim Runoff + + Creates RAPID NetCDF input of water inflow based on + ERA Interim runoff and previously created weight table. + """ + land_surface_model_name = "ERA Interim" + header_wt = ['rivid', 'area_sqm', 'lon_index', 'lat_index', 'npoints'] + dims_oi = [['time', 'lon', 'lat'], ['time', 'longitude', 'latitude']] + vars_oi = [['time', 'lon', 'lat', 'RO'], + ['time', 'longitude', 'latitude', 'ro']] + length_time = {"Daily": 1, "6-Hourly": 4} + + def __init__(self): + """Define the attributes to look for""" + self.runoff_vars = ['ro'] + super(CreateInflowFileFromNewERAInterimRunoff, self).__init__() + + def data_validation(self, in_nc): + """Check the necessary dimensions and variables in the input + netcdf data""" + data_nc = Dataset(in_nc) + + dims = list(data_nc.dimensions) + + if dims not in self.dims_oi: + data_nc.close() + raise Exception("{0} {1}".format(self.error_messages[1], dims)) + + nc_vars = list(data_nc.variables) + + if nc_vars == self.vars_oi[0]: + self.runoff_vars = [self.vars_oi[0][-1]] + elif nc_vars == self.vars_oi[1]: + self.runoff_vars = [self.vars_oi[1][-1]] + else: + data_nc.close() + raise Exception("{0} {1}".format(self.error_messages[2], nc_vars)) + data_nc.close() diff --git a/RAPIDpy/inflow/CreateInflowFileFromWSIMRunoff.py b/RAPIDpy/inflow/CreateInflowFileFromWSIMRunoff.py new file mode 100644 index 0000000..d40c86a --- /dev/null +++ b/RAPIDpy/inflow/CreateInflowFileFromWSIMRunoff.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +""" + CreateInflowFileFromLDASRunoff.py + RAPIDpy + Created by Matthew P. Geheran, 2018. + Adapted from CreateInflowFileFromLDASRunoff.py. +""" +from netCDF4 import Dataset + +from .CreateInflowFileFromGriddedRunoff import \ + CreateInflowFileFromGriddedRunoff + + +class CreateInflowFileFromWSIMRunoff(CreateInflowFileFromGriddedRunoff): + """Create Inflow File From WSIM Runoff + + Base class for creating RAPID NetCDF input + of water inflow based on the WSIM land surface model + runoff and previously created weight table. + """ + land_surface_model_name = "WSIM" + + def __init__(self, + lat_dim, # "lat", + lon_dim, # "lon", + lat_var, # "latitude", + lon_var, # "longitude", + runoff_vars): # ["surface_runoff", "sub_surface_runoff"], + """Define the attributes to look for""" + self.dims_oi = [lon_dim, lat_dim] + self.vars_oi = [lon_var, lat_var] + runoff_vars + self.runoff_vars = runoff_vars + self.length_time = {"Hourly": 6} + + super(CreateInflowFileFromWSIMRunoff, self).__init__() + + def data_validation(self, in_nc): + """Check the necessary dimensions and variables in the + input netcdf data""" + data_nc = Dataset(in_nc) + for dim in self.dims_oi: + # MPG DEBUG: + print dim + print data_nc.dimensions.keys() + if dim not in data_nc.dimensions.keys(): + data_nc.close() + raise Exception(self.error_messages[1]) + + for var in self.vars_oi: + # MPG DEBUG: + print var + print data_nc.variables.keys() + if var not in data_nc.variables.keys(): + data_nc.close() + raise Exception(self.error_messages[2]) + + data_nc.close() + return diff --git a/RAPIDpy/inflow/lsm_rapid_process.py b/RAPIDpy/inflow/lsm_rapid_process.py index 7208bbb..48afa9f 100644 --- a/RAPIDpy/inflow/lsm_rapid_process.py +++ b/RAPIDpy/inflow/lsm_rapid_process.py @@ -15,7 +15,7 @@ # external packages import pandas as pd import pangaea -from netCDF4 import Dataset +from netCDF4 import Dataset, num2date, date2num import numpy as np # local imports @@ -25,6 +25,14 @@ from .CreateInflowFileFromLDASRunoff import CreateInflowFileFromLDASRunoff from .CreateInflowFileFromWRFHydroRunoff import \ CreateInflowFileFromWRFHydroRunoff +from .CreateInflowFileFromGALWEMRunoff import \ + CreateInflowFileFromGALWEMRunoff +from .CreateInflowFileFromNewERAInterimRunoff import \ + CreateInflowFileFromNewERAInterimRunoff +from .CreateInflowFileFromJULESRunoff import \ + CreateInflowFileFromJULESRunoff +from .CreateInflowFileFromWSIMRunoff import \ + CreateInflowFileFromWSIMRunoff from ..postprocess.generate_return_periods import generate_return_periods from ..postprocess.generate_seasonal_averages import generate_seasonal_averages from ..utilities import (case_insensitive_file_search, @@ -46,6 +54,8 @@ def generate_inflows_from_runoff(args): rapid_inflow_file = args[4] rapid_inflow_tool = args[5] mp_lock = args[6] + # MPG ADDED all_simulation_time / Commented out for debugging + # all_simulation_time = args[7] time_start_all = datetime.utcnow() @@ -75,7 +85,9 @@ def generate_inflows_from_runoff(args): in_weight_table=weight_table_file, out_nc=rapid_inflow_file, grid_type=grid_type, - mp_lock=mp_lock) + mp_lock=mp_lock) #, + #all_simulation_time=all_simulation_time) + except Exception: # This prints the type, value, and stack trace of the # current exception being handled. @@ -244,6 +256,9 @@ def identify_lsm_grid(lsm_grid_path): subsurface_runoff_var = "" total_runoff_var = "" for var in var_list: + if var == "Runoff_mm": + # WSIM + total_runoff_var = var if var.startswith("SSRUN"): # NLDAS/GLDAS surface_runoff_var = var @@ -274,12 +289,24 @@ def identify_lsm_grid(lsm_grid_path): elif var == "UDROFF": # WRF Hydro subsurface_runoff_var = var + elif var == "ssrun": + # GALWEM + surface_runoff_var = var + elif var == "bgrun": + # GALWEM + subsurface_runoff_var = var elif var.lower() == "ro": # ERA Interim total_runoff_var = var elif var == "total runoff": # CMIP5 data total_runoff_var = var + elif var == "surface_runoff": + # JULES data + surface_runoff_var = var + elif var == "subsurface_runoff": + # JULES data + subsurface_runoff_var = var # IDENTIFY GRID TYPE lsm_file_data = { @@ -345,12 +372,27 @@ def identify_lsm_grid(lsm_grid_path): lsm_file_data["weight_file_name"] = r'weight_era_t159\.csv' lsm_file_data["model_name"] = "era_20cm" lsm_file_data["grid_type"] = 't159' + elif lat_dim_size == 1280 and lon_dim_size == 2576: + print("Runoff file identified as ERA Interim new") + # MPG: unknown grid type + # dimensions: + # longitude = 2576 ; + # latitude = 1280 ; + lsm_file_data["description"] = "ERA interim new" + lsm_file_data["weight_file_name"] = r'weight_erai\.csv' + lsm_file_data["model_name"] = "era_unknown" + lsm_file_data["grid_type"] = 'new_era_interim' else: lsm_example_file.close() raise Exception("Unsupported ECMWF grid.") - lsm_file_data["rapid_inflow_tool"] = \ - CreateInflowFileFromERAInterimRunoff() + # MPG: Adding ability to read in new ERA Interim data. + if lsm_file_data["description"] == "ERA interim new": + lsm_file_data["rapid_inflow_tool"] = \ + CreateInflowFileFromNewERAInterimRunoff() + else: + lsm_file_data["rapid_inflow_tool"] = \ + CreateInflowFileFromERAInterimRunoff() elif institution == "NASA GSFC": if title == "GLDAS2.0 LIS land surface model output": @@ -379,6 +421,24 @@ def identify_lsm_grid(lsm_grid_path): lsm_file_data["description"] = "Met Office Joules" lsm_file_data["model_name"] = "met_office" + elif institution == "ERDC-CHL": + print("Runoff file identified as WSIM GRID") + lsm_file_data["weight_file_name"] = r'weight_wsim\.csv' + lsm_file_data["grid_type"] = 'WSIM' + lsm_file_data["description"] = "Water Security Indicator Model" + lsm_file_data["model_name"] = "WSIM" + + runoff_vars = [total_runoff_var] + + elif institution == 'Joint UK Land Environment Simulator': + print("Runoff file identified as Jules GRID") + lsm_file_data["weight_file_name"] = r'weight_joules\.csv' + lsm_file_data["grid_type"] = 'joules' + lsm_file_data["description"] = "Met Office Joules" + lsm_file_data["model_name"] = "met_office" + + runoff_vars = [total_runoff_var] + elif institution == "NCAR, USACE, USBR": print("Runoff file identified as CMIP5") lsm_file_data["weight_file_name"] = r'weight_cmip5\.csv' @@ -426,6 +486,77 @@ def identify_lsm_grid(lsm_grid_path): lsm_example_file.close() raise Exception("Unsupported runoff grid.") + elif surface_runoff_var.startswith("ssrun") \ + and subsurface_runoff_var.startswith("bgrun"): + + lsm_file_data["model_name"] = "GALWEM" + print("Runoff file identified as GALWEM GRID") + # GALWEM NC FILE + # dimensions: + # lat = 1920 ; + # lon = 2560 ; + # variables + # ssrum (surface) + # bgrun (subsurface) + lsm_file_data["description"] = "GALWEM" + lsm_file_data["weight_file_name"] = r'weight_galwem\.csv' + lsm_file_data["grid_type"] = 'GALWEM' + + lsm_file_data["rapid_inflow_tool"] = \ + CreateInflowFileFromGALWEMRunoff( + latitude_dim, + longitude_dim, + latitude_var, + longitude_var, + runoff_vars) + + elif total_runoff_var.startswith("Runoff_mm"): + lsm_file_data["model_name"] = "WSIM" + print("Runoff file identified as WSIM GRID") + # WSIM NC FILE + # dimensions: + # time (unlimited); + # lat = 360 ; + # lon = 720 ; + # variables: + # Runoff_mm + lsm_file_data["description"] = "WSIM" + lsm_file_data["weight_file_name"] = r'weight_wsim\.csv' + lsm_file_data["grid_type"] = 'WSIM' + + lsm_file_data["rapid_inflow_tool"] = \ + CreateInflowFileFromWSIMRunoff( + latitude_dim, + longitude_dim, + latitude_var, + longitude_var, + runoff_vars) + + # elif surface_runoff_var.startswith("surface_runoff") \ + # and subsurface_runoff_var.startswith("sub_surface_runoff"): + + # lsm_file_data["model_name"] = "JULES" + # print("Runoff file identified as JULES GRID") + # # JULES NC FILE + # # MPG: corrected files to follow standard conventions. + # # dimensions: + # # lat = 280 ; + # # lon = 720 ; + # # variables + # # surface_runoff (surface) + # # sub_surface_runoff (subsurface) + # lsm_file_data["description"] = "JULES" + # lsm_file_data["weight_file_name"] = r'weight_jules\.csv' + # lsm_file_data["grid_type"] = 'JULES' + + # lsm_file_data["rapid_inflow_tool"] = \ + # CreateInflowFileFromJULESRunoff( + # latitude_dim, + # longitude_dim, + # latitude_var, + # longitude_var, + # runoff_vars) + else: title = "" try: @@ -497,7 +628,7 @@ def determine_start_end_timestep(lsm_file_list, file_size_time = \ len(lsm_example_file.dimensions[lsm_grid_info['time_dim']]) lsm_example_file.close() - + total_num_time_steps = int(file_size_time * len(lsm_file_list)) # determine the start time from the existing files @@ -525,7 +656,7 @@ def determine_start_end_timestep(lsm_file_list, actual_simulation_end_datetime = \ datetime.strptime(file_re_match.search(lsm_file_list[-1]).group(0), file_datetime_pattern) \ - + timedelta(seconds=(file_size_time-1) * time_step) + # + timedelta(seconds=(file_size_time-1) * time_step) else: with pangaea.open_mfdataset(lsm_file_list, lat_var=lsm_grid_info['latitude_var'], @@ -841,6 +972,20 @@ def run_lsm_rapid_process(rapid_executable_location, expected_time_step=expected_time_step, lsm_grid_info=lsm_file_data) + # MPG ADDED: + units = 'seconds since 1970-01-01 00:00:00+00:00' + start_seconds = date2num(actual_simulation_start_datetime, units) + end_seconds = date2num(actual_simulation_end_datetime, units) + # MPG DEBUG: + print 'ACTUAL_SIMULATION_START_DATETIME', actual_simulation_start_datetime + print 'ACTUAL_SIMULATION_END_DATETIME', actual_simulation_end_datetime + + all_simulation_time = np.arange(start_seconds, + end_seconds + time_step, + time_step) + # MPG ADDED: + # total_num_time_steps = len(all_simulation_time) + # VALIDATING INPUT IF DIVIDING BY 3 if (lsm_file_data['grid_type'] in ('nldas', 'lis', 'joules')) \ and convert_one_hour_to_three: @@ -931,7 +1076,7 @@ def run_lsm_rapid_process(rapid_executable_location, lsm_file_data['grid_type'], master_rapid_runoff_file, lsm_file_data['rapid_inflow_tool'], - mp_lock)) + mp_lock)) #, all_simulation_time)) # # COMMENTED CODE IS FOR DEBUGGING # generate_inflows_from_runoff(( # cpu_grouped_file_list, @@ -942,8 +1087,7 @@ def run_lsm_rapid_process(rapid_executable_location, # lsm_file_data['rapid_inflow_tool'], # mp_lock)) pool = multiprocessing.Pool(num_cpus) - pool.map(generate_inflows_from_runoff, - job_combinations) + pool.map(generate_inflows_from_runoff, job_combinations) pool.close() pool.join() diff --git a/README.md b/README.md index effd289..30f2eff 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ More information about installation and the input parameters for RAPID can be fo The source code for RAPID is located at https://github.com/c-h-david/rapid/. -[![DOI](https://zenodo.org/badge/19918/erdc-cm/RAPIDpy.svg)](https://zenodo.org/badge/latestdoi/19918/erdc-cm/RAPIDpy) +[![DOI](https://zenodo.org/badge/19918/erdc/RAPIDpy.svg)](https://zenodo.org/badge/latestdoi/19918/erdc/RAPIDpy) -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg)](https://github.com/erdc-cm/RAPIDpy/blob/master/LICENSE) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg)](https://github.com/erdc/RAPIDpy/blob/master/LICENSE) [![PyPI version](https://badge.fury.io/py/RAPIDpy.svg)](https://badge.fury.io/py/RAPIDpy) @@ -60,5 +60,5 @@ Ahmad A Tavakoly. (2017). RAPID input files corresponding to the Mississippi Riv ## Other tools to prepare input for RAPID - For ESRI users: https://github.com/Esri/python-toolbox-for-rapid -- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc-cm/python-toolbox-for-rapid +- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc/python-toolbox-for-rapid - For the NHDPlus dataset: https://github.com/c-h-david/RRR diff --git a/docs/gis_stream_network.rst b/docs/gis_stream_network.rst index 45857ef..0d5b9b4 100644 --- a/docs/gis_stream_network.rst +++ b/docs/gis_stream_network.rst @@ -7,7 +7,7 @@ Using ArcHydro to Generate Stream Network See: - https://github.com/Esri/python-toolbox-for-rapid -- https://github.com/erdc-cm/python-toolbox-for-rapid +- https://github.com/erdc/python-toolbox-for-rapid Using TauDEM to Generate Stream Network --------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 782a2e3..5aa9c4d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -26,7 +26,7 @@ https://github.com/c-h-david/rapid. .. |Coverage Status| image:: https://coveralls.io/repos/github/erdc/RAPIDpy/badge.svg?branch=master :target: https://coveralls.io/github/erdc/RAPIDpy .. |License (3-Clause BSD)| image:: https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg - :target: https://github.com/erdc-cm/RAPIDpy/blob/master/LICENSE + :target: https://github.com/erdc/RAPIDpy/blob/master/LICENSE Contents: @@ -90,7 +90,7 @@ Other tools to prepare input for RAPID --------------------------------------- - For ESRI users: https://github.com/Esri/python-toolbox-for-rapid -- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc-cm/python-toolbox-for-rapid +- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc/python-toolbox-for-rapid - For the NHDPlus dataset: https://github.com/c-h-david/RRR diff --git a/docs/installation.rst b/docs/installation.rst index 7b8c6af..a514b39 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -88,14 +88,14 @@ Developer Installation This is how you get the most up-to-date version of the code. -See: https://github.com/erdc-cm/RAPIDpy/blob/master/.travis.yml for a more detailed +See: https://github.com/erdc/RAPIDpy/blob/master/.travis.yml for a more detailed list of installation steps. -.. note:: If you don't have git, you can download the code from https://github.com/erdc-cm/RAPIDpy +.. note:: If you don't have git, you can download the code from https://github.com/erdc/RAPIDpy :: - $ git clone https://github.com/erdc-cm/RAPIDpy.git + $ git clone https://github.com/erdc/RAPIDpy.git $ cd RAPIDpy $ python setup.py install @@ -103,6 +103,6 @@ To develop on the latest version: :: - $ git clone https://github.com/erdc-cm/RAPIDpy.git + $ git clone https://github.com/erdc/RAPIDpy.git $ cd RAPIDpy $ python setup.py develop diff --git a/setup.py b/setup.py index 8c77289..c0addc1 100644 --- a/setup.py +++ b/setup.py @@ -11,12 +11,12 @@ 'parameters for RAPID can be found at http://rapid-hub.org.' ' The source code for RAPID is located at ' 'https://github.com/c-h-david/rapid/. \n\n' - '.. image:: https://zenodo.org/badge/19918/erdc-cm/RAPIDpy.svg \n' - ' :target: https://zenodo.org/badge/latestdoi/19918/erdc-cm/RAPIDpy', + '.. image:: https://zenodo.org/badge/19918/erdc/RAPIDpy.svg \n' + ' :target: https://zenodo.org/badge/latestdoi/19918/erdc/RAPIDpy', keywords='RAPID', author='Alan Dee Snow', author_email='alan.d.snow@usace.army.mil', - url='https://github.com/erdc-cm/RAPIDpy', + url='https://github.com/erdc/RAPIDpy', license='BSD 3-Clause', packages=find_packages(), package_data={'': ['gis/lsm_grids/*.nc']},