If
0=z(1)<z(2)<...<z(N)=H
is a discretization in z-direction, approximate
dT_g/dz (z(i)) = (T_g(z(i))-T_g(z(i-1)))/(z(i)-z(i-1))
dT_l/dz (z(i)) = (T_l(z(i+1))-T_l(z(i)))/(z(i+1)-z(i))
Then solve the resulting system of ordinary differential equations using ODE15S, e.g..
Look up "method of lines".
Best wishes
Torsten.