NOAA-GFDL/GFDL_atmos_cubed_sphere

Missing 'else' branch in tools/fv_io.F90

Closed this issue · 2 comments

Describe the bug
It looks to me that in tools/fv_io.F90, here:

https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/blob/dev/emc/tools/fv_io.F90#L692-L693

printing warning and setting Atm%flagstruct%srf_init to false should be in 'else' branch, similar how handling of missing files is done for other restart files.

To Reproduce
I found this by just looking at the code while trying to understand how fv_srw_wnd.res files are created and used in the UFS model. I did not try to reproduce the case in which this file is missing during the restart to verify this assumption.

Expected behavior
A clear and concise description of what you expected to happen.

System Environment
Describe the system environment, include:

  • OS: [e.g. RHEL 7.2]
  • Compiler(s): Type and version [e.g. Intel 19.1]
  • MPI type, and version (e.g. MPICH, Cray MPI, openMPI)
  • netCDF Version: For both C and Fortran
  • Configure options: Any additional flags, or macros passed to configure

Additional context
Add any other context about the problem. If applicable, include where any files
that help describe, or reproduce the problem exist.

@DusanJovic-NOAA - thanks for opening this up

@laurenchilutti - I know you updated this code and was wondering if you could take a look at the issue/bug report.

Thanks for finding this - it does seem like you are right and it has not been caught until now. I will make the necessary changes and create a PR to all branches.