Hi John,
We are displaying WRF polar stereographic gridded files in VERDI - a Java application that uses netcdf-4.1 Java which contains WRFConvention.java.
http://www.unidata.ucar.edu/software/netcdf-java/v4.1/javadocAll/index.html
Apparently the map is not being projected correctly. The attached zip file contains a sample WRF NetCDF data file wrfinput_d01 and screen.gif which shows correct CMAQ (M3IO NetCDF) data and map on the left and WRF land-use data and mis-matched map on the right. The grids are almost identical and so should display almost the same. Note that South America and Africa are clearly mis-registered with respect to the land-use data where (most/all) red is ocean.
Some relevant attributes are:
west_east = 199 ;
south_north = 199 ;
float LU_INDEX(Time, south_north, west_east) ;
:DX = 108000.f ;
:DY = 108000.f ; :GRIDTYPE = "C" ;
:MAP_PROJ = 2 ;
:CEN_LAT = 90.f ;
:CEN_LON = -8.f ;
:TRUELAT1 = 45.f ;
:TRUELAT2 = 45.f ;
:MOAD_CEN_LAT = 90.f ;
:STAND_LON = -98.f ;
CEN_LON looks suspect. Perhaps it should be -98? In any case, which attributes are actually used by WRFConventions?
I don't see any information about the ellipsoid in the file. CMAQ usually uses a sphere of radius 6,370,000 meters. Perhaps WRF does too. It would seem that the constructors for all projectors should have ellipsoid input parameters e.g., double major_semiaxis, double minor_semiaxis.
Is there a fix available?
Thanks,
Todd 1-919-541-5500
Hi Todd:
This is what we are using:
Stereographic type=Projection grid_mapping_name = stereographic longitude_of_projection_origin = -98.0 latitude_of_projection_origin = 45.0 scale_factor_at_projection_origin = 0.8535533905932737 impl.class= ucar.unidata.geoloc.projection.Stereographic
Do you know what version of WRF generated this? I have a note that says
* Note: Apparently WRF netcdf files before version 2 didnt output the projection origin, so * we cant properly georeference them.
Can you send me the M3IO file? If its the same projection, that might give us a clue.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.