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

Editing WRF Registry for Time-Varying Roughness Length

adikshit

New member
Hi All,

I am new to WRF modeling and I am trying to modify the WRF Registry to enable a time-varying roughness length parameter. Is there any documentation or resources available on how to do this? I have searched but was unable to find any reliable material.

Cheers,
 
Please take a look at codes related to SST_UPDATE, and I suppose you can follow the same method to update ZNT.

Sorry that we don't have a specific document that describes how to add time-varying variables to the model.
 
Please take a look at codes related to SST_UPDATE, and I suppose you can follow the same method to update ZNT.

Sorry that we don't have a specific document that describes how to add time-varying variables to the model.
Hi Ming,

What I am trying to do is add a variable (surface roughness) to the initialization files, so that it can be used as input for WRF instead of using constant values. To achieve this, I first edited the initialization files. Then, I believe the following three steps are necessary:

(1) Modify the WRF Registry (~L1865) to define the new variable. (2) Make change to module_sf_sfclayrev.F. (3) Clean & Compile.

My question is: What specific changes are required in module_sf_sfclayrev.F? Or is there another way to implement this?


Cheers,
 
I am not sure how you intend to add the new variable to wrfinput, e.g., modify wrfinput, or make it available in met_em and then run real.exe to include it in wrfinput?

If you simply modify wrfinput, then you don't need to worry for REAL program. If you include this variable in met-em, then you will need to modify

dyn_em/module_initialize_real.F to process this new variable

In either way you needs to modify Registry so that the model will know that this is a variable included in wrfinput.

Another important code is phys/module_physics_init.F, which should be modified to obtain the new variable. Then you will also need to modify other related codes such as module_sf_sfclayrev.F to pass this variable to the specific schemes you use.

Please look how U10 is processed , which serves as a good example for your case. This is not a trivial task and it involves lots of code changes.
 
Hi Ming,

I have successfully edited the WRF code to add the "ROUGH" variable and was able to recompile it without issues. However, when I run the WRF model, I encounter the following error:
calling inc/HALO_EM_FDDA_SFC_inline.inc
calling inc/HALO_EM_TKE_C_inline.inc
calling inc/PERIOD_BDY_EM_A1_inline.inc
calling inc/HALO_EM_HELICITY_inline.inc
calling inc/HALO_EM_TKE_D_inline.inc
calling inc/HALO_EM_TKE_E_inline.inc
calling inc/PERIOD_BDY_EM_PHY_BC_inline.inc
calling inc/PERIOD_BDY_EM_CHEM_inline.inc
calling inc/HALO_EM_PHYS_PBL_inline.inc
calling inc/HALO_EM_PHYS_CU_inline.inc
calling inc/HALO_EM_PHYS_DIFFUSION_inline.inc
forrtl: error (78): process killed (SIGTERM)
This error message doesn't provide much detail for troubleshooting.

Here’s some background: I modified the WRF code to include the "ROUGH" variable. The changes were made to six files: (a) start_em.F (b) module_physics_init.F (c) module_first_rk_step_part1.F (d) module_surface_driver.F (e) module_sf_noahmpdrv.F and (f) Registry.EM_COMMON.

Additionally, I updated the wrfinput and wrflowinp files to include the "ROUGH" variable. However, after these modifications, I encounter the above error, which I have been unable to resolve.

Do you have any suggestions or solutions for this issue?

Thanks
 
Last edited:
Hi adikshit

I would suggest that you recompile WRF in debug mode, i.e.,

./clean -a
./configure -D

Then create a smaller case and run WRF with your modification. The log file will tell exactly when and where the model first crashes, which will give you some hints what is wrong.

Hope this is helpful for you.
 
Top