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
VERIFY
CIF
Commits
cbcf2ebd
Commit
cbcf2ebd
authored
May 12, 2021
by
Jean Matthieu Haussaire
Browse files
Accelerates the computation of the transport for boxes in regions
parent
72e2b37b
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycif/plugins/obsoperators/fp/obsoper.py
View file @
cbcf2ebd
...
...
@@ -210,14 +210,14 @@ def obsoper(self, inputs, mode,
# Transport for boxes in regions
hbox
=
np
.
zeros
((
n
box
*
ngrid
),
np
.
float64
)
for
n
in
range
(
ngrid
):
for
jy
in
range
(
fp_header_nest
.
numy
)
:
for
ix
in
range
(
fp_header_nest
.
numx
):
if
tracer
.
regions
[
jy
,
ix
]
>
0
:
hbox
[
n
*
nbox
+
tracer
.
regions
[
jy
,
ix
]
-
1
]
+=
\
grid_nest
[
ix
,
jy
,
n
]
hbox
=
np
.
zeros
((
n
grid
,
nbox
),
np
.
float64
)
for
jy
in
range
(
fp_header_nest
.
numy
):
for
ix
in
range
(
fp_header_nest
.
numx
):
if
tracer
.
regions
[
jy
,
ix
]
>
0
:
hbox
[:,
tracer
.
regions
[
jy
,
ix
]
-
1
]
+=
\
grid_nest
[
ix
,
jy
,
:
ngrid
]
hbox
=
hbox
.
flatten
()
# TODO: account for possible difference nested grid/inversion domain
hnest
=
grid_nest
...
...
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