2

I am using pyproj.Proj to convert model and satellite data to a common grid so that I can upscale the model data and compare it to the satellite observations. The satellite observations are given in the EASE v2 grid while the model output is given in a Lambert conic conformal projection grid. (The datasets can be found in this link: Dataset ).

This is my attempt:

import numpy as np
import matplotlib.pylab as plt
import netCDF4 
import mpl_toolkits.basemap.pyproj as pyproj 

# Reading the EASE grid (over Nordic region), given in lon/lat
ease_lon = np.genfromtxt('ease36km_metcoop_lon.txt')
ease_lat = np.genfromtxt('ease36km_metcoop_lat.txt')

# Read model grid, projected x and y values in Cartesian format [m]
test = 'arome_metcoop_test2_5km_20170215_18.nc'   

OFF = netCDF4.Dataset(test, mode='r')
xx = OFF.variables['x'][:]
yy = OFF.variables['y'][:]
OFF.close()

xv, yv = np.meshgrid(xx,yy)

EASE = pyproj.Proj("+proj=cea +lat_0=0.0 +lon_0=0.0 +lat_ts=30 +ellps=WGS84 +datum=WGS84")

lcc = pyproj.Proj("+proj=lcc +lat_0=63 +lon_0=15 +lat_1=63 +lat_2=63 +no_defs +R=6.371e+06")

nlon, nlat = pyproj.transform(lcc,EASE, xv, yv)
elon, elat = EASE(ease_lon, ease_lat)

plt.figure()
plt.scatter(nlon, nlat)
plt.hold('on')
plt.scatter(elon,elat)
plt.title('Model grid converted to EASE v2 projection?')
plt.show() 

The resulting figure can be found here: Scatter plot. As I understand the pyproj.transform function it should convert the model lcc grid to the EASE grid format? However the scatter plot does not look very reasonable.

josteibl
  • 21
  • 2

0 Answers0