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
4e419284
Commit
4e419284
authored
Jan 14, 2022
by
Antoine Berchet
Browse files
CAMS working for interpolation
parent
8d625035
Changes
3
Show whitespace changes
Inline
Side-by-side
pycif/plugins/datastreams/fields/netcdf_cams/__init__.py
View file @
4e419284
...
...
@@ -15,8 +15,9 @@ _fullname = "CAMS netcdf files"
input_arguments
=
{
"aibi_name"
:
{
"doc"
:
"to choose ai bi vertical coordinate names"
" instead of hyam and hybm"
,
"doc"
:
"To choose ai/bi vertical coordinate names"
" instead of hyam and hybm; this depends on the version of the CAMS "
"product to be read"
,
"default"
:
False
,
"accepted"
:
bool
},
...
...
pycif/plugins/datastreams/fields/netcdf_cams/get_domain.py
View file @
4e419284
...
...
@@ -6,6 +6,7 @@ import xarray as xr
from
.....utils.classes.setup
import
Setup
import
copy
def
get_domain
(
ref_dir
,
ref_file
,
input_dates
,
target_dir
,
tracer
=
None
):
# Looking for a reference file to read lon/lat in
...
...
@@ -67,6 +68,7 @@ def get_domain(ref_dir, ref_file, input_dates, target_dir, tracer=None):
else
:
sigma_a
=
nc
[
"hyam"
].
values
sigma_b
=
nc
[
"hybm"
].
values
nlevs
=
sigma_a
.
size
# Initializes domain
...
...
pycif/plugins/datastreams/fields/netcdf_cams/read.py
View file @
4e419284
...
...
@@ -59,10 +59,10 @@ def read(
lat
=
ds
[
'latitude'
]
conc
=
ds
[
var2extract
].
values
[
date_index
]
if
lat
[
1
]
<
lat
[
0
]
and
conc
.
ndim
==
4
:
if
lat
[
1
]
<
lat
[
0
]
and
conc
.
ndim
==
4
:
conc
=
conc
[:,
:,
::
-
1
,
:]
elif
lat
[
1
]
<
lat
[
0
]
and
conc
.
ndim
==
3
:
conc
=
conc
[
:,
::
-
1
,
:]
elif
lat
[
1
]
<
lat
[
0
]
and
conc
.
ndim
==
3
:
conc
=
conc
[:,
::
-
1
,
:]
xout
.
append
(
conc
)
...
...
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