Skip to content

Commit b378630

Browse files
author
[jli30]
committed
convert geopotential to height
1 parent 04d85f8 commit b378630

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gencast_fp/postprocess/gencast_cf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def proc_time_step(
6161
ds_org, ctime, ref_date,
6262
output_dir: Path, case="init", ens_mean=True
6363
):
64-
64+
65+
GRAV = 9.80665
6566
FILL_VALUE = np.float32(1.0e15)
6667

6768
ds = ds_org.sel(time=ctime).expand_dims("time")
@@ -161,6 +162,9 @@ def proc_time_step(
161162
"missing_value": FILL_VALUE,
162163
"fmissing_value": FILL_VALUE,
163164
}
165+
166+
# --- geopotential to height ---
167+
ds['H'] = ds['H']/GRAV
164168

165169
# --- globals ---
166170
ds.attrs = {

0 commit comments

Comments
 (0)