Changeset 2375 for LMDZ5/trunk/libf


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

Location:
LMDZ5/trunk/libf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d/leapfrog.F

    r2302 r2375  
    228228   1  CONTINUE ! Matsuno Forward step begins here
    229229
     230c   date: (NB: date remains unchanged for Backward step)
     231c   -----
     232
    230233      jD_cur = jD_ref + day_ini - day_ref +                             &
    231      &          itau/day_step
     234     &          (itau+1)/day_step
    232235      jH_cur = jH_ref + start_time +                                    &
    233      &          mod(itau,day_step)/float(day_step)
     236     &          mod(itau+1,day_step)/float(day_step)
    234237      jD_cur = jD_cur + int(jH_cur)
    235238      jH_cur = jH_cur - int(jH_cur)
     
    277280c-----------------------------------------------------------------------
    278281
    279 c   date:
     282c   date: (NB: only leapfrog step requires recomputing date)
    280283c   -----
     284
     285      IF (leapf) THEN
     286        jD_cur = jD_ref + day_ini - day_ref +
     287     &            (itau+1)/day_step
     288        jH_cur = jH_ref + start_time +
     289     &            mod(itau+1,day_step)/float(day_step)
     290        jD_cur = jD_cur + int(jH_cur)
     291        jH_cur = jH_cur - int(jH_cur)
     292      ENDIF
    281293
    282294
     
    416428!     &              (itau * dtvr / daysec - int(itau * dtvr / daysec))
    417429           jD_cur = jD_ref + day_ini - day_ref +                        &
    418      &          itau/day_step
     430     &          (itau+1)/day_step
    419431
    420432           IF (planet_type .eq."generic") THEN
     
    424436
    425437           jH_cur = jH_ref + start_time +                               &
    426      &              mod(itau,day_step)/float(day_step)
     438     &              mod(itau+1,day_step)/float(day_step)
    427439           jD_cur = jD_cur + int(jH_cur)
    428440           jH_cur = jH_cur - int(jH_cur)
  • LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90

    r2239 r2375  
    137137   
    138138           jD_cur = jD_ref + day_ini - day_ref                           &
    139      &        + itau/day_step
     139     &        + (itau+1)/day_step
    140140
    141141           IF (planet_type .eq."generic") THEN
     
    145145
    146146           jH_cur = jH_ref + start_time +                                &
    147      &              mod(itau,day_step)/float(day_step)
     147     &              mod(itau+1,day_step)/float(day_step)
    148148    if (jH_cur > 1.0 ) then
    149149      jD_cur = jD_cur +1.
  • 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:
  • LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F

    r2302 r2375  
    258258   1  CONTINUE ! Matsuno Forward step begins here
    259259
     260c   date: (NB: date remains unchanged for Backward step)
     261c   -----
     262
    260263      jD_cur = jD_ref + day_ini - day_ref +                             &
    261      &          itau/day_step
     264     &          (itau+1)/day_step
    262265      jH_cur = jH_ref + start_time +                                    &
    263      &         mod(itau,day_step)/float(day_step)
     266     &         mod(itau+1,day_step)/float(day_step)
    264267      if (jH_cur > 1.0 ) then
    265268        jD_cur = jD_cur +1.
     
    356359c-----------------------------------------------------------------------
    357360
    358 c   date:
     361c   date: (NB: only leapfrog step requires recomputing date)
    359362c   -----
    360363
     364      IF (leapf) THEN
     365        jD_cur = jD_ref + day_ini - day_ref +
     366     &            (itau+1)/day_step
     367        jH_cur = jH_ref + start_time +
     368     &           mod(itau+1,day_step)/float(day_step)
     369        if (jH_cur > 1.0 ) then
     370          jD_cur = jD_cur +1.
     371          jH_cur = jH_cur -1.
     372        endif
     373      ENDIF
    361374
    362375c   gestion des appels de la physique et des dissipations:
     
    720733
    721734           jD_cur = jD_ref + day_ini - day_ref
    722      $        + itau/day_step
     735     $        + (itau+1)/day_step
    723736
    724737           IF (planet_type .eq."generic") THEN
     
    728741
    729742           jH_cur = jH_ref + start_time +                                &
    730      &              mod(itau,day_step)/float(day_step)
     743     &              mod(itau+1,day_step)/float(day_step)
    731744!         call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)
    732745           if (jH_cur > 1.0 ) then
Note: See TracChangeset for help on using the changeset viewer.