<div dir="ltr">Dennis:<div><br></div><div>Thank you.</div><div><br></div><div>Reading that data set in NCL would be difficult (I think) for NCL as it is non-standard input. </div><div><br></div><div>I appreciate that looking through that code would be time consuming, and what is important to confirm is that you can't pass the array of character variables -- which you did.</div><div><br></div><div>Along that note: I had written that one could write the file with character array values and read them in to the same NCL program after calling the WRAPIT program. Theoretically, this should be correct. However, I found that the file is not completely written and closed before going on to the rest of the NCL program. Instead, I suggest to create two NCL programs. The first will write the character information to the csv file, and the second will read the file and map it (with the rest of the variables).</div><div><br></div><div><br></div><div>Thanks again,</div><div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 4, 2017 at 11:16 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Yikes! Right now, I don't have the time to look at this in detail.<br></div><br>NCL and fortran (f77 here) can pass <b>one</b> string back and forth but <b>not</b> arrays of strings. Passing arrays of strings between NCL (written in C) <==>fortran (f77) is not possible. There is not standard for this. This issue has been noted: <a href="https://www.ncl.ucar.edu/Support/talk_archives/2009/0816.html" target="_blank">https://www.ncl.ucar.edu/Suppo<wbr>rt/talk_archives/2009/0816.htm<wbr>l</a></div><div><br></div><div>This has nothing to do with NCL per se. Historically, passing arrays of strings between fortran and C has been problematical. f95+ has features that facilitate this. However, NCL's WRAPIT was created well before this capability was made available.<br><br>Your script passes two<b> arrays </b>of type string from a subroutine which
reads the 'character' variables to an NCL script which has pre-allocated
string arrays to capture the character/string values read in fortran.<br><div><br>====<br>external READ_DATA "./read_sta_data.so"<br></div></div><div>[SNIP]<br></div><div> station = new((/40/),"string") ; <==== pre-allocated array of string<br> weather_type = new((/30/),"string")<br> READ_DATA::read_sta_data( \<br> year, \<br> month, \<br></div><div>[SNIP]<br></div><div> wet_bulb_temp,\<br> weather_type, \ ; <==== array of strings<br> station, \ ; " "<br> n_files)<br>====<br><br></div><div>I am not knowledgeable about the reasons why arrays of strings cause problems. (Nominally) Fortran passes by address while C passes by value (N'est ce pas?). Perhaps this is one issue issue.<br><br></div><div>I have a attached a simple example that illustrates what happens when arrays are passed back and forth betwee NCL and fortran.<br><br>===<br>I note that you have commented the following NCL lines.<br><br>; asc_file = "weather_type_old.csv"<br>; asc_file = "weather_type.csv"<span class=""><br>; lines = asciiread(asc_file,-1,"string"<wbr>)<br>; print(lines)<br>; delim = ","<br>; station = str_get_field(lines,1,delim)<br>; weather_type = str_get_field(lines,2,delim)<br> print("station = " + station)<br> print("weather_type = " + weather_type)<br></span></div><div><br></div><div>I think you will have to read the string values in NCL directly.<br><br></div><div>Actually, I would read the whole data set in NCL ... no fortran.<br><br></div><div>==> Example script<br></div><div><br></div><div>%> WRAPIT str.f<br><br></div><div>ignore warnings<br><br></div><div>%> ncl str.ncl<br><br>============<br>%> ncl str.ncl<br> <br>(0) NCL: stri=Foo<br>(0) NCL: stro=missing<span class=""><br> fortran: strin=Foo<br> fortran: strout=FooFoo <br>(0) after fortran: stro=FooFoo <br></span>(0) <br></div><div>(0) =========Multiple Strings =================<br></div><div>(0) <br>(0) NCL: STRI=Foo1 : STRO=missing<br>(1) NCL: STRI=Foo2 : STRO=missing<br>(2) NCL: STRI=Foo3 : STRO=missing<br>(0) <br> fortran: nin= 3 nout= 3<br> <br> fortran: n= 1 strin(n)=Foo1 <=== only string that is 'correct'<br> fortran: n= 2 strin(n)=@ <wbr> <=== not paseed correctly<br> fortran: n= 3 strin(n)=<br> <br> fortran: n= 1 strin(n)=Foo1 strout(n)=Foo1Foo<br> fortran: n= 2 strin(n)=@ strout(n)=@<br> fortran: n= 3 strin(n)= strout(n)=<br>(0) <br>(0) after fortran: STRI=Foo1 : STRO=Foo1Foo<br>(1) after fortran: STRI=Foo2 : STRO=missing<br>(2) after fortran: STRI=Foo3 : STRO=missing<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>D<br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 3, 2017 at 11:30 PM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdWnhCNDhyV1JfalE/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">eilat.txt</span></a><img style="display:none;opacity:0.55;float:right"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdY2FjVWMyLTRlSTg/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">get_ij.f</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdaWxiSGFOdzF5RVU/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">get_ij_land.f</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdZXBXNnl6QU5DQWM/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">jerusalem.txt</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdeDIyUWZ2c05Yd28/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">katzrin.txt</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdQURiNTR5UHlsckk/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">map_sta_data.ncl</span></a><img style="display:none;opacity:0.55;float:right"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdSXkxcjdTR2d0U2s/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">read_sta_data.f</span></a><img style="display:none;opacity:0.55;float:right"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdSGhoMVd3aW9hejA/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">shlomi.txt</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdZ2RpY01RWjZnTkE/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">tel_aviv.txt</span></a><img style="display:none;opacity:0.55;float:right"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdNmhpUHo4R2lCNTQ/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">wrfinput_d02</span></a><img style="display:none;opacity:0.55;float:right"></div>Hi Dennis:<div><br></div><div>Thank you for looking at this.</div><div><br></div><div>I am running into some problems.</div><div><br></div><div>1) I can define my variables within the *.f program as you indicated, but each of them must have n_files elements. WRAPIT read_sta_data.f compiles.</div><div><br></div><div>2) If I don't try to return to my ncl program, then I can write all array element of these variables to a csv file, but they are truncated to seven elements. Both the name and weather type no longer write out more than seven elements.</div><div><br></div><div>3) If I try to return to the NCL program (remove the "stop" at the end of the *.f program), I get a memory error.</div><div><br></div><div>4) I am not sure the cause of 2 (when I had defined the station and weather_type variables as *40, I had no problem writing complete variable to the weather_type.csv file (which I shouldn't need any more, since we're suppose to pass the variables back).</div><div><br></div><div>5) Regarding the memory error, I am probably not defining string correctly for an array.</div><div><br></div><div>Here is part of the memory error. Programs, files attached.</div><div><br></div><div>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">*** Error in `ncl': double free or corruption (out): 0x000000000c8637a0 ***</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">======= Backtrace: =========</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">/usr/lib64/libc.so.6(+0x7d1fd)<wbr>[0x2ba528ed61fd]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">./read_sta_data.so(read_sta_da<wbr>ta_+0x4fb3)[0x2ba52b48e60c]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">./read_sta_data.so(read_sta_da<wbr>ta_W+0xb3c)[0x2ba52b488d04]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl(CallINTRINSIC_PROC_CALL+0x<wbr>43)[0x8a282f]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl(_NclExecute+0x419)[0x8aa68<wbr>5]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl(yyparse+0x82c)[0x772f2e]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl(NclDriver+0xc19)[0x76eec7]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl(main+0x9)[0x76b4bd]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">/usr/lib64/libc.so.6(__libc_st<wbr>art_main+0xf5)[0x2ba528e7aaf5]</span></p>
<p class="m_3718670390835408031m_8005835765545533893gmail-p1"><span class="m_3718670390835408031m_8005835765545533893gmail-s1">ncl[0x76b3f9]</span></p></div><div><br></div><div>Thanks.</div></div><div class="m_3718670390835408031HOEnZb"><div class="m_3718670390835408031h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 5:27 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can pass strings to and from fortran subroutines. <br><div><br>============= test fortran subroutine: str.f<br><div>C NCLFORTSTART<br> subroutine teststr(strin,strout)<br> implicit none<br> character*(*) strin, strout<br>C NCLEND<br><br> print *,"fortran: strin=",strin<br><br> strout = strin // strin ! create return string<br><br> print *, "fortran: strout=", strout<br><br> return<br> end<br></div><div>=========================Creat<wbr>e str.so<br></div><div>%> WRAPIT str.f<br><br></div><div>There will be some warning messages<br></div><div><br>============== NCL script: str.ncl<br><div>external STRING "./str.so"<br><br> stri = "Foo" ; input<br> stro = new( 1, "string") ; reserve space for return string<br><br> STRING::teststr(stri, stro)<br><br> print("after fortran: stro="+stro)<br><br>=============<br></div><div>%> ncl str.ncl<br><br></div><div>=============output<br><br> fortran: strin=Foo<br> fortran: strout=FooFoo <br>(0) after fortran: stro=FooFoo <br><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_3718670390835408031m_8005835765545533893h5">On Wed, Aug 2, 2017 at 6:13 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_3718670390835408031m_8005835765545533893h5"><div dir="ltr">Hi:<div><br></div><div>As you may have read before, you can't pass string variables through the subroutine call using WRAPIT. Perhaps you could pass a single character, but I am not sure.</div><div><br></div><div>There is a simple way around this.</div><div><br></div><div>One can produce a csv file through a simple write statement in the *.f program. Then, open the file in ncl.</div><div><br></div><div>A one line output (here).</div><div><br></div><div>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>Tel Aviv University <span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>,<span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>Mostly Sunny <span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>,</span></p></div><div><br></div><div>Then, you can read it in the ncl program this way.</div><div><br></div><div>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>asc_file = "weather_type.csv"</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>lines = asciiread(asc_file,-1,"string"<wbr>)</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>print(lines)</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>delim = ","</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>station<span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>= str_get_field(lines,1,delim)</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>weather_type<span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>= str_get_field(lines,2,delim)</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>print("station = " + station)</span></p>
<p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-Apple-converted-space"> </span>print("weather_type = " + weather_type)</span></p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><br></p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1">Just in case you want to read in a real value, you can do the following.</p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1">
</span></p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1">Latitude = tofloat(str_get_field(lines,2,<wbr>delim)) </span></p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1">)</span></p><p class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-p1"><span class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail-s1"><br></span></p><div><br></div>-- <br><div class="m_3718670390835408031m_8005835765545533893m_-6508571065059995901m_8107626477234004170gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div></div>
<br></div></div>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_3718670390835408031m_8005835765545533893gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>