[Thread Prev][Thread Next][Index]

[ferret_users] ferret netcdf



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