[mpas-developers] adding user-friendliness to MPAS trunk
Michael Duda
duda at ucar.edu
Thu Apr 22 15:25:49 MDT 2010
Hi, All.
I'd like to add a small bit of code in
src/framework/module_io_input.F that will inform the user when the
input grid file (either input or restart) is missing. Without this
change, the errors generated by the code when a grid.nc or
restart.nc file isn't present don't give any specific indication
of what caused the crash. At least in my case, it's sometimes
taken me a minute or two to realize that it's not a problem with
the code, but just a missing input file that caused a run to fail.
The change is simply to add this bit of code
1033a1034,1044
>
> if (nferr /= NF_NOERR) then
> write(0,*) ' '
> if (config_do_restart) then
> write(0,*) 'Error opening restart file ''', trim(input_obj % filename), ''''
> else
> write(0,*) 'Error opening input file ''', trim(input_obj % filename), ''''
> end if
> write(0,*) ' '
> call dmpar_abort(dminfo)
> end if
below the call to nf_open(...) in module_io_input.F.
If anyone has any suggestions for improvement or objections,
please let me know.
Cheers,
Michael
More information about the mpas-developers
mailing list