I checked further. The GRIB file contains four layer soil T named STL1, STL2, STL3, and STL4, each has an indicator of soil depth. They are 0-7, 7-28, 28-100, 100-289 cm. Then in met_em file, there are two sets of soil T. One came directly from GRIB (I think) and have names ST000007, ST007028, ST028100, and ST100289. Obviously they have depth information. The plot show that these are consistent in GRIB and met_em. However, in met_em, there is a derived variable named ST, which has four layers. This ST variable shows reversed layers. The wrfinput TSLB is consistent with GRIB and those separate variables in met_em (I mean ST000007, ...). With a coldest time of year figures, it shows that the wrfinput data is correct, where near surface is colder than deeper layers. see the attached figures (NOTE: the first column in the three-column figure is variable ST in met_em):
So, now the following 3 questions remain (if anyone knows where in the code relates to the questions):
1) How was the met_em derived variable ST generated? The METGRIB.TBL has the following lines:
========================================
name=ST
z_dim_name=num_st_layers
derived=yes
# IF
fill_lev = 10 : ST000010(200100)
fill_lev = 40 : ST010040(200100)
fill_lev = 100 : ST040100(200100)
fill_lev = 200 : ST100200(200100)
# ELSE IF
fill_lev = 10 : ST000010(200100)
fill_lev = 35 : ST010035(200100)
fill_lev = 100 : ST035100(200100)
fill_lev = 300 : ST100300(200100)
# ELSE IF
fill_lev = 10 : ST000010(200100)
fill_lev = 200 : ST010200(200100)
# ELSE
fill_lev = 7 : ST000007(200100)
fill_lev = 28 : ST007028(200100)
fill_lev = 100 : ST028100(200100)
fill_lev = 289 : ST100289(200100)
========================================
2) How did real.exe choose to use which set of soil T variables to generate input files?
3) Since the wrfinput seems correct, the ST variable in met_em was probably not used, but why it was generated or why it was included in METGRID.TBL?
Thanks for any insights!
xgfan