NOAA-GFDL / GFDL_atmos_cubed_sphere

The GFDL atmos_cubed_sphere dynamical core code
Other
56 stars 118 forks source link

ESM4.2 crash in debug mode when starting year is 1978 , write() statement format too restrictive #334

Closed nikizadehgfdl closed 2 months ago

nikizadehgfdl commented 6 months ago

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:

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

bensonr commented 6 months ago

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.

laurenchilutti commented 6 months ago

Hi @nikizadehgfdl I have cherry-picked the change from PR #291 into the dev/gfdl branch.

bensonr commented 2 months ago

@laurenchilutti - can this issue be closed?

laurenchilutti commented 2 months ago

Yes I will close this.