[Met_help] ascii2nc

John Halley Gotway johnhg at ucar.edu
Wed Mar 24 16:44:42 MDT 2010


Jianting,

Just to make sure everything works, I went ahead and built MET on a 64-bit machine using PGI version 8.0-5 and NetCDF version 4.0.1.  I see that you're using PGI version 10.0, but 8.0-5 is the most
recent one we have here.  It built fine without any problems.

Those undefined references you're seeing are still from the NetCDF library.  Try running the following command:
   nm /nfs/home1/HLRS/IPM/ipmjtchu/netcdf4.0.1/lib/libnetcdf_c++.a | grep "add_att"

When I run that, I get the following output.  If you're not seeing something similar, then you still have issues with NetCDF.  Are you perhaps linking to a version of NetCDF that's built on a
different machine that may be running a 32-bit operating system?  If so, try building NetCDF on the same machine that you're using to build MET.

00000000000056a9 t __add_att__5NcVarFPCcScEND
00000000000059a2 t __add_att__5NcVarFPCcT1END
0000000000005633 t __add_att__5NcVarFPCccEND
0000000000005929 t __add_att__5NcVarFPCcdEND
00000000000058a2 t __add_att__5NcVarFPCcfEND
00000000000057a4 t __add_att__5NcVarFPCciEND
0000000000005aa9 t __add_att__5NcVarFPCciPCScEND
0000000000005d29 t __add_att__5NcVarFPCciPCdEND
0000000000005ca9 t __add_att__5NcVarFPCciPCfEND
0000000000005ba9 t __add_att__5NcVarFPCciPCiEND
0000000000005c29 t __add_att__5NcVarFPCciPClEND
0000000000005b29 t __add_att__5NcVarFPCciPCsEND
0000000000005a22 t __add_att__5NcVarFPCciT1END
0000000000005825 t __add_att__5NcVarFPCclEND
0000000000005725 t __add_att__5NcVarFPCcsEND
00000000000010bc t __add_att__6NcFileFPCcScEND
000000000000121d t __add_att__6NcFileFPCcT1END
000000000000108c t __add_att__6NcFileFPCccEND
00000000000011e2 t __add_att__6NcFileFPCcdEND
00000000000011a2 t __add_att__6NcFileFPCcfEND
000000000000116b t __add_att__6NcFileFPCciEND
00000000000012a3 t __add_att__6NcFileFPCciPCScEND
00000000000013e3 t __add_att__6NcFileFPCciPCdEND
00000000000013a3 t __add_att__6NcFileFPCciPCfEND
0000000000001363 t __add_att__6NcFileFPCciPCiEND
0000000000001323 t __add_att__6NcFileFPCciPClEND
00000000000012e3 t __add_att__6NcFileFPCciPCsEND
0000000000001263 t __add_att__6NcFileFPCciT1END
000000000000112d t __add_att__6NcFileFPCclEND
00000000000010ed t __add_att__6NcFileFPCcsEND
0000000000005640 T add_att__5NcVarFPCcSc
0000000000005930 T add_att__5NcVarFPCcT1
00000000000055d0 T add_att__5NcVarFPCcc
00000000000058b0 T add_att__5NcVarFPCcd
0000000000005830 T add_att__5NcVarFPCcf
0000000000005730 T add_att__5NcVarFPCci
0000000000005a30 T add_att__5NcVarFPCciPCSc
0000000000005cb0 T add_att__5NcVarFPCciPCd
0000000000005c30 T add_att__5NcVarFPCciPCf
0000000000005b30 T add_att__5NcVarFPCciPCi
0000000000005bb0 T add_att__5NcVarFPCciPCl
0000000000005ab0 T add_att__5NcVarFPCciPCs
00000000000059b0 T add_att__5NcVarFPCciT1
00000000000057b0 T add_att__5NcVarFPCcl
00000000000056b0 T add_att__5NcVarFPCcs
0000000000001090 T add_att__6NcFileFPCcSc
00000000000011f0 T add_att__6NcFileFPCcT1
0000000000001060 T add_att__6NcFileFPCcc
00000000000011b0 T add_att__6NcFileFPCcd
0000000000001170 T add_att__6NcFileFPCcf
0000000000001140 T add_att__6NcFileFPCci
0000000000001270 T add_att__6NcFileFPCciPCSc
00000000000013b0 T add_att__6NcFileFPCciPCd
0000000000001370 T add_att__6NcFileFPCciPCf
0000000000001330 T add_att__6NcFileFPCciPCi
00000000000012f0 T add_att__6NcFileFPCciPCl
00000000000012b0 T add_att__6NcFileFPCciPCs
0000000000001230 T add_att__6NcFileFPCciT1
0000000000001100 T add_att__6NcFileFPCcl
00000000000010c0 T add_att__6NcFileFPCcs


Jianting Chu wrote:
> Dear John,
>    Thank you for your suggestion. Anyway, it still does not work, and
> the error is the same.
> 
> Best wishes,
> Jianting
> 
> John Halley Gotway wrote:
>> Jianting,
>>
>> I've found in the past that sometimes when I compile NetCDF, the "make
>> check" does NOT work.  Just go ahead and do a "make" followed by "make
>> install" and then try recompiling MET.  Let me know if
>> that works.
>>
>> Thanks,
>> John
>>
>> Jianting Chu wrote:
>>  
>>> Dear John,
>>>    Thank you for your detailed explaination. But the NetCDF can not be
>>> built this time...
>>>    My step is the follow:
>>>
>>>  1) make clean
>>>  2) export CC=/opt/compiler/pgi/10.0/linux86-64/10.0/bin/pgcc
>>>  3) export CXX=/opt/compiler/pgi/10.0/linux86-64/10.0/bin/pgCC
>>>  4) export FC=''
>>>  5) export F90=''
>>>  6) ./configure --prefix=/nfs/home1/HLRS/IPM/ipmjtchu/netcdf4.0.1
>>> --disable-netcdf-4   7) make check install (because compile can not be
>>> used) 
>>>    In fact, I once used last two steps, and passed.
>>>    I attached the make.log file from step 7. Would you please
>>> checking it?
>>>
>>> Best wishes,
>>> Jianting
>>>
>>>
>>>
>>> John Halley Gotway wrote:
>>>    
>>>> Jianting,
>>>>
>>>> Thanks for sending the output of make.  Yes, it looks like there is a
>>>> problem compiling with NetCDF.  I see that you're compiling MET using
>>>> the PGI compilers.  And I'm wondering if you compiled the
>>>> NetCDF library with the PGI compilers as well.  If you just used the
>>>> default configure/compile procedure for NetCDF, it probably did NOT
>>>> use PGI.
>>>>
>>>> If you think that may be the problem, please try recompiling your
>>>> NetCDF library in /nfs/home1/HLRS/IPM/ipmjtchu/netcdf4.0.1 using the
>>>> following commands:
>>>>   make clean
>>>>   setenv CC  /opt/compiler/pgi/10.0/linux86-64/10.0/bin/pgcc
>>>>   setenv CXX /opt/compiler/pgi/10.0/linux86-64/10.0/bin/pgCC
>>>>   setenv FC  ''
>>>>   setenv F90 ''
>>>>   ./configure --prefix="path/where/you/want/to/install/netcdf"
>>>>   ./compile
>>>>
>>>> These steps are described here:
>>>>  
>>>> http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/req_libs.php
>>>>
>>>>
>>>>
>>>> This will disable the compilation of the NetCDF/Fortran interface that
>>>> MET doesn't use.  Once you've re-compiled NetCDF, try recompiling MET
>>>> and see if it goes better.
>>>>
>>>> Thanks,
>>>> John
>>>>
>>>> Jianting Chu wrote:
>>>>  
>>>>      
>>>>> Dear John,
>>>>>    Yes, you are right. The prolem maybe caused by the installment. We
>>>>> are using METv2.0,  but  do not  use the lasted  patches.tar.gz file.
>>>>>     Since we need to use MET Tool in one supercomputer, I need to
>>>>> build
>>>>> the 4 outer libraries. I have built 3 except for f2c.
>>>>>    I tested to make MET Tool, and it seems something is wrong with
>>>>> NetCDF.
>>>>>    I attached my Makefile and make.log. Would you please taking a
>>>>> look?
>>>>>    Thank you very much!
>>>>>
>>>>>
>>>>> Best wishes,
>>>>> Jianting
>>>>>
>>>>>
>>>>> John Halley Gotway wrote:
>>>>>           
>>>>>> Jianting,
>>>>>>
>>>>>> Thanks for sending that data file.  I ran it through ascii2nc here
>>>>>> and
>>>>>> found that it did retrieve 2,123,040 observations!  The header of the
>>>>>> NetCDF file is listed below.
>>>>>>
>>>>>> netcdf wess_198901 {
>>>>>> dimensions:
>>>>>>         mxstr = 16 ;
>>>>>>         hdr_arr_len = 3 ;
>>>>>>         obs_arr_len = 5 ;
>>>>>>         nhdr = 212304 ;
>>>>>>         nobs = UNLIMITED ; // (2123040 currently)
>>>>>>
>>>>>> It occurs to me that perhaps you're not using the most recent version
>>>>>> of MET.  Before we look any further at this, could you please
>>>>>> download
>>>>>> the latest set of patches for METv2.0, recompile MET, and
>>>>>> then try rerunning?
>>>>>>
>>>>>> Please go to:
>>>>>> http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php
>>>>>>
>>>>>>
>>>>>>
>>>>>> Read the first section on that page, download the file
>>>>>> "METv2.0_patches_20091223.tar.gz" and follow the instructions for
>>>>>> applying those patches.
>>>>>>
>>>>>> Please give that a try and let me know if you continue to experience
>>>>>> problems.
>>>>>>
>>>>>> Thanks,
>>>>>> John
>>>>>>
>>>>>> Jianting Chu wrote:
>>>>>>  
>>>>>>               
>>>>>>> Dear Sir,
>>>>>>>    I found a problem with ascii2nc.
>>>>>>>    I can use this tool to transfer data format, anyway, the head of
>>>>>>> transformed NetCDF is like this:
>>>>>>> -------------------------------------------
>>>>>>> netcdf wess_198901 {
>>>>>>> dimensions:
>>>>>>>        mxstr = 16 ;
>>>>>>>        hdr_arr_len = 3 ;
>>>>>>>        obs_arr_len = 5 ;
>>>>>>>        nhdr = 212304 ;
>>>>>>>        nobs = UNLIMITED ; // (0 currently)
>>>>>>> --------------------------------------------
>>>>>>>    That means no observation data have been transformed. In fact,
>>>>>>> this
>>>>>>> file can not be used in ./point_stat.
>>>>>>>    I attached the corresponding ASCII file. Would you please
>>>>>>> taking a
>>>>>>> look at it?
>>>>>>>    Thank you very much!
>>>>>>>
>>>>>>> With best wishes,
>>>>>>> Jianting
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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