Ignore:
Timestamp:
Jul 25, 2016, 11:31:56 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Cleanup in the dynamics: turn logic.h into module logic_mod.F90
EM

Location:
LMDZ5/trunk/libf/dyn3dmem
Files:
24 edited
1 moved

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dmem/advect_new_loc.F

    r2600 r2603  
    88      USE advect_new_mod
    99      USE comconst_mod, ONLY: daysec
     10      USE logic_mod, ONLY: conser
     11     
    1012      IMPLICIT NONE
    1113c=======================================================================
     
    3133      include "paramet.h"
    3234      include "comgeom.h"
    33       include "logic.h"
    3435      include "ener.h"
    3536
  • LMDZ5/trunk/libf/dyn3dmem/advtrac_loc.F

    r2601 r2603  
    3434      include "comdissip.h"
    3535      include "comgeom2.h"
    36       include "logic.h"
    3736      include "ener.h"
    3837      include "description.h"
  • LMDZ5/trunk/libf/dyn3dmem/bernoui_loc.F

    r1907 r2603  
    2424c   -------------
    2525c
    26 #include "dimensions.h"
    27 #include "paramet.h"
    28 #include "logic.h"
     26      include "dimensions.h"
     27      include "paramet.h"
    2928c
    3029c   Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90

    r2601 r2603  
    8383  USE write_field
    8484  USE comconst_mod, ONLY: dtphys
     85  USE logic_mod, ONLY: leapf, forward, ok_strato
    8586  USE comvert_mod, ONLY: ap, bp, pressure_exner
    8687  USE temps_mod, ONLY: day_ini, day_ref, jd_ref, jh_ref, start_time
    8788 
    8889  IMPLICIT NONE
    89     INCLUDE "logic.h"
    9090    INCLUDE "iniprint.h"
    9191
  • LMDZ5/trunk/libf/dyn3dmem/conf_gcm.F90

    r2601 r2603  
    2020                          iflag_top_bound, mode_top_bound, tau_top_bound, &
    2121                          ngroup
     22  USE logic_mod, ONLY: fxyhypb, iflag_phys, ok_etat0, ok_gradsfile, &
     23                       ok_guide, ok_limit, ok_strato, purmats, read_start, &
     24                       ysinus
    2225  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
    2326                       alphax,alphay,taux,tauy
     
    4144  include "dimensions.h"
    4245  include "paramet.h"
    43   include "logic.h"
    4446  include "comdissnew.h"
    4547  include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/convmas1_loc.F90

    r2336 r2603  
    1212  include "paramet.h"
    1313  include "comgeom.h"
    14   include "logic.h"
    1514!===============================================================================
    1615! Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/convmas2_loc.F90

    r2336 r2603  
    1111  include "paramet.h"
    1212  include "comgeom.h"
    13   include "logic.h"
    1413!===============================================================================
    1514! Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/convmas_loc.F90

    r2336 r2603  
    1111  include "paramet.h"
    1212  include "comgeom.h"
    13   include "logic.h"
    1413!===============================================================================
    1514! Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/dteta1_loc.F

    r1907 r2603  
    2121
    2222
    23 #include "dimensions.h"
    24 #include "paramet.h"
    25 #include "logic.h"
     23      include "dimensions.h"
     24      include "paramet.h"
    2625
    2726      REAL teta( ijb_u:ije_u,llm )
  • LMDZ5/trunk/libf/dyn3dmem/dynetat0_loc.f90

    r2601 r2603  
    1515  USE comconst_mod, ONLY: cpp, daysec, dtvr, g, im, jm, kappa, lllm, &
    1616                          omeg, rad
     17  USE logic_mod, ONLY: fxyhypb, ysinus
    1718  USE serre_mod, ONLY: clon, clat, grossismx, grossismy
    1819  USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn, &
     
    2526  include "ener.h"
    2627  include "description.h"
    27   include "logic.h"
    2828  include "iniprint.h"
    2929!===============================================================================
  • LMDZ5/trunk/libf/dyn3dmem/dynredem_loc.F90

    r2601 r2603  
    1616                         nivsig,nivsigs
    1717  USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad
     18  USE logic_mod, ONLY: fxyhypb, ysinus
    1819  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
    1920                       taux,tauy
     
    2526  include "comgeom.h"
    2627  include "ener.h"
    27   include "logic.h"
    2828  include "description.h"
    2929  include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/gcm.F90

    r2601 r2603  
    2222#endif
    2323  USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, r, rad
     24  USE logic_mod ! all of it, because of copyin clause when calling leapfrog
    2425  USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref, &
    2526                       itau_dyn,itau_phy,day_ini,jD_ref,jH_ref,day_end, &
     
    6162  include "comdissnew.h"
    6263  include "comgeom.h"
    63   include "logic.h"
    6464  include "ener.h"
    6565  include "description.h"
     
    453453
    454454  !!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
    455   !$OMP PARALLEL DEFAULT(SHARED) COPYIN(/logici/,/logicl/) &
     455  !$OMP PARALLEL DEFAULT(SHARED) &
    456456  !     Copy all threadprivate variables in temps_mod
    457457  !$OMP COPYIN(dt,jD_ref,jH_ref,start_time,hour_ini,day_ini,day_end) &
    458   !$OMP COPYIN(annee_ref,day_ref,itau_dyn,itau_phy,itaufin,calend)
     458  !$OMP COPYIN(annee_ref,day_ref,itau_dyn,itau_phy,itaufin,calend) &
     459  !     Copy all threadprivate variables from logic_mod
     460  !$OMP COPYIN(purmats,forward,leapf,apphys,statcl,conser,apdiss,apdelq) &
     461  !$OMP COPYIN(saison,ecripar,fxyhypb,ysinus,read_start,ok_guide) &
     462  !$OMP COPYIN(ok_strato,ok_gradsfile,ok_limit,ok_etat0) &
     463  !$OMP COPYIN(iflag_phys,iflag_trac)
    459464  CALL leapfrog_loc(ucov,vcov,teta,ps,masse,phis,q,time_0)
    460465  !$OMP END PARALLEL
  • LMDZ5/trunk/libf/dyn3dmem/iniacademic_loc.F90

    r2601 r2603  
    1919  USE Write_Field
    2020  USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm
     21  USE logic_mod, ONLY: iflag_phys, read_start
    2122  USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
    2223  USE temps_mod, ONLY: annee_ref, day_ini, day_ref
     
    3738  include "ener.h"
    3839  include "iniprint.h"
    39   include "logic.h"
    4040
    4141  !   Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/initdynav_loc.F

    r2601 r2603  
    4949      include "comgeom.h"
    5050      include "ener.h"
    51       include "logic.h"
    5251      include "description.h"
    5352      include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/initfluxsto_p.F

    r2601 r2603  
    5050      include "comgeom.h"
    5151      include "ener.h"
    52       include "logic.h"
    5352      include "description.h"
    5453      include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/inithist_loc.F

    r2601 r2603  
    4848      include "comgeom.h"
    4949      include "ener.h"
    50       include "logic.h"
    5150      include "description.h"
    5251      include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/integrd_loc.F

    r2601 r2603  
    1313      USE infotrac, ONLY: ok_iso_verif ! ajout CRisi
    1414      USE comconst_mod, ONLY: pi
     15      USE logic_mod, ONLY: leapf
    1516      USE comvert_mod, ONLY: ap, bp
    1617      USE temps_mod, ONLY: dt
     
    3738      include "paramet.h"
    3839      include "comgeom.h"
    39       include "logic.h"
    4040      include "iniprint.h"
    4141
  • LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F

    r2601 r2603  
    3434       USE comconst_mod, ONLY: cpp, dtvr, ihf
    3535       USE comvert_mod, ONLY: ap, bp, pressure_exner
     36       USE logic_mod, ONLY: iflag_phys,ok_guide,forward,leapf,apphys,
     37     &                      statcl,conser,apdiss,purmats,ok_strato
    3638       USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini,
    3739     &                        day_ref,start_time,dt
     
    7476      include "comdissnew.h"
    7577      include "comgeom.h"
    76       include "logic.h"
    7778      include "ener.h"
    7879      include "description.h"
  • LMDZ5/trunk/libf/dyn3dmem/logic_mod.F90

    r2600 r2603  
    22! $Id: $
    33!
    4 !
    5 ! NB: keep items of different kinds in seperate common blocs to avoid
    6 !     "misaligned commons" issues
    7 !-----------------------------------------------------------------------
    8 ! INCLUDE 'logic.h'
     4MODULE logic_mod
    95
    10       COMMON/logicl/ purmats,forward,leapf,apphys,                      &
    11      &  statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus       &
    12      &  ,read_start,ok_guide,ok_strato,ok_gradsfile                     &
    13      &  ,ok_limit,ok_etat0,hybrid
     6IMPLICIT NONE
    147
    15       COMMON/logici/ iflag_phys,iflag_trac
    16      
    17       LOGICAL purmats,forward,leapf,apphys,statcl,conser,               &
    18      & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus                      &
    19      &  ,read_start,ok_guide,ok_strato,ok_gradsfile                     &
    20      &  ,ok_limit,ok_etat0
    21      
    22       logical hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
    23                      ! (only used if disvert_type==2)
     8  LOGICAL purmats ! true if time stepping is purely Matsuno scheme
     9                  ! false implies Matsuno-Leapfrog time stepping scheme
     10  LOGICAL forward ! true if during forward phase of Matsuno step
     11  LOGICAL leapf ! true if during a leapfrog time stepping step
     12  LOGICAL apphys ! true if during a time step when physics will be called
     13  LOGICAL statcl
     14  LOGICAL conser
     15  LOGICAL apdiss ! true if during a time step when dissipation will be called
     16  LOGICAL apdelq
     17  LOGICAL saison
     18  LOGICAL ecripar
     19  LOGICAL fxyhypb ! true if using hyperbolic function discretization
     20                  ! for latitudinal grid
     21  LOGICAL ysinus ! true if using sine function discretiation
     22                 ! for latitudinal grid
     23  LOGICAL read_start ! true if reading a start.nc file to initialize fields
     24  LOGICAL ok_guide ! true if nudging
     25  LOGICAL ok_strato
     26  LOGICAL ok_gradsfile
     27  LOGICAL ok_limit
     28  LOGICAL ok_etat0
     29  LOGICAL hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
     30                 ! (only used if disvert_type==2)
     31  INTEGER iflag_phys ! type of physics to call: 0 none, 1: phy*** package,
     32                     ! 2: Held & Suarez, 101-200: aquaplanets & terraplanets
     33  INTEGER iflag_trac
    2434
    25       integer iflag_phys,iflag_trac
    26 !$OMP THREADPRIVATE(/logicl/)
    27 !$OMP THREADPRIVATE(/logici/)
    28 !-----------------------------------------------------------------------
     35!$OMP THREADPRIVATE(purmats,forward,leapf,apphys,statcl,conser, &
     36!$OMP     apdiss,apdelq,saison,ecripar,fxyhypb,ysinus, &
     37!$OMP     read_start,ok_guide,ok_strato,ok_gradsfile, &
     38!$OMP     ok_limit,ok_etat0,hybrid)
     39!$OMP THREADPRIVATE(iflag_phys,iflag_trac)
     40
     41!WARNING: when adding a threadprivate variable in this module
     42!        do not forget to add it to the copyin clause when opening an OpenMP
     43!        parallel section. e.g. in gcm before call leapfrog_loc
     44
     45END MODULE logic_mod
  • LMDZ5/trunk/libf/dyn3dmem/tourpot_loc.F90

    r2336 r2603  
    1111  include "paramet.h"
    1212  include "comgeom.h"
    13   include "logic.h"
    1413!===============================================================================
    1514! Arguments:
  • LMDZ5/trunk/libf/dyn3dmem/vlsplt_loc.F

    r2600 r2603  
    1919      include "dimensions.h"
    2020      include "paramet.h"
    21       include "logic.h"
    2221c
    2322c
     
    420419      include "dimensions.h"
    421420      include "paramet.h"
    422       include "logic.h"
    423421      include "comgeom.h"
    424422c
     
    874872      include "dimensions.h"
    875873      include "paramet.h"
    876       include "logic.h"
    877874c
    878875c
  • LMDZ5/trunk/libf/dyn3dmem/vlspltgen_loc.F

    r2600 r2603  
    3737      include "dimensions.h"
    3838      include "paramet.h"
    39       include "logic.h"
    4039
    4140c
  • LMDZ5/trunk/libf/dyn3dmem/vlspltqs_loc.F

    r2600 r2603  
    1414      include "dimensions.h"
    1515      include "paramet.h"
    16       include "logic.h"
    1716c
    1817c
     
    423422      include "dimensions.h"
    424423      include "paramet.h"
    425       include "logic.h"
    426424      include "comgeom.h"
    427425c
  • LMDZ5/trunk/libf/dyn3dmem/writedynav_loc.F

    r2601 r2603  
    4848      include "comgeom.h"
    4949      include "ener.h"
    50       include "logic.h"
    5150      include "description.h"
    5251      include "iniprint.h"
  • LMDZ5/trunk/libf/dyn3dmem/writehist_loc.F

    r2601 r2603  
    4848      include "comgeom.h"
    4949      include "ener.h"
    50       include "logic.h"
    5150      include "description.h"
    5251      include "iniprint.h"
Note: See TracChangeset for help on using the changeset viewer.