Opened 7 years ago

Closed 6 years ago

#327 closed defect (fixed)

Error in detecting change from one day to the next in slowproc.f90

Reported by: jpolcher Owned by: jgipsl
Priority: major Milestone: ORCHIDEE 2.0
Component: Model architecture Version:
Keywords: Cc:

Description (last modified by jgipsl)

In slowproc, the change of day was detecting by testing the seconds of the current time step against 0. This assumes that the model has a time step each day at exactly 00:00:00. This cannot be assumed.

So it is proposed to generalize this concept by testing the first timestep of the day by seconds < dt_sechiba and the last by seconds > ond_day-dt_sechiba.

The correction was tested tested and implemented in [3981] for the branch ORCHIDEE-ROUTING.

We should verify that there are no other locations in the code where this error is made.

Change History (3)

comment:1 Changed 7 years ago by jgipsl

  • Description modified (diff)

comment:2 Changed 7 years ago by jgipsl

  • Owner changed from somebody to jgipsl
  • Status changed from new to accepted

Note that the current version in the trunk is correct for dim_2driver but not for orchideedriver(do_slow is never true). Using the modification in [3981] as described above will make orchideedriver working but dim_2driver will not work...

We have to find a solution to have both drivers working correctly. I propose following, tests need to be done :

Index: src_sechiba/slowproc.f90
--- src_sechiba/slowproc.f90	(révision 3977)
+++ src_sechiba/slowproc.f90	(copie de travail)
@@ -294,7 +294,7 @@
     !! 1. Compute and update all variables linked to the date and time
     IF (printlev_loc>=5) WRITE(numout,*) 'Entering slowproc_main, month, day, sec=',month,day,sec
-    IF ( sec == dt_sechiba .AND. month==1 .AND. day==1 ) THEN
+    IF ( sec > 0 .AND. sec <= dt_sechiba .AND. month==1 .AND. day==1 ) THEN
        ! The current time step is the first sechiba timestep of a new year
        IF (printlev_loc>=4) WRITE(numout,*) "This is a new day and a new year: month, day, sec=", month, day, sec
@@ -302,7 +302,7 @@
     END IF
-    IF ( sec == 0 ) THEN
+    IF ( sec > one_day-dt_sechiba .OR. sec == 0 ) THEN
        ! The current time step is the last sechiba time step on a day
Last edited 7 years ago by jgipsl (previous) (diff)

comment:3 Changed 6 years ago by jgipsl

  • Milestone set to ORCHIDEE 2.0
  • Resolution set to fixed
  • Status changed from accepted to closed

This problem has been resolved with the new time module introduced in the trunk rev [4646].

  1. Polcher, J Ghattas
Note: See TracTickets for help on using tickets.