Ignore:
Timestamp:
Jan 6, 2016, 12:37:41 PM (9 years ago)
Author:
Ehouarn Millour
Message:

Small modification in the way time and calendar are handled: Now all the time keeping is done in the physics and only the timestep is transfered from the dynamics to the physics. Due to changes in computations and roundoffs this will change reference bench results.
The implementation of this change in phymar is left as future work.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/time_phylmdz_mod.F90

    r2344 r2422  
    7777  END SUBROUTINE init_iteration
    7878
     79  SUBROUTINE update_time(pdtphys_)
     80  ! This subroutine updates the module saved variables.
     81  USE ioipsl, ONLY : ymds2ju
     82  USE phys_cal_mod, ONLY: phys_cal_update
     83  USE print_control_mod, ONLY: lunout
     84  IMPLICIT NONE
     85    REAL,INTENT(IN) :: pdtphys_
     86    REAL            :: julian_date
     87   
     88    ! Check if the physics timestep has changed
     89    IF ( ABS( (pdtphys-pdtphys_) / ((pdtphys+pdtphys_)/2))> 10.*EPSILON(pdtphys_)) THEN
     90       WRITE(lunout,*) "WARNING ! Physics time step changes from a call to the next",pdtphys_,pdtphys
     91       WRITE(lunout,*) "Not sure the physics parametrizations can handle this..."
     92    ENDIF
     93    pdtphys=pdtphys_
     94   
     95    ! Update elapsed time since begining of run:
     96    current_time=current_time+pdtphys
     97
     98    ! Compute corresponding Julian date and update calendar
     99    CALL ymds2ju(annee_ref,1,day_ini,start_time+current_time,julian_date)
     100    CALL phys_cal_update(julian_date)
     101   
     102  END SUBROUTINE update_time
     103
    79104END MODULE time_phylmdz_mod     
    80105
Note: See TracChangeset for help on using the changeset viewer.