parser.add_argument("--output",nargs="?",type=str,help="output type (print/JSON) ");
parser.add_argument("--save_sum",action='store_true',help="If True, sum of potential output will be saved for all grid cells in outfile+_sum.npy. False by default. ");
parser.set_defaults(save_sum=False)

args = parser.parse_args();

server = args.server[0];
port = args.port
username = args.username;
password = args.password;
cutoutname = args.cutoutname[0];
cutoutuser = args.cutoutuser
conversion_name = args.name;
save_sum = args.save_sum

panelconf = reatlas_client.solarpanelconf_to_solar_panel_config_object(args.panelconf[0]);
orientationconf = args.orientationconf[0];
capacitylayouts = args.capacitylayout;
output = args.output

if (username == None):
     username = raw_input("username: "******"password: ");

try:
    if (port != None):
         atlas = reatlas_client.REatlas(server,port);
    else:
         atlas = reatlas_client.REatlas(server);
示例#2
0
atlas.delete_file(filename="combinedresult.npy")
atlas.delete_file(filename="onshoreresult.npy")
atlas.delete_file(filename="myresult.npy")
atlas.delete_file(filename="layout.npy")


# Exercice 3:

print("")
print("##################")
print("### Exercice 3 ###")
print("##################")
print("")


Scheuten = reatlas_client.solarpanelconf_to_solar_panel_config_object("SolarPanelData/Scheuten215IG.cfg")

atlas.add_constant_orientation_function(slope=45, azimuth=90, weight=0.33)
atlas.add_constant_orientation_function(slope=45, azimuth=-90, weight=0.33)
atlas.add_constant_orientation_function(slope=45, azimuth=0, weight=0.34)

atlas.select_cutout(cutoutname="Denmark", username="******")

sun_conversion = atlas.convert_and_aggregate_pv(
    result_name="PV_dist", solar_panel_config=Scheuten, capacitylayouts=["onshorelayout.npy"]
)

print("Waiting for PV conversion")
atlas.wait_for_job(job_id=sun_conversion)

atlas.download_file(filename="PV_dist.npy")