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