Re: Error while accessing RANGS, please respond

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 16 2013 - 12:24:25 MST

Alberto,

Thanks for providing the files offline.

Did you know that you have an NCARG_RANGS setting inside your shell script?

export NCARG_RANGS=/data/research/wrf/northseaUK/plot_scripts/ncl/rangs/

This may be the source of your problem. This setting is going to override whatever
you have NCARG_RANGS set to in your current UNIX shell.

--Mary

On Dec 16, 2013, at 11:37 AM, Alberto Mario Striedinger Pinilla <astriedinger@gmail.com> wrote:

> I change the location of the RANGS to ~/Downloads/rangs
> and set the environment variable $NCARG_RANGS =~/Downloads/rangs
> But the error is the same, to that leads me to odds now.
>
> Alberto M. Striedinger. P.
> Student Intern Researcher at MeteoConsult .NL.
> MSc. Sustainable Energy Technology
> Eindhoven University of Technology
> BSc.Mechanical Engineering
> Universidad del Norte & USF
> +31
>
>
>
>
> On Mon, Dec 16, 2013 at 6:14 PM, Alberto Mario Striedinger Pinilla <astriedinger@gmail.com> wrote:
> Dear Karin , and Mary,
>
> Thank you very much for both responses. I still have the same issue. Once I write :
> env | grep NCARG
> ncargpath rangs
>
> I get : NCARG_ROOT=/usr/local/ncl-6.1.2
> /usr/local/ncl-6.1.2/lib/ncarg/database/rangs
>
> Which are both correct as you stated.
> ALso while doing the ll command (ls-l) I get the permissions as this :
>
>
> alberto@alberto-ThinkPad-W520 /usr/local/ncl-6.1.2/lib/ncarg/database $ ll
> total 15268
> -rw-r--r-- 1 root root 239286 dec 15 17:21 Earth..1.areas
> -rw-r--r-- 1 root root 743392 dec 15 17:21 Earth..1.lines
> -rw-r--r-- 1 root root 30565 dec 15 17:21 Earth..1.names
> -rw-r--r-- 1 root root 342556 dec 15 17:21 Earth..2.areas
> -rw-r--r-- 1 root root 1502664 dec 15 17:21 Earth..2.lines
> -rw-r--r-- 1 root root 103509 dec 15 17:21 Earth..2.names
> -rw-r--r-- 1 root root 290424 dec 15 17:21 Earth..3.areas
> -rw-r--r-- 1 root root 1035728 dec 15 17:21 Earth..3.lines
> -rw-r--r-- 1 root root 38552 dec 15 17:21 Earth..3.names
> -rw-r--r-- 1 root root 4901852 dec 15 17:21 Earth..4.areas
> -rw-r--r-- 1 root root 4523568 dec 15 17:21 Earth..4.lines
> -rw-r--r-- 1 root root 176764 dec 15 17:21 Earth..4.names
> -rw-r--r-- 1 root root 36832 dec 15 17:21 ezmap_area_ids
> -rw-r--r-- 1 root root 58979 dec 15 17:21 EzmapAreaInfo.CO
> -rw-r--r-- 1 root root 122563 dec 15 17:21 EzmapAreaInfo.PO
> -rw-r--r-- 1 root root 111767 dec 15 17:21 EzmapAreaInfo.PS
> -rw-r--r-- 1 root root 9201 dec 15 17:21 EzmapAreaInfo.US
> -rw-r--r-- 1 root root 587264 dec 15 17:21 ezmapdata
> -rw-r--r-- 1 root root 76280 dec 15 17:21 EzmapOutlines.CO
> -rw-r--r-- 1 root root 138680 dec 15 17:21 EzmapOutlines.PO
> -rw-r--r-- 1 root root 240752 dec 15 17:21 EzmapOutlines.PS
> -rw-r--r-- 1 root root 107952 dec 15 17:21 EzmapOutlines.US
> drwxr-xr-x 2 root root 4096 dec 15 17:21 ftfonts/
> -rw-r--r-- 1 root root 23021 dec 15 17:21 NhlMapData
> -rw-r--r-- 1 root root 37640 dec 15 17:21 PlotcharData
> -rw-r--r-- 1 root root 37680 dec 15 17:21 pwritdata
> -rw-r--r-- 1 root root 20250 dec 15 17:21 ranfdata
> drwxrwxr-x 2 alberto alberto 4096 dec 16 17:50 rangs/
> -rw-r--r-- 1 root root 4096 dec 15 17:21 rgb.dir
> -rw-r--r-- 1 root root 16384 dec 15 17:21 rgb.pag
> -rw-r--r-- 1 root root 16992 dec 15 17:21 rgb.txt
> ------------------
>
>
> You can see my rangs/ has the same permissions as your, in addition my files inside the RANGS look like this :
> alberto@alberto-ThinkPad-W520 /usr/local/ncl-6.1.2/lib/ncarg/database/rangs $ ll
> total 137648
> -rw-rw-rw- 1 alberto alberto 89496428 mei 13 1997 gshhs(0).rim
> -rw-rw-rw- 1 alberto alberto 20775224 mei 13 1997 gshhs(1).rim
> -rw-rw-rw- 1 alberto alberto 5099196 mei 13 1997 gshhs(2).rim
> -rw-rw-rw- 1 alberto alberto 1109192 mei 13 1997 gshhs(3).rim
> -rw-rw-rw- 1 alberto alberto 170948 mei 13 1997 gshhs(4).rim
> -rw-rw-rw- 1 alberto alberto 259200 mei 6 1997 rangs(0).cat
> -rw-rw-rw- 1 alberto alberto 6518664 feb 1 1999 rangs(0).cel
> -rw-rw-rw- 1 alberto alberto 259200 mei 6 1997 rangs(1).cat
> -rw-rw-rw- 1 alberto alberto 5945492 feb 1 1999 rangs(1).cel
> -rw-rw-rw- 1 alberto alberto 259200 mei 6 1997 rangs(2).cat
> -rw-rw-rw- 1 alberto alberto 4062215 feb 1 1999 rangs(2).cel
> -rw-rw-rw- 1 alberto alberto 259200 mei 5 1997 rangs(3).cat
> -rw-rw-rw- 1 alberto alberto 3398642 feb 1 1999 rangs(3).cel
> -rw-rw-rw- 1 alberto alberto 259200 mei 5 1997 rangs(4).cat
> -rw-rw-rw- 1 alberto alberto 3045848 jan 29 1999 rangs(4).cel
>
>
> ..... Still like this, the error is still the same. I am thinking maybe my binaries are not ok ? My upper folder /usrl/local/ncl-6.1.2 is as root.... JUst in case here is how my upper directories look like :
>
> My $NCARG_ROOT/lib/ncarg looks like ==>
>
> alberto@alberto-ThinkPad-W520 /usr/local/ncl-6.1.2/lib/ncarg $ ll
> total 84
> drwxr-xr-x 2 root root 4096 dec 15 17:21 colormaps/
> drwxr-xr-x 8 root root 4096 dec 15 17:21 data/
> drwxr-xr-x 4 root root 4096 dec 15 17:21 database/
> drwxr-xr-x 2 root root 12288 dec 15 17:21 examples/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 fontcaps/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 graphcaps/
> drwxr-xr-x 5 root root 4096 dec 15 17:21 grib2_codetables/
> drwxr-xr-x 5 root root 4096 dec 15 17:21 grib2_codetables.previous/
> drwxr-xr-x 16 root root 4096 dec 15 17:21 hluex/
> drwxr-xr-x 17 root root 4096 dec 15 17:21 nclex/
> drwxr-xr-x 6 root root 4096 dec 15 17:21 nclscripts/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 ngwww/
> drwxr-xr-x 17 root root 4096 dec 15 17:21 resfiles/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 robj/
> -rw-rw-rw- 1 root root 1006 dec 15 17:21 sysresfile
> drwxr-xr-x 2 root root 4096 dec 15 17:21 tests/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 tutorial/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 udunits/
> drwxr-xr-x 2 root root 4096 dec 15 17:21 xapp/
>
>
> My $NCARG_ROOT/lib looks like ==>>
> alberto@alberto-ThinkPad-W520 /usr/local/ncl-6.1.2/lib $ ll
> total 40916
> -rw-rw-rw- 1 root root 580256 dec 15 17:21 libblas_ncl.a
> -rw-rw-rw- 1 root root 63458 dec 15 17:21 libcgm.a
> -rw-rw-rw- 1 root root 389998 dec 15 17:21 libfftpack5_dp.a
> -rw-rw-rw- 1 root root 3806536 dec 15 17:21 libhlu.a
> -rw-rw-rw- 1 root root 7790164 dec 15 17:21 liblapack_ncl.a
> -rw-rw-rw- 1 root root 7776824 dec 15 17:21 libncarg.a
> -rw-rw-rw- 1 root root 89936 dec 15 17:21 libncarg_c.a
> -rw-rw-rw- 1 root root 2310930 dec 15 17:21 libncarg_gks.a
> -rw-rw-rw- 1 root root 202986 dec 15 17:21 libncarg_ras.a
> -rw-rw-rw- 1 root root 4719108 dec 15 17:21 libncl.a
> -rw-rw-rw- 1 root root 4721446 dec 15 17:21 libnclapi.a
> -rw-rw-rw- 1 root root 2939848 dec 15 17:21 libnfp.a
> -rw-rw-rw- 1 root root 1236614 dec 15 17:21 libnfpfort.a
> -rw-rw-rw- 1 root root 994134 dec 15 17:21 libngmath.a
> -rw-rw-rw- 1 root root 3466078 dec 15 17:21 libnio.a
> -rw-rw-rw- 1 root root 774542 dec 15 17:21 libsphere3.1_dp.a
> drwxr-xr-x 20 root root 4096 dec 15 17:21 ncarg/
>
> Thank you again both for you diligence XD.
>
>
> Alberto M. Striedinger. P.
> Student Intern Researcher at MeteoConsult .NL.
> MSc. Sustainable Energy Technology
> Eindhoven University of Technology
> BSc.Mechanical Engineering
> Universidad del Norte & USF
> +31
>
>
>
>
> On Mon, Dec 16, 2013 at 4:51 PM, Mary Haley <haley@ucar.edu> wrote:
> Hi Alberto,
>
> Thanks to Karin for her help on this. It looks like you are doing everything correctly with regard to the RANGS files.
> Karin is right that you don't need NCARG_RANGS if you have installed the files in $NCARG_ROOT/lib/ncarg/database/rangs,
> but it shouldn't hurt if you are setting this.
>
> The error seems to imply that it simply cannot open the file, either because the permissions are wrong, or the file isn't there.
>
> Can you make sure you have the correct read permissions on the directory itself:
>
> ls -l $NCARG_ROOT/lib/ncarg/database
>
> It should look something like this:
>
> drwxrwxr-x 15 haley CIT\Domain Users 510 Dec 5 11:24 rangs/
>
> Also, make sure you don't have any other environment variables set:
>
> env | grep NCARG
> ncargpath rangs
>
> ncargpath rangs should report "/usr/local/ncl-6.1.2/lib/ncarg/database/rangs". If it doesn't, then this means you either have NCARG_ROOT or some other environment variable set incorrectly.
>
> --Mary
>
>
> On Dec 14, 2013, at 3:17 PM, Alberto Mario Striedinger Pinilla <astriedinger@gmail.com> wrote:
>
> > Hello to all,
> >
> > sorry to disturb again. I already tried that, and again now, with no good results. I will try reinstalling the binary libraries just in case. =/
> >
> >
> > Alberto M. Striedinger. P.
> > Student Intern Researcher at MeteoConsult .NL.
> > MSc. Sustainable Energy Technology
> > Eindhoven University of Technology
> > BSc.Mechanical Engineering
> > Universidad del Norte & USF
> > +31
> >
> >
> >
> >
> > On Sat, Dec 14, 2013 at 11:04 PM, Karin Meier-Fleischer <meier-fleischer@dkrz.de> wrote:
> > Hi Alberto,
> >
> > I think you must unset the NCARG_RANGS environment variable if you have all the ranges files
> > in the recommended directory.
> >
> > Bye,
> > Karin
> >
> >
> > Am 14.12.2013 um 22:24 schrieb Alberto Mario Striedinger Pinilla <astriedinger@gmail.com>:
> >
> >> Hello Karin, and all
> >>
> >>
> >> Thank you very much for the fast response XD. As you show in you directory. I do have the same. My rangs are located in the same directory, and I have even set en environment variable NCARG_RANGS to the location.
> >>
> >> My environment variables in my .bashrc are :
> >> export NCARG_ROOT=/usr/local/ncl-6.1.2
> >> export NCARG_RANGS=/usr/local/ncl-6.1.2/lib/ncarg/database/rangs
> >>
> >> And doing ll in my rangs directory I have the same:
> >> alberto@alberto-ThinkPad-W520 /usr/local/ncl-6.1.2/lib/ncarg/database/rangs $ ll
> >> total 137644
> >> -rw-r--r-- 1 alberto alberto 89496428 mei 13 1997 gshhs(0).rim
> >> -rw-r--r-- 1 alberto alberto 20775224 mei 13 1997 gshhs(1).rim
> >> -rw-r--r-- 1 alberto alberto 5099196 mei 13 1997 gshhs(2).rim
> >> -rw-r--r-- 1 alberto alberto 1109192 mei 13 1997 gshhs(3).rim
> >> -rw-r--r-- 1 alberto alberto 170948 mei 13 1997 gshhs(4).rim
> >> -rw-r--r-- 1 alberto alberto 259200 mei 6 1997 rangs(0).cat
> >> -rw-r--r-- 1 alberto alberto 6518664 feb 1 1999 rangs(0).cel
> >> -rw-r--r-- 1 alberto alberto 259200 mei 6 1997 rangs(1).cat
> >> -rw-r--r-- 1 alberto alberto 5945492 feb 1 1999 rangs(1).cel
> >> -rw-r--r-- 1 alberto alberto 259200 mei 6 1997 rangs(2).cat
> >> -rw-r--r-- 1 alberto alberto 4062215 feb 1 1999 rangs(2).cel
> >> -rw-r--r-- 1 alberto alberto 259200 mei 5 1997 rangs(3).cat
> >> -rw-r--r-- 1 alberto alberto 3398642 feb 1 1999 rangs(3).cel
> >> -rw-r--r-- 1 alberto alberto 259200 mei 5 1997 rangs(4).cat
> >> -rw-r--r-- 1 alberto alberto 3045848 jan 29 1999 rangs(4).cel
> >>
> >>
> >> As you can see , the only difference is the permission in the files, they are read for all the other users. But since I am the only one as this is my personal pc.
> >>
> >> Thanks again for your response and the colour set up work this time XD. HAve a nice evening
> >>
> >>
> >>
> >>
> >> Alberto M. Striedinger. P.
> >> Student Intern Researcher at MeteoConsult .NL.
> >> MSc. Sustainable Energy Technology
> >> Eindhoven University of Technology
> >> BSc.Mechanical Engineering
> >> Universidad del Norte & USF
> >> +31
> >>
> >>
> >>
> >>
> >> On Sat, Dec 14, 2013 at 9:45 PM, Karin Meier-Fleischer <meier-fleischer@dkrz.de> wrote:
> >> Dear Alberto,
> >>
> >> Problem 1: the RANGS/GSHHS files should be stored in $NCARG_ROOT/lib/ncarg/database/rangs directory.
> >>
> >> >> ls -la $NCARG_ROOT/lib/ncarg/database/rangs
> >> total 275296
> >> drwxr-xr-x 18 k204045 staff 612 14 Okt 16:44 .
> >> drwxr-xr-x@ 33 k204045 staff 1122 14 Okt 16:44 ..
> >> -rwxr-xr-x 1 k204045 staff 89496428 14 Okt 16:44 gshhs(0).rim
> >> -rwxr-xr-x 1 k204045 staff 20775224 14 Okt 16:44 gshhs(1).rim
> >> -rwxr-xr-x 1 k204045 staff 5099196 14 Okt 16:44 gshhs(2).rim
> >> -rwxr-xr-x 1 k204045 staff 1109192 14 Okt 16:44 gshhs(3).rim
> >> -rwxr-xr-x 1 k204045 staff 170948 14 Okt 16:44 gshhs(4).rim
> >> -rwxr-xr-x 1 k204045 staff 259200 14 Okt 16:44 rangs(0).cat
> >> -rwxr-xr-x 1 k204045 staff 6518664 14 Okt 16:44 rangs(0).cel
> >> -rwxr-xr-x 1 k204045 staff 259200 14 Okt 16:44 rangs(1).cat
> >> -rwxr-xr-x 1 k204045 staff 5945492 14 Okt 16:44 rangs(1).cel
> >> -rwxr-xr-x 1 k204045 staff 259200 14 Okt 16:44 rangs(2).cat
> >> -rwxr-xr-x 1 k204045 staff 4062215 14 Okt 16:44 rangs(2).cel
> >> -rwxr-xr-x 1 k204045 staff 259200 14 Okt 16:44 rangs(3).cat
> >> -rwxr-xr-x 1 k204045 staff 3398642 14 Okt 16:44 rangs(3).cel
> >> -rwxr-xr-x 1 k204045 staff 259200 14 Okt 16:44 rangs(4).cat
> >> -rwxr-xr-x 1 k204045 staff 3045848 14 Okt 16:44 rangs(4).cel
> >>
> >> If you don't want to install the RANGS files in the recommended directory, you can set the environment variable
> >> NCARG_RANGS to the directory containing the files.
> >>
> >>
> >> Problem 2: You generate the contour plot before you have defined a colormap, so NCL will take the default
> >> colormap.
> >>
> >> To use the colormap with gsn_define_colormap move the call upward to the line below line 298.
> >>
> >> wks = gsn_open_wks(type,psoutfilename)
> >> gsn_define_colormap(wks,"WhViBlGrYeOrReWh")
> >>
> >> Bye,
> >> Karin
> >>
> >>
> >> Am 14.12.2013 um 21:14 schrieb Alberto Mario Striedinger Pinilla <astriedinger@gmail.com>:
> >>
> >>> ​Dear all,
> >>>
> >>> I am having 2 problems when plotting contour maps of a variable with ncl 6.1.2. Please let me know what could be causing these to happen:
> >>>
> >>> Problem 1:
> >>> I am plotting while accessing RANGS. I have no problem if I use the medium or low resolutions. But once I try to use RANGS I get these errors:
> >>>
> >>> fatal:MapRGDHDrawMapList: MDRGOL/MDRGOF - ERROR OPENING RANGS/GSHHS CAT FILE
> >>> fatal:PlotManagerPostDraw: error in plot post-draw
> >>> fatal:_NhlPlotManagerDraw: PostDraw error
> >>>
> >>>
> >>> I thought the problem was permissions and ownership, but all folders and files (including .nc files) are not restricted.
> >>> At the end I do get the plot I want but, the coast lines do not appear, and the labels, titles, and other texts in the plot do not appear either.
> >>>
> >>> Problem 2:
> >>> This may be a trivial problem, but I Say it anyway​
> >>> ​My colour scale is nit working properly, I am using the colour name :
> >>> gsn_define_colormap(wks,"
> >>> WhViBlGrYeOrReWh") --line : 347 in the code
> >>> But the colours appearing are not those set in the NCL website. THe NCL default colours do work though.
> >>> ------
> >>>
> >>> The RANGS in my directory are all in the same folder rangs, and where recently replaced yesterday just in case I happened to have bad files, but that did not help either.
> >>>
> >>> I am providing two plot files, one that works under the lower resolutions, and the one using RANGS.
> >>> I am providing the code I used, the file from the variable comes from, and this is the code line I used when executing the commands on bash:
> >>>
> >>> ./contour_var_thanet.sh ~/Documents/thanet/test/wrfout_d03_2010-03-19_00\:00\:00 y y 51.27 1.27 51.67 1.8333 HFX 0 nc -62 -45 2
> >>>
> >>> where : ~/Documents/thanet/test/wrfout_d03_2010-03-19_00\:00\:00 is the file location
> >>> where: y y 51.27 1.27 51.67 1.8333 HFX 0 nc -62 -45 2 is the input to my code.
> >>> The code line wehre I use the map resources for the RANGS is : --line 282
> >>>
> >>> I thank you in advance, and look for your response.
> >>>
> >>> ​
> >>> wrfout_d03_2010-03-19_00:00:00
> >>> ​
> >>>
> >>> ​
> >>> Alberto M. Striedinger. P.
> >>> Student Intern Researcher at MeteoConsult .NL.
> >>> MSc. Sustainable Energy Technology
> >>> Eindhoven University of Technology
> >>> BSc.Mechanical Engineering
> >>> Universidad del Norte & USF
> >>> +31
> >>>
> >>>
> >>> ​
> >>> <contour_var_thanet.sh><wrfout_d03_2010-03-19_00_00_00_contour_HFX_0.ps><wrfout_d03_2010-03-19_00_00_00_contour_HFX_0_RANGS.ps>_______________________________________________
> >>> ncl-talk mailing list
> >>> List instructions, subscriber options, unsubscribe:
> >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >> _________________________________
> >> Karin Meier-Fleischer
> >> Deutsches Klimarechenzentrum GmbH
> >>
> >> Application Support
> >>
> >> Visualization
> >>
> >> Bundesstrasse 45a
> >> D-20146 Hamburg, Germany
> >>
> >> E-Mail:
> >> meier-fleischer@dkrz.de
> >>
> >> Internet:
> >> http://www.dkrz.de/
> >>
> >> Phone:
> >> +49 40 460094 126
> >>
> >> Fax:
> >> +49 40 460094 270
> >>
> >>
> >
> > _________________________________
> > Karin Meier-Fleischer
> > Deutsches Klimarechenzentrum GmbH
> >
> > Application Support
> >
> > Visualization
> >
> > Bundesstrasse 45a
> > D-20146 Hamburg, Germany
> >
> > E-Mail:
> > meier-fleischer@dkrz.de
> >
> > Internet:
> > http://www.dkrz.de/
> >
> > Phone:
> > +49 40 460094 126
> >
> > Fax:
> > +49 40 460094 270
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 16 12:24:38 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 18 2013 - 14:29:51 MST