SURF1(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ SURF1 ✨ β€” it's giving "prep work for the icon that is SURF2"

okay so bestie, welcome to SURF1 from the NCAR GRAPHICS manual (third section of the NCAR Graphics manuals, if you were wondering πŸ’…). This is the little subroutine that does the groundwork so that its famous bestie SURF2 can actually do the glamorous part. Think of SURF1 as the one doing her friend's makeup backstage. πŸŽ€


🌸 NAME 🌸

SURF1 β€” calculate values for SURF2 usage. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

CALL SURF1 (M, N, X, Y, Z, IZ, ZX1, ZXM, ZY1, ZYN, ZXY11, ZXYM1, ZXY1N,
ZXYMN, ISLPSW, ZP, TEMP, SIGMA, IER)

So here's the tea β˜•: this subroutine calculates certain values that get used by SURF2 in order to compute an interpolatory surface passing through a rectangular grid of function values. The surface it computes is a tensor product of splines under tension. And lowkey important: to calculate the actual interpolated values, you still have to call SURF2. SURF1 does NOT do that part, she's not that kind of girl. πŸ™ˆ


πŸ’– DESCRIPTION πŸ’–

Let's go through every single one of these arguments, no skipping, no gatekeeping, we're doing all of them πŸ‘‘

  • M β€” (integer, input) The number of grid lines in the X direction. Gotta be M > 1.
  • N β€” (integer, input) The number of grid lines in the Y direction. Gotta be N > 1.
  • X β€” (real, input) An array holding M X coordinates for the grid lines in the X direction. These values must be strictly increasing, no exceptions bestie.
  • Y β€” (real, input) An array holding N Y coordinates for the grid lines in the Y direction. Also must be strictly increasing. Same energy as X. πŸ“ˆ
  • Z β€” (real, input) An array holding M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N. she's the whole vibe, the data itself.
  • IZ β€” (integer, input) The row dimension of the matrix Z (and IZ is greater than or equal to M). yes she's the stride, respect her.
  • ZX1 β€” (real, input) An array holding N X-partial derivatives of the function along the line X(1). So like, ZX1(J) is the X-partial derivative at point (X(1),Y(J)) for J=1,N. You can default this parameter by setting ISLPSW appropriately. ✨
  • ZXM β€” (real, input) An array holding N X-partial derivatives of the function along the line X(M); that means ZXM(J) is the X-partial derivative at point (X(M),Y(J)) for J=1,N. Also defaultable via ISLPSW if you'd rather not supply it. πŸ’…
  • ZY1 β€” (real, input) An array holding M Y-partial derivatives of the function along the line Y(1); ZY1(I) is the Y-partial derivative at point (X(I),Y(1)) for I=1,M. Yep, defaultable by setting ISLPSW appropriately.
  • ZYN β€” (real, input) An array holding M Y-partial derivatives of the function along the line Y(N); the original says ZY1(I) is the Y-partial derivative at point (X(I),Y(N)) for I=1,M (yes, they wrote ZY1(I) there, we're keeping it exactly as written, no notes πŸ™ˆ). Defaultable by setting ISLPSW appropriately.
  • ZXY11 β€” (real, input) The X-Y-partial derivative at (X(1),Y(1). Defaultable by setting ISLPSW appropriately.
  • ZXYM1 β€” (real, input) The X-Y-partial derivative at (X(M),Y(1). Defaultable by setting ISLPSW appropriately.
  • ZXY1N β€” (real, input) The X-Y-partial derivative at (X(1),Y(N). Defaultable by setting ISLPSW appropriately.
  • ZXYMN β€” (real, input) The X-Y-partial derivative at (X(M),Y(N). Defaultable by setting ISLPSW appropriately.
  • ISLPSW β€” (integer, input) A switch that says which boundary derivatives are supplied by you and which ones should be estimated internally. The way it works is:

Where

  • I1 = 0 if ZX1 is user-supplied and 1 otherwise.
  • I2 = 0 if ZXM is user-supplied and 1 otherwise.
  • I3 = 0 if ZY1 is user-supplied and 1 otherwise.
  • I4 = 0 if ZYN is user-supplied and 1 otherwise.
  • I5 = 0 if ZXY11 is user-supplied and 1 otherwise.
  • I6 = 0 if ZXYM1 is user-supplied and 1 otherwise.
  • I7 = 0 if ZXY1N is user-supplied and 1 otherwise.
  • I8 = 0 if ZXYMN is user-supplied and 1 otherwise.

you set ISLPSW = I1 + 2*I2 + 4*I3 +8*I4 +16*I5 +32*I6 + 64*I7 + 128*I8. Then, for example, if ISLPSW=0, then all derivative information is user-supplied, and if ISLPSW=255, then all derivative information is to be internally estimated. bit math but make it fashion 🧚

  • ZP β€” (real, output) An array of size M x N x 3. On output this contains partial derivatives of the surface at the given nodes. ZP is used by SURF2. she's the handoff, the baton pass 🫢
  • TEMP β€” (real, input) Scratch space. (she's just there to hold your stuff, no thoughts head empty ✨)
  • SIGMA β€” (real, input) Tension factor. Values near zero result in a cubic spline; large values (e.g. 50) result in nearly a polygonal line. A typical value is 1. the tension of it all 😭
  • IER β€” (integer, output) An error return value. If IER is returned as 0, then no errors were detected. otherwise:
    • = 1 if N is less than 2.
    • = 2 if X or Y values are not strictly increasing.

πŸ”₯ ACCESS πŸ”₯

To use SURF1, load the NCAR Graphics library ngmath. that's it, that's the whole door πŸšͺ✨


🌈 SEE ALSO 🌈

  • surf2
  • fitgrid_params

Complete documentation for Fitgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html β€” go read it, she's iconic, iykyk πŸ’œ


Copyright (C) 2000 University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.


okay bestie that's the whole page!! πŸ’– this one's from the UNIX manual set, dated March 1998, and it lives under the name SURF1(3NCARG) β€” so when you cite her, cite her right. mwah, go call SURF2 next πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from