Streamflow Nudging

53 views
Skip to first unread message

Tewekel Melese Gemechu

unread,
Feb 12, 2025, 12:05:31 AMFeb 12
to wrf-hydro_users
Dear all
I hope you're doing great!
I have a question on streamflow nudging. when I read the manual of the Wrf_hydro model technical description and user's guide as well as from this link (https://wrf-hydro.readthedocs.io/en/latest/nudging.html), the Streamflow nudging takes 15 minutes temporal resolutions data. However, mine is a daily data. In my Routing link, I have 3 stations, and I didn't get how to include all those three gages and create "nudgingParams.nc" and " nudgingTimeSliceObs"
Please, I need your guidance and suggestions! And, any manual I can follow 
Thank you!


Arezoo RafieeiNasab

unread,
Feb 12, 2025, 12:42:01 AMFeb 12
to wrf-hyd...@ucar.edu
Hi Tewekel, 

Do you have a Routelink? If you have a routelink setup, there is a function in rwrfhydro (https://github.com/NCAR/rwrfhydro) which creates the file for you. It is basically creating a netcdf file with all the parameters based on the gauges that are specified in the Routelink file. The number of gauges in this file should match the ones in the Routelink. Below is a short R code snippet to help you generate the file, note the values defined for G, R, Tau, gageExpCoeff1 and gageParamQThresh1 could be changed if you want. For more information, please refer to the documentation:

# read the list of gages from the Routelink file library(rwrfhydro) gageParams <- list() rtlink <- rwrfhydro::ReadRouteLink("PATH_TO_ROUTLINK/RouteLink.nc") gageParams$gageId <- subset(rtlink, trimws(gages) != "")$gages gageParams$G <- rep(1, length(gageParams$gageId)) gageParams$R <- rep(0.25, length(gageParams$gageId)) gageParams$tau <- rep(15, length(gageParams$gageId)) gageExpCoeff1 <- array(rep(c(120),each=length(gageParams$gageId)*12),dim=c(length(gageParams$gageId),12,2)) gageParamQThresh1 <- array(rep(c(-100),each=length(gageParams$gageId)*12),dim=c(length(gageParams$gageId),12,1)) MkNudgingParams(gageId=gageParams$gageId, R=gageParams$R, G=gageParams$G, tau=gageParams$tau, qThresh=gageParamQThresh1, expCoeff=gageExpCoeff1, outFile=paste0("PATH_TO_OUTPUT_DIR/nudgeParam.nc"), overwrite=TRUE, rmBlankGages=TRUE)

Hope this helps you!
Arezoo

--
You received this message because you are subscribed to the Google Groups "wrf-hydro_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wrf-hydro_use...@ucar.edu.
To view this discussion visit https://groups.google.com/a/ucar.edu/d/msgid/wrf-hydro_users/cb2ba513-f83a-4316-bc51-51ebbd68003fn%40ucar.edu.


--
Arezoo Rafieei Nasab, Ph.D.
NCAR/RAL Project Scientist II
office: 303-497-2888

Arezoo RafieeiNasab

unread,
Feb 12, 2025, 12:45:34 AMFeb 12
to wrf-hyd...@ucar.edu
Dear Tewekel,
My apologies, the script is not showing properly in the previous email. So I am attaching the same script formatted correctly. 
Thanks!
Arezoo
create_nudging_params.R

Tewekel Melese Gemechu

unread,
Feb 13, 2025, 2:49:43 AMFeb 13
to wrf-hyd...@ucar.edu
Thank you so much for your quick and interesting response!

Installing "rwrfhydro" is also another challenge. 

install.packages("devtools")
install.packages("/data/home/teke/Build_WRF/rwrfhydro", repos = NULL, type = "source")

image.png


>> Tewekel M Gemechu
>> PhD Scholar (Physical Geography)
>> IGSNRR, CAS Beijing
>> Lecturer @ Ambo University, Ambo, Ethiopia
>> Tel: +8615701617601        (+251947440001 , Ethiopia)


Arezoo RafieeiNasab

unread,
Feb 13, 2025, 12:50:22 PMFeb 13
to wrf-hyd...@ucar.edu
Hi Tewekel, 

Could you share your routelink with me? I will try to create a nudgingParam.nc file for you based on the routelink of your domain. If you need to create another one, you could use that as a sample and write a function in your choice of language and create it. All that function in rwrfhydro does is to create a netcdf file, so you could write it up on your own. 

Also, as for the rwrfhydro if you want to try once more, maybe try this one: 

install.packages("devtools")
devtools::install_github("NCAR/rwrfhydro")

This is what I usually use. The name of the folder you have downloaded is different from rwrfhydro, and devtools does not see that folder since you are asking for "rwrfhydro"

Thanks!
Arezoo

Tewekel Melese Gemechu

unread,
Feb 17, 2025, 1:58:03 AMFeb 17
to wrf-hyd...@ucar.edu
Thank you so much, Arezoo!
I have created it!
In my Route_Link.nc, there are 3 gages, but only two are visible here. 
I will try to check it in detail.


image.png
>> Tewekel M Gemechu
>> PhD Scholar (Physical Geography)
>> IGSNRR, CAS Beijing
>> Lecturer @ Ambo University, Ambo, Ethiopia
>> Tel: +8615701617601        (+251947440001 , Ethiopia)

Reply all
Reply to author
Forward
0 new messages