<div dir="ltr">Hello,<div><br></div><div>Using the following scripts I want to print latitude and longitude along with variables. </div><div><div>;----------------------------------------------------------------------</div><div>check.ncl</div><div>; Writting ERA netcdf to ASCII </div><div>;----------------------------------------------------------------------</div><div>; This script uses "sprintf" and extract data from file</div><div>;----------------------------------------------------------------------</div><div> </div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div> </div><div>begin</div><div>;*************************</div><div>; read in data</div><div>;*************************</div><div> </div><div>  srf = addfile("<a href="http://1980_jan.nc">1980_jan.nc</a>","r")</div><div><br></div><div>  prec = srf->tp</div><div>  sshs = srf->sund</div><div>  ssrn = srf->ssr</div><div>  evpn = srf->e</div><div>  temp = srf->t2m</div><div>  dwpt = srf->d2m</div><div>  sst  = srf->sst</div><div>  u10m = srf->u10</div><div>  time = srf->time</div><div>  xlat = srf->latitude</div><div>  xlon = srf->longitude</div><div>  </div><div>  mtmp = (((temp*0.000232882282352021) + (292.749517347921)) - 273.15) ; temp in C</div><div>  evop = (((evpn*9.12010062706439e-08) + (0.00290678973604684)) * (1000)) ; evaporation in mm</div><div><br></div><div>   print(sprintf("%8.4f",xlat(:,:)) +" " \</div><div>          +sprintf("%8.4f",xlon(:,:)) +" " \</div><div>          +sprintf("%5.1f",mtmp(0,:,:)) +" " \</div><div>          +sprintf("%5.2f",evop(0,:,:)))</div><div>end</div></div><div>;------------------------------------------------------</div><div><br></div><div>The following is the Error </div><div><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">fatal:Number of subscripts do not match number of dimensions of variable,(2) Subscripts used, (1) Subscripts expected</span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">I used to print latitude and longitude using different netcdf file.</span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">The variable got printed and I am unable to print lat and lon. The attached netcdf file was used.</span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Can someone to help me to solve </span></p><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>With regards<br><br>Dr.R.Jagannathan                <br>Professor & Former Dean<br>Tamil Nadu Agricultural University <br>Coimbatore - 641 003 India        <br><br>PHONE:  Mob: +91 94438 89891<br><br>DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.</div></div></div>
</div></div>