Ignore:
Timestamp:
Aug 21, 2015, 11:57:36 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Physics/dynamics separation:

  • move test_disvert_m to dynlonlat_phylonlat/phylmd since it is only used by ce0l and relies on dynamics.
  • put "config_inca" in tracinca_mod so physics routines can get the info from there rather than from control_mod.
  • get rid of references to "control_mod" from within the physics.

EM

Location:
LMDZ5/trunk/libf/phylmd
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cosp/cosp_output_mod.F90

    r2311 r2345  
    100100  USE ioipsl
    101101  USE phys_cal_mod
     102  USE time_phylmdz_mod, ONLY: day_ref, annee_ref, day_ini, start_time, itau_phy
    102103  USE print_control_mod, ONLY: lunout
    103104
     
    123124
    124125!!! Variables d'entree
    125   include "temps.h"
    126126
    127127#ifdef CPP_XIOS
  • LMDZ5/trunk/libf/phylmd/cosp/cosp_output_write_mod.F90

    r2311 r2345  
    2121
    2222    USE ioipsl
    23     USE control_mod
     23    USE time_phylmdz_mod, ONLY: itau_phy, start_time, day_step_phy
    2424    USE print_control_mod, ONLY: lunout,prt_level
    2525
     
    4545  real, dimension(Npoints,PARASOL_NREFL) :: parasolcrefl, Ncref
    4646
    47   include "temps.h"
    48 
    4947  Nlevout = vgrid%Nlvgrid
    5048  Ncolout = Ncolumns
    5149
    5250! A refaire
    53        itau_wcosp = itau_phy + itap + start_time * day_step / iphysiq
     51       itau_wcosp = itau_phy + itap + start_time * day_step_phy
    5452        if (prt_level >= 10) then
    55              WRITE(lunout,*)'itau_wcosp, itap, start_time, day_step, iphysiq =', &
    56                              itau_wcosp, itap, start_time, day_step, iphysiq
     53             WRITE(lunout,*)'itau_wcosp, itap, start_time, day_step_phy =', &
     54                             itau_wcosp, itap, start_time, day_step_phy
    5755        endif
    5856
     
    268266    use iophy
    269267    USE mod_phys_lmdz_para
     268    USE mod_grid_phy_lmdz, ONLY: nbp_lon
    270269    USE print_control_mod, ONLY: lunout,prt_level
    271270#ifdef CPP_XIOS
     
    275274    IMPLICIT NONE
    276275
    277     INCLUDE "dimensions.h"
    278     INCLUDE "temps.h"
    279276    INCLUDE "clesphys.h"
    280277
     
    320317       IF ( var%cles(iff) ) THEN
    321318          CALL histdef (cosp_nidfiles(iff), var%name, var%description, var%unit, &
    322                iim,jj_nb,nhoricosp(iff), 1,1,1, -99, 32, &
     319               nbp_lon,jj_nb,nhoricosp(iff), 1,1,1, -99, 32, &
    323320               typeecrit, zstophym,zoutm_cosp(iff))
    324321       ENDIF
     
    332329    use iophy
    333330    USE mod_phys_lmdz_para
     331    USE mod_grid_phy_lmdz, ONLY: nbp_lon
    334332    USE print_control_mod, ONLY: lunout,prt_level
    335333
     
    341339    IMPLICIT NONE
    342340
    343     INCLUDE "dimensions.h"
    344     INCLUDE "temps.h"
    345341    INCLUDE "clesphys.h"
    346342
     
    415411       IF ( var%cles(iff) ) THEN
    416412          CALL histdef (cosp_nidfiles(iff), nom, var%description, var%unit, &
    417                iim, jj_nb, nhoricosp(iff), klevs, 1, &
     413               nbp_lon, jj_nb, nhoricosp(iff), klevs, 1, &
    418414               klevs, nvertsave, 32, typeecrit, &
    419415               zstophym, zoutm_cosp(iff))
     
    428424  USE ioipsl
    429425  use iophy
     426  USE mod_grid_phy_lmdz, ONLY: nbp_lon
    430427  USE print_control_mod, ONLY: lunout,prt_level
    431428
     
    435432
    436433  IMPLICIT NONE
    437   INCLUDE 'dimensions.h'
    438434  INCLUDE 'clesphys.h'
    439435
     
    445441    REAL,DIMENSION(klon_mpi) :: buffer_omp
    446442    INTEGER, allocatable, DIMENSION(:) :: index2d
    447     REAL :: Field2d(iim,jj_nb)
     443    REAL :: Field2d(nbp_lon,jj_nb)
    448444    CHARACTER(LEN=20) ::  nomi, nom
    449445    character(len=2) :: str2
     
    477473      DO iff=1, 3
    478474           IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN
    479                 ALLOCATE(index2d(iim*jj_nb))
     475                ALLOCATE(index2d(nbp_lon*jj_nb))
    480476#ifndef CPP_IOIPSL_NO_OUTPUT
    481         CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,iim*jj_nb,index2d)
     477        CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,nbp_lon*jj_nb,index2d)
    482478#endif
    483479                deallocate(index2d)
     
    517513  USE ioipsl
    518514  use iophy
     515  USE mod_grid_phy_lmdz, ONLY: nbp_lon
    519516  USE print_control_mod, ONLY: lunout,prt_level
    520517
     
    525522
    526523  IMPLICIT NONE
    527   INCLUDE 'dimensions.h'
    528524  INCLUDE 'clesphys.h'
    529525
     
    536532
    537533    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    538     REAL :: Field3d(iim,jj_nb,SIZE(field,2))
     534    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    539535    INTEGER :: ip, n, nlev
    540536    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     
    580576     DO iff=1, 3
    581577        IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN
    582            ALLOCATE(index3d(iim*jj_nb*nlev))
     578           ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
    583579#ifndef CPP_IOIPSL_NO_OUTPUT
    584     CALL histwrite(cosp_nidfiles(iff),nom,itau_iocosp,Field3d,iim*jj_nb*nlev,index3d)
     580    CALL histwrite(cosp_nidfiles(iff),nom,itau_iocosp,Field3d,nbp_lon*jj_nb*nlev,index3d)
    585581#endif
    586582
  • LMDZ5/trunk/libf/phylmd/cosp/phys_cosp.F90

    r2137 r2345  
    124124!$OMP THREADPRIVATE(debut_cosp)
    125125
    126   include "dimensions.h"
    127  
    128126!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM
    129127  integer                         :: overlaplmdz   !  overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz)
  • LMDZ5/trunk/libf/phylmd/cpl_mod.F90

    r2344 r2345  
    2424  USE oasis
    2525  USE write_field_phy
    26 !  USE control_mod
    2726  USE time_phylmdz_mod, ONLY: day_step_phy
    2827 
  • LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90

    r2344 r2345  
    2323  USE climb_wind_mod,      ONLY : climb_wind_down, climb_wind_up
    2424  USE coef_diff_turb_mod,  ONLY : coef_diff_turb
    25   USE control_mod
    2625
    2726
  • LMDZ5/trunk/libf/phylmd/phyredem.F90

    r2344 r2345  
    1515  USE traclmdz_mod, ONLY : traclmdz_to_restart
    1616  USE infotrac_phy, ONLY: type_trac, niadv, tname, nbtr, nqo
    17   USE control_mod
    1817  USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send
    1918  USE indice_sol_mod
  • LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90

    r2333 r2345  
    404404SUBROUTINE phys_state_var_init(read_climoz)
    405405USE dimphy
    406 USE control_mod
    407406USE aero_mod
    408407USE infotrac_phy, ONLY : nbtr
     
    589588SUBROUTINE phys_state_var_end
    590589USE dimphy
    591 USE control_mod
    592590USE indice_sol_mod
    593591IMPLICIT NONE
  • LMDZ5/trunk/libf/phylmd/physiq.F90

    r2344 r2345  
    5050  USE time_phylmdz_mod, only: day_step_phy, annee_ref, day_ref, itau_phy, &
    5151                              start_time, pdtphys
    52   USE control_mod, ONLY: config_inca
     52  USE tracinca_mod, ONLY: config_inca
    5353#ifdef CPP_XIOS
    5454  USE wxios, ONLY: missing_val, missing_val_omp
  • LMDZ5/trunk/libf/phylmd/phytrac_mod.F90

    r2344 r2345  
    9797    USE tracinca_mod
    9898    USE tracreprobus_mod
    99     USE control_mod
    10099    USE indice_sol_mod
    101100
  • LMDZ5/trunk/libf/phylmd/read_pstoke.F90

    r2343 r2345  
    1919  USE netcdf
    2020  USE dimphy
    21   USE control_mod
    2221  USE indice_sol_mod
    2322  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
  • LMDZ5/trunk/libf/phylmd/read_pstoke0.F90

    r2343 r2345  
    1818  USE netcdf
    1919  USE dimphy
    20   USE control_mod
    2120  USE indice_sol_mod
    2221  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
  • LMDZ5/trunk/libf/phylmd/regr_pr_o3_m.F90

    r1907 r2345  
    3030    use regr1_step_av_m, only: regr1_step_av
    3131    use press_coefoz_m, only: press_in_edg
    32     use control_mod, only: dayref
     32    use time_phylmdz_mod, only: day_ref
    3333
    3434    REAL, intent(in):: p3d(:, :, :) ! pressure at layer interfaces, in Pa
     
    4949
    5050    real r_mob(jjm + 1, size(press_in_edg) - 1)
    51     ! (ozone mole fraction from Mobidic at day "dayref")
     51    ! (ozone mole fraction from Mobidic at day "day_ref")
    5252    ! (r_mob(j, k) is at latitude "rlatu(j)", in pressure interval
    5353    ! "[press_in_edg(k), press_in_edg(k+1)]".)
     
    6464    call nf95_inq_varid(ncid, "r_Mob", varid)
    6565    ! Get data at the right day from the input file:
    66     ncerr = nf90_get_var(ncid, varid, r_mob, start=(/1, 1, dayref/))
     66    ncerr = nf90_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/))
    6767    call handle_err("nf90_get_var r_Mob", ncerr)
    6868    ! Latitudes are in ascending order in the input file while
  • LMDZ5/trunk/libf/phylmd/rrtm/readaerosolstrato_rrtm.F90

    r2231 r2345  
    99
    1010    USE phys_cal_mod, ONLY : mth_cur
    11     USE mod_grid_phy_lmdz
     11    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid2dTo1d_glo
    1212    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
    1313    USE mod_phys_lmdz_para
     
    2121
    2222    include "YOMCST.h"
    23     include "dimensions.h"
    2423
    2524! Variable input
     
    103102    n_lat = size(latitude)
    104103    print *, 'LAT aerosol strato=', n_lat, latitude
    105     IF (n_lat.NE.jjm+1) THEN
    106        print *,'Le nombre de lat n est pas egal a jjm+1'
     104    IF (n_lat.NE.nbp_lat) THEN
     105       print *,'Le nombre de lat n est pas egal a nbp_lat'
    107106       STOP
    108107    ENDIF
     
    112111    n_lon = size(longitude)
    113112    print *, 'LON aerosol strato=', n_lon, longitude
    114     IF (n_lon.NE.iim) THEN
    115        print *,'Le nombre de lon n est pas egal a iim'
     113    IF (n_lon.NE.nbp_lon) THEN
     114       print *,'Le nombre de lon n est pas egal a nbp_lon'
    116115       STOP
    117116    ENDIF
  • LMDZ5/trunk/libf/phylmd/rrtm/suphec.F90

    r2315 r2345  
    115115#include "suvdfs.intfb.h"
    116116#include "suwcou.intfb.h"
    117 #include "dimensions.h"
    118117
    119118!     ------------------------------------------------------------------
  • LMDZ5/trunk/libf/phylmd/sisvat/surf_sisvat_mod.F90

    r1990 r2345  
    11881188    USE VARxSV         
    11891189    USE VARtSV
    1190     USE control_mod
    11911190    USE indice_sol_mod
    11921191
     
    12011200    include "dimsoil.h"
    12021201    include "clesphys.h"
    1203     include "temps.h"
    12041202    include "thermcell.h"
    12051203    include "compbl.h"
     
    15001498    USE VARySV !hj tmp 12 03 2010
    15011499    USE VARtSV
    1502     USE control_mod
    15031500    USE indice_sol_mod
    15041501
     
    15091506    include "dimsoil.h"
    15101507    include "clesphys.h"
    1511     include "temps.h"
    15121508    include "thermcell.h"
    15131509    include "compbl.h"
  • LMDZ5/trunk/libf/phylmd/tracinca_mod.F90

    r2320 r2345  
    55! This module prepares and calls the INCA main subroutines.
    66!
    7 
     7  IMPLICIT NONE 
     8
     9  CHARACTER(len=4),SAVE :: config_inca
     10!$OMP THREADPRIVATE(config_inca)
     11                     ! config_inca='none' => without INCA
     12                     ! config_inca='chem' => INCA with chemistry
     13                     ! config_inca='aero' => INCA with aerosols
    814CONTAINS
    915
     
    1218
    1319    USE infotrac_phy, ONLY: nbtr
     20    USE ioipsl_getin_p_mod, ONLY: getin_p
    1421    IMPLICIT NONE
    1522   
     
    2229    lessivage  =.FALSE.
    2330    aerosol(:) = .FALSE.
     31
     32    config_inca='none' ! default
     33    CALL getin_p('config_inca',config_inca)
    2434       
    2535  END SUBROUTINE tracinca_init
     
    4555    USE vampir
    4656    USE comgeomphy
    47     USE control_mod
    4857    USE indice_sol_mod
    4958
     
    5160    IMPLICIT NONE
    5261   
    53     INCLUDE "dimensions.h"
    54     INCLUDE "paramet.h"
    55 
    5662!==========================================================================
    5763!                   -- DESCRIPTION DES ARGUMENTS --
Note: See TracChangeset for help on using the changeset viewer.