! $Id: inifis_mod.f90 5274 2024-10-25 13:41:23Z abarral $ MODULE inifis_mod CONTAINS SUBROUTINE inifis(punjours, prad, pg, pr, pcpp) ! Initialize some physical constants and settings USE init_print_control_mod, ONLY : init_print_control USE print_control_mod, ONLY: lunout USE yomcst_mod_h, ONLY: RPI, RCLUM, RHPLA, RKBOL, RNAVO & , RDAY, REA, REPSM, RSIYEA, RSIDAY, ROMEGA & , R_ecc, R_peri, R_incl & , RA, RG, R1SA & , RSIGMA & , R, RMD, RMV, RD, RV, RCPD & , RMO3, RMCO2, RMC, RMCH4, RMN2O, RMCFC11, RMCFC12 & , RCPV, RCVD, RCVV, RKAPPA, RETV, eps_w & , RCW, RCS & , RLVTT, RLSTT, RLMLT, RTT, RATM & , RESTT, RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS & , RALPD, RBETD, RGAMD IMPLICIT NONE REAL,INTENT(IN) :: prad, pg, pr, pcpp, punjours CHARACTER (LEN=20) :: modname = 'inifis' CHARACTER (LEN=80) :: abort_message ! Initialize flags lunout, prt_level, debug CALL init_print_control ! suphel => initialize some physical constants (orbital parameters, ! geoid, gravity, thermodynamical constants, etc.) in the ! physics CALL suphel ! check that physical constants set in 'suphel' are coherent ! with values set in the dynamics: IF (rday/=punjours) THEN WRITE (lunout, *) 'inifis: length of day discrepancy!!!' WRITE (lunout, *) ' in the dynamics punjours=', punjours WRITE (lunout, *) ' but in the physics RDAY=', rday IF (abs(rday-punjours)>0.01*punjours) THEN ! stop here if the relative difference is more than 1% abort_message = 'length of day discrepancy' CALL abort_physic(modname, abort_message, 1) END IF END IF IF (rg/=pg) THEN WRITE (lunout, *) 'inifis: gravity discrepancy !!!' WRITE (lunout, *) ' in the dynamics pg=', pg WRITE (lunout, *) ' but in the physics RG=', rg IF (abs(rg-pg)>0.01*pg) THEN ! stop here if the relative difference is more than 1% abort_message = 'gravity discrepancy' CALL abort_physic(modname, abort_message, 1) END IF END IF IF (ra/=prad) THEN WRITE (lunout, *) 'inifis: planet radius discrepancy !!!' WRITE (lunout, *) ' in the dynamics prad=', prad WRITE (lunout, *) ' but in the physics RA=', ra IF (abs(ra-prad)>0.01*prad) THEN ! stop here if the relative difference is more than 1% abort_message = 'planet radius discrepancy' CALL abort_physic(modname, abort_message, 1) END IF END IF IF (rd/=pr) THEN WRITE (lunout, *) 'inifis: reduced gas constant discrepancy !!!' WRITE (lunout, *) ' in the dynamics pr=', pr WRITE (lunout, *) ' but in the physics RD=', rd IF (abs(rd-pr)>0.01*pr) THEN ! stop here if the relative difference is more than 1% abort_message = 'reduced gas constant discrepancy' CALL abort_physic(modname, abort_message, 1) END IF END IF IF (rcpd/=pcpp) THEN WRITE (lunout, *) 'inifis: specific heat discrepancy !!!' WRITE (lunout, *) ' in the dynamics pcpp=', pcpp WRITE (lunout, *) ' but in the physics RCPD=', rcpd IF (abs(rcpd-pcpp)>0.01*pcpp) THEN ! stop here if the relative difference is more than 1% abort_message = 'specific heat discrepancy' CALL abort_physic(modname, abort_message, 1) END IF END IF END SUBROUTINE inifis END MODULE inifis_mod