def _parse_clouds(self):
layers = {}<EOL>for sky_info in self.metar.sky:<EOL><INDENT>cover, height, _ = sky_info<EOL>if height:<EOL><INDENT>height = int(height.value('<STR_LIT:M>'))<EOL>height = max(height, <NUM_LIT>)<EOL>height = min(height, <NUM_LIT>)<EOL>cover = random.randint(*SKY_COVER[cover])  <EOL>layers[cover] = height<EOL><DEDENT><DEDENT>if layers:<EOL><INDENT>max_cover = max([key for key in layers])<EOL>self.cloud_density = max_cover<EOL>self.cloud_base = layers[max_cover]<EOL>self.cloud_thickness = int(max_cover / <NUM_LIT:10> * <NUM_LIT>)<EOL><DEDENT>
Sets cloud density