[Thread Prev][Thread Next][Index]
Re: [ferret_users] ferret netcdf
hi John,
instead of cancelling junk.nc (which contains your modified
variable to be renamed as h), cancell the original file (test.nc)
...
use junk.nc
let h=hsmo
can dat 1
list h
hope this works.
----------------------------
ARINDAM CHAKRABORTY
Department of Meteorology
Florida State University
Tallahassee, FL-32306, USA
Tel: +001-850-6443524 (Off)
+001-850-5758550 (Res)
Fax: +001-850-6449642
____________________________
On Mon, 17 Oct 2005, John Luick wrote:
> Re a recent question I put to the forum, in cae anyone is interested, it
> has been solved. Seems that with Version 5.51, if you try to write a
> null string or a logical to a netcdf file, it causes ferret to crash.
> But if you first re-define them it writes okay. Now I have another problem:
>
> I want to read in a netcdf file, smooth a 2d variable, and write a new
> netcdf file with the smoothed variable. The tricky part is doing it
> without changing the name of the saved variable. For example (highly
> simplified):
>
> use test.nc (contains many variables including "h")
> let hsmo = h[x=@shn:7,y=@shn:7]
> save/clobber/file=junk.nc hsmo
> can var hsmo
> use junk.nc
> let h=hsmo
> can dat junk.nc
> list h (causes error, because h is still associated with hsmo, which was
> canned - but if you don't can hsmo, then you get a recursion error instead.)
>
> I could save hsmo, but of course variable names are an important part of
> netcdf files so it has to be the original name (h). Surely there is a
> simple solution just beyond my fingertips.
>
> Thanks
>
> John
>
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement