[ncl-talk] write netcdf

Debasish Hazra debasish.hazra5 at gmail.com
Fri Nov 30 10:47:07 MST 2018


Hi,
I am regridding data and trying to write that in netcdf file but getting
error :

     data_regrid = ESMF_regrid(data2,opt)
      printVarSummary(data_regrid)
      printMinMax(data_regrid,0)
      ; write netCDF the 'simple' way
      start_write_time = get_cpu_time()
      fout  = addfile ("./2016/Regrid/
GPM_3IMERGDL_05_precipitationCal.20160601.nc", "c")
      fAtt at creation_date = systemfunc ("date")
      fAtt               = True
      fAtt at Conventions   = "None"
      fAtt at title         = "Regrid: 0.1 to 0.25 grid via ESMF interpolation"
      fAtt at source_file   =  "
g4.subsetted.GPM_3IMERGDL_05_precipitationCal.20160601.180W_90S_180E_90N.nc"
      fileattdef( fout, fAtt )
      fout->data_regrid = precip
      end_write_time = get_cpu_time()

But geting the following error : fatal:Variable (fAtt) is undefined, can
not assign attribute (creation_date).Any help on how to fix fAtt error ?

Thanks
Debasish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181130/77642010/attachment-0001.html>


More information about the ncl-talk mailing list