Mit der Spatial Analyst-Lizenz verfügbar.
Zusammenfassung
Defines a multiple day time period within a given year to perform solar calculations. A year, start day, and end day are specified.
Auswertung
This object can be used in the following tools: Area Solar Radiation, Points Solar Radiation, and Solar Radiation Graphics.
For multi-day time configurations, the maximum range of days is a total of one year (365 days, or 366 days for leap years). If the startDay is greater than the endDay, the time calculations will proceed into the following year. For example, [startDay, endDay] = [365, 31], represents December 31 to January 31 of the following year. In the example of [1, 2], the time is inclusive for the first day from 0:00 hours (January 1) to 0:00 (January 2). The startDay and endDay cannot be equal.
Specify the startDay, year, and endDay for a year interval. When the endDay is smaller than the startDay, the endDay is considered to be in the following year. This is the default time configuration.
Syntax
TimeMultipleDays ({year}, {startDay}, {endDay})
Parameter | Erklärung | Datentyp |
year | The Julian year. (Der Standardwert ist the current Julian year) | Long |
startDay | The startDay is the first Julian day in the analysis. (Der Standardwert ist 5, which is January 5th) | Long |
endDay | The endDay is the last Julian day in the analysis. (Der Standardwert ist 160, which is June 9th or 10th, depending if the year is a leap year) | Long |
Eigenschaften
Eigenschaft | Erklärung | Datentyp |
year (Lesen und schreiben) | The Julian year. | Long |
startDay (Lesen und schreiben) | The startDay is the first Julian day in the analysis. | Long |
endDay (Lesen und schreiben) | The endDay is the last Julian day in the analysis. | Long |
Codebeispiel
Demonstrates how to create a TimeMultipleDays class and use it in the AreaSolarRadiation tool within the Python window.
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myTimeMultiDay = TimeMultipleDays(1980, 216, 244)
outAreaSolar = AreaSolarRadiation("solar_dem", "", "", myTimeMultiDay)
outAreaSolar.save("C:/temp/solarouttmd")
Calculates the incoming solar radiation with the AreaSolarRadiation tool using the TimeMultipleDays class.
# Name: TimeMultipleDays_Ex_02.py
# Description: Execute AreaSolarRadiation using the TimeMultipleDays object.
# Requirements: Spatial Analyst Extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/sapyexamples/data"
# Set local variables
inRaster = "solar_dem"
# Create TimeMultipleDays Object
year = 2004
startDay = 5
endDay = 6
myTimeMultiDay = TimeMultipleDays(year, startDay, endDay)
# Execute AreaSolarRadiation using TimeMultipleDays Object
outAreaSolar = AreaSolarRadiation(inRaster, "", 200, myTimeMultiDay, 14, 0.5,
"NOINTERVAL", 1, "FROM_DEM", 32, 8, 8,
"UNIFORM_SKY", 0.3, 0.5)
# Save the output
outAreaSolar.save("C:/sapyexamples/output/areasolartmd2")