Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NearRealTimeCTDAS
CTDAS
Commits
e4390285
Commit
e4390285
authored
Jun 20, 2013
by
Peters, Wouter
Browse files
minor tweaks to make files overwrite
parent
b4821281
Changes
3
Hide whitespace changes
Inline
Side-by-side
da/analysis/monthly_fluxes.py
View file @
e4390285
...
...
@@ -61,7 +61,7 @@ def monthly_avg(rundir,avg):
print
sd
,
nd
,
len
(
avg_files
)
if
len
(
avg_files
)
>
0
:
command
=
[
'ncra'
]
+
avg_files
+
[
os
.
path
.
join
(
monthdir
,
'%s_fluxes.%s.nc'
%
(
avg
,
sd
.
strftime
(
'%Y-%m'
)))]
command
=
[
'ncra'
,
'-O'
]
+
avg_files
+
[
os
.
path
.
join
(
monthdir
,
'%s_fluxes.%s.nc'
%
(
avg
,
sd
.
strftime
(
'%Y-%m'
)))]
status
=
subprocess
.
check_call
(
command
)
...
...
da/analysis/time_avg_fluxes.py
View file @
e4390285
...
...
@@ -66,5 +66,6 @@ if __name__ == "__main__":
while
dacycle
[
'time.end'
]
<
dacycle
[
'time.finish'
]:
time_avg
(
dacycle
,
avg
=
'transcom'
)
time_avg
(
dacycle
,
avg
=
'olson'
)
dacycle
.
advance_cycle_times
()
da/analysis/yearly_fluxes.py
View file @
e4390285
...
...
@@ -54,7 +54,7 @@ def yearly_avg(rundir,avg):
print
sd
,
nd
,
len
(
avg_files
)
if
len
(
avg_files
)
>
0
:
command
=
[
'ncra'
]
+
avg_files
+
[
os
.
path
.
join
(
yeardir
,
'%s_fluxes.%s.nc'
%
(
avg
,
sd
.
strftime
(
'%Y'
)))]
command
=
[
'ncra'
,
'-O'
]
+
avg_files
+
[
os
.
path
.
join
(
yeardir
,
'%s_fluxes.%s.nc'
%
(
avg
,
sd
.
strftime
(
'%Y'
)))]
status
=
subprocess
.
check_call
(
command
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment