Ignore:
Timestamp:
Jun 25, 2015, 9:45:24 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Further modifications to enforce physics/dynamics separation:

  • moved iniprint.h and misc_mod back to dyn3d_common, as these should only be used by dynamics.
  • created print_control_mod in the physics to store flags prt_level, lunout, debug to be local to physics (should be used rather than iniprint.h)
  • created abort_physic.F90 , which does the same job as abort_gcm() did, but should be used instead when in physics.
  • reactivated inifis (turned it into a module, inifis_mod.F90) to initialize physical constants and print_control_mod flags.

EM

File:
1 edited

Legend:

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

    r2137 r2311  
    5454  IMPLICIT NONE
    5555  INCLUDE 'dimensions.h'
    56   include 'iniprint.h'
    5756    REAL,DIMENSION(klon),INTENT(IN) :: rlon
    5857    REAL,DIMENSION(klon),INTENT(IN) :: rlat
     
    571570    INCLUDE "temps.h"
    572571    INCLUDE "clesphys.h"
    573     INCLUDE "iniprint.h"
    574572
    575573    INTEGER                          :: iff
     
    650648                                   nid_files, nhorim, swaero_diag, levmin, &
    651649                                   levmax, nvertm
     650    USE print_control_mod, ONLY: prt_level,lunout
    652651#ifdef CPP_XIOS
    653652    use wxios, only: wxios_add_field_to_file
     
    658657    INCLUDE "temps.h"
    659658    INCLUDE "clesphys.h"
    660     INCLUDE "iniprint.h"
    661659
    662660    INTEGER                          :: iff
     
    728726    use ioipsl, only: getin
    729727    use phys_output_var_mod, only: nfiles
     728    USE print_control_mod, ONLY: prt_level,lunout
    730729    IMPLICIT NONE
    731 
    732     include 'iniprint.h'
    733730
    734731    CHARACTER(LEN=20)                :: nam_var
     
    750747                                jj_nb, klon_mpi
    751748  USE ioipsl, only: histwrite
     749  USE print_control_mod, ONLY: prt_level,lunout
    752750  IMPLICIT NONE
    753751  include 'dimensions.h'
    754   include 'iniprint.h'
    755752   
    756753    integer,INTENT(IN) :: nid
     
    767764
    768765
    769     IF (size(field)/=klon) CALL abort_gcm('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
     766    IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
    770767   
    771768    CALL Gather_omp(field,buffer_omp)   
     
    815812                                jj_nb, klon_mpi
    816813  use ioipsl, only: histwrite
     814  USE print_control_mod, ONLY: prt_level,lunout
    817815  IMPLICIT NONE
    818816  include 'dimensions.h'
    819   include 'iniprint.h'
    820817   
    821818    integer,INTENT(IN) :: nid
     
    831828
    832829
    833     IF (size(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     830    IF (size(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    834831    nlev=size(field,2)
    835832
     
    889886                                 nfiles, vars_defined, clef_stations, &
    890887                                 nid_files
     888  USE print_control_mod, ONLY: prt_level,lunout
    891889#ifdef CPP_XIOS
    892890  USE xios, only: xios_send_field
     
    896894  IMPLICIT NONE
    897895  INCLUDE 'dimensions.h'
    898   INCLUDE 'iniprint.h'
    899896  include 'clesphys.h'
    900897
     
    945942
    946943    !Et sinon on.... écrit
    947     IF (SIZE(field)/=klon) CALL abort_gcm('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
     944    IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
    948945   
    949946    if (prt_level >= 10) then
     
    971968          endif
    972969#else
    973         CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     970        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
    974971#endif
    975972      ELSE 
     
    10521049  USE xios, only: xios_send_field
    10531050#endif
    1054 
     1051  USE print_control_mod, ONLY: prt_level,lunout
    10551052
    10561053  IMPLICIT NONE
    10571054  INCLUDE 'dimensions.h'
    1058   INCLUDE 'iniprint.h'
    10591055  include 'clesphys.h'
    10601056
     
    10951091  ELSE
    10961092    !Et sinon on.... écrit
    1097     IF (SIZE(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     1093    IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    10981094    nlev=SIZE(field,2)
    10991095    if (nlev.eq.klev+1) then
     
    11191115          CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
    11201116#else
    1121         CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     1117        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
    11221118#endif
    11231119      ELSE 
     
    11971193                                jj_nb, klon_mpi
    11981194  USE xios, only: xios_send_field
    1199 
     1195  USE print_control_mod, ONLY: prt_level,lunout
    12001196
    12011197  IMPLICIT NONE
    12021198  INCLUDE 'dimensions.h'
    1203   INCLUDE 'iniprint.h'
    12041199
    12051200    CHARACTER(LEN=*), INTENT(IN) :: field_name
     
    12161211
    12171212    !Et sinon on.... écrit
    1218     IF (SIZE(field)/=klon) CALL abort_gcm('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1)
     1213    IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1)
    12191214   
    12201215    CALL Gather_omp(field,buffer_omp)   
     
    12681263                                jj_nb, klon_mpi
    12691264  USE xios, only: xios_send_field
    1270 
     1265  USE print_control_mod, ONLY: prt_level,lunout
    12711266
    12721267  IMPLICIT NONE
    12731268  INCLUDE 'dimensions.h'
    1274   INCLUDE 'iniprint.h'
    12751269
    12761270    CHARACTER(LEN=*), INTENT(IN) :: field_name
     
    12861280
    12871281    !Et on.... écrit
    1288     IF (SIZE(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     1282    IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    12891283    nlev=SIZE(field,2)
    12901284
Note: See TracChangeset for help on using the changeset viewer.