<div dir="ltr">Hi Kunal,<div>I think ncl-talk needs you to be more specific. I'm not sure what you mean by this:</div><div><br></div><div><div style="font-size:12.8px">I also tried <br></div><span style="font-size:12.8px">var1= cloud_water_layer / 1000 </span><br style="font-size:12.8px"><div style="font-size:12.8px">but did not happen anything</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Your syntax is correct (a = b/1000), so if you could tell the group what exactly is wrong that would help.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">As always, please respond to the ncl-talk email list.</div><div style="font-size:12.8px">Adam</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 3:46 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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><div><div>Dear NCL<br><br></div>In the given script i need to divide the variable with 1000 . I know its simple but i am getting stuck with this query in the given script<br><br></div>I also tried <br></div>var1= cloud_water_layer / 1000 <br><br><div><div>but did not happen anything<br></div><div>please suggest me <br></div><div><br><div><br>;Reading HDF4-SDS files<br>;*********** Load Libraries ************************************<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" <br>;**************************************************************<br>begin<br>;***************************************************************<br>; User Input<br>;***************************************************************<br>                                            ; INPUT<br>  diri   = "./"                           ; input directory<br>  fili   = "2A12.090930.67647.6.HDF"      ;      file<br><br>                                            ; OUTPUT<br>;***************************************************************<br>; Read hdf <br>;***************************************************************<br><br>   f  = addfile("/home/kunal/Pictures/NCL_Scripts/2A12.090930.67647.6.HDF","r")<br> <br><br>  lat = f->geolocation(:,:,0)           ; (scan, pixel)<br>  lon = f->geolocation(:,:,1)           <br><br>  lat@units = "degrees_north"            ; add units<br>  lon@units = "degrees_east"<br>  print(lat@hdf_name)<br><br>;-------------------------------<br>   var=f->cldWater(:,:,:)<br>      <br>   var@lon2d=lon<br>   var@lat2d=lat<br>   var_name=var@hdf_name<br>   var_unit="gm/m~S~3"      <br>       printVarSummary(var)<br>       print(var_unit)<br>;      print(var)            <br><br><br>       cloud_water=short2flt(var)<br>   asciiwrite("cloud_water.txt",cloud_water)<br>       printVarSummary(cloud_water)<br>   <br>   layer =2<br>   cloud_water_layer=cloud_water(:,:,layer)<br>      <br>;-------------------------------<br> printMinMax(lat, True)<br> printMinMax(lon, True)<br> printMinMax (var, True)<br>;-------------------------------<br> wks_type = "pdf"                      <br> wks_type@wkPaperSize = "A4"<br> wks = gsn_open_wks(wks_type,"2004")<br><br> res                  = True<br> res@tiMainOn         = True <br> res@gsnMaximize      = True    ; maximize plot in frame<br> res@cnFillOn         = True    ; turn on contour fill<br> res@cnLinesOn        = False   ; turn off contour lines<br> res@cnLineLabelsOn   = False   ; turn off line labels<br><br><br><br>res@mpMinLonF                  = 60<br>res@mpMaxLonF                  = 100<br>res@mpMinLatF                  = 0<br>res@mpMaxLatF                  = 30<br>res@mpFillOn                   = True <br>res@mpOutlineOn                = True<br>res@mpOutlineBoundarySets      = "National"<br>res@mpGeophysicalLineColor     = "Blue"   ;Color of Conuntry Outline<br>res@mpNationalLineThicknessF   = 3.5      ;thickness of Country Outline<br>res@cnLevelSelectionMode = "ExplicitLevels"  ; set explicit contour levels<br>res@cnLevels            = (/0,1e+04,2e+04,3e+04,4e+04,5e+04,6e+04,7e+04,8e+04,9e+04/)<br>;res@cnLevelSelectionMode="AutomaticLevels"<br>;res@cnFillPalette = "BlAqGrYeOrReVi200"<br>res@cnFillPalette = "precip3_16lev"<br><br>plot=gsn_csm_contour_map(wks,cloud_water_layer,res)<br><br>end <br><br><br clear="all"><div><div><div><div dir="ltr"><div><br></div><br><div><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div>
</div></div></div></div></div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>  </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>