<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-unicode">Hi,
<br>
<br>
My name is Dan Chen working at MMM, NCAR. I'm using ncl to read a
variable and write into the netcdf-4 compressed file on
Yellowstone, but failed. <br>
<br>
The script is as blow:
<br>
========================================<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT//lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>
<br>
begin<br>
<br>
fils = "<b>/glade/scratch/dchen/ncl_netcdf4/analysis.ensmean</b>"<br>
in = addfile(fils,"w")<br>
bb = wrf_user_getvar(in,"PM2_5_DRY",0)<br>
bb = bb*10<br>
fils->PM2_5_DRY = (/bb/) <br>
<br>
end<br>
==========================================<br>
<br>
<br>
The error is as below
<br>
=========================
<br>
Copyright (C) 1995-2015 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.3.0<br>
The use of this software is governed by a License Agreement.<br>
See <a class="moz-txt-link-freetext" href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.<br>
fatal:["NclNetCDF4.c":3073]:NclNetCDF4.c: Error in
nc_def_var_chunking in file
(/glade/scratch/dchen/ncl_netcdf4/analysis.ensmean) for writing,
at line: 3073<br>
<br>
line 3074 of NclNetCDF4.c: NetCDF: Attempt to define var
properties, like deflate, after enddef.<br>
============================<br>
<br>
<br>
If I change the input file to a normal netcdf file without the
compression option, it works fine. But I do need to process those
netcdf-4 compressed files. Can you let me know if there is
anything I can try?<br>
<br>
Many thanks,<br>
Dan<br>
<br>
<br>
<br>
<br>
<br>
</div>
</body>
</html>