Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

COMPRESSI_BY (and J,K,L,M,N)

COMPRESSI_BY (var, mask), Compress data according to a mask

Likewise COMPRESSJ_BY, COMPRESSK_BY, COMPRESSL_BY, COMPRESSM_BY, COMPRESSN_BY compress data on the given axis according to a mask; returning data on an abstract axis in each direction.

Arguments:

VAR

Variable to compress according to MASK

 

MASK

mask to use in compressing the data

Result Axes:

X

Abstract

 

Y

Inherited from VAR and MASK

 

Z

Inherited from VAR and MASK

 

T

Inherited from VAR and MASK

 

E

Inherited from VAR and MASK

 

F

Inherited from VAR and MASK

Compress variable "dat" along its I axis using the (multi-dimensional) mask supplied in the second argument.

For example:

yes? LET mask = {1,,1,,1} + 0*L[l=101:102] + 0*K[k=10:11] 
yes? LIST mask
{1,,1,,1} + 0*L[L=101:102] + 0*K[K=10:11]
1 2 3 4 5
1 2 3 4 5
---- L:101 T: 101
10 / 10: 1.000 ... 1.000 ... 1.000
11 / 11: 1.000 ... 1.000 ... 1.000
---- L:102 T: 102
10 / 10: 1.000 ... 1.000 ... 1.000
11 / 11: 1.000 ... 1.000 ... 1.000
 
yes? LIST compressi_by({11,22,33,44,55},mask)
COMPRESSI_BY({11,22,33,44,55},MASK)
1 2 3 4 5
1 2 3 4 5
---- L:101 T: 101
10 / 10: 11.00 33.00 55.00 ... ...
11 / 11: 11.00 33.00 55.00 ... ...
---- L:102 T: 102
10 / 10: 11.00 33.00 55.00 ... ...
11 / 11: 11.00 33.00 55.00 ... ...