Cannot create base.nc for a specific country

28 Views Asked by At

I have the following configuration file config.yaml:

# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#top-level-configuration
version: 0.9.0
tutorial: false

logging:
  level: INFO
  format: '%(levelname)s:%(name)s:%(message)s'

private:
  keys:
    entsoe_api:

remote:
  ssh: ""
  path: ""

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
run:
  name: ""
  disable_progressbar: false
  shared_resources: false
  shared_cutouts: true

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
foresight: overnight

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#scenario
# Wildcard docs in https://pypsa-eur.readthedocs.io/en/latest/wildcards.html
scenario:
  simpl:
  - ''
  ll:
  - v1.5
  clusters:
  - 37
  - 128
  - 256
  - 512
  - 1024
  opts:
  - ''
  sector_opts:
  - Co2L0-3H-T-H-B-I-A-dist1
  planning_horizons:
  # - 2020
  # - 2030
  # - 2040
  - 2050

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#countries
countries: ['IT']

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#snapshots
snapshots:
  start: "2013-01-01"
  end: "2014-01-01"
  inclusive: 'left'
  resolution: false
  segmentation: false
  #representative: false

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#enable
enable:
  retrieve: auto
  prepare_links_p_nom: false
  retrieve_databundle: true
  retrieve_sector_databundle: true
  retrieve_cost_data: true
  build_cutout: false
  retrieve_irena: false
  retrieve_cutout: true
  build_natura_raster: false
  retrieve_natura_raster: true
  custom_busmap: false


# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#co2-budget
co2_budget:
  2020: 0.701
  2025: 0.524
  2030: 0.297
  2035: 0.150
  2040: 0.071
  2045: 0.032
  2050: 0.000

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#electricity
electricity:
  voltages: [220., 300., 380., 500., 750.]
  gaslimit_enable: false
  gaslimit: false
  co2limit_enable: false
  co2limit: 7.75e+7
  co2base: 1.487e+9
  agg_p_nom_limits: data/agg_p_nom_minmax.csv

  operational_reserve:
    activate: false
    epsilon_load: 0.02
    epsilon_vres: 0.02
    contingency: 4000

  max_hours:
    battery: 6
    H2: 168

  extendable_carriers:
    Generator: [solar, onwind, offwind-ac, offwind-dc, OCGT]
    StorageUnit: [] # battery, H2
    Store: [battery, H2]
    Link: [] # H2 pipeline

  powerplants_filter: (DateOut >= 2022 or DateOut != DateOut)
  custom_powerplants: false
  everywhere_powerplants: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]

  conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
  renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro]

  estimate_renewable_capacities:
    enable: true
    from_opsd: true
    year: 2020
    expansion_limit: false
    technology_mapping:
      Offshore: [offwind-ac, offwind-dc]
      Onshore: [onwind]
      PV: [solar]

  autarky:
    enable: false
    by_country: false

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#atlite
atlite:
  default_cutout: europe-2013-era5
  nprocesses: 4
  show_progress: false
  cutouts:
    # use 'base' to determine geographical bounds and time span from config
    # base:
      # module: era5
    europe-2013-era5:
      module: era5 # in priority order
      x: [-12., 42.]
      y: [33., 72]
      dx: 0.3
      dy: 0.3
      time: ['2013', '2013']
    europe-2013-sarah:
      module: [sarah, era5] # in priority order
      x: [-12., 42.]
      y: [33., 65]
      dx: 0.2
      dy: 0.2
      time: ['2013', '2013']
      sarah_interpolate: false
      sarah_dir:
      features: [influx, temperature]

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#renewable
renewable:
  onwind:
    cutout: europe-2013-era5
    resource:
      method: wind
      turbine: Vestas_V112_3MW
      add_cutout_windspeed: true
    capacity_per_sqkm: 3
    # correction_factor: 0.93
    corine:
      grid_codes: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32]
      distance: 1000
      distance_grid_codes: [1, 2, 3, 4, 5, 6]
    luisa: false
      # grid_codes: [1111, 1121, 1122, 1123, 1130, 1210, 1221, 1222, 1230, 1241, 1242]
      # distance: 1000
      # distance_grid_codes: [1111, 1121, 1122, 1123, 1130, 1210, 1221, 1222, 1230, 1241, 1242]
    natura: true
    excluder_resolution: 100
    clip_p_max_pu: 1.e-2
  offwind-ac:
    cutout: europe-2013-era5
    resource:
      method: wind
      turbine: NREL_ReferenceTurbine_2020ATB_5.5MW
      add_cutout_windspeed: true
    capacity_per_sqkm: 2
    correction_factor: 0.8855
    corine: [44, 255]
    luisa: false # [0, 5230]
    natura: true
    ship_threshold: 400
    max_depth: 50
    max_shore_distance: 30000
    excluder_resolution: 200
    clip_p_max_pu: 1.e-2
  offwind-dc:
    cutout: europe-2013-era5
    resource:
      method: wind
      turbine: NREL_ReferenceTurbine_2020ATB_5.5MW
      add_cutout_windspeed: true
    capacity_per_sqkm: 2
    correction_factor: 0.8855
    corine: [44, 255]
    luisa: false # [0, 5230]
    natura: true
    ship_threshold: 400
    max_depth: 50
    min_shore_distance: 30000
    excluder_resolution: 200
    clip_p_max_pu: 1.e-2
  solar:
    cutout: europe-2013-sarah
    resource:
      method: pv
      panel: CSi
      orientation:
        slope: 35.
        azimuth: 180.
    capacity_per_sqkm: 5.1
    # correction_factor: 0.854337
    corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
    luisa: false # [1111, 1121, 1122, 1123, 1130, 1210, 1221, 1222, 1230, 1241, 1242, 1310, 1320, 1330, 1410, 1421, 1422, 2110, 2120, 2130, 2210, 2220, 2230, 2310, 2410, 2420, 3210, 3320, 3330]
    natura: true
    excluder_resolution: 100
    clip_p_max_pu: 1.e-2
  hydro:
    cutout: europe-2013-era5
    carriers: [ror, PHS, hydro]
    PHS_max_hours: 6
    hydro_max_hours: "energy_capacity_totals_by_country" # one of energy_capacity_totals_by_country, estimate_by_large_installations or a float
    flatten_dispatch: false
    flatten_dispatch_buffer: 0.2
    clip_min_inflow: 1.0

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#conventional
conventional:
  unit_commitment: false
  dynamic_fuel_price: false
  nuclear:
    p_max_pu: "data/nuclear_p_max_pu.csv" # float of file name

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#lines
lines:
  types:
    220.: "Al/St 240/40 2-bundle 220.0"
    300.: "Al/St 240/40 3-bundle 300.0"
    380.: "Al/St 240/40 4-bundle 380.0"
    500.: "Al/St 240/40 4-bundle 380.0"
    750.: "Al/St 560/50 4-bundle 750.0"
  s_max_pu: 0.7
  s_nom_max: .inf
  max_extension: 20000 #MW
  length_factor: 1.25
  reconnect_crimea: true
  under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
  dynamic_line_rating:
    activate: false
    cutout: europe-2013-era5
    correction_factor: 0.95
    max_voltage_difference: false
    max_line_rating: false

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#links
links:
  p_max_pu: 1.0
  p_nom_max: .inf
  max_extension: 30000 #MW
  include_tyndp: true
  under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#transformers
transformers:
  x: 0.1
  s_nom: 2000.
  type: ''

# docs-load in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#load
load:
  power_statistics: true
  interpolate_limit: 3
  time_shift_for_large_gaps: 1w
  manual_adjustments: true # false
  scaling_factor: 1.0

# docs
# TODO: PyPSA-Eur merge issue in prepare_sector_network.py
# regulate what components with which carriers are kept from PyPSA-Eur;
# some technologies are removed because they are implemented differently
# (e.g. battery or H2 storage) or have different year-dependent costs
# in PyPSA-Eur-Sec
pypsa_eur:
  Bus:
  - AC
  Link:
  - DC
  Generator:
  - onwind
  - offwind-ac
  - offwind-dc
  - solar
  - ror
  - nuclear
  StorageUnit:
  - PHS
  - hydro
  Store: []

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#energy
energy:
  energy_totals_year: 2011
  base_emissions_year: 1990
  eurostat_report_year: 2016
  emissions: CO2

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#biomass
biomass:
  year: 2030
  scenario: ENS_Med
  classes:
    solid biomass:
    - Agricultural waste
    - Fuelwood residues
    - Secondary Forestry residues - woodchips
    - Sawdust
    - Residues from landscape care
    - Municipal waste
    not included:
    - Sugar from sugar beet
    - Rape seed
    - "Sunflower, soya seed "
    - Bioethanol barley, wheat, grain maize, oats, other cereals and rye
    - Miscanthus, switchgrass, RCG
    - Willow
    - Poplar
    - FuelwoodRW
    - C&P_RW
    biogas:
    - Manure solid, liquid
    - Sludge

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#solar-thermal
solar_thermal:
  clearsky_model: simple  # should be "simple" or "enhanced"?
  orientation:
    slope: 45.
    azimuth: 180.

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#existing-capacities
existing_capacities:
  grouping_years_power: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2025, 2030]
  grouping_years_heat: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2019] # these should not extend 2020
  threshold_capacity: 10
  conventional_carriers:
  - lignite
  - coal
  - oil
  - uranium

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#sector
sector:
  district_heating:
    potential: 0.6
    progress:
      2020: 0.0
      2025: 0.15
      2030: 0.3
      2035: 0.45
      2040: 0.6
      2045: 0.8
      2050: 1.0
    district_heating_loss: 0.15
  cluster_heat_buses: true
  bev_dsm_restriction_value: 0.75
  bev_dsm_restriction_time: 7
  transport_heating_deadband_upper: 20.
  transport_heating_deadband_lower: 15.
  ICE_lower_degree_factor: 0.375
  ICE_upper_degree_factor: 1.6
  EV_lower_degree_factor: 0.98
  EV_upper_degree_factor: 0.63
  bev_dsm: true
  bev_availability: 0.5
  bev_energy: 0.05
  bev_charge_efficiency: 0.9
  bev_plug_to_wheel_efficiency: 0.2
  bev_charge_rate: 0.011
  bev_avail_max: 0.95
  bev_avail_mean: 0.8
  v2g: true
  land_transport_fuel_cell_share:
    2020: 0
    2025: 0
    2030: 0
    2035: 0
    2040: 0
    2045: 0
    2050: 0
  land_transport_electric_share:
    2020: 0
    2025: 0.15
    2030: 0.3
    2035: 0.45
    2040: 0.7
    2045: 0.85
    2050: 1
  land_transport_ice_share:
    2020: 1
    2025: 0.85
    2030: 0.7
    2035: 0.55
    2040: 0.3
    2045: 0.15
    2050: 0
  transport_fuel_cell_efficiency: 0.5
  transport_internal_combustion_efficiency: 0.3
  agriculture_machinery_electric_share: 0
  agriculture_machinery_oil_share: 1
  agriculture_machinery_fuel_efficiency: 0.7
  agriculture_machinery_electric_efficiency: 0.3
  MWh_MeOH_per_MWh_H2: 0.8787
  MWh_MeOH_per_tCO2: 4.0321
  MWh_MeOH_per_MWh_e: 3.6907
  shipping_hydrogen_liquefaction: false
  shipping_hydrogen_share:
    2020: 0
    2025: 0
    2030: 0
    2035: 0
    2040: 0
    2045: 0
    2050: 0
  shipping_methanol_share:
    2020: 0
    2025: 0.15
    2030: 0.3
    2035: 0.5
    2040: 0.7
    2045: 0.85
    2050: 1
  shipping_oil_share:
    2020: 1
    2025: 0.85
    2030: 0.7
    2035: 0.5
    2040: 0.3
    2045: 0.15
    2050: 0
  shipping_methanol_efficiency: 0.46
  shipping_oil_efficiency: 0.40
  aviation_demand_factor: 1.
  HVC_demand_factor: 1.
  time_dep_hp_cop: true
  heat_pump_sink_T: 55.
  reduce_space_heat_exogenously: true
  reduce_space_heat_exogenously_factor:
    2020: 0.10  # this results in a space heat demand reduction of 10%
    2025: 0.09  # first heat demand increases compared to 2020 because of larger floor area per capita
    2030: 0.09
    2035: 0.11
    2040: 0.16
    2045: 0.21
    2050: 0.29
  retrofitting:
    retro_endogen: false
    cost_factor: 1.0
    interest_rate: 0.04
    annualise_cost: true
    tax_weighting: false
    construction_index: true
  tes: true
  tes_tau:
    decentral: 3
    central: 180
  boilers: true
  resistive_heaters: true
  oil_boilers: false
  biomass_boiler: true
  chp: true
  micro_chp: false
  solar_thermal: true
  solar_cf_correction: 0.788457  # =  >>> 1/1.2683
  marginal_cost_storage: 0. #1e-4
  methanation: true
  coal_cc: false
  dac: true
  co2_vent: false
  central_heat_vent: false
  allam_cycle: false
  hydrogen_fuel_cell: true
  hydrogen_turbine: false
  SMR: true
  SMR_cc: true
  regional_methanol_demand: false
  regional_oil_demand: false
  regional_co2_sequestration_potential:
    enable: false
    attribute: 'conservative estimate Mt'
    include_onshore: false
    min_size: 3
    max_size: 25
    years_of_storage: 25
  co2_sequestration_potential: 200
  co2_sequestration_cost: 10
  co2_sequestration_lifetime: 50
  co2_spatial: false
  co2network: false
  co2_network_cost_factor: 1
  cc_fraction: 0.9
  hydrogen_underground_storage: true
  hydrogen_underground_storage_locations:
    # - onshore  # more than 50 km from sea
  - nearshore    # within 50 km of sea
    # - offshore
  ammonia: false
  min_part_load_fischer_tropsch: 0.7
  min_part_load_methanolisation: 0.3
  min_part_load_methanation: 0.3
  use_fischer_tropsch_waste_heat: true
  use_haber_bosch_waste_heat: true
  use_methanolisation_waste_heat: true
  use_methanation_waste_heat: true
  use_fuel_cell_waste_heat: true
  use_electrolysis_waste_heat: true
  electricity_distribution_grid: true
  electricity_distribution_grid_cost_factor: 1.0
  electricity_grid_connection: true
  transmission_efficiency:
    DC:
      efficiency_static: 0.98
      efficiency_per_1000km: 0.977
    H2 pipeline:
      efficiency_per_1000km: 1 # 0.979
      compression_per_1000km: 0.019
    gas pipeline:
      efficiency_per_1000km: 1 #0.977
      compression_per_1000km: 0.01
  H2_network: true
  gas_network: false
  H2_retrofit: false
  H2_retrofit_capacity_per_CH4: 0.6
  gas_network_connectivity_upgrade: 1
  gas_distribution_grid: true
  gas_distribution_grid_cost_factor: 1.0
  biomass_spatial: false
  biomass_transport: false
  biogas_upgrading_cc: false
  conventional_generation:
    OCGT: gas
  biomass_to_liquid: false
  biosng: false
  limit_max_growth:
    enable: false
    # allowing 30% larger than max historic growth
    factor: 1.3
    max_growth:  # unit GW
      onwind: 16 # onshore max grow so far 16 GW in Europe https://www.iea.org/reports/renewables-2020/wind
      solar: 28 # solar max grow so far 28 GW in Europe https://www.iea.org/reports/renewables-2020/solar-pv
      offwind-ac: 35 # offshore max grow so far 3.5 GW in Europe https://windeurope.org/about-wind/statistics/offshore/european-offshore-wind-industry-key-trends-statistics-2019/
      offwind-dc: 35
    max_relative_growth:
      onwind: 3
      solar: 3
      offwind-ac: 3
      offwind-dc: 3

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
industry:
  St_primary_fraction:
    2020: 0.6
    2025: 0.55
    2030: 0.5
    2035: 0.45
    2040: 0.4
    2045: 0.35
    2050: 0.3
  DRI_fraction:
    2020: 0
    2025: 0
    2030: 0.05
    2035: 0.2
    2040: 0.4
    2045: 0.7
    2050: 1
  H2_DRI: 1.7
  elec_DRI: 0.322
  Al_primary_fraction:
    2020: 0.4
    2025: 0.375
    2030: 0.35
    2035: 0.325
    2040: 0.3
    2045: 0.25
    2050: 0.2
  MWh_NH3_per_tNH3: 5.166
  MWh_CH4_per_tNH3_SMR: 10.8
  MWh_elec_per_tNH3_SMR: 0.7
  MWh_H2_per_tNH3_electrolysis: 5.93
  MWh_elec_per_tNH3_electrolysis: 0.2473
  MWh_NH3_per_MWh_H2_cracker: 1.46 # https://github.com/euronion/trace/blob/44a5ff8401762edbef80eff9cfe5a47c8d3c8be4/data/efficiencies.csv
  NH3_process_emissions: 24.5
  petrochemical_process_emissions: 25.5
  HVC_primary_fraction: 1.
  HVC_mechanical_recycling_fraction: 0.
  HVC_chemical_recycling_fraction: 0.
  HVC_production_today: 52.
  MWh_elec_per_tHVC_mechanical_recycling: 0.547
  MWh_elec_per_tHVC_chemical_recycling: 6.9
  chlorine_production_today: 9.58
  MWh_elec_per_tCl: 3.6
  MWh_H2_per_tCl: -0.9372
  methanol_production_today: 1.5
  MWh_elec_per_tMeOH: 0.167
  MWh_CH4_per_tMeOH: 10.25
  hotmaps_locate_missing: false
  reference_year: 2015


# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs
costs:
  year: 2030
  version: v0.6.2
  rooftop_share: 0.14  # based on the potentials, assuming  (0.1 kW/m2 and 10 m2/person)
  social_discountrate: 0.02
  fill_values:
    FOM: 0
    VOM: 0
    efficiency: 1
    fuel: 0
    investment: 0
    lifetime: 25
    "CO2 intensity": 0
    "discount rate": 0.07
  # Marginal and capital costs can be overwritten
  # capital_cost:
  #   onwind: 500
  marginal_cost:
    solar: 0.01
    onwind: 0.015
    offwind: 0.015
    hydro: 0.
    H2: 0.
    electrolysis: 0.
    fuel cell: 0.
    battery: 0.
    battery inverter: 0.
  emission_prices:
    enable: false
    co2: 0.
    co2_monthly_prices: false

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#clustering
clustering:
  focus_weights: false
  simplify_network:
    to_substations: false
    algorithm: kmeans # choose from: [hac, kmeans]
    feature: solar+onwind-time
    exclude_carriers: []
    remove_stubs: true
    remove_stubs_across_borders: true
  cluster_network:
    algorithm: kmeans
    feature: solar+onwind-time
    exclude_carriers: []
    consider_efficiency_classes: false
  aggregation_strategies:
    generators:
      committable: any
      ramp_limit_up: max
      ramp_limit_down: max

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#solving
solving:
  #tmpdir: "path/to/tmp"
  options:
    clip_p_max_pu: 1.e-2
    load_shedding: false
    noisy_costs: true
    skip_iterations: true
    rolling_horizon: false
    seed: 123
    custom_extra_functionality: "../data/custom_extra_functionality.py"
    # options that go into the optimize function
    track_iterations: false
    min_iterations: 4
    max_iterations: 6
    transmission_losses: 2
    linearized_unit_commitment: true
    horizon: 365

  constraints:
    CCL: false
    EQ: false
    BAU: false
    SAFE: false

  solver:
    name: gurobi
    options: gurobi-default

  solver_options:
    highs-default:
      # refer to https://ergo-code.github.io/HiGHS/options/definitions.html#solver
      threads: 4
      solver: "ipm"
      run_crossover: "off"
      small_matrix_value: 1e-6
      large_matrix_value: 1e9
      primal_feasibility_tolerance: 1e-5
      dual_feasibility_tolerance: 1e-5
      ipm_optimality_tolerance: 1e-4
      parallel: "on"
      random_seed: 123
    gurobi-default:
      threads: 4
      method: 2 # barrier
      crossover: 0
      BarConvTol: 1.e-6
      Seed: 123
      AggFill: 0
      PreDual: 0
      GURO_PAR_BARDENSETHRESH: 200
    gurobi-numeric-focus:
      name: gurobi
      NumericFocus: 3       # Favour numeric stability over speed
      method: 2             # barrier
      crossover: 0          # do not use crossover
      BarHomogeneous: 1     # Use homogeneous barrier if standard does not converge
      BarConvTol: 1.e-5
      FeasibilityTol: 1.e-4
      OptimalityTol: 1.e-4
      ObjScale: -0.5
      threads: 8
      Seed: 123
    gurobi-fallback:        # Use gurobi defaults
      name: gurobi
      crossover: 0
      method: 2             # barrier
      BarHomogeneous: 1     # Use homogeneous barrier if standard does not converge
      BarConvTol: 1.e-5
      FeasibilityTol: 1.e-5
      OptimalityTol: 1.e-5
      Seed: 123
      threads: 8
    cplex-default:
      threads: 4
      lpmethod: 4 # barrier
      solutiontype: 2 # non basic solution, ie no crossover
      barrier.convergetol: 1.e-5
      feasopt.tolerance: 1.e-6
    copt-default:
      Threads: 8
      LpMethod: 2
      Crossover: 0
    cbc-default: {} # Used in CI
    glpk-default: {} # Used in CI

  mem: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2
  walltime: "12:00:00"

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#plotting
plotting:
  map:
    boundaries: [-11, 30, 34, 71]
    color_geomap:
      ocean: white
      land: white
  eu_node_location:
    x: -5.5
    y: 46.
  costs_max: 1000
  costs_threshold: 1
  energy_max: 20000
  energy_min: -20000
  energy_threshold: 50.

  nice_names:
    OCGT: "Open-Cycle Gas"
    CCGT: "Combined-Cycle Gas"
    offwind-ac: "Offshore Wind (AC)"
    offwind-dc: "Offshore Wind (DC)"
    onwind: "Onshore Wind"
    solar: "Solar"
    PHS: "Pumped Hydro Storage"
    hydro: "Reservoir & Dam"
    battery: "Battery Storage"
    H2: "Hydrogen Storage"
    lines: "Transmission Lines"
    ror: "Run of River"
    load: "Load Shedding"
    ac: "AC"
    dc: "DC"

I need to come up with a base.nc network with only one country, such as 'IT'. However, when I execute 'python3 base_network.py' I am getting the following error:

ERROR:root:Uncaught exception
Traceback (most recent call last):
  File "/root/pypsa-eur/scripts/base_network.py", line 766, in <module>
    n = base_network(
        ^^^^^^^^^^^^^
  File "/root/pypsa-eur/scripts/base_network.py", line 748, in base_network
    _set_countries_and_substations(n, config, country_shapes, offshore_shapes)
  File "/root/pypsa-eur/scripts/base_network.py", line 589, in _set_countries_and_substations
    assert (
AssertionError: No buses with defined country within 200km of bus `8838`

Any idea of what is going wrong here? I am not getting the same error when I put every country in the list countries of config.yaml file.

0

There are 0 best solutions below