Hi Yasmine,
I've had a quick look at your script and data.
Is your data directly downloaded or something was done to it? Because all I see is zero values for all the fields at all times.
I have downloaded the t,q,z and lnsp for one date and time and made a small example that works.
In order to try my code out, please download t and q for one date and time (just so you don't spend too much time reading a big file and filtering why getting things to work) and save it to file tq_ml.grib. Then download z and lnsp for ml=1 for the same date and time and save it to another file called zlnsp_ml.grib.
My code looks something like this:
import metview as mv
tq = mv.read('tq_ml.grib')
t_one = tq.select(shortName='t')
q_one = tq.select(shortName='q')
zlnsp = mv.read('zlnsp_ml.grib')
lnsp_one = zlnsp.select(shortName='lnsp')
z_one = zlnsp.select(shortName='z')
#create z on model levels
z_ml = mv.mvl_geopotential_on_ml(t_one,q_one,lnsp_one,z_one)
#calculate pressure on model levels
p = mv.unipressure(lnsp_one)
# calculate pressure on 100m height above ground
hlevs = [100]
p_blh_ground = mv.ml_to_hl(p, z_ml, z_one, hlevs, "ground", "linear")
# calculate pressure on 100m height above sea level
p_blh_sea = mv.ml_to_hl(p, z_ml, None, hlevs, "sea", "linear")
mv.write('p_blh_ground.grib',p_blh_ground)
mv.write('p_blh_sea.grib',p_blh_sea)
Please note that in your script you put hlevs=10 and wanted to calculate above sea level ("sea" option). This is very low so almost anywhere above the land it will have missing values.
Your code also had an error. If you interpolate above sea level then you don't need z at ml=1 (orography) in the ml_to_hl, just put None, as I did.
You need z at ml=1 for calculating above the ground. You can see both examples in my code.
I hope this helps!
Milana