Ignore:
Timestamp:
Jul 24, 2024, 12:17:33 PM (2 months ago)
Author:
abarral
Message:

Put abort_physic into a module
Remove -g option from makelmdz_fcm, since that option is linked to a header file that isn't included anywhere.
(lint) light lint on traversed files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/phys_cal_mod.F90

    r5110 r5111  
    11! $Id$
    22MODULE phys_cal_mod
    3 ! This module contains information on the calendar at the current time step
     3  ! This module contains information on the calendar at the current time step
    44
    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 current year
    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         ! seconds elapsed (in the current day) since midnight
    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)
    31  CHARACTER (len=10) :: calend ! type of calendar to use
    32                               ! (can be earth_360d, earth_365d or earth_366d)
    33 !$OMP THREADPRIVATE(calend)
     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 current year
     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         ! seconds elapsed (in the current day) since midnight
     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)
     31  CHARACTER (len = 10) :: calend ! type of calendar to use
     32  ! (can be earth_360d, earth_365d or earth_366d)
     33  !$OMP THREADPRIVATE(calend)
    3434
    3535CONTAINS
    36  
    37   SUBROUTINE phys_cal_init(annee_ref,day_ref)
    3836
    39     USE IOIPSL, ONLY:  ymds2ju, ioconf_calendar
    40     USE lmdz_phys_para, ONLY:  is_master,is_omp_master
     37  SUBROUTINE phys_cal_init(annee_ref, day_ref)
     38
     39    USE IOIPSL, ONLY: ymds2ju, ioconf_calendar
     40    USE lmdz_phys_para, ONLY: is_master, is_omp_master
    4141    USE ioipsl_getin_p_mod, ONLY: getin_p
     42    USE lmdz_abort_physic, ONLY: abort_physic
    4243
    4344    IMPLICIT NONE
    44     INTEGER,INTENT(IN) :: annee_ref
    45     INTEGER,INTENT(IN) :: day_ref
     45    INTEGER, INTENT(IN) :: annee_ref
     46    INTEGER, INTENT(IN) :: day_ref
    4647
    4748    ! Find out which type of calendar we are using
    4849    calend = 'earth_360d' ! default
    49     CALL getin_p("calend",calend)
     50    CALL getin_p("calend", calend)
    5051
    5152    IF (is_omp_master) THEN
     
    5758        CALL ioconf_calendar('gregorian')
    5859      ELSE
    59         CALL abort_physic('phys_cal_init','Mauvais choix de calendrier',1)
     60        CALL abort_physic('phys_cal_init', 'Mauvais choix de calendrier', 1)
    6061      ENDIF
    6162    ENDIF
    62 !$OMP BARRIER
    63      
     63    !$OMP BARRIER
     64
    6465    CALL ymds2ju(annee_ref, 1, day_ref, 0., jD_ref)
    65     jD_ref=INT(jD_ref)
    66  
     66    jD_ref = INT(jD_ref)
     67
    6768  END SUBROUTINE  phys_cal_init
    6869
     
    7475    REAL, INTENT(IN) :: julian_date
    7576
    76     jD_cur=INT(julian_date)
    77     jH_cur=julian_date-jD_cur
    78    
    79     CALL ju2ymds(jD_cur+jH_cur, year_cur, mth_cur, day_cur, hour)
     77    jD_cur = INT(julian_date)
     78    jH_cur = julian_date - jD_cur
     79
     80    CALL ju2ymds(jD_cur + jH_cur, year_cur, mth_cur, day_cur, hour)
    8081    CALL ymds2ju(year_cur, 1, 1, 0., jD_1jan)
    81    
     82
    8283    jH_1jan = jD_1jan - int (jD_1jan)
    83     jD_1jan = int (jD_1jan) 
     84    jD_1jan = int (jD_1jan)
    8485    xjour = jD_cur - jD_1jan
    8586    days_elapsed = jD_cur - jD_1jan
    8687
    8788    ! Get lenght of current month
    88     mth_len = ioget_mon_len(year_cur,mth_cur)
     89    mth_len = ioget_mon_len(year_cur, mth_cur)
    8990
    9091    ! Get length of current year
Note: See TracChangeset for help on using the changeset viewer.