SURF1(3NCARG)
β¨ 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 beM > 1.Nβ (integer, input) The number of grid lines in the Y direction. Gotta beN > 1.Xβ (real, input) An array holdingMX coordinates for the grid lines in the X direction. These values must be strictly increasing, no exceptions bestie.Yβ (real, input) An array holdingNY coordinates for the grid lines in the Y direction. Also must be strictly increasing. Same energy as X. πZβ (real, input) An array holdingM x Nfunctional values at the grid points;Z(I,J)contains the functional value at(X(I),Y(J))forI=1,MandJ=1,N. she's the whole vibe, the data itself.IZβ (integer, input) The row dimension of the matrixZ(andIZis greater than or equal toM). yes she's the stride, respect her.ZX1β (real, input) An array holdingNX-partial derivatives of the function along the lineX(1). So like,ZX1(J)is the X-partial derivative at point(X(1),Y(J))forJ=1,N. You can default this parameter by settingISLPSWappropriately. β¨ZXMβ (real, input) An array holdingNX-partial derivatives of the function along the lineX(M); that meansZXM(J)is the X-partial derivative at point(X(M),Y(J))forJ=1,N. Also defaultable viaISLPSWif you'd rather not supply it. πZY1β (real, input) An array holdingMY-partial derivatives of the function along the lineY(1);ZY1(I)is the Y-partial derivative at point(X(I),Y(1))forI=1,M. Yep, defaultable by settingISLPSWappropriately.ZYNβ (real, input) An array holdingMY-partial derivatives of the function along the lineY(N); the original saysZY1(I)is the Y-partial derivative at point(X(I),Y(N))forI=1,M(yes, they wroteZY1(I)there, we're keeping it exactly as written, no notes π). Defaultable by settingISLPSWappropriately.ZXY11β (real, input) The X-Y-partial derivative at(X(1),Y(1). Defaultable by settingISLPSWappropriately.ZXYM1β (real, input) The X-Y-partial derivative at(X(M),Y(1). Defaultable by settingISLPSWappropriately.ZXY1Nβ (real, input) The X-Y-partial derivative at(X(1),Y(N). Defaultable by settingISLPSWappropriately.ZXYMNβ (real, input) The X-Y-partial derivative at(X(M),Y(N). Defaultable by settingISLPSWappropriately.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 = 0ifZX1is user-supplied and1otherwise.I2 = 0ifZXMis user-supplied and1otherwise.I3 = 0ifZY1is user-supplied and1otherwise.I4 = 0ifZYNis user-supplied and1otherwise.I5 = 0ifZXY11is user-supplied and1otherwise.I6 = 0ifZXYM1is user-supplied and1otherwise.I7 = 0ifZXY1Nis user-supplied and1otherwise.I8 = 0ifZXYMNis user-supplied and1otherwise.
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 sizeM x N x 3. On output this contains partial derivatives of the surface at the given nodes.ZPis used bySURF2. 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 is1. the tension of it all πIERβ (integer, output) An error return value. IfIERis returned as0, then no errors were detected. otherwise:= 1ifNis less than2.= 2ifXorYvalues are not strictly increasing.
π₯ ACCESS π₯
To use SURF1, load the NCAR Graphics library ngmath. that's it, that's the whole door πͺβ¨
π SEE ALSO π
surf2fitgrid_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 π
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
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms