Problem with Rotated LatLon geogrid

Any problems/questions that might not fall into the other topics in this category.

Problem with Rotated LatLon geogrid

Postby nedcr » Mon Sep 28, 2020 4:21 am

Not sure if this post is in the right place, please move it if not.

I have a WRF output dataset from the NARCliM project, and am trying to use the data by using the rotated pole specs, but the grid is not lining up.

The grid specifications from the WPS file supplied by the NARCliM team is this:

Code: Select all
&geogrid
 parent_id         =   1,   1,
 parent_grid_ratio =   1,   5,
 i_parent_start    =   1,  82,
 j_parent_start    =   1,  36,
 e_we              =  216, 326,
 e_sn              =  145,  201,
 geog_data_res     = '10m','2m',
 dx = 0.44
 dy = 0.44
 map_proj = 'lat-lon',
 ref_lat   =  -24.26,
 ref_lon   = 147.63,
 pole_lat= 60.31
 pole_lon= 321.38
 stand_lon = 32.37,
 geog_data_path = '../../DATA/geog'
/


As far as I can work out, this should use the rotated pole lat/lon of 60.31/141.38 - this is the same rotated pole as the CORDEX AUS-44 domain. That's what the actual dataset says too, the rotated ole spec in the netcdf file is:

Code: Select all
Attributes:
    grid_mapping_name:          rotated_latitude_longitude
    dx_m:                       9783.618
    dy_m:                       9783.618
    grid_north_pole_latitude:   60.31
    grid_north_pole_longitude:  141.38


However, plotting the data with that grid results in this plot (using cartopy and xarray):

Code: Select all
crs_map = ccrs.PlateCarree()
rotated_pole_n = ccrs.RotatedPole(141.38, 60.31)

ax = plt.axes(projection=crs_map)
ax.coastlines()
dsn.tasmax.plot(ax=ax, transform=rotated_pole_n,
                cmap='inferno', alpha=0.5)


Image
https://imgur.com/luxOiqc

The data is significantly mis-aligned - it's off by about 85km near Adelaide.

By trial and error, I've found that this rotated pole gets very close:

Code: Select all
rotated_pole_n = ccrs.RotatedPole(
    147.38, 60.6,
    central_rotated_longitude=5.1)


Image
https://imgur.com/g5bzB6P

However, these numbers don't seem to correspond to anything in the namefile, and moving that 5.1° shift into the pole_longitude results in a significantly worse projection. I have tried as many other combinations of the geogrid latlon spec in the cartopy RotatedPole as I can think of, and none of them provide reasonable results.

I should note that the actual lat/lon values in the output (as opposed to the rlat/rlon values) are correct - plotting a scatter plot using the lat/lon values instead of the grid results in points that are in the right place according to the coastlines. But this isn't useful for my purposes, ans I need to interpolate between grid points in xarray, and for that I need to use the rlat/rlon grid.

I'm not sure if this is something to do with a mis-specified pole, a bug in WRF or Cartopy, or something else. The NARCliM authors tell me that there wasn't any post-processing done on the grid.

Does anyone know what I might be doing wrong, or what might cause this problem?
nedcr
 
Posts: 1
Joined: Tue Mar 12, 2019 12:48 am

Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 9 guests

cron