Changeset 1525 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Mar 30, 2016, 8:24:43 AM (9 years ago)
Author:
emillour
Message:

All GCMs:
More on enforcing dynamics/physics separation: get rid of references to "control_mod" from physics packages.
EM

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r1524 r1525  
    3838      use surfdat_h, only: albedo_h2o_ice, inert_h2o_ice,
    3939     &                     frost_albedo_threshold
    40       use control_mod, only: ecritphy
     40      use time_phylmdz_mod, only: ecritphy,day_step,iphysiq,ecritstart,
     41     &                            daysec,dtphys
    4142      use planete_h
    42       use time_phylmdz_mod, only: daysec,dtphys
    4343      use dimradmars_mod, only: naerkind, name_iaer,
    4444     &                      ini_scatterers,tauvis
     
    5050
    5151      INTEGER,INTENT(IN) :: ngrid,nlayer,nq
    52       INTEGER ig,ierr,j
     52      INTEGER ierr,j
    5353 
    5454      CHARACTER ch1*12
    55       CHARACTER ch80*80
    56 
    57       ! read in 'ecritphy' (frequency of calls to physics, in dynamical steps)
    58       ! (also done in dyn3d/defrun_new but not in LMDZ.COMMON)
    59       call getin("ecritphy",ecritphy)
    60      
     55
     56      ! read in some parameters from "run.def" for physics,
     57      ! or shared between dynamics and physics.
     58      ecritphy=240 ! default value
     59      call getin("ecritphy",ecritphy) ! frequency of outputs in physics,
     60                                      ! in dynamical steps
     61      day_step=960 ! default value
     62      call getin("day_step",day_step) ! number of dynamical steps per day
     63      iphysiq=20 ! default value
     64      call getin("iphysiq",iphysiq) ! call physics every iphysiq dyn step
     65      ecritstart=0 ! default value
     66      call getin("ecritstart",ecritstart) ! write a restart every ecristart steps
    6167! --------------------------------------------------------------
    6268!  Reading the "callphys.def" file controlling some key options
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F

    r1524 r1525  
    1111     &                     watercaptag
    1212      use slope_mod, only: theta_sl, psi_sl
    13       use control_mod, only: day_step
    1413      use phyredem, only: physdem0,physdem1
    1514      use comgeomphy, only: initcomgeomphy
     
    1716     &                     obliquit, emin_turb, lmixmin
    1817      use comcstfi_h, only: pi, rad, omeg, g, mugaz, rcp, r, cpp
    19       use time_phylmdz_mod, only: daysec, dtphys
     18      use time_phylmdz_mod, only: daysec, dtphys, day_step
    2019      use dimradmars_mod, only: tauscaling,tauvis
    2120      USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff,sig
  • trunk/LMDZ.MARS/libf/phymars/phyetat0.F90

    r1266 r1525  
    66  use surfdat_h, only: phisfi, albedodat, z0, z0_default,&
    77                       zmea, zstd, zsig, zgam, zthe
    8   use control_mod, only: timestart
    98  use iostart, only: nid_start, open_startphy, close_startphy, &
    109                     get_field, get_var, inquire_field, &
    1110                     inquire_dimension, inquire_dimension_length
     11  use ioipsl_getincom, only : getin
    1212
    1313  implicit none
     
    7979      LOGICAL :: found
    8080
     81      REAL :: timestart ! to pick which initial state to start from
     82
    8183! open physics initial state file:
    8284call open_startphy(fichnom)
     
    167169     
    168170! Time axis
     171! obtain timestart from run.def
     172timestart=-9999 ! default value
     173call getin("timestart",timestart)
     174
    169175found=inquire_dimension("Time")
    170176if (.not.found) then
  • trunk/LMDZ.MARS/libf/phymars/physiq.F

    r1524 r1525  
    2525      use slope_mod, only: theta_sl, psi_sl
    2626      use conc_mod, only: rnew, cpnew, mmean
    27       use control_mod, only: iphysiq, day_step, ecritstart
     27      use time_phylmdz_mod, only: iphysiq, day_step, ecritstart, daysec
    2828      use dimradmars_mod, only: tauscaling, aerosol,
    2929     &                          dtrad, fluxrad_sky, fluxrad, albedo,
     
    3434     &                     obliquit
    3535      USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad
    36       use time_phylmdz_mod, only: daysec
    3736      use param_v4_h, only: nreact,n_avog,
    3837     &                      fill_data_thermos, allocate_param_thermos
  • trunk/LMDZ.MARS/libf/phymars/time_phylmdz_mod.F90

    r1524 r1525  
    44    REAL,SAVE    :: dtphys      ! physics time step (s)
    55!$OMP THREADPRIVATE(pdtphys)
     6    INTEGER,SAVE :: day_step    ! number of dynamical steps per day
     7                                ! (set via conf_phys)
     8!$OMP THREADPRIVATE(day_step)
    69    REAL,SAVE    :: daysec     ! length of day (s)
    710!$OMP THREADPRIVATE(daysec)
     
    1215!$OMP THREADPRIVATE(hour_ini)
    1316
     17    INTEGER,SAVE :: ecritphy    ! for diagfi.nc outputs, write every ecritphy
     18                                ! dynamical steps (set via conf_phys)
     19!$OMP THREADPRIVATE(ecritphy)
     20    INTEGER,SAVE :: iphysiq   ! call physics every iphysiq dynamical step
     21                              ! (set via conf_phys)
     22!$OMP THREADPRIVATE(iphysiq)
     23    INTEGER,SAVE :: ecritstart ! write a restart state every ecritstart
     24                               ! dynamical steps (set via conf_phys)
     25!$OMP THREADPRIVATE(ecritstart)
    1426CONTAINS
    1527
    1628  SUBROUTINE init_time(day_ini_, hour_ini_, daysec_, dtphys_)
     29    USE ioipsl_getin_p_mod, ONLY : getin_p
    1730    IMPLICIT NONE
    1831    INTEGER,INTENT(IN) :: day_ini_
     
    2538    daysec=daysec_
    2639    dtphys=dtphys_
    27 
     40   
    2841  END SUBROUTINE init_time
    2942
  • trunk/LMDZ.MARS/libf/phymars/writediagfi.F

    r1524 r1525  
    4040!=================================================================
    4141      use surfdat_h, only: phisfi
    42       use control_mod, only: ecritphy, day_step, iphysiq
     42      use time_phylmdz_mod, only: ecritphy, day_step, iphysiq, day_ini
    4343      USE mod_phys_lmdz_para, only : is_parallel, is_mpi_root,
    4444     &                               is_master, gather
    4545      USE mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo
    46       USE time_phylmdz_mod, ONLY: day_ini
    4746      implicit none
    4847
  • trunk/LMDZ.MARS/libf/phymars/writediagsoil.F90

    r1266 r1525  
    1313
    1414use comsoil_h, only: nsoilmx
    15 use control_mod, only: ecritphy, day_step, iphysiq
     15use time_phylmdz_mod, only: ecritphy, day_step, iphysiq
    1616use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather
    1717use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo
Note: See TracChangeset for help on using the changeset viewer.