<jupyter_start><jupyter_text><NAME> - LSCE (Climate and Environment Sciences Laboratory) Updated: 2019/11/13  Load the ferret extension<jupyter_code>%load_ext ferretmagic<jupyter_output><empty_output><jupyter_text>Get data from ferret and put data from python<jupyter_code>%%ferret
set text/font=hershey
use coads_climatology
shade sst[l=10] ; go land
%ferret_getdata sstdict = sst
sstdict.keys()
sstdata = sstdict['data']
type(sstdata)
import numpy
mask = numpy.abs(sstdata - sstdict['missing_value']) < 1.0E-5
sstdata[mask] = -10.0
sstdict['name'] = 'SSTCopy'
sstdict['title'] = 'SST with miss vals set to -10'
sstdict.keys()
%ferret_putdata sstdict
%%ferret
show data
shade sstcopy[l=1]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12239221140472879, 'fraction_numerical': 0.02642559109874826, 'mean_word_length': 7.275862068965517, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '162502', 'license': 'MIT', 'n_tokens_mistral': 298, 'n_tokens_neox': 285, 'n_words': 63, 'path': 'notebooks/ferretmagic_03_GetAndPutData.ipynb', 'repo_name': 'PBrockmann/ipython_ferretmagic', 'size': '730'}