NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 20 forks source link

SET GRID/RESTORE after CANCEL DATA/ALL gets grid %% #284

Open karlmsmith opened 6 years ago

karlmsmith commented 6 years ago

Reported by @AnsleyManke on 9 May 2003 17:56 UTC Prior to v5.52, the sequence SET GRID/SAVE; CANCEL DATA/ALL; SET GRID RESTORE gives a final result of the last SHO GRID as %%. It should be the grid of ROSE. Example with notes:

 yes? use etopo20 
 yes? set grid rose   !<== this should bump the use count on this grid 
 yes? sh grid 
 yes? set grid/save  ! <== this should bump it a second time 
                     ! (Note that the previously stored grid 
                     ! may need to have grid_use_count decremented) 

 yes? use geo_borders 
 yes? set grid CONTINENT_LON ! <== this should decrement the 
                             ! use count on the "rose" grid 
 yes? can data/all   ! <== the use counts on the "rose" grid is
                     ! still non-zero, so it will not be deleted 

 yes? set grid/restore ! <== this should increment the use count 
                       ! as a result of SET GRID 

 yes? sho grid

Check whether the SET GRID/RESTORE should also decrement the same use count because the save/restore grids are on a stack, and this command pops that stack. The net result of these two actions is that the use count remains unchanged. (May require just a comment in the code)

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/546

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 6 Nov 2003 20:30 UTC reassign to ansley