! bn_nocoords.jnl
!  5/2013
! Save data with the /NOCOORDS option.
! This puts dimensions in the dataset but 
! does not write coordinate axes.

use test_100x100.nc
sh dat/att

save/clobber/file=aa.nc/nocoords/i=50:55/j=48:52 a

! This is what we SAVEd.
list/i=50:55/j=48:52 a

can mem; can data/all

! The same data is in the file, but with no coordinate axes.
use aa.nc
sh dat/att

! When it uses this dataset, Ferret just creates abstract axes.
list a

! For writing a Discrete Geometries file, dont write coordinate variables.
! Keep things in lowercase, keep original axis names, and add a global attribute.
can dat/all
can var/all

use dsg.nc

! Add a global attribute on the next SAVE
define att/output ..featureType = "profile"

can mode upcase
save/nocoord/file=dsg_nocoord.nc/keep/clobber rowsize, profile, time, latitude, longitude, pot_temp_degc, sal
sp ncdump -h dsg_nocoord.nc

set mode/last upcase

