Lat and Lon

Charles Seman Charles.Seman at NOAA.GOV
Wed May 23 12:17:43 EDT 2007


Rafael,

I'm sorry but I don't know what might be causing your segmentation fault
(have you tried quitting GrADS and restarting GrADS?).
Try changing "tests_gr2w_1.txt" to "test_gr2w_1.txt" and
"test_xy2w_1.txt" to "test_gr2w_1.txt"...

Please find attached another script called "test_gr2w.gs" and its output
txt file... I tried to mimic your commands to see if I could get the
segmentation fault, but did not get the error.

I hope you can get your script to work...

Chuck

Rafael Mundaray wrote:
> Hello charles... Look it is your script and i added something:
> 'reinit'
> 'open
> /usr/local/WRFV2_Tutorial/WPS/DOMAINS/Venezuela/postprd/wrfnmm_d01_24.ctl'
> 'set gxout shaded'
> 'd apcpsfc'
>
> 'q dims'
> rec=sublin(result,2)
> Imax=subwrd(rec,13)
> say 'Imax 'Imax
>
> rec=sublin(result,3)
> Jmax=subwrd(rec,13)
> say 'Jmax 'Jmax
>
> rc = write('/root/Desktop/tests_xy2w_1.txt','i j  lonval latval var')
>
> i=1
>   while ( i <= Imax )
>     j=1
>       while ( j <= Jmax )
>         'q gr2w 'i' 'j
>         rec = sublin(result,1)
> say 'result' result
>         lonv = subwrd(rec,3)
>         latv = subwrd(rec,6)
>         say ''i' 'j' 'lonv' 'latv
>         lonval = math_format('%6.3f',lonv)
>         latval = math_format('%6.3f',latv)
>         'set y 'j
>         'set x 'i
>         'd apcpsfc'
>         var = subwrd(result,4)
>         rc = write('/root/Desktop/test_xy2w_1.txt',''i'  'j'
> 'lonval'  'latval'  'var'')
>
>         j=j+1
>       endwhile
>       i=i+1
>   endwhile
> rc = close('/root/Desktop/test_xy2w_1.txt')
>
> But if you continue here reading the following, it is when the script
> is writting, then in a point (not the end) it gives me a error
> (Segmentation fault), i know that this means that it doesn't have memory:
>
> resultLon = -67.488  Lat = 3.552
>
> 55 37 -67.488 3.552
> resultLon = -67.488  Lat = 3.648
>
> 55 38 -67.488 3.648
> resultLon = -67.488  Lat = 3.744
>
> 55 39 -67.488 3.744
> resultLon = -67.488  Lat = 3.84
>
> 55 40 -67.488 3.84
> resultLon = -67.488  Lat = 3.936
>
> 55 41 -67.488 3.936
> resultLon = -67.488  Lat = 4.032
>
> 55 42 -67.488 4.032
> resultLon = - 67.488  Lat = 4.128
>
> 55 43 -67.488 4.128
> resultLon = -67.488  Lat = 4.224
>
> 55 44 -67.488 4.224
> resultLon = -67.488  Lat = 4.32
>
> 55 45 -67.488 4.32
> resultLon = -67.488  Lat = 4.416
>
> 55 46 - 67.488 4.416
> resultLon = -67.488  Lat = 4.512
>
> 55 47 -67.488 4.512
> resultLon = -67.488  Lat = 4.608
>
> 55 48 -67.488 4.608
> resultLon = -67.488  Lat = 4.704
>
> 55 49 -67.488 4.704
> resultLon = -67.488   Lat = 4.8
>
> 55 50 -67.488 4.8
> resultLon = -67.488  Lat = 4.896
>
> 55 51 -67.488 4.896
> resultLon = -67.488  Lat = 4.992
>
> 55 52 -67.488 4.992
> resultLon = -67.488  Lat = 5.088
>
> 55 53 -67.488 5.088
> resultLon = -67.488  Lat = 5.184
>
> 55 54 -67.488 5.184
> resultLon = -67.488  Lat = 5.28
>
> 55 55 -67.488 5.28
> resultLon = -67.488  Lat = 5.376
>
> 55 56 -67.488 5.376
> resultLon = -67.488  Lat = 5.472
>
> 55 57 -67.488 5.472
> resultLon = -67.488  Lat = 5.568
>
> 55 58 -67.488 5.568
> resultLon = -67.488  Lat = 5.664
>
> 55 59 -67.488 5.664
> resultLon = -67.488  Lat = 5.76
>
> 55 60 -67.488 5.76
> resultLon = - 67.488  Lat = 5.856
>
> 55 61 -67.488 5.856
> resultLon = -67.488  Lat = 5.952
>
> 55 62 -67.488 5.952
> resultLon = -67.488  Lat = 6.048
>
> 55 63 -67.488 6.048
> resultLon = -67.488  Lat = 6.144
>
> 55 64 - 67.488 6.144
> resultLon = -67.488  Lat = 6.24
>
> 55 65 -67.488 6.24
> resultLon = -67.488  Lat = 6.336
>
> 55 66 -67.488 6.336
> resultLon = -67.488  Lat = 6.432
>
> 55 67 -67.488 6.432
> resultLon = -67.488   Lat = 6.528
>
> 55 68 -67.488 6.528
> resultLon = -67.488  Lat = 6.624
>
> 55 69 -67.488 6.624
> resultLon = -67.488  Lat = 6.72
>
> 55 70 -67.488 6.72
> resultLon = -67.488  Lat = 6.816
>
> 55 71 -67.488 6.816
> resultLon = -67.488  Lat = 6.912
>
> 55 72 -67.488 6.912
> resultLon = -67.488  Lat = 7.008
>
> 55 73 -67.488 7.008
> resultLon = -67.488  Lat = 7.104
>
> 55 74 -67.488 7.104
> resultLon = -67.488  Lat = 7.2
>
> 55 75 -67.488 7.2
> resultLon = -67.488  Lat = 7.296
>
> 55 76 -67.488 7.296
> resultLon = -67.488  Lat = 7.392
>
> 55 77 -67.488 7.392
> resultLon = -67.488  Lat = 7.488
>
> 55 78 -67.488 7.488
> resultLon = -67.488  Lat = 7.584
>
> 55 79 -67.488 7.584
> resultLon = -67.488  Lat = 7.68
>
> 55 80 -67.488 7.68
> resultLon = -67.488  Lat = 7.776
>
> 55 81 -67.488 7.776
> resultLon = -67.488  Lat = 7.872
>
> 55 82 -67.488 7.872
> resultLon = -67.488  Lat = 7.968
>
> 55 83 -67.488 7.968
> resultLon = -67.488  Lat = 8.064
>
> 55 84 -67.488 8.064
> resultLon = -67.488  Lat = 8.16
>
> 55 85 -67.488 8.16
> resultLon = - 67.488  Lat = 8.256
>
> 55 86 -67.488 8.256
> resultLon = -67.488  Lat = 8.352
>
> 55 87 -67.488 8.352
> resultLon = -67.488  Lat = 8.448
>
> 55 88 -67.488 8.448
> resultLon = -67.488  Lat = 8.544
>
> 55 89 - 67.488 8.544
> resultLon = -67.488  Lat = 8.64
>
> 55 90 -67.488 8.64
> resultLon = -67.488  Lat = 8.736
>
> 55 91 -67.488 8.736
> resultLon = -67.488  Lat = 8.832
>
> 55 92 -67.488 8.832
> resultLon = -67.488   Lat = 8.928
>
> 55 93 -67.488 8.928
> resultLon = -67.488  Lat = 9.024
>
> 55 94 -67.488 9.024
> resultLon = -67.488  Lat = 9.12
>
> 55 95 -67.488 9.12
> resultLon = -67.488  Lat = 9.216
>
> 55 96 -67.488 9.216
> resultLon = -67.488  Lat = 9.312
>
> 55 97 -67.488 9.312
> resultLon = -67.488  Lat = 9.408
>
> 55 98 -67.488 9.408
> resultLon = -67.488  Lat = 9.504
>
> 55 99 -67.488 9.504
> resultLon = -67.488  Lat = 9.6
>
> 55 100 -67.488 9.6
> resultLon = -67.488  Lat = 9.696
>
> 55 101 -67.488 9.696
> resultLon = -67.488  Lat = 9.792
>
> 55 102 -67.488 9.792
> resultLon = -67.488  Lat = 9.888
>
> 55 103 -67.488 9.888
> resultLon = -67.488  Lat = 9.984
>
> 55 104 -67.488 9.984
> resultLon = -67.488  Lat = 10.08
>
> 55 105 -67.488 10.08
> resultLon = -67.488  Lat = 10.176
>
> 55 106 -67.488 10.176
> resultLon = -67.488  Lat = 10.272
>
> 55 107 -67.488 10.272
> resultLon = -67.488  Lat = 10.368
>
> 55 108 -67.488 10.368
> resultLon = -67.488  Lat = 10.464
>
> 55 109 -67.488 10.464
> resultLon = -67.488  Lat = 10.56
>
> 55 110 -67.488 10.56
> resultLon = -67.488  Lat = 10.656
>
> 55 111 -67.488 10.656
> resultLon = -67.488  Lat = 10.752
>
> 55 112 -67.488 10.752
> resultLon = -67.488  Lat = 10.848
>
> 55 113 -67.488 10.848
> resultLon = - 67.488  Lat = 10.944
>
> 55 114 -67.488 10.944
> resultLon = -67.488  Lat = 11.04
>
> 55 115 -67.488 11.04
> resultLon = -67.488  Lat = 11.136
>
> 55 116 -67.488 11.136
> resultLon = -67.488  Lat = 11.232
>
> 55 117 -67.488 11.232
> resultLon = -67.488  Lat = 11.328
>
> 55 118 -67.488 11.328
> resultLon = -67.488  Lat = 11.424
>
> 55 119 -67.488 11.424
> resultLon = -67.488  Lat = 11.52
>
> 55 120 -67.488 11.52
> resultLon = -67.488  Lat = 11.616
>
> 55 121 -67.488 11.616
> resultLon = -67.488  Lat = 11.712
>
> 55 122 -67.488 11.712
> resultLon = -67.488  Lat = 11.808
>
> 55 123 -67.488 11.808
> resultLon = -67.392  Lat = 0.096
>
> 56 1 -67.392 0.096
> resultLon = -67.392  Lat = 0.192
>
> 56 2 -67.392 0.192
> resultLon = -67.392  Lat = 0.288
>
> 56 3 -67.392 0.288
> resultLon = -67.392  Lat = 0.384
>
> 56 4 -67.392 0.384
> resultLon = -67.392  Lat = 0.48
>
> 56 5 -67.392 0.48
> resultLon = -67.392  Lat = 0.576
>
> 56 6 -67.392 0.576
> resultLon = -67.392  Lat = 0.672
>
> 56 7 -67.392 0.672
> resultLon = -67.392  Lat = 0.768
>
> 56 8 -67.392 0.768
> resultLon = -67.392  Lat = 0.864
>
> 56 9 -67.392 0.864
> resultLon = -67.392  Lat = 0.96
>
> 56 10 -67.392 0.96
> resultLon = -67.392  Lat = 1.056
>
> 56 11 -67.392 1.056
> resultLon = - 67.392  Lat = 1.152
>
> 56 12 -67.392 1.152
> resultLon = -67.392  Lat = 1.248
>
> 56 13 -67.392 1.248
> resultLon = -67.392  Lat = 1.344
>
> 56 14 -67.392 1.344
> resultLon = -67.392  Lat = 1.44
>
> 56 15 - 67.392 1.44
> resultLon = -67.392  Lat = 1.536
>
> 56 16 -67.392 1.536
> resultLon = -67.392  Lat = 1.632
>
> 56 17 -67.392 1.632
> resultLon = -67.392  Lat = 1.728
>
> 56 18 -67.392 1.728
> resultLon = -67.392   Lat = 1.824
>
> 56 19 -67.392 1.824
> resultLon = -67.392  Lat = 1.92
>
> 56 20 -67.392 1.92
> resultLon = -67.392  Lat = 2.016
>
> 56 21 -67.392 2.016
> resultLon = -67.392  Lat = 2.112
>
> 56 22 -67.392 2.112
> resultLon = -67.392  Lat = 2.208
>
> 56 23 -67.392 2.208
> resultLon = -67.392  Lat = 2.304
>
> 56 24 -67.392 2.304
> resultLon = -67.392  Lat = 2.4
>
> 56 25 -67.392 2.4
> resultLon = -67.392  Lat = 2.496
>
> 56 26 -67.392 2.496
> resultLon = -67.392  Lat = 2.592
>
> 56 27 -67.392 2.592
> resultLon = -67.392  Lat = 2.688
>
> 56 28 -67.392 2.688
> resultLon = -67.392  Lat = 2.784
>
> 56 29 -67.392 2.784
> resultLon = -67.392  Lat = 2.88
>
> 56 30 -67.392 2.88
> resultLon = -67.392  Lat = 2.976
>
> 56 31 -67.392 2.976
> resultLon = -67.392  Lat = 3.072
>
> 56 32 -67.392 3.072
> resultLon = -67.392  Lat = 3.168
>
> 56 33 -67.392 3.168
> resultLon = -67.392  Lat = 3.264
>
> 56 34 -67.392 3.264
> resultLon = -67.392  Lat = 3.36
>
> 56 35 -67.392 3.36
> resultLon = -67.392  Lat = 3.456
>
> 56 36 -67.392 3.456
> resultLon = - 67.392  Lat = 3.552
>
> 56 37 -67.392 3.552
> resultLon = -67.392  Lat = 3.648
>
> 56 38 -67.392 3.648
> resultLon = -67.392  Lat = 3.744
>
> 56 39 -67.392 3.744
> resultLon = -67.392  Lat = 3.84
>
> 56 40 - 67.392 3.84
> resultLon = -67.392  Lat = 3.936
>
> 56 41 -67.392 3.936
> resultLon = -67.392  Lat = 4.032
>
> 56 42 -67.392 4.032
> resultLon = -67.392  Lat = 4.128
>
> 56 43 -67.392 4.128
> resultLon = -67.392   Lat = 4.224
>
> 56 44 -67.392 4.224
> resultLon = -67.392  Lat = 4.32
>
> 56 45 -67.392 4.32
> resultLon = -67.392  Lat = 4.416
>
> 56 46 -67.392 4.416
> resultLon = -67.392  Lat = 4.512
>
> 56 47 -67.392 4.512
> resultLon = -67.392  Lat = 4.608
>
> 56 48 -67.392 4.608
> resultLon = -67.392  Lat = 4.704
>
> 56 49 -67.392 4.704
> resultLon = -67.392  Lat = 4.8
>
> 56 50 -67.392 4.8
> resultLon = -67.392  Lat = 4.896
>
> 56 51 -67.392 4.896
> resultLon = -67.392  Lat = 4.992
>
> 56 52 -67.392 4.992
> resultLon = -67.392  Lat = 5.088
>
> 56 53 -67.392 5.088
> resultLon = -67.392  Lat = 5.184
>
> 56 54 -67.392 5.184
> resultLon = -67.392  Lat = 5.28
>
> 56 55 -67.392 5.28
> resultLon = -67.392  Lat = 5.376
>
> 56 56 -67.392 5.376
> resultLon = -67.392  Lat = 5.472
>
> 56 57 -67.392 5.472
> resultLon = -67.392  Lat = 5.568
>
> 56 58 -67.392 5.568
> resultLon = -67.392  Lat = 5.664
>
> 56 59 -67.392 5.664
> resultLon = -67.392  Lat = 5.76
>
> 56 60 -67.392 5.76
> resultLon = -67.392  Lat = 5.856
>
> 56 61 -67.392 5.856
> resultLon = - 67.392  Lat = 5.952
>
> 56 62 -67.392 5.952
> resultLon = -67.392  Lat = 6.048
>
> 56 63 -67.392 6.048
> resultLon = -67.392  Lat = 6.144
>
> 56 64 -67.392 6.144
> resultLon = -67.392  Lat = 6.24
>
> 56 65 - 67.392 6.24
> resultLon = -67.392  Lat = 6.336
>
> 56 66 -67.392 6.336
> resultLon = -67.392  Lat = 6.432
>
> 56 67 -67.392 6.432
> resultLon = -67.392  Lat = 6.528
>
> 56 68 -67.392 6.528
> resultLon = -67.392   Lat = 6.624
>
> 56 69 -67.392 6.624
> resultLon = -67.392  Lat = 6.72
>
> 56 70 -67.392 6.72
> resultLon = -67.392  Lat = 6.816
>
> 56 71 -67.392 6.816
> resultLon = -67.392  Lat = 6.912
>
> 56 72 -67.392 6.912
> resultLon = -67.392  Lat = 7.008
>
> 56 73 -67.392 7.008
> resultLon = -67.392  Lat = 7.104
>
> 56 74 -67.392 7.104
> Segmentation fault
> [root at precision ~]# gradsc
>
> The new part of the script writes the values of the variable that i
> want to plot, in add to the x y lon lat...
> can you help me, again please???
>
> --
> Ing. Rafael E. Mundaray M.

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_gr2w.gs
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20070523/be8e58ae/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_gr2w.txt
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20070523/be8e58ae/attachment.txt 


More information about the gradsusr mailing list