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
Ray Garcia
himawari
Commits
e1f90751
Commit
e1f90751
authored
Aug 04, 2017
by
R.K.Garcia
Browse files
cleanup __init__
parent
bfc6916c
Changes
1
Hide whitespace changes
Inline
Side-by-side
himawari/pug_cmip_pvda.py
View file @
e1f90751
...
...
@@ -36,7 +36,7 @@ class HimawariAHIasCMIP(object):
path
=
None
_hs
=
None
# HimawariScene object
_as_radiances
=
False
# whether ot use bt/refl or rad
_data_name
=
False
_data_name
=
DEFAULT_CMIP_NAME
_projection_name
=
DEFAULT_CMIP_PROJECTION_NAME
_when
=
None
...
...
@@ -53,10 +53,20 @@ class HimawariAHIasCMIP(object):
return
OrderedDict
((
k
,
D
[
k
])
for
k
in
dimnames
)
def
__init__
(
self
,
path
,
as_radiances
=
False
,
data_name
=
None
):
"""
Create a CMIP-compatibility file structure generator around HSD or HCAST data
:param path: partial or full common path of HSD or HCAST file/s to read
:param as_radiances: whether to return radiances or bt/refl
:param data_name: name of data variable to return, None for default CMI name, True for "bt"/"refl"/"rad"
"""
self
.
path
=
path
self
.
_hs
=
HimawariScene
(
path
)
self
.
_as_radiances
=
as_radiances
self
.
_data_name
=
data_name
or
(
self
.
bt_or_refl
if
not
as_radiances
else
'rad'
)
if
data_name
is
True
:
data_name
=
'rad'
if
as_radiances
else
self
.
bt_or_refl
if
not
data_name
:
data_name
=
DEFAULT_CMIP_NAME
self
.
_data_name
=
data_name
self
.
_when
=
datetime
.
utcnow
()
@
property
...
...
@@ -71,6 +81,10 @@ class HimawariAHIasCMIP(object):
data_kind
=
'Radiances'
return
'Himawari '
+
data_kind
@
property
def
short_name
(
self
):
return
self
.
_data_name
@
property
def
standard_name
(
self
):
if
not
self
.
_as_radiances
:
...
...
Write
Preview
Markdown
is supported
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