[Met_help] fm theo carter dubai re: failure during make

John Halley Gotway johnhg at rap.ucar.edu
Mon Jun 1 07:16:53 MDT 2009


Theo,

I have some suggestions for you regarding a polyline mask for the UAE, but
it'll probably take some work.

I'd suggest trying to extract the lat/lon information from some map data
to use as your lat/lon polyline.  You can likely find lat/lon information
on the web for country boundaries.  I'd suggest searching for that info on
the web.

If you can't find anything that would work well for you, MET does have
that same type of data in the file: METv2.0/data/map/group3.  That ASCII
file contains lat/lon information for world boundaries.  The difficult
part would be extracting only those points that are applicable to the UAE.
 The file contains 8602 lines in it, so it'll take some work.

The data in that file is organized into map regions... so you'll see a
line containing 9 numbers followed by several lines containing only
lat/lon's.  Each of those groups of lines is a map region.  The second
number in the long line tells you how many lat/lon points are to follow
for that region.

You could try editing that file by only leaving in a few of those map
regions.  Then run MODE on a global dataset - NCEP GFS data would do trick
- and look what map regions show up in the output MODE plot.  Then edit
that group3 file as needed - adding or removing map regions - until you
end up with a nice looking polyline mask for UAE.

Ultimately, when you get to that point, you'll need to create a file that
only contains the lat/lon points - and none of those lines with 9 entries
in them.

Another word of caution, the longitude values in the group3 file appear to
be in degrees_east rather than degress_west.  They'll ultimately need to
be in degrees_west for the lat/lon polyline.  So you'll need to multiply
by -1.

Good luck, and sorry this isn't an easier task for you.  Perhaps you'll
find some country boundary data on the internet that'll be easier to use.

Thanks,
John




>
>
> Hi John,
>
>
>
> I have to make up a polyline of the United Arab Emirates outline for my
> WRF model run. Do you have any suggestions on how to go about doing it?
> Or where I could find a shape that would fit?
>
>
>
> Thanks,
>
> Theo Carter
>
>
>
>> Date: Wed, 27 May 2009 06:29:09 -0600
>> From: johnhg at rap.ucar.edu
>> To: thibidottwo at hotmail.com
>> CC: met_help at ucar.edu
>> Subject: Re: [Met_help] fm theo carter dubai re: failure during make
>>
>> Theo,
>>
>> Great.  I'm really glad you got it all to work!  I'm sorry that it ended
>> up taking so much effort.  I realize that MET could be improved by
>> setting up a nice configure/build script for it.  But did
>> you find anything in particular in the compilation process that should
>> be changed or improved?
>>
>> We actually have run MET using CentOS (not sure which version number) in
>> the past.  When we give the tutorial on MET as part of the WRF-Tutorial
>> twice a year, the classroom machines run CentOS.  We
>> build MET on them using the GNU gfortran/g++ compilers.  I wonder what
>> the difference was between those systems and yours that led to the
>> issues you were seeing?
>>
>> Well I'm glad it's running for you.  Please let me know if any questions
>> come up or if you run across any issues or suggestions for improvement
>> in the online tutorial.
>>
>> Thanks,
>> John
>>
>> Theo Carter wrote:
>> >
>> > Hi John,
>> >
>> >
>> >
>> > Thanks for your help!
>> >
>> >
>> >
>> > Naah - I had download the BUFRLIB from the link on your
>> > tutorial/website each time - dont even have WRF or WRF var on the PC
>> > yet. And I used your how-to each time.
>> >
>> >
>> >
>> > But!! I had done a re-install as a last resort of the OS and
>> everything
>> > from scratch - only this time I put on the new Intel 11 fortran and C
>> > compilers, and used that for the installations. Funnily enough, I kept
>> > getting more warnings throughout, but in the old end the MET Tools
>> > executables all built!!! Am working my way through the tutorial now.
>> >
>> >
>> >
>> > If anyone needs a how-to for building using Intel 11 compilers on a
>> > CentOS 5.3, I kept notes as I went along of the important choices etc.
>> >
>> >
>> >
>> > Thanks again,
>> >
>> > Theo
>> >
>> >> Date: Tue, 26 May 2009 07:13:31 -0600
>> >> From: johnhg at rap.ucar.edu
>> >> To: thibidottwo at hotmail.com
>> >> CC: met_help at ucar.edu
>> >> Subject: Re: [Met_help] fm theo carter dubai re: failure during make
>> >>
>> >> Theo,
>> >>
>> >> In looking back at our messages back and forth, I still want to make
>> sure you're using the correct version of BUFRLIB - and not one that's
>> distributed with WRF-Var.
>> >>
>> >> Here's an excerpt from an earlier message:
>> >>
>> >>>>>>>> For compiling MET, be sure to use the version that's
>> distributed by
>> >>>>>>>> NCEP: http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB
>> >>>>>>>>
>> >>>>>>>> The following 3 commands should work to compile this version of
>> BUFRLIB
>> >>>>>>>> with gcc/gfortran:
>> >>>>>>>>       gcc -c -DUNDERSCORE *.c
>> >>>>>>>>       gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F
>> >>>>>>>>       ar crv libbufr.a *.o
>> >>>>>>>>
>> >>>>>>>> These were taken from the METv2.0 Online Tutorial:
>> >>>>>>>> http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php
>> >>>>>>>>
>> >>>>>>>> Please try rebuilding BUFRLIB (ignore the warning messages) and
>> recompiling MET to see if that fixes
>> >>>>>>>> the problem.
>> >> Once you're sure you're using the right version of BUFRLIB, are you
>> still having any compilation problems with MET?
>> >>
>> >> Thanks,
>> >> John
>> >>
>> >>
>> >> Theo Carter wrote:
>> >>> Hi John,
>> >>>
>> >>> Did get a touch further than yesterday - can now find the BUFRLIB
>> libraries, but am still getting crashes within. On your website you
>> say someone has built this using RHEL, can you ask if I can copy
>> their library and try that maybe?
>> >>>
>> >>> I have built the BUFR library as you suggested commands-wise, and it
>> still comes with the following:
>> >>>
>> >>>
>> >>>
>> >>> *** Finished Making grid_stat application ***
>> >>>
>> >>> *** Making pb2nc application ***
>> >>>
>> >>> /usr/bin/g++ -c pb2nc_Conf.cc -Wall -Wshadow -static   \
>> >>>         -I../../lib
>> >>> /usr/bin/gfortran -c numpbmsg.f -Wall -Wshadow -static -ff2c
>> >>> /usr/bin/gfortran -c openpb.f -Wall -Wshadow -static -ff2c
>> >>> /usr/bin/gfortran -c readpb.f -Wall -Wshadow -static -ff2c
>> >>> /usr/bin/gfortran -c dumppb.f -Wall -Wshadow -static -ff2c
>> >>>
>> >>>
>> >>> /usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o
>> readpb.o dumppb.o \
>> >>>         -Wall -Wshadow -static   -DMET_BASE=\"/wrf/METv2.0\" \
>> >>>         -I../../lib -I/usr/local/include -I/usr/local/include/gsl
>> -I/wrf/libraries/BUFRLIB  \
>> >>>         -L../../lib -L/usr/local/lib -L/usr/local/lib/gsl
>> -L/wrf/libraries/BUFRLIB
>> -L/usr/lib/gcc/i386-redhat-linux/3.4.6 \
>> >>>         -lbufr -lvx_pb_util \
>> >>>         -lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util
>> \
>> >>>         -lvx_contable -lvx_grib_classes \
>> >>>         -lvx_econfig -lvx_gsl_prob -lgsl \
>> >>>         -lvx_plot_util  -lvx_render -lvx_pxm -lvx_color -lvx_ps
>> -lvx_afm \
>> >>>         -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util
>> -lvx_math -lm \
>> >>>         -lnetcdf_c++ -lnetcdf \
>> >>>         -lg2c  -lgfortran
>> >>> /wrf/libraries/BUFRLIB/libbufr.a(datelen.o): In function `datelen_':
>> >>> datelen.f:(.text+0x51): undefined reference to `for_write_int_fmt'
>> >>> /wrf/libraries/BUFRLIB/libbufr.a(openbf.o): In function `openbf_':
>> >>> openbf.f:(.text+0x4f): undefined reference to `for_cpstr'
>> >>> openbf.f:(.text+0x91): undefined reference to `for_cpstr'
>> >>> openbf.f:(.text+0x11b): undefined reference to `for_write_int_fmt'
>> >>> openbf.f:(.text+0x13e): undefined reference to
>> `for_write_int_fmt_xmit'
>> >>> openbf.f:(.text+0x19f): undefined reference to `for_write_int_fmt'
>> >>> etc..............................
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Cheers and thanks for the help,
>> >>> Theo
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>> Date: Fri, 8 May 2009 06:52:24 -0600
>> >>>> From: johnhg at rap.ucar.edu
>> >>>> To: thibidottwo at hotmail.com; met_help at ucar.edu
>> >>>> Subject: Re: [Met_help] fm theo carter dubai re: failure during
>> make
>> >>>>
>> >>>> Theo,
>> >>>>
>> >>>> If you look closely, those are just warning messages from BUFRLIB.
>> I get them too when compiling with "gfortran", but they won't cause
>> you any problems.  Warnings are generally OK - it's the errors
>> >>>> you should worry about.
>> >>>>
>> >>>> You're right that the compiler is complaining that it can't find
>> the file "gsl_cdf.h".  Here's what I'd suggest doing:
>> >>>>
>> >>>> cd /wrf/libraries/gsl-1.9
>> >>>> make clean
>> >>>> ./configure --prefix=`pwd`
>> >>>> make
>> >>>> make install
>> >>>>
>> >>>> Next, in the top-level MET Makefile, make sure that the following
>> is set:
>> >>>> GSL_BASE     = /wrf/libraries/gsl-1.9
>> >>>> GSL_INCS     = -I$(GSL_BASE)/include
>> >>>> GSL_LIBS     = -L$(GSL_BASE)/lib
>> >>>>
>> >>>> And then try rebuilding MET.
>> >>>>
>> >>>> Hope that helps.
>> >>>>
>> >>>> John
>> >>>>
>> >>>> Theo Carter wrote:
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> Hi John,
>> >>>>>
>> >>>>> I did put in the file you sent into BUFRLIB, however, I still got
>> the following errors:
>> >>>>>
>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>> [root at localhost BUFRLIB]# gcc -c -DUNDERSCORE *.c
>> >>>>> [root at localhost BUFRLIB]# gfortran -c -DUNDERSCORE
>> -fno-second-underscore *.f *.F
>> >>>>>  In file nemock.f:77
>> >>>>>
>> >>>>>       IF(NEMO(I:I).EQ.CHRSET(J:J)) GOTO 10
>> >>>>>                                                                        1
>> >>>>>  In file nemock.f:81
>> >>>>>
>> >>>>>
>> >>>>>                    2
>> >>>>> Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)
>> >>>>>  In file stndrd.f:202
>> >>>>>
>> >>>>>          GOTO 10
>> >>>>>                                                                        1
>> >>>>>  In file stndrd.f:207
>> >>>>>
>> >>>>>
>> >>>>>                    2
>> >>>>> Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)
>> >>>>> [root at localhost BUFRLIB]#
>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>
>> >>>>> I did carry on and install the rest of the libraries etc, and then
>> ran make on mettools version 2 and got to the following point
>> where it is looking for something in the gsl libraries - but the
>> location is strange?
>> >>>>>
>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>
>> >>>>> *** Making vx_contable Library ***
>> >>>>>
>> >>>>> /usr/bin/g++ vx_contable.cc -Wall -Wshadow -static   -c -I..
>> >>>>> /usr/bin/g++ vx_contable_stats.cc -Wall -Wshadow -static   -c -I..
>> -I/wrf/libraries/gsl-1.9/include -I/usr/local/include
>> >>>>> In file included from ../vx_gsl_prob/vx_gsl_prob.h:17,
>> >>>>>                  from ../vx_met_util/compute_ci.h:16,
>> >>>>>                  from ../vx_met_util/vx_met_util.h:17,
>> >>>>>                  from vx_contable_stats.cc:21:
>> >>>>> ../vx_gsl_prob/gsl_cdf.h:17:25: error: gsl/gsl_cdf.h: No such file
>> or directory
>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>
>> >>>>> I did a 'locate' and found the library here??
>> >>>>>
>> >>>>> [wrf at localhost gsl-1.9]$ locate gsl_cdf.h
>> >>>>> /wrf/METv2.0/lib/vx_gsl_prob/gsl_cdf.h
>> >>>>> /wrf/libraries/gsl-1.9/cdf/gsl_cdf.h
>> >>>>> [wrf at localhost gsl-1.9]$
>> >>>>>
>> >>>>> How do I get past this problem?
>> >>>>>
>> >>>>> Cheers and thanks for the help so far,
>> >>>>> Theo
>> >>>>>
>> >>>>>
>> >>>>>> Date: Wed, 6 May 2009 15:24:18 -0600
>> >>>>>> Subject: RE: [Met_help] fm theo carter dubai re: failure during
>> make
>> >>>>>> From: johnhg at rap.ucar.edu
>> >>>>>> To: thibidottwo at hotmail.com
>> >>>>>> CC: met_help at ucar.edu
>> >>>>>>
>> >>>>>> Theo,
>> >>>>>>
>> >>>>>> Good news.  When I compile the current version of BUFRLIB using
>> >>>>>> gcc/gfortran, I see the exact same warning and error messages.
>> In fact,
>> >>>>>> when I use gfortran on the latest version of Debian Linux
>> (Lenny), I see
>> >>>>>> even more warning messages.
>> >>>>>>
>> >>>>>> I've also been in touch with BUFRLIB support about this, and
>> they're aware
>> >>>>>> of the issue with compiling BUFRLIB with the GNU compilers.
>> There is a
>> >>>>>> very simple fix to get that file "nvnwin.f" to compile without
>> error.
>> >>>>>> However, I don't believe that you need it to get MET working.
>> >>>>>>
>> >>>>>> Try compiling BUFRLIB using the following 3 commands:
>> >>>>>>       gcc -c -DUNDERSCORE *.c
>> >>>>>>       gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F
>> >>>>>>       ar crv libbufr.a *.o
>> >>>>>>
>> >>>>>> Ignore the warnings and error, and then try building MET.  I
>> believe it
>> >>>>>> should work fine.
>> >>>>>>
>> >>>>>> If you'd like to get rid of that BUFRLIB error message, you're
>> welcome to
>> >>>>>> replace your version of the file "BUFRLIB/nvnwin.f" with the
>> version I've
>> >>>>>> attached.  It includes the simple fix which should get rid of
>> that error
>> >>>>>> message from gfortran.
>> >>>>>>
>> >>>>>> Thanks and good luck,
>> >>>>>> John
>> >>>>>>
>> >>>>>>> Hi John,
>> >>>>>>>
>> >>>>>>> I have tried to install BUFRLIB on fedora 10 and centos 5.3 now,
>> and in
>> >>>>>>> both cases I get the same following problem, have you come
>> across this
>> >>>>>>> before. It is disheartening to fail at the first hurdle like
>> this. My
>> >>>>>>> system is standard desktop (two different ones, here at home and
>> at work).
>> >>>>>>>
>> >>>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>>> [root at localhost BUFRLIB]# whereis gcc
>> >>>>>>> gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc
>> >>>>>>> /usr/share/man/man1/gcc.1.gz
>> >>>>>>> [root at localhost BUFRLIB]# whereis gfortran
>> >>>>>>> gfortran: /usr/bin/gfortran /usr/share/man/man1/gfortran.1.gz
>> >>>>>>> [root at localhost BUFRLIB]# gcc -c -DUNDERSCORE *.c
>> >>>>>>> [root at localhost BUFRLIB]# gfortran -c -DUNDERSCORE
>> -fno-second-underscore
>> >>>>>>> *.f *.
>> >>>>>>> F
>> >>>>>>>  In file nemock.f:77
>> >>>>>>>
>> >>>>>>>       IF(NEMO(I:I).EQ.CHRSET(J:J)) GOTO 10
>> >>>>>>>                                                                        1
>> >>>>>>>  In file nemock.f:81
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>                    2
>> >>>>>>> Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)
>> >>>>>>>  In file nvnwin.f:84
>> >>>>>>>
>> >>>>>>>       INVN(I) = BMISS
>> >>>>>>>                1
>> >>>>>>> Error: Arithmetic overflow converting REAL(8) to INTEGER(4) at
>> (1)
>> >>>>>>>  In file stndrd.f:202
>> >>>>>>>
>> >>>>>>>          GOTO 10
>> >>>>>>>                                                                        1
>> >>>>>>>  In file stndrd.f:207
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>                    2
>> >>>>>>> Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)
>> >>>>>>> [root at localhost BUFRLIB]#
>> >>>>>>>
>> >>>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>>>
>> >>>>>>> Any help you can give will be great - I sent off a query to the
>> bufrlib
>> >>>>>>> helpdesk on their website, but have had no reply.
>> >>>>>>> Thanks,
>> >>>>>>> Theo Carter, Forecaster, Dubai Met Office.
>> >>>>>>>
>> >>>>>>>> Date: Wed, 29 Apr 2009 06:38:24 -0600
>> >>>>>>>> From: johnhg at rap.ucar.edu
>> >>>>>>>> To: thibidottwo at hotmail.com
>> >>>>>>>> CC: met_help at ucar.edu
>> >>>>>>>> Subject: Re: [Met_help] fm theo carter dubai re: failure during
>> make
>> >>>>>>>>
>> >>>>>>>> Theo,
>> >>>>>>>>
>> >>>>>>>> Based on that error message, I'd guess that there's an issue
>> with your
>> >>>>>>>> version of BUFRLIB.
>> >>>>>>>>
>> >>>>>>>> Where did you obtain the version of BUFRLIB you're using?  Is
>> by any
>> >>>>>>>> chance part of WRF-Var?  If so, that version may or may not
>> work.
>> >>>>>>>>
>> >>>>>>>> For compiling MET, be sure to use the version that's
>> distributed by
>> >>>>>>>> NCEP: http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB
>> >>>>>>>>
>> >>>>>>>> The following 3 commands should work to compile this version of
>> BUFRLIB
>> >>>>>>>> with gcc/gfortran:
>> >>>>>>>>       gcc -c -DUNDERSCORE *.c
>> >>>>>>>>       gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F
>> >>>>>>>>       ar crv libbufr.a *.o
>> >>>>>>>>
>> >>>>>>>> These were taken from the METv2.0 Online Tutorial:
>> >>>>>>>> http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php
>> >>>>>>>>
>> >>>>>>>> Please try rebuilding BUFRLIB and recompiling MET to see if
>> that fixes
>> >>>>>>>> the problem.
>> >>>>>>>>
>> >>>>>>>> Thanks,
>> >>>>>>>> John Halley Gotway
>> >>>>>>>> johnhg at ucar.edu
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> Theo Carter wrote:
>> >>>>>>>>> Hi,
>> >>>>>>>>>
>> >>>>>>>>> I wonder if you can help or if you have come across this
>> problem
>> >>>>>>>> before? While running make on a very generic basic Pentium 4
>> 32-bit
>> >>>>>>>> using gfortran, gcc and g++ compilers within a CentOS 5.3 OS
>> (RHEL 5
>> >>>>>>>> clone) the build fails with the following output.
>> >>>>>>>>> /wrf/extralibraries/libbufr.a(ufbevn.o): In function
>> `ufbevn_':
>> >>>>>>>>> ufbevn.f:(.text+0xa6e): undefined reference to `nvnwin_'
>> >>>>>>>>> collect2: ld returned 1 exit status
>> >>>>>>>>> make[3]: *** [pb2nc] Error 1
>> >>>>>>>>> make[2]: *** [all] Error 2
>> >>>>>>>>> make[1]: *** [targets] Error 2
>> >>>>>>>>> make: *** [all] Error 2
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> BUFRLIB was built on the same machine.
>> >>>>>>>>>
>> >>>>>>>>> I then end up with only gen_poly_mask, grid_stat, mode and
>> pcp_combine
>> >>>>>>>> executables in my /bin.
>> >>>>>>>>> Any help would be appreciated,
>> >>>>>>>>> Thanks,
>> >>>>>>>>> Theo Carter
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> ------------------------------------------------------------------------
>> >>>>>>>>>
>> >>>>>>>>> _______________________________________________
>> >>>>>>>>> Met_help mailing list
>> >>>>>>>>> Met_help at mailman.ucar.edu
>> >>>>>>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>> >
>




More information about the Met_help mailing list