<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="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>Tel Aviv University <span class="gmail-Apple-converted-space"> </span>,<span class="gmail-Apple-converted-space"> </span>Mostly Sunny <span class="gmail-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="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>asc_file = "weather_type.csv"</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>lines = asciiread(asc_file,-1,"string")</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>print(lines)</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>delim = ","</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>station<span class="gmail-Apple-converted-space"> </span>= str_get_field(lines,1,delim)</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>weather_type<span class="gmail-Apple-converted-space"> </span>= str_get_field(lines,2,delim)</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>print("station = " + station)</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>print("weather_type = " + weather_type)</span></p><p class="gmail-p1"><br></p><p class="gmail-p1">Just in case you want to read in a real value, you can do the following.</p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1"><span class="gmail-s1">Latitude = tofloat(str_get_field(lines,2,delim)) </span></p><p class="gmail-p1"><span class="gmail-s1">)</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><div><br></div>-- <br><div class="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></div>