Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FVCOM 5.1.0 TIMEZONE Problem #27

Open
Pbarbosa92 opened this issue Sep 4, 2024 · 1 comment
Open

FVCOM 5.1.0 TIMEZONE Problem #27

Pbarbosa92 opened this issue Sep 4, 2024 · 1 comment

Comments

@Pbarbosa92
Copy link

Hi there,

I'm encountering an issue while compiling FVCOM v5.1.0 using gfortran (GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0).

When I attempt to run a simulation with TIMEZONE = 'CEST', I receive the following error message:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FVCOM Fatal Error!
 You selected an invalid time zone: CEST
 Time Zones must be CAPITALS
 see mod_time.F for a list of valid time_zones
 Stopping FVCOM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

After some investigation, I located the problem in the mod_time.F file at line 424, where the code reads if(statl) status = 1.

I added a print statement to check the value of status, and it appears to be -1.

status = 0
if(statl) status = 1
PRINT *, "Status -> ", status

Curiously, if I modify the code to include a delay, such as:

status = 0
call sleep(1)
if(statl) status = 1

or even a simple print statement:

status = 0
PRINT *, "Hello world!"
if(statl) status = 1

The status variable correctly updates to 1, and the simulation runs without issues.

In summary, it seems that introducing a delay or print statement allows status to be set to 1, and the simulation proceeds as expected. Without these additions, status unexpectedly takes the value -1, causing the simulation to fail. I’m unable to trace where this -1 is coming from.

Any insights or suggestions on resolving this would be greatly appreciated.

Thank you!

@liesvyvall
Copy link

Hi, i am having similar error at FVCOM 4.7.7:

! SET TIME FOR COLDSTART !
! !
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FVCOM Fatal Error!
Could not read the date string START_DATE: 2005-07-01 00:00:00
Stopping FVCOM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

in my case the error comes from mod_set_time-F file at line 858

! COLDSTART 
    CASE("coldstart")
!=================================================
       if(DBG_SET(dbg_log)) then 
          WRITE(IPT,*)'!                SET TIME FOR COLDSTART                          !'
          WRITE(IPT,*)'!                                                                !'
       end if


       SELECT CASE(USE_REAL_WORLD_TIME)
       CASE(.TRUE.)
          
          ! GET THE START TIME
          StartTime = READ_DATETIME(START_DATE,DATE_FORMAT,TIMEZONE,status)
          if (status == 0 ) &
               & Call Fatal_Error("Could not read the date string START_DATE: "//trim(START_DATE))

variable status seems to be = 0 and condition always execute the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants