Skip to content

Commit

Permalink
use skin temp instead of soil layer 1 plus 1K as previously (#168)
Browse files Browse the repository at this point in the history
Update dephy and kpt conversion routines to use skin temperature instead of soil layer 1 plus 1K as previously for surface temperature.

Co-authored-by: Steven Boeing <stevenboeing@localhost.localdomain>
Co-authored-by: Leif Denby <leif@denby.eu>
  • Loading branch information
3 people authored Oct 11, 2022
1 parent 59470cc commit 6ddfdb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lagtraj/domain/sources/era5/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ def _build_single_level_an_query(date, bbox, latlon_sampling):
# 187 Medium cloud cover [(0 - 1)], mcc
# 188 High cloud cover [(0 - 1)], hcc
# 198 Skin reservoir content [m of water equivalent], src
# 235 Skin temperature [K], skt
# 236 Soil temperature level 41 [K], stl4
# 238 Temperature of snow layer [K], tsn
# 243 Forecast albedo [(0 - 1)], fal
Expand All @@ -351,8 +352,8 @@ def _build_single_level_an_query(date, bbox, latlon_sampling):
"/35.128/39.128/40.128/41.128/42.128/66.128/67.128"
"/129.128/134.128/136.128/139.128/141.128/151.128/159.128"
"/160.128/161.128/162.128/163.128/164.128/170.128/172.128"
"/183.128/186.128/187.128/188.128/198.128/236.128/238.128"
"/243.128/244.128/245.128"
"/183.128/186.128/187.128/188.128/198.128/235.128/236.128"
"/238.128/243.128/244.128/245.128"
),
"stream": "oper",
"time": (
Expand Down
3 changes: 1 addition & 2 deletions lagtraj/forcings/conversion/targets/dephy.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ def unit_check(unit_guess, variable):
# Heat roughness, derive from "flsr" variable
z0th_traj = np.exp(ds_era5["flsr_mean"].values)
ds_dephy["z0th_traj"] = forcing_field_dephy(z0th_traj, "z0th_traj")
# Include same t_skin correction used for DALES, may need further work
ts = ds_era5["stl1_mean"].values + 1.0
ts = ds_era5["skt_mean"].values
ds_dephy["ts"] = forcing_field_dephy(ts, "ts")
# Surface fluxes: obtain from time mean in ERA data, change sign for dephy!
sfc_sens_flx = -central_estimate(ds_era5["msshf_mean"].values)
Expand Down
3 changes: 1 addition & 2 deletions lagtraj/forcings/conversion/targets/kpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ def from_era5(ds_era5, da_levels, parameters, metadata):
# Heat roughness, derive from "flsr" variable
ds_kpt["heat_rough"] = np.exp(ds_era5["flsr_mean"])
ds_kpt["heat_rough"].attrs.update(**kpt_attributes["heat_rough"])
# Apply correction to t_skin (see output files)
ds_kpt["t_skin"] = ds_era5["stl1_mean"] + 1.0
ds_kpt["t_skin"] = ds_era5["skt_mean"]
ds_kpt["t_skin"].attrs.update(**kpt_attributes["t_skin"])
# Surface fluxes: obtain from time mean in ERA data, do not change sign
sfc_sens_flx = central_estimate(ds_era5["msshf_mean"].values)
Expand Down

0 comments on commit 6ddfdb6

Please sign in to comment.