Changeset 1923 for trunk/ICOSA_LMDZ


Ignore:
Timestamp:
May 2, 2018, 11:12:43 AM (7 years ago)
Author:
emillour
Message:

Dynamico-Venus interface:
Fix initialization date for time series outputs.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90

    r1721 r1923  
    7575  REAL(rstd) :: pseudoalt(llm)
    7676
    77   INTEGER :: run_length 
    78   INTEGER :: annee_ref 
    79   INTEGER :: day_ref   
    80   INTEGER :: day_ini   
    81   REAL    :: start_time
    82   REAL    :: physics_timestep   
    83 
    84 
    85   INTEGER                       :: nqo, nbtr
    86   CHARACTER(len=4)              :: type_trac
    87   CHARACTER(len=20),ALLOCATABLE :: tname(:)    ! tracer short name for restart and diagnostics
    88   CHARACTER(len=23),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
    89   INTEGER,ALLOCATABLE           :: niadv(:)    ! equivalent dyn / physique
    90   INTEGER,ALLOCATABLE           :: conv_flg(:) ! conv_flg(it)=0 : convection desactivated for tracer number it
    91   INTEGER,ALLOCATABLE           :: pbl_flg(:)  ! pbl_flg(it)=0  : boundary layer diffusion desactivaded for tracer number it
    92   CHARACTER(len=8),ALLOCATABLE :: solsym(:)  ! tracer name from inca
    93 
    94   INTEGER :: iflag_phys   
     77!  INTEGER :: run_length 
     78!  INTEGER :: annee_ref 
     79!  INTEGER :: day_ref   
     80!  INTEGER :: day_ini   
     81!  REAL    :: start_time
     82!  REAL    :: physics_timestep   
     83
     84
     85!  INTEGER                       :: nqo, nbtr
     86!  CHARACTER(len=4)              :: type_trac
     87!  CHARACTER(len=20),ALLOCATABLE :: tname(:)    ! tracer short name for restart and diagnostics
     88!  CHARACTER(len=23),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
     89!  INTEGER,ALLOCATABLE           :: niadv(:)    ! equivalent dyn / physique
     90!  INTEGER,ALLOCATABLE           :: conv_flg(:) ! conv_flg(it)=0 : convection desactivated for tracer number it
     91!  INTEGER,ALLOCATABLE           :: pbl_flg(:)  ! pbl_flg(it)=0  : boundary layer diffusion desactivaded for tracer number it
     92!  CHARACTER(len=8),ALLOCATABLE :: solsym(:)  ! tracer name from inca
     93
     94!  INTEGER :: iflag_phys   
    9595  INTEGER :: nbp_phys, nbp_phys_glo
    9696 
     
    221221  ! Calendar related stuff
    222222  REAL(rstd) :: ptimestep
    223   INTEGER :: run_length 
     223  REAL(rstd) :: run_length 
    224224  INTEGER :: annee_ref 
    225225  INTEGER :: day_ref   
     
    332332    CALL getin('startphy_file',startphy_file)
    333333
     334    day_length=10087000
     335    CALL getin('day_length',day_length)
     336   
     337    run_length=day_length ! default
     338    CALL getin('run_length',run_length)
     339
    334340    IF (startphy_file) THEN
    335341      ! Read in some information from the startphy.nc file
     
    351357      status=nf90_get_var(ncid,varid,tab_cntrl)
    352358      ! extract needed variables from tab_cntrl
    353       day_end=tab_cntrl(13)
     359      day_ini=tab_cntrl(13)
    354360      annee_ref=tab_cntrl(14)
     361      ptime=modulo((tab_cntrl(15)*tab_cntrl(1))/day_length,1.0)
    355362
    356363      status=nf90_close(ncid)
     
    359366      ! required information that is not in tab_cntrl
    360367      ! has to be default or read from def files
    361       day_end=0
    362       CALL getin('day_end',day_end)
    363       annee_ref=0
     368      day_ini=0
     369      annee_ref=1
    364370      CALL getin('annee_ref',annee_ref)
     371      ptime=0.
    365372    ENDIF
    366373
     374    day_end=day_ini+nint(run_length/day_length)
     375
    367376    ! Other required values which have to be read from def files
    368     day_ref=0
     377    day_ref=1
    369378    CALL getin('day_ref',day_ref)
    370     day_ini=0
    371     CALL getin('day_ini',day_ini)
    372     day_length=0
    373     CALL getin('day_length',day_length)
    374379    iflag_trac=0
    375380    CALL getin('iflag_trac',iflag_trac)
     
    397402   
    398403!$OMP MASTER
    399     ! initialize pday and ptime
     404    ! initialize pday
    400405    pday = day_ini
    401     ptime = 0 ! assume we start at midnight ...
    402406!$OMP END MASTER
    403407!$OMP BARRIER
Note: See TracChangeset for help on using the changeset viewer.