Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/gsi-ncdiag/gsi_ncdiag.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,14 @@ def toIODAobs(self, OutDir, clobber=True, platforms=None):
tmp[tmp == 10009.] = self.FLOAT_FILL # for u,v sfc Height values that are 10+9999
# GSI sfc obs are at 0m agl, but operator assumes 2m agl, correct output to 2m agl
# this is correctly 10m agl though for u,v obs
if lvar == 'Height' and self.obstype in ['conv_t', 'conv_q']:
elev = self.var('Station_Elevation')[idx]
hgt = elev + 2.
hgt[hgt > 9998.] = self.FLOAT_FILL
tmp = hgt
# --- temporarily comment out the following so 2m_t & 2m_q can be properly combined
# --- with surface_pressure ioda obs as single record because 2m_t and 2m_q are used
# --- in UFO surface pressure correction scheme
# if lvar == 'Height' and self.obstype in ['conv_t', 'conv_q']:
# elev = self.var('Station_Elevation')[idx]
# hgt = elev + 2.
# hgt[hgt > 9998.] = self.FLOAT_FILL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the fill values for where it is sufficiently large? Or is it not needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable tmp on the lines 866-867 directly above the comments already had fill values, so I think it is not needed, unless you know there are cases where the missing value is neither 9999 nor 10009.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure, we can assume it is fine for now though.

# tmp = hgt
outdata[(loc_mdata_name, 'MetaData')] = tmp
varAttrs[(loc_mdata_name, 'MetaData')]['units'] = 'm'
elif p == 'sondes' or p == 'aircraft' or p == 'satwind':
Expand Down
2 changes: 1 addition & 1 deletion test/testoutput/sfc_tv_obs_2018041500.nc4
Git LFS file not shown