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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/etat0_netcdf.F90

    r1907 r2021  
    2929  USE netcdf, ONLY : NF90_OPEN, NF90_NOWRITE, NF90_CLOSE, NF90_NOERR
    3030  USE indice_sol_mod
     31  use exner_hyb_m, only: exner_hyb
     32  use exner_milieu_m, only: exner_milieu
     33  use test_disvert_m, only: test_disvert
    3134#endif
    3235  IMPLICIT NONE
     
    7477  CHARACTER(LEN=80)                        :: x, fmt
    7578  INTEGER                                  :: i, j, l, ji
    76   REAL,    DIMENSION(iip1,jjp1,llm)        :: alpha, beta, pk, pls, y
     79  REAL,    DIMENSION(iip1,jjp1,llm)        :: pk, pls, y
    7780  REAL,    DIMENSION(ip1jmp1)              :: pks
    7881
     
    150153
    151154  CALL iniconst()
     155  call test_disvert
    152156  CALL inigeom()
    153157
     
    253257  CALL pression(ip1jmp1, ap, bp, psol, p3d)
    254258  if (pressure_exner) then
    255     CALL exner_hyb(ip1jmp1, psol, p3d, alpha, beta, pks, pk, y)
     259    CALL exner_hyb(ip1jmp1, psol, p3d, pks, pk)
    256260  else
    257     CALL exner_milieu(ip1jmp1,psol,p3d,beta,pks,pk,y)
     261    CALL exner_milieu(ip1jmp1,psol,p3d, pks,pk)
    258262  endif
    259263  pls(:,:,:)=preff*(pk(:,:,:)/cpp)**(1./kappa)
Note: See TracChangeset for help on using the changeset viewer.