! $Id: iniconst.F90 5118 2024-07-24 14:39:59Z abarral $ SUBROUTINE iniconst USE control_mod USE IOIPSL USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, & unsim, pi, r, kappa, cpp, dtvr, dtphys USE comvert_mod, ONLY: disvert_type, pressure_exner USE lmdz_iniprint, ONLY: lunout, prt_level IMPLICIT NONE ! P. Le Van ! Declarations: ! ------------- include "dimensions.h" include "paramet.h" CHARACTER(LEN = *), parameter :: modname = "iniconst" CHARACTER(LEN = 80) :: abort_message !----------------------------------------------------------------------- ! dimension des boucles: ! ---------------------- im = iim jm = jjm lllm = llm imp1 = iim jmp1 = jjm + 1 lllmm1 = llm - 1 lllmp1 = llm + 1 !----------------------------------------------------------------------- dtphys = iphysiq * dtvr unsim = 1. / iim pi = 2. * ASIN(1.) !----------------------------------------------------------------------- r = cpp * kappa WRITE(lunout, *) trim(modname), ': R CP Kappa ', r, cpp, kappa !----------------------------------------------------------------------- ! vertical discretization: default behavior depends on planet_type flag IF (planet_type=="earth") THEN disvert_type = 1 else disvert_type = 2 ENDIF ! but user can also specify using one or the other in run.def: CALL getin('disvert_type', disvert_type) WRITE(lunout, *) trim(modname), ': disvert_type=', disvert_type pressure_exner = disvert_type == 1 ! default value CALL getin('pressure_exner', pressure_exner) IF (disvert_type==1) THEN ! standard case for Earth (automatic generation of levels) CALL disvert() ELSE IF (disvert_type==2) THEN ! standard case for planets (levels generated using z2sig.def file) CALL disvert_noterre else WRITE(abort_message, *) "Wrong value for disvert_type: ", disvert_type CALL abort_gcm(modname, abort_message, 0) ENDIF END SUBROUTINE iniconst