<div dir="ltr"><div>Hmmm...that all looks about right. Have you done a printVarSummary(var) to make sure that variable is what you think it is?</div><div><br></div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 28, 2018 at 1:01 PM Christian Adrián Álvarez Báez <<a href="mailto:christian.alvarez813@gmail.com">christian.alvarez813@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi, I'm triying to extract data with a mask from an WRF output using the example shapefiles_19.ncl. I had many errors so looking I found some modifications, including the shapefile_mask_data: Error: not a valid rectilinear, curvilinear, or unstructured grid that I think it was solved by using the copy_VarMeta function. But I'm stuck with the error:</div><div dir="ltr">fatal:Argument type mismatch on argument (1) of (shapefile_mask_data) can not coerce</div><div>caused on line 60 of my script. <br></div><div>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)">tc = </span><span style="color:rgb(220,220,170)">wrf_user_getvar</span><span style="color:rgb(212,212,212)">(a,</span><span style="color:rgb(206,145,120)">"tc"</span><span style="color:rgb(212,212,212)">,it) </span><span style="color:rgb(106,153,85)"></span><span style="color:rgb(212,212,212)"> </span></div><div><span style="color:rgb(212,212,212)">var=tc(</span><span style="color:rgb(181,206,168)">0</span><span style="color:rgb(212,212,212)">,:,:)</span></div><div><span style="color:rgb(220,220,170)">copy_VarMeta</span><span style="color:rgb(212,212,212)">(tc,var)</span></div></div>
</div><div><br></div><div>Line 60<br></div><div>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)"> data_keep = shapefile_mask_data(var,shp_filename,opt)</span></div><div><span style="color:rgb(212,212,212)"></span></div></div>
</div><div>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)"><br></span></div><div><span style="color:rgb(212,212,212)"></span></div></div>
</div><div><br></div><div> The script it's a little messy because of many modifications, I hope I made sense. I don't know if the problem could be the shape, it's just a simple polygon test projected on Lambert conformal conical as the WRF output. <br></div><div><br></div><div>I'm sending my script and my shape files if there is a clue.</div><div><br></div><div>Thank you very much,</div><div>Christian<br></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>