data-raw/spreadsheettemplate_BHIMA.R

pathRoot <- "pathRootHere"
settings <- list(
  # CROP SETTINGS ####
  "Crops" = data.frame("Crop" = c("Wheat"),
                       "Planting Month" = c(11),
                       "EM1" = c(1),
                       "EM2" = c(2),
                       "EM3" = c(4),
                       "EM4" = c(5),
                       "KC1" = c(0.4),
                       "KC2" = c(0.75),
                       "KC3" = c(1.15),
                       "KC4" = c(0.4),
                       "KY1" = c(0.2),
                       "KY2" = c(0.65),
                       "KY3" = c(0.55),
                       "KY4" = c(0.55),
                       "NOTES" = c("From BHIMA basin"),
                       stringsAsFactors = FALSE),
  # OPTIONS #####
  "OPTIONS" = data.frame("variable" = c("TemperatureInKelvin", "gridSizeUserDefined",
                                        "calc_evaporation", "PET_modus",
                                        "includeIrrigation", "includeWaterDemand",
                                        "limitAbstraction", "calc_environflow",
                                        "preferentialFlow", "CapillarRise",
                                        "modflow_coupling", "includeRunoffConcentration",
                                        "includeRouting", "includeWaterBodies",
                                        "onlyReservoirs", "inflow",
                                        "waterquality", "writeNetcdfStack",
                                        "reportMap", "reportTss",
                                        "calcWaterBalance", "sumWaterBalance",
                                        "demand2pumping", "canal_leakage",
                                        "rootFrac", "using_reservoir_command_areas",
                                        "using_lift_areas", "usingAdminSegments",
                                        "use_GeneralCropnonIrr", "use_GeneralCropIrr",
                                        "activate_fallow", "leftoverIrrigatedCropIsRainfed"),
                         "value" = c(rep("True", 7), "False",
                                     rep("True", 3), "False",
                                     rep("True", 3), rep("False", 2),
                                     rep("True", 3), rep("False", 2),
                                     rep("True", 5), "False",
                                     rep(1, 3), 0),
                         "comment" = c(rep("Temperature and Grid", 2),
                                       rep("Evaporation", 2),
                                       rep("Irrigation and Water Demand", 2),
                                       "Water Allocation",
                                       "Environmental Flow",
                                       rep("Soil", 2),
                                       "Groundwater MODFLOW",
                                       rep("Routing", 2),
                                       rep("Water Bodies", 2),
                                       rep("Inflow outside modelled area", 2),
                                       rep("Reporting & Debugging", 3),
                                       rep("Checking water balance (for debugging)", 2),
                                       rep("FUSE developments", 10)),
                         stringsAsFactors = FALSE),
  # FILE_PATHS #####
  "FILE_PATHS" = data.frame("variable" = c("PathRoot", "PathOut",
                                           "PathMaps", "PathMeteo",
                                           "Excel_settings_file"),
                            "value" = c(pathRoot,
                                        "C:/CWatM_output",
                                        "$(FILE_PATHS:PathRoot)/Input",
                                        "$(FILE_PATHS:PathMaps)/meteo",
                                        "$(FILE_PATHS:PathRoot)/CWatM_settings/cwatm_settings.xlsx"),
                            "comment" = c(rep("", 5)),
                            stringsAsFactors = FALSE),
  # NETCDF_ATTRIBUTES #####
  "NETCDF_ATTRIBUTES" = data.frame("variable" = c("institution", "title", "metaNetcdfFile"),
                                   "value" = c("IIASA", "CWatM Settings File - cwatm4r",
                                               "$(FILE_PATHS:PathMaps)/metaNetcdf.xml"),
                                   "comment" = c(rep("", 3)),
                                   stringsAsFactors = FALSE),
  # MASK_OUTLET ####
  "MASK_OUTLET" = data.frame("variable" = c("MaskMap", "Gauges", "GaugesLocal"),
                             "value" = c("$(FILE_PATHS:PathMaps)/areamaps/UB_mask.map", "75.12 17.97", "True"),
                             "comment" = c(rep("Soil Station coordinates or map file", 3)),
                             stringsAsFactors = FALSE),
  # TIME-RELATED_CONSTANTS #####
  "TIME-RELATED_CONSTANTS" = data.frame("variable" = c("StepStart" ,"SpinUp", "StepEnd"),
                                        "value" = c("01/05/1996", "None", "08/05/1996"),
                                        "comment" = c("start date (mm/dd/yyyy)", "end of warm-up period (mm/dd/yyyy)", "end date (mm/dd/yyyy)"),
                                        stringsAsFactors = FALSE),
  # INITITIAL CONDITIONS #####
  "INITITIAL CONDITIONS" = data.frame("variable" = c("load_initial", "initLoad", "save_initial", "initSave", "StepInit"),
                                      "value" = c(1, "$(FILE_PATHS:PathMaps)/init/Bhima_19960505.nc", 0,
                                                  "$(FILE_PATHS:PathMaps)/init/Bhima",
                                                  "05/05/1996"),
                                      "comment" = c(rep("", 5)),
                                      stringsAsFactors = FALSE),
  # CALIBRATION #####
  "CALIBRATION" = data.frame("variable" = c("permeability", "poro", "crop_correct",
                                            "soildepth_factor", "preferentialFlowConstant", "arnoBeta_add",
                                            "factor_interflow", "manningsN", "lakeAFactor",
                                            "lakeEvaFactor", "gwRiverMult", "recessionCoeff_factor",
                                            "SnowMeltCoef", "normalStorageLimit", "runoffConc_factor"),
                             "value" = c("6.4038778549847285e-06", "0.015628838893995623", "1.0",
                                         "0.9875080648885913", "6.966886220109986", "0.06203863776246402",
                                         "0.8713435782279897", "5.4777137399396585", "1.2017934423182715",
                                         "1.471254841420612", "1.0", "5.08489365888276", "0.004",
                                         "0.645563228322237", "2.36693786921974"),
                             "comment" = c("Permeability", "Porosity", "Crop Factor Correction",
                                           rep("Soil", 3), "Interflow", "Routing Manning's Roughness",
                                           rep("Lake Parameter Channel width and weir coefficient", 2),
                                           "River perentage coefficient", "GW recession coefficient factor",
                                           "Snow", "Reservoir Storage limit fraction of total storage",
                                           "Runoff concentration factor"),
                             stringsAsFactors = FALSE),
  # TOPOGRAPHY #####
  "TOPOP" = data.frame("variable" = c("Ldd", "Elevation", "ElevationStD",
                                      "CellArea", "Lat", "Lon"),
                       "value" = c("$(FILE_PATHS:PathMaps)/routing/ldd.tif",
                                   "$(FILE_PATHS:PathMaps)/landsurface/topo/dem_India_1km_extract.map",
                                   "$(FILE_PATHS:PathMaps)/landsurface/topo/elvstd_UB_1km.map",
                                   "$(FILE_PATHS:PathMaps)/landsurface/topo/cellArea_m2_30s.tif",
                                   "$(FILE_PATHS:PathMaps)/landsurface/topo/cellarea_lat.tif",
                                   "$(FILE_PATHS:PathMaps)/landsurface/topo/cellarea_lon.tif"),
                       "comment" = c("Local drain direction map (1-9)",
                                     rep("Elevation map for downscaling meteo maps", 2),
                                     rep("Area of pixel [m2] (for lat/lon every cell has a different area)", 3)),
                       stringsAsFactors = FALSE),
  # METEOROLOGY #####
  "METEO" = data.frame("variable" = c("meteomapssamescale", "downscale_wordclim_tavg",
                                      "downscale_wordclim_tmin", "downscale_wordclim_tmax",
                                      "downscale_wordclim_prec", "usemeteodownscaling",
                                      "PrecipitationMaps", "TavgMaps", "E0Maps", "ETMaps",
                                      "precipitation_coversion", "evaporation_coversion"),
                       "value" = c("False",
                                   "$(FILE_PATHS:PathMaps)/meteo/worldclim/worldclim_tavg_UB.nc",
                                   "$(FILE_PATHS:PathMaps)/meteo/worldclim/worldclim_tmin_UB.nc",
                                   "$(FILE_PATHS:PathMaps)/meteo/worldclim/worldclim_tmax_UB.nc",
                                   "$(FILE_PATHS:PathMaps)/meteo/worldclim/worldclim_prec_UB.nc",
                                   1, "$(FILE_PATHS:PathMeteo)/pr*", "$(FILE_PATHS:PathMeteo)/tas*",
                                   "$(FILE_PATHS:PathMeteo)/EWRef_daily_sarati.nc",
                                   "$(FILE_PATHS:PathMeteo)/ETRef_daily_sarati.nc", 86.4, 1.0),
                       "comment" = c(rep("", 10), rep("Conversion factors", 2)),
                       stringsAsFactors = FALSE),
  # EVAPORATION #####
  "EVAPORATION" = data.frame("variable" = c("albedo", "albedoMaps", "AlbedoSoil", "AlbedoWater", "AlbedoCanopy",
                                            "useHuss", "TminMaps", "TmaxMaps", "PSurfMaps", "QAirMaps", "WindMaps",
                                            "RSDSMaps", "RSDLMaps"),
                             "value" = c("True", "$(FILE_PATHS:PathMaps)/landsurface/albedo/albedo_UB_1km.nc",
                                         0.15, 0.05, 0.23, "True",
                                         "$(FILE_PATHS:PathMeteo)/tasmin*", "$(FILE_PATHS:PathMeteo)/tasmax*",
                                         "$(FILE_PATHS:PathMeteo)/ps*", "$(FILE_PATHS:PathMeteo)/huss*",
                                         "$(FILE_PATHS:PathMeteo)/wind*", "$(FILE_PATHS:PathMeteo)/rsds*",
                                         "$(FILE_PATHS:PathMeteo)/rlds*"),
                             "comment" = c(rep("", 13)),
                             stringsAsFactors = FALSE),
  # SNOW #####
  "SNOW" = data.frame("variable" = c("NumberSnowLayers", "GlacierTransportZone", "TemperatureLapseRate",
                                     "SnowFactor", "SnowSeasonAdj", "TempMelt", "TempSnow", "IceMeltCoef"),
                      "value" = c(1.0, 1.0, 0.0065,
                                  1.0, 0.001, 1.0, 1.0,
                                  0.007),
                      "comment" = c(rep("", 8)),
                      stringsAsFactors = FALSE),
  # FROST #####
  "FROST" = data.frame("variable" = c("SnowWaterEquivalent", "Afrost",
                                      "Kfrost", "FrostIndexThreshold"),
                       "value" = c(0.45, 0.97, 0.57, 56.0),
                       "comment" = c(rep("", 4)),
                       stringsAsFactors = FALSE),
  # VEGETATION #####
  "VEGETATION" = data.frame("variable" = c("cropgroupnumber"),
                            "value" = c("$(FILE_PATHS:PathMaps)/soil/cropgrp_UB_1km.nc"),
                            "comment" = c(""),
                            stringsAsFactors = FALSE),
  # SOIL #####
  "SOIL" = data.frame("variable" = c("PathTopo", "PathSoil1", "tanslope",
                                     "slopeLength", "relativeElevation",
                                     "KSat1", "KSat2", "KSat3",
                                     "alpha1", "alpha2", "alpha3",
                                     "lambda1", "lambda2", "lambda3",
                                     "thetas1", "thetas2", "thetas3",
                                     "thetar1", "thetar2", "thetar3",
                                     "percolationImp", "maxGWCapRise",
                                     "minCropKC", "minTopWaterLayer",
                                     "StorDepth1", "StorDepth2"),
                      "value" = c("$(FILE_PATHS:PathMaps)/landsurface/topo",
                                  "$(FILE_PATHS:PathMaps)/soil",
                                  "$(PathTopo)/tanslope_UB_1km.map",
                                  "$(PathTopo)/slopeLength_UB_1km.map",
                                  "$(PathTopo)/dzRel_UB_1km.nc",
                                  "$(PathSoil1)/ksat1_UB_1km.map",
                                  "$(PathSoil1)/ksat2_UB_1km.map",
                                  "$(PathSoil1)/ksat3_UB_1km.map",
                                  "$(PathSoil1)/alpha1_UB_1km.map",
                                  "$(PathSoil1)/alpha2_UB_1km.map",
                                  "$(PathSoil1)/alpha3_UB_1km.map",
                                  "$(PathSoil1)/lambda1_UB_1km.map",
                                  "$(PathSoil1)/lambda2_UB_1km.map",
                                  "$(PathSoil1)/lambda3_UB_1km.map",
                                  "$(PathSoil1)/thetas1_UB_1km.map",
                                  "$(PathSoil1)/thetas2_UB_1km.map",
                                  "$(PathSoil1)/thetas3_UB_1km.map",
                                  "$(PathSoil1)/thetar1_UB_1km.map",
                                  "$(PathSoil1)/thetar2_UB_1km.map",
                                  "$(PathSoil1)/thetar3_UB_1km.map",
                                  "$(PathSoil1)/percolationImp_UB_1km.map",
                                  5.0, 0.2, 0.0,
                                  "$(PathSoil1)/storageDepth1_UB_1km.map",
                                  "$(PathSoil1)/storageDepth2_UB_1km.map"),
                      "comment" = c(rep("", 26)),
                      stringsAsFactors = FALSE),
  # LANDCOVER #####
  "LANDCOVER" = data.frame("variable" = c("PathLandcover", "coverTypes", "coverTypesShort",
                                          "fractionLandcover", "Urban_1km", "fracCrop_rice",
                                          "Irr_1km", "Forest_1km", "Water_1km", "dynamicLandcover",
                                          "fixLandcoverYear", "Crop_Irr", "Crop_nonIrr"),

                           "value" = c("$(FILE_PATHS:PathMaps)/landsurface",
                                       "forest, grassland, irrPaddy, irrNonPaddy, sealed, water",
                                       "f, g, i, n, s, w",
                                       "$(PathLandcover)/fractionLandCover_UB_1km.nc",
                                       "$(PathLandcover)/Urban_fraction.tif",
                                       "$(PathLandcover)/Rice_30sec.tif",
                                       "$(PathLandcover)/Irrigated_fraction.tif",
                                       "$(PathLandcover)/Forest_Shrub_1km.tif",
                                       "$(PathLandcover)/Water_1km.tif",
                                       "True",
                                       1961.0,
                                       "$(FILE_PATHS:PathMaps)/landcover/crops/CropIrr_30sec.tif",
                                       "$(FILE_PATHS:PathMaps)/landcover/crops/CropNonIrr_30sec.tif"),
                           "comment" = c(rep("", 11), "irrigated crop area maps (one row per crop)",
                                         "non-irrigated crop area maps (one row per crop)"),
                           stringsAsFactors = FALSE),
  # __forest #####
  "__forest" = data.frame("variable" = c("PathForest", "PathSoil1", "forest_arnoBeta",
                                         "forest_KSat1", "forest_KSat2", "forest_KSat3",
                                         "forest_alpha1", "forest_alpha2", "forest_alpha3",
                                         "forest_lambda1", "forest_lambda2", "forest_lambda3",
                                         "forest_thetas1", "forest_thetas2", "forest_thetas3",
                                         "forest_thetar1", "forest_thetar2", "forest_thetar3",
                                         "forest_minInterceptCap", "forest_cropDeplFactor",
                                         "forest_rootFraction1", "forest_maxRootDepth",
                                         "forest_minSoilDepthFrac", "forest_cropCoefficientNC",
                                         "forest_interceptCapNC"),
                          "value" = c("$(FILE_PATHS:PathMaps)/landcover/forest",
                                      "$(FILE_PATHS:PathMaps)/soil",
                                      0.2,
                                      "$(PathSoil1)/forest_ksat1_UB_1km.map",
                                      "$(PathSoil1)/forest_ksat2_UB_1km.map",
                                      "$(PathSoil1)/ksat3_UB_1km.map",
                                      "$(PathSoil1)/forest_alpha1_UB_1km.map",
                                      "$(PathSoil1)/forest_alpha2_UB_1km.map",
                                      "$(PathSoil1)/alpha3_UB_1km.map",
                                      "$(PathSoil1)/forest_lambda1_UB_1km.map",
                                      "$(PathSoil1)/forest_lambda2_UB_1km.map",
                                      "$(PathSoil1)/lambda3_UB_1km.map",
                                      "$(PathSoil1)/forest_thetas1_UB_1km.map",
                                      "$(PathSoil1)/forest_thetas2_UB_1km.map",
                                      "$(PathSoil1)/thetas3_UB_1km.map",
                                      "$(PathSoil1)/forest_thetar1_UB_1km.map",
                                      "$(PathSoil1)/forest_thetar2_UB_1km.map",
                                      "$(PathSoil1)/thetar3_UB_1km.map",
                                      0.001, 0.0,
                                      "$(PathForest)/rootFraction1_UB_1km.map",
                                      "$(PathForest)/maxRootDepth_UB_1km.map",
                                      "$(PathForest)/minSoilDepthFrac_UB_1km.map",
                                      "$(PathForest)/cropCoefficientForest_10days_UB_1km.nc",
                                      "$(PathForest)/interceptCapForest_10days_UB_1km.nc"),
                          "comment" = c(rep("", 25)),
                          stringsAsFactors = FALSE),
  # __grassland #####
  "__grassland" = data.frame("variable" = c("PathGrassland", "grassland_arnoBeta", "grassland_minInterceptCap",
                                            "grassland_cropDeplFactor", "grassland_rootFraction1", "grassland_maxRootDepth",
                                            "grassland_minSoilDepthFrac", "grassland_cropCoefficientNC", "grassland_interceptCapNC"),
                             "value" = c("$(FILE_PATHS:PathMaps)/landcover/grassland", 0.0, 0.001, 0.0,
                                         "$(PathGrassland)/rootFraction1_UB_1km.map",
                                         "$(PathGrassland)/maxRootDepth_UB_1km.map",
                                         "$(PathGrassland)/minSoilDepthFrac.map",
                                         "$(PathGrassland)/cropCoefficientGrassland_10days_UB_1km.nc",
                                         "$(PathGrassland)/interceptCapGrassland_10days_UB_1km.nc"),
                             "comment" = c(rep("", 9)),
                             stringsAsFactors = FALSE),
  # __irrPaddy #####
  "__irrPaddy" = data.frame("variable" = c("PathIrrPaddy", "irrPaddy_arnoBeta", "irrPaddy_minInterceptCap",
                                           "irrPaddy_cropDeplFactor", "irrPaddy_rootFraction1", "irrPaddy_maxRootDepth",
                                           "irrPaddy_minSoilDepthFrac", "irrPaddy_cropCoefficientNC", "irrPaddy_maxtopwater"),
                            "value" = c("$(FILE_PATHS:PathMaps)/landcover/irrPaddy", 0.2, 0.001, 0.0,
                                        "$(PathIrrPaddy)/rootFraction1_UB_1km.map", "$(PathIrrPaddy)/maxRootDepth_UB_1km.map",
                                        "$(PathIrrPaddy)/minSoilDepthFrac.map", "$(PathIrrPaddy)/cropCoefficientirrPaddy_10days_UB_1km.nc",
                                        0.05),
                            "comment" = c(rep("", 9)),
                            stringsAsFactors = FALSE),
  # __irrNonPaddy #####
  "__irrNonPaddy" = data.frame("variable" = c("PathIrrNonPaddy", "irrNonPaddy_arnoBeta", "irrNonPaddy_minInterceptCap",
                                              "irrNonPaddy_cropDeplFactor", "irrNonPaddy_rootFraction1", "irrNonPaddy_maxRootDepth",
                                              "irrNonPaddy_minSoilDepthFrac", "irrNonPaddy_cropCoefficientNC"),
                               "value" = c("$(FILE_PATHS:PathMaps)/landcover/irrNonPaddy", 0.2, 0.001, 0.0,
                                           "$(PathIrrNonPaddy)/rootFraction1_UB_1km.map",
                                           "$(PathIrrNonPaddy)/maxRootDepth_UB_1km.map",
                                           "$(PathIrrNonPaddy)/minSoilDepthFrac.map",
                                           "$(PathIrrNonPaddy)/cropCoefficientirrNonPaddy_10days_UB_1km.nc"),
                               "comment" = c(rep("", 8)),
                               stringsAsFactors = FALSE),
  # __sealed #####
  "__sealed" = data.frame("variable" = c("sealed_minInterceptCap"),
                          "value" = c(0.001),
                          "comment" = c(""),
                          stringsAsFactors = FALSE),
  # __open_water #####
  "__open_water" = data.frame("variable" = c("PathWater", "water_minInterceptCap"),
                              "value" = c("$(FILE_PATHS:PathMaps)/landcover/water", 0.0),
                              "comment" = c(rep("", 2)),
                              stringsAsFactors = FALSE),
  # GROUNDWATER #####
  "GROUNDWATER" = data.frame("variable" = c("PathGroundwater", "recessionCoeff", "specificYield",
                                            "kSatAquifer"),
                             "value" = c("$(FILE_PATHS:PathMaps)/groundwater",
                                         "$(PathGroundwater)/recessionCoeff_UB_1km.map",
                                         "$(PathGroundwater)/specificYield_UB_1km.map",
                                         "$(PathGroundwater)/kSatAquifer_UB_1km.map"),
                             "comment" = c(rep("", 4)),
                             stringsAsFactors = FALSE),
  # GROUNDWATER_MODFLOW #####
  "GROUNDWATER_MODFLOW" = data.frame("variable" = c("PathGroundwaterModflow", "modflow_exe",
                                                    "PathGroundwaterModflowOutput", "PathGroundwaterModflowClimate",
                                                    "PathGroundwaterModflowInput", "writeModflowError", "modflow_steadystate",
                                                    "load_steady_previous", "Ndays_steady", "ModflowPrecipitationMaps",
                                                    "ModflowTavgMaps", "ModflowE0Maps", "ModflowETMaps",
                                                    "Groundwater_pumping", "Pumping_input_file", "modflow_steadyInit",
                                                    "nameModflowModel", "res_ModFlow", "modflow_timestep", "nlay",
                                                    "catchment_limits", "basin_limits", "topo_modflow", "riverPercentage",
                                                    "thickness", "cwatm_modflow_indices", "index_cwatm",
                                                    "weight_cwatm", "weight_modflow"),
                                     "value" = c("$(FILE_PATHS:PathRoot)/Modflow",
                                                 "$(PathGroundwaterModflow)/MODFLOW-NWT_64",
                                                 "$(PathGroundwaterModflow)/output",
                                                 "$(FILE_PATHS:PathMeteo)/groundwater_avg",
                                                 "$(PathGroundwaterModflow)/modflow_inputs/newModFlow_inputs500m_Bhima",
                                                 "True", "False", "True", 500.0,
                                                 "$(PathGroundwaterModflowClimate)/pr_avg.nc",
                                                 "$(PathGroundwaterModflowClimate)/tas_avg.nc",
                                                 "$(PathGroundwaterModflowClimate)/ew_avg.nc",
                                                 "$(PathGroundwaterModflowClimate)/et_avg.nc",
                                                 "True", "$(PathGroundwaterModflow)/modflow_inputs/pumping_input_file_unique_Sarati_1591.npy",
                                                 "$(PathGroundwaterModflowOutput)/Bhima_steady_17Sept2020_3.hds", "Bhima", 500.0, 1.0, 1.0,
                                                 "$(PathGroundwaterModflowInput)/UB_limits.txt", "$(PathGroundwaterModflowInput)/Basin_limits.txt",
                                                 "$(PathGroundwaterModflowInput)/Topo.txt", "$(PathGroundwaterModflowInput)/RiverPercentage.npy",
                                                 100.0, "$(PathGroundwaterModflowInput)/indices", "$(PathGroundwaterModflowInput)/CWATMindex.txt",
                                                 "$(PathGroundwaterModflowInput)/Weight.txt", "$(PathGroundwaterModflowInput)/Weight2.txt"),
                                     "comment" = c(rep("", 29)),
                                     stringsAsFactors = FALSE),
  # WATERDEMAND #####
  "WATERDEMAND" = data.frame("variable" = c("adminSegments", "scaleDomesticDemand", "PathWaterdemand",
                                            "lift_areas", "reservoir_command_areas", "canals",
                                            "demand_unit", "domesticWaterDemandFile", "domesticTimeMonthly",
                                            "domesticWithdrawalvarname", "domesticConsuptionvarname",
                                            "industryWaterDemandFile", "industryTimeMonthly", "industryWithdrawalvarname",
                                            "industryConsuptionvarname", "uselivestock", "livestockWaterDemandFile",
                                            "livestockTimeMonthly", "livestockvarname", "use_environflow",
                                            "EnvironmentalFlowFile", "irrNonPaddy_efficiency", "irrPaddy_efficiency",
                                            "irrigation_returnfraction", "swAbstractionFraction_Local",
                                            "swAbstractionFraction_Lift", "swAbstractionFraction_nonLocal",
                                            "gwAbstractionFraction_Irr", "swAbstractionFraction_Irr",
                                            "swAbstractionFraction_nonIrr", "availableGWStorageFraction",
                                            "fraction_IncreaseIrrigation_Nonpaddy", "averageDischarge",
                                            "averageBaseflow", "baseflowInM"),
                             "value" = c("C:/GitHub/FUSE/Input/landsurface/waterDemand/AgentCode.tif", 1.0,
                                         "$(FILE_PATHS:PathMaps)/landsurface/waterDemand",
                                         "$(PathWaterdemand)/CommandLiftArea_24Aug2020_2.tif",
                                         "$(PathWaterdemand)/CommandLiftArea_24Aug2020_2.tif",
                                         "$(PathWaterdemand)/Canals_27Aug2020.tif", 1,
                                         "$(PathWaterdemand)/domesticWaterDemand_UB_1km.nc",
                                         "True", "domesticWithdrawal", "domesticConsumption",
                                         "$(PathWaterdemand)/industryWaterDemand_UB_1km.nc",
                                         "True", "industryWithdrawal", "industryConsumption",
                                         "True", "$(PathWaterdemand)/livestockWaterDemand_UB_1km.nc",
                                         "True", "livestockConsumption", "False", "$(FILE_PATHS:PathOut)/MQ90_12month.nc",
                                         0.7, 0.6, 0.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.15, 1.2,
                                         "$(FILE_PATHS:PathOut)/discharge_totalavg1.nc",
                                         "$(FILE_PATHS:PathOut)/baseflow_totalavg1.nc",
                                         "True"),
                             "comment" = c(rep("", 35)),
                             stringsAsFactors = FALSE),
  # RUNOFF_CONCENTRATION #####
  "RUNOFF_CONCENTRATION" = data.frame("variable" = c("forest_runoff_peaktime",
                                                     "grassland_runoff_peaktime",
                                                     "irrPaddy_runoff_peaktime",
                                                     "irrNonPaddy_runoff_peaktime",
                                                     "sealed_runoff_peaktime",
                                                     "water_runoff_peaktime",
                                                     "interflow_runoff_peaktime",
                                                     "baseflow_runoff_peaktime"),
                                      "value" = c(1.0, 0.5, 0.5, 0.5,
                                                  0.15, 0.01, 1.0, 2.0),
                                      "comment" = c(rep("", 8)),
                                      stringsAsFactors = FALSE),
  # ROUTING #####
  "ROUTING" = data.frame("variable" = c("PathRouting", "NoRoutingSteps", "chanBeta",
                                        "chanGrad", "chanGradMin", "chanMan",
                                        "chanLength", "chanWidth", "chanDepth"),
                         "value" = c("$(FILE_PATHS:PathMaps)/routing", 75.0, 0.6,
                                     "$(PathRouting)/kinematic/changrad_UB.map", 0.0001,
                                     "$(PathRouting)/kinematic/chanmann_UB.map",
                                     "$(PathRouting)/kinematic/chanleng_UB.map",
                                     "$(PathRouting)/kinematic/chanwidth_UB.map",
                                     "$(PathRouting)/kinematic/chanheight_UB.map"),
                         "comment" = c(rep("", 9)),
                         stringsAsFactors = FALSE),
  # LAKES_RESERVOIRS #####
  "LAKES_RESERVOIRS" = data.frame("variable" = c("PathLakesRes", "useResAndLakes", "dynamicLakesRes",
                                                 "fixLakesResYear", "waterBodyID", "waterBodyTyp",
                                                 "waterBodyDis", "waterBodyArea", "useSmallLakes",
                                                 "smallLakesRes", "smallwaterBodyDis", "waterBodyVolRes",
                                                 "waterBodyYear", "waterBodyElec", "conservativeStorageLimit",
                                                 "floodStorageLimit", "adjust_Normal_Flood", "MinOutflowQ",
                                                 "NormalOutflowQ", "NonDamagingOutflowQ", "Reservoir_releases_input_file",
                                                 "floodStorageLimit_JuneAndEarlier", "floodStorageLimit_July",
                                                 "floodStorageLimit_AugustAndLater", "Water_conveyance_efficiency",
                                                 "inflateReservoirs"),
                                  "value" = c("$(FILE_PATHS:PathMaps)/routing/lakesreservoirs", "True",
                                              1, 1961.0,
                                              "$(PathLakesRes)/WB_FID_27Aug_2.tif",
                                              "$(PathLakesRes)/WB_Type_25Aug.tif",
                                              "$(PathLakesRes)/WB_Discharge_25Aug.tif",
                                              "$(PathLakesRes)/WB_Area_Mm2_25Aug.tif",
                                              "False", "$(PathLakesRes)/smallLakesRes_UB_1km.nc",
                                              "$(PathLakesRes)/smallLakesResDis_UB_1km.nc",
                                              "$(PathLakesRes)/WB_Volume_28Aug.tif",
                                              "$(PathLakesRes)/WB_Year_05Sept.tif",
                                              "$(PathLakesRes)/WB_HyElec_25Aug.tif",
                                              0.02, 0.9, 0.5, 0.0, 1.0, 4.0,
                                              "$(FILE_PATHS:PathMaps)/routing/lakesreservoirs/reservoirOperations_Bhima_09Sept2020_mswep.nc",
                                              0.9297, 0.9497, 1.0, 0.65, 1.0),
                                  "comment" = c(rep("", 26)),
                                  stringsAsFactors = FALSE),
  # INFLOW #####
  "INFLOW" = data.frame("variable" = c("In_Dir", "InflowPoints", "QInTS"),
                        "value" = c("$(FILE_PATHS:PathRoot)/in", "$(In_Dir)/in.map", "mm.tss"),
                        "comment" = c(rep("", 3)),
                        stringsAsFactors = FALSE),
  # ENVIRONMENTALFLOW #####
  "ENVIRONMENTALFLOW" = data.frame("variable" = c("calc_ef_after", "EFDis", "cut_ef_map"),
                                   "value" = c("True",
                                               "$(FILE_PATHS:PathOut)/discharge_rhine.nc",
                                               "False"),
                                   "comment" = c(rep("", 3)),
                                   stringsAsFactors = FALSE),
  # OUTPUT #####
  "OUTPUT" = data.frame("variable" = c("OUT_Dir", "OUT_MAP_Daily", "OUT_MAP_MonthEnd",
                                       "OUT_MAP_MonthAvg", "OUT_MAP_MonthTot", "OUT_MAP_AnnualEnd",
                                       "OUT_MAP_AnnualTot", "OUT_MAP_TotalEnd"),
                        "value" = c("$(FILE_PATHS:PathOut)",
                                    "head_development, act_channelAbstract_Lift, act_nonLocalchannelAbstract_M",
                                    "Crop_Irr, Crop_nonIrr", "", "Rain", rep("", 3)),
                        "comment" = c(rep("", 8)),
                        stringsAsFactors = FALSE)
  #####
)

usethis::use_data(settings, internal = TRUE, overwrite = TRUE)
dof1985/cwatm4r documentation built on Nov. 8, 2022, 7:30 p.m.