+def convert_units_to_american(element_cd, value):
+ """
+ convert value to 'American' units
+
+ The original unit is always metric.
+
+ Precip values = imperial
+ Wind values = metric
+ """
+
+ # temp values
+ if element_cd in ['TMAX', 'TMIN', 'TOBS', 'air_temp', 'air_temp_high_24_hour', 'air_temp_low_24_hour']:
+ value = c_to_f(value)
+
+ # snow values
+ if element_cd in ['SNWD', 'snow_depth']:
+ value = cm_to_in(mm_to_cm(value))
+
+ # likewise for baro values
+ if element_cd in ['PRES', 'pressure']:
+ value = pascal_to_inhg(value)
+
+ # no need to convert wind values, as they will arrive in metric
+ # units in "American" units mode
+ # [
+ # 'WSPD',
+ # 'wind_speed', 'wind_gust'
+ # ]
+ # in_to_mm(value)
+
+ return value
+