Skip to content

Commit 3ed5dc6

Browse files
authored
Merge pull request #73 from hhourston/develop
Develop
2 parents 667ce5d + 5d051c0 commit 3ed5dc6

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pycurrents_ADCP_processing/ADCP_processing_L1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def add_attrs_2vars_L1(out_obj, metadata_dict, sensor_depth, cell_size, fillValu
427427
# Velocity variable quality flags
428428
var = out_obj.LCEWAP01_QC
429429
var.encoding['dtype'] = 'int'
430-
var.attrs['_FillValue'] = 0
430+
var.attrs['_FillValue'] = fillValue
431431
var.attrs['long_name'] = 'quality flag for LCEWAP01'
432432
var.attrs['comment'] = 'Quality flag resulting from cleaning of the beginning and end of the dataset'
433433
var.attrs['flag_meanings'] = metadata_dict['flag_meaning']
@@ -438,7 +438,7 @@ def add_attrs_2vars_L1(out_obj, metadata_dict, sensor_depth, cell_size, fillValu
438438

439439
var = out_obj.LCNSAP01_QC
440440
var.encoding['dtype'] = 'int'
441-
var.attrs['_FillValue'] = 0
441+
var.attrs['_FillValue'] = fillValue
442442
var.attrs['long_name'] = 'quality flag for LCNSAP01'
443443
var.attrs['comment'] = 'Quality flag resulting from cleaning of the beginning and end of the dataset'
444444
var.attrs['flag_meanings'] = metadata_dict['flag_meaning']
@@ -449,7 +449,7 @@ def add_attrs_2vars_L1(out_obj, metadata_dict, sensor_depth, cell_size, fillValu
449449

450450
var = out_obj.LRZAAP01_QC
451451
var.encoding['dtype'] = 'int'
452-
var.attrs['_FillValue'] = 0
452+
var.attrs['_FillValue'] = fillValue
453453
var.attrs['long_name'] = 'quality flag for LRZAAP01'
454454
var.attrs['comment'] = 'Quality flag resulting from cleaning of the beginning and end of the dataset'
455455
var.attrs['flag_meanings'] = metadata_dict['flag_meaning']
@@ -773,7 +773,7 @@ def add_attrs_2vars_L1(out_obj, metadata_dict, sensor_depth, cell_size, fillValu
773773
# PRESPR01_QC: pressure quality flag
774774
var = out_obj.PRESPR01_QC
775775
var.encoding['dtype'] = 'int'
776-
var.attrs['_FillValue'] = 0
776+
var.attrs['_FillValue'] = fillValue
777777
var.attrs['long_name'] = 'quality flag for PRESPR01'
778778
var.attrs['comment'] = 'Quality flag resulting from cleaning of the beginning and end of the dataset and ' \
779779
'identification of negative pressure values'
@@ -904,7 +904,7 @@ def add_attrs_2vars_L1(out_obj, metadata_dict, sensor_depth, cell_size, fillValu
904904

905905
var = out_obj.LRZUVP01_QC
906906
var.encoding['dtype'] = 'int'
907-
var.attrs['_FillValue'] = 0
907+
var.attrs['_FillValue'] = fillValue
908908
var.attrs['long_name'] = 'quality flag for LRZUVP01'
909909
var.attrs['comment'] = 'Quality flag resulting from cleaning of the beginning and end of the dataset'
910910
var.attrs['flag_meanings'] = metadata_dict['flag_meaning']

pycurrents_ADCP_processing/plot_westcoast_nc_LX.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ def make_pcolor_ne(nc, dest_dir, time_lim, bin_depths_lim, ns_lim, ew_lim, level
590590
magnetic, nc.attrs['station'], nc.attrs['deployment_number'],
591591
str(int(nc.instrument_depth)), resampled_str), fontsize=14)
592592

593-
if nc.orientation == 'up':
594-
plt.gca().invert_yaxis()
593+
# if nc.orientation == 'up':
594+
plt.gca().invert_yaxis()
595595

596596
# Create L1_Python_plots or L2_Python_plots subfolder if not made already
597597
plot_dir = get_plot_dir(nc.filename, dest_dir)
@@ -601,10 +601,10 @@ def make_pcolor_ne(nc, dest_dir, time_lim, bin_depths_lim, ns_lim, ew_lim, level
601601

602602
if level0:
603603
plot_name = plot_dir + nc.attrs['station'] + '-' + nc.attrs['deployment_number'] + '_{0}m'.format(
604-
str(int(nc.instrument_depth))) + '-magn_NE_{}{}.png'.format(filter_type, resampled_4fname)
604+
str(np.round(nc.instrument_depth))) + '-magn_NE_{}{}.png'.format(filter_type, resampled_4fname)
605605
else:
606606
plot_name = plot_dir + nc.attrs['station'] + '-' + nc.attrs['deployment_number'] + '_{0}m'.format(
607-
str(int(nc.instrument_depth))) + '-NE_{}{}.png'.format(filter_type, resampled_4fname)
607+
str(np.round(nc.instrument_depth))) + '-NE_{}{}.png'.format(filter_type, resampled_4fname)
608608
fig.savefig(plot_name)
609609
plt.close()
610610

@@ -710,8 +710,8 @@ def make_pcolor_ac(data, dest_dir, time_lim, bin_depths_lim, ns_lim, ew_lim, fil
710710
else:
711711
ValueError('Not a recognized data type; choose one of \'raw\', \'30h\' or \'Godin\'')
712712

713-
if data.orientation == 'up':
714-
plt.gca().invert_yaxis()
713+
# if data.orientation == 'up':
714+
plt.gca().invert_yaxis()
715715

716716
ax2 = fig.add_subplot(2, 1, 2)
717717

@@ -751,7 +751,7 @@ def make_pcolor_ac(data, dest_dir, time_lim, bin_depths_lim, ns_lim, ew_lim, fil
751751
os.makedirs(plot_dir)
752752

753753
plot_name = data.attrs['station'] + '-' + data.attrs['deployment_number'] + '_{}m'.format(
754-
math.ceil(data.instrument_depth)) + '-AC_{}{}.png'.format(filter_type, resampled_4fname)
754+
np.round(data.instrument_depth)) + '-AC_{}{}.png'.format(filter_type, resampled_4fname)
755755
fig.savefig(plot_dir + plot_name)
756756
plt.close()
757757

0 commit comments

Comments
 (0)