CMEPS icon indicating copy to clipboard operation
CMEPS copied to clipboard

A bug when using REST_OPTION=date

Open huitang-earth opened this issue 3 years ago • 0 comments

The errors occur in the following line: https://github.com/ESCOMP/CMEPS/blob/95e148bde5d71d31fd431f11a2539d461b325b9a/mediator/med_phases_restart_mod.F90#L88

Errors message is like such:

20220505 103527.148 ERROR            PET0 (med_time_alarmInit):date requires opt_ymd
20220505 103527.149 ERROR            PET0 ESMF_Alarm.F90:1445 ESMF_AlarmSet() Object being used before creation  - Bad Object
20220505 103527.149 ERROR            PET0 med_phases_restart_mod.F90:91 Object being used before creation  - Passing error in return code

According to line: https://github.com/ESCOMP/CMEPS/blob/95e148bde5d71d31fd431f11a2539d461b325b9a/mediator/med_time_mod.F90#L53

There should be a parameter opt_ymd added when calling med_time_alarmInit and restart_option is date. Namely,

call med_time_alarmInit(mclock, alarm, option=restart_option, opt_n=restart_n, &

should be:

call med_time_alarmInit(mclock, alarm, option=restart_option, opt_n=restart_n, opt_ymd=restart_ymd, &

restart_ymd also has to be declared and retrieved in the file.

huitang-earth avatar May 25 '22 10:05 huitang-earth