Ignore:
Timestamp:
Aug 21, 2015, 9:23:13 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Physics/dynamics separation: get rid of all the 'include "temps.h"' in the physics; variables in module time_phylmdz_mod must be used instead. Also added JD_cur, JH_cur and JD_ref in module phys_cal_mod, in preparation for having physics handle its calendar internally.
EM

File:
1 edited

Legend:

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

    r2098 r2344  
    11! $Id:$
    22MODULE phys_cal_mod
    3 ! This module contains information on the calendar at the actual time step
     3! This module contains information on the calendar at the current time step
    44
    5   SAVE
    6 
    7   INTEGER :: year_cur      ! current year
    8   INTEGER :: mth_cur       ! current month
    9   INTEGER :: day_cur       ! current day
    10   INTEGER :: days_elapsed  ! number of whole days since start of the simulation
    11   INTEGER :: mth_len       ! number of days in the current month
    12   INTEGER year_len ! number of days in the current year
    13   REAL    :: hour
    14   REAL    :: jD_1jan
    15   REAL    :: jH_1jan
    16   REAL    :: xjour
     5  INTEGER,SAVE :: year_cur      ! current year
     6!$OMP THREADPRIVATE(year_cur)
     7  INTEGER,SAVE :: mth_cur       ! current month
     8!$OMP THREADPRIVATE(mth_cur)
     9  INTEGER,SAVE :: day_cur       ! current day
     10!$OMP THREADPRIVATE(day_cur)
     11  INTEGER,SAVE :: days_elapsed  ! number of whole days since start of the simulation
     12!$OMP THREADPRIVATE(days_elapsed)
     13  INTEGER,SAVE :: mth_len       ! number of days in the current month
     14!$OMP THREADPRIVATE(mth_len)
     15  INTEGER,SAVE :: year_len      ! number of days in the current year
     16!$OMP THREADPRIVATE(year_len)
     17  REAL,SAVE    :: hour
     18!$OMP THREADPRIVATE(hour)
     19  REAL,SAVE    :: jD_1jan
     20!$OMP THREADPRIVATE(jD_1jan)
     21  REAL,SAVE    :: jH_1jan
     22!$OMP THREADPRIVATE(jH_1jan)
     23  REAL,SAVE    :: xjour
     24!$OMP THREADPRIVATE(xjour)
     25  REAL,SAVE    :: jD_cur  ! jour courant a l'appel de la physique (jour julien)
     26!$OMP THREADPRIVATE(jD_cur)
     27  REAL,SAVE    :: jH_cur  ! heure courante a l'appel de la physique (jour julien)
     28!$OMP THREADPRIVATE(jH_cur)
     29  REAL,SAVE    :: jD_ref  ! jour du demarage de la simulation (jour julien)
     30!$OMP THREADPRIVATE(jD_ref)
    1731
    1832
    1933CONTAINS
    2034 
     35  SUBROUTINE phys_cal_init(annee_ref,day_ref)
     36  USE IOIPSL, ONLY:  ymds2ju
     37  IMPLICIT NONE
     38    INTEGER,INTENT(IN) :: annee_ref
     39    INTEGER,INTENT(IN) :: day_ref
     40
     41    CALL ymds2ju(annee_ref, 1, day_ref, 0., jD_ref)
     42    jD_ref=INT(jD_ref)
     43 
     44  END SUBROUTINE  phys_cal_init
     45
    2146  SUBROUTINE phys_cal_update(jD_cur, jH_cur)
    2247    ! This subroutine updates the module saved variables.
Note: See TracChangeset for help on using the changeset viewer.