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

    r2209 r2311  
    151151    IMPLICIT NONE
    152152   
    153     INCLUDE "iniprint.h"
    154 
    155153! In- and ouput arguments
    156154!****************************************************************************************
     
    195193       IF ( type_ocean /= 'couple' ) THEN
    196194          ALLOCATE(pctsrf(klon,nbsrf), sst(klon), stat=ierr)
    197           IF (ierr /= 0) CALL abort_gcm(modname, 'PB in allocating pctsrf and sst',1)
     195          IF (ierr /= 0) CALL abort_physic(modname, 'PB in allocating pctsrf and sst',1)
    198196       END IF
    199197
    200198       IF ( .NOT. ok_veget ) THEN
    201199          ALLOCATE(rugos(klon), albedo(klon), stat=ierr)
    202           IF (ierr /= 0) CALL abort_gcm(modname, 'PB in allocating rugos and albedo',1)
     200          IF (ierr /= 0) CALL abort_physic(modname, 'PB in allocating rugos and albedo',1)
    203201       END IF
    204202
     
    220218
    221219          ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid)
    222           IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,&
     220          IF (ierr /= NF90_NOERR) CALL abort_physic(modname,&
    223221               'Pb d''ouverture du fichier de conditions aux limites',1)
    224222         
     
    239237! Ocean fraction
    240238             ierr = NF90_INQ_VARID(nid, 'FOCE', nvarid)
    241              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname, 'Le champ <FOCE> est absent',1)
     239             IF (ierr /= NF90_NOERR) CALL abort_physic(modname, 'Le champ <FOCE> est absent',1)
    242240             
    243241             ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_oce),start,epais)
    244              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <FOCE>' ,1)
     242             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FOCE>' ,1)
    245243!
    246244! Sea-ice fraction
    247245             ierr = NF90_INQ_VARID(nid, 'FSIC', nvarid)
    248              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <FSIC> est absent',1)
     246             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FSIC> est absent',1)
    249247
    250248             ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_sic),start,epais)
    251              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <FSIC>' ,1)
     249             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FSIC>' ,1)
    252250
    253251
     
    257255! Land fraction
    258256                ierr = NF90_INQ_VARID(nid, 'FTER', nvarid)
    259                 IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <FTER> est absent',1)
     257                IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FTER> est absent',1)
    260258               
    261259                ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_ter),start,epais)
    262                 IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <FTER>',1)
     260                IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FTER>',1)
    263261!
    264262! Continentale ice fraction
    265263                ierr = NF90_INQ_VARID(nid, 'FLIC', nvarid)
    266                 IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <FLIC> est absent',1)
     264                IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FLIC> est absent',1)
    267265
    268266                ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_lic),start,epais)
    269                 IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <FLIC>',1)
     267                IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FLIC>',1)
    270268             END IF
    271269
     
    279277
    280278             ierr = NF90_INQ_VARID(nid, 'SST', nvarid)
    281              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <SST> est absent',1)
     279             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <SST> est absent',1)
    282280
    283281             ierr = NF90_GET_VAR(nid,nvarid,sst_glo,start,epais)
    284              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <SST>',1)
     282             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <SST>',1)
    285283         
    286284          END IF
     
    295293! Read albedo
    296294             ierr = NF90_INQ_VARID(nid, 'ALB', nvarid)
    297              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <ALB> est absent',1)
     295             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <ALB> est absent',1)
    298296
    299297             ierr = NF90_GET_VAR(nid,nvarid,alb_glo,start,epais)
    300              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <ALB>',1)
     298             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <ALB>',1)
    301299!
    302300! Read rugosity
    303301             ierr = NF90_INQ_VARID(nid, 'RUG', nvarid)
    304              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Le champ <RUG> est absent',1)
     302             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <RUG> est absent',1)
    305303
    306304             ierr = NF90_GET_VAR(nid,nvarid,rug_glo,start,epais)
    307              IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Lecture echouee pour <RUG>',1)
     305             IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <RUG>',1)
    308306
    309307          END IF
     
    314312!****************************************************************************************
    315313          ierr = NF90_CLOSE(nid)
    316           IF (ierr /= NF90_NOERR) CALL abort_gcm(modname,'Pb when closing file', 1)
     314          IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Pb when closing file', 1)
    317315       ENDIF ! is_mpi_root
    318316
Note: See TracChangeset for help on using the changeset viewer.