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
658815b2
Commit
658815b2
authored
Aug 09, 2017
by
R.K.Garcia
Browse files
ahi2cmi fixes for HCAST
parent
07ba71bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
himawari/ahi2cmi.py
View file @
658815b2
...
...
@@ -420,6 +420,9 @@ class HimawariAHIasCMIP(object):
units
=
"km"
)
nsh
=
nav
.
distance_from_earth_center_to_satellite
-
nav
.
earth_equatorial_radius
if
nsh
<
1000.0
:
LOG
.
warning
(
'satellite height unknown, approximating with perspective_point_height'
)
nsh
=
self
.
perspective_point_height
/
1000.0
assert
(
nsh
>=
1000.0
)
yield
self
.
p
(
'nominal_satellite_height'
),
np
.
float32
(
nsh
),
{},
a
...
...
@@ -649,12 +652,15 @@ class tests(unittest.TestCase):
print
(
"%d frames"
%
n_frames
)
def
write_netcdf
(
path
,
as_radiances
=
False
):
from
goesr.rockfall
import
rename
,
nc_write
from
goesr.rockfall
import
rename
,
nc_write
,
autoscale
fnout
=
os
.
path
.
abspath
(
os
.
path
.
split
(
path
)[
-
1
]
+
'.nc'
)
lething
=
HimawariAHIasCMIP
(
path
,
as_radiances
=
as_radiances
)
varname
=
DEFAULT_CMIP_RAD_NAME
if
as_radiances
else
DEFAULT_CMIP_NAME
for
fnwrit
in
nc_write
(
rename
(
lething
.
walk
(),
autoscale
(
lething
.
walk
(),
variable_names_matching
=
{
varname
}
),
fnout
)
):
...
...
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