[1989] | 1 | SUBROUTINE SUCST(KULOUT,KDAT,KSSS,KPRINTLEV) |
---|
| 2 | |
---|
| 3 | !**** *SUCST * - Routine to initialize the constants of the model. |
---|
| 4 | |
---|
| 5 | ! Purpose. |
---|
| 6 | ! -------- |
---|
| 7 | ! Initialize and print the common YOMCST + initialize |
---|
| 8 | ! date and time of YOMRIP. |
---|
| 9 | |
---|
| 10 | !** Interface. |
---|
| 11 | ! ---------- |
---|
| 12 | ! *CALL* *SUCST (..) |
---|
| 13 | |
---|
| 14 | ! Explicit arguments : |
---|
| 15 | ! -------------------- |
---|
| 16 | |
---|
| 17 | ! KULOUT - logical unit for the output |
---|
| 18 | ! KDAT - date in the form AAAAMMDD |
---|
| 19 | ! KSSS - number of seconds in the day |
---|
| 20 | ! KPRINTLEV - printing level |
---|
| 21 | |
---|
| 22 | ! Implicit arguments : |
---|
| 23 | ! -------------------- |
---|
| 24 | ! COMMON YOMCST |
---|
| 25 | ! COMMON YOMRIP |
---|
| 26 | |
---|
| 27 | ! Method. |
---|
| 28 | ! ------- |
---|
| 29 | ! See documentation |
---|
| 30 | |
---|
| 31 | ! Externals. |
---|
| 32 | ! ---------- |
---|
| 33 | |
---|
| 34 | ! Reference. |
---|
| 35 | ! ---------- |
---|
| 36 | ! ECMWF Research Department documentation of the IFS |
---|
| 37 | |
---|
| 38 | ! Author. |
---|
| 39 | ! ------- |
---|
| 40 | ! Mats Hamrud and Philippe Courtier *ECMWF* |
---|
| 41 | |
---|
| 42 | ! Modifications. |
---|
| 43 | ! -------------- |
---|
| 44 | ! Original : 87-10-15 |
---|
| 45 | ! Additions : 90-07-30 (J.-F. Geleyn) |
---|
| 46 | ! 91-11-15 (M. Deque) |
---|
| 47 | ! 96-08-12 M.Hamrud - Reduce printing |
---|
| 48 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
| 49 | ! ------------------------------------------------------------------ |
---|
| 50 | |
---|
| 51 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 52 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 53 | |
---|
| 54 | USE YOMCST , ONLY : RPI ,RCLUM ,RHPLA ,RKBOL ,& |
---|
| 55 | & RNAVO ,RDAY ,REA ,REPSM ,RSIYEA ,& |
---|
| 56 | & RSIDAY ,ROMEGA ,RA ,RG ,R1SA ,& |
---|
| 57 | & RSIGMA ,RI0 ,R ,RMD ,RMV ,& |
---|
| 58 | & RMO3 ,RD ,RV ,RCPD ,RCPV ,& |
---|
| 59 | & RMCO2 ,RMCH4 ,RMN2O ,RMCO ,RMHCHO ,& |
---|
| 60 | & RMSO2 ,RMNO2 ,RMSF6 ,RMRA ,& |
---|
| 61 | & RCVD ,RCVV ,RKAPPA ,RETV ,RCW ,& |
---|
| 62 | & RCS ,RLVTT ,RLSTT ,RLVZER ,RLSZER ,& |
---|
| 63 | & RLMLT ,RTT ,RATM ,RDT ,RESTT ,& |
---|
| 64 | & RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,& |
---|
| 65 | & RGAMS ,RALPD ,RBETD ,RGAMD |
---|
| 66 | USE YOMRIP , ONLY : RTIMST ,RTIMTR |
---|
| 67 | |
---|
| 68 | IMPLICIT NONE |
---|
| 69 | |
---|
| 70 | INTEGER(KIND=JPIM),INTENT(IN) :: KULOUT |
---|
| 71 | INTEGER(KIND=JPIM),INTENT(IN) :: KDAT |
---|
| 72 | INTEGER(KIND=JPIM),INTENT(IN) :: KSSS |
---|
| 73 | INTEGER(KIND=JPIM),INTENT(IN) :: KPRINTLEV |
---|
| 74 | INTEGER(KIND=JPIM) :: IA, ID, IDAT, IM, ISSS, J |
---|
| 75 | |
---|
| 76 | REAL(KIND=JPRB) :: ZDE, ZET, ZJU, ZRS, ZRSREL, ZTETA, ZTI |
---|
| 77 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 78 | |
---|
| 79 | #include "fctast.h" |
---|
| 80 | #include "fcttrm.h" |
---|
| 81 | #include "fcttim.h" |
---|
| 82 | ! ----------------------------------------------------------------- |
---|
| 83 | |
---|
| 84 | !* 1. DEFINE FUNDAMENTAL CONSTANTS. |
---|
| 85 | ! ----------------------------- |
---|
| 86 | |
---|
| 87 | print*,'DANS SUCST CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC' |
---|
| 88 | IF (LHOOK) CALL DR_HOOK('SUCST',0,ZHOOK_HANDLE) |
---|
| 89 | RPI=2.0_JPRB*ASIN(1.0_JPRB) |
---|
| 90 | RCLUM=299792458._JPRB |
---|
| 91 | RHPLA=6.6260755E-34_JPRB |
---|
| 92 | RKBOL=1.380658E-23_JPRB |
---|
| 93 | RNAVO=6.0221367E+23_JPRB |
---|
| 94 | |
---|
| 95 | ! ------------------------------------------------------------------ |
---|
| 96 | |
---|
| 97 | !* 2. DEFINE ASTRONOMICAL CONSTANTS. |
---|
| 98 | ! ------------------------------ |
---|
| 99 | |
---|
| 100 | RDAY=86400._JPRB |
---|
| 101 | REA=149597870000._JPRB |
---|
| 102 | REPSM=0.409093_JPRB |
---|
| 103 | |
---|
| 104 | RSIYEA=365.25_JPRB*RDAY*2.0_JPRB*RPI/6.283076_JPRB |
---|
| 105 | RSIDAY=RDAY/(1.0_JPRB+RDAY/RSIYEA) |
---|
| 106 | ROMEGA=2.0_JPRB*RPI/RSIDAY |
---|
| 107 | |
---|
| 108 | IDAT=KDAT |
---|
| 109 | ISSS=KSSS |
---|
| 110 | ID=NDD(IDAT) |
---|
| 111 | IM=NMM(IDAT) |
---|
| 112 | IA=NCCAA(IDAT) |
---|
| 113 | ZJU=RJUDAT(IA,IM,ID) |
---|
| 114 | ZTI=RTIME(IA,IM,ID,ISSS) |
---|
| 115 | RTIMST=ZTI |
---|
| 116 | RTIMTR=ZTI |
---|
| 117 | ZTETA=RTETA(ZTI) |
---|
| 118 | ZRS=RRS(ZTETA) |
---|
| 119 | ZDE=RDS(ZTETA) |
---|
| 120 | ZET=RET(ZTETA) |
---|
| 121 | ZRSREL=ZRS/REA |
---|
| 122 | |
---|
| 123 | ! ------------------------------------------------------------------ |
---|
| 124 | |
---|
| 125 | !* 3. DEFINE GEOIDE. |
---|
| 126 | ! -------------- |
---|
| 127 | |
---|
| 128 | RG=9.80665_JPRB |
---|
| 129 | RA=6371229._JPRB |
---|
| 130 | R1SA=REAL(1.0_JPRB/REAL(RA,KIND(1.0_JPRB)),KIND(R1SA)) |
---|
| 131 | |
---|
| 132 | ! ------------------------------------------------------------------ |
---|
| 133 | |
---|
| 134 | !* 4. DEFINE RADIATION CONSTANTS. |
---|
| 135 | ! --------------------------- |
---|
| 136 | |
---|
| 137 | RSIGMA=2.0_JPRB * RPI**5 * RKBOL**4 /(15._JPRB* RCLUM**2 * RHPLA**3) |
---|
| 138 | RI0=1370._JPRB |
---|
| 139 | |
---|
| 140 | ! ------------------------------------------------------------------ |
---|
| 141 | |
---|
| 142 | !* 5. DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE. |
---|
| 143 | ! ------------------------------------------ |
---|
| 144 | |
---|
| 145 | R=RNAVO*RKBOL |
---|
| 146 | RMD=28.9644_JPRB |
---|
| 147 | RMV=18.0153_JPRB |
---|
| 148 | RMO3=47.9942_JPRB |
---|
| 149 | RD=1000._JPRB*R/RMD |
---|
| 150 | RV=1000._JPRB*R/RMV |
---|
| 151 | RCPD=3.5_JPRB*RD |
---|
| 152 | RCVD=RCPD-RD |
---|
| 153 | RCPV=4._JPRB *RV |
---|
| 154 | RCVV=RCPV-RV |
---|
| 155 | RKAPPA=RD/RCPD |
---|
| 156 | RETV=RV/RD-1.0_JPRB |
---|
| 157 | RMCO2=44.0095_JPRB |
---|
| 158 | RMCH4=16.04_JPRB |
---|
| 159 | RMN2O=44.013_JPRB |
---|
| 160 | RMSF6=146.05_JPRB |
---|
| 161 | RMRA=222._JPRB |
---|
| 162 | RMCO=28.01_JPRB |
---|
| 163 | RMHCHO=30.03_JPRB |
---|
| 164 | RMNO2=46.01_JPRB |
---|
| 165 | RMSO2=64.07_JPRB |
---|
| 166 | |
---|
| 167 | ! ------------------------------------------------------------------ |
---|
| 168 | |
---|
| 169 | !* 6. DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE. |
---|
| 170 | ! --------------------------------------------- |
---|
| 171 | |
---|
| 172 | RCW=4218._JPRB |
---|
| 173 | |
---|
| 174 | ! ------------------------------------------------------------------ |
---|
| 175 | |
---|
| 176 | !* 7. DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE. |
---|
| 177 | ! -------------------------------------------- |
---|
| 178 | |
---|
| 179 | RCS=2106._JPRB |
---|
| 180 | |
---|
| 181 | ! ------------------------------------------------------------------ |
---|
| 182 | |
---|
| 183 | !* 8. DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE. |
---|
| 184 | ! ---------------------------------------------------- |
---|
| 185 | |
---|
| 186 | RTT=273.16_JPRB |
---|
| 187 | RDT=11.82_JPRB |
---|
| 188 | RLVTT=2.5008E+6_JPRB |
---|
| 189 | RLSTT=2.8345E+6_JPRB |
---|
| 190 | RLVZER=RLVTT+RTT*(RCW-RCPV) |
---|
| 191 | RLSZER=RLSTT+RTT*(RCS-RCPV) |
---|
| 192 | RLMLT=RLSTT-RLVTT |
---|
| 193 | RATM=100000._JPRB |
---|
| 194 | |
---|
| 195 | ! ------------------------------------------------------------------ |
---|
| 196 | |
---|
| 197 | !* 9. SATURATED VAPOUR PRESSURE. |
---|
| 198 | ! -------------------------- |
---|
| 199 | |
---|
| 200 | RESTT=611.14_JPRB |
---|
| 201 | RGAMW=(RCW-RCPV)/RV |
---|
| 202 | RBETW=RLVTT/RV+RGAMW*RTT |
---|
| 203 | RALPW=LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT) |
---|
| 204 | print *,'SUCST: RESTT,RBETW,RTT,RGAMW',RESTT,RBETW,RTT,RGAMW |
---|
| 205 | print *,'SUCST: RALPW',RALPW |
---|
| 206 | RGAMS=(RCS-RCPV)/RV |
---|
| 207 | RBETS=RLSTT/RV+RGAMS*RTT |
---|
| 208 | RALPS=LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT) |
---|
| 209 | print *,'SUCST: RESTT,RBETS,RTT,RGAMS',RESTT,RBETS,RTT,RGAMS |
---|
| 210 | print *,'SUCST: RALPS',RALPS |
---|
| 211 | RGAMS=(RCS-RCPV)/RV |
---|
| 212 | RGAMD=RGAMS-RGAMW |
---|
| 213 | RBETD=RBETS-RBETW |
---|
| 214 | RALPD=RALPS-RALPW |
---|
| 215 | |
---|
| 216 | ! ------------------------------------------------------------------ |
---|
| 217 | |
---|
| 218 | !* 10. PRINTS |
---|
| 219 | |
---|
| 220 | print*,'KPRINTLEV ',KPRINTLEV |
---|
| 221 | print*,'KULOUT ',KULOUT |
---|
| 222 | |
---|
| 223 | IF (KPRINTLEV >= 1) THEN |
---|
| 224 | WRITE(KULOUT,'(''0*** Constants of the ICM ***'')') |
---|
| 225 | WRITE(KULOUT,'('' *** Fundamental constants ***'')') |
---|
| 226 | WRITE(KULOUT,'('' PI = '',E13.7,'' -'')')RPI |
---|
| 227 | WRITE(KULOUT,'('' c = '',E13.7,''m s-1'')')RCLUM |
---|
| 228 | WRITE(KULOUT,'('' h = '',E13.7,''J s'')')RHPLA |
---|
| 229 | WRITE(KULOUT,'('' K = '',E13.7,''J K-1'')')RKBOL |
---|
| 230 | WRITE(KULOUT,'('' N = '',E13.7,''mol-1'')')RNAVO |
---|
| 231 | WRITE(KULOUT,'('' *** Astronomical constants ***'')') |
---|
| 232 | WRITE(KULOUT,'('' day = '',E13.7,'' s'')')RDAY |
---|
| 233 | WRITE(KULOUT,'('' half g. axis = '',E13.7,'' m'')')REA |
---|
| 234 | WRITE(KULOUT,'('' mean anomaly = '',E13.7,'' -'')')REPSM |
---|
| 235 | WRITE(KULOUT,'('' sideral year = '',E13.7,'' s'')')RSIYEA |
---|
| 236 | WRITE(KULOUT,'('' sideral day = '',E13.7,'' s'')')RSIDAY |
---|
| 237 | WRITE(KULOUT,'('' omega = '',E13.7,'' s-1'')')ROMEGA |
---|
| 238 | |
---|
| 239 | WRITE(KULOUT,'('' The initial date of the run is :'')') |
---|
| 240 | WRITE(KULOUT,'(1X,I8,1X,I5,5X,I4,1X,I2,1X,I2)')IDAT,ISSS,IA,IM,ID |
---|
| 241 | WRITE(KULOUT,'('' The Julian date is : '',F11.2)') ZJU |
---|
| 242 | WRITE(KULOUT,'('' Time of the model : '',F15.2,'' s'')')ZTI |
---|
| 243 | WRITE(KULOUT,'('' Distance Earth-Sun : '',E13.7,'' m'')')ZRS |
---|
| 244 | WRITE(KULOUT,'('' Relative Dist. E-S : '',E13.7,'' m'')')ZRSREL |
---|
| 245 | WRITE(KULOUT,'('' Declination : '',F12.5)') ZDE |
---|
| 246 | WRITE(KULOUT,'('' Eq. of time : '',F12.5,'' s'')')ZET |
---|
| 247 | WRITE(KULOUT,'('' *** Geoide ***'')') |
---|
| 248 | WRITE(KULOUT,'('' Gravity = '',E13.7,'' m s-2'')')RG |
---|
| 249 | WRITE(KULOUT,'('' Earth radius = '',E13.7,'' m'')')RA |
---|
| 250 | WRITE(KULOUT,'('' Inverse E.R. = '',E13.7,'' m'')')R1SA |
---|
| 251 | WRITE(KULOUT,'('' *** Radiation ***'')') |
---|
| 252 | WRITE(KULOUT,'('' Stefan-Bol. = '',E13.7,'' W m-2 K-4'')') RSIGMA |
---|
| 253 | WRITE(KULOUT,'('' Solar const. = '',E13.7,'' W m-2'')')RI0 |
---|
| 254 | WRITE(KULOUT,'('' *** Thermodynamic, gas ***'')') |
---|
| 255 | WRITE(KULOUT,'('' Perfect gas = '',e13.7)') R |
---|
| 256 | WRITE(KULOUT,'('' Dry air mass = '',e13.7)') RMD |
---|
| 257 | WRITE(KULOUT,'('' Vapour mass = '',e13.7)') RMV |
---|
| 258 | WRITE(KULOUT,'('' Ozone mass = '',e13.7)') RMO3 |
---|
| 259 | WRITE(KULOUT,'('' Dry air cst. = '',e13.7)') RD |
---|
| 260 | WRITE(KULOUT,'('' Vapour cst. = '',e13.7)') RV |
---|
| 261 | WRITE(KULOUT,'('' Cpd = '',e13.7)') RCPD |
---|
| 262 | WRITE(KULOUT,'('' Cvd = '',e13.7)') RCVD |
---|
| 263 | WRITE(KULOUT,'('' Cpv = '',e13.7)') RCPV |
---|
| 264 | WRITE(KULOUT,'('' Cvv = '',e13.7)') RCVV |
---|
| 265 | WRITE(KULOUT,'('' Rd/Cpd = '',e13.7)') RKAPPA |
---|
| 266 | WRITE(KULOUT,'('' Rv/Rd-1 = '',e13.7)') RETV |
---|
| 267 | WRITE(KULOUT,'('' *** Thermodynamic, liquid ***'')') |
---|
| 268 | WRITE(KULOUT,'('' Cw = '',E13.7)') RCW |
---|
| 269 | WRITE(KULOUT,'('' *** thermodynamic, solid ***'')') |
---|
| 270 | WRITE(KULOUT,'('' Cs = '',E13.7)') RCS |
---|
| 271 | WRITE(KULOUT,'('' *** Thermodynamic, trans. ***'')') |
---|
| 272 | WRITE(KULOUT,'('' Fusion point = '',E13.7)') RTT |
---|
| 273 | WRITE(KULOUT,'('' RTT-Tx(ew-ei) = '',E13.7)') RDT |
---|
| 274 | WRITE(KULOUT,'('' RLvTt = '',E13.7)') RLVTT |
---|
| 275 | WRITE(KULOUT,'('' RLsTt = '',E13.7)') RLSTT |
---|
| 276 | WRITE(KULOUT,'('' RLv0 = '',E13.7)') RLVZER |
---|
| 277 | WRITE(KULOUT,'('' RLs0 = '',E13.7)') RLSZER |
---|
| 278 | WRITE(KULOUT,'('' RLMlt = '',E13.7)') RLMLT |
---|
| 279 | WRITE(KULOUT,'('' Normal press. = '',E13.7)') RATM |
---|
| 280 | WRITE(KULOUT,'('' Latent heat : '')') |
---|
| 281 | WRITE(KULOUT,'(10(1X,E10.4))') (10._JPRB*J,J=-4,4) |
---|
| 282 | WRITE(KULOUT,'(10(1X,E10.4))') (RLV(RTT+10._JPRB*J),J=-4,4) |
---|
| 283 | WRITE(KULOUT,'(10(1X,E10.4))') (RLS(RTT+10._JPRB*J),J=-4,4) |
---|
| 284 | WRITE(KULOUT,'('' *** Thermodynamic, satur. ***'')') |
---|
| 285 | WRITE(KULOUT,'('' Fusion point = '',E13.7)') RTT |
---|
| 286 | WRITE(KULOUT,'('' es(Tt) = '',e13.7)') RESTT |
---|
| 287 | WRITE(KULOUT,'('' es(T) : '')') |
---|
| 288 | WRITE(KULOUT,'(10(1X,E10.4))') (10._JPRB*J,J=-4,4) |
---|
| 289 | WRITE(KULOUT,'(10(1X,E10.4))') (ESW(RTT+10._JPRB*J),J=-4,4) |
---|
| 290 | WRITE(KULOUT,'(10(1X,E10.4))') (ESS(RTT+10._JPRB*J),J=-4,4) |
---|
| 291 | call flush() !!!!! A REVOIR (MPL) les 7 lignes qui suivent |
---|
| 292 | do j=1,9 |
---|
| 293 | print*,'TEST J',j |
---|
| 294 | print*,'RTT...',RTT+10._JPRB*(J-5) |
---|
| 295 | print*,'ES(RTT...',ES(RTT+10._JPRB*(J-5)) |
---|
| 296 | enddo |
---|
| 297 | call flush() |
---|
| 298 | |
---|
| 299 | WRITE(KULOUT,'(10(1X,E10.4))') (ES (RTT+10._JPRB*J),J=-4,4) |
---|
| 300 | ENDIF |
---|
| 301 | |
---|
| 302 | ! ------------------------------------------------------------------ |
---|
| 303 | |
---|
| 304 | IF (LHOOK) CALL DR_HOOK('SUCST',1,ZHOOK_HANDLE) |
---|
| 305 | END SUBROUTINE SUCST |
---|
| 306 | |
---|