<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style=""><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"></div>
<div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">Hi,</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">Thank you for your help.</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">This script really helped me. However I should mention two points.</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">1- I think AMSR2 longitude starts from 0 (not 0.125); so may be following line should be added while determining coordinates:</div><div style=""> <font face="courier new, courier, monaco, monospace, sans-serif" style="" size="2">lon = (/ lon - .125 /)</font><br></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><span>which results lon = [/0 0.25 0.5 0.75 1.0 ... 359 359.25 359.5 357.75/]</span></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><span><br></span></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><span>2- If I have more than one year for input files, I mean following line:</span></div><div style="font-family: "bookman old style", "new york", times, serif;"><pre style="color: rgb(0, 0, 0); white-space: pre-wrap;"> <font size="2">fili = systemfunc("cd "+diri+" ; ls GW1AM2_<span style="background-color: rgb(173, 215, 115);">201</span>*h5")</font></pre>instead of:</div><div style="font-family: "bookman old style", "new york", times, serif;"><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 16px;"> <font size="2">fili = systemfunc("cd "+diri+" ; ls GW1AM2_<span style="background-color: rgb(253, 248, 105);">2017</span>*h5")</font></pre>I encounter</div><div style=""> <font style="" face="courier new, courier, monaco, monospace, sans-serif" size="2">Segmentation fault (core dumped)</font><br></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><br></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">I've searched a little for that, and I find some issues related on previous ncl versions. Is there still this issue on ncl6.5.0</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><br></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">I'll be thankful for having any idea about these two points.</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><br></div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">Sincerely</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;">Ehsan</div><div style="font-size: 16px; font-family: "bookman old style", "new york", times, serif;"><br></div>
</div><div id="yahoo_quoted_7708435438" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Tuesday, September 18, 2018, 8:05:59 PM GMT+4:30, Dennis Shea <shea@ucar.edu> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv0747838868"><div><div dir="ltr"><div dir="ltr"><div>There is an AMSR example: <b><br clear="none"></b></div><div><b><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Applications/HDF.shtml">http://www.ncl.ucar.edu/Applications/HDF.shtml</a><br clear="none"></b></div><div><b>Dee: amsr_1.ncl</b></div></div></div><br clear="none"><div class="yiv0747838868gmail_quote"><div class="yiv0747838868yqt4245478216" id="yiv0747838868yqt19680"><div dir="ltr">On Fri, Sep 14, 2018 at 10:28 PM Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:<br clear="none"></div><blockquote class="yiv0747838868gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532"><div><div><div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"><div><div><div><div><div style=""></div>
<div style="">Dear Dennis</div><div style="">Thank you so much for your helpful replies.<br clear="none"></div><div style="">Pardon me if I ask some questions with my responsibility to solve them. However sometimes some problems take much time and finally I couldn't find any solution for them. I'll be thankful if I could have ncl-talk help to overcome them. Beside that, solving some problems need more experiences, which I still don't have enough experience with ncl and also some data format. I always query my data with "panoply" or "ncl_filedump" or "ncdump -h", but the problem is that I don't know what should I do. It is obvious helping in these problems are priceless and until now I've got many helps from ncl-talk which kicking <span><span style="color:rgb(0,0,0);">me </span></span>forward much at doing my thesis. I just could appreciate for these helps.</div><div style=""><br clear="none"></div><div style="">However, it could be disturbing (!), but I encountered same problem with another data set, AMSR2.<br clear="none"></div><div style="">First I want to know whether is there any ncl script for AMSR2. I couldn't find anything in (<a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/">https://www.ncl.ucar.edu/Applications/</a>). If not, may I ask some help for AMSR2 data? I've attached three samples data of AMSR2. These data set don't have _FillValue, although it includes "-32767" (default _FillValue of short type) and "-32768" (default missing Value).</div><div style="">So I've tried<br clear="none"><font face="courier new, courier, monaco, monospace, sans-serif" size="2">sm@_FillValue<span style="white-space:pre-wrap;"> </span>:= getVarFillValue(sm)</font><br clear="none"></div><div style="">But what should I do about "-32768" values (missing_value)?</div><div style="">Also, since that ( <span>Geophysical_Data</span>) in AMSR2 is 3 dimensional I've changed some lines as below:</div><div><div><font size="2" face="courier new, courier, monaco, monospace, sans-serif"> sm_new = where(lsm.eq.0 , sm_new@_FillValue , sm_new(:,:<font color="#cb008e">,0</font>))</font></div><div><font size="2" face="courier new, courier, monaco, monospace, sans-serif"> sm_new = sm_new(::-1,:<font color="#cb008e">,:</font>)<br clear="none"></font></div><div><span><font size="2" face="courier new, courier, monaco, monospace, sans-serif"> sm_region := sm_new({latS:latN},{lonL:lonR}<font color="#cb008e">,:</font>)<br clear="none"></font></span></div><div><font size="2" face="courier new, courier, monaco, monospace, sans-serif"> AMSR2_fo = linint2_points(sm_region&longitude, sm_region&latitude, sm_region<font color="#cb008e">(time | :, latitude | :, longitude | :)</font>, True , stlon, stlat, 0)</font><br clear="none"></div><div style=""><br clear="none"></div><font face="old times, serif">Are they true?</font></div><div style=""><br clear="none"></div><div style=""><span>Another problem that is related to handle many h5 data, which resulted to following error:</span></div><div style=""><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2">HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> #000: H5F.c line 408 in H5Fis_hdf5(): unable open file</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> major: File accessibilty</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> minor: Not an HDF5 file</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> #001: H5Fint.c line 532 in H5F__is_hdf5(): unable to open file</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2">...</font></div><br clear="none"></div><div style=""><span><br clear="none"></span></div><div style=""><span>Could I have any reference page in ncl website</span> or any suggestion to overcome these problems.</div><div style=""><span><br clear="none"></span></div><div style=""><span>Sincerely</span></div><div style=""><span>Ehsan</span></div>
</div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462yahoo_quoted" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462yahoo_quoted_7923549978" style="">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, September 14, 2018, 8:10:40 AM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>SMOPS: soil Moisture Operational Products System <br clear="none"></div><div><a rel="nofollow" shape="rect" target="_blank" href="https://www.ospo.noaa.gov/Products/land/smops/"><b>https://www.ospo.noaa.gov/Products/land/smops/</b></a><br clear="none">Values over land only<br clear="none"></div><div><br clear="none"></div><div>[1] <b><span style="color:rgb(255,0,0);"><br clear="none"></span></b></div><div><span style="color:rgb(0,0,0);">The</span><b><span style="color:rgb(255,0,0);"> most important rule in data processing</span></b> is <span style="color:rgb(0,0,255);"><b>*Look at your data"</b></span>. <br clear="none"></div><div>Sometimes you have to look <b>carefully!</b></div><div><span style="color:rgb(255,0,0);"><b>This is a user responsibility.</b></span><br clear="none"></div><div><br clear="none"></div><div>netcdf NPR_SMOPS_CMAP_D20170410 {<br clear="none">dimensions:<br clear="none"> Longitude = 1440 ;<br clear="none"> Latitude = 720 ;<br clear="none">variables:<br clear="none"> <b>short</b> <b>Blended_SM(Latitude, Longitude) ;</b><br clear="none"> Blended_SM:long_name = "Blended Soil Moisture" ;<br clear="none"> Blended_SM:units = "m^3/m^3" ;<br clear="none"> <span style="color:rgb(0,0,255);"><b>Blended_SM:FillValue = -999s ; <=======</b></span><br clear="none"> Blended_SM:valid_range = 0s, 10000s ;<br clear="none"> Blended_SM:scale_factor = 0.0001f ;<br clear="none"> Blended_SM:add_offset = 0.f ;</div><div>[SNIP]<br clear="none"></div><div><br clear="none"></div><div>The NPR_SMOPS_CMAP file <b>does not conform to any netCDF convention</b>. Likely an oversight. It uses <span style="color:rgb(0,0,255);"><b>FillValue</b> <span style="color:rgb(0,0,0);">rather than</span> _<span><b>FillValue. </b><font color="#000000">The <b>_ </b>is important!!! NCL recognizes only <b>_FillValue </b>(<span style="color:rgb(0,0,255);"><span><font color="#000000">Climate and Forecast netCDF Convention) </font></span></span><b>.</b> Hence, NCL's <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt </b></a>will not properly unpack the "<b>short</b> <b>Blended_SM"</b> variable. Likely, this is the source of some of the interpolation issues.</font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000">How to fix this? <br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000">Replace:</font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> sm = <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt( </b></a>SMOPS_fi->Blended_SM )</font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000">with <br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> sm = <span style="color:rgb(0,0,255);"><span><font color="#000000">SMOPS_fi->Blended_SM</font></span></span> ; Read variable of type 'short'<br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> sm@<b>_FillValue </b>= sm@<b>FillValue ; add correct attribute to original variable<br clear="none"></b></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> printVarSummary(sm) ; Note <b>_FillValue</b> attribute<br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> <span style="color:rgb(0,0,255);"><span><font color="#000000">sm <b>:=</b> <b>short2flt</b>( sm )</font></span></span> ; Use NCL's overwrite syntax <b>:=</b><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000">Add coordinates which are not on the file. Another, oversight by the file creator!<br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span><font color="#000000"> sm!0 = "latitude"<br clear="none"> sm!1 = "longitude"<br clear="none"> sm&latitude = latitude<br clear="none"> sm&longitude = longitude<br clear="none"> printVarSummary(sm)<br clear="none"> printMinMax(sm, 0)<br clear="none"> print("---")<br clear="none"><br clear="none"></font></span></span></div><div><span style="color:rgb(0,0,255);"><span></span></span>============</div><div>[2] Using '<b>poisson_grid_fill</b>' <br clear="none"></div><div><br clear="none"></div><div> [a] will 'fill-in' gaps in the satellite mosaic swaths :-)<br clear="none"></div><div> [b] it will also put 'soil moisture' over the oceans and lakes. :-(<br clear="none"></div><div> <br clear="none"></div><div>You can use a<b>n</b> NCL function to mask out the oceans/lakes/ice/etc<b><br clear="none"></b></div><div> <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml"><b>http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml</b></a><br clear="none"></div><div><br clear="none"></div><div>%> ncl 20_SMOPS.poisson_fill_mask.ncl</div><div><br clear="none"></div><div>creates: SMOPS_FILL_MASK.png<br clear="none"></div><div>============</div><div><br clear="none"></div><div>[3] The following uses linint2_points_Wrap to perform the station interpolations.</div><div><br clear="none"></div><div>%> 20_SMOPS.poisson_fill_mask_linint2.ncl<br clear="none"></div></div></div></div></div></div></div></div></div></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462gmail_extra"><br clear="none"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462gmail_quote">On Wed, Sep 12, 2018 at 5:15 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462yqt6301167649" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462yqt06208"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div><span></span><div style="color:rgb(0,0,0);"><div><span style="color:rgb(38,40,42);">Hi,</span></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"></span><div><span style="color:rgb(38,40,42);">Again Thank you so much for your helpful comments.</span><br clear="none"></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282ydp68cf5210yahoo_quoted" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282ydp68cf5210yahoo_quoted_7529853277" style="color:rgb(0,0,0);"><div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282ydp68cf5210yiv7470115850"><div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"></span><div>Unfortunately after a few days I still have problem with interpolating data on station points. In spite of using "poisson_grid_fill" and "linmsg" to avoid getting Fill_Value on unstructured points, these don't work; all values for all dates and all points are Fill_value (-0.099900) (attached file: 20_SMOPS_Interp.txt). Could I have any suggestion to get interpolated values other than "-0.099900". I've used this script for some data set and it helps me a lot. But for some data set, like SMOPS data, it gives me just Fill_Value.</div><div>I know using "knnsearch" in matlab gives values except "-0.099900", however I want to interpolate with ncl.</div><div>I've attached the script (20_SMOPS_Interp.ncl) and also station points (2_stations.dat) and output file (20_SMOPS_Interp.txt). I've also put zipped input data (SMOPS_Data.tgz) on ftp.</div><div><br clear="none"></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"></span><div>I'll be thankful for any help.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div></div></div></div></div><br clear="none"></div><div><br clear="none"></div>
</div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yahoo_quoted" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yahoo_quoted_7180615196">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462">
</span><div>
On Friday, September 7, 2018, 8:25:16 PM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291"><div><div dir="ltr"><div>[1] No</div><div>[2] Yes<br clear="none"></div><div><br clear="none"></div><div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462"></span><pre> nlat = 720<br clear="none"> latitude = <b>fspan</b>(-49.875, 49.875, nlat)<br clear="none"> latitude@units = "<b>degrees_north</b>"<br clear="none"> latitude@long_name = "latitude"<br clear="none"> latitude!0 = "latitude"<br clear="none"> latitude&latitude = latitude<br clear="none"></pre><pre> printVarSummary(latitude)<br clear="none"> printMinMax(latitude,0)<br clear="none"><br clear="none"></pre><pre> mlon = 1440
longitude = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml"><b>lonGlobeFo</b></a>(mlon, "longitude", "longitude", "degrees_east") ; 0->360<br clear="none"> longitude = (/ longitude - 180. /) ; subtract 180 from all values
longitude&longitude = longitude ; update coordinates printVarSummary(lon)<br clear="none"> <br clear="none"> printVarSummary(longitude)<br clear="none"> printMinMax(longitude,0)<br clear="none"><br clear="none"></pre><pre> f = <b>addfile</b>("NPR_SMOPS_CMAP_D20170<a rel="nofollow" shape="rect" target="_blank" href="http://410.nc"> 410.nc</a>","r")</pre><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><br clear="none"> x = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt</b></a>( f->Blended_SM )<br clear="none"></div></div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><pre> x&latitude = latitude<br clear="none"> x&longitude = longitude <br clear="none"></pre><pre> printVarSummary(x)<br clear="none"><br clear="none">[3]/[4]<br clear="none"></pre><pre> xo = .... longitudes of land points...<br clear="none"></pre><pre> yo = ... latitudes ....<br clear="none"></pre><pre> xpts = <strong>linint2_points</strong>(x&longitude,x& latitude,x, False, xo,yo, 0)<br clear="none"></pre><pre> printVarSummary(xpts)<br clear="none"></pre><pre> printMinMax(xpts,0)<br clear="none"></pre><br clear="none"></div></div></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291gmail_extra"><br clear="none"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291gmail_quote"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5">On Tue, Sep 4, 2018 at 5:50 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></div></div><blockquote class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291yqt7914602477" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291yqt43162"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><div style="font-size:16px;"><div style="font-size:16px;"><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123"><div style="font-size:16px;"><div style="font-size:16px;"><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391"><div><div><span>Thank you so much for your nice reply, as always.</span><br clear="none"></div><div><font size="3" face="times new roman, new york, times, serif">I did your comments, however I encountered some difficulties and I'll be thankful if I could have any help about them, too.</font></div><div><font size="3" face="times new roman, new york, times, serif"><br clear="none"></font></div><div><font size="3" face="times new roman, new york, times, serif">1. Should I change</font></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291"></span><div><font size="3" face="courier new, courier, monaco, monospace, sans-serif"><span style="background-color:rgb(253,248,105);"></span></font><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font style="background-color:rgb(253,248,105);" size="3" face="courier new, courier, monaco, monospace, sans-serif">latitude = <b>fspan</b>(-49.875, 49.875, nlat)</font></pre></div><div><font size="3" face="times new roman, new york, times, serif">to</font></div><div><font size="2" face="times new roman, new york, times, serif"><span></span></font><pre><font style="background-color:rgb(253,248,105);" size="3" face="courier new, courier, monaco, monospace, sans-serif">latitude = <b>fspan</b>(-89.875, 89.875, nlat)</font></pre><div><font size="3" face="times new roman, new york, times, serif">or like longitude, use</font></div><div><span></span><pre style="margin-top:0px;margin-bottom:0px;padding:0px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0);"><span style="background-color:rgb(253,248,105);"><font size="3">lat = <strong style="margin:0px;padding:0px;">latGlobeFo</strong>(nlat, "lat", "latitude", "degrees_north")</font></span></pre><br clear="none"></div><font size="3" face="times new roman, new york, times, serif">2. Should I change</font></div><div style="font-size:16px;"><font size="2" face="times new roman, new york, times, serif"><span style="background-color:rgb(253,248,105);"></span></font><pre><font style="background-color:rgb(253,248,105);" face="courier new, courier, monaco, monospace, sans-serif">latitude@units = "degrees_east"</font></pre><span style="background-color:rgb(255,255,255);"><font face="times new roman, new york, times, serif">to</font></span></div><div><font size="2" face="times new roman, new york, times, serif"><span></span></font><pre style="white-space:pre-wrap;"><font style="background-color:rgb(253,248,105);" face="courier new, courier, monaco, monospace, sans-serif">latitude@units = "degrees_north"</font></pre><br clear="none"></div><div><font size="3" face="times new roman, new york, times, serif"><span></span></font><div><font size="3" face="times new roman, new york, times, serif">3. How should I control FillValue (-999s), because after running ncl script, it writes -0.1 for Nan value of the data, both in grided and interpolated output files.</font></div><div><font size="3" face="times new roman, new york, times, serif">4. However the most difficulty is the interpolating part, because all interpolated values for all station points got -0.1, means Nan. There is no value except -0.1 for any station points. Could anybody help me about this?</font></div><div><font size="3" face="times new roman, new york, times, serif">I've attached the output of interpolated file. I'll be thankful for any help.</font></div><div><font size="3" face="times new roman, new york, times, serif"><br clear="none"></font></div><div><font face="times new roman, new york, times, serif">Sincerely<br clear="none"></font></div></div><div><font size="3" face="times new roman, new york, times, serif">Ehsan</font></div><div><br clear="none"></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391yahoo_quoted" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123ydp541e2203yiv1133628391yahoo_quoted_6583562785">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
</div></div></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123yqt3572844941" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254ydp2d0caccyiv1638557123yqtfd53451"></div></div></div></div></div></div></div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqt8965435499" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqtfd57951"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291h5"><div>
On Friday, August 31, 2018, 6:14:53 PM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
</div></div></div></div><div><div id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123"><div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291h5"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><div dir="ltr">Sometimes, you have to read documentation associated with the file(s)<br clear="none"><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123gmail-st"><em>Soil Moisture</em> Operational Products System (<b><em>SMOPS</em></b>)</span><br clear="none"><br clear="none">The file has:<br clear="none"><br clear="none">netcdf NPR_SMOPS_CMAP_D20170410 {<br clear="none">dimensions:<br clear="none"><b> Longitude = 1440 ;<br clear="none"> Latitude = 720 ;</b><br clear="none">variables:<br clear="none"> <b>short</b> Blended_SM(<b>Latitude, Longitude</b>) ;<br clear="none"> Blended_SM:long_name = "Blended Soil Moisture" ;<br clear="none"> Blended_SM:units = "m^3/m^3" ;<br clear="none"> Blended_SM:FillValue = -999s ;<br clear="none"> Blended_SM:valid_range = 0s, 10000s ;<br clear="none"> Blended_SM:<b>scale_factor </b>= 0.0001f ;<br clear="none"> Blended_SM:<b>add_offset</b> = 0.f ;<br clear="none"><br clear="none"></div><div>[SNIP]<br clear="none"> :Product_Resolution = "0.25 degree" ;<br clear="none"> :Date_Start = "20170410" ;<br clear="none"> :Date_End = "20170410" ;<br clear="none"></div><div>[SNIP]<br clear="none"></div><div> ====<br clear="none"></div></div></div><div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5">It does not have Latitude[*] and Longitude[*] coordinates. However, <b>*you*</b> can create them. Then, use ESMF or (say)<a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_Wrap.shtml"><b> linint2_Wrap </b></a>or <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_points_Wrap.shtml"><b>linint2_points_Wrap</b></a> to perform the interpolation.<br clear="none"><br clear="none">====<br clear="none"><pre> nlat = 720<br clear="none"> latitude = <b>fspan</b>(-49.875, 49.875, nlat)<br clear="none"> latitude@units = "degrees_east"<br clear="none"> latitude@long_name = "latitude"<br clear="none"> latitude!0 = "latitude"<br clear="none"> latitude&latitude = latitude<br clear="none"></pre><pre> printVarSummary(latitude)<br clear="none"> printMinMax(latitude,0)<br clear="none"><br clear="none"></pre><pre> mlon = 1440
longitude = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml"><b>lonGlobeFo</b></a>(mlon, "longitude", "longitude", "degrees_east") ; 0->360<br clear="none"> longitude = (/ longitude - 180. /) ; subtract 180 from all values
longitude&longitude = longitude ; update coordinates printVarSummary(lon)<br clear="none"> <br clear="none"> printVarSummary(longitude)<br clear="none"> printMinMax(longitude,0)<br clear="none"><br clear="none"></pre></div></div><pre> f = <b>addfile</b>("NPR_SMOPS_CMAP_D20170<a rel="nofollow" shape="rect" target="_blank" href="http://410.nc"> 410.nc</a>","r")</pre><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><br clear="none"> x = <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml"><b>short2flt</b></a>( f->Blended_SM )<br clear="none"></div></div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><pre> x&latitude = latitude<br clear="none"> x&longitude = longitude <br clear="none"></pre><pre> printVarSummary(x)<br clear="none"></pre><pre> <br clear="none"></pre></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123gmail_extra"><br clear="none"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123gmail_quote"><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291h5">On Fri, Aug 31, 2018 at 5:45 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></div></div><blockquote class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqt7432983737" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqt23358"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div>Hi,</div><div>Until now I've asked some questions related to interpolating some dataset on some unstructured points (synoptic stations). Now I have a new data set which I'm not sure about appropriate method to interpolating. I put one of my data (<span>NPR_SMOPS_CMAP_D20170410.nc</span>) in <span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><a rel="nofollow" shape="rect" target="_blank" href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a>. <span><span style="color:rgb(0,0,0);">I'll be thankful if some one could refer me to correct script, like on (</span></span></span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/ESMF.shtml">https://www.ncl.ucar.edu/ Applications/ESMF.shtml</a><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">) or (</span></span></span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/regrid.shtml">https://www.ncl.ucar.edu/ Applications/regrid.shtml</a><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">), which interpolates my data on some special unstructured points.</span></span></span></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291"></span><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">However the printVarSummary(<span>Blended_SM</span>) result is as below:</span></span></span></div><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);"><br clear="none"></span></span></span></div><div><span style="font-size:13.3333px;white-space:pre-wrap;"><span style="color:rgb(0,0,0);font-size:16px;"></span></span><div><font face="times new roman, new york, times, serif">Variable: <span style="color:rgb(0,0,0);font-size:16px;white-space:pre-wrap;">Blended_SM</span></font></div><div><font face="times new roman, new york, times, serif">Type: float</font></div><div><font face="times new roman, new york, times, serif">Total Size: 4147200 bytes</font></div><div><font face="times new roman, new york, times, serif"> 1036800 values</font></div><div><font face="times new roman, new york, times, serif">Number of Dimensions: 2</font></div><div><font face="times new roman, new york, times, serif">Dimensions and sizes: [Latitude | 720] x [Longitude | 1440]</font></div><div><font face="times new roman, new york, times, serif">Coordinates:</font></div><div><font face="times new roman, new york, times, serif">Number Of Attributes: 5</font></div><div><font face="times new roman, new york, times, serif"> _FillValue : 1e+20</font></div><div><font face="times new roman, new york, times, serif"> long_name : Blended Soil Moisture</font></div><div><font face="times new roman, new york, times, serif"> units : m^3/m^3</font></div><div><font face="times new roman, new york, times, serif"> FillValue : -999</font></div><div><font face="times new roman, new york, times, serif"> valid_range : ( 0, 1 )</font></div><div><br clear="none"></div><br clear="none"></div><div><span style="white-space:pre-wrap;">Sincerely</span><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123HOEnZb"><font color="#888888"><br clear="none"></font></span></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123HOEnZb"><font color="#888888"></font></span><div><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap;"><span><span style="color:rgb(0,0,0);">Ehsan</span></span></span></div></div></div></div><span class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291"><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></span></blockquote></div><br clear="none"></div></div></div></div></div></div>
</div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqt8965435499" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqtfd12555"><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqt3572844941" id="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462m_-7232316620658698282yiv2670303291m_-7665546919046516254yiv1638557123yqtfd22236">
</div></div></div></div></div><div><div class="yiv0747838868m_-8666645524250268535ydp5285499dyiv3067938532ydp5b04a0c5yiv3413453462h5"><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></div></div></blockquote></div><br clear="none"></div></div></div></div>
</div>
</div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
</div>
</div></div></div></div></div></div></div></div></div></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</blockquote></div></div></div></div></div>
</div>
</div></div></body></html>