# Exercise 1: where does firn turn into ice at different sites? # Solve RHO_ICE - (RHO_ICE - rho_surf) * exp(-z / h) = 830 for z, which gives # z = -h * ln((RHO_ICE - 830) / (RHO_ICE - rho_surf)) import math RHO_ICE = 917 def depth_to_830(rho_surf, h): # solve RHO_ICE - (RHO_ICE - rho_surf) * exp(-z / h) = 830 exactly return -h * math.log((RHO_ICE - 830) / (RHO_ICE - rho_surf)) sites = {"cold dry interior": (350, 35), "cool maritime glacier": (450, 15), "wet temperate glacier": (500, 8)} # (surface density, decay depth in m) for name, (rho_surf, h) in sites.items(): z = depth_to_830(rho_surf, h) print(f"{name:22s} firn-to-ice at {z:5.1f} m") # cold dry interior firn-to-ice at 65.6 m # cool maritime glacier firn-to-ice at 25.2 m # wet temperate glacier firn-to-ice at 12.5 m # Warmer, wetter sites pack down much faster (meltwater refreezes and fills the gaps), # so the firn layer is thin. Cold, dry sites take far longer to close off the air.