Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tsurata, Aki
CTDAS
Commits
820e62ba
Commit
820e62ba
authored
12 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
now works on huygens, extra import needed at top-level
parent
6383d344
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/analysis/expand_fluxes.py
+8
-8
8 additions, 8 deletions
da/analysis/expand_fluxes.py
with
8 additions
and
8 deletions
da/analysis/expand_fluxes.py
+
8
−
8
View file @
820e62ba
...
...
@@ -6,6 +6,7 @@ import os
import
getopt
from
datetime
import
datetime
,
timedelta
from
da.tools.general
import
CreateDirs
from
da.analysis.tools_country
import
countryinfo
# needed here
import
numpy
as
np
from
pylab
import
date2num
,
num2date
...
...
@@ -133,6 +134,7 @@ def SaveWeeklyAvg1x1Data(DaCycle, StateVector):
#
# if prior, do not multiply fluxes with parameters, otherwise do
#
print
gridensemble
.
shape
,
bio
.
shape
,
gridmean
.
shape
biomapped
=
bio
*
gridmean
oceanmapped
=
ocean
*
gridmean
biovarmapped
=
bio
*
gridensemble
...
...
@@ -154,6 +156,7 @@ def SaveWeeklyAvg1x1Data(DaCycle, StateVector):
savedict
[
'
count
'
]
=
next
ncf
.
AddData
(
savedict
)
print
biovarmapped
.
shape
savedict
=
ncf
.
StandardVar
(
varname
=
'
bio_flux_%s_ensemble
'
%
qual_short
)
savedict
[
'
values
'
]
=
biovarmapped
.
tolist
()
savedict
[
'
dims
'
]
=
dimdate
+
dimensemble
+
dimgrid
...
...
@@ -1063,11 +1066,11 @@ if __name__ == "__main__":
logging
.
root
.
setLevel
(
logging
.
DEBUG
)
DaCycle
=
CycleControl
(
args
=
{
'
rc
'
:
'
../../ctdas-od-gfed2-
glb6x4
-obspack-full.rc
'
})
DaCycle
=
CycleControl
(
args
=
{
'
rc
'
:
'
../../ctdas-od-gfed2-
nam1x1
-obspack-full
-gridded
.rc
'
})
DaCycle
.
Initialize
()
DaCycle
.
ParseTimes
()
DaSystem
=
CtDaSystem
(
'
../rc/carbontracker_ct09_opf.rc
'
)
DaSystem
=
CtDaSystem
(
'
../rc/carbontracker_ct09_opf
new
.rc
'
)
DaSystem
.
Initialize
()
DaCycle
.
DaSystem
=
DaSystem
...
...
@@ -1078,9 +1081,9 @@ if __name__ == "__main__":
while
DaCycle
[
'
time.end
'
]
<
DaCycle
[
'
time.finish
'
]:
savedas_1x1
=
SaveWeeklyAvg1x1Data
(
DaCycle
,
StateVector
)
#
savedas_state=SaveWeeklyAvgStateData(DaCycle, StateVector)
#
savedas_tc=SaveWeeklyAvgTCData(DaCycle, StateVector)
#
savedas_tcext=SaveWeeklyAvgExtTCData(DaCycle)
savedas_state
=
SaveWeeklyAvgStateData
(
DaCycle
,
StateVector
)
savedas_tc
=
SaveWeeklyAvgTCData
(
DaCycle
,
StateVector
)
savedas_tcext
=
SaveWeeklyAvgExtTCData
(
DaCycle
)
savedas_olson
=
SaveWeeklyAvgAggData
(
DaCycle
,
region_aggregate
=
'
olson
'
)
savedas_transcom
=
SaveWeeklyAvgAggData
(
DaCycle
,
region_aggregate
=
'
transcom
'
)
savedas_country
=
SaveWeeklyAvgAggData
(
DaCycle
,
region_aggregate
=
'
country
'
)
...
...
@@ -1095,9 +1098,6 @@ if __name__ == "__main__":
savedas_state
=
SaveTimeAvgData
(
DaCycle
,
savedas_state
,
avg
)
savedas_tc
=
SaveTimeAvgData
(
DaCycle
,
savedas_tc
,
avg
)
savedas_tcext
=
SaveTimeAvgData
(
DaCycle
,
savedas_tcext
,
avg
)
savedas_olson
=
SaveTimeAvgData
(
DaCycle
,
savedas_olson
,
avg
)
savedas_transcom
=
SaveTimeAvgData
(
DaCycle
,
savedas_transcom
,
avg
)
savedas_country
=
SaveTimeAvgData
(
DaCycle
,
savedas_country
,
avg
)
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment