Re: cite the dimetion with special characters

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 13 2013 - 12:38:05 MST

Hi Feng,
NCL cannot reduce the variable length in an existing netCDF file by
specifying the "w" option in addfile. You can either use NCL to create a
new netCDF file, or use the netCDF operators (using the ncks utility) to
reduce variables in the file.

See: http://nco.sourceforge.net/nco.html#ncks-netCDF-Kitchen-Sink
Hope that helps..
Adam

On 11/13/2013 11:31 AM, ChenFeng wrote:
>> [1] Not sure why you are using named dimensions when reading
>> in the variable. Howecer, the following may work
>>
>>
>>
>> landusef =
>> fin->LANDUSEF(Time|:,$"z-dimensions0024"$|:,south_north|:,west_east|:)
>>
> Because I want to write the LANDUSEF to a nc file, so I would like use the dimension name.
> And it works well when i follow you method. thanks.
>
>> [2] If you want to decimate the array, try
>>
>> landusef = fin->LANDUSEF(:,:,:,::2)
>> printVarSummary( landusef )
>>
>> Please read the Mini-Language Manual at:
>> http://www.ncl.ucar.edu/Document/Manuals/
>>
> I know we can use "delete(landusef)" to decimate the variable,or use :: to reduce the lenth,
> but what i want to do is to change the data lenth in a nc file. I tried to modify the variable
> in the file by "fnc->landusef=landusef(:,0:50)", it tells me the dimetion is not equal between
> the left side and the right side.
>
>> On 11/13/13 10:24 AM, ChenFeng wrote:
>>> Hi,
>>>
>>>
>>> 1.Is there anybody knows how to cite the dimetion with special characters.
>>> I have an WRF out file, in which there is an variable named LANDUSEF(Time,z-dimensions0024,south_north,west_east).
>>> When I want to read in the variable by "landusef = fin->LANDUSEF(Time|:,z-dimensions0024|:,south_north|:,west_east|:)",
>>> it reports error. And if i use "landusef = fin->LANDUSEF", it goes ok.
>>> 2.the other question is whether ncl can reduce the variable lenth in the nc file.
>>> for example, there is a variable landusef in nc file, which is a 100x100 data. i want to change it to 100x50, and
>>> write back into the file.
>>>
>>> Thanks.
>>>
>>> Feng
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 13 12:38:27 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 22 2013 - 09:36:32 MST