This file is indexed.

/usr/share/ncarg/hluex/basic/basic04f.f is in libncarg-data 6.4.0-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
C
C $Id: basic04f.f,v 1.9 1995-06-29 00:06:53 scheitln Exp $
C
C***********************************************************************
C                                                                      *
C                            Copyright (C)  1995                       *
C                 University Corporation for Atmospheric Research      *
C                            All Rights Reserved                       *
C                                                                      *
C***********************************************************************
C
C      File:            basic04f.f
C
C      Author:          Tim Scheitlin (converted by Ed Stautler)
C                       National Center for Atmospheric Research
C                       PO 3000, Boulder, Colorado
C
C      Date:            Mon Mar 20 10:43:42 MST 1995
C
C      Description:     This example demonstrates how to select and
C                       change the workstation device for drawing your
C                       output to an NCGM file or an X workstation
C                       window using the following steps.
C
C                       1. Create output workstation objects.
C                       2. Create the data for the plots.
C                       3. Create the contour object.
C                       4. Draw the contour object.
C                       5. Call frame.
C                       6. Change workstations.
C                       7. Draw the contour object.
C                       8. Call frame.
C                       9. Clean up memory.
C
      program basic04f
      implicit none

      external NhlFAppClass
      external NhlFCairoWindowWorkstationClass
      external NhlFNcgmWorkstationClass
      external NhlFContourPlotClass
      external NhlFScalarFieldClass

      integer appid,nwks,xwks,xcon,field1,rlist,ierr

      integer data1(5,5)
      data data1 / 3,4,4,5,5,
     $     2,3,5,5,4,
     $     2,4,5,4,4,
     $     3,4,4,4,3,
     $     3,3,3,3,3 /

      integer dims(2)
      data dims / 5, 5 /
C
C ##########
C # STEP 1 #
C ##########
C Initialize the graphics libraries and create a resource list that
C is normally used to assign name/value pairs within objects.  Then
C clear (empty) this list, and create an application object.  This
C object manages multiple resource databases used by separate objects.
C
      call NhlFInitialize
      call NhlFRLCreate(rlist,'SETRL')

      call NhlFRLClear(rlist)
      call NhlFCreate(appid,'appid',NhlFAppClass,0,
     $     rlist,ierr)
C
C ##########
C # STEP 2 #
C ##########
C For each type of output you must create a workstation object using
C create.  The first argument, xwks, is a variable that identifies the
C object. The second argument, "xwks", to the create call sets the
C name of the object being created. The third argument, 
C "NhlFCairoWindowWorkstationClass" or "NhlFNcgmWorkstationClass"
C identifies the type or class of the object to create. In this case
C an X workstation or an NCGM workstation. The fourth argument, 0,
C specifies the id of the objects parent.  In this  case, the object
C has no parent, so the constant 0 is used.   The fifth argument,
C "rlist", is the resource list modifiers to be used  when creating
C the object. The final argument, ierr, is used to return an error code.
C
      call NhlFRLClear(rlist)
      call NhlFCreate(xwks,'xwks',NhlFCairoWindowWorkstationClass,0,
     $     rlist,ierr)
C
C The resource, wkMetaName, lets you specify the name of the output NCGM
C file.  In this example, it is called basic04f.ncgm.  If omitted, the 
C default name, gmeta,  will be used.
C
      call NhlFRLClear(rlist)
      call NhlFRLSetString(rlist,'wkMetaName','basic04f.ncgm',ierr)
      call NhlFCreate(nwks,'nwks',NhlFNcgmWorkstationClass,0,
     $     rlist,ierr)
C
C Create a scalar field object that will be used as a data set for a
C contour object.  The sfDataArray resource is used to assign a data
C array to a scalar field data object.
C
      call NhlFRLClear(rlist)
      call NhlFRLSetMDIntegerArray(rlist,'sfDataArray',data1,2,
     $     dims,ierr)
      call NhlFCreate(field1,'field1',NhlFScalarFieldClass,0,
     $     rlist,ierr)
C
C ##########
C # STEP 3 #
C ##########
C Create the object(s) you want to draw.
C
C Create a contour object to draw into the X workstation.
C Assign data using the cnScalarFieldData resource.
C
      call NhlFRLClear(rlist)
      call NhlFRLSetInteger(rlist,'cnScalarFieldData',field1,ierr)
      call NhlFCreate(xcon,'xcon',NhlFContourPlotClass,xwks,
     $     rlist,ierr)
C
C ##########
C # STEP 4 #
C ##########
C Draw the object
C
      call NhlFDraw(xcon,ierr)
C
C ##########
C # STEP 5 #
C ##########
C Call frame to update and clear the workstations
C
      call NhlFFrame(xwks,ierr)
C
C ##########
C # STEP 6 #
C ##########
C Change workstations.
      call NhlFChangeWorkstation(xcon, nwks, ierr)
C
C ##########
C # STEP 7 #
C ##########
C Draw the object.
      call NhlFDraw(xcon,ierr)
C
C ##########
C # STEP 8 #
C ##########
C Call frame.
      call NhlFFrame(nwks,ierr)
C
C ##########
C # STEP 9 #
C ##########
C Clean up memory.
C
      call NhlFDestroy(xwks,ierr)
      call NhlFDestroy(nwks,ierr)

      call NhlFClose

      stop
      end