MAPGRM(3NCARG)
π¦ MAPGRM β the NCAR Graphics page where lat/long lines get masked π¦
ok bestie, welcome to the MAPGRM page π this is one of those NCAR Graphics manpages, so grab a strawberry drink π and let's go, because this one is lowkey iconic.
β¨ NAME β¨
MAPGRM β draws lines of latitude and longitude masked against an existing area map. that's the whole job, no cap. π
β¨ SYNOPSIS β¨
CALL MAPGRM (IAMA,XCRA,YCRA,MCRA,IAAI,IAGI,MNOG,ULPR)
β¨ C-BINDING SYNOPSIS β¨
#include <ncarg/ncargC.h>
void c_mapgrm (int *iama, float *xcra, float *ycra,
int mcra, int *iaai, int *iagi, int mnog,
int (*ulpr)(float *xcra, float *ycra, int *ncs,
int *iaai, int *iagi, int *nai))
β¨ DESCRIPTION β¨
okay so here's every single argument, one by one, no skipping, we don't do that here π
IAMAβ an input/output array, dimensioned as specified in a call to the AREAS routineARINAM, of typeINTEGER. it's the array holding the area map that your lines of latitude and longitude are gonna get masked against. important: the area map must have been initialized by a call toARINAMfirst, periodt. it may contain edges added to it by callingMAPBLAβ that's literally the case in the example named"eezmpa"β or it may hold a whole different set of edges to create some other desired effect. for example, an area map might be created that defines a region of interest, within which user data is available and within which lines of latitude and longitude are to be drawn. for more details, see the reference document for the package named AREAS. πXCRAandYCRAβ scratch arrays, dimensioned at leastMCRA, of typeREAL.MAPGRMuses them when it calls the AREAS routineARDRLN, and they'll eventually get used in calls to your user-provided line-processing routineULPR. β¨MCRAβ an input expression of typeINTEGER, and it's the dimension of the arraysXCRAandYCRA. that's it, that's the vibe check. πIAAIandIAGIβ scratch arrays, dimensioned at leastNOGI, of typeINTEGER.MAPGRMuses them in calls to the AREAS routineARDRLN, and they'll eventually be used in calls to the user-provided line-processing routineULPR. the mnemonics stand for "Integer Array of Area Identifiers" and "Integer Array of Group Identifiers", respectively. the way they named theseβ¦ obsessed. πNOGIβ an input expression of typeINTEGER, and it's the dimension of the arraysIAAIandIAGI. the mnemonic stands for "Number Of Group Identifiers (of edges in the area map)", which is what determines the required dimension ofIAAIandIAGI. πULPRβ the name of the user-supplied line-processing routine. it must be declaredEXTERNALin the routine that callsMAPGRM, so that the compiler and the loader know it's the name of a routine to be called and not a variable. (say it with me:EXTERNAL, bestie. don't skip this. π) your routineULPRgets called once for each piece of a latitude/longitude line that comes out of the masking process, and it may decide to draw β or to not draw β each such piece.ULPRwill be called using a FORTRAN statement like
CALL ULPR (XCRA,YCRA,NCRA,IAAI,IAGI,NGPS)
where XCRA and YCRA are real arrays holding the normalized device coordinates of NCRA points defining a polyline which is part of some latitude/longitude line, and IAAI and IAGI are integer arrays holding NGPS area-identifier/group-identifier pairs for the area within which that piece of the line lies. in writing ULPR, you may rely upon a SET call's having been done which makes it possible to use normalized device coordinates in calls to routines like CURVE, CURVED, GPL, etc. for more details, see the reference document for the package named AREAS and, in particular, the description of the subroutine ARDRLN. πΈ
β¨ C-BINDING DESCRIPTION β¨
the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different syntax, we love consistency π«Ά
β¨ USAGE β¨
so the statement
CALL MAPGRM (IAMA,XCRA,YCRA,MCRA,IAAI,IAGI,MNOG,ULPR)
does the same thing as the statement
CALL MAPGRD
except that the grid lines are drawn using calls to MAPITM and MAPIQM, which does the masking of the lines against the area map defined by the arguments in the call and passes the pieces resulting from the masking process to a user-provided line-drawing routine. β¨ slay.
β¨ EXAMPLES β¨
use the ncargex command to see the following relevant examples, bestie: ccppole, cmpfil, cmpgrp, cmpitm, cmplab, cmpmsk, cmptit, cpex08, eezmpa, tezmpa, fcover, ffex03, ffex05. go look at them, they ate π
β¨ ACCESS β¨
to use MAPGRM or c_mapgrm, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order. in that order specifically, ok? don't be chaotic about it. π
β¨ SEE ALSO β¨
Online: ezmap, ezmap_params, mapaci, mapbla, mapblm, mapdrw, mapeod, mapfst, mapgci, mapgrd, mapgtc, mapgti, mapgtl, mapgtr, mapint, mapiq, mapiqa, mapiqd, mapiqm, mapit, mapita, mapitm, mapitd, maplbl, maplmb, maplot, mappos, maproj, maprs, maprst, mapsav, mapset, mapstc, mapsti, mapstl, mapstr, maptra, maptri, maptrn, mapusr, mapvec, mpchln, mpfnme, mpgetc, mpgeti, mpgetl, mpgetr, mpglty, mpiaty, mpifnb, mpilnb, mpiola, mpiosa, mpipai, mpipan, mpipar, mpisci, mplnam, mplndm, mplndr, mplnri, mpname, mprset, mpsetc, mpseti, mpsetl, mpsetr, supmap, supcon, ncarg_cbind
Hardcopy: NCAR Graphics Contouring and Mapping Tutorial π
β¨ COPYRIGHT β¨
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement. βοΈ
ok that's the whole page, you made it to the end, I'm so proud of you π₯Ήπ this was the MAPGRM(3NCARG) page from the NCAR Graphics manual, living on UNIX, dated March 1993 β yeah she's an elder but she's still that girl π periodt, go mask some lines, bestie π¦β¨
π¦ 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