<BR>
<P>Hi,</P>
<P>I met the following problem when running NCL. Although this warning exists, it seems the script still works. Could I ignore this warning? Or it's a serious problem? If so, how to fix it? Any suggestions are appreciated!</P>
<P>--------------------------------------</P>
<P>warning:Right hand side has no coordinate variable can not delete coordinate variable of a file, use (/ .. /) to avoid this message<BR>warning:Right hand side has no coordinate variable can not delete coordinate variable of a file, use (/ .. /) to avoid this message<BR>warning:["Execute.c":8575]:Execute: Error occurred at or near line 475 in file CAM_netcdf_to_GRIB.ncl</P>
<P>--------------------------------------</P>
<P>My ncl version is ncl_ncarg/6.3.0 on SUSE Linux Enterprise Server 11 (x86_64).</P>
<P>Followed is an extract of my script<STRONG> (the red part is where the warning occurred):</STRONG></P>
<P>begin</P>
<P>; Main input parameters:<BR>;************************************************************************<BR> ;directory containing individual time step data<BR> cdir = "./ind/"<BR> ;directory to contain grib files<BR> odir = "./output/"<BR> ;file names of each model, not including the date<BR> mod1 = "cam_CESM_hist_"<BR> pnew = (/1000.0,975.0,950.0,925.0,900.0,850.0,\<BR> 800.0,750.0,700.0,650.0,600.0,\<BR> 550.0,500.0,450.0,400.0,350.0,300.0,250.0,\<BR> 200.0,150.0,100.0,70.0,\<BR> 50.0,30.0,20.0,10.0/)</P>
<P>; Open data<BR>;************************************************************************<BR> files = systemfunc("ls "+cdir+mod1+syr+smo+"*.nc")<BR> netcdf_cam_filenames = addfiles(files,"r")<BR> ;get the number of files for do loop below<BR> numfil = dimsizes(files) - 1<BR> delete(files)</P>
<P>; Begin loop over daily files in the month<BR>;************************************************************************<BR> do f=0, numfil<BR> netcdf_cam_filename = netcdf_cam_filenames[f]</P>
<P>;************************************************************************<BR> ;CAM<BR> lat = netcdf_cam_filename->lat<BR> lon = netcdf_cam_filename->lon <BR> time = netcdf_cam_filename->time<BR> lev = netcdf_cam_filename->lev<BR> date = netcdf_cam_filename->date<BR> date_to_str = tostring(date)<BR> dtime_map = (/4,2,2/)<BR> st_dtime = str_split_by_length(date_to_str, dtime_map)<BR> YYYY = st_dtime(0)<BR> MM = st_dtime(1)<BR> DD = st_dtime(2)<BR> nlon = netcdf_cam_filename->nlon<BR> P0 = netcdf_cam_filename->P0<BR> hyam = netcdf_cam_filename->hyam<BR> hybm = netcdf_cam_filename->hybm<BR> PS = netcdf_cam_filename->PS(0,:,:)<BR> T = netcdf_cam_filename->T(0,:,:,:)</P>
<P> delete(netcdf_cam_filename)</P>
<P> <A href="mailto:lat@units" target="_blank">lat@units</A> = "degrees_north"<BR> <A href="mailto:lat@long_name" target="_blank">lat@long_name</A> = "latitude"<BR> <A href="mailto:lon@units" target="_blank">lon@units</A> = "degrees_east"<BR> <A href="mailto:lon@long_name" target="_blank">lon@long_name</A> = "longitude"</P>
<P> i3d_TT = new((/26,192,288/),"float")<BR> i3d_TT!0 = "lev_p"<BR> i3d_TT!1 = "lat"<BR> i3d_TT!2 = "lon"<BR> <A href="mailto:i3d_TT@units" target="_blank">i3d_TT@units</A> = "K"<BR> <A href="mailto:i3d_TT@long_name" target="_blank">i3d_TT@long_name</A> = "CAM temperature"</P>
<P> print("Interpolating 3-d variables to pressure levels...")<BR> P0 = P0/100. ;vinth2p wants P0 in hpa<BR> i3d_TT = vinth2p(T,hyam,hybm,pnew,PS,1,P0,2,True)</P>
<P> delete([/T,PS/])</P>
<P>;Writing fields to NetCDF...<BR>;*************************************************************************<BR> ;open a new file<BR> ncdf = addfile(odir+"netcdf/CAM_"+date+".nc","c")</P>
<P> print("Writing fields to NetCDF...")<BR> ;output variables ------ only CAM output<BR> ncdf->lat = lat<BR> ncdf->lon = lon<BR> <FONT color="#ff0000">ncdf->TT = i3d_TT</FONT></P>
<P> ;Clean up<BR> delete([/ncdf,i3d_TT/])</P>
<P> ;daily loop<BR> end do</P>
<P>end<BR></P>
<P><BR>-----</P>
<P>Thank you very much!</P>
<P>Best,</P>
<P>Qingyun<BR><BR><SPAN><BR></SPAN></P><br><br><br>