Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111301163
check_file.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Apr 30, 16:01
Size
588 B
Mime Type
text/x-python
Expires
Fri, May 2, 16:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25905007
Attached To
R8800 solar_potential
check_file.py
View Options
import
xarray
as
xr
import
sys
import
os
fileDir
=
sys
.
argv
[
1
]
for
fp
in
os
.
listdir
(
fileDir
):
if
'pv_potential'
not
in
fp
:
continue
try
:
print
(
fp
)
outfile
=
xr
.
open_dataset
(
os
.
path
.
join
(
fileDir
,
fp
))
except
:
print
(
'Cannot open
%s
'
%
fp
)
continue
if
outfile
.
pv_potential
.
sum
()
>
0
:
continue
print
(
'ERROR in
%s
'
%
fp
)
outfile
.
close
()
fileID
=
fp
.
split
(
'_'
)[
-
1
]
infile
=
fileDir
+
'/tilted_irrad_'
+
fileID
os
.
system
(
'python compute_PV_output_batch.py
%s
%s
'
%
(
infile
,
os
.
path
.
join
(
fileDir
,
fp
)))
Event Timeline
Log In to Comment