Compiling moist thermo in anelastic form