Changeset 2311
- Timestamp:
- May 6, 2020, 1:46:00 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2308 r2311 2997 2997 (NB: this last point also implies a change in concatnc.def, but retrocompatibility 2998 2998 with old concatnc.def files has been ensured) 2999 3000 == 06/05/2020 == EM 3001 More code tidying: use getin_p() instead of getin() and use "call abort_physic" 3002 instead of "stop" or "call abort" -
trunk/LMDZ.MARS/libf/aeronomars/perosat.F
r1266 r2311 5 5 use tracer_mod, only: igcm_h2o2, mmol 6 6 use conc_mod, only: mmean 7 USE comcstfi_h7 use comcstfi_h, only: g 8 8 IMPLICIT NONE 9 9 … … 32 32 integer,intent(in) :: nlayer ! number of atmospheric layers 33 33 integer,intent(in) :: nq ! number of tracers 34 INTEGER ig35 REAL ptimestep! pas de temps physique (s)36 REAL pplev(ngrid,nlayer+1)! pression aux inter-couches (Pa)37 REAL pplay(ngrid,nlayer)! pression au milieu des couches (Pa)38 REAL zt(nlayer)! temperature au centre des couches (K)34 INTEGER,INTENT(IN) :: ig 35 REAL,INTENT(IN) :: ptimestep ! pas de temps physique (s) 36 REAL,INTENT(IN) :: pplev(ngrid,nlayer+1)! pression aux inter-couches (Pa) 37 REAL,INTENT(IN) :: pplay(ngrid,nlayer) ! pression au milieu des couches (Pa) 38 REAL,INTENT(IN) :: zt(nlayer) ! temperature au centre des couches (K) 39 39 ! deja mise a jour dans calchim 40 40 41 41 c Traceurs : 42 real zy(nlayer,nq)! traceur (fraction molaire sortie chimie)43 real pdqcloud(ngrid,nlayer,nq) ! tendance condensation (kg/kg.s-1)44 real pdqscloud(ngrid,nq)! flux en surface (kg.m-2.s-1)42 real,intent(in) :: zy(nlayer,nq) ! traceur (fraction molaire sortie chimie) 43 real,intent(out) :: pdqcloud(ngrid,nlayer,nq) ! tendance condensation (kg/kg.s-1) 44 real,intent(out) :: pdqscloud(ngrid,nq) ! flux en surface (kg.m-2.s-1) 45 45 46 46 c local: … … 67 67 if (igcm_h2o2.eq.0) then 68 68 write(*,*) "perosat: error; no h2o2 tracer !!!!" 69 stop69 call abort_physic("perosat","missing h2o2 tracer",1) 70 70 endif 71 71 firstcall=.false. -
trunk/LMDZ.MARS/libf/aeronomars/read_phototable.F90
r1918 r2311 21 21 !*********************************************************************** 22 22 23 use ioipsl_getin com, only: getin23 use ioipsl_getin_p_mod, only: getin_p 24 24 use datafile_mod, only: datadir 25 25 … … 45 45 ! look for a " phototable= ..." option in def files 46 46 47 call getin ("phototable",phototable)47 call getin_p("phototable",phototable) 48 48 49 49 fic = 81 … … 61 61 write(*,*)' callphys.def with:' 62 62 write(*,*)' phototable=filename' 63 stop63 call abort_physic("read_phototable","missing "//trim(phototable)//"file",1) 64 64 end if 65 65 -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F
r2261 r2311 16 16 & rsedcloud,rhocloud,pzlev,pdqs_sedco2, 17 17 & pdu,pu,pcondicea) 18 USE ioipsl_getin com, only: getin18 USE ioipsl_getin_p_mod, ONLY : getin_p 19 19 use dimradmars_mod, only: naerkind 20 20 USE comcstfi_h, only: pi, g, cpp … … 201 201 write(*,*) 'stop in co2cloud (nq.gt.nqmx)!' 202 202 write(*,*) 'nq=',nq,' nqmx=',nqmx 203 stop203 call abort_physic("co2cloud","nq.gt.nqmx",1) 204 204 endif 205 205 write(*,*) "co2cloud.F: rho_ice_co2 = ",rho_ice_co2 … … 213 213 imicroco2 = 30 214 214 #endif 215 call getin ("imicroco2",imicroco2)215 call getin_p("imicroco2",imicroco2) 216 216 write(*,*)"imicroco2 = ",imicroco2 217 217 … … 257 257 write(*,*) 'file optprop_co2ice_1mic.dat should be in ' 258 258 & ,trim(datadir) 259 STOP 259 call abort_physic("co2cloud", 260 & "missing file optprop_co2ice_1mic.dat",1) 260 261 endif 261 262 ! open(newunit=uQext,file=trim(datadir)// -
trunk/LMDZ.MARS/libf/phymars/convadj.F
r1779 r2311 8 8 use tracer_mod, only: noms, ! tracer names 9 9 & igcm_h2o_vap ! index of water vapor tracer 10 USE comcstfi_h10 use comcstfi_h, only: g 11 11 implicit none 12 12 … … 32 32 ! ------------ 33 33 34 #include "callkeys.h"34 include "callkeys.h" 35 35 36 36 … … 70 70 71 71 ! Tracers 72 INTEGER iq ,ico273 saveico272 INTEGER iq 73 integer,save :: ico2 74 74 REAL zq(ngrid,nlay,nq), zq2(ngrid,nlay,nq) 75 75 REAL zqm(nq),zqco2m 76 real m_co2, m_noco2 , A , B77 saveA, B76 real m_co2, m_noco2 77 real,save :: A, B 78 78 79 79 real mtot1, mtot2 , mm1, mm2 80 integer l1ref, l2ref 81 LOGICAL vtest(ngrid),down,firstcall 82 save firstcall 83 data firstcall/.true./ 80 integer l1ref, l2ref 81 LOGICAL vtest(ngrid),down 82 logical,save :: firstcall=.true. 84 83 85 84 ! for conservation test … … 376 375 print*,'jadrs=',jadrs 377 376 378 call abort 377 call abort_physic("convadj","crashed",1) 379 378 endif 380 379 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
trunk/LMDZ.MARS/libf/phymars/param_slope.F90
r227 r2311 89 89 if ((theta_s > 90.) .or. (theta_s < 0.)) then 90 90 print *, 'please set theta_s between 0 and 90', theta_s 91 stop91 call abort_physic("param_slopes","invalid theta_s",1) 92 92 endif 93 93 -
trunk/LMDZ.MARS/libf/phymars/soil_settings.F
r1130 r2311 135 135 if (ierr.ne.0) then 136 136 write(*,*) 'soil_settings: failed allocation of oldmlayer!' 137 stop 137 call abort_physic("soil_settings", 138 & "failed oldmlayer allocation",1) 138 139 endif 139 140 endif … … 255 256 if (.not.found) then 256 257 write(*,*) "soil_settings: Failed loading <inertiedat>" 257 call abort 258 call abort_physic("soil_settings", 259 & "failed loading <inertiedat>",1) 258 260 endif 259 261 … … 272 274 write(*,*) 'soil_settings: failed allocation of ', 273 275 & 'oldinertiedat!' 274 stop 276 call abort_physic("soil_settings", 277 & "failed allocation of oldinertiedat",1) 275 278 endif 276 279 endif ! of if (.not.allocated(oldinertiedat)) … … 284 287 if (.not.found) then 285 288 write(*,*) "soil_settings: Failed loading <inertiedat>" 286 call abort 289 call abort_physic("soil_settings", 290 & "failed loading <inertiedat>",1) 287 291 endif 288 292 else ! put values in therm_i … … 295 299 if (.not.found) then 296 300 write(*,*) "soil_settings: Failed loading <inertiedat>" 297 call abort 301 call abort_physic("soil_settings", 302 & "failed loading <inertiedat>",1) 298 303 endif 299 304 ! endif … … 320 325 write(*,*) 'soil_settings: failed allocation of ', 321 326 & 'oldtsoil!' 322 stop 327 call abort_physic("soil_settings", 328 & "failed allocation of oldtsoil",1) 323 329 endif 324 330 endif … … 332 338 if (.not.found) then 333 339 write(*,*) "soil_settings: Failed loading <tsoil>" 334 call abort 340 call abort_physic("soil_settings", 341 & "failed loading <tsoil>",1) 335 342 endif 336 343 else ! put values in tsoil … … 351 358 if (.not.found) then 352 359 write(*,*) "soil_settings: Failed loading <tsoil>" 353 call abort 360 call abort_physic("soil_settings", 361 & "failed loading <tsoil>",1) 354 362 endif 355 363 endif ! of if (interpol) -
trunk/LMDZ.MARS/libf/phymars/suaer.F90
r2199 r2311 232 232 write(*,*)' change it in file phymars/suaer.F90. Just' 233 233 write(*,*)' modify the variable called file_id.' 234 CALL ABORT234 CALL abort_physic("suaer","missing file "//trim(file_id(iaer,idomain)),1) 235 235 ENDIF 236 236 OPEN(UNIT=file_unit,& … … 249 249 TRIM(datadir)//& 250 250 '/'//TRIM(file_id(iaer,idomain)) 251 call abort 251 call abort_physic("suaer","problem reading "//trim(file_id(iaer,idomain)),1) 252 252 endif 253 253 IF ((scanline(1:1) .ne. '#').and.& … … 263 263 TRIM(datadir)//& 264 264 '/'//TRIM(file_id(iaer,idomain)) 265 call abort 265 call abort_physic("suaer",& 266 "problem reading "//trim(file_id(iaer,idomain)),1) 266 267 endif 267 268 jfile = jfile+1 … … 274 275 TRIM(datadir)//& 275 276 '/'//TRIM(file_id(iaer,idomain)) 276 call abort 277 call abort_physic("suaer",& 278 "problem reading "//trim(file_id(iaer,idomain)),1) 277 279 endif 278 280 endwhile = .true. … … 280 282 WRITE(*,*) 'readoptprop: ',& 281 283 'Error while loading optical properties.' 282 CALL ABORT 284 call abort_physic("suaer",& 285 "problem loading optical properties",1) 283 286 END SELECT reading1_seq ! ============================== 284 287 ENDIF … … 346 349 WRITE(*,*) 'suaer.F90: ',& 347 350 'Error while loading optical properties.' 348 CALL ABORT 351 call abort_physic("suaer",& 352 "problem loading optical properties",1) 349 353 END SELECT reading2_seq ! ============================== 350 354 ENDIF … … 378 382 write(*,*) " you must increase the value of nsizemax" 379 383 write(*,*) " in dimradmars_mod !" 380 stop384 call abort_physic("suaer","nsizemax too small",1) 381 385 endif 382 386 ! ------------------------------------------------ -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r2182 r2311 1 1 SUBROUTINE surfini(ngrid,piceco2,qsurf) 2 2 3 USE ioipsl_getin com, only: getin3 USE ioipsl_getin_p_mod, ONLY : getin_p 4 4 use netcdf 5 5 use tracer_mod, only: nqmx, noms … … 141 141 write(*,*) "surfini: Ice dryness ?" 142 142 icedryness=1. ! default value 143 call getin ("icedryness",icedryness)143 call getin_p("icedryness",icedryness) 144 144 write(*,*) "surfini: icedryness = ",icedryness 145 145 dryness (:) = icedryness … … 187 187 write(*,*)' can be obtained online on:' 188 188 write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' 189 CALL ABORT189 call abort_physic("surfini","missing surface.nc file",1) 190 190 ENDIF 191 191 … … 196 196 write(*,*) ' in file ',trim(zedatafile),'/surface.nc' 197 197 write(*,*)trim(nf90_strerror(ierr)) 198 stop198 call abort_physic("surfini","missing "//trim(string),1) 199 199 endif 200 200 … … 204 204 write(*,*) 'surfini: error failed loading ',trim(string) 205 205 write(*,*)trim(nf90_strerror(ierr)) 206 stop206 call abort_physic("surfini","failed loading "//trim(string),1) 207 207 endif 208 208 … … 359 359 print*,'Please change icelocationmode in surfini.F' 360 360 print*,'Or add some new definitions ...' 361 call abort 361 call abort_physic("surfini", 362 & "no pre-definitions for this resolution",1) 362 363 363 364 endif … … 434 435 print*, 'In surfini.F, icelocationmode is ', icelocationmode 435 436 print*, 'It should be 1, 2 or 3.' 436 call abort 437 call abort_physic("surfini","wrong icelocationmode",1) 437 438 438 439 ENDIF ! of if (icelocation) -
trunk/LMDZ.MARS/libf/phymars/swmain_mod.F
r1983 r2311 160 160 else 161 161 write(*,*) "swmain: invalid swrtype value !!" 162 stop162 call abort_physic("swmain","invalid swrtype",1) 163 163 endif ! of if (swrtype.eq.2) 164 164 endif ! of if (swrtype.eq.1) -
trunk/LMDZ.MARS/libf/phymars/tabfi.F
r2281 r2311 267 267 write(*,*) "tabfi: Error modifying tab_control should", 268 268 & " only happen in serial mode (eg: by newstart)" 269 stop 269 call abort_physic(modname, 270 & "tab_control modification not possible in parallel",1) 270 271 endif 271 272 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/vlz_fi.F
r2120 r2311 168 168 c wq(ij,l+1)= (MQtot + (-w(ij,l+1)-Mtot)*qm(ij,1)) 169 169 write(*,*) 'a rather weird situation in vlz_fi !' 170 stop170 call abort_physic("vlz_fi","weird situation",1) 171 171 end if 172 172 -
trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
r2162 r2311 13 13 & nq,tau,tauscaling,rdust,rice,nuice, 14 14 & rsedcloud,rhocloud,totcloudfrac) 15 USE ioipsl_getin com, ONLY: getin15 USE ioipsl_getin_p_mod, ONLY : getin_p 16 16 USE updaterad, ONLY: updaterdust, updaterice_micro, 17 17 & updaterice_typ … … 132 132 write(*,*) 'stop in watercloud (nq.gt.nqmx)!' 133 133 write(*,*) 'nq=',nq,' nqmx=',nqmx 134 stop134 call abort_physic("watercloud","nq.gt.nqmx",1) 135 135 endif 136 136 … … 144 144 imicro = 30 145 145 #endif 146 call getin ("imicro",imicro)146 call getin_p("imicro",imicro) 147 147 write(*,*)"watercloud: imicro = ",imicro 148 148 -
trunk/LMDZ.MARS/libf/phymars/writediagfi.F
r2141 r2311 144 144 if (n.ge.n_nom_def_max) then 145 145 write(*,*)"n_nom_def_max too small in writediagfi.F:",n 146 stop 146 call abort_physic("writediagfi", 147 & "n_nom_def_max too small",1) 147 148 end if 148 149 n_nom_def=n-1 … … 177 178 write(*,*) " firstnom string not long enough!!" 178 179 write(*,*) " increase its size to at least ",len_trim(nom) 179 stop180 call abort_physic("writediagfi","firstnom too short",1) 180 181 endif 181 182 … … 363 364 & trim(nom) 364 365 write(*,*) "it seems it already exists!" 365 stop 366 call abort_physic("writediagfi", 367 & trim(nom)//" already exists",1) 366 368 endif 367 369 endif … … 398 400 write(*,*) "***** with dx3: ",trim(nom) 399 401 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 400 stop 402 call abort_physic("writediagfi", 403 & "failed writing "//trim(nom),1) 401 404 endif 402 405 … … 465 468 & trim(nom) 466 469 write(*,*) "it seems it already exists!" 467 stop 470 call abort_physic("writediagfi", 471 & trim(nom)//" already exists",1) 468 472 endif 469 473 endif … … 495 499 write(*,*) "***** with dx2: ",trim(nom) 496 500 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 497 stop 501 call abort_physic("writediagfi", 502 & "failed writing "//trim(nom),1) 498 503 endif 499 504 … … 507 512 write(*,*) "writediagfi error: dim=1 not implemented ", 508 513 & "in parallel mode. Problem for ",trim(nom) 509 stop 514 call abort_physic("writediagfi", 515 & "failed writing "//trim(nom),1) 510 516 endif 511 517 ! Passage variable physique --> physique dynamique … … 533 539 & trim(nom) 534 540 write(*,*) "it seems it already exists!" 535 stop 541 call abort_physic("writediagfi", 542 & trim(nom)//" already exists",1) 536 543 endif 537 544 endif … … 552 559 write(*,*) "***** with dx1: ",trim(nom) 553 560 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 554 stop 561 call abort_physic("writediagfi", 562 & "failed writing "//trim(nom),1) 555 563 endif 556 564 … … 581 589 & trim(nom) 582 590 write(*,*) "it seems it already exists!" 583 stop 591 call abort_physic("writediagfi", 592 & trim(nom)//" already exists",1) 584 593 endif 585 594 endif … … 597 606 write(*,*) "***** with dx0: ",trim(nom) 598 607 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 599 stop 608 call abort_physic("writediagfi", 609 & "failed writing "//trim(nom),1) 600 610 endif 601 611 -
trunk/LMDZ.MARS/libf/phymars/writediagsoil.F90
r2023 r2311 84 84 write(*,*) " firstname string not long enough!!" 85 85 write(*,*) " increase its size to at least ",len_trim(name) 86 stop86 call abort_physic("writediagsoil","firstname too short",1) 87 87 endif 88 88 … … 96 96 if (ierr.ne.NF_NOERR) then 97 97 write(*,*)'writediagsoil: Error, failed creating file '//trim(filename) 98 stop98 call abort_physic("writediagsoil","failed creating"//trim(filename),1) 99 99 endif 100 100 endif … … 178 178 if (ierr.ne.NF_NOERR) then 179 179 write(*,*)"writediagsoil: Failed writing date to time variable" 180 stop180 call abort_physic("writediagsoil","failed writing time",1) 181 181 endif 182 182 endif ! of if (is_master) … … 354 354 #ifdef CPP_PARA 355 355 write(*,*) "writediagsoil: dimps==0 case not implemented in // mode!!" 356 stop356 call abort_physic("writediagsoil","dimps==0 not implemented",1) 357 357 #endif 358 358 ! A. Copy data value -
trunk/LMDZ.MARS/libf/phymars/wstats.F90
r1689 r2311 171 171 172 172 write (*,*) "=====================" 173 write (*,*) "STATS: creati on de",nom173 write (*,*) "STATS: creating ",nom 174 174 namebis=trim(nom) 175 175 call def_var_stats(nid,namebis,titre,unite,nbdim,id,meanid,ierr) … … 245 245 write (*,*) "wstats error reading :",trim(nom) 246 246 write (*,*) NF_STRERROR(ierr) 247 stop ""247 call abort_physic("wstats","Failed reading "//trim(nom),1) 248 248 endif 249 249 … … 265 265 write (*,*) "wstats error reading :",trim(nom) 266 266 write (*,*) NF_STRERROR(ierr) 267 stop ""267 call abort_physic("wstats","Failed reading "//trim(nom),1) 268 268 endif 269 269 endif … … 303 303 write (*,*) "wstats error writing :",trim(nom) 304 304 write (*,*) NF_STRERROR(ierr) 305 stop ""305 call abort_physic("wstats","Failed writing "//trim(nom),1) 306 306 endif 307 307 … … 325 325 write(*,*) "sd2d:",sd2d 326 326 write (*,*) NF_STRERROR(ierr) 327 stop ""327 call abort_physic("wstats","Failed writing "//trim(nom),1) 328 328 endif 329 329 … … 399 399 write (*,*) "inivar error writing variable" 400 400 write (*,*) NF_STRERROR(ierr) 401 stop ""401 call abort_physic("inivar","error writing variable",1) 402 402 endif 403 403 … … 445 445 write (*,*) "inivar error writing variable" 446 446 write (*,*) NF_STRERROR(ierr) 447 stop ""447 call abort_physic("inivar","error writing variable",1) 448 448 endif 449 449 … … 491 491 write(*,*) "def_var_stats: Failed defining variable "//trim(name) 492 492 write(*,*) NF_STRERROR(ierr) 493 stop ""493 call abort_physic("def_var_stats","Failed defining "//trim(name),1) 494 494 endif 495 495 … … 500 500 write(*,*) "def_var_stats: Failed writing title attribute for "//trim(name) 501 501 write(*,*) NF_STRERROR(ierr) 502 stop ""502 call abort_physic("def_var_stats","Failed writing title for "//trim(name),1) 503 503 endif 504 504 … … 508 508 write(*,*) "def_var_stats: Failed writing units attribute for "//trim(name) 509 509 write(*,*) NF_STRERROR(ierr) 510 stop ""510 call abort_physic("def_var_stats","Failed writing units for "//trim(name),1) 511 511 endif 512 512 -
trunk/LMDZ.MARS/libf/phymars/yamada4.F
r1774 r2311 16 16 !....................................................................... 17 17 ! MARS 18 #include "callkeys.h"18 include "callkeys.h" 19 19 !....................................................................... 20 20 ! … … 171 171 172 172 if (.not.(iflag_pbl.ge.6.and.iflag_pbl.le.10)) then 173 stop'probleme de coherence dans appel a MY' 173 call abort_physic("yamada4", 174 & 'probleme de coherence dans appel a MY',1) 174 175 endif 175 176 … … 608 609 !....................................................................... 609 610 ! MARS 610 #include "callkeys.h"611 include "callkeys.h" 611 612 !....................................................................... 612 613 ! … … 686 687 !....................................................................... 687 688 ! MARS 688 #include "callkeys.h"689 include "callkeys.h" 689 690 !....................................................................... 690 691 !
Note: See TracChangeset
for help on using the changeset viewer.