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

add a new variable in geogrid

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Heller

New member
Hi

I would like to add a new variable as a geo static data similar to the subgrid orographic variance and be available in physics in WRF model. My understanding is that
1. Data should be prepared same as the source data as the terrain height.
2. Variable should be registered in Registry both for WPS and WRF
3. The filter or adjustment to the model resolution should be done in geogrid.exe
4. The adjusted data should be writing into geo_em data
5. The data should be read by the real.exe and written into wrf.input again
6. Finally, it is read by wrf.exe and available for the physics package.

Is there anyone could guide me to do this?

There may be an alternative way to accomplish this by
1. adding a variable in Registry.COMMON
2. set namelist.input to read this data as time varied data
but this will require the data totally consistent with the domain and resolution for the specific simulation

Thanks
Heller
 
I've moved this inquiry to the "New/Modified Static Data" section of the forum. Someone will answer your question soon.
 
Hi, Heller and cicicsx,
The basic procedure to add new variables to WPS/WRF are as follows:
(1) write the data in the Geogrid Binary Format. Please see https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.3/users_guide_chap3.html#_Writing_Static_Data
(2) Modify geogrid/GEOGRID.TBL and metgrid/METGRID.TBL so that this new variable can be processed by WPS.Please see https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.3/users_guide_chap3.html#_Description_of_GEOGRID.TBL
https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.3/users_guide_chap3.html#_Description_of_METGRID.TBL
(3) Modify Registr.EM_COMMON to include this variable. This is kind of complicated. Please read the document below:
https://www2.mmm.ucar.edu/wrf/users/tutorial/presentation_pdfs/201907/gill_registry.pdf
(4) To make the variable available for physics package, you will also need to modify related codes, e.g., drivers, physics schemes, etc.
 
Hello, Ming!
Thank you for the detailed instructions!
I have interpolated the external array onto the model grid accroding to the namelist.wps (the same e_we,e_sn and the same projection) in advance in grd format and I wondered that whether I need to conduct the first step 'write the data in the Geogrid Binary Format' ?
 

Attachments

  • 微信图片_20210713094105.png
    微信图片_20210713094105.png
    6.3 KB · Views: 1,013
Hi,
In this case you may skip the step to write the data in goegrid binary format. However, you need to include this variable in your geo_em data. There are various ways to do so, e.g., NCL, Fortran, Python, etc. Once geo_em file has this variable, you then need to modify METGRID.TBL so that this variable can be included in met_em datafile.
 
Top