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

How to add a new variable into the wrfinput that can be used by the physical schemes

Erenw

New member
Hi,
I think the roughness parameterizations may not present satisfied results of sea surface roughness length, thus, i wanna use the z0 from the ERA5 or HYCOM by adding z0 to the wrfinput file. Now, i only know that the Registry.EM_COMMON need to be modified for 'ZNT'. Except for this, i have no idea what else should i do so that i can use the ZNT directly in the relevant physical schemes. Could anyone help me or are there other solutions, e.g. something like sst_update.
Thanks for your time, i am grateful for your advice.
 
Hi,

Please follow the steps below to add ZNT to wrfinput:

(1) read ZNT from ERA5, include this variable in your intermediate files.

(2) edit METGRID.TBL so that metgrid.exe can process ZNT. For example, add the line below to METGRID.TBL:
name=ERA5Z0 ; output_name=ZNT

(3) In Registry.EM_COMMON. Change the line below from

state real ZNT ij misc 1 - i3r "ZNT" "TIME-VARYING ROUGHNESS LENGTH"

to:

state real ZNT ij misc 1 - i03r "ZNT" "TIME-VARYING ROUGHNESS LENGTH" "m"

(4) remember to do ./clean -a, then recompile WRF

Let me know if you have any issues.
 
Thank you so much, Ming. i got it worked! two more questions i wanna ask:
1. The ZNT already exists in the wrfinput file, does wrf read it as one of the initial and lateral boundary variables? or i need to modify the WRF code?
2. The roughness in the surface layer scheme like MYNN and MYJ will be recalculated the ZNT, e.g." Z0=MAX(USTFC*USTAR*USTAR,1.59E-5)" in the MYJ scheme. Should i comment out the calculation of Z0 and make it only an input variable in the relevant subroutines
 
Last edited:
ZNT is only read into WRF as initial condition. It is not included in the lateral boundary condition.

If you want to keep ZNT unchanged, then yes you should comment out those codes that calculate ZNT.
 
Oh, I need a time-varying z0.
How could I make ZNT the lateral boundary condition? which code file should I review?
 
Top