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

vertical interpolation

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.

I want to interpolate temperature from one restart file to the vertical levels from another restart file. So which vertical variable will be used as the vertical coordinate? I see zz, zgrid, etc. Thank you
You could use 'zgrid', which is the geometric height of the vertical layer interfaces. Since temperature is defined at layer mid-points, you would need to first average the zgrid values from the interface below and above each layer to get the geometric height at layer midpoints. That is, you could use the field
z_mid(1:nVertLevels, 1:nCells) = 0.5 * (zgrid(1:nVertLevels, 1:nCells) + zgrid(2:nVertLevels+1, 1:nCells))
as the vertical coordinate of the temperature field.
Thank you. I am using zgrid. Does zgrid change with time? I noticed the dimension of zgrid is (nCells, nVertLevelsP1). There is no time dimension. It seems it does not change with time. Also, from the vertical grid definition in the MPAS users guide, z = zeta + A*h_s(x,y,zeta). I am not sure whether z is equal to zgrid. But it seems z also does not change with time. In that case, for the same region, the zgrid are the same, no matter how I change the model parameters. Is it right?
You are correct that the zgrid field does not change with time and that the 'z' described in Equation C.1 in the User's Guide is equivalent to the 'zgrid' array in the code. The zgrid field is computed by the init_atmosphere_model program, and there are no options in the model namelist (i.e., namelist.atmosphere) that will further modify the zgrid field from what the model reads in the initial conditions file.