! err696_save_noupcase
! Ticket 2336: When UPCASE canceled an extra upcase axis 
!  was written to a file - only when user-defined axis.
!
! Note as part of this fix, if MODE UPCASE is canceled, 
! then it also works as if SAVE/KEEP_AXISNAMES was given.
! If keeping the original names then also don't write the
! Ferret-added additions, e.g. TIME1 if there was already 
! a time axis; or a subset addition.


! Tell Ferret to write everything in the original case
cancel mode upcase

! Define some axes and variables
define axis/t=1-jan-2001:31-dec-2001:1/unit=days tday
define axis/x=10:150:10/units=degrees_east xax

let tt = t[gt=tday]
let var  = 0*tt + x[gx=xax]

save/clobber/file=myfile.nc tt, var

! An extra TDAY axis was written out
sp ncdump -h myfile.nc

set mode/last upcase
