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

Reading data from metgrid file

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.


New member
Hi everyone,

I'm analyzing the data that is stored in the metgrid file that was generated when running WRF model. I want to know which is the height, in meters, of each one of the 32 layers that were created along z-axis. Does anyone knows where, in this file, I can find that information?

Thanks in advance!

Hi Abby,
Unfortunately there isn't a simple way to do this, as the input data is calculated on pressure levels, and therefore at every point in the domain, the thickness of each level will differ. If you wanted to calculate this for every point, you would need to write some code that finds the geopotential height (GHT) above and below each vertical level (num_metgrid_level), but you would need a loop for i,j,k.
Thank you so much, kwerner!! I'll work on that.

I have another question, do you know if the PBL height is directly an output of the WRF files? or how does it have to be calculated?

Thanks in advance!

Yes, in the wrf output, there is a variable called PBLH, which is PBL height.