Ignore:
Timestamp:
Apr 25, 2014, 12:20:14 PM (10 years ago)
Author:
lguez
Message:

Removed unused variables pks, pk, pkf from main program unit gcm.

Encapsulated procedures exner_hyb, exner_hyb_p, exner_hyb_loc,
exner_milieu, exner_milieu_p and exner_milieu_loc into
modules. (Compulsory to allow optional arguments.)

In the procedures exner_hyb, exner_hyb_p, exner_hyb_loc, donwgraded
arguments alpha and beta to local variables. In exner_milieu,
exner_milieu_p and exner_milieu_loc, removed beta altogether. In the
six procedures exner_*, made pkf an optional argument. Made some
cosmetic modifications in order to keep the six procedures exner_* as
close as possible.

In the six procedures exner_*, removed the averaging of pks at the
poles: this is not useful because ps is already the same at all
longitudes at the poles. This modification changes the results of the
program. Motivation: had to do this for exner_hyb because we call it
from test_disvert with a few surface pressure values.

In all the procedures calling exner_*, removed the variables alpha and
beta. Also removed variables alpha and beta from module leapfrog_mod
and from module call_calfis_mod.

Removed actual argument pkf in call to exner_hyb* and exner_milieu*
from guide_interp, guide_main, iniacademic and iniacademic_loc (pkf
was not used in those procedures).

Argument workvar of startget_dyn is used only if varname is tpot or

  1. When varname is tpot or q, the actual argument associated to

workvar in etat0_netcdf is not y. So y in etat0_netcdf is a
place-holder, never used. So we remove optional argument y in the
calls to exner_hyb and exner_milieu from etat0_netcdf.

Created procedure test_disvert, called only by etat0_netcdf. This
procedure tests the order of pressure values at half-levels and full
levels.

Location:
LMDZ5/trunk/libf/dyn3d
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d/gcm.F

    r1930 r2021  
    105105      REAL ps(ip1jmp1)                       ! pression  au sol
    106106      REAL p (ip1jmp1,llmp1  )               ! pression aux interfac.des couches
    107       REAL pks(ip1jmp1)                      ! exner au  sol
    108       REAL pk(ip1jmp1,llm)                   ! exner au milieu des couches
    109       REAL pkf(ip1jmp1,llm)                  ! exner filt.au milieu des couches
    110107      REAL masse(ip1jmp1,llm)                ! masse d'air
    111108      REAL phis(ip1jmp1)                     ! geopotentiel au sol
     
    131128      data call_iniphys/.true./
    132129
    133       REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm)
    134130c+jld variables test conservation energie
    135131c      REAL ecin(ip1jmp1,llm),ecin0(ip1jmp1,llm)
  • LMDZ5/trunk/libf/dyn3d/guide_mod.F90

    r1907 r2021  
    589589  SUBROUTINE guide_interp(psi,teta)
    590590 
     591  use exner_hyb_m, only: exner_hyb
     592  use exner_milieu_m, only: exner_milieu
    591593  IMPLICIT NONE
    592594
     
    610612  REAL, DIMENSION (iip1,jjm,llm)     :: pbary
    611613  ! Variables pour fonction Exner (P milieu couche)
    612   REAL, DIMENSION (iip1,jjp1,llm)    :: pk, pkf
    613   REAL, DIMENSION (iip1,jjp1,llm)    :: alpha, beta
     614  REAL, DIMENSION (iip1,jjp1,llm)    :: pk
    614615  REAL, DIMENSION (iip1,jjp1)        :: pks   
    615616  REAL                               :: prefkap,unskap
     
    676677    CALL pression( ip1jmp1, ap, bp, psi, p )
    677678    if (pressure_exner) then
    678       CALL exner_hyb(ip1jmp1,psi,p,alpha,beta,pks,pk,pkf)
     679      CALL exner_hyb(ip1jmp1,psi,p,pks,pk)
    679680    else
    680       CALL exner_milieu(ip1jmp1,psi,p,beta,pks,pk,pkf)
     681      CALL exner_milieu(ip1jmp1,psi,p,pks,pk)
    681682    endif
    682683!    ....  Calcul de pls , pression au milieu des couches ,en Pascals
  • LMDZ5/trunk/libf/dyn3d/iniacademic.F90

    r1907 r2021  
    1414#endif
    1515  USE Write_Field
     16  use exner_hyb_m, only: exner_hyb
     17  use exner_milieu_m, only: exner_milieu
    1618
    1719  !   Author:    Frederic Hourdin      original: 15/01/93
     
    5456  REAL pks(ip1jmp1)                      ! exner au  sol
    5557  REAL pk(ip1jmp1,llm)                   ! exner au milieu des couches
    56   REAL pkf(ip1jmp1,llm)                  ! exner filt.au milieu des couches
    5758  REAL phi(ip1jmp1,llm)                  ! geopotentiel
    5859  REAL ddsin,zsig,tetapv,w_pv  ! variables auxiliaires
     
    7071  integer idum
    7172
    72   REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm),zdtvr
     73  REAL zdtvr
    7374 
    7475  character(len=*),parameter :: modname="iniacademic"
     
    223224        CALL pression ( ip1jmp1, ap, bp, ps, p       )
    224225        if (pressure_exner) then
    225           CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )
    226         else
    227           call exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf)
     226          CALL exner_hyb( ip1jmp1, ps, p, pks, pk)
     227        else
     228          call exner_milieu(ip1jmp1,ps,p,pks,pk)
    228229        endif
    229230        CALL massdair(p,masse)
  • LMDZ5/trunk/libf/dyn3d/leapfrog.F

    r1987 r2021  
    1919     &                       iecri, ip_ebil_dyn, ok_dynzon, ok_dyn_ins,
    2020     &                       periodav, ok_dyn_ave, output_grads_dyn
     21      use exner_hyb_m, only: exner_hyb
     22      use exner_milieu_m, only: exner_milieu
     23
    2124      IMPLICIT NONE
    2225
     
    158161      character*10 string10
    159162
    160       REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm)
    161163      REAL :: flxw(ip1jmp1,llm)  ! flux de masse verticale
    162164
     
    217219      CALL pression ( ip1jmp1, ap, bp, ps, p       )
    218220      if (pressure_exner) then
    219         CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )
     221        CALL exner_hyb( ip1jmp1, ps, p, pks, pk, pkf )
    220222      else
    221         CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf )
     223        CALL exner_milieu( ip1jmp1, ps, p, pks, pk, pkf )
    222224      endif
    223225
     
    373375         CALL pression (  ip1jmp1, ap, bp, ps,  p      )
    374376         if (pressure_exner) then
    375            CALL exner_hyb(  ip1jmp1, ps, p,alpha,beta,pks, pk, pkf )
     377           CALL exner_hyb(  ip1jmp1, ps, p,pks, pk, pkf )
    376378         else
    377            CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf )
     379           CALL exner_milieu( ip1jmp1, ps, p, pks, pk, pkf )
    378380         endif
    379381
     
    448450          CALL massdair(p,masse)
    449451          if (pressure_exner) then
    450             CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf)
     452            CALL exner_hyb(ip1jmp1,ps,p,pks,pk,pkf)
    451453          else
    452             CALL exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf)
     454            CALL exner_milieu(ip1jmp1,ps,p,pks,pk,pkf)
    453455          endif
    454456
     
    506508        CALL pression ( ip1jmp1, ap, bp, ps, p                  )
    507509        if (pressure_exner) then
    508           CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )
     510          CALL exner_hyb( ip1jmp1, ps, p, pks, pk, pkf )
    509511        else
    510           CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf )
     512          CALL exner_milieu( ip1jmp1, ps, p, pks, pk, pkf )
    511513        endif
    512514        CALL massdair(p,masse)
Note: See TracChangeset for help on using the changeset viewer.