From 4d6937ee932b949c63c779ad128173ced32a4e62 Mon Sep 17 00:00:00 2001 From: rink <rink@ssec.wisc.edu> Date: Mon, 28 Sep 2020 14:05:00 -0500 Subject: [PATCH] add dist from prof to each amv to product file --- modules/aeolus/aeolus_amv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index a5c75633..7e73b22d 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -318,7 +318,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): namvs = 0 nlevs = 0 for key in keys: - lons, lats, pres, spd, dir, _ = aeolus_to_amv_dct.get(key) + lons, lats, pres, spd, dir, dist = aeolus_to_amv_dct.get(key) num_amvs.append(len(lons)) namvs += len(lons) @@ -345,6 +345,8 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): amv_dir.units = 'degree' amv_pres = rootgrp.createVariable('amv_pres', 'f4', ['amvs']) amv_pres.units = 'hPa' + amv_dist = rootgrp.createVariable('amv_dist', 'f4', ['amvs']) + amv_dist.units = 'km' num_amvs_per_prof = rootgrp.createVariable('num_amvs_per_prof', 'i4', ['num_aeolus_profs']) num_levs_per_prof = rootgrp.createVariable('num_levs_per_prof', 'i4', ['num_aeolus_profs']) @@ -374,6 +376,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): amv_spd[i_a:i_b] = spd[:] amv_dir[i_a:i_b] = dir[:] amv_pres[i_a:i_b] = pres[:] + amv_dist[i_a:i_b] = dist[:] i_a += namvs prof_s = aeolus_dct.get(key) -- GitLab