[135] | 1 | c======================================================================= |
---|
| 2 | SUBROUTINE tabfi(nid,Lmodif,tab0,day_ini,lmax,p_rad, |
---|
| 3 | . p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time) |
---|
| 4 | c======================================================================= |
---|
| 5 | c |
---|
| 6 | c C. Hourdin 15/11/96 |
---|
| 7 | c |
---|
| 8 | c Object: Lecture du tab_cntrl physique dans un fichier |
---|
| 9 | c ------ et initialisation des constantes physiques |
---|
| 10 | c |
---|
| 11 | c Arguments: |
---|
| 12 | c ---------- |
---|
| 13 | c |
---|
| 14 | c Inputs: |
---|
| 15 | c ------ |
---|
| 16 | c |
---|
| 17 | c - nid: unitne logique du fichier ou on va lire le tab_cntrl |
---|
| 18 | c (ouvert dans le programme appellant) |
---|
| 19 | c |
---|
| 20 | c si nid=0: |
---|
| 21 | c pas de lecture du tab_cntrl mais |
---|
| 22 | c Valeurs par default des constantes physiques |
---|
| 23 | c |
---|
| 24 | c - tab0: Offset de tab_cntrl a partir duquel sont ranges |
---|
| 25 | c les parametres physiques (50 pour start_archive) |
---|
| 26 | c |
---|
| 27 | c - Lmodif: si on souhaite modifier les constantes Lmodif = 1 = TRUE |
---|
| 28 | c |
---|
| 29 | c |
---|
| 30 | c Outputs: |
---|
| 31 | c -------- |
---|
| 32 | c |
---|
| 33 | c - day_ini: tab_cntrl(tab0+3) (Dans les cas ou l'on souhaite |
---|
| 34 | c comparer avec le day_ini dynamique) |
---|
| 35 | c |
---|
| 36 | c - lmax: tab_cntrl(tab0+2) (pour test avec nlayermx) |
---|
| 37 | c |
---|
| 38 | c - p_rad |
---|
| 39 | c - p_omeg ! |
---|
| 40 | c - p_g ! Constantes physiques ayant des |
---|
| 41 | c - p_mugaz ! homonymes dynamiques |
---|
| 42 | c - p_daysec ! |
---|
| 43 | c |
---|
| 44 | c======================================================================= |
---|
| 45 | ! to use 'getin' |
---|
| 46 | use ioipsl_getincom |
---|
| 47 | use radcommon_h, only: tauvis |
---|
| 48 | |
---|
| 49 | implicit none |
---|
| 50 | |
---|
| 51 | #include "dimensions.h" |
---|
| 52 | #include "dimphys.h" |
---|
| 53 | #include "comcstfi.h" |
---|
| 54 | #include "comgeomfi.h" |
---|
| 55 | #include "planete.h" |
---|
| 56 | #include "surfdat.h" |
---|
| 57 | #include "comsoil.h" |
---|
| 58 | #include "netcdf.inc" |
---|
| 59 | #include "callkeys.h" |
---|
| 60 | |
---|
| 61 | c----------------------------------------------------------------------- |
---|
| 62 | c Declarations |
---|
| 63 | c----------------------------------------------------------------------- |
---|
| 64 | |
---|
| 65 | c Arguments |
---|
| 66 | c --------- |
---|
| 67 | INTEGER nid,nvarid,tab0 |
---|
| 68 | INTEGER*4 day_ini |
---|
| 69 | INTEGER Lmodif |
---|
| 70 | INTEGER lmax |
---|
| 71 | REAL p_rad,p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time |
---|
| 72 | |
---|
| 73 | c Variables |
---|
| 74 | c --------- |
---|
| 75 | INTEGER length |
---|
| 76 | parameter (length = 100) |
---|
| 77 | REAL tab_cntrl(length) ! array in which are stored the run's parameters |
---|
| 78 | INTEGER ierr |
---|
| 79 | INTEGER size |
---|
| 80 | CHARACTER modif*20 |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | c----------------------------------------------------------------------- |
---|
| 84 | c Initialization of various physical constants to defaut values (nid = 0 case) |
---|
| 85 | c----------------------------------------------------------------------- |
---|
| 86 | IF (nid.eq.0) then |
---|
| 87 | |
---|
| 88 | c Reference pressure |
---|
| 89 | c------------------------------------- |
---|
| 90 | c pressrf = 670. ! Pression de reference (Pa) ~650 |
---|
| 91 | |
---|
| 92 | c Default (Martian) parameters for the dynamics and physics |
---|
| 93 | c---------------------------------------------------------- |
---|
| 94 | rad=3397200. ! radius of Mars (m) ~3397200 m |
---|
| 95 | daysec=88775. ! length of a sol (s) ~88775 s |
---|
| 96 | omeg=4.*asin(1.)/(daysec) ! rotation rate (rad.s-1) |
---|
| 97 | g=3.72 ! gravity (m.s-2) ~3.72 |
---|
| 98 | mugaz=43.49 ! Molar mass of the atmosphere (g.mol-1) ~43.49 |
---|
| 99 | rcp=.256793 ! = r/cp ~0.256793 |
---|
| 100 | |
---|
| 101 | c Default (Martian) parameters for physics only |
---|
| 102 | c---------------------------------------------- |
---|
| 103 | year_day = 669. ! length of year (sols) ~668.6 |
---|
[253] | 104 | periastr = 206.66 ! min. Star-Planet distance (Mkm) ~206.66 |
---|
| 105 | apoastr = 249.22 ! max. Star-Planet distance (Mkm) ~249.22 |
---|
| 106 | peri_day = 485. ! date of periastron (sols since N. spring) |
---|
[135] | 107 | obliquit = 25.19 ! Obliquity of the planet (deg) ~25.19 |
---|
| 108 | |
---|
| 109 | c additional for stokes.F added by RDW |
---|
| 110 | c------------------------------------- |
---|
[253] | 111 | ! molrad=2.2e-10 ! CO2 |
---|
| 112 | ! visc=1.e-5 ! CO2 |
---|
[135] | 113 | |
---|
| 114 | c Boundary layer and turbulence |
---|
| 115 | c---------------------------- |
---|
| 116 | z0 = 1.e-2 ! surface roughness (m) ~0.01 |
---|
| 117 | emin_turb = 1.e-6 ! minimal energy ~1.e-8 |
---|
| 118 | lmixmin = 30 ! mixing length ~100 |
---|
| 119 | |
---|
| 120 | c Optical properties of polar caps and ground emissivity |
---|
| 121 | c----------------------------------------------------- |
---|
| 122 | emissiv=.95 ! Emissivity of martian soil ~.95 |
---|
| 123 | emisice(1)=0.95 ! Emissivity of northern cap |
---|
| 124 | emisice(2)=0.95 ! Emissivity of southern cap |
---|
| 125 | albedice(1)=0.65 ! Albedo of northern cap |
---|
| 126 | albedice(2)=0.65 ! Albedo of southern cap |
---|
| 127 | iceradius(1) = 100.e-6 ! mean scat radius of CO2 snow (north) |
---|
| 128 | iceradius(2) = 100.e-6 ! mean scat radius of CO2 snow (south) |
---|
| 129 | dtemisice(1) = 0.4 ! time scale for snow metamorphism (north) |
---|
| 130 | dtemisice(2) = 0.4 ! time scale for snow metamorphism (south) |
---|
| 131 | |
---|
| 132 | c dust aerosol properties |
---|
| 133 | c--------------------------------- |
---|
| 134 | tauvis= 0.2 ! mean visible optical depth |
---|
| 135 | |
---|
| 136 | c soil properties |
---|
| 137 | volcapa = 1.e6 ! soil volumetric heat capacity (in comsoil.h) |
---|
| 138 | ELSE |
---|
| 139 | c----------------------------------------------------------------------- |
---|
| 140 | c Initialization of physical constants by reading array tab_cntrl(:) |
---|
| 141 | c which contains these parameters (nid != 0 case) |
---|
| 142 | c----------------------------------------------------------------------- |
---|
| 143 | c Read 'controle' array |
---|
| 144 | c |
---|
| 145 | ierr = NF_INQ_VARID (nid, "controle", nvarid) |
---|
| 146 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 147 | PRINT*, "Tabfi: Could not find <controle> data" |
---|
| 148 | CALL abort |
---|
| 149 | ENDIF |
---|
| 150 | #ifdef NC_DOUBLE |
---|
| 151 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tab_cntrl) |
---|
| 152 | #else |
---|
| 153 | ierr = NF_GET_VAR_REAL(nid, nvarid, tab_cntrl) |
---|
| 154 | #endif |
---|
| 155 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 156 | PRINT*, "Tabfi: Failed reading <controle> array" |
---|
| 157 | CALL abort |
---|
| 158 | ENDIF |
---|
| 159 | |
---|
| 160 | print*,'tabfi: tab_cntrl',tab_cntrl |
---|
| 161 | c |
---|
| 162 | c Initialization of some physical constants |
---|
| 163 | c informations on physics grid |
---|
| 164 | if(ngridmx.ne.tab_cntrl(tab0+1)) then |
---|
| 165 | print*,'tabfi: WARNING !!! tab_cntrl(tab0+1).ne.ngridmx' |
---|
| 166 | print*,tab_cntrl(tab0+1),ngridmx |
---|
| 167 | endif |
---|
| 168 | lmax = nint(tab_cntrl(tab0+2)) |
---|
| 169 | day_ini = tab_cntrl(tab0+3) |
---|
| 170 | time = tab_cntrl(tab0+4) |
---|
| 171 | write (*,*) 'IN tabfi day_ini=',day_ini |
---|
| 172 | c Informations about planet for dynamics and physics |
---|
| 173 | rad = tab_cntrl(tab0+5) |
---|
| 174 | omeg = tab_cntrl(tab0+6) |
---|
| 175 | g = tab_cntrl(tab0+7) |
---|
| 176 | mugaz = tab_cntrl(tab0+8) |
---|
| 177 | rcp = tab_cntrl(tab0+9) |
---|
| 178 | daysec = tab_cntrl(tab0+10) |
---|
| 179 | dtphys = tab_cntrl(tab0+11) |
---|
| 180 | c Informations about planet for the physics only |
---|
| 181 | year_day = tab_cntrl(tab0+14) |
---|
[253] | 182 | periastr = tab_cntrl(tab0+15) |
---|
| 183 | apoastr = tab_cntrl(tab0+16) |
---|
[135] | 184 | peri_day = tab_cntrl(tab0+17) |
---|
| 185 | obliquit = tab_cntrl(tab0+18) |
---|
| 186 | c boundary layer and turbeulence |
---|
| 187 | z0 = tab_cntrl(tab0+19) |
---|
| 188 | lmixmin = tab_cntrl(tab0+20) |
---|
| 189 | emin_turb = tab_cntrl(tab0+21) |
---|
| 190 | c optical properties of polar caps and ground emissivity |
---|
| 191 | albedice(1)= tab_cntrl(tab0+22) |
---|
| 192 | albedice(2)= tab_cntrl(tab0+23) |
---|
| 193 | emisice(1) = tab_cntrl(tab0+24) |
---|
| 194 | emisice(2) = tab_cntrl(tab0+25) |
---|
| 195 | emissiv = tab_cntrl(tab0+26) |
---|
| 196 | tauvis = tab_cntrl(tab0+27) ! dust opt. depth vis. |
---|
| 197 | iceradius(1)= tab_cntrl(tab0+31) ! mean scat radius of CO2 snow (north) |
---|
| 198 | iceradius(2)= tab_cntrl(tab0+32) ! mean scat radius of CO2 snow (south) |
---|
| 199 | dtemisice(1)= tab_cntrl(tab0+33) !time scale for snow metamorphism (north) |
---|
| 200 | dtemisice(2)= tab_cntrl(tab0+34) !time scale for snow metamorphism (south) |
---|
| 201 | c soil properties |
---|
| 202 | volcapa = tab_cntrl(tab0+35) ! volumetric heat capacity |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | c----------------------------------------------------------------------- |
---|
| 208 | c Save some constants for later use (as routine arguments) |
---|
| 209 | c----------------------------------------------------------------------- |
---|
| 210 | p_omeg = omeg |
---|
| 211 | p_g = g |
---|
| 212 | p_cpp = cpp |
---|
| 213 | p_mugaz = mugaz |
---|
| 214 | p_daysec = daysec |
---|
| 215 | p_rad=rad |
---|
| 216 | |
---|
| 217 | ENDIF ! end of (nid = 0) |
---|
| 218 | |
---|
| 219 | c----------------------------------------------------------------------- |
---|
| 220 | c Write physical constants to output before modifying them |
---|
| 221 | c----------------------------------------------------------------------- |
---|
| 222 | |
---|
| 223 | 6 FORMAT(a20,e15.6,e15.6) |
---|
| 224 | 5 FORMAT(a20,f12.2,f12.2) |
---|
| 225 | |
---|
| 226 | write(*,*) '*****************************************************' |
---|
| 227 | write(*,*) 'Reading tab_cntrl when calling tabfi before changes' |
---|
| 228 | write(*,*) '*****************************************************' |
---|
| 229 | write(*,5) '(1) = ngridmx?',tab_cntrl(tab0+1),float(ngridmx) |
---|
| 230 | write(*,5) '(2) lmax',tab_cntrl(tab0+2),float(lmax) |
---|
| 231 | write(*,5) '(3) day_ini',tab_cntrl(tab0+3),float(day_ini) |
---|
| 232 | write(*,5) '(5) rad',tab_cntrl(tab0+5),rad |
---|
| 233 | write(*,5) '(10) daysec',tab_cntrl(tab0+10),daysec |
---|
| 234 | write(*,6) '(6) omeg',tab_cntrl(tab0+6),omeg |
---|
| 235 | write(*,5) '(7) g',tab_cntrl(tab0+7),g |
---|
| 236 | write(*,5) '(8) mugaz',tab_cntrl(tab0+8),mugaz |
---|
| 237 | write(*,5) '(9) rcp',tab_cntrl(tab0+9),rcp |
---|
| 238 | write(*,6) '(11) dtphys?',tab_cntrl(tab0+11),dtphys |
---|
| 239 | |
---|
| 240 | write(*,5) '(14) year_day',tab_cntrl(tab0+14),year_day |
---|
[253] | 241 | write(*,5) '(15) periastr',tab_cntrl(tab0+15),periastr |
---|
| 242 | write(*,5) '(16) apoastr',tab_cntrl(tab0+16),apoastr |
---|
[135] | 243 | write(*,5) '(17) peri_day',tab_cntrl(tab0+17),peri_day |
---|
| 244 | write(*,5) '(18) obliquit',tab_cntrl(tab0+18),obliquit |
---|
| 245 | |
---|
| 246 | write(*,6) '(19) z0',tab_cntrl(tab0+19),z0 |
---|
| 247 | write(*,6) '(21) emin_turb',tab_cntrl(tab0+21),emin_turb |
---|
| 248 | write(*,5) '(20) lmixmin',tab_cntrl(tab0+20),lmixmin |
---|
| 249 | |
---|
| 250 | write(*,5) '(26) emissiv',tab_cntrl(tab0+26),emissiv |
---|
| 251 | write(*,5) '(24) emisice(1)',tab_cntrl(tab0+24),emisice(1) |
---|
| 252 | write(*,5) '(25) emisice(2)',tab_cntrl(tab0+25),emisice(2) |
---|
| 253 | write(*,5) '(22) albedice(1)',tab_cntrl(tab0+22),albedice(1) |
---|
| 254 | write(*,5) '(23) albedice(2)',tab_cntrl(tab0+23),albedice(2) |
---|
| 255 | write(*,6) '(31) iceradius(1)',tab_cntrl(tab0+31),iceradius(1) |
---|
| 256 | write(*,6) '(32) iceradius(2)',tab_cntrl(tab0+32),iceradius(2) |
---|
| 257 | write(*,5) '(33) dtemisice(1)',tab_cntrl(tab0+33),dtemisice(1) |
---|
| 258 | write(*,5) '(34) dtemisice(2)',tab_cntrl(tab0+34),dtemisice(2) |
---|
| 259 | |
---|
| 260 | write(*,5) '(27) tauvis',tab_cntrl(tab0+27),tauvis |
---|
| 261 | |
---|
| 262 | write(*,5) '(35) volcapa',tab_cntrl(tab0+35),volcapa |
---|
| 263 | |
---|
| 264 | write(*,*) |
---|
| 265 | write(*,*) 'Lmodif in tabfi!!!!!!!',Lmodif |
---|
| 266 | |
---|
| 267 | c----------------------------------------------------------------------- |
---|
| 268 | c Modifications... |
---|
| 269 | c----------------------------------------------------------------------- |
---|
| 270 | |
---|
| 271 | IF(Lmodif.eq.1) then |
---|
| 272 | |
---|
| 273 | write(*,*) |
---|
| 274 | write(*,*) 'Change values in tab_cntrl ? :' |
---|
| 275 | write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
| 276 | write(*,*) '(Current values given above)' |
---|
| 277 | write(*,*) |
---|
| 278 | write(*,*) '(3) day_ini : Initial day (=0 at Ls=0)' |
---|
| 279 | write(*,*) '(19) z0 : surface roughness (m)' |
---|
| 280 | write(*,*) '(21) emin_turb : minimal energy (PBL)' |
---|
| 281 | write(*,*) '(20) lmixmin : mixing length (PBL)' |
---|
| 282 | write(*,*) '(26) emissiv : ground emissivity' |
---|
| 283 | write(*,*) '(24 et 25) emisice : CO2 ice max emissivity ' |
---|
| 284 | write(*,*) '(22 et 23) albedice : CO2 ice cap albedos' |
---|
| 285 | write(*,*) '(31 et 32) iceradius : mean scat radius of CO2 snow' |
---|
| 286 | write(*,*) '(33 et 34) dtemisice : time scale for snow', |
---|
| 287 | & ' metamorphism' |
---|
| 288 | write(*,*) '(27) tauvis : mean dust vis. reference ', |
---|
| 289 | & 'opacity' |
---|
[253] | 290 | write(*,*) '(35) volcapa : soil volumetric heat capacity' |
---|
| 291 | write(*,*) '(18) obliquit : planet obliquity (deg)' |
---|
| 292 | write(*,*) '(17) peri_day : periastron date (sols since Ls=0)' |
---|
| 293 | write(*,*) '(15) periastr : min. star-planet dist (Mkm)' |
---|
| 294 | write(*,*) '(16) apoastr : max. star-planet (Mkm)' |
---|
| 295 | write(*,*) '(14) year_day : length of year (in sols)' |
---|
[135] | 296 | write(*,*) '(5) rad : radius of the planet (m)' |
---|
| 297 | write(*,*) '(6) omeg : planet rotation rate (rad/s)' |
---|
| 298 | write(*,*) '(7) g : gravity (m/s2)' |
---|
| 299 | write(*,*) '(8) mugaz : molecular mass of the atmosphere (g/mol)' |
---|
| 300 | write(*,*) '(9) rcp : r/Cp' |
---|
| 301 | write(*,*) '(10) daysec : length of a sol (s)' |
---|
| 302 | write(*,*) |
---|
| 303 | |
---|
| 304 | |
---|
| 305 | do while(modif(1:1).ne.'hello') |
---|
| 306 | write(*,*) |
---|
| 307 | write(*,*) |
---|
| 308 | write(*,*) 'Changes to perform ?' |
---|
| 309 | write(*,*) ' (enter keyword or return )' |
---|
| 310 | write(*,*) |
---|
| 311 | read(*,fmt='(a20)') modif |
---|
| 312 | if (modif(1:1) .eq. ' ') goto 999 |
---|
| 313 | |
---|
| 314 | write(*,*) |
---|
| 315 | write(*,*) modif(1:len_trim(modif)) , ' : ' |
---|
| 316 | |
---|
| 317 | if (modif(1:len_trim(modif)) .eq. 'day_ini') then |
---|
| 318 | write(*,*) 'current value:',day_ini |
---|
| 319 | write(*,*) 'enter new value:' |
---|
| 320 | 101 read(*,*,iostat=ierr) day_ini |
---|
| 321 | if(ierr.ne.0) goto 101 |
---|
| 322 | write(*,*) ' ' |
---|
| 323 | write(*,*) 'day_ini (new value):',day_ini |
---|
| 324 | |
---|
| 325 | else if (modif(1:len_trim(modif)) .eq. 'z0') then |
---|
| 326 | write(*,*) 'current value:',z0 |
---|
| 327 | write(*,*) 'enter new value:' |
---|
| 328 | 102 read(*,*,iostat=ierr) z0 |
---|
| 329 | if(ierr.ne.0) goto 102 |
---|
| 330 | write(*,*) ' ' |
---|
| 331 | write(*,*) ' z0 (new value):',z0 |
---|
| 332 | |
---|
| 333 | else if (modif(1:len_trim(modif)) .eq. 'emin_turb') then |
---|
| 334 | write(*,*) 'current value:',emin_turb |
---|
| 335 | write(*,*) 'enter new value:' |
---|
| 336 | 103 read(*,*,iostat=ierr) emin_turb |
---|
| 337 | if(ierr.ne.0) goto 103 |
---|
| 338 | write(*,*) ' ' |
---|
| 339 | write(*,*) ' emin_turb (new value):',emin_turb |
---|
| 340 | |
---|
| 341 | else if (modif(1:len_trim(modif)) .eq. 'lmixmin') then |
---|
| 342 | write(*,*) 'current value:',lmixmin |
---|
| 343 | write(*,*) 'enter new value:' |
---|
| 344 | 104 read(*,*,iostat=ierr) lmixmin |
---|
| 345 | if(ierr.ne.0) goto 104 |
---|
| 346 | write(*,*) ' ' |
---|
| 347 | write(*,*) ' lmixmin (new value):',lmixmin |
---|
| 348 | |
---|
| 349 | else if (modif(1:len_trim(modif)) .eq. 'emissiv') then |
---|
| 350 | write(*,*) 'current value:',emissiv |
---|
| 351 | write(*,*) 'enter new value:' |
---|
| 352 | 105 read(*,*,iostat=ierr) emissiv |
---|
| 353 | if(ierr.ne.0) goto 105 |
---|
| 354 | write(*,*) ' ' |
---|
| 355 | write(*,*) ' emissiv (new value):',emissiv |
---|
| 356 | |
---|
| 357 | else if (modif(1:len_trim(modif)) .eq. 'emisice') then |
---|
| 358 | write(*,*) 'current value emisice(1) North:',emisice(1) |
---|
| 359 | write(*,*) 'enter new value:' |
---|
| 360 | 106 read(*,*,iostat=ierr) emisice(1) |
---|
| 361 | if(ierr.ne.0) goto 106 |
---|
| 362 | write(*,*) |
---|
| 363 | write(*,*) ' emisice(1) (new value):',emisice(1) |
---|
| 364 | write(*,*) |
---|
| 365 | |
---|
| 366 | write(*,*) 'current value emisice(2) South:',emisice(2) |
---|
| 367 | write(*,*) 'enter new value:' |
---|
| 368 | 107 read(*,*,iostat=ierr) emisice(2) |
---|
| 369 | if(ierr.ne.0) goto 107 |
---|
| 370 | write(*,*) |
---|
| 371 | write(*,*) ' emisice(2) (new value):',emisice(2) |
---|
| 372 | |
---|
| 373 | else if (modif(1:len_trim(modif)) .eq. 'albedice') then |
---|
| 374 | write(*,*) 'current value albedice(1) North:',albedice(1) |
---|
| 375 | write(*,*) 'enter new value:' |
---|
| 376 | 108 read(*,*,iostat=ierr) albedice(1) |
---|
| 377 | if(ierr.ne.0) goto 108 |
---|
| 378 | write(*,*) |
---|
| 379 | write(*,*) ' albedice(1) (new value):',albedice(1) |
---|
| 380 | write(*,*) |
---|
| 381 | |
---|
| 382 | write(*,*) 'current value albedice(2) South:',albedice(2) |
---|
| 383 | write(*,*) 'enter new value:' |
---|
| 384 | 109 read(*,*,iostat=ierr) albedice(2) |
---|
| 385 | if(ierr.ne.0) goto 109 |
---|
| 386 | write(*,*) |
---|
| 387 | write(*,*) ' albedice(2) (new value):',albedice(2) |
---|
| 388 | |
---|
| 389 | else if (modif(1:len_trim(modif)) .eq. 'iceradius') then |
---|
| 390 | write(*,*) 'current value iceradius(1) North:',iceradius(1) |
---|
| 391 | write(*,*) 'enter new value:' |
---|
| 392 | 110 read(*,*,iostat=ierr) iceradius(1) |
---|
| 393 | if(ierr.ne.0) goto 110 |
---|
| 394 | write(*,*) |
---|
| 395 | write(*,*) ' iceradius(1) (new value):',iceradius(1) |
---|
| 396 | write(*,*) |
---|
| 397 | |
---|
| 398 | write(*,*) 'current value iceradius(2) South:',iceradius(2) |
---|
| 399 | write(*,*) 'enter new value:' |
---|
| 400 | 111 read(*,*,iostat=ierr) iceradius(2) |
---|
| 401 | if(ierr.ne.0) goto 111 |
---|
| 402 | write(*,*) |
---|
| 403 | write(*,*) ' iceradius(2) (new value):',iceradius(2) |
---|
| 404 | |
---|
| 405 | else if (modif(1:len_trim(modif)) .eq. 'dtemisice') then |
---|
| 406 | write(*,*) 'current value dtemisice(1) North:',dtemisice(1) |
---|
| 407 | write(*,*) 'enter new value:' |
---|
| 408 | 112 read(*,*,iostat=ierr) dtemisice(1) |
---|
| 409 | if(ierr.ne.0) goto 112 |
---|
| 410 | write(*,*) |
---|
| 411 | write(*,*) ' dtemisice(1) (new value):',dtemisice(1) |
---|
| 412 | write(*,*) |
---|
| 413 | |
---|
| 414 | write(*,*) 'current value dtemisice(2) South:',dtemisice(2) |
---|
| 415 | write(*,*) 'enter new value:' |
---|
| 416 | 113 read(*,*,iostat=ierr) dtemisice(2) |
---|
| 417 | if(ierr.ne.0) goto 113 |
---|
| 418 | write(*,*) |
---|
| 419 | write(*,*) ' dtemisice(2) (new value):',dtemisice(2) |
---|
| 420 | |
---|
| 421 | else if (modif(1:len_trim(modif)) .eq. 'tauvis') then |
---|
| 422 | write(*,*) 'current value:',tauvis |
---|
| 423 | write(*,*) 'enter new value:' |
---|
| 424 | 114 read(*,*,iostat=ierr) tauvis |
---|
| 425 | if(ierr.ne.0) goto 114 |
---|
| 426 | write(*,*) |
---|
| 427 | write(*,*) ' tauvis (new value):',tauvis |
---|
| 428 | |
---|
| 429 | else if (modif(1:len_trim(modif)) .eq. 'obliquit') then |
---|
| 430 | write(*,*) 'current value:',obliquit |
---|
| 431 | write(*,*) 'obliquit should be 25.19 on current Mars' |
---|
| 432 | write(*,*) 'enter new value:' |
---|
| 433 | 115 read(*,*,iostat=ierr) obliquit |
---|
| 434 | if(ierr.ne.0) goto 115 |
---|
| 435 | write(*,*) |
---|
| 436 | write(*,*) ' obliquit (new value):',obliquit |
---|
| 437 | |
---|
| 438 | else if (modif(1:len_trim(modif)) .eq. 'peri_day') then |
---|
| 439 | write(*,*) 'current value:',peri_day |
---|
| 440 | write(*,*) 'peri_day should be 485 on current Mars' |
---|
| 441 | write(*,*) 'enter new value:' |
---|
| 442 | 116 read(*,*,iostat=ierr) peri_day |
---|
| 443 | if(ierr.ne.0) goto 116 |
---|
| 444 | write(*,*) |
---|
| 445 | write(*,*) ' peri_day (new value):',peri_day |
---|
| 446 | |
---|
[253] | 447 | else if (modif(1:len_trim(modif)) .eq. 'periastr') then |
---|
| 448 | write(*,*) 'current value:',periastr |
---|
| 449 | write(*,*) 'periastr should be 206.66 on present-day Mars' |
---|
[135] | 450 | write(*,*) 'enter new value:' |
---|
[253] | 451 | 117 read(*,*,iostat=ierr) periastr |
---|
[135] | 452 | if(ierr.ne.0) goto 117 |
---|
| 453 | write(*,*) |
---|
[253] | 454 | write(*,*) ' periastr (new value):',periastr |
---|
[135] | 455 | |
---|
[253] | 456 | else if (modif(1:len_trim(modif)) .eq. 'apoastr') then |
---|
| 457 | write(*,*) 'current value:',apoastr |
---|
| 458 | write(*,*) 'apoastr should be 249.22 on present-day Mars' |
---|
[135] | 459 | write(*,*) 'enter new value:' |
---|
[253] | 460 | 118 read(*,*,iostat=ierr) apoastr |
---|
[135] | 461 | if(ierr.ne.0) goto 118 |
---|
| 462 | write(*,*) |
---|
[253] | 463 | write(*,*) ' apoastr (new value):',apoastr |
---|
[135] | 464 | |
---|
| 465 | else if (modif(1:len_trim(modif)) .eq. 'volcapa') then |
---|
| 466 | write(*,*) 'current value:',volcapa |
---|
| 467 | write(*,*) 'enter new value:' |
---|
| 468 | 119 read(*,*,iostat=ierr) volcapa |
---|
| 469 | if(ierr.ne.0) goto 119 |
---|
| 470 | write(*,*) |
---|
| 471 | write(*,*) ' volcapa (new value):',volcapa |
---|
| 472 | |
---|
| 473 | else if (modif(1:len_trim(modif)).eq.'rad') then |
---|
| 474 | write(*,*) 'current value:',rad |
---|
| 475 | write(*,*) 'enter new value:' |
---|
| 476 | 120 read(*,*,iostat=ierr) rad |
---|
| 477 | if(ierr.ne.0) goto 120 |
---|
| 478 | write(*,*) |
---|
| 479 | write(*,*) ' rad (new value):',rad |
---|
| 480 | |
---|
| 481 | else if (modif(1:len_trim(modif)).eq.'omeg') then |
---|
| 482 | write(*,*) 'current value:',omeg |
---|
| 483 | write(*,*) 'enter new value:' |
---|
| 484 | 121 read(*,*,iostat=ierr) omeg |
---|
| 485 | if(ierr.ne.0) goto 121 |
---|
| 486 | write(*,*) |
---|
| 487 | write(*,*) ' omeg (new value):',omeg |
---|
| 488 | |
---|
| 489 | else if (modif(1:len_trim(modif)).eq.'g') then |
---|
| 490 | write(*,*) 'current value:',g |
---|
| 491 | write(*,*) 'enter new value:' |
---|
| 492 | 122 read(*,*,iostat=ierr) g |
---|
| 493 | if(ierr.ne.0) goto 122 |
---|
| 494 | write(*,*) |
---|
| 495 | write(*,*) ' g (new value):',g |
---|
| 496 | |
---|
| 497 | else if (modif(1:len_trim(modif)).eq.'mugaz') then |
---|
| 498 | write(*,*) 'current value:',mugaz |
---|
| 499 | write(*,*) 'enter new value:' |
---|
| 500 | 123 read(*,*,iostat=ierr) mugaz |
---|
| 501 | if(ierr.ne.0) goto 123 |
---|
| 502 | write(*,*) |
---|
| 503 | write(*,*) ' mugaz (new value):',mugaz |
---|
| 504 | r=8.314/(mugaz/1000.0) |
---|
| 505 | write(*,*) ' R (new value):',r |
---|
| 506 | |
---|
| 507 | else if (modif(1:len_trim(modif)).eq.'rcp') then |
---|
| 508 | write(*,*) 'current value:',rcp |
---|
| 509 | write(*,*) 'enter new value:' |
---|
| 510 | 124 read(*,*,iostat=ierr) rcp |
---|
| 511 | if(ierr.ne.0) goto 124 |
---|
| 512 | write(*,*) |
---|
| 513 | write(*,*) ' rcp (new value):',rcp |
---|
| 514 | cpp=r/rcp |
---|
| 515 | write(*,*) ' cpp (new value):',cpp |
---|
| 516 | |
---|
| 517 | else if (modif(1:len_trim(modif)).eq.'daysec') then |
---|
| 518 | write(*,*) 'current value:',daysec |
---|
| 519 | write(*,*) 'enter new value:' |
---|
| 520 | 125 read(*,*,iostat=ierr) daysec |
---|
| 521 | if(ierr.ne.0) goto 125 |
---|
| 522 | write(*,*) |
---|
| 523 | write(*,*) ' daysec (new value):',daysec |
---|
| 524 | |
---|
| 525 | ! added by RW! |
---|
| 526 | else if (modif(1:len_trim(modif)).eq.'year_day') then |
---|
| 527 | write(*,*) 'current value:',year_day |
---|
| 528 | write(*,*) 'enter new value:' |
---|
| 529 | 126 read(*,*,iostat=ierr) year_day |
---|
| 530 | if(ierr.ne.0) goto 126 |
---|
| 531 | write(*,*) |
---|
| 532 | write(*,*) ' year_day (new value):',year_day |
---|
| 533 | |
---|
| 534 | endif |
---|
| 535 | enddo ! of do while(modif(1:1).ne.'hello') |
---|
| 536 | |
---|
| 537 | 999 continue |
---|
| 538 | |
---|
| 539 | c----------------------------------------------------------------------- |
---|
| 540 | c Write values of physical constants after modifications |
---|
| 541 | c----------------------------------------------------------------------- |
---|
| 542 | |
---|
| 543 | write(*,*) '*****************************************************' |
---|
| 544 | write(*,*) 'Reading tab_cntrl when calling tabfi AFTER changes' |
---|
| 545 | write(*,*) '*****************************************************' |
---|
| 546 | write(*,5) '(1) = ngridmx?',tab_cntrl(tab0+1),float(ngridmx) |
---|
| 547 | write(*,5) '(2) lmax',tab_cntrl(tab0+2),float(lmax) |
---|
| 548 | write(*,5) '(3) day_ini',tab_cntrl(tab0+3),float(day_ini) |
---|
| 549 | write(*,5) '(5) rad',tab_cntrl(tab0+5),rad |
---|
| 550 | write(*,5) '(10) daysec',tab_cntrl(tab0+10),daysec |
---|
| 551 | write(*,6) '(6) omeg',tab_cntrl(tab0+6),omeg |
---|
| 552 | write(*,5) '(7) g',tab_cntrl(tab0+7),g |
---|
| 553 | write(*,5) '(8) mugaz',tab_cntrl(tab0+8),mugaz |
---|
| 554 | write(*,5) '(9) rcp',tab_cntrl(tab0+9),rcp |
---|
| 555 | write(*,6) '(11) dtphys?',tab_cntrl(tab0+11),dtphys |
---|
| 556 | |
---|
| 557 | write(*,5) '(14) year_day',tab_cntrl(tab0+14),year_day |
---|
[253] | 558 | write(*,5) '(15) periastr',tab_cntrl(tab0+15),periastr |
---|
| 559 | write(*,5) '(16) apoastr',tab_cntrl(tab0+16),apoastr |
---|
[135] | 560 | write(*,5) '(17) peri_day',tab_cntrl(tab0+17),peri_day |
---|
| 561 | write(*,5) '(18) obliquit',tab_cntrl(tab0+18),obliquit |
---|
| 562 | |
---|
| 563 | write(*,6) '(19) z0',tab_cntrl(tab0+19),z0 |
---|
| 564 | write(*,6) '(21) emin_turb',tab_cntrl(tab0+21),emin_turb |
---|
| 565 | write(*,5) '(20) lmixmin',tab_cntrl(tab0+20),lmixmin |
---|
| 566 | |
---|
| 567 | write(*,5) '(26) emissiv',tab_cntrl(tab0+26),emissiv |
---|
| 568 | write(*,5) '(24) emisice(1)',tab_cntrl(tab0+24),emisice(1) |
---|
| 569 | write(*,5) '(25) emisice(2)',tab_cntrl(tab0+25),emisice(2) |
---|
| 570 | write(*,5) '(22) albedice(1)',tab_cntrl(tab0+22),albedice(1) |
---|
| 571 | write(*,5) '(23) albedice(2)',tab_cntrl(tab0+23),albedice(2) |
---|
| 572 | write(*,6) '(31) iceradius(1)',tab_cntrl(tab0+31),iceradius(1) |
---|
| 573 | write(*,6) '(32) iceradius(2)',tab_cntrl(tab0+32),iceradius(2) |
---|
| 574 | write(*,5) '(33) dtemisice(1)',tab_cntrl(tab0+33),dtemisice(1) |
---|
| 575 | write(*,5) '(34) dtemisice(2)',tab_cntrl(tab0+34),dtemisice(2) |
---|
| 576 | |
---|
| 577 | write(*,5) '(27) tauvis',tab_cntrl(tab0+27),tauvis |
---|
| 578 | |
---|
| 579 | write(*,5) '(35) volcapa',tab_cntrl(tab0+35),volcapa |
---|
| 580 | |
---|
| 581 | write(*,*) |
---|
| 582 | write(*,*) |
---|
| 583 | |
---|
| 584 | ENDIF ! of if (Lmodif == 1) |
---|
| 585 | |
---|
| 586 | c----------------------------------------------------------------------- |
---|
| 587 | c Save some constants for later use (as routine arguments) |
---|
| 588 | c----------------------------------------------------------------------- |
---|
| 589 | p_omeg = omeg |
---|
| 590 | p_g = g |
---|
| 591 | p_cpp = cpp |
---|
| 592 | p_mugaz = mugaz |
---|
| 593 | p_daysec = daysec |
---|
| 594 | p_rad=rad |
---|
| 595 | |
---|
| 596 | |
---|
| 597 | end |
---|