[ncl-talk] ESMF_regridding.ncl error

Mary Haley haley at ucar.edu
Mon Jun 6 12:06:11 MDT 2016


Hi Dave,

It's having problems creating the "source_file.nc" NetCDF file, which is a
intermediate file it needs to create in order to eventually create the
NetCDF weights file.

The error points to a permissions problem, either the file already exists
but you don't have the permission to remove it, or it doesn't exist and you
don't have permission to create it. A third possibility, which I'm thinking
might be the case, is that the file it's trying to create is too large for
either your system, or else you are hitting a file quota limit.

What are the dimensions of your "var" variable?

--Mary


On Sun, Jun 5, 2016 at 4:04 PM, David Adams <dave.k.adams at gmail.com> wrote:

> Hi NCLers,
> I am regridding 2d lat/lon curvilinear grid (GOES IR data)  to a 1d
> lat/lon grid.  The program worked fine, I have good results; however, now I
> am getting an error when calling the ESMF_regridding.ncl routine.  I don´t
> know if I accidentally removed something from the code or corrupted it
> somehow.  But here is the error message
>
>
>  Copyright (C) 1995-2015 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.3.1-03Jul2015_0233
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
> (0)    get_src_grid_info: source lat dims = (41,73)
> (0)    get_src_grid_info: source lon dims = (41,73)
> (0)    get_src_grid_info: source grid type is 'curvilinear'
> fatal:Could not create (source_grid_file.nc)
> warning:FileSetFileOption: invalid file or format
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 1637 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3853 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3983 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 48 in
> file test.ncl
>
>
> -----------------------------------------------------------------------------------------------------
> Here is the original code
>
> ;   May 31, 2016
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
>
> begin
> ;---Data file containing source grid
>     src_file = "goes12_4_2012_121_2345_DenseN.nc"        ;;2d lat/lon
> netcdf file
> ;---Data file containing destination grid
>     dst_file = "2011_09_18_2115_ch4subset_Karen.nc"   ;; 1d lat/lon netcdf
> file
>
>     sfile    = addfile(src_file,"r")
>     dfile    = addfile(dst_file,"r")
>
> ;---Get variable to regrid
>     var     = sfile->temperature
>     src_lat = sfile->latitude      ;;--- source 2d lat
>     src_lon = sfile->longitude     ;;---source 2d lon
>
>  ;---Get new grid variables
>
>     dst_lat= dfile->lat
>     dst_lon= dfile->lon
>
> ;---Set up regridding options
>     Opt                   = True
>
> ;---"bilinear" is the default. "patch" and "conserve" are other options.
>     Opt at InterpMethod      = "bilinear"        ;;---Change (maybe)
>
>     Opt at SrcGridLat        = src_lat           ; source grid
>     Opt at SrcGridLon        = src_lon
>
>     Opt at DstGridLat        = dst_lat           ; source grid
>     Opt at DstGridLon        = dst_lon
>
>     Opt at SrcRegional       = False             ;;--Change (maybe)
>     Opt at SrcInputFileName  = src_file          ; optional, but good idea
>     Opt at SrcMask2D         = where(.not.ismissing(var),1,0) ; Necessary if
> has
>                                                            ; missing
> values.
>     Opt at DstGridType       = "rectilinear"            ; Destination grid
>    Opt at DstRegional       = False                   ;;--Change (maybe)
>
>     Opt at ForceOverwrite    = True
>     Opt at PrintTimings      = True
>     Opt at Debug             = True
>
>      temp = ESMF_regrid(var,Opt)     ; new regridded variable
>
> ;----------------------------------------------------------
> ;   write out new netcdf 1d lat/lon files
> ; -------------------------------------------------------------
>     fout  = addfile ("goes12_4_2012_121_2345_subset_1d.nc", "c")
> ;    setfileoption(fout,"DefineMode",True)
>
>  ;===================================================================
>     ; create global attributes of the file
>     ;===================================================================
>         fAtt               = True            ; assign file attribute
>         fAtt at source_file   =  "goes12_4_2012_121_2345_DenseN.nc"
>         fAtt at Conventions   = "None"
>         fAtt at creation_date = systemfunc ("date")
>         fileattdef(fout,fAtt )
>        temp at _FillValue = -999.99
>        fout->lat  = dst_lat           ;  new 1d lat
>        fout->lon =  dst_lon           ;  new 1d lon
>        fout->temp =  temp             ; regridded variable
>
>
> thanks in advance,
> Dave
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160606/363b0787/attachment.html 


More information about the ncl-talk mailing list