<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>The replacement of x and y greater than 1000 with the fill value did the trick.<br><br>Thank you again.<br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: thankar@live.com</pre><br><br><div><hr id="stopSpelling">Date: Mon, 22 Feb 2016 10:04:07 -0700<br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>From: brownrig@ucar.edu<br>To: thankar@live.com<br>CC: ncl-talk@ucar.edu<br><br><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>There are a couple of issues:<br><br></div>i) I think perhaps you have rows/columns transposed in calculating your x,y cells. I I replace the two do-loops with the following, I get coordinates that span the range reported in the file's metadata:<br><br>do i=0,numCols-1<br> x(:,i) = projectedMinX + i*cellSize<br>end do<br><br>do i=0,numRows-1<br> y(i,:) = projectedMinY + i*cellSize<br>end do<br><br></div>ii) At the maximum extremes of the cells, proj4 reports back "infinity" -- it perhaps represents a discontinuity in this particular projection? At any rate, if I replace thos INFs with _FillValue, I then get a map that looks like your previous map over Greece. Right after the call to transform_coordinate, try adding:<br><br> x = where(x.gt.1000., x@_FillValue, x)<br> y = where(y.gt.1000., y@_FillValue, y)<br><br></div>Hope that helps...<br></div>Rick<br><br></div><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On Mon, Feb 22, 2016 at 4:14 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear Rick<br><br>I encountered a new problem when trying to adapt the code for a bigger domain.<br><br>To begin with, when using the code for the Greek area image, everything works just fine.<br><br>I then tried to use the code for the visualization of a bigger domain. The code could did not compute correctly the maximum latitude and longitude and a chain of errors followed. Please see below:<br><br>[safnwc@192 example_scripts]$ ncl geos2LL_europe.ncl<br> Copyright (C) 1995-2014 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.2.1<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>(0) Span in X direction (meters): 3.59748e+06<br>(0) Span in Y direction (meters): 2.33731e+06<br>(0) calculated maxX: 2.77237e+06 vs. reported in file: 2.77237e+06<br>(0) calculated maxY: 5.05868e+06 vs. reported in file: 5.05868e+06<br>(0) longitude range: -42.10171820490142, inf<br>(0) latitude range: 25.96460103290488, inf<span><br>(0) gsn_csm_map_ce: Warning: you set mpMaxLonF to a value > 180, but<br></span>(0) didn't set mpCenterLonF. Setting mpCenterLonF to inf<br>warning:tofloat: there are 1 double larger than FLT_MAX, which has been flagged missing.<br>warning:tofloat: there are 1 double larger than FLT_MAX, which has been flagged missing.<br>fatal:Subscript out of range, error in subscript #0<br>fatal:An error occurred reading wharray<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 5843 in file /home/safnwc/ncl-6.2.1/lib/ncarg/nclscripts/csm/gsn_csm.ncl<br><br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 6639 in file /home/safnwc/ncl-6.2.1/lib/ncarg/nclscripts/csm/gsn_csm.ncl<br><br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 61 in file geos2LL_europe.ncl<br><br>fatal:Variable (map) is undefined<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 70 in file geos2LL_europe.ncl<br><br>fatal:Variable (map) is undefined<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 72 in file geos2LL_europe.nc<br><br><br>I send you the hdf file of the new domain, and my adapted code. I changed the definitions of x, y and z matrices to (/ Lines Cols/) from (/Cols Lines/) in your original script, and also the associated do loop limits just below them. Of course, i also used the European domain parameters. <br><br>I fail to see the reason for that failure, since the code for the smaller domain work perfectly.<span><br><br>Kind regards <br><br>Sakis<br><br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>Date: Wed, 17 Feb 2016 07:19:14 -0700<span><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br></span>From: <a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><div><div class="h5"><br><br><div dir="ltr"><div><div><div>Hi Sakis,<br><br></div>I have determined it is indeed a proj4 version issue, but fortunately with an easy to deploy fix. In stepping through the code, I discovered that the ellipse *must* be specified for lonlat projections, instead of defaulting to spherical as in previous versions of proj4 (although I can find nothing in the docs or ChangeLog that spells this out).<br><br></div>To fix in your script, replace the 2nd line that reads:<br><br> dstProj = "+proj=lonlat"<br><br></div><div>with<br><br> dstProj = "+proj=lonlat +ellps=sphere"<br><br></div><div>That should do it...<br></div><div>Rick<br></div><div><br><br></div></div><div><br><div>On Tue, Feb 16, 2016 at 10:46 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div><div><div>Hi,<br><br></div>I have been able to verify on my end that this problem is version specific to proj4. The script works fine on the slightly older 4.8.0 versions, but appears in the latest 4.9.1 proj4 (Sakis, can you verify this on your side -- what version gets reported if you simply type "proj" on the command line?). This seems like a bug in the proj4 library, but I can find no mention of it in their issues database. I will try to gather more information and file a bug report with the proj4 folks.<br><br></div>In the meantime, Sakis, are you able to down-version your proj4 library to something like 4.8.0?<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Rick<br></font></span></div><div><div><div><br><div>On Mon, Feb 15, 2016 at 2:46 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear Rick,<br><br>I understand that you did not manage to identify the problem. <br>If that is the problem , are there any suggestions regarding the visualization of SAF NWC (basically meteosat) products?<span><br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>Date: Mon, 8 Feb 2016 20:38:47 -0700<span><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br></span>From: <a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><div><div><br><br><div dir="ltr"><div><div>Hi Sakis,<br><br></div>Offhand I don't know what is going on here. It almost appears that the proverbial "rug has been yanked out from under us", with respect to the projection software -- I've used that package for over a dozen years, and "+proj=latlon" is/was by all accounts a legitimate projection spec. I get the same result as you on my system, which has the latest proj4 release -- I want to try and track down a system with an older release in the morning and see if I get the same results.<br><br></div>Rick<br></div><div><br><div>On Mon, Feb 8, 2016 at 9:10 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear Rick<br><br>I'm coming back with a problem regarding an earlier problem i had some time ago.<br><br>I was trying to visualize Meteosat projection data (for example the CTTH_HEIGHT parameter in the h5 file) and you provided the script i attach which is supposed to draw the png i also attach.<br> <br>However when i try to execute, i get the following message:<br><br>(0) Span in X direction (meters): 2.16929e+06<br>(0) Span in Y direction (meters): 1.53321e+06<br>(0) calculated maxX: 3.03041e+06 vs. reported in file: 3.03041e+06<br>(0) calculated maxY: 4.4706e+06 vs. reported in file: 4.4706e+06<br>FATAL ERROR: Can not make a projection out of <+proj=lonlat><br>fatal:TransformCoordinate: Couldn't transform coordinates.<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 38 in file geos2LL.ncl<br><br>(0) longitude range: 861115.75, 3030407.25<br>(0) latitude range: 2937395, 4470601<br>(0) gsn_csm_map_ce: Warning: you set mpMaxLonF to a value > 180, but<br>(0) didn't set mpCenterLonF. Setting mpCenterLonF to 1945761.5<br>warning:MapTransInitialize: mpMinLonF out of range: resetting<br>warning:MapTransInitialize: mpMaxLonF out of range: resetting<br>warning:MapSetTrans: map limits invalid - using maximal area<br>warning:mpMapLimitMode is not a valid resource in map at this time<br>(0) get_lat_values: Warning: Your latitude values do not fall between -90 and 90 inclusive.<br>(0) You will not get 'nice' latitude labels.<br>warning:Attempt to reference attribute (minor) which is undefined<br><br>I think the problem begins at <i><b>dstProj = "+proj=lonlat"</b></i>. <br>As a result nothing is plotted. <br>Could you help me?<br><br>I attach a data file in case you need it.<br><br>Thank you in advance<span><br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>Date: Fri, 5 Jun 2015 15:16:34 -0600<span><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br></span><span>From: <a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>CC: <a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a><br><br></span><div><div><div dir="ltr">Hi Sakis,<div><br></div><div>The file does indeed seem to have all the requisite projection information in it to calculate latlon coordinates, using, our interface to the proj4 library. I've attached a script that does just that. I've also attached the the plot it generates. I'm a bit troubled by the shape of the lat/lon grid, and by the fact that the spans in X/Y in meters do not align with what gets reported in Google Earth. However, the native projection is "geostationary view", and its possible that it imparts rather severe distortion of distance at the edges of the projection, so maybe the values are reasonable.</div><div><br></div><div>Do you have a feel for what the shape/extent of your data should look like?</div><div><br></div><div>Let me know what you think...</div><div>Rick</div><div><br></div><div><br></div></div><div><br><div>On Fri, Jun 5, 2015 at 12:53 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">
<span lang="EN-US">Dear Mary</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Thank you for your help!<br></span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">The speed
of the code was indeed an issue.</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Regarding
the lat / lon issue:</span><br>
<span lang="EN-US"><span>1.<span style="font:7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US">Yes, they are not equally spaced.</span><br>
<span lang="EN-US"><span>2.<span style="font:7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US">Yes, the whole information about the
way the rasterized data should be assigned to lat/lon is (to my knowledge) included
in the h5 files attributes. </span><br>
<span lang="EN-US"><span>3.<span style="font:7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US">I have a way to bypass the problem
by loading 2 separate files that provide lat/lon info. However I would like to
be independent of them, for a series of reasons.</span><br>
<span lang="EN-US">I’m looking
forward to Rick’s response.</span><br><span>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Kind
regards</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Sakis</span><br>
<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>Date: Thu, 4 Jun 2015 22:59:55 -0600<span><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>From: <a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br></span>CC: <a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a><div><div><br><br><div dir="ltr"><div style="font-size:small;">Dear Sakis,</div><div style="font-size:small;"><br></div><div style="font-size:small;">You've been so patient, thanks! As a start, I recommend that you use raster mode, as it is much faster:</div><div style="font-size:small;"><br></div><div>
<p style="font-size:small;"><span> res@</span><span>cnFill</span><span>Mode</span><span> = </span><span>"RasterFill"</span></p><p style="font-size:small;"><span>The code ran in about 1 second, compared to minutes before. </span></p><p style="font-size:small;">The issue here is that you don't have lat/lon arrays on the file, so you have to either construct them yourself, as you are trying to do with the fspan function, or else if you know the exact map projection, then you can just draw the contours in the correct map project, with res@tfDoNDCOverlay = True. This is basically telling NCL that you know what the projection is, and to not require lat/lon coordinates.</p><p style="font-size:small;">I think the use of "fspan" to generate the lat/lon values may be too simplistic, as this is assuming your lat/lon values are equally spaced, and not rotated. I have a feeling that neither of these conditions are true for your data. But, I could be wrong! I just know that the plot doesn't look quite right if you run the script as it.</p><p style="font-size:small;">I can't tell from your file what the correct map projection is, as I'm not familiar with the terminology it's using. It looks like the information is all there in the file attribute information:</p> GEOTRANSFORM_GDAL_TABLE : -5570248.832537, 3000.403357, 0.000000, 5570248.832537,0.000000, -3000.403357<br> PROJECTION : +proj=geos +a=6378169.0 +b=6356583.8 +lon_0=0.0 +h=35785831.000, -3000.403357<br><br> PROJECTION_NAME : GEOS<+000.0>a=6378169.0 +b=6356583.8 +lon_0=0.0 +h=35785831.000, -3000.403357<br> REGION_NAME : Greece000.0>a=6378169.0 +b=6356583.8 +lon_0=0.0 +h=35785831.000, -3000.403357<br> XGEO_LOW_RIGHT : 3030407.390714755<br><br> XGEO_UP_LEFT : 861115.<a target="_blank">7635001335</a><br> YGEO_LOW_RIGHT : 2937394.886643311<br> YGEO_UP_LEFT : 4470601.002143549<br><br>My guess is that you might be able to use one of our unadvertised, internal GDAL transformation routines to convert this information into lat/lon coordinates. I've CC'ed Rick Brownrigg who may know something about this.<br><br><br>--Mary<br><br><br></div></div><div><br><div>On Sun, May 31, 2015 at 1:48 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear Mary<br><br>I attached the latets script that was prepared for me along with a sample dataset (h5 file).<br><br>Thank you for your interest and help.<span><br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>Date: Sat, 30 May 2015 15:34:05 -0600<span><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>From: <a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br></span>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><div><div><br><br><div dir="ltr"><div style="font-size:small;">Dear Sakis,</div><div style="font-size:small;"><br></div><div style="font-size:small;">Can you provide the data and the latest script that you are using, so we can take a look? You can use our ftp if you don't have a place to put it:</div><div style="font-size:small;"><br></div><div><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP" target="_blank">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a><br></div><div><br></div><div>--Mary</div><div><br></div></div><div><br><div>On Thu, May 28, 2015 at 2:05 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr"><span><span lang="EN-US">Good
morning to all!</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Following the
earlier conversation (to which I respond) I think I have the obligation to
clarify some issues, since these conversations are available to all users, and
they are used to solve various kinds of problems. </span><br>
<span lang="EN-US">After doing
some more tests, I found out that the otherwise elegant and technically
flawless script that was kindly prepared for me, does not illustrates correctly
the CTTH_HEIGHT field. The problem is related to the fact that the line/column
space of the raster data does not refer to a regular lat/lon space. In simple
words the pixels of the raster data are not equal in lat/lon dimensions.</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Regarding
more technical issues: </span><br>
<span lang="EN-US">XGEO_LOW_RIGHT,
XGEO_UP_LEFT, YGEO_LOW_RIGHT, YGEO_UP_LEFT are not given in degrees but in meters.</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">dims =
dimsizes(CT) , lat = fspan(minLat, maxLat, dims(0)) and lon = fspan(minLon,
maxLon, dims(1)) are producing <span> </span>a regular
grid (which is not correct)</span><br>
<span lang="EN-US"> </span><br>
<span lang="EN-US">It would be
really helpful if a script could project correctly Meteosat fields (I think safnwc
is using the Meteosat grid) but I’m not sure that such a thing exists.</span><br>
<span lang="EN-US"> </span><br>
</span><span lang="EN-US">Kind
regards</span><br><span>
<span lang="EN-US"> </span><br>
<span lang="EN-US">Sakis</span><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr><span>From: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>To: <a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a><br>Date: Sat, 21 Feb 2015 08:29:02 +0000<br>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br></span><div><div>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br><br>
<div dir="ltr">Mary, thank you for your input!<br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br><div><hr>Date: Fri, 20 Feb 2015 09:46:02 -0700<br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>From: <a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a><br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>CC: <a href="mailto:huangwei@ucar.edu" target="_blank">huangwei@ucar.edu</a>; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br><br><div dir="ltr"><div style="font-size:small;">The issue with "namedcolor2rgb" is not really an issue. The code should still work. The error message is just misleading, but can be ignored.</div><div style="font-size:small;"><br></div><div style="font-size:small;">We have fixed the incorrect error message for the V6.3.0 release coming next month.</div><div style="font-size:small;"><br></div><div style="font-size:small;">--Mary</div><div style="font-size:small;"><br></div></div><div><br><div>On Fri, Feb 20, 2015 at 1:46 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Wei,<br><br>Your help is more than appreciated.<br><br>I will update my NCL version.<br><br>Kind regards<span><br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>From: <a href="mailto:huangwei@ucar.edu" target="_blank">huangwei@ucar.edu</a><br>Date: Thu, 19 Feb 2015 09:23:14 -0700<div><div><br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br><br><div dir="ltr"><div style="font-family:verdana,sans-serif;">Sakis,</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">Attached is script which looks more like what you see with HDFview,</div><div style="font-family:verdana,sans-serif;">but used a whole user-defined color table.</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">"gsdtol" is a standard color-table name, in NCL 6.2.1. Your NCL of 6.1.2</div><div style="font-family:verdana,sans-serif;">is a little bit old, and I strongly suggest you update your NCL to the newest version.</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">Compare the newly attached script and the script before,</div><div style="font-family:verdana,sans-serif;">you'll be able to figure out that the difference is the projection applied.</div><div style="font-family:verdana,sans-serif;">So you can turn on/off those options based on your requirement.<br></div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">A new png file is attached as well.</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">Regards,</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;">Wei</div><div style="font-family:verdana,sans-serif;"><br></div><div style="font-family:verdana,sans-serif;"><br></div></div><div><br clear="all"><div><div><div dir="ltr"><font face="tahoma, sans-serif">================================================</font><div><font face="tahoma, sans-serif">1850 Table Mesa Dr.</font></div><div><font face="tahoma, sans-serif">Boulder, CO 80307</font></div><div><font face="tahoma, sans-serif">Phone: <a target="_blank">303-497-8924</a></font></div></div></div></div>
<br><div>On Thu, Feb 19, 2015 at 4:07 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear Wei<br><br>I'm more than thankful for your script! It is excellent in correctly reading my data and more or less what i wanted regarding the visualization.<br>I have just 3 comments:<br>1. I would really like to see the drawn field (in example the CT) even over land. How can i do this?<br>2. When i run the script in my machine i get the following warnings:<br><br><b><i>(0) Warning: namedcolor2rgb: 'gsdtol' is not a valid named color.<br>(0) Will return missing values for this color.<br></i></b><br>Is 'gsdtol' a custom made color? In this case maybe i should replace it.<br><br>3. In the example HDFView visualization i provided the grid was not "tilted" to the left (a projection issue i guess!). How should i make your visualization, so it looks like the HDFView one?<br><br>Thank you in advance!<span><br><br>Sakis<br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre><br><br></span><div><hr>From: <a href="mailto:huangwei@ucar.edu" target="_blank">huangwei@ucar.edu</a><br>Date: Wed, 18 Feb 2015 13:26:21 -0700<br>Subject: Re: [ncl-talk] Visualization of SAF NWC products<br>To: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a><br>CC: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><div><div><br><br><div dir="ltr"><div style="font-family:verdana,sans-serif;"><div style="font-size:12.8000001907349px;">Sakis,</div><div style="font-size:12.8000001907349px;"><br></div><div style="font-size:12.8000001907349px;">You may take a look of the attached script and pdf file to see if these are what you wanted.</div><div style="font-size:12.8000001907349px;"><br></div><div style="font-size:12.8000001907349px;">Thanks,</div><div style="font-size:12.8000001907349px;"><br></div><div style="font-size:12.8000001907349px;">Wei</div><div><br></div><div><br></div></div></div><div><br clear="all"><div><div><div dir="ltr"><font face="tahoma, sans-serif">================================================</font><div><font face="tahoma, sans-serif">1850 Table Mesa Dr.</font></div><div><font face="tahoma, sans-serif">Boulder, CO 80307</font></div><div><font face="tahoma, sans-serif">Phone: <a target="_blank">303-497-8924</a></font></div></div></div></div>
<br><div>On Wed, Feb 18, 2015 at 1:38 AM, Athanasios Karagiannidis <span dir="ltr"><<a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Dear sirs/madams<br><br>I want to visualize SAF NWC output data using ncl. They are included in an h5 file.<br>These data are not in a simple lat-lon grid.<br>After an earlier contact with you i managed to visualize them by creating such a grid, but i feel that the image is not accurate.<br>What i want to help me with, is to tell me weather there is a standard way or an already existing script to visualize correctly that kind of data.<br>To help you I provide the following:<br><br>1. A sample datafile.<br>2. The printVarSummary output<br>3. A screenshot of the HDFView visualization of the variable where the Variable info are shown (more or less the same info with printVarSummary).<br>4. The script i used (although, i do not think that you need that!). The lat/lon limits that i have n my script are not acurate. I used them to make the visualization.<br><br><br>---------- printVarSummary------------------------------<br><br>ncl 2> printVarSummary(CT)<br><br>Variable: CT<br>Type: ubyte<br>Total Size: 370688 bytes<br> 370688 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [DIM_000 | 512] x [DIM_001 | 724]<br>Coordinates: <br>Number Of Attributes: 11<br> CLASS : IMAGE_INDEXED<br> ID : CTTH_HEIGHTED<br> IMAGE_COLORMODEL : RGBH_HEIGHTED<br> IMAGE_SUBCLASS : IMAGE_INDEXED<br> IMAGE_VERSION : 1.0GE_INDEXED<br> N_COLS : 724<br> N_LINES : 512<br> OFFSET : -2000<br> PALETTE : ��8�3<br> PRODUCT : CTTHE_INDEXED<br> SCALING_FACTOR : 200<br><br>---------------------------------------------------------------------------------<br><br>---------------- My Script ---------------------------------------------------<br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br><br>begin<br>cdf_file = addfile("SAFNWC_MSG2_CTTH_200812121100_Greece______.h5","r")<br>CT = cdf_file->CTTH_HEIGHT(:,:)<br><br> res = True<br><br> lat = fspan(50,20,512) ; A.K. -- reverse the matrix<br> lon = fspan(10,30,724)<br> CT!0 = "lat" ;-- set name of CT dimension 0<br> CT!1 = "lon" ;-- set name of CT dimension 1<br> CT&lat = lat ;-- assign lat array to CT<br> CT&lon = lon ;-- assign lon array to CT<br> CT&lat@units = "degrees_north" ;-- set the units of the named coordinate lat<br> CT&lon@units = "degrees_east" ;-- set the units of the named coordinate lon<br><br>res@gsnAddCyclic = False<br>res@tiMainString = "Default Color" ; main title<br>res@cnFillOn = True ; turn on color fill<br> res@mpMaxLatF = 50 ; choose subregion <br> res@mpMinLatF = 20<br> res@mpMaxLonF = 30<br> res@mpMinLonF = 10<br><br>xwks = gsn_open_wks("pdf","CloudTops")<br>plot = gsn_csm_contour_map(xwks,CT,res)<br>end<br><br>--------------------------------------------------------------------------------<br><br>Thank you in advance.<br><br><br>Sakis<br><br><br><br><br><pre>Athanasios F. Karagiannidis<br>Physicist, PhD Meteorology and Climatology<br>E-mail: <a href="mailto:thankar@live.com" target="_blank">thankar@live.com</a></pre>                                            </div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div></div></div></div>                                            </div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div>                                            </div>
<br>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div></div></div>                                            </div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>                                            </div></div>
</blockquote></div><br></div></div>                                            </div></body>
</html>