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
0596f010
Commit
0596f010
authored
Sep 13, 2021
by
Antoine Berchet
Browse files
t push origin deveMerge branch 'devel' of gitlab.in2p3.fr:satinv/cif into devel
parents
2325a02c
d4c25a8f
Changes
5
Hide whitespace changes
Inline
Side-by-side
examples/flexpart/config_adjtltest_ref_flexpart.yml
View file @
0596f010
...
...
@@ -89,8 +89,6 @@ datavect:
dir_obs
:
/tmp/PYCIF_DATA_TEST//FLEXPART/CH4/TEST_INPUT/OBS/GHG/*.cn.*2012*
dump
:
true
filter_time_of_day
:
-
0
-
15
-
21
format
:
std
measerr
:
5.0
...
...
examples/flexpart/config_fwd_ref_flexpart.yml
View file @
0596f010
...
...
@@ -86,8 +86,6 @@ datavect:
dir_obs
:
/tmp/PYCIF_DATA_TEST//FLEXPART/CH4/TEST_INPUT/OBS/GHG/*.cn.*2012*
dump
:
true
filter_time_of_day
:
-
0
-
15
-
21
format
:
std
measerr
:
5.0
...
...
pycif/plugins/transforms/complex/satellites/adjoint.py
View file @
0596f010
...
...
@@ -248,7 +248,7 @@ def adjoint(
coords1
,
dims
)
dpavgs
=
xr
.
DataArray
(
np
.
diff
(
-
pavgs
,
axis
=
0
),
coords1
,
dims
)
qa0
=
sat_aks
[
"qa0"
][:,
::
-
1
].
T
drycols
=
qa0
*
0.0
# Applying aks
nbformula
=
transf
.
formula
chosenlevel
=
getattr
(
transf
,
"chosenlev"
,
0
)
...
...
@@ -268,7 +268,7 @@ def adjoint(
obs_incr
=
apply_ak_ad
(
sim_ak
,
dpavgs
.
values
,
aks
.
values
,
nbformula
,
qa0
.
values
,
chosenlevel
,
obs_incr
.
values
nbformula
,
qa0
.
values
,
chosenlevel
,
obs_incr
.
values
,
drycols
.
values
)
obs_incr
[
np
.
isnan
(
obs_incr
)]
=
0.
...
...
pycif/plugins/transforms/complex/satellites/apply_AK.py
View file @
0596f010
...
...
@@ -36,14 +36,14 @@ def apply_ak(sim_ak, dpavgs, aks, nbformula, qa0, chosenlevel, drycols):
def
apply_ak_tl
(
sim_ak_tl
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
sim_ak
sim_ak_tl
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
sim_ak
,
drycols
):
if
nbformula
==
1
or
nbformula
==
2
or
nbformula
==
4
:
y0
=
apply_ak
(
sim_ak_tl
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
)
y0
=
apply_ak
(
sim_ak_tl
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
drycols
)
elif
nbformula
==
3
:
tmp
=
sim_ak_tl
/
(
sim_ak
*
np
.
log
(
10
))
y0
=
apply_ak
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
)
y0
=
apply_ak
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
drycols
)
y0
=
y0
*
np
.
log
(
10
)
*
np
.
nansum
(
aks
*
tmp
,
axis
=
0
)
else
:
...
...
@@ -52,7 +52,7 @@ def apply_ak_tl(
return
y0
def
apply_ak_ad
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
obs_incr
):
def
apply_ak_ad
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
obs_incr
,
drycols
):
if
nbformula
==
1
:
obs_incr
=
(
dpavgs
...
...
@@ -65,7 +65,7 @@ def apply_ak_ad(sim_ak, dpavgs, aks, nbformula, qa0, chosenlevel, obs_incr):
obs_incr
=
aks
*
obs_incr
elif
nbformula
==
3
:
y0
=
apply_ak
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
)
y0
=
apply_ak
(
sim_ak
,
dpavgs
,
aks
,
nbformula
,
qa0
,
chosenlevel
,
drycols
)
y0
*=
np
.
log
(
10
)
*
obs_incr
y0
=
aks
*
y0
prof
=
sim_ak
*
np
.
log
(
10
)
...
...
pycif/plugins/transforms/complex/satellites/forward.py
View file @
0596f010
...
...
@@ -341,6 +341,7 @@ def forward(
qa0
.
values
,
chosenlevel
,
sim_ak
.
values
,
drycols
.
values
)
# Saves sim_ak for later use by adjoint
...
...
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