<jupyter_start><jupyter_text>This Jupyter Notebook shows how to *redecorate* a transient variable that became a numpy array<jupyter_code># import modules
import MV2
import cdms2
import numpy
import cdat_info  # for sample data
# open some data
f=cdms2.open(cdat_info.get_sampledata_path()+"/clt.nc")
s=f("clt")
print type(s)
# Now run an operation on this MV2 that turns it to munpy array
fft_s = numpy.fft.fft(s)
print type(fft_s)  # numpy array
# now put back dimensions on it
fft_s = MV2.array(fft_s)
fft_s.setAxisList(s.getAxisList())

# Dimensions are back
print fft_s.getAxisIds()
# now puts the attributes on it
for a in s.attributes:
    setattr(fft_s,a,getattr(s,a))
fft_s.info()<jupyter_output>*** Description of Slab variable_14 ***
id: variable_14
shape: (120, 46, 72)
filename: 
missing_value: (1+0j)
comments: YONU_AMIP1
grid_name: YONU4X5
grid_type: gaussian
time_statistic: average
long_name: Total cloudiness
units: %
tileIndex: None
Grid has Python id 0x7f58311cba50.
Gridtype: generic
Grid shape: (46, 72)
Order: yx
** Dimension 1 **
   id: time
   Designated a time axis.
   units:  months since 1979-1-1 0
   Length: 120
   First:  0.0
   Last:   119.0
   Other axis attributes:
      calendar: gregorian
      axis: T
      realtopology: linear
   Python id:  0x7f58311cbf10
** Dimension 2 **
   id: latitude
   Designated a latitude axis.
   units:  degrees_north
   Length: 46
   First:  -90.0
   Last:   90.0
   Other axis attributes:
      long_name: Latitude
      axis: Y
      realtopology: linear
   Python id:  0x7f58311cb610
** Dimension 3 **
   id: longitude
   Designated a longitude axis.
   units:  degrees_east
   Length: 72
   First:  -180.0
   Last:   175.0
   Othe[...]
{'fraction_non_alphanumeric': 0.09128145114101814, 'fraction_numerical': 0.0526623756582797, 'mean_word_length': 3.6341463414634148, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '421796', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 699, 'n_tokens_neox': 645, 'n_words': 196, 'path': 'data/Redecorate+Transient+Variable.ipynb', 'repo_name': 'CDAT/tutorials', 'size': '1709'}