- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm currently trying to compile a utilities posted by WRF website which is used for reading netCDF files. However, the compilation failed when I following the instruction provided in the file (the source file is attached.):
[bash]ifort read_wrf_nc.f -L/usr/local/netcdf/lib -lnetcdf -lm -I/usr/local/netcdf/include -Mfree -o read_wrf[/bash]
Here are the message I got during the compiling:
[bash]ifort: command line warning #10006: ignoring unknown option '-Mfree' : error #5149: Illegal character in statement label fieldIt looks like the problem is associated with the FORTRAN code itself. I have no problem compiling other programmes such as mm5 or wrf. I'm running a Ubuntu 10.04 64bit system. I'm not quite familiar with FORTRAN code and It really confused me. Any suggestion is much appreciated!: error #5149: Illegal character in statement label field : error #5149: Illegal character in statement label field : error #5149: Illegal character in statement label field : error #5149: Illegal character in statement label field : error #5118: First statement in file must not be continued read_wrf_nc.f(187): error #5149: Illegal character in statement label field TYPE proj_info --^ read_wrf_nc.f(187): error #5149: Illegal character in statement label field TYPE proj_info ---^ read_wrf_nc.f(187): error #5149: Illegal character in statement label field TYPE proj_info ----^ read_wrf_nc.f(185): error #5192: Lead underscore not allowed MODULE map_utils ----------^ read_wrf_nc.f(185): error #5082: Syntax error, found IDENTIFIER '_UTILSPROJ_INFO' when expecting one of:
; MODULE map_utils ----------^ read_wrf_nc.f(214): error #5149: Illegal character in statement label field END TYPE proj_info --^ read_wrf_nc.f(214): error #5149: Illegal character in statement label field END TYPE proj_info ---^ read_wrf_nc.f(214): error #5149: Illegal character in statement label field END TYPE proj_info ----^ read_wrf_nc.f(216): error #5149: Illegal character in statement label field CONTAINS -^ read_wrf_nc.f(216): error #5149: Illegal character in statement label field CONTAINS --^ read_wrf_nc.f(216): error #5149: Illegal character in statement label field CONTAINS ---^ read_wrf_nc.f(216): error #5149: Illegal character in statement label field CONTAINS ----^ read_wrf_nc.f(219): error #5149: Illegal character in statement label field SUBROUTINE latlon_to_ij(cdfid, proj, ts_ll, ts_xy ) ---^ read_wrf_nc.f(219): error #5149: Illegal character in statement label field SUBROUTINE latlon_to_ij(cdfid, proj, ts_ll, ts_xy ) ----^ read_wrf_nc.f(266): error #5149: Illegal character in statement label fieldEND SUBROUTINE latlon_to_ij ---^ read_wrf_nc.f(266): error #5149: Illegal character in statement label field END SUBROUTINE latlon_to_ij ----^ read_wrf_nc.f(269): error #5149: Illegal character in statement label field SUBROUTINE llij_ps(lat,lon,proj,i,j) ---^ read_wrf_nc.f(269): error #5149: Illegal character in statement label field SUBROUTINE llij_ps(lat,lon,proj,i,j) ----^ (1606): catastrophic error: Too many errors, exiting compilation aborted for read_wrf_nc.f (code 1) [/bash]
Jack
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifort -help
and choose the compiler switch best matched to what you wanted to do with -Mfree
It is probable that just renaming your file with the extension .f90 and leaving out -Mfree, or, as Tim18 points out below, using -free without renaming the file, is what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page