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

Regarding the governing equation of dry air mass co-ordinate (continuity equation).

Kazim Hussain

New member
I have a question on how mu_d(2D) is evolved using the divergence of velocity when the divergence can be calculated over the entire grid(3D).
\partial_t \mu_d + (\nabla \cdot \mathbf{V}) = 0
Is the divergence integrated vertically? How does this tie to the equation for gradient of geopotential WRT eta being related to mu_d, is the mu_d here 3D like density is or integrated vertically?
\partial_\eta \phi = -\alpha_d \mu_d
 
In order to check if \mu_d is consistent with the equation of gradient with geoptential, I have tried recalculating it in 3D and see if it does not change verically.
Here is the code I used in order to calculate it, and obtain the figure along a vertical cross section:
gZ = getvar(wrf_file,'PHB')+getvar(wrf_file,'PH')
dgZ_deta = np.array(gZ[1:]-gZ[:-1])/np.array(getvar(wrf_file,'DNW'))[:,np.newaxis,np.newaxis]
moisture_tot = ((getvar(wrf_file,'QRAIN'))
+(getvar(wrf_file,'QSNOW'))
+(getvar(wrf_file,'QGRAUP'))
+(getvar(wrf_file,'QCLOUD'))
+(getvar(wrf_file,'QICE'))
+(getvar(wrf_file,'QVAPOR')))
alpha_d = np.array(getvar(wrf_file,'ALT'))*(1+moisture_tot)
Mu_d = -dgZ_deta/alpha_d

plt.figure()
y_slice=100
plt.title(f'Mu_d vertical cross section at y={y_slice}')
plt.imshow(Mu_d[:,y_slice,:])
plt.yticks(np.arange(np.shape(Mu_d)[0])[::10],np.round(np.array(getvar(wrf_file,'ZNU'))[::10],2))
plt.ylabel(r'$\eta$')
plt.xlabel('x-coordinate')
plt.colorbar()
I see that there is variation in \mu_d verically about half as much as there is horizontally, and there is almost no variation below critical \eta level (0.2), which would run into contradiction that it is just a horizontally varying 2D variable.
I am trying to close the budgets on momentum and temperature, and have been working under the assumption that \mu_d contains in itself the density and the determinant of the Jacobian transformation to write the governing equations in flux form, following Numerically consistent budgets of potential temperature, momentum, and moisture in Cartesian coordinates: application to the WRF model.
\mu_d = -g \rho_d |J| ; |J|=dz/deta This is the same as the equation for gradient of geopotential, but the \mu_d I get this way varies in all 3 dimensions.
 

Attachments

  • Figure_Mu_d_through_prognostic_eqn.png
    Figure_Mu_d_through_prognostic_eqn.png
    48.1 KB · Views: 2
Hi,
Apologies for the delay in response and thank you for your patience. All of the dynamical equations are discussed in the WRF Technical Note. Hopefully that helps!
Hello,
thank you for the response, I am aware of the technical note, and was asking this question because of the equations stated in chapter 2 (Governing equations). The equations I have listed are equations 2.12 and 2.15 . The problem I have is 2.15 can give us a value of Mu_d over the entire domain in 3D, whereas the output from WRF for Mu_d is 2D, both the base and perturbation states ("MUB" & "MU" in WRF registry) . I checked in the second response I pasted here; whether this field does not vary vertically which would make the 3D -2D field consistent, but as I can see it does vary. Additionally 2.12 describes evolution of this field, it is calculated using the divergence of Velocity, a 3D field, I just wanted to understand how a 2D field can be updated in time with a 3D calculation unless integrated vertically, the chapter 2 does not mention any vertical integration. Maybe the "MUB" and "MU" variables aren't what I think they are? Can you please help me with this?
 
Thankyou, I think I understood it after reading chapter 3, where it states :
it is evident that µ need not be stored as a three-dimensional array, but can be readily constructed when needed from the two-dimensional pc(x, y) array together with theone-dimensional Bη(η) profile.
But it really threw me off that this pc(x,y) was labelled as variables 'MUB' and 'MU' in the WRF registry with the description saying they themselves are the mass co-ordinates. Thank you for the help.
 
I'm glad you were able to figure it out! I agree that the descriptions in the Registry file are sometimes not very intuitive. I struggle with them, myself, sometimes. I'm hoping we will have some time at some point to add better descriptions.
 
Top