ESM4.2 crash in debug mode when starting year is 1978 , write() statement format too restrictive
Opened this issue · 2 comments
Describe the bug
Fabien reported that when running ESM4.2 in debug mode with a starting year of 1978 his run crashes like this:
atmosphere_init: current_time_seconds = *********
forrtl: error (63): output conversion error, unit 0, file /proc/174029/fd/2
Image PC Routine Line Source
fms_esm4.2_compil 000000000ED263A8 Unknown Unknown Unknown
fms_esm4.2_compil 000000000ED89EDD Unknown Unknown Unknown
Probably because the current_time_seconds is too large of a number for the print statement in line 209 of atmosphere.F90:
if (mpp_pe() == 0) write(0,"('atmosphere_init: current_time_seconds = ',f9.1)")current_time_in_seconds
Anyway it would be good to increase the number of digits.
To Reproduce
Steps to reproduce the behavior
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.
The offending code has been in the GFDL system (dev/gfdl) since the 2021.02 release and this has never been an issue before now. I will note the dev/gfdl_am5 branch has had the write statement removed by PR #291.
I'm assuming this is the first time someone is running an AM4-based model sim that is longer than 3.171 years with a branch created in the last 3 years - where an f9.1 would fail to hold the seconds (Time-Time_init).
I can try to get the 2 commits from PR #291 cherry-picked into dev/gfdl for the AM4 models.
Hi @nikizadehgfdl I have cherry-picked the change from PR #291 into the dev/gfdl branch.