Changeset 2277 for trunk/MESOSCALE


Ignore:
Timestamp:
Apr 6, 2020, 11:50:23 AM (5 years ago)
Author:
mlefevre
Message:

MESOSCALE. Updates of physics interface for Venus, prescribed and void physics.

Location:
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/callphysiq_mod.F

    r1751 r2277  
    1313
    1414SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,                       &
    15                        debut_split,lafin_split,                           &
    16                        jD_cur,jH_cur_split,zdt_split,                     &
    17                        zplev_omp,zplay_omp,                               &
    18                        zpk_omp,zphi_omp,zphis_omp,                        &
    19                        presnivs_omp,                                      &
    20                        zufi_omp,zvfi_omp,zrfi_omp,ztfi_omp,zqfi_omp,      &
    21                        flxwfi_omp,                                        &
    22                        zdufi_omp,zdvfi_omp,zdtfi_omp,zdqfi_omp,zdpsrf_omp)
     15                       debut_split,lafin_split)
     16
     17  USE variables_mod
    2318
    2419  IMPLICIT NONE
     
    3025  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3126  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
    32   REAL,INTENT(IN) :: JD_cur ! Julian day
    33   REAL,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)
    34   REAL,INTENT(IN) :: zdt_split ! time step over which the physics are evaluated
    35   REAL,INTENT(IN) :: zplev_omp(klon,llm+1) ! interlayer pressure (Pa)
    36   REAL,INTENT(IN) :: zplay_omp(klon,llm) ! mid-layer pressure (Pa)
    37   REAL,INTENT(INOUT) :: zpk_omp(klon,llm)
    38   REAL,INTENT(IN) :: zphi_omp(klon,llm) ! geopotential at midlayer
    39   REAL,INTENT(INOUT) :: zphis_omp(klon) ! surface geopotential
    40   REAL,INTENT(INOUT) :: presnivs_omp(llm) ! approximate pressure of atm. layers
    41   REAL,INTENT(IN) :: zufi_omp(klon,llm) ! zonal wind (m/s)
    42   REAL,INTENT(IN) :: zvfi_omp(klon,llm) ! meridional wind (m/s)
    43   REAL,INTENT(INOUT) :: zrfi_omp(klon,llm) ! relative wind vorticity, in s-1
    44   REAL,INTENT(IN) :: ztfi_omp(klon,llm) ! temperature (K)
    45   REAL,INTENT(IN) :: zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)
    46   REAL,INTENT(IN) :: flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s)
    47   ! tendencies (in */s) from the physics:
    48   REAL,INTENT(OUT) :: zdufi_omp(klon,llm) ! tendency on zonal winds
    49   REAL,INTENT(OUT) :: zdvfi_omp(klon,llm) ! tendency on meridional winds
    50   REAL,INTENT(OUT) :: zdtfi_omp(klon,llm) ! tendency on temperature
    51   REAL,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
    52   REAL,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure
    5327  ! data file
    5428  INTEGER :: i,k
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/iniphysiq_mod.F

    r1603 r2277  
    33CONTAINS
    44
    5 subroutine iniphysiq(ngrid,nlayer,nq,phour_ini,piphysiq,&
    6                      punjours, pdayref,ptimestep, &
     5subroutine iniphysiq(ngrid,nlayer,nq,piphysiq,&
     6                     punjours, pdayref, &
    77                     prad,pg,pr,pcpp,iflag_phys)
    88
     
    1515real,intent(in) :: punjours ! length (in s) of a standard day [daysec]
    1616integer,intent(in) :: pdayref ! reference day of for the simulation [day_ini]
    17 real,intent(in) :: ptimestep !physics time step (s) [dtphys]
    1817integer,intent(in) :: iflag_phys ! type of physics to be called
    1918
     
    2120integer,intent(in) :: nlayer ! number of atmospheric layers
    2221integer,intent(in) :: nq ! number of tracers
    23 real,intent(in) :: phour_ini   ! start time (fraction of day) of the run 0=<phour_ini<1
    2422real,intent(in) :: piphysiq   ! call physics every piphysiq dynamical timesteps
    2523
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/update_inputs_physiq_mod.F

    r1634 r2277  
    1919            elaps,&
    2020            lct_input,lon_input,ls_input,&
    21             ptime,pday,MY)
     21            MY)
    2222
    2323  INTEGER, INTENT(IN) :: JULDAY, JULYR
    2424  REAL, INTENT(IN) :: GMT,elaps,lon_input,ls_input,lct_input
    25   REAL,INTENT(OUT) :: pday,ptime,MY
     25  REAL,INTENT(OUT) :: MY
    2626
    2727END SUBROUTINE update_inputs_physiq_time
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/update_outputs_physiq_mod.F

    r2018 r2277  
    8787     HR_SW,HR_LW,RDUST,VMR_ICE,RICE,CLOUDFRAC,HR_DYN,DT,DTRAD,RAIN,SNOW,&
    8888     LSCEZ,H2OICE_REFF
     89   REAL, DIMENSION(kms:kme) :: phr_sw,phr_lw,phr_dyn
    8990   INTEGER :: i,j,subs
    9091
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/variables_mod.F

    r1845 r2277  
    22
    33IMPLICIT NONE
     4
     5REAL*8 :: JD_cur !pday !JD_cur ! Julian day
     6REAL*8 :: JH_cur_split !ptime !JH_cur_split ! Julian hour (fraction of day)
     7REAL*8 :: zdt_split !ptimestep !zdt_split ! time step over which the physics are evaluated
     8REAL*8 :: phour_ini ! start time (fraction of day) of the run 0=<phour_ini<1
     9REAL*8 :: counter
     10REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplev_omp !pplev !zplev_omp(klon,llm+1) ! interlayer pressure (Pa)
     11REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplay_omp !pplay !zplay_omp(klon,llm) ! mid-layer pressure (Pa)
     12REAL*8,DIMENSION(:,:),ALLOCATABLE :: zpk_omp!(klon,llm)
     13REAL*8,DIMENSION(:,:),ALLOCATABLE :: zphi_omp !pphi !zphi_omp(klon,llm) ! geopotential at midlayer
     14REAL*8,DIMENSION(:),ALLOCATABLE :: zphis_omp!(klon) ! surface geopotential
     15REAL*8,DIMENSION(:),ALLOCATABLE :: presnivs_omp!(llm) ! approximate pressure of atm. layers
     16REAL*8,DIMENSION(:,:),ALLOCATABLE :: zufi_omp !pu !zufi_omp(klon,llm) ! zonal wind (m/s)
     17REAL*8,DIMENSION(:,:),ALLOCATABLE :: zvfi_omp !pv !zvfi_omp(klon,llm) ! meridional wind (m/s)
     18REAL*8,DIMENSION(:,:),ALLOCATABLE :: zrfi_omp!(klon,llm) ! relative wind vorticity, in s-1
     19REAL*8,DIMENSION(:,:),ALLOCATABLE :: ztfi_omp !pt !ztfi_omp(klon,llm) ! temperature (K)
     20REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zqfi_omp !pq !zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)
     21REAL*8,DIMENSION(:,:),ALLOCATABLE :: flxwfi_omp !flxw !flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s)  ! tendencies (in */s) from the physics:
     22REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdufi_omp !pdu !zdufi_omp(klon,llm) ! tendency on zonal winds
     23REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdvfi_omp !pdv !zdvfi_omp(klon,llm) ! tendency on meridional winds
     24REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdtfi_omp !pdt !zdtfi_omp(klon,llm) ! tendency on temperature
     25REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zdqfi_omp !pdq !zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
     26REAL*8,DIMENSION(:),ALLOCATABLE :: zdpsrf_omp !pdpsrf !zdpsrf_omp(klon) !tendency on surface pressure
     27REAL*8,DIMENSION(:,:),ALLOCATABLE :: hrlw,hrsw
    428
    529CONTAINS
     
    832
    933  IMPLICIT NONE
    10  
     34
    1135  INTEGER,INTENT(IN) :: klon ! (local) number of atmospheric columns
    1236  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    1337  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    14  
     38
     39  IF (.NOT.ALLOCATED(zplev_omp)) ALLOCATE(zplev_omp(klon,llm+1))
     40  IF (.NOT.ALLOCATED(zplay_omp)) ALLOCATE(zplay_omp(klon,llm))
     41  IF (.NOT.ALLOCATED(zpk_omp)) ALLOCATE(zpk_omp(klon,llm))
     42  IF (.NOT.ALLOCATED(zphi_omp)) ALLOCATE(zphi_omp(klon,llm))
     43  IF (.NOT.ALLOCATED(zphis_omp)) ALLOCATE(zphis_omp(klon))
     44  IF (.NOT.ALLOCATED(presnivs_omp)) ALLOCATE(presnivs_omp(llm))
     45  IF (.NOT.ALLOCATED(zufi_omp)) ALLOCATE(zufi_omp(klon,llm))
     46  IF (.NOT.ALLOCATED(zvfi_omp)) ALLOCATE(zvfi_omp(klon,llm))
     47  IF (.NOT.ALLOCATED(zrfi_omp)) ALLOCATE(zrfi_omp(klon,llm))
     48  IF (.NOT.ALLOCATED(ztfi_omp)) ALLOCATE(ztfi_omp(klon,llm))
     49  IF (.NOT.ALLOCATED(zqfi_omp)) ALLOCATE(zqfi_omp(klon,llm,nqtot))
     50  IF (.NOT.ALLOCATED(flxwfi_omp)) ALLOCATE(flxwfi_omp(klon,llm))
     51  IF (.NOT.ALLOCATED(zdufi_omp)) ALLOCATE(zdufi_omp(klon,llm))
     52  IF (.NOT.ALLOCATED(zdvfi_omp)) ALLOCATE(zdvfi_omp(klon,llm))
     53  IF (.NOT.ALLOCATED(zdtfi_omp)) ALLOCATE(zdtfi_omp(klon,llm))
     54  IF (.NOT.ALLOCATED(zdqfi_omp)) ALLOCATE(zdqfi_omp(klon,llm,nqtot))
     55  IF (.NOT.ALLOCATED(zdpsrf_omp)) ALLOCATE(zdpsrf_omp(klon))
     56  IF (.NOT.ALLOCATED(hrlw)) ALLOCATE(hrlw(klon,llm))
     57  IF (.NOT.ALLOCATED(hrsw)) ALLOCATE(hrsw(klon,llm))
     58
    1559END SUBROUTINE allocate_interface
    1660
    1761SUBROUTINE deallocate_interface
    1862
     63  DEALLOCATE(zplev_omp)
     64  DEALLOCATE(zplay_omp)
     65  DEALLOCATE(zpk_omp)
     66  DEALLOCATE(zphi_omp)
     67  DEALLOCATE(zphis_omp)
     68  DEALLOCATE(presnivs_omp)
     69  DEALLOCATE(zufi_omp)
     70  DEALLOCATE(zvfi_omp)
     71  DEALLOCATE(zrfi_omp)
     72  DEALLOCATE(ztfi_omp)
     73  DEALLOCATE(zqfi_omp)
     74  DEALLOCATE(flxwfi_omp)
     75  DEALLOCATE(zdufi_omp)
     76  DEALLOCATE(zdvfi_omp)
     77  DEALLOCATE(zdtfi_omp)
     78  DEALLOCATE(zdqfi_omp)
     79  DEALLOCATE(zdpsrf_omp)
     80  DEALLOCATE(hrlw)
     81  DEALLOCATE(hrsw)
     82
    1983END SUBROUTINE deallocate_interface
    2084
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/callphysiq_mod.F

    r1755 r2277  
    1818  USE physiq_mod, ONLY: physiq
    1919  USE module_model_constants, only : p0,rcp,cp
    20   use moyzon_mod, only: tmoy
    2120  IMPLICIT NONE
    2221
     
    8180              zqfi_omp,       &
    8281              flxwfi_omp,     &
    83               zplevmoy,       &
    84               ztmoy,          &
    8582              zdufi_omp,      &
    8683              zdvfi_omp,      &
     
    8885              zdqfi_omp,      &
    8986              zdpsrf_omp)
    90    deallocate(tmoy)
    9187END SUBROUTINE call_physiq
    9288
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/iniphysiq_mod.F

    r1755 r2277  
    6262      call init_dimphy(ngrid,nlayer)
    6363
    64       Call phys_state_var_init     
     64      Call phys_state_var_init(nq)
    6565      ! allocate "surfdat_h" arrays
    6666      !call ini_surfdat_h(ngrid,nq)
     
    7979
    8080      ! Initialize some physical constants
    81       call suphec
     81      call suphec(pcpp)
    8282
    8383      cpp=pcpp
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/update_inputs_physiq_mod.F

    r2021 r2277  
    6060    JH_cur_split = JH_cur_split / 2808.
    6161    print*,'JH_cur_split',JH_cur_split
     62    JD_cur = INT((3700*(lct_input - lon_input / 15.) +elaps)/88800)
    6263    JD_cur = MODULO(int(JD_cur),669)
    6364    MY = 2024
     
    7071SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE)
    7172
    72   use infotrac, only: nqtot,tname
     73  use infotrac_phy, only: nqtot,tname
    7374  use logic_mod, only: iflag_trac
    7475  implicit none
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/callphysiq_mod.F

    r1634 r2277  
    1313
    1414SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,                       &
    15                        debut_split,lafin_split,                           &
    16                        jD_cur,jH_cur_split,zdt_split,                     &
    17                        zplev_omp,zplay_omp,                               &
    18                        zpk_omp,zphi_omp,zphis_omp,                        &
    19                        presnivs_omp,                                      &
    20                        zufi_omp,zvfi_omp,zrfi_omp,ztfi_omp,zqfi_omp,      &
    21                        flxwfi_omp,                                        &
    22                        zdufi_omp,zdvfi_omp,zdtfi_omp,zdqfi_omp,zdpsrf_omp)
     15                       debut_split,lafin_split)
     16
     17  USE variables_mod
    2318
    2419  IMPLICIT NONE
    2520
    2621  character(len=10),INTENT(IN) :: planet_type ! planet type ('earth','mars',...)
    27 
    2822  INTEGER,INTENT(IN) :: klon ! (local) number of atmospheric columns
    2923  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
     
    3125  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3226  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
    33   REAL,INTENT(IN) :: JD_cur ! Julian day
    34   REAL,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)
    35   REAL,INTENT(IN) :: zdt_split ! time step over which the physics are evaluated
    36   REAL,INTENT(IN) :: zplev_omp(klon,llm+1) ! interlayer pressure (Pa)
    37   REAL,INTENT(IN) :: zplay_omp(klon,llm) ! mid-layer pressure (Pa)
    38   REAL,INTENT(INOUT) :: zpk_omp(klon,llm)
    39   REAL,INTENT(IN) :: zphi_omp(klon,llm) ! geopotential at midlayer
    40   REAL,INTENT(INOUT) :: zphis_omp(klon) ! surface geopotential
    41   REAL,INTENT(INOUT) :: presnivs_omp(llm) ! approximate pressure of atm. layers
    42   REAL,INTENT(IN) :: zufi_omp(klon,llm) ! zonal wind (m/s)
    43   REAL,INTENT(IN) :: zvfi_omp(klon,llm) ! meridional wind (m/s)
    44   REAL,INTENT(INOUT) :: zrfi_omp(klon,llm) ! relative wind vorticity, in s-1
    45   REAL,INTENT(IN) :: ztfi_omp(klon,llm) ! temperature (K)
    46   REAL,INTENT(IN) :: zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)
    47   REAL,INTENT(IN) :: flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s)
    48   ! tendencies (in */s) from the physics:
    49   REAL,INTENT(OUT) :: zdufi_omp(klon,llm) ! tendency on zonal winds
    50   REAL,INTENT(OUT) :: zdvfi_omp(klon,llm) ! tendency on meridional winds
    51   REAL,INTENT(OUT) :: zdtfi_omp(klon,llm) ! tendency on temperature
    52   REAL,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
    53   REAL,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure
    5427
    5528END SUBROUTINE call_physiq
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/iniphysiq_mod.F

    r1590 r2277  
    33CONTAINS
    44
    5 subroutine iniphysiq(ngrid,nlayer,nq,phour_ini,piphysiq,&
    6                      punjours, pdayref,ptimestep, &
     5subroutine iniphysiq(ngrid,nlayer,nq,piphysiq,&
     6                     punjours, pdayref, &
    77                     prad,pg,pr,pcpp,iflag_phys)
    88
     
    1515real,intent(in) :: punjours ! length (in s) of a standard day [daysec]
    1616integer,intent(in) :: pdayref ! reference day of for the simulation [day_ini]
    17 real,intent(in) :: ptimestep !physics time step (s) [dtphys]
    1817integer,intent(in) :: iflag_phys ! type of physics to be called
    1918
     
    2120integer,intent(in) :: nlayer ! number of atmospheric layers
    2221integer,intent(in) :: nq ! number of tracers
    23 real,intent(in) :: phour_ini   ! start time (fraction of day) of the run 0=<phour_ini<1
    2422real,intent(in) :: piphysiq   ! call physics every piphysiq dynamical timesteps
    2523
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_inputs_physiq_mod.F

    r1634 r2277  
    1919            elaps,&
    2020            lct_input,lon_input,ls_input,&
    21             ptime,pday,MY)
     21            MY)
    2222
    2323  INTEGER, INTENT(IN) :: JULDAY, JULYR
    2424  REAL, INTENT(IN) :: GMT,elaps,lon_input,ls_input,lct_input
    25   REAL,INTENT(OUT) :: pday,ptime,MY
     25  REAL,INTENT(OUT) :: MY
    2626
    2727END SUBROUTINE update_inputs_physiq_time
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_outputs_physiq_mod.F

    r1738 r2277  
    7171            SWDOWNZ,TAU_DUST,QSURFDUST,&
    7272            MTOT,ICETOT,TAU_ICE,&
    73             HR_SW,HR_LW,HR_DYN,DT,DTRAD,DTVDF,DTAJS,&
    74             RDUST,VMR_ICE,RICE)
     73            HR_SW,HR_LW,HR_DYN,DT,DTRAD,&
     74            RDUST,VMR_ICE,RICE,&
     75            CLOUDFRAC,TOTCLOUDFRAC,&
     76            RAIN,SNOW,REEVAP,SURFRAIN,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
     77            FLUXSURF_LW,FLXGRD,LSCEZ,H2OICE_REFF,LATENT_HF)
    7578
    7679   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
     
    7881   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: &
    7982     SWDOWNZ,TAU_DUST,QSURFDUST,&
    80      MTOT,ICETOT,TAU_ICE
     83     MTOT,ICETOT,TAU_ICE,&
     84     TOTCLOUDFRAC,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
     85     FLUXSURF_LW,FLXGRD,LATENT_HF,REEVAP,SURFRAIN
    8186   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &
    82      HR_SW,HR_LW,HR_DYN,RDUST,VMR_ICE,RICE,DT,DTRAD,DTVDF,DTAJS
     87     HR_SW,HR_LW,RDUST,VMR_ICE,RICE,CLOUDFRAC,HR_DYN,DT,DTRAD,RAIN,SNOW,&
     88     LSCEZ,H2OICE_REFF
    8389   INTEGER :: i,j,subs
    8490
    8591END SUBROUTINE update_outputs_physiq_diag
    86 
    8792
    8893END MODULE update_outputs_physiq_mod
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/variables_mod.F

    r1845 r2277  
    22
    33IMPLICIT NONE
     4
     5REAL*8 :: JD_cur !pday !JD_cur ! Julian day
     6REAL*8 :: JH_cur_split !ptime !JH_cur_split ! Julian hour (fraction of day)
     7REAL*8 :: zdt_split !ptimestep !zdt_split ! time step over which the physics are evaluated
     8REAL*8 :: phour_ini ! start time (fraction of day) of the run 0=<phour_ini<1
     9REAL*8 :: counter
     10REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplev_omp !pplev !zplev_omp(klon,llm+1) ! interlayer pressure (Pa)
     11REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplay_omp !pplay !zplay_omp(klon,llm) ! mid-layer pressure (Pa)
     12REAL*8,DIMENSION(:,:),ALLOCATABLE :: zpk_omp!(klon,llm)
     13REAL*8,DIMENSION(:,:),ALLOCATABLE :: zphi_omp !pphi !zphi_omp(klon,llm) ! geopotential at midlayer
     14REAL*8,DIMENSION(:),ALLOCATABLE :: zphis_omp!(klon) ! surface geopotential
     15REAL*8,DIMENSION(:),ALLOCATABLE :: presnivs_omp!(llm) ! approximate pressure of atm. layers
     16REAL*8,DIMENSION(:,:),ALLOCATABLE :: zufi_omp !pu !zufi_omp(klon,llm) ! zonal wind (m/s)
     17REAL*8,DIMENSION(:,:),ALLOCATABLE :: zvfi_omp !pv !zvfi_omp(klon,llm) ! meridional wind (m/s)
     18REAL*8,DIMENSION(:,:),ALLOCATABLE :: zrfi_omp!(klon,llm) ! relative wind vorticity, in s-1
     19REAL*8,DIMENSION(:,:),ALLOCATABLE :: ztfi_omp !pt !ztfi_omp(klon,llm) ! temperature (K)
     20REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zqfi_omp !pq !zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)
     21REAL*8,DIMENSION(:,:),ALLOCATABLE :: flxwfi_omp !flxw !flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s)  ! tendencies (in */s) from the physics:
     22REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdufi_omp !pdu !zdufi_omp(klon,llm) ! tendency on zonal winds
     23REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdvfi_omp !pdv !zdvfi_omp(klon,llm) ! tendency on meridional winds
     24REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdtfi_omp !pdt !zdtfi_omp(klon,llm) ! tendency on temperature
     25REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zdqfi_omp !pdq !zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
     26REAL*8,DIMENSION(:),ALLOCATABLE :: zdpsrf_omp !pdpsrf !zdpsrf_omp(klon) !tendency on surface pressure
     27REAL*8,DIMENSION(:,:),ALLOCATABLE :: hrlw,hrsw
    428
    529CONTAINS
     
    832
    933  IMPLICIT NONE
    10  
     34
    1135  INTEGER,INTENT(IN) :: klon ! (local) number of atmospheric columns
    1236  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    1337  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    14  
     38
     39  IF (.NOT.ALLOCATED(zplev_omp)) ALLOCATE(zplev_omp(klon,llm+1))
     40  IF (.NOT.ALLOCATED(zplay_omp)) ALLOCATE(zplay_omp(klon,llm))
     41  IF (.NOT.ALLOCATED(zpk_omp)) ALLOCATE(zpk_omp(klon,llm))
     42  IF (.NOT.ALLOCATED(zphi_omp)) ALLOCATE(zphi_omp(klon,llm))
     43  IF (.NOT.ALLOCATED(zphis_omp)) ALLOCATE(zphis_omp(klon))
     44  IF (.NOT.ALLOCATED(presnivs_omp)) ALLOCATE(presnivs_omp(llm))
     45  IF (.NOT.ALLOCATED(zufi_omp)) ALLOCATE(zufi_omp(klon,llm))
     46  IF (.NOT.ALLOCATED(zvfi_omp)) ALLOCATE(zvfi_omp(klon,llm))
     47  IF (.NOT.ALLOCATED(zrfi_omp)) ALLOCATE(zrfi_omp(klon,llm))
     48  IF (.NOT.ALLOCATED(ztfi_omp)) ALLOCATE(ztfi_omp(klon,llm))
     49  IF (.NOT.ALLOCATED(zqfi_omp)) ALLOCATE(zqfi_omp(klon,llm,nqtot))
     50  IF (.NOT.ALLOCATED(flxwfi_omp)) ALLOCATE(flxwfi_omp(klon,llm))
     51  IF (.NOT.ALLOCATED(zdufi_omp)) ALLOCATE(zdufi_omp(klon,llm))
     52  IF (.NOT.ALLOCATED(zdvfi_omp)) ALLOCATE(zdvfi_omp(klon,llm))
     53  IF (.NOT.ALLOCATED(zdtfi_omp)) ALLOCATE(zdtfi_omp(klon,llm))
     54  IF (.NOT.ALLOCATED(zdqfi_omp)) ALLOCATE(zdqfi_omp(klon,llm,nqtot))
     55  IF (.NOT.ALLOCATED(zdpsrf_omp)) ALLOCATE(zdpsrf_omp(klon))
     56  IF (.NOT.ALLOCATED(hrlw)) ALLOCATE(hrlw(klon,llm))
     57  IF (.NOT.ALLOCATED(hrsw)) ALLOCATE(hrsw(klon,llm))
     58
    1559END SUBROUTINE allocate_interface
    1660
    1761SUBROUTINE deallocate_interface
    1862
     63  DEALLOCATE(zplev_omp)
     64  DEALLOCATE(zplay_omp)
     65  DEALLOCATE(zpk_omp)
     66  DEALLOCATE(zphi_omp)
     67  DEALLOCATE(zphis_omp)
     68  DEALLOCATE(presnivs_omp)
     69  DEALLOCATE(zufi_omp)
     70  DEALLOCATE(zvfi_omp)
     71  DEALLOCATE(zrfi_omp)
     72  DEALLOCATE(ztfi_omp)
     73  DEALLOCATE(zqfi_omp)
     74  DEALLOCATE(flxwfi_omp)
     75  DEALLOCATE(zdufi_omp)
     76  DEALLOCATE(zdvfi_omp)
     77  DEALLOCATE(zdtfi_omp)
     78  DEALLOCATE(zdqfi_omp)
     79  DEALLOCATE(zdpsrf_omp)
     80  DEALLOCATE(hrlw)
     81  DEALLOCATE(hrsw)
     82
    1983END SUBROUTINE deallocate_interface
    2084
Note: See TracChangeset for help on using the changeset viewer.