diff --git a/in/geoprocessing/aspect.tif b/in/aspect.tif similarity index 100% rename from in/geoprocessing/aspect.tif rename to in/aspect.tif diff --git a/in/climadat.csv b/in/climadat.csv deleted file mode 100644 index 25915cc..0000000 --- a/in/climadat.csv +++ /dev/null @@ -1,98 +0,0 @@ -"hours","GlobRad","NetRad","Temp","RelHum","vWind","dirWind" -0,0,NA,4,70,0.916283589706172,181.579372085165 -0.5,0,NA,3.86947380777995,71.3052619222005,1.32741201703963,201.368697573431 -1,0,NA,3.74118095489748,72.5881904510252,1.44106025873182,134.318904489744 -1.5,0,NA,3.61731656763491,73.8268343236509,0.70153372071511,268.040809918195 -2,0,NA,3.5,75,0.628470016352975,70.8379744652193 -2.5,0,NA,3.39123857099128,76.0876142900872,0.793459402494535,156.829408761347 -3,0,NA,3.29289321881345,77.0710678118655,1.46156836086072,320.66215073783 -3.5,0,NA,3.20664665970877,77.9335334029123,1.24518075264069,218.005690771854 -4,0,NA,3.13397459621556,78.6602540378444,0.903423494208269,17.9436634304002 -4.5,0,NA,3.07612046748871,79.2387953251129,1.10725683868756,294.186597853433 -5,0,NA,3.03407417371093,79.6592582628907,0.584642400561724,48.8726789939683 -5.5,0,NA,3.00855513862619,79.9144486137381,0.323522123258802,197.677859177114 -6,0,NA,3,80,0.729698270021788,96.0397949288599 -6.5,0,NA,3.00855513862619,79.9144486137381,0.415168542411771,48.7417488163337 -7,0,NA,3.03407417371093,79.6592582628907,2.14993849858773,16.83567584306 -7.5,0,NA,3.07612046748871,79.2387953251129,0.85075429278774,72.2131153368391 -8,0,NA,3.13397459621556,78.6602540378444,4.57234974064066,47.6654976557475 -8.5,104.420953776041,NA,3.20664665970877,77.9335334029123,1.05867478207603,216.875123208156 -9,207.055236082017,NA,3.29289321881345,77.0710678118655,1.87658700664566,156.944446861744 -9.5,306.146745892072,NA,3.39123857099128,76.0876142900872,2.32962958077372,223.353176662931 -10,400,NA,3.5,75,2.91083943331283,178.146313031437 -10.5,487.009143206977,NA,3.61731656763491,73.8268343236509,0.666957180870869,26.7077123040799 -11,565.685424949238,NA,3.74118095489748,72.5881904510252,0.796808856465437,305.393714242382 -11.5,634.682672232988,NA,3.86947380777995,71.3052619222005,4.09401014872854,333.596436299384 -12,692.820323027551,NA,4,70,0.332592080787182,179.913635259727 -12.5,739.103626009029,NA,4.13052619222005,68.6947380777995,0.397107607087472,216.485034432029 -13,772.740661031255,NA,4.25881904510252,67.4118095489748,0.759452174716584,39.6016248110682 -13.5,793.155889099048,NA,4.38268343236509,66.1731656763491,2.68117053062135,298.060660128016 -14,800,NA,4.5,65,0.167560162969642,188.440894790459 -14.5,793.155889099048,NA,4.60876142900872,63.9123857099128,0.201747036631638,261.2598093946 -15,772.740661031255,NA,4.70710678118655,62.9289321881345,0.706392519527379,50.327268633293 -15.5,739.103626009029,NA,4.79335334029123,62.0664665970877,0.577982970619594,234.754982867278 -16,692.820323027551,NA,4.86602540378444,61.3397459621556,0.736957084746359,166.253979701549 -16.5,634.682672232988,NA,4.92387953251129,60.7612046748871,1.65211994968656,48.5215898675378 -17,565.685424949238,NA,4.96592582628907,60.3407417371093,0.818752970595901,318.358581152977 -17.5,487.009143206977,NA,4.99144486137381,60.0855513862619,0.959463085031581,109.178685133811 -18,400,NA,5,60,0.859049861028373,261.627813944127 -18.5,306.146745892072,NA,4.99144486137381,60.0855513862619,1.29457638992613,278.049503298244 -19,207.055236082017,NA,4.96592582628907,60.3407417371093,0.588174458648817,57.768591034459 -19.5,104.420953776042,NA,4.92387953251129,60.7612046748871,2.28761749081809,168.214689806569 -20,9.79717439317883e-14,NA,4.86602540378444,61.3397459621556,1.38492862052594,252.265659829369 -20.5,0,NA,4.79335334029123,62.0664665970876,0.242561248742984,129.791932761902 -21,0,NA,4.70710678118655,62.9289321881345,3.99115427440399,51.3333105612546 -21.5,0,NA,4.60876142900872,63.9123857099128,2.55073074077858,211.555309114046 -22,0,NA,4.5,65,0.479293091239184,6.45182586018927 -22.5,0,NA,4.38268343236509,66.1731656763491,0.466353192667869,40.4054293404333 -23,0,NA,4.25881904510252,67.4118095489748,2.39464209592506,9.0873445016332 -23.5,0,NA,4.13052619222005,68.6947380777995,1.60056557233224,204.880097459769 -24,0,NA,4,70,2.39771206237851,108.51029426232 -24.5,0,NA,3.86947380777995,71.3052619222005,2.00549439927464,147.514263609657 -25,0,NA,3.74118095489748,72.5881904510252,2.80715172198572,299.927430794341 -25.5,0,NA,3.61731656763491,73.8268343236509,0.0830696690521195,157.133333705133 -26,0,NA,3.5,75,1.88021085853795,32.6096064092126 -26.5,0,NA,3.39123857099128,76.0876142900872,2.09170003717689,231.412642257987 -27,0,NA,3.29289321881345,77.0710678118655,0.919279702645061,148.430244331481 -27.5,0,NA,3.20664665970877,77.9335334029124,3.92114382491634,252.198897942435 -28,0,NA,3.13397459621556,78.6602540378444,1.20597796355354,216.456318141893 -28.5,0,NA,3.07612046748871,79.2387953251129,0.276286769976405,92.4206266847905 -29,0,NA,3.03407417371093,79.6592582628907,0.417449170613516,299.034462691052 -29.5,0,NA,3.00855513862619,79.9144486137381,1.53257629284585,81.2937639986631 -30,0,NA,3,80,1.00303109740295,206.92492361879 -30.5,0,NA,3.00855513862619,79.9144486137381,1.69047364132329,81.6794063232373 -31,0,NA,3.03407417371093,79.6592582628907,5.58568836608039,349.140297100879 -31.5,0,NA,3.07612046748871,79.2387953251129,0.931085853570254,43.6671741285827 -32,0,NA,3.13397459621556,78.6602540378444,2.30703188138788,329.399745832663 -32.5,104.420953776041,NA,3.20664665970876,77.9335334029124,2.86936363659177,316.343044016743 -33,207.055236082017,NA,3.29289321881345,77.0710678118655,2.6287857494126,350.236054438865 -33.5,306.146745892071,NA,3.39123857099128,76.0876142900872,4.05547077609891,238.168368738377 -34,400,NA,3.5,75,1.24857251379574,146.783444377827 -34.5,487.009143206976,NA,3.61731656763491,73.8268343236509,1.17447387383597,308.984988600947 -35,565.685424949238,NA,3.74118095489748,72.5881904510252,0.257457969713987,179.342261220096 -35.5,634.682672232988,NA,3.86947380777995,71.3052619222005,0.867282171267231,130.097195168491 -36,692.820323027551,NA,4,70,1.25678914874406,3.50366323115304 -36.5,739.103626009029,NA,4.13052619222005,68.6947380777995,1.30970422398585,11.3127283898648 -37,772.740661031255,NA,4.25881904510252,67.4118095489748,0.427704800889401,184.996296494501 -37.5,793.155889099048,NA,4.38268343236509,66.1731656763491,2.53052245151433,199.643809468253 -38,800,NA,4.5,65,0.63852630314002,284.49116006121 -38.5,793.155889099048,NA,4.60876142900872,63.9123857099128,0.475152940631632,271.468901109649 -39,772.740661031255,NA,4.70710678118655,62.9289321881345,7.19334073853267,117.682672928786 -39.5,739.103626009029,NA,4.79335334029124,62.0664665970877,1.51199011734254,222.723826147616 -40,692.820323027551,NA,4.86602540378444,61.3397459621556,0.385316615812064,139.187652754597 -40.5,634.682672232988,NA,4.92387953251129,60.7612046748871,2.04722688608494,17.673895569751 -41,565.685424949238,NA,4.96592582628907,60.3407417371093,1.15669796217121,4.14156319387257 -41.5,487.009143206977,NA,4.99144486137381,60.0855513862619,0.749642181250252,299.744173230836 -42,400,NA,5,60,0.602852801623302,126.119207996875 -42.5,306.146745892072,NA,4.99144486137381,60.0855513862619,0.159780840361417,9.10586904268712 -43,207.055236082017,NA,4.96592582628907,60.3407417371093,0.337546685454148,80.4928431096487 -43.5,104.420953776041,NA,4.92387953251129,60.7612046748871,1.99109376847384,169.465421143686 -44,2.93915231795365e-13,NA,4.86602540378444,61.3397459621556,0.498529296993822,49.391514926916 -44.5,0,NA,4.79335334029123,62.0664665970876,0.729576171214729,330.764969703043 -45,0,NA,4.70710678118655,62.9289321881345,1.08146131976121,301.671315869782 -45.5,0,NA,4.60876142900872,63.9123857099128,0.200954846043038,57.0607379472349 -46,0,NA,4.5,65,0.307561396621539,48.1996449090075 -46.5,0,NA,4.38268343236509,66.1731656763491,6.19120610153731,239.771607743343 -47,0,NA,4.25881904510252,67.4118095489748,0.544706048578435,8.90828647604212 -47.5,0,NA,4.13052619222005,68.6947380777995,2.28999490415836,229.552357880864 -48,0,NA,4,70,3.97236387169887,2.77828220115043 diff --git a/in/geoprocessing/dist2riv.tif b/in/distance.tif similarity index 100% rename from in/geoprocessing/dist2riv.tif rename to in/distance.tif diff --git a/in/geoprocessing/elev2riv.tif b/in/elevation.tif similarity index 100% rename from in/geoprocessing/elev2riv.tif rename to in/elevation.tif diff --git a/in/fac.dat b/in/fac.dat deleted file mode 100644 index 0bdd0ff..0000000 --- a/in/fac.dat +++ /dev/null @@ -1,11 +0,0 @@ -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/in/geoprocessing/dem.tif b/in/fill_DEM.tif similarity index 100% rename from in/geoprocessing/dem.tif rename to in/fill_DEM.tif diff --git a/in/geoprocessing/flow_acccumulation.tif b/in/flow_accumulation.tif similarity index 100% rename from in/geoprocessing/flow_acccumulation.tif rename to in/flow_accumulation.tif diff --git a/in/geoprocessing/basin.tif b/in/hillslope.tif similarity index 100% rename from in/geoprocessing/basin.tif rename to in/hillslope.tif diff --git a/in/make_geometry_out/geom.Rds b/in/make_geometry_out/geom.Rds deleted file mode 100644 index ef51c3b..0000000 Binary files a/in/make_geometry_out/geom.Rds and /dev/null differ diff --git a/in/raindat.csv b/in/raindat.csv deleted file mode 100644 index 9831b50..0000000 --- a/in/raindat.csv +++ /dev/null @@ -1,98 +0,0 @@ -"hours","precip" -0,0 -0.5,0 -1,0 -1.5,0 -2,0 -2.5,0 -3,0 -3.5,0 -4,0 -4.5,0 -5,0 -5.5,0 -6,0 -6.5,0 -7,0 -7.5,0 -8,0 -8.5,0 -9,0 -9.5,0 -10,0 -10.5,0 -11,0 -11.5,0 -12,0 -12.5,0 -13,0 -13.5,0 -14,0 -14.5,0 -15,1 -15.5,3 -16,3 -16.5,3 -17,3 -17.5,2 -18,2 -18.5,2 -19,0 -19.5,0 -20,0 -20.5,0 -21,0 -21.5,0 -22,0 -22.5,0 -23,0 -23.5,0 -24,0 -24.5,0 -25,0 -25.5,0 -26,0 -26.5,0 -27,0 -27.5,0 -28,0 -28.5,0 -29,0 -29.5,0 -30,0 -30.5,0 -31,0 -31.5,1 -32,1 -32.5,1 -33,1 -33.5,0 -34,0 -34.5,0 -35,0 -35.5,0 -36,0 -36.5,0 -37,0 -37.5,0 -38,0 -38.5,0 -39,0 -39.5,0 -40,0 -40.5,0 -41,0 -41.5,0 -42,0 -42.5,0 -43,0 -43.5,0 -44,0 -44.5,0 -45,0 -45.5,0 -46,0 -46.5,0 -47,0 -47.5,0 -48,0 diff --git a/in/geoprocessing/river_id.tif b/in/streams.tif similarity index 100% rename from in/geoprocessing/river_id.tif rename to in/streams.tif diff --git a/src/hillslope_method.R b/src/hillslope_method.R index da2bf53..75e07a1 100644 --- a/src/hillslope_method.R +++ b/src/hillslope_method.R @@ -35,7 +35,8 @@ hillslope_tool <- function(hillslope_nr, li_spatial, plot_2d_catena=FALSE, plot_ # safty check if hillslope_nr is set to zero if(hillslope_nr == 0) stop("---Do not use hillslope_nr = 0---") - hill <- hillslope_as_pts[hillslope_as_pts[,3]==hillslope_nr,] + if(hillslope_nr == -1) hill <- hillslope_as_pts # Untested - Ashish 06.08.2024 + else hill <- hillslope_as_pts[hillslope_as_pts[,3]==hillslope_nr,] #extract number of cells and area of hillslope number_of_cells <- length(hill[,1]) diff --git a/src/run.R b/src/run.R index 9f16d7f..225b4a7 100644 --- a/src/run.R +++ b/src/run.R @@ -16,11 +16,10 @@ toolname <- tolower(Sys.getenv("TOOL_RUN")) # make functions from Catflow-R-Package available source("catlib.R") - # Switch for the different tools available in this package if (toolname == "make_representative_hillslope") { make_geometry_representative_hillslope(params,data_paths) } else { # in any other case, the tool was invalid or not configured - print(paste("[", Sys.time(), "] Either no TOOL_RUN environment variable available, or '", toolname, "' is not valid.\n", sep = "")) + print(paste("[", Sys.time(), "] Either no TOOL_RUN environment variable available, or '", toolname, "' is not valid.\n", sep = "")) # nolint: line_length_linter. } \ No newline at end of file