Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Interpolate TSLB / SMOIS from parent domain with fine_input_stream



Is there a way to choose the variables interpolated from parent domain with the fine_input_stream option. I would like to do a quite long soil spin-up with my coarser domains only but it would not be transmitted to my nested domains.

Thank you,

There is no option to specify what variables can be interpolated from parent domain to child domain by setting fine_input_stream
I would suggest that you create a pre-process package to interpolate the parent domain data to child domain. This only involves horizontal interpolation and I suppose it is less complicated than modifying the WRF nested codes.
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.


I found a way to initialize TSLB and SMOIS from parent domain. However there are many other fields related to soil like TSK, SMCREL, SH2O, ...
I don't really know which one I should also initialize from parent.
Is there a way to know which variables are prognostic and conserved in Noah LSM scheme ?


If you only want to run soil spin-up, I suppose this is an offline run of soil model?

Initial variables for Noah soil module include:

initial skin temperature (K).
initial soil temperature (K), in each soil layer
initial volumetric total soil moisture (liquid and frozen) in each layer
initial volumetric liquid soil moisture (SH2O)
initial snow depth
initial water equivalent (m) of snow above snowdepth.

In addition to the above soil information, you will need to provide atmospheric forcing data for soil model to run.

You may also find some helpful information in the website:

Thank you for these pieces of information.

Since I don't know how to run the soil model offline, I planned to run a few month RANS simulation with my coarsest domain(s). Then I planned to start my finer domains later and to initialize all the "time evolving" variables from the parent domain. This is why I need to initialize soil data from parent which is not yet implemented.
I tried to implement it using some WPS subroutine (search routine). It works well for TSOIL but I have a segmentation fault when I also try to interpolate SMOIS or TSK. It is still a work in progress.