Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
ddd167af
Commit
ddd167af
authored
9 months ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
1d964986
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/contrail/util.py
+16
-1
16 additions, 1 deletion
modules/contrail/util.py
with
16 additions
and
1 deletion
modules/contrail/util.py
+
16
−
1
View file @
ddd167af
...
@@ -13,6 +13,9 @@ from util.util import get_grid_values_all
...
@@ -13,6 +13,9 @@ from util.util import get_grid_values_all
from
util.gfs_reader
import
*
from
util.gfs_reader
import
*
from
util.geos_nav
import
GEOSNavigation
from
util.geos_nav
import
GEOSNavigation
from
aeolus.datasource
import
GFSfiles
from
aeolus.datasource
import
GFSfiles
import
cartopy.crs
as
ccrs
from
metpy.calc
import
shearing_deformation
,
static_stability
from
metpy.units
import
units
gfs_files
=
GFSfiles
(
'
/Users/tomrink/data/contrail/gfs/
'
)
gfs_files
=
GFSfiles
(
'
/Users/tomrink/data/contrail/gfs/
'
)
# GEOSNavigation needs to be updated to support GOES-18
# GEOSNavigation needs to be updated to support GOES-18
...
@@ -93,7 +96,19 @@ def extract(mask_image, image_ts, clavrx_path):
...
@@ -93,7 +96,19 @@ def extract(mask_image, image_ts, clavrx_path):
lon_range
=
[
np
.
min
(
contrail_lons
),
np
.
max
(
contrail_lons
)]
lon_range
=
[
np
.
min
(
contrail_lons
),
np
.
max
(
contrail_lons
)]
lat_range
=
[
np
.
min
(
contrail_lats
),
np
.
max
(
contrail_lats
)]
lat_range
=
[
np
.
min
(
contrail_lats
),
np
.
max
(
contrail_lats
)]
wind_3d
=
get_volume
(
xr_dataset
,
[
'
u-wind
'
,
'
v-wind
'
],
lon_range
=
[
lon_range
[
0
],
lon_range
[
1
]],
lat_range
=
[
lat_range
[
0
],
lat_range
[
1
]])
uwind_3d
=
get_volume
(
xr_dataset
,
'
u-wind
'
,
'
m s-1
'
,
lon_range
=
[
lon_range
[
0
],
lon_range
[
1
]],
lat_range
=
[
lat_range
[
0
],
lat_range
[
1
]])
vwind_3d
=
get_volume
(
xr_dataset
,
'
v-wind
'
,
'
m s-1
'
,
lon_range
=
[
lon_range
[
0
],
lon_range
[
1
]],
lat_range
=
[
lat_range
[
0
],
lat_range
[
1
]])
temp_3d
=
get_volume
(
xr_dataset
,
'
temperature
'
,
'
degK
'
,
lon_range
=
[
lon_range
[
0
],
lon_range
[
1
]],
lat_range
=
[
lat_range
[
0
],
lat_range
[
1
]])
uwind_3d
=
uwind_3d
.
transpose
(
'
Pressure
'
,
'
Latitude
'
,
'
Longitude
'
)
vwind_3d
=
vwind_3d
.
transpose
(
'
Pressure
'
,
'
Latitude
'
,
'
Longitude
'
)
temp_3d
=
temp_3d
.
transpose
(
'
Pressure
'
,
'
Latitude
'
,
'
Longitude
'
)
# uwind_2d = get_horz_layer(xr_dataset, 'u-wind', 500.0, lon_range=[lon_range[0], lon_range[1]], lat_range=[lat_range[0], lat_range[1]])
# vwind_2d = get_horz_layer(xr_dataset, 'v-wind', 500.0, lon_range=[lon_range[0], lon_range[1]], lat_range=[lat_range[0], lat_range[1]])
# shear_2d = shearing_deformation(uwind_2d, vwind_2d)
shear_3d
=
shearing_deformation
(
uwind_3d
,
vwind_3d
)
static_3d
=
static_stability
(
temp_3d
.
coords
[
'
Pressure
'
]
*
units
.
hPa
,
temp_3d
)
xr_dataset
.
close
()
xr_dataset
.
close
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment