WRFv3.2 catastrophic error: cannot open source file "xxx.h"

Dear all,
I am doing WRF3.2 compiling.
when I typed the following in the command line: ./compile em_real >&log.compile , I got the following errors (see in comile.txt) and failed to generate the *.exe file:

enc_jpeg2000.c(4): catastrophic error: cannot open source file "jasper/jasper.h"
  #include "jasper/jasper.h"
dec_jpeg2000.c(4): catastrophic error: cannot open source file "jasper/jasper.h"
  #include "jasper/jasper.h"

wrf_io.o: In function `ext_ncd_open_for_read_begin_':
wrf_io.f:(.text+0x1b41): undefined reference to `nf_open_'
wrf_io.f:(.text+0x1b7f): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x1bd7): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x1d1d): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x1e5f): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x2077): undefined reference to `nf_get_vara_text_'
wrf_io.f:(.text+0x2141): undefined reference to `nf_inq_nvars_'
wrf_io.f:(.text+0x21fe): undefined reference to `nf_inq_varname_'
wrf_io.f:(.text+0x2354): undefined reference to `nf_inq_varname_'
wrf_io.f:(.text+0x237c): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2594): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x269f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x28a6): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2aad): undefined reference to `nf_strerror_'
wrf_io.o:wrf_io.f:(.text+0x2cb3): more undefined references to `nf_strerror_' follow
wrf_io.o: In function `ext_ncd_open_for_update_':
wrf_io.f:(.text+0x4c61): undefined reference to `nf_open_'
wrf_io.f:(.text+0x4c9f): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x4cf7): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x4e3d): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x4f7f): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x5197): undefined reference to `nf_get_vara_text_'
wrf_io.f:(.text+0x5261): undefined reference to `nf_inq_nvars_'
wrf_io.f:(.text+0x531e): undefined reference to `nf_inq_varname_'
wrf_io.f:(.text+0x5474): undefined reference to `nf_inq_varname_'
wrf_io.f:(.text+0x549c): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x56b4): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x57bf): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x59c6): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x5bcd): undefined reference to `nf_strerror_'
wrf_io.o:wrf_io.f:(.text+0x5dd3): more undefined references to `nf_strerror_' follow
wrf_io.o: In function `ext_ncd_open_for_write_begin_':
wrf_io.f:(.text+0x690a): undefined reference to `nf_create_'
wrf_io.f:(.text+0x6976): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x756b): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x75ef): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x7687): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x789f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x7ab7): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x7ccf): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_open_for_write_commit_':
wrf_io.f:(.text+0x8174): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x81c1): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_ioclose_':
wrf_io.f:(.text+0x888e): undefined reference to `nf_close_'
wrf_io.f:(.text+0x88dd): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_iosync_':
wrf_io.f:(.text+0x9f70): undefined reference to `nf_sync_'
wrf_io.f:(.text+0x9faa): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_redef_':
wrf_io.f:(.text+0xa794): undefined reference to `nf_redef_'
wrf_io.f:(.text+0xa7d9): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_enddef_':
wrf_io.f:(.text+0xafd4): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0xb019): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_dom_ti_real_':
wrf_io.f:(.text+0xbc6b): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0xc4f0): undefined reference to `nf_get_att_real_'
wrf_io.f:(.text+0xc818): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0xcac5): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_dom_ti_integer_':
wrf_io.f:(.text+0xd64b): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0xdec5): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0xe267): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0xe514): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_dom_ti_double_':
wrf_io.f:(.text+0xf0a7): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0xf926): undefined reference to `nf_get_att_double_'
wrf_io.f:(.text+0xfcbc): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0xff68): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_dom_ti_logical_':
wrf_io.f:(.text+0x10afb): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x11375): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0x1172c): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x119d9): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_dom_ti_char_':
wrf_io.f:(.text+0x124b7): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x1299d): undefined reference to `nf_get_att_text_'
wrf_io.f:(.text+0x129de): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x12c71): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_dom_ti_real_':
wrf_io.f:(.text+0x13716): undefined reference to `nf_put_att_real_'
wrf_io.f:(.text+0x1374f): undefined reference to `nf_redef_'
wrf_io.f:(.text+0x1378a): undefined reference to `nf_put_att_real_'
wrf_io.f:(.text+0x137ae): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x13a85): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x13d1f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x13fb1): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1424e): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_dom_ti_integer_':
wrf_io.f:(.text+0x14dd6): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x14e0f): undefined reference to `nf_redef_'
wrf_io.f:(.text+0x14e4a): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x14e6e): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x15145): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x153df): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x15671): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1590e): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_dom_ti_double_':
wrf_io.f:(.text+0x16496): undefined reference to `nf_put_att_double_'
wrf_io.f:(.text+0x164cf): undefined reference to `nf_redef_'
wrf_io.f:(.text+0x1650a): undefined reference to `nf_put_att_double_'
wrf_io.f:(.text+0x1652e): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x16805): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x16a9f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x16d31): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x16fce): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_dom_ti_logical_':
wrf_io.f:(.text+0x17e0a): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x1805c): undefined reference to `nf_redef_'
wrf_io.f:(.text+0x184a9): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x1859b): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x189da): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x18c91): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x18f39): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x191f0): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_dom_ti_char_':
wrf_io.f:(.text+0x19f8e): undefined reference to `nf_put_att_text_'
wrf_io.f:(.text+0x19fc8): undefined reference to `nf_redef_'
wrf_io.f:(.text+0x1a019): undefined reference to `nf_put_att_text_'
wrf_io.f:(.text+0x1a03e): undefined reference to `nf_enddef_'
wrf_io.f:(.text+0x1a318): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1a5b6): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1a849): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1aae7): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_ti_real_':
wrf_io.f:(.text+0x1b52b): undefined reference to `nf_put_att_real_'
wrf_io.f:(.text+0x1b6c6): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_ti_double_':
wrf_io.f:(.text+0x1c2eb): undefined reference to `nf_put_att_double_'
wrf_io.f:(.text+0x1c486): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_ti_integer_':
wrf_io.f:(.text+0x1d0ab): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x1d246): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_ti_logical_':
wrf_io.f:(.text+0x1e266): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x1e5f2): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_ti_char_':
wrf_io.f:(.text+0x1f291): undefined reference to `nf_put_att_text_'
wrf_io.f:(.text+0x1f428): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x1f7c9): undefined reference to `nf_put_att_text_'
wrf_io.o: In function `ext_ncd_get_var_ti_real_':
wrf_io.f:(.text+0x20051): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x20744): undefined reference to `nf_get_att_real_'
wrf_io.f:(.text+0x20a5a): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x20ced): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_ti_double_':
wrf_io.f:(.text+0x218b1): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x21fa4): undefined reference to `nf_get_att_double_'
wrf_io.f:(.text+0x2232b): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x225be): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_ti_integer_':
wrf_io.f:(.text+0x23181): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x23869): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0x23bf9): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x23e8c): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_ti_logical_':
wrf_io.f:(.text+0x24a4f): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x25136): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0x254da): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2576d): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_ti_char_':
wrf_io.f:(.text+0x262b5): undefined reference to `nf_inq_att_'
wrf_io.f:(.text+0x267c3): undefined reference to `nf_get_att_text_'
wrf_io.f:(.text+0x267f9): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x26a54): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_td_real_':
wrf_io.f:(.text+0x27e5a): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x27f55): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x27f8c): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x28208): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2864e): undefined reference to `nf_put_vara_real_'
wrf_io.f:(.text+0x28676): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_support_routines_mp_gettimeindex_':
wrf_io.f:(.text+0x291e9): undefined reference to `nf_put_vara_text_'
wrf_io.f:(.text+0x2933f): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_td_integer_':
wrf_io.f:(.text+0x2a4fa): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x2a5f5): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x2a62c): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2a8a8): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2acee): undefined reference to `nf_put_vara_int_'
wrf_io.f:(.text+0x2ad16): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_td_double_':
wrf_io.f:(.text+0x2c3aa): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x2c4a5): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x2c4dc): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2c758): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2cb9e): undefined reference to `nf_put_vara_double_'
wrf_io.f:(.text+0x2cbc6): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_put_var_td_logical_':
wrf_io.f:(.text+0x2e306): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x2e571): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x2e5a8): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x2ede4): undefined reference to `nf_put_vara_int_'
wrf_io.o: In function `ext_ncd_put_var_td_char_':
wrf_io.f:(.text+0x30692): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x30787): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x307bb): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x30a3f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x30e8e): undefined reference to `nf_put_vara_text_'
wrf_io.f:(.text+0x30eb6): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_td_real_':
wrf_io.f:(.text+0x31bd2): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x31c26): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x3214c): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x325aa): undefined reference to `nf_get_vara_real_'
wrf_io.f:(.text+0x328bb): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x32aea): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x32d64): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x32fe1): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_td_integer_':
wrf_io.f:(.text+0x33b42): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x33b96): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x340b1): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x3450f): undefined reference to `nf_get_vara_int_'
wrf_io.f:(.text+0x348ac): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x34adb): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x34d55): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x34fd2): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_td_double_':
wrf_io.f:(.text+0x35b2d): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x35b81): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x360a3): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x364f9): undefined reference to `nf_get_vara_double_'
wrf_io.f:(.text+0x36888): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x36ab6): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x36d2f): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x36fac): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_td_logical_':
wrf_io.f:(.text+0x37b0d): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x37b61): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x38078): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x384cf): undefined reference to `nf_get_vara_int_'
wrf_io.f:(.text+0x3887b): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x38aa9): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x38d22): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x38f9f): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_get_var_td_char_':
wrf_io.f:(.text+0x39a3e): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x39a91): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x39f99): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x3a2a4): undefined reference to `nf_get_vara_text_'
wrf_io.f:(.text+0x3a2d4): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x3a4ff): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x3a775): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x3a9f9): undefined reference to `nf_strerror_'
wrf_io.o: In function `ext_ncd_write_field_':
wrf_io.f:(.text+0x3cc65): undefined reference to `nf_def_var_'
wrf_io.f:(.text+0x3ce40): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x3d006): undefined reference to `nf_def_dim_'
wrf_io.f:(.text+0x3d18b): undefined reference to `nf_put_att_int_'
wrf_io.f:(.text+0x3d38c): undefined reference to `nf_put_att_text_'
wrf_io.o: In function `ext_ncd_read_field_':
wrf_io.f:(.text+0x487cb): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x48bb4): undefined reference to `nf_inq_var_'
wrf_io.f:(.text+0x48cf9): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0x49371): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x4a451): undefined reference to `nf_inq_dimname_'
wrf_io.o: In function `ext_ncd_get_var_info_':
wrf_io.f:(.text+0x4c622): undefined reference to `nf_inq_varid_'
wrf_io.f:(.text+0x4c647): undefined reference to `nf_inq_vartype_'
wrf_io.f:(.text+0x4c677): undefined reference to `nf_get_att_int_'
wrf_io.f:(.text+0x4d088): undefined reference to `nf_get_att_text_'
wrf_io.f:(.text+0x4d231): undefined reference to `nf_inq_vardimid_'
wrf_io.f:(.text+0x4d382): undefined reference to `nf_inq_dimlen_'
wrf_io.f:(.text+0x4d3c3): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x4d5ba): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x4d7b2): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x4d9aa): undefined reference to `nf_strerror_'
wrf_io.f:(.text+0x4dba2): undefined reference to `nf_strerror_'
wrf_io.o:wrf_io.f:(.text+0x4f6c3): more undefined references to `nf_strerror_' follow
field_routines.o: In function `ext_ncd_realfieldio_':
field_routines.f:(.text+0x51): undefined reference to `nf_put_vara_real_'
field_routines.f:(.text+0x69): undefined reference to `nf_get_vara_real_'
field_routines.o: In function `ext_ncd_doublefieldio_':
field_routines.f:(.text+0x1c1): undefined reference to `nf_put_vara_double_'
field_routines.f:(.text+0x1d9): undefined reference to `nf_get_vara_double_'
field_routines.o: In function `ext_ncd_intfieldio_':
field_routines.f:(.text+0x331): undefined reference to `nf_put_vara_int_'
field_routines.f:(.text+0x349): undefined reference to `nf_get_vara_int_'
field_routines.o: In function `ext_ncd_logicalfieldio_':
field_routines.f:(.text+0xa4a): undefined reference to `nf_put_vara_int_'
field_routines.f:(.text+0xa77): undefined reference to `nf_get_vara_int_'
module_wrfsi_static.o: In function `wrfsi_static_mp_open_wrfsi_static_':
module_wrfsi_static.f:(.text+0x105): undefined reference to `nf_open_'
module_wrfsi_static.f:(.text+0x1fb): undefined reference to `nf_open_'
module_wrfsi_static.o: In function `wrfsi_static_mp_get_wrfsi_static_dims_':
module_wrfsi_static.f:(.text+0x4cd): undefined reference to `nf_open_'
module_wrfsi_static.f:(.text+0x5cd): undefined reference to `nf_open_'
module_wrfsi_static.f:(.text+0x5fa): undefined reference to `nf_inq_dimid_'
module_wrfsi_static.f:(.text+0x60c): undefined reference to `nf_inq_dimlen_'
module_wrfsi_static.f:(.text+0x625): undefined reference to `nf_inq_dimid_'
module_wrfsi_static.f:(.text+0x637): undefined reference to `nf_inq_dimlen_'
module_wrfsi_static.f:(.text+0x6e2): undefined reference to `nf_close_'
module_wrfsi_static.o: In function `wrfsi_static_mp_get_wrfsi_static_2d_':
module_wrfsi_static.f:(.text+0x9c1): undefined reference to `nf_open_'
module_wrfsi_static.f:(.text+0xac1): undefined reference to `nf_open_'
module_wrfsi_static.f:(.text+0xaee): undefined reference to `nf_inq_varid_'
module_wrfsi_static.f:(.text+0xd81): undefined reference to `nf_get_var_real_'
module_wrfsi_static.f:(.text+0xfaa): undefined reference to `nf_close_'
make[2]: [diffwrf] Error 1 (ignored)

compile.txt (74.0 KB)

other information:
the compiler is intel-11.1, gcc-v 4.4.7.
I successfully installed zlib, jasper, libpng, hdf5, mpich2-1.1.1p1, netcdf-3.6.3 and ioapi-3.2:

# ncdump
ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] [-x] [-k] file
  [-c]             Coordinate variable data and header information
  [-h]             Header information only, no data
  [-v var1[,...]]  Data for variable(s) <var1>,... only
  [-b [c|f]]       Brief annotations for C or Fortran indices in data
  [-f [c|f]]       Full annotations for C or Fortran indices in data
  [-l len]         Line length maximum in data section (default 80)
  [-n name]        Name for netCDF (default derived from file name)
  [-p n[,n]]       Display floating-point values with less precision
  [-x]             Output XML (NcML) instead of CDL
  [-k]             Output kind of netCDF file
  file             Name of netCDF file
netcdf library version "3.6.3" $
# ls libioapi.a
libioapi.a

#ls *.mod
m3utilio.mod  modgctp.mod     modncfio.mod  modwrfio.mod
modatts3.mod  modmpasfio.mod  modpdata.mod
# which mpicc
$DIR/LIBRARIES/mpich/bin/mpicc

the global variables are as follows:

#module load
export CC=icc
export CXX=icpc
export FC=ifort
export CFLAGS=-m64
export F77=ifort
export FFLAGS=-m64
export DIR=/xxx/public/usr_local
export F90=ifort

#netcdf
export NETCDF=$DIR/LIBRARIES/netcdf
export PATH=$NETCDF/bin:$PATH
export LIB=$NETCDF/lib
export INC=$NETCDF/include
export LD_LIBRARY_PATH=$NETCDF/lib:$LD_LIBRARY_PATH
export MANPATH=$DIR/LIBRARIES/netcdf/share/man:$MANPATH

#for mpich
export PATH=$DIR/LIBRARIES/mpich/bin:$PATH
export MANPATH=$DIR/LIBRARIES/mpich/share/man:$MANPATH

#ioapi
export BIN=Linux2_x86_64ifort
export IOAPI=$DIR/LIBRARIES/ioapi-3.2
export PATH=${IOAPI}/Linux2_x86_64ifort:$PATH

#wrf wps
export INCLUDE=${DIR}/LIBRARIES/netcdf/include:${INCLUDE}
export PATH=$DIR/LIBRARIES/mpich/bin:$PATH
export LDFLAGS=-L$DIR/LIBRARIES/netcdf/lib
export CPPFLAGS=-I$DIR/LIBRARIES/netcdf/include
export JASPERLIB=$DIR/LIBRARIES/netcdf/lib
export JASPERINC=$DIR/LIBRARIES/netcdf/include
export WRF_DIR=$DIR/Build_WRF/WRFV3
export WRFIO_NCD_NO_LARGE_FILE_SUPPORT=1
export WRF_EM_CORE=1

I would appreciate it if you would take the time out of your busy schedule to check out my posts and give suggestions.
Best regards,
Janice

I solved the problem.

and what was that solution?

I’ve got a very similar issue with wrf v4.2

Hi Robwaters,

 Did you get the solution from bluebulu108?

 When you said "I've got a very similar issue with wrfv4.2", could you please provide a detailed description of your issue? Are you compiling WRF-CMAQ coupled model?

Cheers,
David

Hi Robwaters,

 Since I don't check this forum often, please feel free to contact me direct, wong.david-c@epa.gov.

Cheers,
David