metgrid.exe :Error in ext_pkg_write_commit

Having problems running the WRF Preprocessing Sysmte (WPS)?

metgrid.exe :Error in ext_pkg_write_commit

Postby flash » Fri Jul 25, 2008 4:02 pm

I got trouble in running metgrid.exe with large domain with RUC data On Ranger (Compiled with Intel 10.1 &Netcdf-intel compiler oR Pgi7.1&Netcdf-pgi ,linux x86_64,serial), there are the same error:

+ metgrid.exe
Processing domain 1 of 1
Processing 2007-08-19_00
/scratch/01020/yy/WPS_TEST/FILE
WRF_DEBUG: NetCDF error: NetCDF: One or more variable sizes violate format constraints
WRF_DEBUG: NetCDF error in ext_ncd_open_for_write_commit wrf_io.F90, line 1343
ERROR: Error in ext_pkg_write_commit
FORTRAN STOP
+ date
Fri Jul 25 14:48:53 CDT 2008
TACC: Cleaning up after job: 161947
TACC: Done.

The line 1343 in wrf_io.F90(in WRFV3/external/io_netcdf,serial) is :
stat = NF_ENDDEF(DH%NCID)
call netcdf_err(stat,Status)
if(Status /= WRF_NO_ERR) then
write(msg,*) 'NetCDF error in ext_ncd_open_for_write_commit ',__FILE__,', line', __LINE__
call wrf_debug ( WARN , TRIM(msg))
return

I print the Status= -1021
The step is goting to write the Netcdf file(--- Initializing output module. --- ERROR: Error in ext_pkg_write_commit).

In WPS, I also pay attention to the steps:
ln -sf ungrib/Variable_Tables/Vtable.RUCb Vtable;
cd ./metgrid ; ln -sf METGRID.TBL.ARW.ruc METGRID.TBL

My domain is set as:

e_we = 881
e_sn = 881
geog_data_res = '30s','2m',
dx = 3000,
dy = 3000,
map_proj = 'lambert',
ref_lat = 33.00,
ref_lon = -101.00,
truelat1 = 30.0,
truelat2 = 35.0,
stand_lon = -101.0,
It souns like I can't creat a Netcdf file lager than 2G. But the WRF model can creat larger file.
flash
 
Posts: 3
Joined: Fri Jul 25, 2008 3:52 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby wrfhelp » Fri Aug 01, 2008 7:04 pm

This might be the problem with netcdf file size exceeding 2 Gb. If you are using netcdf 3.6 or later,
which begins to support larger file than 2 Gb, you make a code change in WRFV3/external/io_netcdf/wrf_io.F90,
and recompile WRFV3 and then WPS to overcome the problem. Edit that routine, and change the following line from

stat = NF_CREATE(FileName, NF_CLOBBER, DH%NCID)
to
stat = NF_CREATE(FileName, bit_or(NF_CLOBBER,NF_64BIT_OFFSET), DH%NCID)

In upcoming V3.0.1, this can be done by setting environment variable prior to configure and compile:

setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1

wrfhelp
wrfhelp
 
Posts: 68
Joined: Tue Apr 15, 2008 1:33 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby jploski » Sun Aug 03, 2008 2:24 pm

The above solution works, but I had to use

stat = NF_CREATE(FileName, OR(NF_CLOBBER,NF_64BIT_OFFSET), DH%NCID)

instead of the suggested

stat = NF_CREATE(FileName, bit_or(NF_CLOBBER,NF_64BIT_OFFSET), DH%NCID)

because bit_or was undefined.
jploski
 
Posts: 5
Joined: Sun Aug 03, 2008 12:50 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby flash » Mon Aug 04, 2008 10:18 am

Thank you very much
flash
 
Posts: 3
Joined: Fri Jul 25, 2008 3:52 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby MeganG » Tue Mar 17, 2009 2:03 pm

Hi,

I get a similiar error when running metgrid.

Processing domain 1 of 2
Processing 2004-07-01_00
FILE
WRF_DEBUG: NetCDF error: No such file or directory
WRF_DEBUG: NetCDF error in ext_ncd_open_for_write_begin wrf_io.F90, line
1250
ERROR: Error in ext_pkg_open_for_write_begin.

The netCDF I'm using is netcdf-3.6.2. And in wrf_io.F90, the change described in the previous post hasn't been made, it's the default.

! stat = NF_CREATE(FileName, OR(NF_CLOBBER,NF_64BIT_OFFSET), DH%NCID)
stat = NF_CREATE(FileName, NF_CLOBBER, DH%NCID)

Should I recompile WRF and WPS with the commented-out line instead of the default? or is my error unrelated to this?

Also, I've noticed this error only occurs when I qsub metgrid on the compute cluster I'm using. If I run on the login node, metgrid runs just fine.
MeganG
 
Posts: 1
Joined: Tue Mar 17, 2009 1:54 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby scaine » Mon Nov 15, 2010 10:25 pm

re-compiling WRF with environment variable WRFIO_NCD_LARGE_FILE_SUPPORT=1 should fix this, at least it did for me. No need to edit any source code.

In bash shell do

export WRFIO_NCD_LARGE_FILE_SUPPORT=1
scaine
 
Posts: 17
Joined: Tue Dec 23, 2008 9:53 am

metgrid.exe : WRF_DEBUG: NetCDF error:: Write to read only

Postby iuryangelo » Mon Mar 21, 2011 10:47 am

Hi,

I get a similiar error when running metgrid.


Processing domain 1 of 1
Processing 2011-03-20_00
FILE
WRF_DEBUG: NetCDF error: NetCDF: Write to read only
WRF_DEBUG: NetCDF error in ext_ncd_open_for_write_begin wrf_io.F90, line 1289
ERROR: Error in ext_pkg_open_for_write_begin.
application called MPI_Abort(MPI_COMM_WORLD, 0) - process 0[unset]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 0) - process 0

The netCDF I'm using is netcdf-4.1.2-beta2.

what's wrong?
Thank you, in advance.
iuryangelo
 
Posts: 1
Joined: Mon Mar 21, 2011 10:32 am

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby sdk » Sun May 01, 2011 1:41 am

I have the same problem using necdf 4.1.1. Did you find a solution?
sdk
 
Posts: 14
Joined: Sun Mar 14, 2010 1:18 am

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby jared-lee » Tue Apr 26, 2016 4:23 pm

I just ran into these same errors with WRF/WPS v3.7.1 and NetCDF v4.3.0.

Solution: set the following environment variable (I put it in my .bash_profile):

export WRFIO_NCD_LARGE_FILE_SUPPORT=1

Then clean/re-compile WRF, then clean/re-compile WPS. Now everything works for me. It had been choking because metgrid was trying to create a large file (my domain is 950x950), but when compiled with that large file support environment variable, it works just fine now. Hope that helps others that run into this error.

Jared
jared-lee
 
Posts: 25
Joined: Wed Jun 09, 2010 7:20 pm

Re: metgrid.exe :Error in ext_pkg_write_commit

Postby whu_zl » Thu Feb 23, 2017 8:50 am

hi,
when I was runnig metgrid.exe,tip the error:Error in ext_pkg_open_for_write_begin,and in the metgrid.log there are some lines ,such as:
"Couldn't find ST000010 at level 200100.000000 to fill level 10.000000 of ST.
Couldn't find SM000010 at level 200100.000000 to fill level 10.000000 of SM.
Couldn't find SW000010 at level 200100.000000 to fill level 1.000000 of SW.
Couldn't find SOILM000 at level 200100.000000 to fill level 0.000000 of SOILM.
Couldn't find SOILT000 at level 200100.000000 to fill level 0.000000 of SOILT."
so anyone occurs error like this ? and how to deal with this~
whu_zl
 
Posts: 1
Joined: Wed Feb 22, 2017 7:31 am


Return to Runtime Problems

Who is online

Users browsing this forum: No registered users and 2 guests