simpack.c(3)

πŸ“¦
version 2.3.0 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– simpack.c(3) πŸ’–

okay bestie, welcome to the Library Functions Manual corner of the internet, because today we're talking about simpack.c β€” the little file that does Big Things. grab a strawberry πŸ“, we're packing data fields.


✨ NAME ✨

simpack.c β€” Pack a data field using the simple packing algorithm.

like. that's it. that's the whole job. and she does it flawlessly. periodt. πŸ’…


🌸 SYNOPSIS 🌸

#include 'grib2_int.h'
#include <math.h>
#include <stdlib.h>

πŸŽ€ Functions

  • void simpack (float *fld, g2int ndpts, g2int *idrstmpl, unsigned char *cpack, g2int *lcpack) β€” Packs a data field using the simple packing algorithm.

πŸ’œ Detailed Description πŸ’œ

Pack a data field using the simple packing algorithm.

Author Stephen Gilbert

Date 2002-11-06

Definition in file simpack.c.


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’« void simpack (float * fld, g2int ndpts, g2int * idrstmpl, unsigned char * cpack, g2int * lcpack)

Packs a data field using the simple packing algorithm. no cap, this function also fills in GRIB2 Data Representation Template 5.0 with the appropriate values. she multitasks. she's giving main character energy. ✨

πŸ¦‹ Parameters

  • fld β€” Contains the data values to pack. the raw material, bestie.
  • ndpts β€” The number of data values in array fld. she needs a headcount before the party starts.
  • idrstmpl β€” Contains the array of values for [Data Representation Template 5.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp5-0.shtml). (https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp5-0.shtml β€” yes I'm dropping the link text, it's literally the template, iykyk.)
    • 0 β€” Reference value - ignored on input - set by simpack routine. so don't bother passing anything, she's overwriting it anyway πŸ™ˆ
    • 1 β€” Binary Scale Factor - unchanged from input. she respects your choices here.
    • 2 β€” Decimal Scale Factor - unchanged from input. also untouched. icon behavior.
    • 3 β€” Number of bits used to pack data, if value is > 0 and <= 31. If this input value is 0 or outside above range then the num of bits is calculated based on given data and scale factors. so like β€” give her a valid number and she uses it, give her nonsense and she does the math herself. adaptable queen. πŸ’…
    • 4 β€” Original field type - currently ignored on input. Data values assumed to be reals. Set to 0 by simpack routine. lowkey ignored but highkey set to 0. πŸ’€
  • cpack β€” The packed data field. this is the glow-up result, the finished fit.
  • lcpack β€” length of packed field starting at cpack. the measurements, bestie. πŸ“

Author Stephen Gilbert

Date 2002-11-06

Definition at line 36 of file simpack.c.

References ALOG2, int_power(), LOG, mkieee(), sbit(), and sbits(). the whole squad showed up. 🫢

Referenced by g2_addfield(), and specpack(). and everyone wants a piece of her, as they should. πŸ‘‘


🌈 Author 🌈

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code. not a human, just a very diligent robot doing its little task. we love that for it. πŸ€–βœ¨


and that's the whole page!! this was NCEPLIBS-g2c, Version 2.3.0, filed under simpack.c(3) β€” written back on 2002-11-06 and still serving looks in the Library Functions Manual. mwah, bye bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from