[ncl-talk] plot spatial distribution of BELD3 data, proj-provided lat/lon is good enough!
xiaoming Hu
yuanfangcan at hotmail.com
Thu Feb 7 09:16:15 MST 2019
Rick
Now I can plot correctly. Another question, how can I interpolate this dataset to other domains, for example WRF domain with lat2d/lon2d?
Thanks a lot!
Xiaoming
________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of xiaoming Hu <yuanfangcan at hotmail.com>
Sent: Thursday, February 7, 2019 10:07 AM
To: Rick Brownrigg; Hu, Xiaoming; Ncl-talk
Subject: Re: [ncl-talk] plot spatial distribution of BELD3 data, proj-provided lat/lon is good enough!
Rick
Thank you so much! using the lower-left corner of -102.7/26.2, I am able to get the following figure, which I believe it is good enough!
Nice Proj4 command! I tried on my machine, why do I get:
$ proj +proj=lcc +lon_0=-90 +lat_0=40 +lat_1=30 +lat_2=60
Rel. 4.9.1, 04 March 2015
<proj>:
projection initialization failure
cause: major axis or radius = 0 or not given
program abnormally terminated
$ invproj +proj=lcc +lat_0=40 +lat_1=30 +lat_2=60 +lon_0=-90 -f "%.6f"
Rel. 4.9.1, 04 March 2015
<invproj>:
projection initialization failure
cause: major axis or radius = 0 or not given
program abnormally terminated
Thanks a lot!
Xiaoming
________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Rick Brownrigg <brownrig at ucar.edu>
Sent: Thursday, February 7, 2019 9:41 AM
To: Hu, Xiaoming; Ncl-talk
Subject: Re: [ncl-talk] plot spatial distribution of BELD3 data, NetCDF data online
Hi Xiaoming,
Please let's keep this conversation on the ncl_talk, unless we really need to take it offline.
Are you familiar with Proj4? Playing around with that, I tried:
$ proj +proj=lcc +lon_0=-90 +lat_0=40 +lat_1=30 +lat_2=60
-90 40 <---input
0.00 0.00 <----returned value
This is a specification for a lambert conformal projection, with parameters:
+lon_0=-90 longitude at center of projection
+lat_0=40 latitude at center of projection
+lat_1=30 1st standard parallel
+lat_2=60 2nd standard parallel
I enter the lon/lat pair -90 40 and get back 0 0 in units of meters, which checks out as the center of the projection.
So, the inverse "de-projection" using the XORG/YORG values in your file yields:
$ invproj +proj=lcc +lat_0=40 +lat_1=30 +lat_2=60 +lon_0=-90 -f "%.6f"
-1296000 -1404000 <---- input
-102.797916 26.266793 <---returned value
Which I can believe -102.7/26.2 is the lower-left corner of tile #9, just eyeing the tilemap
That all said, I'm still not certain you are going to get good alignment across your area-of-interest just by specifying LL/UR corners, due to the distortion inherent to the lamber conformal. If you find that to be the case, the "native grids" approach I mentioned previously may be required.
Hope that helps...
Rick
On Thu, Feb 7, 2019 at 7:48 AM Hu, Xiaoming <xhu at ou.edu<mailto:xhu at ou.edu>> wrote:
Rick
Thanks for your reply, I think I agree with all your interpretation.
I tried to plot Juniper for tile 9 in this map: https://www.cmascenter.org/sa-tools/documentation/4.2/html/smoke_bio_inputs.html
using http://www.caps.ou.edu/micronet/temp/forJianPing/plot_xhu_BELD3_Juniper.ncl
The data is at http://www.caps.ou.edu/micronet/temp/forJianPing/b3_a.tile9.nzero.ncf
Based on my current technique, I need
; res at mpLeftCornerLatF = lat2d(0,0)
; res at mpLeftCornerLonF = lon2d(0,0)
to plot accurately to match tile 9 in https://www.cmascenter.org/sa-tools/documentation/4.2/html/smoke_bio_inputs.html
I wonder if you have a solution.
I am ccing to Dennis if he'd like to give it a try.
Thanks a lot
Xiaoming
On 2/7/19 8:32 AM, Rick Brownrigg wrote:
Hi Xiaoming,
Yes, NCL could interpret this -- in principle -- but not without more information. The data appear to be in a projected coordinate space. See the examples at
http://ncl.ucar.edu/Applications/native.shtml<https://urldefense.proofpoint.com/v2/url?u=http-3A__ncl.ucar.edu_Applications_native.shtml&d=DwMFaQ&c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&r=W32uvgk4VvmL2B6mi-37Lg&m=Rm0xpdrfxUY-YcoOdw7qGfGdEQxejDWnG_-7sJ75n0k&s=n80Mqz4HlpboRb4qhkfzNfZbPlcC7HtYajvc66OEtFA&e=>
The precise cartographic projection parameters are not immediately evident from the metadata given above, although we can make some guesses (it would be better to know for certain!).
These parameters:
:XCENT = -90. ;
:YCENT = 40. ;
:XORIG = -1296000. ;
:YORIG = -1404000. ;
:XCELL = 1000. ;
:YCELL = 1000. ;
XCELL/YCELL affirm the data are at 1 1km spacing. The XCENT/YCENT and XORIG/YORIG give the correspondence between the projected and geographical spaces for the geographical location 90W/40N, a central location in North America.
These parameters:
:P_ALP = 30. ;
:P_BET = 60. ;
:P_GAM = -90. ;
Looking at some of the maps at the EPA site you reference, these could very well be projection parameters for a Lambert Conformal projection, with P_ALP/P_BET being more commonly referred to as "standard parallels" and P_GAM being the "standard meridian". The values look quite right for North America, but again all of this is conjecture.
Hope this helps...
Rick
On Thu, Feb 7, 2019 at 5:08 AM xiaoming Hu <yuanfangcan at hotmail.com<mailto:yuanfangcan at hotmail.com>> wrote:
I try to plot spatial distribution of BELD data from https://www.epa.gov/air-emissions-modeling/biogenic-emissions-landuse-database-version-3-beld3<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.epa.gov_air-2Demissions-2Dmodeling_biogenic-2Demissions-2Dlanduse-2Ddatabase-2Dversion-2D3-2Dbeld3&d=DwMFaQ&c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&r=W32uvgk4VvmL2B6mi-37Lg&m=Rm0xpdrfxUY-YcoOdw7qGfGdEQxejDWnG_-7sJ75n0k&s=Ye9wZ_kUZae0pNvfQ_2QtXtPV5s87-kpy-5IXyYyuqM&e=>
the NetCDF files don't provide latitude/longitude, only with information of
:P_ALP = 30. ;
:P_BET = 60. ;
:P_GAM = -90. ;
:XCENT = -90. ;
:YCENT = 40. ;
:XORIG = -1296000. ;
:YORIG = -1404000. ;
:XCELL = 1000. ;
:YCELL = 1000. ;
:VGTYP = -9999 ;
:VGTOP = -9.e+36f ;
:VGLVLS = 0.f, 0.f ;
:GDNAM = "BELD3_TILE9 " ;
It there anyway NCL could interpret this ?
Thanks
Xiaoming
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk<https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&r=W32uvgk4VvmL2B6mi-37Lg&m=Rm0xpdrfxUY-YcoOdw7qGfGdEQxejDWnG_-7sJ75n0k&s=sNe_b6lm3kjqvbN4HwRR6RjdI8tI3YTPmX2-mIFg6oU&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190207/0f389371/attachment.html>
More information about the ncl-talk
mailing list