<html><head></head><body><div class="ydp8100253cyahoo-style-wrap" style="font-family:courier new, courier, monaco, monospace, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">Sir,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I am tryin to convert netcdf file to intermediate format usinf following code</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div><b>f=addfile("gfs_2020160512.nc", "r")</b></div><div><b>TT=f->time</b></div><div><b>sst=f->t_2</b></div><div><b>lat=f->lat</b></div><div><b>lon=f->lon</b></div><div><b>printVarSummary(sst)</b></div><div><b>sst=sst(0,::-1,:)</b></div><div><b>printVarSummary(sst)</b></div><div><b>utc_d=cd_calendar(TT,0)</b></div><div><b>ymdh=cd_calendar(TT,-3)</b></div><div><b>yyyy=tointeger(utc_d(:,0))</b></div><div><b>mm=tointeger(utc_d(:,1))</b></div><div><b>dd=tointeger(utc_d(:,2))</b></div><div><b>hh=tointeger(utc_d(:,3))</b></div><div><b>date=yyyy+"-0"+mm+"-"+dd+"_0"+hh</b></div><div><b>WPS_IM_root_name="SST"</b></div><div><b>output_file_name=WPS_IM_root_name+":"+date</b></div><div><b>Field="sst"</b></div><div><b>units="degC"</b></div><div><b>desc="Sea Surface Temperature"</b></div><div><b>sst=sst(0,:,:)</b></div><div><b>print(sst&lat(0))</b></div><div><b>opt = True</b></div><div><b>opt@projection = 0</b></div><div><b>opt@date = date</b></div><div><b>opt@startloc = "SWCORNER"</b></div><div><b>opt@startlon = sst&lon(0)</b></div><div><b>opt@startlat = sst&lat(0)</b></div><div><b>opt@deltalon = sst&lon(1)-sst&lon(0)</b></div><div><b>opt@deltalat = sst&lat(1)-sst&lat(0)</b></div><div><b>opt@is_wind_earth_relative = False</b></div><div><b>opt@level = 1</b></div><div><b>opt@source = "NOAA High-resolution Blended Analysis"</b></div><div><b>printVarSummary(sst)</b></div><div><b>wrf_wps_write_int(WPS_IM_root_name,Field,units,desc,sst(0,:,:),opt)</b></div></div><br></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false">The above successfully run and create intermediate format which content is as follow</div><div dir="ltr" data-setdir="false"><div><div><b>================================================</b></div><div dir="ltr" data-setdir="false"> <div><div><b>FIELD = TT</b></div><div><b>UNITS = k DESCRIPTION = Temperature</b></div><div><b>DATE = 2020-05-16_012 FCST = 0.000000</b></div><div><b>SOURCE = Unknown data source</b></div><div><b>LEVEL = 1.000000</b></div><div><b>I,J DIMS = 1440, 721</b></div><div><b>IPROJ = 0 PROJECTION = LAT LON</b></div><div><b> REF_X, REF_Y = 1.000000, 1.000000</b></div><div><b><font color="#cd232c"> REF_LAT, REF_LON = 0.000000, 0.000000</font></b></div><div><b><font color="#cd232c"> DLAT, DLON = 0.000000, 0.000000</font></b></div><div><b> EARTH_RADIUS = 6367.470215</b></div><div><b>DATA(1,1)=230.716217</b></div><div><br></div></div><br></div><div><br></div></div><br></div><div dir="ltr" data-setdir="false">Errors line is marked in red. </div><div dir="ltr" data-setdir="false">ref lat, ref lon are thought to be start lat and lon and lat lon interval (dlat, dlon are -0.25 and 0.25 respectively)</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Using ungrib in WRF when same file is used, the folowing content is there</div><div dir="ltr" data-setdir="false"><div><div><b>FIELD = TT</b></div><div><b>UNITS = K DESCRIPTION = Temperature</b></div><div><b>DATE = 2020-05-16_12:00:00 FCST = 0.000000</b></div><div><b>SOURCE = NCEP GFS Model</b></div><div><b>LEVEL = 200100.000000</b></div><div><b>I,J DIMS = 1440, 721</b></div><div><b>IPROJ = 0 PROJECTION = LAT LON</b></div><div><b> REF_X, REF_Y = 1.000000, 1.000000</b></div><div><b><font color="#5b8828"> REF_LAT, REF_LON = 90.000000, 0.000000</font></b></div><div><b><font color="#5b8828"> DLAT, DLON = -0.250000, 0.250000</font></b></div><div><b> EARTH_RADIUS = 6371.229492</b></div><div><b>DATA(1,1)=271.702606</b></div><div><br></div></div><div><br></div><div dir="ltr" data-setdir="false">pLEASE HELP ME TO RECTIFY THE ncl SCRIPT.</div><br></div><div dir="ltr" data-setdir="false"><br></div><div><br></div><div><br></div></div></body></html>