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/physiq.F90

    r2309 r2311  
    2121  USE mod_phys_lmdz_para
    2222  USE iophy
    23   USE misc_mod, mydebug=>debug
     23  USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
    2424  USE vampir
    2525  USE pbl_surface_mod, ONLY : pbl_surface
     
    121121  include "clesphys.h"
    122122  include "temps.h"
    123   include "iniprint.h"
    124123  include "thermcell.h"
    125124  !======================================================================
     
    10601059     IF (iflag_con.EQ.2.AND.iflag_cld_th.GT.-1) THEN
    10611060        abort_message = 'Tiedtke needs iflag_cld_th=-2 or -1'
    1062         CALL abort_gcm (modname,abort_message,1)
     1061        CALL abort_physic (modname,abort_message,1)
    10631062     ENDIF
    10641063     !
     
    11191118             pdtphys
    11201119        abort_message='Pas physique n est pas correct '
    1121         !           call abort_gcm(modname,abort_message,1)
     1120        !           call abort_physic(modname,abort_message,1)
    11221121        dtime=pdtphys
    11231122     ENDIF
     
    11261125             klon
    11271126        abort_message='nlon et klon ne sont pas coherents'
    1128         call abort_gcm(modname,abort_message,1)
     1127        call abort_physic(modname,abort_message,1)
    11291128     ENDIF
    11301129     IF (nlev .NE. klev) THEN
     
    11321131             klev
    11331132        abort_message='nlev et klev ne sont pas coherents'
    1134         call abort_gcm(modname,abort_message,1)
     1133        call abort_physic(modname,abort_message,1)
    11351134     ENDIF
    11361135     !
     
    11391138        WRITE(lunout,*)"Au minimum 4 appels par jour si cycle diurne"
    11401139        abort_message='Nbre d appels au rayonnement insuffisant'
    1141         call abort_gcm(modname,abort_message,1)
     1140        call abort_physic(modname,abort_message,1)
    11421141     ENDIF
    11431142     WRITE(lunout,*)"Clef pour la convection, iflag_con=", iflag_con
     
    11941193           IF(nCFMIP.GT.npCFMIP) THEN
    11951194              print*,'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler'
    1196               call abort_gcm("physiq", "", 1)
     1195              call abort_physic("physiq", "", 1)
    11971196           else
    11981197              print*,'physiq npCFMIP=',npCFMIP,'nCFMIP=',nCFMIP
     
    16991698        IF (read_climoz/=-1) THEN
    17001699           abort_message ='read_climoz=-1 is recommended when solarlong0=1000.'
    1701            CALL abort_gcm (modname,abort_message,1)
     1700           CALL abort_physic (modname,abort_message,1)
    17021701        ENDIF
    17031702     ELSE
     
    20962095  IF (iflag_con.EQ.1) THEN
    20972096     abort_message ='reactiver le call conlmd dans physiq.F'
    2098      CALL abort_gcm (modname,abort_message,1)
     2097     CALL abort_physic (modname,abort_message,1)
    20992098     !     CALL conlmd (dtime, paprs, pplay, t_seri, q_seri, conv_q,
    21002099     !    .             d_t_con, d_q_con,
     
    22642263           else
    22652264       abort_message ='Ne pas passer la car www non calcule'
    2266        CALL abort_gcm (modname,abort_message,1)
     2265       CALL abort_physic (modname,abort_message,1)
    22672266
    22682267!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    24562455  ELSE
    24572456     WRITE(lunout,*) "iflag_con non-prevu", iflag_con
    2458      call abort_gcm("physiq", "", 1)
     2457     call abort_physic("physiq", "", 1)
    24592458  ENDIF
    24602459
     
    31233122           IF (aerosol_couple .AND. config_inca == 'aero' ) THEN
    31243123            abort_message='config_inca=aero et rrtm=1 impossible'
    3125             call abort_gcm(modname,abort_message,1)
     3124            call abort_physic(modname,abort_message,1)
    31263125           ELSE
    31273126!
     
    31383137
    31393138              abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    3140               call abort_gcm(modname,abort_message,1)
     3139              call abort_physic(modname,abort_message,1)
    31413140#endif
    31423141              !
     
    31713170
    31723171           abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    3173            call abort_gcm(modname,abort_message,1)
     3172           call abort_physic(modname,abort_message,1)
    31743173#endif
    31753174        ENDIF
     
    34003399        IF (ok_cdnc.AND.NRADLP.NE.3) THEN
    34013400           abort_message='RRTM choix incoherent NRADLP doit etre egal a 3 pour ok_cdnc'
    3402            call abort_gcm(modname,abort_message,1)
     3401           call abort_physic(modname,abort_message,1)
    34033402        endif
    34043403#else
    34053404
    34063405        abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    3407         call abort_gcm(modname,abort_message,1)
     3406        call abort_physic(modname,abort_message,1)
    34083407#endif
    34093408     ENDIF
     
    42924291    IF (abortphy==1) THEN
    42934292       abort_message ='Plantage hgardfou'
    4294        CALL abort_gcm (modname,abort_message,1)
     4293       CALL abort_physic (modname,abort_message,1)
    42954294    ENDIF
    42964295
Note: See TracChangeset for help on using the changeset viewer.