[ncl-talk] Map Reprojection, Spatial Aggregation and Regridding

Bill Ladwig ladwig at ucar.edu
Thu Dec 6 14:53:03 MST 2018


Hi Scott,

See this:
http://mailman.ucar.edu/pipermail/ncl-talk/2016-October/007059.html

Remember when setting up the Proj4 Lambert Conformal string for WRF to use
a sphere with a radius of 6370000. I believe that function will give you
fractional x,y values, which you'll need to do some kind of interpolation
(or nearest neighbor if that's good enough) to do your computation.

Hope this helps,

Bill


On Wed, Dec 5, 2018 at 1:58 PM Scott Capps <scapps at atmosdatasolutions.com>
wrote:

>
> I have created a NetCDF file with data (terrain slope) on the WGS84 4326
> map projection (ncdump -h output shown below):
>
> dimensions:
> lon = 27382 ;
> lat = 25569 ;
> variables:
> char crs ;
> crs:grid_mapping_name = "latitude_longitude" ;
> crs:long_name = "CRS definition" ;
> crs:longitude_of_prime_meridian = 0. ;
> crs:semi_major_axis = 6378137. ;
> crs:inverse_flattening = 298.257223563 ;
> crs:spatial_ref = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS
> 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]]"
> ;
> crs:GeoTransform = "-121.3651264724438 0.0002790528478797247 0
> 39.07036311976184 0 -0.0002790528478797247 " ;
> double lat(lat) ;
> lat:standard_name = "latitude" ;
> lat:long_name = "latitude" ;
> lat:units = "degrees_north" ;
> double lon(lon) ;
> lon:standard_name = "longitude" ;
> lon:long_name = "longitude" ;
> lon:units = "degrees_east" ;
> float Band1(lat, lon) ;
> Band1:long_name = "GDAL Band Number 1" ;
> Band1:_FillValue = -9999.f ;
> Band1:grid_mapping = "crs" ;
>
> // global attributes:
> :GDAL_AREA_OR_POINT = "Area" ;
> :Conventions = "CF-1.5" ;
> :GDAL = "GDAL 2.3.2, released 2018/09/21" ;
> :history = "Wed Dec 05 11:41:45 2018: GDAL CreateCopy(
> territory_epsg4326_slope.nc, ... )" ;
> }
>
> And, I would like to calculate the average terrain slope in each grid cell
> on my coarser WRF domain (2km resolution).
>
> Can NCL correctly handle the re-projection from the file above:
>
> Geodetic CRS: WGS84
> Datum: World Geodetic System 1984
> Ellipsoid: WGS 84
> Prime Meridian: Greenwich
>
> to my WRF Lambert Conformal Conic projection while calculating the average
> terrain slope in each overlapping, coarser resolution WRF gridcell?
>
> Any help or suggestions are appreciated.
>
> Thank you,
>
> Scott
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181206/6b835071/attachment.html>


More information about the ncl-talk mailing list