<P><BR>Hi,</P>
<P>Have anyone ever processed a year of Canadian Meteorological Centre (CMC) Daily Snow Depth Analysis Data, in ascii format, into netcdf using NCL? If you did, could you share your script with me? </P>
<P>I tried to process a day of CMC snow depth data and plot it using the following script which is similar to the script on NCL website <A href="http://www.ncl.ucar.edu/Applications/nic_ims.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/nic_ims.shtml</A> . But the coordinates of the snow depth was wrong in the plot.</P>
<P>-------------------------------</P>
<P>begin</P>
<P>nrows = 706<BR>ncols = 706</P>
<P>cda = asciiread("cmc_analysis_ps_lat_long.txt",-1,"string")<BR>llat = tofloat(str_get_field(cda(9:),3," "))<BR>llon = tofloat(str_get_field(cda(9:),4," "))</P>
<P>lat = onedtond(llat,(/nrows,ncols/))<BR>lon = onedtond(llon,(/nrows,ncols/))</P>
<P>dummy = asciiread("cmc_analysis_2003.txt",-1,"float")<BR>data = onedtond(dummy(1:498436),(/nrows,ncols/))<BR></P>
<P>fout = addfile("cmc_20030101_2.nc","c")<BR>fout->sd = data</P>
<P>;-----plot</P>
<P>wks = gsn_open_wks("png","nic_cmc")     ; send graphics to PNG file</P>
<P>  res = True<BR>  <A href="mailto:res@cnFillOn" target="_blank">res@cnFillOn</A> = True<BR>  <A href="mailto:res@cnLinesOn" target="_blank">res@cnLinesOn</A> = False<BR>  <A href="mailto:res@cnLineLabelsOn" target="_blank">res@cnLineLabelsOn</A> = False<BR>  <A href="mailto:res@cnFillMode" target="_blank">res@cnFillMode</A> = "rasterfill"<BR>  <A href="mailto:res@cnMissingValFillColor" target="_blank">res@cnMissingValFillColor</A> = "gray"</P>
<P>  <A href="mailto:res@cnLevelSelectionMode" target="_blank">res@cnLevelSelectionMode</A> = "explicitlevels"<BR>  <A href="mailto:res@cnLevels" target="_blank">res@cnLevels</A> = (/ 5,10,40,100,200 /)<BR>  <A href="mailto:res@cnFillBackgroundColor" target="_blank">res@cnFillBackgroundColor</A> = "gray"<BR>  <A href="mailto:res@cnFillColors" target="_blank">res@cnFillColors</A> = (/"transparent", "blue", "darkgreen", "cyan", "white"/)<BR>  <A href="mailto:res@lbLabelAlignment" target="_blank">res@lbLabelAlignment</A> = "boxcenters"<BR>  <A href="mailto:res@cnExplicitLabelBarLabelsOn" target="_blank">res@cnExplicitLabelBarLabelsOn</A> = True<BR>  <A href="mailto:res@cnLabelBarEndStyle" target="_blank">res@cnLabelBarEndStyle</A> = "excludeouterboxes"<BR>  <A href="mailto:res@lbAutoManage" target="_blank">res@lbAutoManage</A> = False<BR>  <A href="mailto:res@lbLabelFontHeightF" target="_blank">res@lbLabelFontHeightF</A> = 0.02</P>
<P>  <A href="mailto:res@gsnCenterString" target="_blank">res@gsnCenterString</A> = "CMC 24k product"<BR>  <A href="mailto:res@gsnCenterStringFontHeightF" target="_blank">res@gsnCenterStringFontHeightF</A> = 0.03<BR>  <A href="mailto:res@gsnMaximize" target="_blank">res@gsnMaximize</A> = True</P>
<P>  do i = 0, nrows - 1<BR>   if (all(data(:,i) .eq. <A href="mailto:data@_FillValue" target="_blank">data@_FillValue</A>)) then<BR>       continue<BR>   end if<BR>   break<BR>  end do<BR>  do j = 0, ncols - 1<BR>   if (all(data(j,:) .eq. <A href="mailto:data@_FillValue" target="_blank">data@_FillValue</A>)) then<BR>       continue<BR>   end if<BR>   break<BR>  end do</P>
<P> <A href="mailto:res@tfDoNDCOverlay" target="_blank">res@tfDoNDCOverlay</A> = True<BR>  <A href="mailto:res@cnMissingValFillColor" target="_blank">res@cnMissingValFillColor</A> = "white"<BR>  <A href="mailto:res@mpCenterLonF" target="_blank">res@mpCenterLonF</A> = -80<BR>  <A href="mailto:res@mpOutlineBoundarySets" target="_blank">res@mpOutlineBoundarySets</A> = "national"<BR>  <A href="mailto:res@mpEllipticalBoundary" target="_blank">res@mpEllipticalBoundary</A> = True<BR>  <A href="mailto:res@mpPerimDrawOrder" target="_blank">res@mpPerimDrawOrder</A> = "postdraw"<BR>  <A href="mailto:res@gsnAddCyclic" target="_blank">res@gsnAddCyclic</A> = False<BR>  <A href="mailto:res@gsnPolar" target="_blank">res@gsnPolar</A> = "NH"</P>
<P>plot = gsn_csm_contour_map_polar(wks,data(j:ncols-j-1,i:nrows-i-1),res)<BR>end</P>
<P>-----------------------------------</P>
<P>Thank you very much!</P>
<P>Qingyun</P>