Ignore:
Timestamp:
Jan 16, 2020, 3:25:44 PM (5 years ago)
Author:
dubos
Message:

simple_physics : able to run without plugins

Location:
dynamico_lmdz/simple_physics/phyparam/physics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/simple_physics/phyparam/physics/iniphyparam_mod.F90

    r4229 r4230  
    4343    CALL read_param('Cd_mer',.01      ,Cd_mer,'Cd_mer')
    4444    CALL read_param('Cd_ter',.01      ,Cd_ter,'Cd_ter')
    45     CALL read_param('I_mer',30000.    ,I_mer,'I_mer')
    46     CALL read_param('I_ter',30000.    ,I_ter,'I_ter')
     45    CALL read_param('I_mer',3000.    ,I_mer,'I_mer')
     46    CALL read_param('I_ter',3000.    ,I_ter,'I_ter')
    4747    CALL read_param('alb_ter',.112    ,alb_ter,'alb_ter')
    4848    CALL read_param('alb_mer',.112    ,alb_mer,'alb_mer')
     
    6969    CALL check_mismatch('R', pr, r)
    7070    CALL check_mismatch('cpp', pcpp, cpp)
     71    LOG_WARN('iniphyparam')
    7172
    7273    WRITELOG(*,*) 'Activation de la physique:'
     
    9293    dtphys=ptimestep
    9394
    94     LOG_INFO('iniphyparama')
     95    LOG_INFO('iniphyparam')
    9596  END SUBROUTINE iniphyparam
    9697
     
    99100    REAL, INTENT(IN) :: a,b
    100101    IF(a /= b) THEN
    101        PRINT *, 'Phys/dyn mismatch for ', name, ' : ',a,b
     102       WRITELOG(*,*) 'Phys/dyn mismatch for ', name, ' : ',a,b
    102103    END IF
    103104  END SUBROUTINE check_mismatch
  • dynamico_lmdz/simple_physics/phyparam/physics/logging.F90

    r4229 r4230  
    5050  SUBROUTINE missing_plugin(name, mod)
    5151    CHARACTER(*), INTENT(IN) :: name, mod
    52     PRINT *, 'FATAL : plugin ', name, ' not provided by the driver program'
    53     PRINT *, '        see ', mod
    54     STOP
     52    WRITE(logging_buf(1),*) 'WARNING : plugin ', name, ' not provided by the driver program'
     53    WRITE(logging_buf(2),*) '        see ', mod
     54    logging_lineno=2
     55    CALL flush_log(log_level_warn, 'missing_plugin')
    5556  END SUBROUTINE missing_plugin
    5657
     
    5960    CHARACTER(*), INTENT(IN) :: tag
    6061#ifndef XCODEML
    61     IF(.NOT.ASSOCIATED(flush_plugin)) flush_plugin => default_flush_plugin
     62    IF(.NOT.ASSOCIATED(flush_plugin)) THEN
     63       flush_plugin => default_flush_plugin
     64       WRITE(*,*) 'WARNING : plugin flush_plugin not provided by the driver program'
     65       WRITE(*,*) '        see logging.F90'
     66    END IF
    6267    IF(logging_lineno>0 .AND. lev<=max_log_level) CALL flush_plugin(lev, TRIM(tag), logging_buf(1:logging_lineno))
    6368    logging_lineno=0
     
    7378    WRITE(prefix,*) '[', dbtag(lev), ' ', tag, ']'
    7479    DO i=1, SIZE(buf)
    75        PRINT *, TRIM(prefix), TRIM(buf(i))
     80       WRITE(*,*) TRIM(prefix), TRIM(buf(i))
    7681    END DO
    7782  END SUBROUTINE default_flush_plugin
     
    8186    logging_lineno = logging_lineno+1
    8287#ifndef XCODEML
    83     IF(.NOT.ASSOCIATED(log_gridpoint_plugin)) log_gridpoint_plugin => default_log_gridpoint
     88    IF(.NOT.ASSOCIATED(log_gridpoint_plugin)) THEN
     89       log_gridpoint_plugin => default_log_gridpoint
     90       WRITE(*,*) 'WARNING : plugin log_gridpoint_plugin not provided by the driver program'
     91       WRITE(*,*) '        see logging.F90'
     92    END IF
    8493    CALL log_gridpoint_plugin(index, logging_buf(logging_lineno))
    8594#endif
  • dynamico_lmdz/simple_physics/phyparam/physics/read_param_mod.F90

    r4229 r4230  
    11MODULE read_param_mod
    2   USE logging, ONLY : missing_plugin
     2#include "use_logging.h"
    33  IMPLICIT NONE
    44  PRIVATE
     
    5454    REAL, INTENT(OUT)        :: val
    5555#ifndef XCODEML
    56     IF(.NOT.ASSOCIATED(read_paramr_plugin)) CALL missing_plugin('read_paramr','read_param_mod')
    57     CALL read_paramr_plugin(name, defval, val, comment)
     56    IF(.NOT.ASSOCIATED(read_paramr_plugin)) THEN
     57       CALL missing_plugin('read_paramr','read_param_mod')
     58       val = defval
     59    ELSE
     60       CALL read_paramr_plugin(name, defval, val, comment)
     61    END IF
    5862#endif
     63    WRITELOG(*,*) name, ' = ', val
     64    LOG_INFO('read_param')
    5965  END SUBROUTINE read_paramr
    6066
     
    6470    INTEGER, INTENT(OUT)     :: val
    6571#ifndef XCODEML
    66     IF(.NOT.ASSOCIATED(read_parami_plugin)) CALL missing_plugin('read_parami','read_param_mod')
    67     CALL read_parami_plugin(name, defval, val, comment)
     72    IF(.NOT.ASSOCIATED(read_parami_plugin)) THEN
     73       CALL missing_plugin('read_parami','read_param_mod')
     74       val = defval
     75    ELSE
     76       CALL read_parami_plugin(name, defval, val, comment)
     77    END IF
    6878#endif
     79    WRITELOG(*,*) name, ' = ', val
     80    LOG_INFO('read_param')
    6981  END SUBROUTINE read_parami
    7082
     
    7486    LOGICAL, INTENT(OUT)     :: val
    7587#ifndef XCODEML
    76     IF(.NOT.ASSOCIATED(read_paramr_plugin)) CALL missing_plugin('read_paramb','read_param_mod')
    77     CALL read_paramb_plugin(name, defval, val, comment)
     88    IF(.NOT.ASSOCIATED(read_paramr_plugin)) THEN
     89       CALL missing_plugin('read_paramb','read_param_mod')
     90       val = defval
     91    ELSE
     92       CALL read_paramb_plugin(name, defval, val, comment)
     93    END IF
    7894#endif
     95    WRITELOG(*,*) name, ' = ', val
     96    LOG_INFO('read_param')
    7997  END SUBROUTINE read_paramb
    80 
     98 
    8199END MODULE read_param_mod
Note: See TracChangeset for help on using the changeset viewer.