Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) Using pnetCDF in WRF 3.7.1

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
Dear WRF developers,

I try to use pnetCDF in WRF 3.7.1. Please find attached the output from configure and compile. In namelist.input I set
io_form_history = 11,
io_form_restart = 11,
When running WRF I get the following error:

open_hist_w : error opening wrfout_d01_00000 for writing. 100

and no output files are written. If I choose
io_form_history = 2,
io_form_restart = 2,
everything is fine and the output files are written.

Any ideas what I am doing wrong here?

Thank you and best regards!


  • configure.wrf
    23.3 KB · Views: 45
  • log.compile
    66.8 KB · Views: 44
  • namelist.input00000.txt
    5.2 KB · Views: 61
I've moved this topic to the "Special Running Options" section of the forum, as I don't think this is a compiling problem.

1) Is it safe to assume that you're getting this error when running wrf.exe (and not real.exe)?
2) If you're getting it during WRF, this *may* be related to the fact that you're using standard netcdf files for real.exe, and therefore the input type is different than the output type for wrf? I'm not an expert on this, so this could be wrong. Do you mind trying to run real by setting the io_form_input and io_form_boundary to 11?
3) If that doesn't make a difference, please attach your full error log so that I can take a look. Thanks!
Thank you for your message!

1) Yes, I use wrf.exe
2) If I use 11 for io_form_input and io_form_boundary, I get an error:
-------------- FATAL CALLED ---------------
wrf_get_dom_ti_integer getting dimension information from dataset
med_initialdata_input: calling input_input

The error is the same whether I use netcdf 4 or classic netcdf for input and boundary files.
3) I attach the logs both for the run where "FATAL" is called (see ESIAS_WP4_WRF-err.2609906.txt) and for the one with the error
open_hist_w : error opening wrfout_d01_00003 for writing. 100 (see ESIAS_WP4_WRF-err.2609933.txt).
The last one runs through fine but never writes any output files.

Thank you!


  • ESIAS_WP4_WRF-err.2609906.txt
    40.5 KB · Views: 52
  • ESIAS_WP4_WRF-err.2609933.txt
    656.3 KB · Views: 49
Thanks for sending those. The error logs do not seem to be complete and have a lot of extra junk in them. For these logs, did you set debug_level to anything higher than 0? If so, please set that back to 0. Otherwise, if you are running this with a dmpar build, you should have rsl.* files. I would like to see those files (you can package them all together in a single *.TAR file and attach it here). If you're not using dmpar, then when you run wrf, have the standard error/output go to a file by using a command like:
./wrf.exe >& wrfout.txt
and then you can send me those wrfout.txt files for the 2 different types of runs you're doing (with the 2 different errors). Please also send the corresponding namelists for each case. Thanks!
Hi kwerner,

debug level is set to 0. I am running with dmpar (Option 15), but I have no rsl files. I attach the output and namelist files for three runs:
run7: All io_form options set to 2. (runs through fine, output files are written)
run8: io_form_history = 11, io_form_restart = 11 (runs through fine, but no output files are written)
run9: io_form_history = 11, io_form_restart = 11, io_form_input = 11, io_form_boundary = 11 (crashes with fatal)

Errors for run8 and run9 are:

run8: "open_hist_w : error opening wrfout_d01_00000 for writing. 100"
run9: "-------------- FATAL CALLED ---------------
med_initialdata_input: calling input_input
-------------- FATAL CALLED ---------------
wrf_get_dom_ti_integer getting dimension information from dataset

Attached you find the full output for the three runs and the corresponding namelist files.

Thank you for looking into this! Best regards!


  • run.tar.gz
    23.7 KB · Views: 54
I had no rsl files since I did not create the rsl folder. I now attach the rsl files for the three different runs (run7, run8 and run9) mentioned in the previous post.

Thank you and best regards!


  • rsl.tar.gz
    40.7 KB · Views: 48
Thanks for sending those. Okay, since, according to the output log, it does complete without errors when NOT running the real.exe components with option 11, let's forget that for now, and just focus on why this isn't giving any output when using option 11 for wrf.exe.

I seriously doubt this has anything to do with it, but can you first try to comment out the "history_outname" line, so that it's not writing files with a different name (than default)? If that doesn't do anything different, then I'd like you to try with the namelist.input that I've attached. It's very close to the default namelist, but with some of the essential settings needed for your run (dates, domain, etc.). You are currently doing a lot with your namelist, so it's best to try to work from something simple to see if the problem is related to one of the many options you are trying to do.


  • namelist.input
    4 KB · Views: 58
I tried removing "history_outname", but this did not have any effect. I then used your uploaded namelist.input and get error [1] (see below) Then, I replaced sections "physics" and "dynamics" with the original ones. This results in error [2] (see below). Then, I added

bdy_inname = 'wrfbdy00000_d<domain>',
input_inname = 'wrfinput00000_d<domain>'

and it runs through fine. Unfortunately, I still have no output and get the error: open_hist_w : error opening wrfout_d01_2015-08-23_00:00:00 for writing. 100

I attach the output rsl logs. Probably, my version is modified from the original WRF 3.7.1 version. Any hint at which files in the source code I should be looking?

Thank you and best regards!

Quilting with 1 groups of 0 I/O tasks.
------ ERROR while reading namelist physics ------
------ ERROR while reading namelist dynamics ------
-------------- FATAL CALLED ---------------
ERRORS while reading one or more namelists from namelist.input.

Quilting with 1 groups of 0 I/O tasks.
Ntasks in X 6 , ntasks in Y 8
--- WARNING: traj_opt is zero, but num_traj is not zero; setting num_traj to zero.
--- NOTE: sst_update is 0, setting io_form_auxinput4 = 0 and auxinput4_interval = 0 for all domains
--- NOTE: grid_fdda is 0 for domain 1, setting gfdda interval and ending time to 0 for that domain.
--- NOTE: both grid_sfdda and pxlsm_soil_nudge are 0 for domain 1, setting sgfdda interval and ending time to 0 for that domain.
--- NOTE: obs_nudge_opt is 0 for domain 1, setting obs nudging interval and ending time to 0 for that domain.
--- NOTE: bl_pbl_physics /= 4, implies mfshconv must be 0, resetting
--- NOTE: RRTMG radiation is not used, setting: o3input=0 to avoid data pre-processing
--- NOTE: num_soil_layers has been set to 5
Parent domain
ids,ide,jds,jde 1 180 1 180
ims,ime,jms,jme -4 37 -4 30
ips,ipe,jps,jpe 1 30 1 23
DYNAMICS OPTION: Eulerian Mass Coordinate
alloc_space_field: domain 1 , 48333368 bytes allocated
-------------- FATAL CALLED ---------------
program wrf: error opening wrfinput_d01 for reading ierr= -1021


  • rsl.tar.gz
    36.1 KB · Views: 51
I solved this issue. It was a compilation problem. I had compiled WRF without pnetCDF support before. Then I set the PNETCDF path correctly and reconfigured and recompiled. Unfortunately, the built executable still was not able to recognize io_form = 11 (pnetcdf), although configure.wrf stated it had PNETCDF support. I had to completely clean and compile from the beginning. The new executable (with different size) was then able to output in pnetCDF format.

Thank you for looking into this!