Ignore:
Timestamp:
Oct 18, 2015, 8:38:58 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Fix in the computation of the date; the convention is that it corresponds to the time at the end of the current dynamics or physics step (except when in backward Matsuno step where it remains unchanged as it was correctly updated during the forward part of the step).
Note that the relationship between itau and date is a bit tricky as itau is incremented between Matsuno forward and backward steps (and from a leapfrog step to the next) but unchanged from Matsuno bacward step to leapfrog step.
Because of change in date when calling physics, bench results will change with this revision.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F

    r2286 r2375  
    308308
    309309   1  CONTINUE ! Matsuno Forward step begins here
    310       !write(*,*) 'leapfrog 298: itau=',itau
     310
     311c   date: (NB: date remains unchanged for Backward step)
     312c   -----
     313
    311314      jD_cur = jD_ref + day_ini - day_ref +                             &
    312      &          itau/day_step
     315     &          (itau+1)/day_step
    313316      jH_cur = jH_ref + start_time +                                    &
    314      &         mod(itau,day_step)/float(day_step)
     317     &         mod(itau+1,day_step)/float(day_step)
    315318      if (jH_cur > 1.0 ) then
    316319        jD_cur = jD_cur +1.
     
    421424c-----------------------------------------------------------------------
    422425
    423 c   date:
     426c   date: (NB: only leapfrog step requires recomputing date)
    424427c   -----
    425428
     429      IF (leapf) THEN
     430        jD_cur = jD_ref + day_ini - day_ref +
     431     &          (itau+1)/day_step
     432        jH_cur = jH_ref + start_time +
     433     &         mod(itau+1,day_step)/float(day_step)
     434        if (jH_cur > 1.0 ) then
     435          jD_cur = jD_cur +1.
     436          jH_cur = jH_cur -1.
     437        endif
     438      ENDIF
    426439
    427440c   gestion des appels de la physique et des dissipations:
Note: See TracChangeset for help on using the changeset viewer.