Ignore:
Timestamp:
Jan 3, 2016, 11:16:34 AM (8 years ago)
Author:
Ehouarn Millour
Message:

Improving the physics/dynamics interface:

  • added module callphysiq_mod.F90 in dynphy_lonlat/phy* which contains the routine "call_physiq" which is called by calfis* and calls the physics. This way different "physiq" routine from different physics packages may be called: The calfis* routines now exposes all available fields that might be transmitted to physiq but which is actually send (ie: expected/needed by physiq) is decided in call_physiq.
  • turned "physiq.F90" into module "physiq_mod.F90" for better control of "physiq" arguments. Extracted embeded "gr_fi_ecrit" as self-standing routine (but note that this routine actually only works in serial mode).

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dynphy_lonlat/calfis.F

    r2333 r2418  
    3131      USE infotrac, ONLY: nqtot, niadv, tname
    3232      USE control_mod, ONLY: planet_type, nsplit_phys
    33  
     33#ifdef CPP_PHYS
     34      USE callphysiq_mod, ONLY: call_physiq
     35#endif
    3436
    3537      IMPLICIT NONE
     
    121123      REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa)
    122124      REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer
    123       REAL,INTENT(IN) :: flxw(iip1,jjp1,llm)  ! Vertical mass flux on dynamics grid
     125      REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) (on llm because flxw(:,:,llm+1)=0)
    124126
    125127      ! tendencies (in */s) from the physics
     
    167169      LOGICAL,SAVE :: firstcal=.true., debut=.true.
    168170!      REAL rdayvrai
    169 
    170       LOGICAL tracerdyn
    171171
    172172c
     
    468468         lafin_split=lafin.and.isplit==nsplit_phys
    469469
    470       if (planet_type=="earth") then
    471 
    472          CALL physiq (ngridmx,
    473      .             llm,
    474      .             debut_split,
    475      .             lafin_split,
    476      .             jD_cur,
    477      .             jH_cur_split,
    478      .             zdt_split,
    479      .             zplev,
    480      .             zplay,
    481      .             zphi,
    482      .             zphis,
    483      .             presnivs,
    484      .             zufi,
    485      .             zvfi, zrfi,
    486      .             ztfi,
    487      .             zqfi,
    488      .             flxwfi,
    489      .             zdufi,
    490      .             zdvfi,
    491      .             zdtfi,
    492      .             zdqfi,
    493      .             zdpsrf,
    494      .             pducov)
    495 
    496       else if ( planet_type=="generic" ) then
    497 
    498          CALL physiq (ngridmx,     !! ngrid
    499      .             llm,            !! nlayer
    500      .             nqtot,          !! nq
    501      .             tname,          !! tracer names from dynamical core (given in infotrac)
    502      .             debut_split,    !! firstcall
    503      .             lafin_split,    !! lastcall
    504      .             jD_cur,         !! pday. see leapfrog
    505      .             jH_cur_split,   !! ptime "fraction of day"
    506      .             zdt_split,      !! ptimestep
    507      .             zplev,          !! pplev
    508      .             zplay,          !! pplay
    509      .             zphi,           !! pphi
    510      .             zufi,           !! pu
    511      .             zvfi,           !! pv
    512      .             ztfi,           !! pt
    513      .             zqfi,           !! pq
    514      .             flxwfi,         !! pw !! or 0. anyway this is for diagnostic. not used in physiq.
    515      .             zdufi,          !! pdu
    516      .             zdvfi,          !! pdv
    517      .             zdtfi,          !! pdt
    518      .             zdqfi,          !! pdq
    519      .             zdpsrf,         !! pdpsrf
    520      .             tracerdyn)      !! tracerdyn <-- utilite ???
    521 
    522       endif ! of if (planet_type=="earth")
     470        CALL call_physiq(ngridmx,llm,nqtot,tname,
     471     &                   debut_split,lafin_split,
     472     &                   jD_cur,jH_cur_split,zdt_split,
     473     &                   zplev,zplay,
     474     &                   zphi,zphis,
     475     &                   presnivs,
     476     &                   zufi,zvfi,zrfi,ztfi,zqfi,
     477     &                   flxwfi,pducov,
     478     &                   zdufi,zdvfi,zdtfi,zdqfi,zdpsrf)
     479                             
     480!      if (planet_type=="earth") then
     481!
     482!         CALL physiq (ngridmx,
     483!     .             llm,
     484!     .             debut_split,
     485!     .             lafin_split,
     486!     .             jD_cur,
     487!     .             jH_cur_split,
     488!     .             zdt_split,
     489!     .             zplev,
     490!     .             zplay,
     491!     .             zphi,
     492!     .             zphis,
     493!     .             presnivs,
     494!     .             zufi,
     495!     .             zvfi, zrfi,
     496!     .             ztfi,
     497!     .             zqfi,
     498!     .             flxwfi,
     499!     .             zdufi,
     500!     .             zdvfi,
     501!     .             zdtfi,
     502!     .             zdqfi,
     503!     .             zdpsrf,
     504!     .             pducov)
     505!
     506!      else if ( planet_type=="generic" ) then
     507!
     508!         CALL physiq (ngridmx,     !! ngrid
     509!     .             llm,            !! nlayer
     510!     .             nqtot,          !! nq
     511!     .             tname,          !! tracer names from dynamical core (given in infotrac)
     512!     .             debut_split,    !! firstcall
     513!     .             lafin_split,    !! lastcall
     514!     .             jD_cur,         !! pday. see leapfrog
     515!     .             jH_cur_split,   !! ptime "fraction of day"
     516!     .             zdt_split,      !! ptimestep
     517!     .             zplev,          !! pplev
     518!     .             zplay,          !! pplay
     519!     .             zphi,           !! pphi
     520!     .             zufi,           !! pu
     521!     .             zvfi,           !! pv
     522!     .             ztfi,           !! pt
     523!     .             zqfi,           !! pq
     524!     .             flxwfi,         !! pw !! or 0. anyway this is for diagnostic. not used in physiq.
     525!     .             zdufi,          !! pdu
     526!     .             zdvfi,          !! pdv
     527!     .             zdtfi,          !! pdt
     528!     .             zdqfi,          !! pdq
     529!     .             zdpsrf,         !! pdpsrf
     530!     .             tracerdyn)      !! tracerdyn <-- utilite ???
     531!
     532!      endif ! of if (planet_type=="earth")
    523533
    524534         zufi(:,:)=zufi(:,:)+zdufi(:,:)*zdt_split
Note: See TracChangeset for help on using the changeset viewer.