[5099] | 1 | |
---|
[1279] | 2 | ! $Id: getparam.F90 5116 2024-07-24 12:54:37Z abarral $ |
---|
[5099] | 3 | |
---|
[524] | 4 | MODULE getparam |
---|
| 5 | USE IOIPSL |
---|
[1279] | 6 | |
---|
[524] | 7 | INTERFACE getpar |
---|
[2094] | 8 | MODULE PROCEDURE getparamr,getparami,getparaml |
---|
[524] | 9 | END INTERFACE |
---|
[5113] | 10 | PRIVATE getparamr,getparami,getparaml |
---|
[524] | 11 | |
---|
| 12 | INTEGER, PARAMETER :: out_eff=99 |
---|
| 13 | |
---|
| 14 | CONTAINS |
---|
| 15 | SUBROUTINE ini_getparam(fichier) |
---|
[5099] | 16 | |
---|
[524] | 17 | IMPLICIT NONE |
---|
[5099] | 18 | |
---|
[524] | 19 | CHARACTER*(*) :: fichier |
---|
| 20 | open(out_eff,file=fichier,status='unknown',form='formatted') |
---|
| 21 | END SUBROUTINE ini_getparam |
---|
| 22 | |
---|
| 23 | SUBROUTINE fin_getparam |
---|
[5099] | 24 | |
---|
[524] | 25 | IMPLICIT NONE |
---|
[5099] | 26 | |
---|
[524] | 27 | close(out_eff) |
---|
| 28 | |
---|
| 29 | END SUBROUTINE fin_getparam |
---|
| 30 | |
---|
| 31 | SUBROUTINE getparamr(TARGET,def_val,ret_val,comment) |
---|
[5099] | 32 | |
---|
[524] | 33 | IMPLICIT NONE |
---|
[5099] | 34 | |
---|
[524] | 35 | ! Get a real scalar. We first check if we find it |
---|
| 36 | ! in the database and if not we get it from the run.def |
---|
[5099] | 37 | |
---|
[524] | 38 | ! getinr1d and getinr2d are written on the same pattern |
---|
[5099] | 39 | |
---|
[524] | 40 | CHARACTER*(*) :: TARGET |
---|
| 41 | REAL :: def_val |
---|
| 42 | REAL :: ret_val |
---|
| 43 | CHARACTER*(*) :: comment |
---|
| 44 | |
---|
| 45 | ret_val=def_val |
---|
[5101] | 46 | CALL getin(TARGET,ret_val) |
---|
[524] | 47 | |
---|
[5116] | 48 | WRITE(out_eff,*) '######################################' |
---|
| 49 | WRITE(out_eff,*) '#### ',comment,' #####' |
---|
| 50 | WRITE(out_eff,*) TARGET,'=',ret_val |
---|
[524] | 51 | |
---|
| 52 | END SUBROUTINE getparamr |
---|
| 53 | |
---|
| 54 | SUBROUTINE getparami(TARGET,def_val,ret_val,comment) |
---|
[5099] | 55 | |
---|
[524] | 56 | IMPLICIT NONE |
---|
[5099] | 57 | |
---|
[524] | 58 | ! Get a real scalar. We first check if we find it |
---|
| 59 | ! in the database and if not we get it from the run.def |
---|
[5099] | 60 | |
---|
[524] | 61 | ! getinr1d and getinr2d are written on the same pattern |
---|
[5099] | 62 | |
---|
[524] | 63 | CHARACTER*(*) :: TARGET |
---|
| 64 | INTEGER :: def_val |
---|
| 65 | INTEGER :: ret_val |
---|
| 66 | CHARACTER*(*) :: comment |
---|
| 67 | |
---|
| 68 | ret_val=def_val |
---|
[5101] | 69 | CALL getin(TARGET,ret_val) |
---|
[524] | 70 | |
---|
[5116] | 71 | WRITE(out_eff,*) '######################################' |
---|
| 72 | WRITE(out_eff,*) '#### ',comment,' #####' |
---|
| 73 | WRITE(out_eff,*) comment |
---|
| 74 | WRITE(out_eff,*) TARGET,'=',ret_val |
---|
[524] | 75 | |
---|
| 76 | END SUBROUTINE getparami |
---|
| 77 | |
---|
| 78 | SUBROUTINE getparaml(TARGET,def_val,ret_val,comment) |
---|
[5099] | 79 | |
---|
[524] | 80 | IMPLICIT NONE |
---|
[5099] | 81 | |
---|
[524] | 82 | ! Get a real scalar. We first check if we find it |
---|
| 83 | ! in the database and if not we get it from the run.def |
---|
[5099] | 84 | |
---|
[524] | 85 | ! getinr1d and getinr2d are written on the same pattern |
---|
[5099] | 86 | |
---|
[524] | 87 | CHARACTER*(*) :: TARGET |
---|
| 88 | LOGICAL :: def_val |
---|
| 89 | LOGICAL :: ret_val |
---|
| 90 | CHARACTER*(*) :: comment |
---|
| 91 | |
---|
| 92 | ret_val=def_val |
---|
[5101] | 93 | CALL getin(TARGET,ret_val) |
---|
[524] | 94 | |
---|
[5116] | 95 | WRITE(out_eff,*) '######################################' |
---|
| 96 | WRITE(out_eff,*) '#### ',comment,' #####' |
---|
| 97 | WRITE(out_eff,*) TARGET,'=',ret_val |
---|
[524] | 98 | |
---|
| 99 | END SUBROUTINE getparaml |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | END MODULE getparam |
---|