Changeset 1525 for trunk/LMDZ.GENERIC


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.GENERIC
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r1524 r1525  
    11481148  to module "time_phylmdz_mod".
    11491149- made "inifis" a module.
     1150
     1151== 30/03/2016 == EM
     1152- Got rid of references to "control_mod" from the physics. Added a couple
     1153  of relevent variables for outputs in time_phylmdz_mod.
  • trunk/LMDZ.GENERIC/libf/dynlonlat_phylonlat/phystd/iniphysiq_mod.F90

    r1524 r1525  
    1414                               klon_omp_end, & ! end index of local omp subgrid
    1515                               klon_mpi_begin ! start indes of columns (on local mpi grid)
    16 
     16use control_mod, only: nday
    1717use comgeomphy, only : initcomgeomphy, &
    1818                       airephy, & ! physics grid area (m2)
     
    176176! copy some fundamental parameters to physics
    177177! and do some initializations
    178 call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,ptimestep, &
     178call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, &
    179179            rlatd,rlond,airephy,prad,pg,pr,pcpp)
    180180
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90

    r1403 r1525  
    99  use planete_mod
    1010  use callkeys_mod, only: check_cpp_match, pceil, tstrat, tracer
    11 !  use control_mod
     11  use inifis_mod, only: inifis
    1212  use comcstfi_mod
    1313  implicit none
     
    203203  call calc_cpp_mugaz
    204204
    205   call inifis(1,llm,0,86400.0,1.0,0.0,0.0,1.0,rad,g,r,cpp)
     205  call inifis(1,llm,0,1,86400.0,1,1.0,&
     206              (/0.0/),(/0.0/),(/1.0/),&
     207              rad,g,r,cpp)
    206208
    207209  ! Tracer initialisation
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F

    r1524 r1525  
    1212      use comsoil_h, only: nsoilmx, layer, mlayer, inertiedat, volcapa
    1313      USE comgeomfi_h, only: lati, long, area
    14       use control_mod, only: day_step, ecritphy
    1514      use phyredem, only: physdem0,physdem1
    1615      use comgeomphy, only: initcomgeomphy
     
    2120      use comcstfi_mod, only: pi, cpp, rad, g, r,
    2221     &                        mugaz, rcp, omeg
    23       use time_phylmdz_mod, only: daysec, dtphys
     22      use time_phylmdz_mod, only: daysec, dtphys, day_step, ecritphy,
     23     &                            nday
    2424      use callkeys_mod, only: tracer,check_cpp_match,rings_shadow,
    2525     &                        specOLR,water,pceil,ok_slab_ocean
     
    488488      call getin("ndt",ndt)
    489489      write(*,*) " ndt = ",ndt
     490      nday=ndt
    490491
    491492      ndt=ndt*day_step     
     
    505506!!! - physical frequency: nevermind, in inifis this is a simple print
    506507      cpp=1.d-7 !JL because we divide by cpp in inifis, there may be a more elegant solution
    507       CALL inifis(1,llm,nq,day0,daysec,dtphys,
     508      CALL inifis(1,llm,nq,day0,daysec,nday,dtphys,
    508509     .            latitude,longitude,area,rad,g,r,cpp)
    509510!!! We check everything is OK.
  • trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90

    r1524 r1525  
    55
    66  SUBROUTINE inifis(ngrid,nlayer,nq, &
    7              day_ini,pdaysec,ptimestep, &
     7             day_ini,pdaysec,nday,ptimestep, &
    88             plat,plon,parea, &
    99             prad,pg,pr,pcpp)
     
    1414  use comgeomfi_h, only: long, lati, area, totarea, totarea_planet
    1515  use comsoil_h, only: ini_comsoil_h
    16   use control_mod, only: ecritphy
     16  use time_phylmdz_mod, only: ecritphy,day_step,iphysiq, &
     17                              init_time, daysec, dtphys
    1718  use comcstfi_mod, only: rad, cpp, g, r, rcp, &
    1819                          mugaz, pi, avocado
     
    2021  use planetwide_mod, only: planetwide_sumval
    2122  use callkeys_mod
    22   use time_phylmdz_mod, only: init_time, daysec, dtphys
    2323
    2424!=======================================================================
     
    6464
    6565  REAL,INTENT(IN) :: prad,pg,pr,pcpp,pdaysec,ptimestep
    66  
     66  INTEGER,INTENT(IN) :: nday
    6767  INTEGER,INTENT(IN) :: ngrid,nlayer,nq
    6868  REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)
     
    9191
    9292  ! Initialize some "temporal and calendar" related variables
    93   CALL init_time(day_ini,pdaysec,ptimestep)
    94 
    95   ! read in 'ecritphy' (frequency of calls to physics, in dynamical steps)
    96   ! (also done in dyn3d/defrun_new but not in LMDZ.COMMON)
    97   call getin_p("ecritphy",ecritphy)
     93  CALL init_time(day_ini,pdaysec,nday,ptimestep)
     94
     95  ! read in some parameters from "run.def" for physics,
     96  ! or shared between dynamics and physics.
     97  call getin_p("ecritphy",ecritphy) ! frequency of outputs in physics,
     98                                    ! in dynamical steps
     99  call getin_p("day_step",day_step) ! number of dynamical steps per day
     100  call getin_p("iphysiq",iphysiq) ! call physics every iphysiq dyn step
    98101
    99102! --------------------------------------------------------------
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r1524 r1525  
    2424                          igcm_h2o_ice, igcm_h2o_vap, igcm_dustbin, &
    2525                          igcm_co2_ice
    26       use control_mod, only: ecritphy, iphysiq, nday
     26      use time_phylmdz_mod, only: ecritphy, iphysiq, nday
    2727      use phyredem, only: physdem0, physdem1
    2828      use slab_ice_h
  • trunk/LMDZ.GENERIC/libf/phystd/time_phylmdz_mod.F90

    r1524 r1525  
    44    REAL,SAVE    :: dtphys     ! physics time step (s)
    55!$OMP THREADPRIVATE(dtphys)
     6    INTEGER,SAVE :: day_step    ! number of dynamical steps per day
     7                                ! (set via inifis)
     8!$OMP THREADPRIVATE(day_step)
     9    INTEGER,SAVE :: nday       ! number of days to run
     10!$OMP THREADPRIVATE(nday)
    611    REAL,SAVE    :: daysec     ! length of day (s)
    712!$OMP THREADPRIVATE(daysec)
     
    914!$OMP THREADPRIVATE(day_ini)
    1015
     16    INTEGER,SAVE :: ecritphy  ! for diagfi.nc outputs, write every ecritphy
     17                              ! dynamical steps (set via inifis)
     18!$OMP THREADPRIVATE(ecritphy)
     19    INTEGER,SAVE :: iphysiq   ! call physics every iphysiq dynamical step
     20                              ! (set via inifis)
     21!$OMP THREADPRIVATE(iphysiq)
     22
    1123CONTAINS
    1224
    13   SUBROUTINE init_time(day_ini_, daysec_, dtphys_)
     25  SUBROUTINE init_time(day_ini_, daysec_, nday_, dtphys_)
    1426    IMPLICIT NONE
    1527    INTEGER,INTENT(IN) :: day_ini_
    1628    REAL,INTENT(IN) :: daysec_
     29    INTEGER,INTENT(IN) :: nday_
    1730    REAL,INTENT(IN) :: dtphys_
    1831   
    1932    day_ini=day_ini_
    2033    daysec=daysec_
     34    nday=nday_
    2135    dtphys=dtphys_
    2236
  • trunk/LMDZ.GENERIC/libf/phystd/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.GENERIC/libf/phystd/writediagsoil.F90

    r1315 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
  • trunk/LMDZ.GENERIC/libf/phystd/writediagspecIR.F

    r1524 r1525  
    4848      use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo
    4949#endif
    50       use control_mod, only: ecritphy, iphysiq, day_step
     50      use time_phylmdz_mod, only: ecritphy, iphysiq, day_step, day_ini
    5151      use callkeys_mod, only: iradia
    52       use time_phylmdz_mod, ONLY: day_ini
    5352
    5453      implicit none
  • trunk/LMDZ.GENERIC/libf/phystd/writediagspecVI.F

    r1524 r1525  
    4848      use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo
    4949#endif
    50       use control_mod, only: ecritphy, iphysiq, day_step
     50      use time_phylmdz_mod, only: ecritphy, iphysiq, day_step, day_ini
    5151      use callkeys_mod, only: iradia
    52       use time_phylmdz_mod, ONLY: day_ini
    5352
    5453      implicit none
Note: See TracChangeset for help on using the changeset viewer.