(no subject)

From: Balotro Roland (e937135@XXXXXX)
Date: Tue Jun 27 1995 - 22:49:05 MDT


From:
Mr. Rolando S. Balotro
University of the Ryukyus
International House B507
Senbaru 1 Nishihara-cho
Nakagami-gun Okinawa 903-01, Japan.
E-mail Address: e937135@sci.u-ryukyu.ac.jp

Dear Sir:

Warm Greetings from Okinawa, Japan.

I am foreign student here in the University of the Ryukyus currently
doing my MSc in Physical Oceanography.

Our department recently purchased the Ncar Graphics Software Package.
The software has been very helpful so far but I have been experiencing a
difficulty in applying the software to our storm surge model.
The problem involves the plotting of sea-elevation contours correctly
between the land and the ocean boundary.

I have written an e-mail to the consulting group of the software package
and they refer me to the local site representative responsible for the
purchase of the product. However, the local site representative cannot
communicate in English and they are not that versed in using the software.

My problem is how to 'force' the contour subroutine of ncarg to follow
the boundary that separates the ocean from the land. In my experiment there
are different shapes of coastlines (e.g. straight, rectangular, triangular).
The conpack subroutines of ncarg makes some unnecessary interpolation
between the land where the sea-elevations are naturally zero and the ocean
where they are not. How do you make the contours discontinue at the boundary?

Permit me to include my contouring program and an example of data set
for your perusal.

Kindly extend your little patience in going over my algorithm.

Thank you very much for your cooperation.

Respectfully yours,
Rolando S. Balotro

***Program:

        PROGRAM contgrpx

        PARAMETER (K= 20,N=30,LRWK=1000,LIWK=1000)
        REAL Z(K,N), RWRK(LRWK)
        INTEGER M, IWRK(LIWK)

        Common/Blk1/ Z(K,N), RWRK(LRWK)
        Common/Blk2/ M, IWRK(LIWK)
        Common/Blk3/ CIT(10),LIT(10)

C Read Data

        CALL GETDAT (Z, K, M, N)

        CALL OPNGKS

C Frame Size

        CALL CPSETR ('VPB - VIEWPORT BOTTOM EDGE',0.1)

C Draw Coastline Boundary

        CALL Bndry

C Draw Contours

        CALL Plot

C Contour Title

      CALL SET(0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1)
      CALL PLCHHQ(0.5, 0.98,
     & 'Sea Elevation (cm)', 0.014, 0.0, 0.0)

C XY-Label
       CALL PLCHHQ(0.145,0.53,'Coastal Distance (km)', 0.01,90.0,0.0)
       CALL PLCHHQ(0.5,0.025,'Cross-Shelf Distance (km)',0.01, 0.0,0.0)

C Tick Marks
        CALL CPSETR ('XC1 - X COORDINATE AT INDEX 1',2.5)
        CALL CPSETR ('XCM - X COORDINATE AT INDEX M',97.5)
        CALL CPSETR ('YC1 - Y COORDINATE AT INDEX 1',2.5)
        CALL CPSETR ('YCN - Y COORDINATE AT INDEX N',147.5)
        CALL CPRECT(Z,K,M,N,RWRK,LRWK,IWRK,LIWK)
        CALL LABMOD('(F4.1)','(F5.1)',0,0,10,10,0,0,1)
        CALL GRIDAL(K-1,0,N-1,0,1,1,5,0.,0.)

        CALL FRAME
        CALL CLSGKS

        STOP
        END

C***
        SUBROUTINE Bndry
        Parameter (LMAP = 50000, NMAP = 6, NGRPS = 2)

        Real X(NMAP), Y(NMAP)

c Straight Coast:
c Data X / 0.266, 0.266/
c Data Y / 0.1, 0.95/

c Triangular Coast
c Data X / 0.471, 0.471, 0.266, 0.471, 0.471/
c Data Y / 0.1, 0.319, 0.5106, 0.701, 0.95/

c Rectangular Coast
           Data X / 0.471, 0.471, 0.266, 0.266, 0.471, 0.471/
           Data Y / 0.1, 0.319, 0.319, 0.701, 0.701, 0.95/

        CALL GSPLCI (1)
        CALL CURVE (X,Y,NMAP)

        Return
        End

C***
        SUBROUTINE GETDAT (Z, K, M, N)
        INTEGER I,J,K,M,N
        Character*50 FilName
        REAL Z(K,N)

C Reading Existing Datafile

        Write(*,*) ''
        Write(*,*) 'Enter FileName .....', FilName
        Read(*,*) FilName
        Write(*,*) 'FileName Entered is...... ', FilName
        Write(*,*) ''

        M=K

        Open(unit = 1, file = FilName)
        Do J = 1, N
        Do I = 1, M
        Read(1,*) J,I, Z(I,J)
        End Do
        End Do

        RETURN
        END

C***
        Subroutine Plot

        PARAMETER (K= 20,N=30,LRWK=1000,LIWK=1000)
        REAL Z(K,N), RWRK(LRWK)
        INTEGER M, IWRK(LIWK)

        Common/Blk1/ Z(K,N), RWRK(LRWK)
        Common/Blk2/ M, IWRK(LIWK)
        Common/Blk3/ CIT(10),LIT(10)

        DATA CIT /1.,2.,3.,4.,5.,6.,7.,8.,9.,0./
        DATA LIT /2, 2, 2, 2, 2, 2, 2, 2, 2, 0 /

C Draw Contour

       DO 101 I=1,10
          CALL CPSETI ('PAI - PARAMETER ARRAY INDEX',I)
           CALL CPSETR ('CIT - CONTOUR INTERVAL TABLE',CIT(I))
           CALL CPSETI ('LIT - LABEL INTERVAL TABLE',LIT(I))
  101 CONTINUE

        CALL GSCLIP(0)
        CALL CPRECT(Z,K,M,N,RWRK,LRWK,IWRK,LIWK)
        CALL CPBACK(Z, RWRK, IWRK)
        CALL CPCLDR(Z,RWRK,IWRK)
        CALL GETSET(VPL,VPR,VPB,VPT,WL,WR,WB,WT,LL)

C Contour MaxMin Label (with H/L marks)

        CALL CPSETI ('ILP - INFORMATIONAL LABEL POSITIONING',-2)
        CALL CPSETR ('ILX - INFORMATIONAL LABEL X COORDINATE',.98)
        CALL CPSETR ('ILY - INFORMATIONAL LABEL Y COORDINATE',.02)
        CALL CPLBDR(Z,RWRK,IWRK)

        Return
        End

  
***Data Set: 20 x 30 Grid

            1 1 0.0000000E+00
            1 2 0.0000000E+00
            1 3 0.0000000E+00
            1 4 0.0000000E+00
            1 5 0.0000000E+00
            1 6 0.0000000E+00
            1 7 0.0000000E+00
            1 8 0.0000000E+00
            1 9 0.0000000E+00
            1 10 -14.26559
            1 11 -10.18149
            1 12 -7.409540
            1 13 -5.339708
            1 14 -3.665264
            1 15 -2.713118
            1 16 -1.765206
            1 17 -1.168913
            1 18 -0.5928035
            1 19 -0.3119235
            1 20 0.0000000E+00
            2 1 0.0000000E+00
            2 2 0.0000000E+00
            2 3 0.0000000E+00
            2 4 0.0000000E+00
            2 5 0.0000000E+00
            2 6 0.0000000E+00
            2 7 0.0000000E+00
            2 8 0.0000000E+00
            2 9 0.0000000E+00
            2 10 -14.55320
            2 11 -10.28181
            2 12 -7.459708
            2 13 -5.375862
            2 14 -3.689101
            2 15 -2.731842
            2 16 -1.792655
            2 17 -1.207952
            2 18 -0.6325005
            2 19 -0.3370233
            2 20 0.0000000E+00
            3 1 0.0000000E+00
            3 2 0.0000000E+00
            3 3 0.0000000E+00
            3 4 0.0000000E+00
            3 5 0.0000000E+00
            3 6 0.0000000E+00
            3 7 0.0000000E+00
            3 8 0.0000000E+00
            3 9 0.0000000E+00
            3 10 -13.84795
            3 11 -9.526680
            3 12 -6.934684
            3 13 -4.685082
            3 14 -3.624614
            3 15 -2.426580
            3 16 -1.845260
            3 17 -1.392769
            3 18 -1.085755
            3 19 -0.5668596
            3 20 0.0000000E+00
            4 1 0.0000000E+00
            4 2 0.0000000E+00
            4 3 0.0000000E+00
            4 4 0.0000000E+00
            4 5 0.0000000E+00
            4 6 0.0000000E+00
            4 7 0.0000000E+00
            4 8 0.0000000E+00
            4 9 0.0000000E+00
            4 10 -13.26169
            4 11 -8.629478
            4 12 -5.750474
            4 13 -4.023602
            4 14 -2.938781
            4 15 -2.085639
            4 16 -1.731528
            4 17 -1.084947
            4 18 -0.7514914
            4 19 -0.3475578
            4 20 0.0000000E+00
            5 1 0.0000000E+00
            5 2 0.0000000E+00
            5 3 0.0000000E+00
            5 4 0.0000000E+00
            5 5 0.0000000E+00
            5 6 0.0000000E+00
            5 7 0.0000000E+00
            5 8 0.0000000E+00
            5 9 0.0000000E+00
            5 10 -10.95279
            5 11 -6.327721
            5 12 -3.766437
            5 13 -2.846082
            5 14 -1.818387
            5 15 -1.312141
            5 16 -1.033790
            5 17 -0.8062045
            5 18 -0.5924687
            5 19 -0.1888838
            5 20 0.0000000E+00
            6 1 0.0000000E+00
            6 2 0.0000000E+00
            6 3 0.0000000E+00
            6 4 0.0000000E+00
            6 5 0.0000000E+00
            6 6 0.0000000E+00
            6 7 0.0000000E+00
            6 8 0.0000000E+00
            6 9 0.0000000E+00
            6 10 -6.843861
            6 11 -2.726650
            6 12 -0.9519743
            6 13 -0.2494319
            6 14 -8.2413312E-03
            6 15 -5.1464316E-02
            6 16 0.1100482
            6 17 -3.6885380E-03
            6 18 5.4599363E-02
            6 19 6.9954082E-02
            6 20 0.0000000E+00
            7 1 0.0000000E+00
            7 2 0.0000000E+00
            7 3 0.0000000E+00
            7 4 0.0000000E+00
            7 5 0.0000000E+00
            7 6 0.0000000E+00
            7 7 0.0000000E+00
            7 8 0.0000000E+00
            7 9 0.0000000E+00
            7 10 -1.014963
            7 11 2.020767
            7 12 2.733253
            7 13 2.742294
            7 14 2.156517
            7 15 1.875700
            7 16 1.444670
            7 17 0.8720375
            7 18 0.5316499
            7 19 0.1032935
            7 20 0.0000000E+00
            8 1 0.0000000E+00
            8 2 0.0000000E+00
            8 3 0.0000000E+00
            8 4 0.0000000E+00
            8 5 0.0000000E+00
            8 6 0.0000000E+00
            8 7 0.0000000E+00
            8 8 0.0000000E+00
            8 9 0.0000000E+00
            8 10 7.165321
            8 11 7.848453
            8 12 7.229450
            8 13 6.449591
            8 14 5.352706
            8 15 3.977431
            8 16 2.928780
            8 17 1.918578
            8 18 1.126546
            8 19 0.3960940
            8 20 0.0000000E+00
            9 1 0.0000000E+00
            9 2 0.0000000E+00
            9 3 3.425450
            9 4 9.425278
            9 5 14.00288
            9 6 15.83094
            9 7 17.10669
            9 8 17.64138
            9 9 17.34012
            9 10 15.12838
            9 11 13.38337
            9 12 12.05505
            9 13 10.27271
            9 14 8.634070
            9 15 6.702977
            9 16 4.889432
            9 17 3.247218
            9 18 1.997111
            9 19 0.8131370
            9 20 0.0000000E+00
           10 1 0.0000000E+00
           10 2 0.0000000E+00
           10 3 1.240893
           10 4 8.562011
           10 5 13.35598
           10 6 16.72321
           10 7 19.27703
           10 8 21.22795
           10 9 21.89647
           10 10 21.53688
           10 11 19.86163
           10 12 17.39413
           10 13 14.85522
           10 14 11.78604
           10 15 9.195339
           10 16 6.459804
           10 17 4.319185
           10 18 2.694144
           10 19 1.188859
           10 20 0.0000000E+00
           11 1 0.0000000E+00
           11 2 0.0000000E+00
           11 3 1.595928
           11 4 9.899423
           11 5 14.21683
           11 6 19.29877
           11 7 23.01170
           11 8 27.10019
           11 9 29.64530
           11 10 30.17247
           11 11 28.18638
           11 12 24.90817
           11 13 20.51309
           11 14 16.36016
           11 15 12.52862
           11 16 8.694419
           11 17 5.603187
           11 18 3.235902
           11 19 1.363726
           11 20 0.0000000E+00
           12 1 0.0000000E+00
           12 2 0.0000000E+00
           12 3 3.509837
           12 4 11.89939
           12 5 16.51020
           12 6 23.14289
           12 7 28.90168
           12 8 35.21570
           12 9 41.32870
           12 10 42.56583
           12 11 40.74099
           12 12 35.96854
           12 13 28.76059
           12 14 21.71037
           12 15 15.80582
           12 16 10.74830
           12 17 6.744096
           12 18 3.952484
           12 19 1.656857
           12 20 0.0000000E+00
           13 1 0.0000000E+00
           13 2 0.0000000E+00
           13 3 6.490010
           13 4 14.12673
           13 5 20.06880
           13 6 28.15371
           13 7 35.91277
           13 8 45.56552
           13 9 49.12241
           13 10 49.15403
           13 11 47.69112
           13 12 44.30442
           13 13 38.30997
           13 14 27.94967
           13 15 19.54230
           13 16 13.15704
           13 17 8.145266
           13 18 4.503546
           13 19 1.666478
           13 20 0.0000000E+00
           14 1 0.0000000E+00
           14 2 0.0000000E+00
           14 3 9.887935
           14 4 16.90761
           14 5 23.75828
           14 6 32.39722
           14 7 42.59569
           14 8 50.56646
           14 9 52.87427
           14 10 52.42710
           14 11 51.16854
           14 12 48.78108
           14 13 44.10564
           14 14 35.37277
           14 15 23.79603
           14 16 15.76681
           14 17 9.567510
           14 18 5.396229
           14 19 2.079706
           14 20 0.0000000E+00
           15 1 0.0000000E+00
           15 2 0.0000000E+00
           15 3 13.17850
           15 4 19.58015
           15 5 25.86444
           15 6 34.71447
           15 7 47.07764
           15 8 52.79065
           15 9 54.13384
           15 10 53.64876
           15 11 52.43787
           15 12 50.77382
           15 13 47.11017
           15 14 39.19236
           15 15 26.08209
           15 16 17.19468
           15 17 10.64466
           15 18 5.934269
           15 19 2.221220
           15 20 0.0000000E+00
           16 1 0.0000000E+00
           16 2 0.0000000E+00
           16 3 15.85745
           16 4 21.15515
           16 5 26.55091
           16 6 35.39745
           16 7 47.98359
           16 8 54.02797
           16 9 55.74213
           16 10 54.76939
           16 11 53.63376
           16 12 52.00035
           16 13 48.08128
           16 14 39.86530
           16 15 26.73190
           16 16 17.59265
           16 17 10.73765
           16 18 6.283401
           16 19 2.463978
           16 20 0.0000000E+00
           17 1 0.0000000E+00
           17 2 0.0000000E+00
           17 3 17.41764
           17 4 21.09050
           17 5 25.94790
           17 6 34.00809
           17 7 46.08187
           17 8 52.78369
           17 9 55.21830
           17 10 55.04313
           17 11 54.16732
           17 12 51.93620
           17 13 46.95458
           17 14 37.51061
           17 15 25.82701
           17 16 16.90339
           17 17 10.70051
           17 18 6.543957
           17 19 2.842615
           17 20 0.0000000E+00
           18 1 0.0000000E+00
           18 2 0.0000000E+00
           18 3 17.36616
           18 4 19.52645
           18 5 23.93235
           18 6 30.19690
           18 7 38.39948
           18 8 48.59689
           18 9 52.78416
           18 10 54.01205
           18 11 52.76111
           18 12 49.43872
           18 13 43.17724
           18 14 32.38710
           18 15 23.20700
           18 16 15.84120
           18 17 10.31657
           18 18 6.190535
           18 19 2.574119
           18 20 0.0000000E+00
           19 1 0.0000000E+00
           19 2 0.0000000E+00
           19 3 15.16485
           19 4 16.25276
           19 5 20.71249
           19 6 25.60061
           19 7 31.63432
           19 8 39.10900
           19 9 45.50598
           19 10 48.60244
           19 11 47.76229
           19 12 43.34758
           19 13 35.43475
           19 14 27.53426
           19 15 20.59494
           19 16 14.64626
           19 17 10.08388
           19 18 6.334212
           19 19 2.710117
           19 20 0.0000000E+00
           20 1 0.0000000E+00
           20 2 0.0000000E+00
           20 3 10.21359
           20 4 11.07071
           20 5 15.66041
           20 6 20.20267
           20 7 25.38649
           20 8 31.53101
           20 9 35.88086
           20 10 38.51578
           20 11 37.55716
           20 12 34.09652
           20 13 28.92432
           20 14 23.54603
           20 15 18.80553
           20 16 13.92211
           20 17 9.764427
           20 18 6.238359
           20 19 2.881539
           20 20 0.0000000E+00
           21 1 0.0000000E+00
           21 2 0.0000000E+00
           21 3 0.5478898
           21 4 3.126949
           21 5 8.016907
           21 6 12.88364
           21 7 19.31053
           21 8 25.22234
           21 9 30.36420
           21 10 33.17072
           21 11 31.94319
           21 12 28.87920
           21 13 25.08903
           21 14 20.79451
           21 15 17.07417
           21 16 12.86491
           21 17 9.205041
           21 18 5.998896
           21 19 3.021327
           21 20 0.0000000E+00
           22 1 0.0000000E+00
           22 2 0.0000000E+00
           22 3 0.0000000E+00
           22 4 0.0000000E+00
           22 5 0.0000000E+00
           22 6 0.0000000E+00
           22 7 0.0000000E+00
           22 8 0.0000000E+00
           22 9 0.0000000E+00
           22 10 34.48677
           22 11 29.64834
           22 12 26.38275
           22 13 22.64680
           22 14 19.29744
           22 15 15.77647
           22 16 12.37225
           22 17 9.177843
           22 18 5.964094
           22 19 2.826285
           22 20 0.0000000E+00
           23 1 0.0000000E+00
           23 2 0.0000000E+00
           23 3 0.0000000E+00
           23 4 0.0000000E+00
           23 5 0.0000000E+00
           23 6 0.0000000E+00
           23 7 0.0000000E+00
           23 8 0.0000000E+00
           23 9 0.0000000E+00
           23 10 35.15010
           23 11 29.10950
           23 12 24.85893
           23 13 20.94747
           23 14 17.66718
           23 15 14.54233
           23 16 11.74497
           23 17 8.973212
           23 18 5.793263
           23 19 2.972512
           23 20 0.0000000E+00
           24 1 0.0000000E+00
           24 2 0.0000000E+00
           24 3 0.0000000E+00
           24 4 0.0000000E+00
           24 5 0.0000000E+00
           24 6 0.0000000E+00
           24 7 0.0000000E+00
           24 8 0.0000000E+00
           24 9 0.0000000E+00
           24 10 35.84060
           24 11 28.69226
           24 12 24.03959
           24 13 20.24843
           24 14 16.82381
           24 15 13.74400
           24 16 11.02595
           24 17 8.367238
           24 18 5.577750
           24 19 2.904845
           24 20 0.0000000E+00
           25 1 0.0000000E+00
           25 2 0.0000000E+00
           25 3 0.0000000E+00
           25 4 0.0000000E+00
           25 5 0.0000000E+00
           25 6 0.0000000E+00
           25 7 0.0000000E+00
           25 8 0.0000000E+00
           25 9 0.0000000E+00
           25 10 34.30888
           25 11 27.83968
           25 12 23.30571
           25 13 19.51221
           25 14 16.19634
           25 15 12.96325
           25 16 10.45327
           25 17 7.759330
           25 18 5.004083
           25 19 2.721441
           25 20 0.0000000E+00
           26 1 0.0000000E+00
           26 2 0.0000000E+00
           26 3 0.0000000E+00
           26 4 0.0000000E+00
           26 5 0.0000000E+00
           26 6 0.0000000E+00
           26 7 0.0000000E+00
           26 8 0.0000000E+00
           26 9 0.0000000E+00
           26 10 32.62665
           26 11 26.82610
           26 12 22.82167
           26 13 19.05893
           26 14 15.52859
           26 15 12.48404
           26 16 10.00095
           26 17 7.536729
           26 18 4.677622
           26 19 2.483341
           26 20 0.0000000E+00
           27 1 0.0000000E+00
           27 2 0.0000000E+00
           27 3 0.0000000E+00
           27 4 0.0000000E+00
           27 5 0.0000000E+00
           27 6 0.0000000E+00
           27 7 0.0000000E+00
           27 8 0.0000000E+00
           27 9 0.0000000E+00
           27 10 30.89814
           27 11 25.78735
           27 12 22.02824
           27 13 18.28179
           27 14 15.28453
           27 15 12.22641
           27 16 9.513554
           27 17 7.266972
           27 18 4.582762
           27 19 2.368631
           27 20 0.0000000E+00
           28 1 0.0000000E+00
           28 2 0.0000000E+00
           28 3 0.0000000E+00
           28 4 0.0000000E+00
           28 5 0.0000000E+00
           28 6 0.0000000E+00
           28 7 0.0000000E+00
           28 8 0.0000000E+00
           28 9 0.0000000E+00
           28 10 29.72459
           28 11 24.72853
           28 12 20.82566
           28 13 17.60351
           28 14 14.97886
           28 15 11.97476
           28 16 9.190967
           28 17 6.855419
           28 18 4.323859
           28 19 2.262087
           28 20 0.0000000E+00
           29 1 0.0000000E+00
           29 2 0.0000000E+00
           29 3 0.0000000E+00
           29 4 0.0000000E+00
           29 5 0.0000000E+00
           29 6 0.0000000E+00
           29 7 0.0000000E+00
           29 8 0.0000000E+00
           29 9 0.0000000E+00
           29 10 29.17696
           29 11 24.07665
           29 12 19.95044
           29 13 17.06217
           29 14 13.99320
           29 15 11.68561
           29 16 9.309177
           29 17 6.789685
           29 18 4.365987
           29 19 2.339104
           29 20 0.0000000E+00
           30 1 0.0000000E+00
           30 2 0.0000000E+00
           30 3 0.0000000E+00
           30 4 0.0000000E+00
           30 5 0.0000000E+00
           30 6 0.0000000E+00
           30 7 0.0000000E+00
           30 8 0.0000000E+00
           30 9 0.0000000E+00
           30 10 29.17696
           30 11 24.07665
           30 12 19.95044
           30 13 17.06217
           30 14 13.99320
           30 15 11.68561
           30 16 9.309177
           30 17 6.789685
           30 18 4.365987
           30 19 2.339104
           30 20 0.0000000E+00



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:33 MDT