Skip to content
Snippets Groups Projects
Commit 1a1c16da authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 8b5b1107
No related branches found
No related tags found
No related merge requests found
...@@ -440,7 +440,7 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14 ...@@ -440,7 +440,7 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14
# aeolus_to_amv_dct: output from match_amvs_to_aeolus # aeolus_to_amv_dct: output from match_amvs_to_aeolus
# aeolus_dct: output from get_aeolus_time_dict # aeolus_dct: output from get_aeolus_time_dict
# amv_files: container representing specific AMV product info # amv_files: container representing specific AMV product info
def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files): def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=False):
keys = list(aeolus_to_amv_dct.keys()) keys = list(aeolus_to_amv_dct.keys())
num_amvs = [] num_amvs = []
...@@ -491,10 +491,11 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files): ...@@ -491,10 +491,11 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files):
prf_lat.units = 'degrees north' prf_lat.units = 'degrees north'
prof_time.units = 'seconds since 1970-01-1 00:00:00' prof_time.units = 'seconds since 1970-01-1 00:00:00'
prf_azm = rootgrp.createVariable('prof_azm', 'f4', ['profs']) if not cld_lyr:
prf_azm.units = 'degree' prf_azm = rootgrp.createVariable('prof_azm', 'f4', ['profs'])
prf_spd = rootgrp.createVariable('prof_spd', 'f4', ['profs']) prf_azm.units = 'degree'
prf_spd.units = 'm s-1' prf_spd = rootgrp.createVariable('prof_spd', 'f4', ['profs'])
prf_spd.units = 'm s-1'
prf_hht = rootgrp.createVariable('prof_hht', 'f4', ['profs']) prf_hht = rootgrp.createVariable('prof_hht', 'f4', ['profs'])
prf_hht.units = 'meter' prf_hht.units = 'meter'
prf_hhb = rootgrp.createVariable('prof_hhb', 'f4', ['profs']) prf_hhb = rootgrp.createVariable('prof_hhb', 'f4', ['profs'])
...@@ -513,10 +514,14 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files): ...@@ -513,10 +514,14 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files):
prof = prof_s prof = prof_s
if isinstance(prof_s, list): if isinstance(prof_s, list):
prof = prof_s[0] prof = prof_s[0]
prf_hht[i_c:i_d] = prof[:, 3] if not cld_lyr:
prf_hhb[i_c:i_d] = prof[:, 4] prf_hht[i_c:i_d] = prof[:, 3]
prf_azm[i_c:i_d] = prof[:, 5] prf_hhb[i_c:i_d] = prof[:, 4]
prf_spd[i_c:i_d] = prof[:, 6] prf_azm[i_c:i_d] = prof[:, 5]
prf_spd[i_c:i_d] = prof[:, 6]
else:
prf_hht[i_c:i_d] = prof[:, 2]
prf_hhb[i_c:i_d] = prof[:, 3]
i_c += nlevs i_c += nlevs
plat = prof[0, 0] plat = prof[0, 0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment