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

bad file descriptor error

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.

jzhyustc

New member
I have run init_atmosphere_model for static and sfc_update successfully. But when I run for init with GFS proccessed from WPS, I got following error:
application called MPI_Abort(MPI_COMM_WORLD, 1734831948) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1734831948
:
system msg for write_line failure: Bad file descriptor

I am wondering if anyone has any experience on how to solve this issue. Thanks!

Below is my namelist:

&nhyd_model
config_init_case = 7
config_start_time='2019-8-16_00:00:00'
/
&dimensions
config_nvertlevels=41
config_nsoillevels=4
config_nfglevels=38
config_nfgsoillevels=4
/
&data_sources
config_met_prefix='FILE'
config_use_spechumd=true
config_landuse_data='USGS'
/
&vertical_grid
config_ztop=30000.0
config_nsmterrain=1
config_smooth_surfaces=true
config_dzmin=0.3
config_nsm=30
config_tc_vertical_grid=true
/
&preproc_stages
config_static_interp = false
config_native_gwd_static = false
config_vertical_grid = true
config_met_interp = true
config_input_sst = false
config_frac_seaice = true
/



and streams:
<streams>
<immutable_stream name="input"
type="input"
filename_template="x1.40962.static.nc"
input_interval="initial_only" />

<immutable_stream name="output"
type="output"
filename_template="x1.40962.init.nc"
packages="initial_conds"
output_interval="initial_only" />
</streams>
 
At what point in the execution of the init_atmosphere_model program is the "system msg for write_line failure: Bad file descriptor" message being printed? Could you attach your log.init_atmosphere.* files, and a full log of any messages written to standard output and standard error?
 
log*.err:
----------------------------------------------------------------------
Beginning MPAS-init_atmosphere Error Log File for task 0 of 1
Opened at 2019/08/19 16:04:18
----------------------------------------------------------------------

ERROR: ********************************************************************************
ERROR: Error opening initial meteorological data file FILE:2019-8-16_00:
CRITICAL ERROR: ********************************************************************************
Logging complete. Closing file at 2019/08/19 16:04:18



log*.out:

----------------------------------------------------------------------
Beginning MPAS-init_atmosphere Output Log File for task 0 of 1
Opened at 2019/08/19 16:04:11
----------------------------------------------------------------------


Using default single-precision reals

Reading namelist from file namelist.init_atmosphere
*** Encountered an issue while attempting to read namelist record interpolation_control
The following values will be used for variables in this record:

config_extrap_airtemp = linear

*** Encountered an issue while attempting to read namelist record io
The following values will be used for variables in this record:

config_pio_num_iotasks = 0
config_pio_stride = 1

*** Encountered an issue while attempting to read namelist record decomposition
The following values will be used for variables in this record:

config_block_decomp_file_prefix = x1.40962.graph.info.part.
config_number_of_blocks = 0
config_explicit_proc_decomp = F
config_proc_decomp_file_prefix = graph.info.part.

Reading streams configuration from file streams.init_atmosphere
Found mesh stream with filename template x1.40962.static.nc
Using default io_type for mesh stream
** Attempting to bootstrap MPAS framework using stream: input
Bootstrapping framework with mesh fields from input file 'x1.40962.static.nc'
* Requested field lbc_scalars is deactivated due to packages, or is a scratch variable.
* Requested field lbc_u is deactivated due to packages, or is a scratch variable.
* Requested field lbc_w is deactivated due to packages, or is a scratch variable.
* Requested field lbc_rho is deactivated due to packages, or is a scratch variable.
* Requested field lbc_theta is deactivated due to packages, or is a scratch variable.

Parsing run-time I/O configuration from streams.init_atmosphere ...

----- found immutable stream "input" in streams.init_atmosphere -----
filename template: x1.40962.static.nc
filename interval: none
direction: input
reference time: initial_time
record interval: -
input alarm: initial_only

----- found immutable stream "output" in streams.init_atmosphere -----
filename template: x1.40962.init.nc
filename interval: none
direction: output
reference time: initial_time
record interval: -
output alarm: initial_only
package: initial_conds


----- found immutable stream "lbc" in streams.init_atmosphere -----
filename template: lbc.$Y-$M-$D_$h.$m.$s.nc
filename interval: 3:00:00
direction: output
reference time: initial_time
record interval: -
output alarm: 3:00:00
package: lbcs


----- done parsing run-time I/O from streams.init_atmosphere -----

** Validating streams


Reading dimensions from input streams ...

----- reading dimensions from stream 'input' using file x1.40962.static.nc
nCells = 40962
nEdges = 122880
nVertices = 81920
TWO = 2
maxEdges = 10
maxEdges2 = 20
vertexDegree = 3
R3 = 3
nMonths = 12
FIFTEEN = 15
TWENTYONE = 21

----- done reading dimensions from input streams -----


Processing decomposed dimensions ...

----- done processing decomposed dimensions -----


Assigning remaining dimensions from definitions in Registry.xml ...
THREE = 3
nVertLevels = 41 (config_nvertlevels)
nSoilLevels = 4 (config_nsoillevels)
nFGLevels = 38 (config_nfglevels)
nFGSoilLevels = 4 (config_nfgsoillevels)
nVertLevelsP1 = 42

----- done assigning dimensions from Registry.xml -----


real-data GFS test case
Using option 'linear' for vertical extrapolation of temperature
max ter = 5379.89
Setting up vertical levels as in 2014 TC experiments
--- config_tc_vertical_grid = T
--- als = 0.750000E-01
--- alt = 1.23000
--- zetal = 0.310000

1 0.00000 1.00000
2 61.2146 0.999969
3 141.061 0.999836
4 248.476 0.999492
5 392.398 0.998734
6 581.765 0.997220
7 825.514 0.994409
8 1132.58 0.989499
9 1511.91 0.981356
10 1972.43 0.968453
11 2523.08 0.948844
12 3172.81 0.920186
13 3930.54 0.879878
14 4800.00 0.825698
15 5700.00 0.762401
16 6600.00 0.693757
17 7500.00 0.621859
18 8400.00 0.548774
19 9300.00 0.476456
20 10200.0 0.406666
21 11100.0 0.340908
22 12000.0 0.280379
23 12900.0 0.225946
24 13800.0 0.178137
25 14700.0 0.137153
26 15600.0 0.102901
27 16500.0 0.750354E-01
28 17400.0 0.530111E-01
29 18300.0 0.361436E-01
30 19200.0 0.236672E-01
31 20100.0 0.147926E-01
32 21000.0 0.875549E-02
33 21900.0 0.485635E-02
34 22800.0 0.248867E-02
35 23700.0 0.115506E-02
36 24600.0 0.471564E-03
37 25500.0 0.161849E-03
38 26400.0 0.432871E-04
39 27300.0 0.782505E-05
40 28200.0 0.694653E-06
41 29100.0 0.109263E-07
42 30000.0 0.00000
2 33 0.374723E-06 0.996869
3 34 0.198981E-05 0.989684
4 35 0.617404E-05 0.979418
5 36 0.153977E-04 0.965155
6 37 0.338451E-04 0.945573
7 38 0.681474E-04 0.919595
8 39 0.128274E-03 0.885962
9 40 0.228587E-03 0.843837
10 41 0.389048E-03 0.793082
11 42 0.636596E-03 0.734959
12 43 0.100667E-02 0.672878
13 44 0.154492E-02 0.612981
14 45 0.230400E-02 0.563229
15 46 0.324900E-02 0.517671
16 47 0.435600E-02 0.495648
17 48 0.562500E-02 0.481987
18 49 0.705600E-02 0.489607
19 50 0.864900E-02 0.513819
20 51 0.100000E-01 0.553337
21 52 0.100000E-01 0.605551
22 53 0.100000E-01 0.646673
23 54 0.100000E-01 0.690011
24 55 0.100000E-01 0.734860
25 56 0.100000E-01 0.778767
26 57 0.100000E-01 0.820289
27 58 0.100000E-01 0.857972
28 59 0.100000E-01 0.890827
29 60 0.100000E-01 0.918657
30 61 0.100000E-01 0.941441
31 62 0.100000E-01 0.959434
32 63 0.100000E-01 0.973108
33 64 0.100000E-01 0.983064
34 65 0.100000E-01 0.989965
35 66 0.100000E-01 0.994479
36 67 0.100000E-01 0.997235
37 68 0.100000E-01 0.998774
38 69 0.100000E-01 0.999540
39 70 0.100000E-01 0.999863
40 71 0.100000E-01 0.999974
41 72 0.100000E-01 0.999998
grid metrics setup complete
ERROR: ********************************************************************************
ERROR: Error opening initial meteorological data file FILE:2019-8-16_00:
CRITICAL ERROR: ********************************************************************************

-----------------------------------------
Total log messages printed:
Output messages = 196
Warning messages = 0
Error messages = 2
Critical error messages = 1
-----------------------------------------
Logging complete. Closing file at 2019/08/19 16:04:18
 
This seems to be the critical error:
Code:
ERROR: ********************************************************************************
ERROR: Error opening initial meteorological data file FILE:2019-8-16_00:
CRITICAL ERROR: ********************************************************************************

Can you verify that there is a file named "FILE:2019-8-16_00:" in your working directory and that this file is readable? I suspect the month in the filename should probably be "08" rather than "8", so you may also want to check that your namelist.init_atmosphere file defines config_start_time using the format YYYY-MM-DD_HH:mm:ss .
 
Great catch! Yes, it is indeed the filename format issue. I can run with no problem now with this corrected! Thank you very much for all the help!
 
Top