<div dir="ltr"><div class="gmail_default" style="font-size:small">Yi Lu,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We have a examples page for precipitation, which includes an example for GPM data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/HiResPrc.shtml">http://www.ncl.ucar.edu/Applications/HiResPrc.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">See example "gpm_1.ncl".</div><div class="gmail_default"><br></div><div class="gmail_default">There were a few issues with your script.</div><div class="gmail_default"><br></div><div class="gmail_default">[1] One thing that is important to note about GPM data is that it comes in as "lon x lat", and in order to plot it with NCL, it needs to be reordered to "lat x lon".</div><div class="gmail_default"><br></div><div class="gmail_default">This is why it's so important to look at your data! I added these four lines to help give me a better idea of what your data looks like:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">printVarSummary(gpmPre)</font></div><div class="gmail_default"><font face="monospace, monospace">printMinMax(gpmPre,0)</font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">print("Your data contains " + num(.not.ismissing(gpmPre)) + " valid values.")</font></div><div class="gmail_default"><font face="monospace, monospace">print("Your data contains " + num(ismissing(gpmPre)) + " missing values.")</font></div><div class="gmail_default"><br></div><div class="gmail_default">Note: there's a nice function called "stat_dispersion" that's also very useful for printing statistics about your data:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml</a><br></div><div class="gmail_default"><br></div></div><div class="gmail_default">To reorder the data, you can use the "transpose" function or named dimensions to reorder:</div><div class="gmail_default"><br></div><div class="gmail_default">Using transpose:</div><div class="gmail_default">
<p class="gmail-p1"><span class="gmail-s1"> gpmPre = transpose(iFile->precipitationCal)</span></p><p class="gmail-p1">Using named dimensions:</p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1"><span class="gmail-s1"> gpmPre = iFile->precipitationCal(lat|:,lon|:)</span></p><p class="gmail-p1">[2] The contours levels you were choosing were not ideal for this particular dataset. I changed them to:</p><p class="gmail-p1"> res@cnLevelSelectionMode = "ExplicitLevels"<br> res@cnLevels = (/0.1,0.5,1,2.5,5,10,12,15,20,25,30,35,40,45,50/) ; "mm/hr" </p><p class="gmail-p1">[3] Your data is regional, so I zoomed in on it using the mpMinLatF/mpMaxLatF/mpMinLonF/mpMaxLonF resources.</p><p class="gmail-p1">[4] I removed the string processing code for the date because it wasn't working on the file you gave me.</p><p class="gmail-p1">Please see the attached modified script and PNG image.</p><p class="gmail-p1"><br></p><p class="gmail-p1">--Mary</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 29, 2016 at 7:32 AM, 易路 <span dir="ltr"><<a href="mailto:dg1225033@smail.nju.edu.cn" target="_blank">dg1225033@smail.nju.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, all</div><div> </div><div>I planed to draw a contour map of GPM 3IMERG data, but it failed to form contours, and showed the following errors. To check this problem, the ascii values of the precipitationCal field were exported, but almost of the output were missing... Would you please help me check the problems? Thans very much!</div><div> </div><div>The script , GPM data and output ascii data are uploaded to the accessory. Thanks a lot!</div><div>;;;;;;;;showed errors;;;;;;;;;;;;;;;;;;;;;;</div><div>(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br>(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.<br>(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br>fatal:Dimension sizes on right hand side of assignment do not match dimension sizes of left hand side<br>;;;;;;;;;;;;;;;error end;;;;;;;;;;;;;;;;;;;;;</div><div> </div><div> </div><div>Yi Lu</div><div><u></u><div style="color:rgb(144,144,144);font-family:Arial Narrow;font-size:12px"><br><br><br><br></div><div style="color:rgb(0,0,0);font-family:Verdana;font-size:14px"><div style="overflow:hidden"><table class="m_-9067685131085321298preview_table"><tbody><tr><td valign="middle"><img id="m_-9067685131085321298preview_qrcode" src="https://exmail.qq.com/cgi-bin/setting_qrcode_card?action=qrcode_card&alias=dg1225033@smail.nju.edu.cn&key=33b1e5708e6a55b5"></td><td valign="middle" style="color:rgb(160,160,160);font-size:12px"><h4 class="m_-9067685131085321298name" style="margin:0px;color:rgb(0,0,0);line-height:28px;font-size:14px;font-weight:bold">易路</h4><p class="m_-9067685131085321298department" style="margin:0px">南大邮件系统/学生/博士生/12级博士生</p><p class="m_-9067685131085321298addr" style="margin:0px;color:rgb(160,160,160);line-height:22px">南京市汉口路22号 </p></td></tr></tbody></table></div></div><u></u></div><div> </div><div><u></u><u></u></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>