Also, though data points with bad values were masked with NaN, and profiles with both bad salinity and temperature were removed, profiles with bad temperature or salinity were not masked.
On inspection, other minor issues:
Method name change
calculate_all_en4_qc_flags() only represents calculate_en4_qc_flags_levels(), and not profiles.
Hence a name change/refactor
Duplicated methods in profile.py
calculate_all_en4_qc_flags() appears twice
process_en4() appears twice
In calculate_en4_qc_flags_levels():
Different versions of EN dataset have a slightly different justitifcation of why some points are removed. This is inconsequential to the implementation of which points/profiles get masked but the code is updated to reflect this knowledge - perhaps making it more readable.
double mapping:
Within profile.py (insitu) temperature was being mapped to both temperature and potential temperature. The variable should be preserved in this code and mappings happen exclusively in the json files
nan masking of bad salinity point was misapplied using temperature mask locations:
should read
Also, though data points with bad values were masked with NaN, and profiles with both bad salinity and temperature were removed, profiles with bad temperature or salinity were not masked.
On inspection, other minor issues:
Method name change
calculate_all_en4_qc_flags()
only representscalculate_en4_qc_flags_levels()
, and not profiles. Hence a name change/refactorDuplicated methods in profile.py
calculate_all_en4_qc_flags()
appears twiceprocess_en4()
appears twiceIn
calculate_en4_qc_flags_levels()
: Different versions of EN dataset have a slightly different justitifcation of why some points are removed. This is inconsequential to the implementation of which points/profiles get masked but the code is updated to reflect this knowledge - perhaps making it more readable.double mapping: Within profile.py (insitu)
temperature
was being mapped to bothtemperature
andpotential temperature
. The variable should be preserved in this code and mappings happen exclusively in the json files