Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CloudSat Calipso Heating Rates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Climate
CloudSat Calipso Heating Rates
Commits
dcfe1245
Commit
dcfe1245
authored
1 year ago
by
Aiko Voigt
Browse files
Options
Downloads
Patches
Plain Diff
Corrects path and corrects definition of height axis values in postprocessing step
parent
5d99bcc8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
make_binned_heating.py
+1
-2
1 addition, 2 deletions
make_binned_heating.py
postprocess_binned_heating.py
+4
-5
4 additions, 5 deletions
postprocess_binned_heating.py
with
5 additions
and
7 deletions
make_binned_heating.py
+
1
−
2
View file @
dcfe1245
...
...
@@ -3,7 +3,6 @@
#
# on IMG JET call with /jetfs/home/avoigt/micromamba/envs/cloudsat-calipso/bin/python3.12 make_binned_heating.py
import
rioxarray
as
rxr
import
xarray
as
xr
import
numpy
as
np
import
pandas
as
pd
...
...
@@ -112,4 +111,4 @@ for year in ["2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "20
da_hr_allsky_lw
=
xr
.
DataArray
(
hr_allsky
[:,
1
],
name
=
"
HR_allsky_lw
"
,
dims
=
(
"
pentad
"
,
"
height
"
,
"
lat
"
,
"
lon
"
,),
coords
=
{
"
pentad
"
:
pents
,
"
height
"
:
np
.
arange
(
0
,
125
),
"
lat
"
:
lats
,
"
lon
"
:
lons
})
da_hr_clrsky_sw
=
xr
.
DataArray
(
hr_clrsky
[:,
0
],
name
=
"
HR_clrsky_sw
"
,
dims
=
(
"
pentad
"
,
"
height
"
,
"
lat
"
,
"
lon
"
,),
coords
=
{
"
pentad
"
:
pents
,
"
height
"
:
np
.
arange
(
0
,
125
),
"
lat
"
:
lats
,
"
lon
"
:
lons
})
da_hr_clrsky_lw
=
xr
.
DataArray
(
hr_clrsky
[:,
1
],
name
=
"
HR_clrsky_lw
"
,
dims
=
(
"
pentad
"
,
"
height
"
,
"
lat
"
,
"
lon
"
,),
coords
=
{
"
pentad
"
:
pents
,
"
height
"
:
np
.
arange
(
0
,
125
),
"
lat
"
:
lats
,
"
lon
"
:
lons
})
xr
.
merge
([
da_hr_allsky_sw
,
da_hr_allsky_lw
,
da_hr_clrsky_sw
,
da_hr_clrsky_lw
]).
to_netcdf
(
"
2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.
"
+
year
+
"
.nc
"
)
xr
.
merge
([
da_hr_allsky_sw
,
da_hr_allsky_lw
,
da_hr_clrsky_sw
,
da_hr_clrsky_lw
]).
to_netcdf
(
"
/jetfs/scratch/avoigt/CLOUDSAT/
2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.
"
+
year
+
"
.nc
"
)
This diff is collapsed.
Click to expand it.
postprocess_binned_heating.py
+
4
−
5
View file @
dcfe1245
...
...
@@ -20,10 +20,10 @@ height = core.read_height(file)["HGT"].mean("y")
ds_list
=
list
()
for
year
in
[
"
2006
"
,
"
2007
"
,
"
2008
"
,
"
2009
"
,
"
2010
"
,
"
2011
"
,
"
2012
"
,
"
2013
"
,
"
2014
"
,
"
2015
"
,
"
2016
"
,
"
2017
"
]:
ds
=
xr
.
open_dataset
(
"
/jetfs/
home
/avoigt/
cloudsat-calipso-heating-rates
/2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.
"
+
year
+
"
.nc
"
)
ds
=
xr
.
open_dataset
(
"
/jetfs/
scratch
/avoigt/
CLOUDSAT
/2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.
"
+
year
+
"
.nc
"
,
chunks
=
"
auto
"
)
time
=
np
.
arange
(
year
+
"
-01-03
"
,
year
+
"
-12-31
"
,
5
,
dtype
=
'
datetime64[D]
'
)
ds
=
ds
.
rename
({
"
pentad
"
:
"
time
"
}).
assign_coords
({
"
time
"
:
time
})
ds
=
ds
.
assign_coords
({
"
height
"
:
height
})
ds
=
ds
.
assign_coords
({
"
height
"
:
height
.
values
})
ds
=
ds
.
assign_attrs
({
"
Data
"
:
"
Atmospheric radiative heating rates based on 2B-FLXHR-LIDAR.P2_R05
"
})
ds
=
ds
.
assign_attrs
({
"
Data producer
"
:
"
Aiko Voigt, Dept of Meteorology and Geophysics, University of Vienna
"
})
ds
=
ds
.
assign_attrs
({
"
Time
"
:
"
Data generated on April 5, 2024
"
})
...
...
@@ -32,11 +32,10 @@ for year in ["2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "20
"
Data on the same height bins are averaged together.
"
\
"
The height of the heights bins is defined as the mean height along a sample granule.
"
ds
=
ds
.
assign_attrs
({
"
Note on height coordinate
"
:
text
})
ds
=
ds
.
drop_vars
(
"
xfull
"
)
ds_list
.
append
(
ds
)
del
ds
# merge into one dataset and save to netcdf
ds_merged
=
xr
.
merge
(
ds_list
)
ds_merged
.
to_netcdf
(
"
2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.2006-2017.nc
"
)
ds_merged
=
xr
.
concat
(
ds_list
,
"
time
"
)
ds_merged
.
to_netcdf
(
"
/jetfs/scratch/avoigt/CLOUDSAT/
2B-FLXHR-LIDAR.P2_R05.heatingrates_binned.2006-2017.nc
"
)
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