Ignore:
Timestamp:
Jan 25, 2017, 4:02:54 PM (8 years ago)
Author:
emillour
Message:

Dynamical core: Further adaptations to stick with LMDZ5 (up to rev r2750)

  • libf
  • makelmdz[_fcm] : added Earth-specific "dust" and "strataer" cases and

-arch_path option

  • bld.cfg : added dust and strataer cases
  • dyn3d[par]
  • conf_gcm.F90 : added read_orop parameter (Earth-related) for

loading subgrid orography parameters.

  • guide[_p]_mod.F90: added output of nudging coefficients for winds

and temperature

  • temps_mod.F90 : cosmetics/comments
  • logic_mod.F90 : cosmetics/comments
  • dyn3d_common
  • comconst_mod.F90 : cosmetics/comments + added year_day module variable
  • conf_planete.F90 : added year_day from comconst_mod as done in LMDZ5
  • comvert_mod.F90 : cosmetics/comments
  • infotrac.F90 : added "startAer" case to follow up with LMDZ5
  • misc
  • wxios.F90 : follow up on changes in LMDZ5

EM

Location:
trunk/LMDZ.COMMON/libf/dyn3dpar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F90

    r1572 r1650  
    2424  USE logic_mod, ONLY: tidal,purmats,ok_guide,read_start,iflag_phys,iflag_trac, &
    2525                ok_strato,ok_gradsfile,ok_limit,ok_etat0,moyzon_mu,moyzon_ch,   &
    26                 fxyhypb,ysinus
     26                fxyhypb,ysinus,read_orop
    2727  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,             &
    2828                alphax,alphay,taux,tauy
     
    5353!   ------
    5454
    55   CHARACTER ch1*72,ch2*72,ch3*72,ch4*12
    5655  REAL clonn,clatt,grossismxx,grossismyy
    5756  REAL dzoomxx,dzoomyy, tauxx,tauyy
    5857  LOGICAL  fxyhypbb, ysinuss
    59   INTEGER i
    6058  character(len=*),parameter :: modname="conf_gcm"
    6159  character (len=80) :: abort_message
     
    638636  ok_etat0 = .TRUE.
    639637  CALL getin('ok_etat0',ok_etat0)
     638
     639!Config  Key  = read_orop
     640!Config  Desc = lecture du fichier de params orographiques sous maille
     641!Config  Def  = f
     642!Config  Help = lecture fichier plutot que grid_noro
     643
     644  read_orop = .FALSE.
     645  CALL getin('read_orop',read_orop)
    640646
    641647!----------------------------------------
     
    9951001      write(lunout,*)' ok_limit = ', ok_limit
    9961002      write(lunout,*)' ok_etat0 = ', ok_etat0
     1003      write(lunout,*)' read_orop = ', read_orop
    9971004      if (planet_type=="titan") then
    9981005       write(lunout,*)' moyzon_mu = ', moyzon_mu
  • trunk/LMDZ.COMMON/libf/dyn3dpar/guide_p_mod.F90

    r1422 r1650  
    3838
    3939  REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_u,alpha_v
    40   REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_T,alpha_Q
     40  REAL, ALLOCATABLE, DIMENSION(:, :), PRIVATE, SAVE     :: alpha_T,alpha_Q
    4141  REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_P,alpha_pcor
    4242 
     
    6868  SUBROUTINE guide_init
    6969
    70     USE control_mod
     70    USE control_mod, ONLY: day_step
    7171    USE serre_mod, ONLY: grossismx
    7272
     
    237237    ALLOCATE(alpha_v(ip1jm), stat = error)
    238238    IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
    239     ALLOCATE(alpha_T(ip1jmp1), stat = error)
     239    ALLOCATE(alpha_T(iip1, jjp1), stat = error)
    240240    IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
    241     ALLOCATE(alpha_Q(ip1jmp1), stat = error)
     241    ALLOCATE(alpha_Q(iip1, jjp1), stat = error)
    242242    IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
    243243    ALLOCATE(alpha_P(ip1jmp1), stat = error)
     
    339339    USE parallel_lmdz
    340340    USE control_mod
    341     USE comvert_mod, ONLY: ap,bp,preff,presnivs,pressure_exner
    342     USE comconst_mod, ONLY: daysec,dtvr,kappa,cpp
     341    USE comconst_mod, ONLY: daysec, dtvr, cpp, kappa
     342    USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
    343343   
    344344    IMPLICIT NONE
     
    618618
    619619    USE comconst_mod, ONLY: pi
    620 
     620   
    621621    IMPLICIT NONE
    622622
     
    706706  USE mod_hallo
    707707  USE Bands
    708   USE comvert_mod, ONLY: ap,bp,preff,pressure_exner
    709   USE comconst_mod, ONLY: kappa,cpp
     708  USE comconst_mod, ONLY: cpp, kappa
     709  USE comvert_mod, ONLY: preff, pressure_exner, bp, ap
    710710  IMPLICIT NONE
    711711
     
    10981098! Calcul des constantes de rappel alpha (=1/tau)
    10991099
    1100     USE comconst_mod, ONLY: pi
    1101     USE serre_mod, ONLY: clon,clat,grossismx,grossismy
    1102 
     1100    use comconst_mod, only: pi
     1101    use serre_mod, only: clat, clon, grossismx, grossismy
     1102   
    11031103    implicit none
    11041104
     
    18131813  SUBROUTINE guide_out(varname,hsize,vsize,field,factt)
    18141814    USE parallel_lmdz
     1815    USE comconst_mod, ONLY: pi
    18151816    USE comvert_mod, ONLY: presnivs
    1816     USE comconst_mod, ONLY: pi
     1817    use netcdf95, only: nf95_def_var, nf95_put_var
     1818    use netcdf, only: nf90_float
     1819
    18171820    IMPLICIT NONE
    18181821
     
    18331836    INTEGER       :: nid, id_lonu, id_lonv, id_latu, id_latv, id_tim, id_lev
    18341837    INTEGER       :: vid_lonu,vid_lonv,vid_latu,vid_latv,vid_cu,vid_cv,vid_lev
    1835     INTEGER       :: vid_au,vid_av
     1838    INTEGER       :: vid_au,vid_av, varid_alpha_t, varid_alpha_q
    18361839    INTEGER       :: l
    18371840    INTEGER, DIMENSION (3) :: dim3
     
    18711874        ierr=NF_DEF_VAR(nid,"au",NF_FLOAT,2,(/id_lonu,id_latu/),vid_au)
    18721875        ierr=NF_DEF_VAR(nid,"av",NF_FLOAT,2,(/id_lonv,id_latv/),vid_av)
     1876        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
     1877             varid_alpha_t)
     1878        call nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
     1879             varid_alpha_q)
    18731880       
    18741881        ierr=NF_ENDDEF(nid)
     
    18981905        ierr = NF_PUT_VAR_REAL(nid,vid_av,alpha_v)
    18991906#endif
     1907        call nf95_put_var(nid, varid_alpha_t, alpha_t)
     1908        call nf95_put_var(nid, varid_alpha_q, alpha_q)
    19001909! --------------------------------------------------------------------
    19011910! Cr�ation des variables sauvegard�es
  • trunk/LMDZ.COMMON/libf/dyn3dpar/logic_mod.F90

    r1593 r1650  
     1!
     2! $Id: $
     3!
    14MODULE logic_mod
    25
    36IMPLICIT NONE 
    47
    5       LOGICAL purmats,forward,leapf,apphys,statcl,conser,               &
    6      & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus                      &
    7      &  ,read_start,ok_guide,ok_strato,tidal,ok_gradsfile               &
    8      &  ,ok_limit,ok_etat0
    9       logical hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
    10                      ! (only used if disvert_type==2)
    11       logical moyzon_mu,moyzon_ch ! used for zonal averages in Titan
     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 tidal  ! true if adding tidal forces (for Titan)
     27  LOGICAL ok_gradsfile
     28  LOGICAL ok_limit  ! true for boundary conditions file creation (limit.nc)
     29  LOGICAL ok_etat0  ! true for initial states creation (start.nc, startphy.nc)
     30  LOGICAL read_orop ! true for sub-cell scales orographic params read in file
     31  LOGICAL hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
     32                 ! (only used if disvert_type==2)
     33  LOGICAL moyzon_mu,moyzon_ch ! used for zonal averages in Titan
    1234
    13       integer iflag_phys,iflag_trac
     35  INTEGER iflag_phys ! type of physics to call: 0 none, 1: phy*** package,
     36                     ! 2: Held & Suarez, 101-200: aquaplanets & terraplanets
     37  INTEGER iflag_trac
    1438
    1539!$OMP THREADPRIVATE(purmats,forward,leapf,apphys,statcl,conser,       &
    16   !$OMP     apdiss,apdelq,saison,ecripar,fxyhypb,ysinus,              &
    17   !$OMP     read_start,ok_guide,ok_strato,tidal,ok_gradsfile,         &
    18   !$OMP     ok_limit,ok_etat0)
     40!$OMP     apdiss,apdelq,saison,ecripar,fxyhypb,ysinus,              &
     41!$OMP     read_start,ok_guide,ok_strato,tidal,ok_gradsfile,         &
     42!$OMP     ok_limit,ok_etat0,hybrid,moyzon_mu,moyzon_ch)
    1943!$OMP THREADPRIVATE(iflag_phys,iflag_trac)
    2044
    21 !BE CAREFUL: when adding a threadprivate variable in this module
    22 !       do not forget to add it to copyin clause of gcm.F (before CALL leapfrog_p)
     45!WARNING: when adding a threadprivate variable in this module
     46!        do not forget to add it to the copyin clause when opening an OpenMP
     47!        parallel section. e.g. in gcm before call leapfrog_loc
    2348
    2449END MODULE logic_mod
  • trunk/LMDZ.COMMON/libf/dyn3dpar/temps_mod.F90

    r1422 r1650  
    33IMPLICIT NONE 
    44
    5 ! jD_ref = jour julien de la date de reference (lancement de l'experience)
    6 ! hD_ref = "heure" julienne de la date de reference
     5  INTEGER   itaufin ! total number of dynamical steps for the run
     6  INTEGER   itau_dyn
     7  INTEGER   itau_phy
     8  INTEGER   day_ini ! initial day # of simulation sequence
     9  INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
     10  INTEGER   annee_ref
     11  INTEGER   day_ref
     12  REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
     13  REAL      jD_ref ! reference julian day date (beginning of experiment)
     14  REAL      jH_ref ! reference julian "hour" of reference julian date
     15  REAL      start_time
     16  CHARACTER (len=10) :: calend ! calendar type
    717
    8       INTEGER   itaufin ! total number of dynamical steps for the run
    9       INTEGER   itau_dyn, itau_phy
    10       INTEGER   day_ini ! initial day # of simulation sequence
    11       INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
    12       INTEGER   annee_ref
    13       INTEGER   day_ref
    14       REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
    15       REAL      jD_ref, jH_ref, start_time
    16       CHARACTER (len=10) :: calend
     18  ! Additionnal Mars stuff:
     19  REAL hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
    1720
    18       ! Additionnal Mars stuff:
    19       real hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
     21!$OMP THREADPRIVATE(dt,jD_ref,jH_ref,start_time,hour_ini,                        &
     22!$OMP                day_ini,day_end,annee_ref,day_ref,itau_dyn,itau_phy,itaufin,&
     23!$OMP                calend)       
    2024
    21 !$OMP THREADPRIVATE(dt,jD_ref,jH_ref,start_time,hour_ini,                       &
    22   !$OMP         day_ini,day_end,annee_ref,day_ref,itau_dyn,itau_phy,itaufin,    &
    23   !$OMP         calend)
    24 
    25 !BE CAREFUL: when adding a threadprivate variable in this module
    26 !       do not forget to add it to copyin clause of gcm.F (before CALL leapfrog_p)
     25!WARNING: when adding a threadprivate variable in this module
     26!        do not forget to add it to the copyin clause when opening an OpenMP
     27!        parallel section. e.g. in gcm before call leapfrog_loc and/or
     28!        possibly in iniphysiq
    2729
    2830END MODULE temps_mod
Note: See TracChangeset for help on using the changeset viewer.