Ming,
Thank you for your answer. I tried to look at the code and :
1- I think that I found a little mistake that have probably no consequence
In share/input_wrf.F
1301 IF ( in_use_for_config(grid%id,TRIM(p%VarName)) ) THEN
1302 IF (p%Ntl.GT.0.AND.switch.NE.restart_only)dname=dname(1:len(TRIM(dname))-2)
1303 dname = p%DataName
I think lines 1303 should be before line 1302 as in the rest of the loop :
1380 IF (switch.EQ.restart_only.OR.p%Ntl/100.EQ.mod(p%Ntl,100)) THEN
1381 dname = p%DataName
1382 IF (p%Ntl.GT.0.AND.switch.NE.restart_only)dname=dname(1:len(TRIM(dname))-2)
2- I don't really get what you mean by create a pre-process package to interpolate so I tried to understand how the code works with fine_input_stream.
Here is what I understood.
In the recursive subroutine "integrate", when a nest starts,
* in alloc_and_configure_domain : it is allocated
* in med_nest_initial :
* * in med_interp_domain :
* * * in interp_domain_em_part2 : all the fields from parent grid are interpolated to nest grid (including TSLB)
* * in med_initialdata_input_ptr :
* * * in med_initialdata_input :
* * * * fid = open_r_dataset(input_inname) : the wrfinput file is opened
* * * * in input_auxinput2(fid)
* * * * * in input_wrf(fid, auxinput2_only) : in the loop "while associated(p)", all fields are read in wrfinput file except for the "XX_1" because mod(Ntl, 100) .NE. Ntl/100
Then, for what I understand, the interpolation I need (TSLB and SMOIS from parent to nest) is done in interp_domain_em_part2 and then the values are overwritten in input_wrf. I didn't get where the fine_input_stream option permits to keep the aero fields (u, v, w, t, ...) interpolated from parent.
If I knew where it is done, I might be able to add an option to keep also TSLB and SMOIS interpolated from parent.
I hope I am understandable and not totally wrong.
Mathieu