Changeset 2398
- Timestamp:
- Jul 6, 2020, 11:31:11 AM (4 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2397 r2398 3118 3118 nirco2abs: handle the (rare) case when input O mixing ratio is negative to avoid 3119 3119 generating NaN heating rates. 3120 3121 == 06/07/2020 == EM 3122 Some code cleanup: use "call abort_physic()" instead of "stop" or "call abort" -
trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F
r1775 r2398 27 27 c ============================================================= 28 28 29 #include "callkeys.h"29 include "callkeys.h" 30 30 31 31 c Local variables … … 544 544 WRITE(*,*)"Risk of division by 0 (aeroptproperties.F)" 545 545 WRITE(*,*)"Check the size of the interpolation grid." 546 CALL ABORT 546 CALL abort_physic("aeroptproperties", 547 & "Risk of division by 0",1) 547 548 ENDIF 548 549 IF (idomain.EQ.1) THEN ! VISIBLE DOMAIN ----------- … … 936 937 WRITE(*,*)"Risk of division by 0 (aeroptproperties.F)" 937 938 WRITE(*,*)"Check the size of the interpolation grid." 938 CALL ABORT 939 CALL abort_physic("aeroptproperties", 940 & "Risk of division by 0",1) 939 941 ENDIF 940 942 IF (idomain.EQ.1) THEN ! VISIBLE DOMAIN ----------- -
trunk/LMDZ.MARS/libf/phymars/callradite_mod.F
r2252 r2398 375 375 write(*,*)' ',iaer,' ',trim(name_iaer(iaer)) 376 376 enddo 377 stop377 call abort_physic("callradite","incoherent scatterers",1) 378 378 else 379 379 write(*,*) "callradite: found all scatterers, namely:" -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r2312 r2398 632 632 if (hdo.and..not.water) then 633 633 print*,'if hdo is used, water should be used too' 634 stop 634 call abort_physic(modname, 635 & "hd2 requires tracer",1) 635 636 endif 636 637 -
trunk/LMDZ.MARS/libf/phymars/eofdump_mod.F90
r2022 r2398 106 106 ! 107 107 ieofs=nint(daysec/dtphys) 108 if (abs(float(ieofs)-daysec/dtphys).gt.1.e-8*daysec) & 109 stop 'In ineofdump: 1 day .ne. n physics timesteps' 108 if (abs(float(ieofs)-daysec/dtphys).gt.1.e-8*daysec) then 109 call abort_physic("ineofdump",' 1 day .ne. n physics timesteps',1) 110 endif 110 111 ! 111 112 ! Header … … 118 119 do j=1+eofskip/2,nbp_lat,eofskip 119 120 ig = 1+ (j-2)*nbp_lon +i 120 if(j.eq.1) stop 'Problem in ineofdump.F' 121 if(j.eq.nbp_lat) stop 'Problem in ineofdump.F' 121 if(j.eq.1) then 122 call abort_physic("ineofdump",'Error: j==1',1) 123 endif 124 if(j.eq.nbp_lat) then 125 call abort_physic("ineofdump",'Error: j==nbp_lat',1) 126 endif 122 127 #ifdef NC_DOUBLE 123 128 write(uehead,*) real(longitude(ig)*180./pi),real(latitude(ig)*180./pi) -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r2324 r2398 431 431 if (hdo) then 432 432 if (igcm_h2o_vap.gt.igcm_hdo_vap) then 433 write(*,*) "Tracer H2O must be initialized before HDO"434 STOP433 call abort_physic("initracer", 434 & "Tracer H2O must be initialized before HDO",1) 435 435 else if ((nqfils(igcm_h2o_ice).lt.1) 436 436 & .or. (nqfils(igcm_h2o_vap).lt.1)) then 437 437 write(*,*) "HDO must be transported as a son", 438 438 & " of H2O: complete traceur.def" 439 STOP439 call abort_physic("initracer","adapt your tracer.def",1) 440 440 else if ((igcm_hdo_ice.lt.nq-2) 441 441 & .or. (igcm_hdo_vap.lt.nq-2)) then 442 442 write(*,*) "The isotopes (HDO) must be placed at", 443 443 & " the end of the list in traceur.def" 444 STOP444 call abort_physic("initracer","adapt your tracer.def",1) 445 445 endif 446 446 endif … … 753 753 write(*,*) " cannot use hdo option without ", 754 754 & "an hdo_vap tracer !" 755 stop755 call abort_physic("initracer","hdo cycle issue",1) 756 756 endif 757 757 if (igcm_hdo_ice.eq.0) then … … 759 759 write(*,*) " cannot use hdo option without ", 760 760 & "an hdo_ice tracer !" 761 stop761 call abort_physic("initracer","hdo cycle issue",1) 762 762 endif 763 763 endif -
trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
r2397 r2398 87 87 88 88 c parameters for CO2 heating fit 89 real n_a, n_p0, n_b 90 parameter (n_a=1.1956475) 91 parameter (n_b=1.9628251) 92 parameter (n_p0=0.0015888279) 89 real,parameter :: n_a=1.1956475 90 real,parameter :: n_p0=0.0015888279 91 real,parameter :: n_b=1.9628251 93 92 94 93 c Variables added to implement NLTE correction factor (feb 2011) … … 110 109 write(*,*) "nirco2abs error: I need a CO2 tracer" 111 110 write(*,*) " when running with nircorr==1" 112 stop111 call abort_physic("nirco2abs","need a CO2 tracer",1) 113 112 endif 114 113 io=igcm_o … … 116 115 write(*,*) "nirco2abs error: I need an O tracer" 117 116 write(*,*) " when running with nircorr==1" 118 stop117 call abort_physic("nirco2abs","need an O tracer",1) 119 118 endif 120 119 endif -
trunk/LMDZ.MARS/libf/phymars/nlte_aux.F
r2151 r2398 227 227 @ thist(1),thist(nhist) 228 228 write (*,*) ' HUNT/ location in grid:', xtemp(k) 229 stop ' INTERSHP/ Interpolation error. T out of Histogram.' 229 call abort_physic("intershphunt", 230 & 'INTERSHP/ Interpolation error. T out of Histogram.',1) 230 231 endif 231 232 factor = 1.d0 / (thist(i+1)-thist(i)) … … 286 287 $ thist(1),thist(nhist) 287 288 write(*,*)'HUNT/ location in grid:',xtemp(k) 288 stop'INTERSTR/1/ Interpolation error. T out of Histogram.' 289 call abort_physic("interstrhunt", 290 & 'INTERSTR/1/ Interpolation error. T out of Histogram.',1) 289 291 endif 290 292 factor = 1.d0 / (thist(i+1)-thist(i)) … … 315 317 @ thist(1),thist(nhist) 316 318 write (*,*) ' HUNT/ location in grid:', ts 317 stop ' INTERSTR/2/ Interpolat error. T out of Histogram.' 319 call abort_physic("interstrhunt", 320 & 'INTERSTR/2/ Interpolat error. T out of Histogram.',1) 318 321 endif 319 322 factor = 1.d0 / (thist(i+1)-thist(i)) … … 472 475 write (*,*) ' Subroutine WE/ Error in Voift EQS calculation' 473 476 write (*,*) ' WL, WD, X, Y = ', wl, wd, x, y 474 stop ' ERROR : Imaginary EQW. Revise spectral data. ' 477 call abort_physic("we_clean", 478 & 'ERROR : Imaginary EQW. Revise spectral data. ',1) 475 479 endif 476 480 … … 932 936 write (*,*) 'from d interp: new variable out of limits' 933 937 write (*,*) zzmin,'must be .ge. ',zmin 934 stop 935 ! elseif(zzmax.gt.zmax)then 936 ! type *,'from interp: new variable out of limits' 937 ! type *,zzmax, 'must be .le. ',zmax 938 ! stop 938 call abort_physic("interdp_limits","variable out of limits",1) 939 939 end if 940 940 … … 1027 1027 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1028 1028 write (*,*) ' HUNT/ location in new grid:', zz(i) 1029 stop ' interhunt2/ Interpolat error. zz out of limits.' 1029 call abort_physic("interhunt2veces", 1030 & 'interhunt2/ Interpolat error. zz out of limits.',1) 1030 1031 endif 1031 1032 … … 1090 1091 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1091 1092 write (*,*) ' HUNT/ location in new grid:', zz(i) 1092 stop ' interhunt5/ Interpolat error. zz out of limits.' 1093 call abort_physic("interhunt5veces", 1094 & 'interhunt5/ Interpolat error. zz out of limits.',1) 1093 1095 endif 1094 1096 … … 1158 1160 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1159 1161 write (*,*) ' HUNT/ location in new grid:', zz(i) 1160 stop ' INTERHUNTDP3/ Interpolat error. zz out of limits.' 1162 call abort_physic("interhuntdp3veces", 1163 & 'INTERHUNTDP3/ Interpolat error. zz out of limits.',1) 1161 1164 endif 1162 1165 … … 1224 1227 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1225 1228 write (*,*) ' HUNT/ location in new grid:', zz(i) 1226 stop ' INTERHUNTDP4/ Interpolat error. zz out of limits.' 1229 call abort_physic("interhuntdp4veces", 1230 & 'INTERHUNTDP4/ Interpolat error. zz out of limits.',1) 1227 1231 endif 1228 1232 … … 1292 1296 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1293 1297 write (*,*) ' HUNT/ location in new grid:', zz(i) 1294 stop ' INTERHUNT/ Interpolat error. zz out of limits.' 1298 call abort_physic("interhuntdp", 1299 & 'INTERHUNT/ Interpolat error. zz out of limits.',1) 1295 1300 endif 1296 1301 … … 1354 1359 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1355 1360 write (*,*) ' HUNT/ location in new grid:', zz(i) 1356 stop ' interhunt/ Interpolat error. z out of limits.' 1361 call abort_physic("interhunt", 1362 & 'interhunt/ Interpolat error. z out of limits.',1) 1357 1363 endif 1358 1364 … … 1432 1438 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1433 1439 write (*,*) ' HUNT/ location in new grid:', zz(i) 1434 stop ' interhuntlimits/ Interpolat error. z out of limits.' 1440 call abort_physic("interhuntlimits2veces", 1441 & 'interhuntlimits/ Interpolat error. z out of limits.',1) 1435 1442 endif 1436 1443 … … 1522 1529 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1523 1530 write (*,*) ' HUNT/ location in new grid:', zz(i) 1524 stop ' interhuntlimits/ Interpolat error. z out of limits.' 1531 call abort_physic("interhuntlimits5veces", 1532 & 'interhuntlimits/ Interpolat error. z out of limits.',1) 1525 1533 endif 1526 1534 … … 1622 1630 write (*,*) ' HUNT/ Limits input grid:', z(1),z(n) 1623 1631 write (*,*) ' HUNT/ location in new grid:', zz(i) 1624 stop ' interhuntlimits/ Interpolat error. z out of limits.' 1632 call abort_physic("interhuntlimits", 1633 & 'interhuntlimits/ Interpolat error. z out of limits.',1) 1625 1634 endif 1626 1635 … … 1712 1721 11 continue 1713 1722 if (aamax.eq.0.0) then 1714 write(*,*) 'ludcmp_dp: singular matrix!' 1715 stop 1723 call abort_physic("ludcmp_dp","singular matrix!",1) 1716 1724 endif 1717 1725 vv(i)=1.0d0/aamax … … 2287 2295 else 2288 2296 2289 write (*,*) ' Error in suaviza.f Wrong ismooth value.' 2290 stop 2297 call abort_physic("suaviza","Wrong ismooth value",1) 2291 2298 2292 2299 endif … … 2403 2410 if ( nbox_stored(ihist) .gt. nbox_max ) then 2404 2411 write (*,*) ' nbox too large in input file ', hisfile 2405 stop ' Check maximum number nbox_max in mz1d.par ' 2412 call abort_physic("rhist_03", 2413 & 'Check maximum number nbox_max in mz1d.par ',1) 2406 2414 endif 2407 2415 -
trunk/LMDZ.MARS/libf/phymars/nlte_calc.F
r2151 r2398 767 767 else 768 768 write (*,*) ' Error in 626 hot band index ik =', ik 769 stop ' ik can only be = 2,3,4. Check needed.' 769 call abort_physic("MZMC121", 770 & ' ik can only be = 2,3,4. Check needed.',1) 770 771 end if 771 772 do j=1,nl -
trunk/LMDZ.MARS/libf/phymars/nlte_tcool.F
r1524 r2398 277 277 write (*,*) ' p_gcm, Pbottom_atm =', 278 278 $ p_gcm(n_gcm), Pbottom_atm 279 stop ' Check input value "p_gcm" or modify "Pbottom_atm" ' 279 call abort_physic("nlte_tcool", 280 & 'Check input value "p_gcm" or modify "Pbottom_atm"',1) 280 281 endif 281 282 enddo … … 1632 1633 1633 1634 1634 stop ' Stopped in NLTE scheme due to severe error.' 1635 call abort_physic("nlte_tcool", 1636 & 'Stopped in NLTE scheme due to severe error.',1) 1635 1637 end -
trunk/LMDZ.MARS/libf/phymars/read_dust_scenario.F90
r2137 r2398 103 103 write(*,*)' can be obtained online on:' 104 104 write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' 105 CALL ABORT105 CALL abort_physic("read_dust_scenario","Cannot find file",1) 106 106 ENDIF 107 107 … … 132 132 PRINT*, "Error: read_dust_scenario <dustop> not found" 133 133 write(*,*)trim(nf90_strerror(ierr)) 134 stop134 call abort_physic("read_dust_scenario","dustop not found",1) 135 135 ENDIF 136 136 else … … 141 141 PRINT*, "Error: read_dust_scenario <cdod> not found" 142 142 write(*,*)trim(nf90_strerror(ierr)) 143 stop143 call abort_physic("read_dust_scenario","cdod not found",1) 144 144 ENDIF 145 145 ! and multiply by 2*1.3=2.6 to convert from IR absorption … … 153 153 PRINT*, "Error: read_dust_scenario <Time> not found" 154 154 write(*,*)trim(nf90_strerror(ierr)) 155 stop155 call abort_physic("read_dust_scenario","Time not found",1) 156 156 ENDIF 157 157 … … 161 161 PRINT*, "Error: read_dust_scenario <latitude> not found" 162 162 write(*,*)trim(nf90_strerror(ierr)) 163 stop163 call abort_physic("read_dust_scenario","latitude not found",1) 164 164 ENDIF 165 165 … … 169 169 PRINT*, "Error: read_dust_scenario <longitude> not found" 170 170 write(*,*)trim(nf90_strerror(ierr)) 171 stop171 call abort_physic("read_dust_scenario","longitude not found",1) 172 172 ENDIF 173 173 … … 191 191 ! check if it is by a large amount 192 192 if ((londeg+180).lt.-1.e-3) then 193 write(*,*) 'reattesassim: error!!'194 193 write(*,*) ' ig=',ig,' londeg=',londeg 195 stop194 call abort_physic("read_dust_scenario","longitude way out of range",1) 196 195 else 197 196 londeg=-180 … … 246 245 write (*,*) "yinf: ",yinf 247 246 write (*,*) "ysup: ",ysup 248 stop247 call abort_physic("read_dust_scenario","invalid coordinates",1) 249 248 endif 250 249 … … 319 318 write (*,*) "tau2 ",taubuf(2) 320 319 write (*,*) "tau ",tau1(iloop) 321 stop320 call abort_physic("read_dust_scenario","negative tau!",1) 322 321 endif 323 322 enddo … … 329 328 write (*,*) "dlon: ",dlon 330 329 write (*,*) "lon: ",londeg 331 stop330 call abort_physic("read_dust_scenario","negative dlat or dlon!",1) 332 331 endif 333 332
Note: See TracChangeset
for help on using the changeset viewer.