[524] | 1 | ! |
---|
[1403] | 2 | ! $Id: iniconst.f90 5285 2024-10-28 13:33:29Z fhourdin $ |
---|
[524] | 3 | ! |
---|
[1625] | 4 | SUBROUTINE iniconst |
---|
[524] | 5 | |
---|
[5282] | 6 | USE iniprint_mod_h |
---|
[1625] | 7 | USE control_mod |
---|
| 8 | use IOIPSL |
---|
[5267] | 9 | |
---|
[2597] | 10 | USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, & |
---|
| 11 | unsim, pi, r, kappa, cpp, dtvr, dtphys |
---|
[2600] | 12 | USE comvert_mod, ONLY: disvert_type, pressure_exner |
---|
[5282] | 13 | |
---|
[5271] | 14 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
[5285] | 15 | USE paramet_mod_h |
---|
[5271] | 16 | IMPLICIT NONE |
---|
[1625] | 17 | ! |
---|
| 18 | ! P. Le Van |
---|
| 19 | ! |
---|
| 20 | ! Declarations: |
---|
| 21 | ! ------------- |
---|
| 22 | ! |
---|
[5271] | 23 | |
---|
[5272] | 24 | |
---|
[524] | 25 | |
---|
[1625] | 26 | character(len=*),parameter :: modname="iniconst" |
---|
| 27 | character(len=80) :: abort_message |
---|
| 28 | ! |
---|
| 29 | ! |
---|
| 30 | ! |
---|
| 31 | !----------------------------------------------------------------------- |
---|
| 32 | ! dimension des boucles: |
---|
| 33 | ! ---------------------- |
---|
[524] | 34 | |
---|
[1625] | 35 | im = iim |
---|
| 36 | jm = jjm |
---|
| 37 | lllm = llm |
---|
| 38 | imp1 = iim |
---|
| 39 | jmp1 = jjm + 1 |
---|
| 40 | lllmm1 = llm - 1 |
---|
| 41 | lllmp1 = llm + 1 |
---|
[524] | 42 | |
---|
[1625] | 43 | !----------------------------------------------------------------------- |
---|
[524] | 44 | |
---|
[1625] | 45 | dtphys = iphysiq * dtvr |
---|
| 46 | unsim = 1./iim |
---|
| 47 | pi = 2.*ASIN( 1. ) |
---|
[524] | 48 | |
---|
[1625] | 49 | !----------------------------------------------------------------------- |
---|
| 50 | ! |
---|
[524] | 51 | |
---|
[1625] | 52 | r = cpp * kappa |
---|
[524] | 53 | |
---|
[1625] | 54 | write(lunout,*) trim(modname),': R CP Kappa ',r,cpp,kappa |
---|
| 55 | ! |
---|
| 56 | !----------------------------------------------------------------------- |
---|
[524] | 57 | |
---|
[1625] | 58 | ! vertical discretization: default behavior depends on planet_type flag |
---|
| 59 | if (planet_type=="earth") then |
---|
| 60 | disvert_type=1 |
---|
| 61 | else |
---|
| 62 | disvert_type=2 |
---|
| 63 | endif |
---|
| 64 | ! but user can also specify using one or the other in run.def: |
---|
| 65 | call getin('disvert_type',disvert_type) |
---|
| 66 | write(lunout,*) trim(modname),': disvert_type=',disvert_type |
---|
[1520] | 67 | |
---|
[1625] | 68 | pressure_exner = disvert_type == 1 ! default value |
---|
| 69 | call getin('pressure_exner', pressure_exner) |
---|
| 70 | |
---|
| 71 | if (disvert_type==1) then |
---|
| 72 | ! standard case for Earth (automatic generation of levels) |
---|
[2040] | 73 | call disvert() |
---|
[1625] | 74 | else if (disvert_type==2) then |
---|
| 75 | ! standard case for planets (levels generated using z2sig.def file) |
---|
| 76 | call disvert_noterre |
---|
| 77 | else |
---|
| 78 | write(abort_message,*) "Wrong value for disvert_type: ", disvert_type |
---|
| 79 | call abort_gcm(modname,abort_message,0) |
---|
| 80 | endif |
---|
| 81 | |
---|
| 82 | END SUBROUTINE iniconst |
---|