source: trunk/LMDZ.MARS/libf/phymars/time_phylmdz_mod.F90 @ 3619

Last change on this file since 3619 was 3369, checked in by emillour, 8 months ago

Mars PCM:
Change the way the rate of outputs for diagfi.nc files is specified:
IMPORTANT: Specifying "ecritphy" no longer possible and will trigger an error.
Use "outputs_per_sol" to specify output rate instead.
This should makes things (hopefully) clearer for users and also better
enforces a cleaner and clearer separation between dynamics and physics.
EM

File size: 1.6 KB
RevLine 
[1524]1MODULE time_phylmdz_mod
2
3    IMPLICIT NONE
4    REAL,SAVE    :: dtphys      ! physics time step (s)
[2266]5!$OMP THREADPRIVATE(dtphys)
[3369]6
[1524]7    REAL,SAVE    :: daysec     ! length of day (s)
8!$OMP THREADPRIVATE(daysec)
[3369]9
10    INTEGER,SAVE :: steps_per_sol ! number of physics steps per sol
11!$OMP THREADPRIVATE(steps_per_sol)
12
[1524]13    INTEGER,SAVE :: day_ini     ! initial day of the run
14!$OMP THREADPRIVATE(day_ini)
[2511]15    INTEGER,SAVE :: day_end     ! final day of the run
16!$OMP THREADPRIVATE(day_end)
[1524]17    REAL,SAVE :: hour_ini       ! start time (fraction of day) of the run
18                                ! 0=<hour_ini<1
19!$OMP THREADPRIVATE(hour_ini)
20
[3369]21    INTEGER,SAVE :: outputs_per_sol ! for diagfi.nc outputs, number of outputs
22                                    ! per sol (set via conf_phys)
23!$OMP THREADPRIVATE(outputs_per_sol)
24
[1525]25    INTEGER,SAVE :: iphysiq   ! call physics every iphysiq dynamical step
26                              ! (set via conf_phys)
27!$OMP THREADPRIVATE(iphysiq)
28    INTEGER,SAVE :: ecritstart ! write a restart state every ecritstart
29                               ! dynamical steps (set via conf_phys)
30!$OMP THREADPRIVATE(ecritstart)
[1524]31CONTAINS
32
[2511]33  SUBROUTINE init_time(day_ini_, day_end_, hour_ini_, daysec_, dtphys_)
34
[1524]35    IMPLICIT NONE
36    INTEGER,INTENT(IN) :: day_ini_
[2511]37    INTEGER,INTENT(IN) :: day_end_
[1524]38    REAL,INTENT(IN) :: hour_ini_
39    REAL,INTENT(IN) :: daysec_
40    REAL,INTENT(IN) :: dtphys_
41   
42    day_ini=day_ini_
[2511]43    day_end=day_end_
[1524]44    hour_ini=hour_ini_
45    daysec=daysec_
46    dtphys=dtphys_
[1525]47   
[3369]48    ! compute number of physics steps per sol
49    steps_per_sol=nint(daysec/dtphys)
50   
[1524]51  END SUBROUTINE init_time
52
53END MODULE time_phylmdz_mod     
Note: See TracBrowser for help on using the repository browser.