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

Grid cell corners into WRF

maR_Kus

New member
Hi All,

I just have a quick question on the grid cell corners: I realized the variables XLAT_C and XLONG_C are computed by geogrid but their values are never used by WRF during the simulations.

float XLAT_C(Time, south_north_stag, west_east_stag) ;
XLAT_C:FieldType = 104 ;
XLAT_C:MemoryOrder = "XY " ;
XLAT_C:units = "degrees latitude" ;
XLAT_C:description = "Latitude at grid cell corners" ;
XLAT_C:stagger = "CORNER" ;
XLAT_C:sr_x = 1 ;
XLAT_C:sr_y = 1 ;

float XLONG_C(Time, south_north_stag, west_east_stag) ;
XLONG_C:FieldType = 104 ;
XLONG_C:MemoryOrder = "XY " ;
XLONG_C:units = "degrees longitude" ;
XLONG_C:description = "Longitude at grid cell corners" ;
XLONG_C:stagger = "CORNER" ;
XLONG_C:sr_x = 1 ;
XLONG_C:sr_y = 1 ;

I was wondering how can I retrieve the corner latitudes and longitudes runtime?

Thanks into advance for help,
Markus
 
Hi Markus, Many apologies for the long delay in response. I believe you would need to use some sort of post-processing to find those values. There's an NCL script that can convert points from i,j to lat,lon, which may be useful. See slide 31 from this NCL presentation.
 
Hi Kwerner,
thanks for the reply. Indeed I need this information runtime as I use WRF output to drive an another model. However, I will look how NCL computes the corners.
In the meantime I googled a while and I found these conversions:

X_corner(i,j) = real(0.5*(xlong_v(i-1,j)+xlong_v(i,j))
Y_corner(i,j) = real(0.5*(xlat_u(i,j-1)+xlat_u(i,j))

Nevertheless, the results I get with the above formulations are slightly different from the geogrid outputs.
Best,
Markus
 
Top