Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Woude, Auke van der
CTDAS
Commits
3a75fd36
Commit
3a75fd36
authored
Aug 19, 2020
by
Woude, Auke van der
Browse files
different time profiles for different countries
parent
5bb47dd1
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
da/ccffdas/category_info.py
View file @
3a75fd36
...
...
@@ -49,31 +49,11 @@ categories = {
'CO2.uncertainty'
:
'n'
,
'CO'
:
-
7.52
,
'CO.uncertainty'
:
'l'
},
'cars
highway
'
:
{
'name'
:
'cars
highway
'
,
'cars'
:
{
'name'
:
'cars'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_carhw'
,
'fraction_of_total'
:
0.47
,
'emission_factors'
:
36200000
,
'CO2'
:
1
,
'CO2.uncertainty'
:
'n'
,
'CO'
:
-
4.32
,
'CO.uncertainty'
:
'l'
},
'cars middle road'
:
{
'name'
:
'cars middle road'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_carmr'
,
'fraction_of_total'
:
0.28
,
'emission_factors'
:
36200000
,
'CO2'
:
1
,
'CO2.uncertainty'
:
'n'
,
'CO'
:
-
4.32
,
'CO.uncertainty'
:
'l'
},
'cars urban road'
:
{
'name'
:
'cars urban road'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_carur'
,
'fraction_of_total'
:
0.25
,
'temporal'
:
't_road'
,
'fraction_of_total'
:
1
,
'emission_factors'
:
36200000
,
'CO2'
:
1
,
'CO2.uncertainty'
:
'n'
,
...
...
@@ -82,7 +62,7 @@ categories = {
'heavy duty highway'
:
{
'name'
:
'heavy duty highway'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_
hdvhw
'
,
'temporal'
:
't_
road
'
,
'fraction_of_total'
:
0.56
,
'emission_factors'
:
36650000
,
'CO2'
:
1
,
...
...
@@ -92,7 +72,7 @@ categories = {
'heavy duty middle road'
:
{
'name'
:
'heavy duty middle road'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_
hdvmr
'
,
'temporal'
:
't_
road
'
,
'fraction_of_total'
:
0.24
,
'emission_factors'
:
36650000
,
'CO2'
:
1
,
...
...
@@ -102,7 +82,7 @@ categories = {
'heavy duty urban'
:
{
'name'
:
'heavy duty urban'
,
'model'
:
1
,
'spatial'
:
'Road transport'
,
'temporal'
:
't_
hdvur
'
,
'temporal'
:
't_
road
'
,
'fraction_of_total'
:
0.2
,
'emission_factors'
:
36650000
,
'CO2'
:
1
,
...
...
da/ccffdas/emissionmodel.py
View file @
3a75fd36
This diff is collapsed.
Click to expand it.
da/ccffdas/energy_use_country.py
View file @
3a75fd36
energy_use_per_country
=
{
'AUS'
:
{
'Public power'
:
161.01
,
'Public power ratio gas'
:
0.78
,
'Industry'
:
158.02
,
'Other stationary combustion'
:
120.04
,
'Road transport'
:
150.8
,
...
...
@@ -8,6 +9,7 @@ energy_use_per_country = {
},
'BEL'
:
{
'Public power'
:
254.82
,
'Public power ratio gas'
:
0.72
,
'Industry'
:
203.68
,
'Other stationary combustion'
:
383.16
,
'Road transport'
:
172.455
,
...
...
@@ -15,12 +17,14 @@ energy_use_per_country = {
},
'CZE'
:
{
'Public power'
:
582.9
,
'Public power ratio gas'
:
0.10
,
'Industry'
:
140.13
,
'Other stationary combustion'
:
178.46
,
'Road transport'
:
121.935
,
'Shipping'
:
0.17
},
'FRA'
:
{
'Public power'
:
585.52
,
'Public power ratio gas'
:
0.56
,
'Industry'
:
731.9
,
'Other stationary combustion'
:
1262.1
,
'Road transport'
:
845.07
,
...
...
@@ -28,6 +32,7 @@ energy_use_per_country = {
},
'DEU'
:
{
'Public power'
:
3515.68
,
'Public power ratio gas'
:
0.19
,
'Industry'
:
1516.34
,
'Other stationary combustion'
:
2069.16
,
'Road transport'
:
1066.98
,
...
...
@@ -35,6 +40,7 @@ energy_use_per_country = {
},
'LUX'
:
{
'Public power'
:
3.75
,
'Public power ratio gas'
:
0.99
,
'Industry'
:
15.23
,
'Other stationary combustion'
:
25.22
,
'Road transport'
:
37.045
,
...
...
@@ -42,6 +48,7 @@ energy_use_per_country = {
},
'NED'
:
{
'Public power'
:
868.96
,
'Public power ratio gas'
:
0.47
,
'Industry'
:
427.43
,
'Other stationary combustion'
:
599.52
,
'Road transport'
:
199.74
,
...
...
@@ -49,6 +56,7 @@ energy_use_per_country = {
},
'POL'
:
{
'Public power'
:
1702.42
,
'Public power ratio gas'
:
0.05
,
'Industry'
:
338.92
,
'Other stationary combustion'
:
618.77
,
'Road transport'
:
362.94
,
...
...
@@ -56,6 +64,7 @@ energy_use_per_country = {
},
'CHE'
:
{
'Public power'
:
43.41
,
'Public power ratio gas'
:
0.53
,
'Industry'
:
66.5
,
'Other stationary combustion'
:
194.77
,
'Road transport'
:
100.28
,
...
...
@@ -63,6 +72,7 @@ energy_use_per_country = {
},
'GBR'
:
{
'Public power'
:
1716.77
,
'Public power ratio gas'
:
0.76
,
'Industry'
:
620.58
,
'Other stationary combustion'
:
1485.23
,
'Road transport'
:
787.845
,
...
...
da/ccffdas/observationoperator.py
View file @
3a75fd36
...
...
@@ -207,10 +207,11 @@ class STILTObservationOperator(ObservationOperator):
self
.
paramdict
=
rc
.
read
(
dacycle
.
dasystem
[
'paramdict'
])
self
.
pftfile
=
dacycle
.
dasystem
[
'file.pft'
]
with
rasterio
.
Env
(
logging
.
getLogger
().
setLevel
(
logging
.
DEBUG
)):
with
rasterio
.
Env
(
logging
.
getLogger
().
setLevel
(
logging
.
INFO
)):
with
rasterio
.
open
(
self
.
pftfile
)
as
dataset
:
self
.
pft_shape_orig
=
dataset
.
read
().
shape
[
-
2
:]
logging
.
getLogger
().
setLevel
(
logging
.
DEBUG
)
self
.
lon_start
=
float
(
dacycle
.
dasystem
[
'domain.lon.start'
])
self
.
lon_end
=
float
(
dacycle
.
dasystem
[
'domain.lon.end'
])
self
.
lat_start
=
float
(
dacycle
.
dasystem
[
'domain.lat.start'
])
...
...
@@ -353,11 +354,12 @@ class STILTObservationOperator(ObservationOperator):
for
i
in
range
(
2
)])
logging
.
debug
(
'Shape for paint-by-number: {}'
.
format
(
new_shape
))
with
rasterio
.
Env
(
logging
.
getLogger
().
setLevel
(
logging
.
DEBUG
)):
with
rasterio
.
Env
(
logging
.
getLogger
().
setLevel
(
logging
.
INFO
)):
with
rasterio
.
open
(
self
.
pftfile
)
as
dataset
:
pftdata
=
dataset
.
read
(
out_shape
=
new_shape
,
resampling
=
Resampling
.
mode
)
pftdata
=
pftdata
.
reshape
(
pftdata
.
shape
[
1
:])
logging
.
getLogger
().
setLevel
(
logging
.
DEBUG
)
scaling_factors
=
np
.
array
(
np
.
array
(
new_shape
)
/
np
.
array
(
self
.
lu_pref
[
0
].
shape
),
dtype
=
int
)
...
...
@@ -388,7 +390,9 @@ class STILTObservationOperator(ObservationOperator):
for
mem
,
values
in
enumerate
(
all_param_values
):
param_values
=
all_param_values
[
mem
]
index_in_state
=
find_in_state
(
param_values
,
'BIO'
,
str
(
lutype
),
return_index
=
True
)
if
index_in_state
:
param_value
=
param_values
[
index_in_state
]
if
index_in_state
:
param_value
=
param_values
[
index_in_state
]
print
(
param_value
)
else
:
param_value
=
1
nee_lut_mem
=
(
nee_lut
.
sum
(
axis
=
0
)
*
mask
)
*
param_value
nee_lut_mem_scaled
=
average2d
(
nee_lut_mem
,
domain_shape
)
...
...
da/ccffdas/stilt-ops_urbanall.rc
View file @
3a75fd36
...
...
@@ -17,16 +17,17 @@ do.c14integrated: 0
do.c14targeted: 0
obs.spec.name : CO2
! number of emission categories defined in the emission model
obs.cat.nr : 1
4
obs.cat.nr : 1
2
! For Rdam obs
obs.sites.rc : ${datadir}/sites_weights2.rc
! number of parameters
! In the covmatrix and statevector, the ff parameters are first, then the bio parameters!
nffparameters : 24
nbioparameters :
6
nbioparameters :
8
nparameters : ${nffparameters} + ${nbioparameters}
file.pft : /projects/0/ctdas/RINGO/inversions/Data/SiBPFTs.nc
file.pft : ${datadir}/SiBPFTs.nc
file.timeprofs : ${datadir}/CAMS_TEMPO_Tprof_subset.nc
! Settings for the domain:
domain.lon.start : -5.95
...
...
@@ -36,7 +37,7 @@ domain.lat.end : 54.975
domain.lon.num : 260
domain.lat.num : 240
paramdict : ${datadir}/paramdict.rc
paramdict : ${datadir}/paramdict
_sib
.rc
! set fixed seed for random number generator, or use 0 if you want to use any random seed
random.seed : 4385
!file with prior estimate of scaling factors (statevector) and covariances
...
...
develop.rc.easy
View file @
3a75fd36
...
...
@@ -28,7 +28,7 @@
!
! The time for which to start and end the data assimilation experiment in format YYYY-MM-DD HH:MM:SS
time.start : 2016-01-0
4
00:00:00
time.start : 2016-01-0
6
00:00:00
time.finish : 2016-01-20 00:00:00
time.fxstart : 2016-01-01 00:00:00
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment