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

could not open init.nc (or static file) though it really exists

f930139

New member
I try to follow the MPAS tutorial online but face with some problems for days, and hope someone can help me with it.
The tutorial (including geog and met data) is downloaded from MPAS Tutorial — Practice Session Guide

I have already run ./init_atmosphere_model with 40962 meshes, and x1.40962.init.nc (or static file) is generated.
Then I run ./atmosphere_model, but get an error message below:
CRITICAL ERROR: Could not open input file 'x1.40962.init.nc' to read mesh fields

I have tried various methods mentioned here (MPAS SST update file), such as re-generate file and change permissions, but it still not worked. Also, x1.40962.init.nc, namelists and log files are all placed in the same directory.
Also, I use ncl script provided by the tutorial to read and plot init.nc and sfc_update.nc, and the results are the same as those displayed on the tutorial.

Since there are no errors when running ./init_atmosphere_mode (warning though), I don't know where the bugs are and how to fix them.
Coud anyone please provide some ideas? Thanks a lot!

Namelists and log files are as attached.
x1.40962.init.nc, x1.40962.sfc_update.nc (too large), some figures are available through this link: asking - Google Drive
 

Attachments

  • log.atmosphere.0000.out.txt
    1.6 KB · Views: 5
  • log.init_atmosphere.0000.out.txt
    17.3 KB · Views: 7
  • namelist.atmosphere.txt
    1.8 KB · Views: 5
  • namelist.init_atmosphere.txt
    1.4 KB · Views: 6
Last edited:
From your log.init_atmosphere.0000.out file, it looks as though you're reading the x1.40962.grid.nc file as input when producing your x1.40962.init.nc file:
----- found immutable stream "input" in streams.init_atmosphere -----
filename template: x1.40962.grid.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
This is problematic, since the x1.40962.grid.nc file does not contain any information about terrain, land use, etc. Indeed, these fields are not present as indicated in the log.init_atmosphere.0000.out file:
WARNING: Variable ter not in input file.
WARNING: Variable landmask not in input file.
WARNING: Variable mminlu not in input file.
WARNING: Variable isice_lu not in input file.
WARNING: Variable iswater_lu not in input file.
WARNING: Variable ivgtyp not in input file.
WARNING: Variable isltyp not in input file.

...
However, if I use 'ncdump' to examine the 'ter' field in the x1.40962.init.nc file you've uploaded, I do see what looks like valid terrain data.
So, I think there's some inconsistency in the files you've provided here.

Additionally, the 'xtime' variable in your x1.40962.init.nc file gives
xtime =
"2014-09-10_00:00:00 " ;
while your namelist.atmosphere has the simulation start time set to 2019-09-01_00:00:00:
config_start_time = '2019-09-01_00:00:00'

My suggestion would be to start at the beginning of the exercise and to try going through the steps again. The practical guide has been well-tested, and so following the instructions should work (which is not to say that it's impossible that there are errors -- only that the instructions have been followed by quite a few people with success).
 
Thank you @mgduda for the reply!

But I still don't understand why reading the x1.40962.grid.nc file as input when producing your x1.40962.init.nc file is problematic because streams.init_atmosphere provided in the tutorial did the same thing. x1.40962.grid.nc does not contain terrain data, but I did set config_geog_data_path = '/work/u4648924/mpas_tutorial/geog/' so the program should be able to read terrain data. I guess this is the reason why x1.40962.init.nc has terrain data.

The tutorial says:
After editing the namelist.init_atmosphere file, it will also be necessary to tell the init_atmosphere_model program the name of our input grid file, as well as the name of the "static" output file that we would like to create. We do this by editing the streams.init_atmosphere file, where we first set the name of the grid file for the "input" stream:

<immutable_stream name="input"
type="input"
filename_template="x1.10242.grid.nc"
input_interval="initial_only"/>

and then set the name of the static file to be created for the "output" stream:

<immutable_stream name="output"
type="output"
filename_template="x1.10242.static.nc"
packages="initial_conds"
output_interval="initial_only" />

And what I have done is changing the name of static.nc to init.nc.

My question is, if reading the x1.40962.grid.nc file as input when producing your x1.40962.init.nc file is problematic, then how can I change streams.init_atmosphere?
 
Last edited:
Thank you @mgduda for the reply!

But I still don't understand why reading the x1.40962.grid.nc file as input when producing your x1.40962.init.nc file is problematic because streams.init_atmosphere provided in the tutorial did the same thing. x1.40962.grid.nc does not contain terrain data, but I did set config_geog_data_path = '/work/u4648924/mpas_tutorial/geog/' so the program should be able to read terrain data. I guess this is the reason why x1.40962.init.nc has terrain data.

The tutorial says:
After editing the namelist.init_atmosphere file, it will also be necessary to tell the init_atmosphere_model program the name of our input grid file, as well as the name of the "static" output file that we would like to create. We do this by editing the streams.init_atmosphere file, where we first set the name of the grid file for the "input" stream:

<immutable_stream name="input"
type="input"
filename_template="x1.10242.grid.nc"
input_interval="initial_only"/>

and then set the name of the static file to be created for the "output" stream:

<immutable_stream name="output"
type="output"
filename_template="x1.10242.static.nc"
packages="initial_conds"
output_interval="initial_only" />

And what I have done is changing the name of static.nc to init.nc.

My question is, if reading the x1.40962.grid.nc file as input when producing your x1.40962.init.nc file is problematic, then how can I change streams.init_atmosphere?
Hello @mgduda ,
I finally understand what you were talking about after following MPAS tutorial again carefully.
I did not produce static.nc first. I directly produce init.nc. The step (producing static.nc) cannot be skipped!
Though I am still encounter segmentation error when ./atmosphere_model, I think it is a great progress.
 
Last edited:
Top