From 2a73d8cb5c9e003bb4377690ccca557425516d0e Mon Sep 17 00:00:00 2001 From: GeorgeGayno-NOAA <52789452+GeorgeGayno-NOAA@users.noreply.github.com> Date: Wed, 21 Apr 2021 09:55:49 -0400 Subject: [PATCH] Use correct error messaging in global_cycle.fd (#438) Update error messaging in the global_cycle program to conform to the NCO standard. The standard is to preface all error messages that stop program execution with "FATAL ERROR". Fixes #368. --- sorc/global_cycle.fd/cycle.f90 | 2 +- sorc/global_cycle.fd/read_write_data.f90 | 13 +- sorc/global_cycle.fd/sfcsub.F | 173 ++++++++++++----------- 3 files changed, 102 insertions(+), 86 deletions(-) diff --git a/sorc/global_cycle.fd/cycle.f90 b/sorc/global_cycle.fd/cycle.f90 index 1aab2ce28..7302f2a36 100644 --- a/sorc/global_cycle.fd/cycle.f90 +++ b/sorc/global_cycle.fd/cycle.f90 @@ -1802,7 +1802,7 @@ subroutine get_tim_wei(iy,im,id,ih,mon1,mon2,wei1,wei2) endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR in get_tim_wei, wrong rjday',rjday call abort 10 continue diff --git a/sorc/global_cycle.fd/read_write_data.f90 b/sorc/global_cycle.fd/read_write_data.f90 index dd1e5cce1..4eb1b57d3 100644 --- a/sorc/global_cycle.fd/read_write_data.f90 +++ b/sorc/global_cycle.fd/read_write_data.f90 @@ -1656,7 +1656,7 @@ subroutine read_tf_clim_grb(file_sst,sst,rlats_sst,rlons_sst,mlat_sst,mlon_sst,m write(*,*) ' sstclm : ',file_sst call baopenr(lu_sst,trim(file_sst),iret) if (iret /= 0 ) then - write(6,*)'read_tf_clm_grb: ***error*** opening sst file' + write(6,*)'FATAL ERROR in read_tf_clm_grb: error opening sst file.' CALL MPI_ABORT(MPI_COMM_WORLD, 111, ierr) endif @@ -1683,13 +1683,13 @@ subroutine read_tf_clim_grb(file_sst,sst,rlats_sst,rlons_sst,mlat_sst,mlon_sst,m ! read in the analysis call getgb(lu_sst,0,jf,j,jpds,jgds,kf,k,kpds,kgds,lb,f,iret) if (iret /= 0) then - write(6,*)'read_tf_clm_grb: ***error*** reading sst analysis data record' + write(6,*)'FATAL ERROR in read_tf_clm_grb: error reading sst analysis data record.' deallocate(lb,f) CALL MPI_ABORT(MPI_COMM_WORLD, 111, ierr) endif if ( (nlat_sst /= mlat_sst) .or. (nlon_sst /= mlon_sst) ) then - write(6,*)'read_rtg_org: inconsistent dimensions. mlat_sst,mlon_sst=',& + write(6,*)'FATAL ERROR in read_rtg_org: inconsistent dimensions. mlat_sst,mlon_sst=',& mlat_sst,mlon_sst,' -versus- nlat_sst,nlon_sst=',nlat_sst,nlon_sst deallocate(lb,f) CALL MPI_ABORT(MPI_COMM_WORLD, 111, ierr) @@ -1746,7 +1746,7 @@ subroutine read_tf_clim_grb(file_sst,sst,rlats_sst,rlons_sst,mlat_sst,mlon_sst,m call baclose(lu_sst,iret) if (iret /= 0 ) then - write(6,*)'read_tf_clm_grb: ***error*** close sst file' + write(6,*)'FATAL ERROR in read_tf_clm_grb: error closing sst file.' CALL MPI_ABORT(MPI_COMM_WORLD, 121, ierr) endif @@ -1782,7 +1782,7 @@ subroutine get_tf_clm_dim(file_sst,mlat_sst,mlon_sst) ! open sst analysis file (grib) call baopenr(lu_sst,trim(file_sst),iret) if (iret /= 0 ) then - write(6,*)'get_tf_clm_dim: ***error*** opening sst file' + write(6,*)'FATAL ERROR in get_tf_clm_dim: error opening sst file.' CALL MPI_ABORT(MPI_COMM_WORLD, 111, ierr) endif @@ -1802,7 +1802,7 @@ subroutine get_tf_clm_dim(file_sst,mlat_sst,mlon_sst) call baclose(lu_sst,iret) if (iret /= 0 ) then - write(6,*)'get_tf_clm_dim: ***error*** close sst file' + write(6,*)'FATAL ERROR in get_tf_clm_dim: error closing sst file.' CALL MPI_ABORT(MPI_COMM_WORLD, 121, ierr) endif end subroutine get_tf_clm_dim @@ -1940,6 +1940,7 @@ subroutine nc_check(status) integer :: ierr if(status /= nf90_noerr) then + print *, 'FATAL ERROR:' print *, trim(nf90_strerror(status)) CALL MPI_ABORT(MPI_COMM_WORLD, 122, ierr) end if diff --git a/sorc/global_cycle.fd/sfcsub.F b/sorc/global_cycle.fd/sfcsub.F index a05452ba2..cd0604a89 100644 --- a/sorc/global_cycle.fd/sfcsub.F +++ b/sorc/global_cycle.fd/sfcsub.F @@ -2874,8 +2874,8 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,'FATAL ERROR: in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -2902,7 +2902,7 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, kpds0(4)=-1 kpds0(18)=-1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret if (iret == 99) write(6,*) ' field not found.' call abort endif @@ -2921,13 +2921,13 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, data8 = real(data4, kind=kind_io8) deallocate(data4) else - write(0,*)' Invalid w3kindreal --- aborting' + write(0,*)' FATAL ERROR: Invalid w3kindreal ' call abort endif ! if(jret == 0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort @@ -2943,7 +2943,7 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, else if (me ==. 0) write(6,*) 'idim,jdim=',idim,jdim &, ' gaus=',gaus,' blno=',blno,' blto=',blto - write(6,*) ' error in getgb : jret=',jret + write(6,*) ' FATAL ERROR in getgb : jret=',jret write(6,*) ' kpds(13)=',kpds(13),' kpds(15)=',kpds(15) call abort endif @@ -3031,18 +3031,15 @@ subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr return ! elseif(kgds(1).eq.1) then ! mercator projection - write(6,*) 'mercator grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process mercator grid.' call abort ! elseif(kgds(1).eq.2) then ! gnomonic projection - write(6,*) 'gnomonic grid' - write(6,*) 'error!! gnomonic projection not coded' + write(6,*) 'FATAL ERROR: cannot process gnomonic grid.' call abort ! elseif(kgds(1).eq.3) then ! lambert conformal - write(6,*) 'lambert conformal' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process lambert conf grid.' call abort elseif(kgds(1).eq.4) then ! gaussian grid ! @@ -3084,33 +3081,33 @@ subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr return ! elseif(kgds(1).eq.5) then ! polar strereographic - write(6,*) 'polar stereographic grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'polar stereographic grid.' call abort return ! elseif(kgds(1).eq.13) then ! oblique lambert conformal - write(6,*) 'oblique lambert conformal grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'oblique lambert conformal grid.' call abort ! elseif(kgds(1).eq.50) then ! spherical coefficient - write(6,*) 'spherical coefficient' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'spherical coefficient grid.' call abort return ! elseif(kgds(1).eq.90) then ! space view perspective ! (orthographic grid) - write(6,*) 'space view perspective grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'space view perspective grid.' call abort return ! else ! unknown projection. abort. - write(6,*) 'error!! unknown map projection' + write(6,*) 'FATAL ERROR: unknown map projection' write(6,*) 'kgds(1)=',kgds(1) - print *,'error!! unknown map projection' + print *,'FATAL ERROR: unknown map projection' print *,'kgds(1)=',kgds(1) call abort endif @@ -3662,9 +3659,8 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp, i2 = iindx2(i) if(wrk(i) .eq. 0.0) then if(.not.lmask) then - if (num_threads == 1) - & write(6,*) ' la2ga called with lmask=.true. but bad', - & ' rslmsk or slmask given' + write(6,*) ' FATAL ERROR: la2ga called with lmask=true' + write(6,*) ' But bad rslmsk or slmask given.' call abort endif ifill(it) = ifill(it) + 1 @@ -3711,11 +3707,10 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp, endif enddo ! - if (num_threads == 1) then - write(6,*) ' error!!! no filling value found in la2ga' + write(6,*) ' FATAL ERROR: no filling value' + write(6,*) ' found in la2ga.' ! write(6,*) ' i ix jx slmask(i) rslmsk ', ! & i,ix,jx,slmask(i),rslmsk(ix,jx) - endif call abort ! 71 continue @@ -4146,7 +4141,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irttsf = iret if(iret == 1) then - write(6,*) 't surface analysis read error' + write(6,*) 'FATAL ERROR: t surface analysis read error.' call abort elseif(iret == -1) then if (me == 0) then @@ -4172,11 +4167,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) if(iret == 1) then - write(6,*) 't surface at ft=0 analysis read error' + write(6,*) 'FATAL ERROR: t surface at ft=0 analysis' + write(6,*) 'read error.' call abort elseif(iret == -1) then if (me == 0) then - write(6,*) 'could not find t surface analysis at ft=0' + write(6,*) 'FATAL ERROR: Could not find t surface' + write(6,*) 'analysis at ft=0.' endif call abort else @@ -4199,7 +4196,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtalb=iret if(iret.eq.1) then - write(6,*) 'albedo analysis read error' + write(6,*) 'FATAL ERROR: Albedo analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4230,7 +4227,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtalf=iret if(iret.eq.1) then - write(6,*) 'albedo analysis read error' + write(6,*) 'FATAL ERROR: Albedo analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4261,7 +4258,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtwet=iret if(iret.eq.1) then - write(6,*) 'bucket wetness analysis read error' + write(6,*) 'FATAL ERROR: Bucket wetness analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4283,7 +4280,8 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtsmc=iret if(iret.eq.1) then - write(6,*) 'layer soil wetness analysis read error' + write(6,*) 'FATAL ERROR: Layer soil wetness analysis' + write(6,*) 'read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4318,8 +4316,8 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, !cggg the grib parameter id number. call baopenr(lugb,fnsnoa,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fnsnoa) - print *,'error in opening file ',trim(fnsnoa) + write(6,*) 'FATAL ERROR: in opening file ',trim(fnsnoa) + print *,'FATAL ERROR: in opening file ',trim(fnsnoa) call abort endif lugi=0 @@ -4331,8 +4329,9 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & lskip,kpds,kgds,iret) close(lugb) if (iret .ne. 0) then - write(6,*) ' error reading header of file: ',trim(fnsnoa) - print *,'error reading header of file: ',trim(fnsnoa) + write(6,*) ' FATAL ERROR: Reading header' + write(6,*) ' of file: ',trim(fnsnoa) + print *,'FATAL ERROR: Reading header of file: ',trim(fnsnoa) call abort endif if (kgds(1) == 4) then ! gaussian data is depth @@ -4351,7 +4350,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, !cggg snow mods end irtscv=iret if(iret.eq.1) then - write(6,*) 'snow depth analysis read error' + write(6,*) 'FATAL ERROR: snow depth analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4373,7 +4372,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtsno=iret if(iret.eq.1) then - write(6,*) 'snow cover analysis read error' + write(6,*) 'FATAL ERROR: snow cover analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4402,7 +4401,8 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtacn=iret if(iret.eq.1) then - write(6,*) 'ice concentration analysis read error' + write(6,*) 'FATAL ERROR: ice concentration' + write(6,*) 'analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4421,7 +4421,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtais=iret if(iret.eq.1) then - write(6,*) 'ice mask analysis read error' + write(6,*) 'FATAL ERROR: ice mask analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4449,7 +4449,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtzor=iret if(iret.eq.1) then - write(6,*) 'roughness analysis read error' + write(6,*) 'FATAL ERROR: roughness analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4478,7 +4478,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irttg3=iret if(iret.eq.1) then - write(6,*) 'deep soil tmp analysis read error' + write(6,*) 'FATAL ERROR: deep soil tmp analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4501,7 +4501,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtstc=iret if(iret.eq.1) then - write(6,*) 'layer soil tmp analysis read error' + write(6,*) 'FATAL ERROR: layer soil tmp analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4530,7 +4530,8 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtveg=iret if(iret.eq.1) then - write(6,*) 'vegetation cover analysis read error' + write(6,*) 'FATAL ERROR: vegetation cover analysis' + write(6,*) 'read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4540,7 +4541,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, write(6,*) 'forecast guess will be used' endif else - if (me .eq. 0) print *,'gegetation cover analysis provided.' + if (me .eq. 0) print *,'vegetation cover analysis provided.' endif else if (me .eq. 0) then @@ -4559,7 +4560,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtvet=iret if(iret.eq.1) then - write(6,*) 'vegetation type analysis read error' + write(6,*) 'FATAL ERROR: vegetation type analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4588,7 +4589,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtsot=iret if(iret.eq.1) then - write(6,*) 'soil type analysis read error' + write(6,*) 'FATAL ERROR: soil type analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4619,7 +4620,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtvmn=iret if(iret.eq.1) then - write(6,*) 'shdmin analysis read error' + write(6,*) 'FATAL ERROR: shdmin analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4649,7 +4650,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtvmx=iret if(iret.eq.1) then - write(6,*) 'shdmax analysis read error' + write(6,*) 'FATAL ERROR: shdmax analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4679,7 +4680,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtslp=iret if(iret.eq.1) then - write(6,*) 'slope type analysis read error' + write(6,*) 'FATAL ERROR: slope type analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4709,7 +4710,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, &, outlat, outlon, me) irtabs=iret if(iret.eq.1) then - write(6,*) 'snoalb analysis read error' + write(6,*) 'FATAL ERROR: snoalb analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4926,7 +4927,8 @@ subroutine rof01(aisfld,len,op,crit) endif enddo else - write(6,*) ' illegal operator in rof01. op=',op + write(6,*) 'FATAL ERROR: Illegal operator' + write(6,*) 'in rof01. op=',op call abort endif ! @@ -5702,7 +5704,7 @@ subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, do i=1,len if(slifcs(i).ne.slianl(i)) then if(slifcs(i).eq.1..or.slianl(i).eq.1.) then - print *,'inconsistency in slifcs or slianl' + print *,'FATAL ERROR: Inconsistency in slifcs or slianl' print 910,rla(i),rlo(i),slifcs(i),slianl(i), & tsffcs(i),tsfanl(i) 910 format(2x,'at lat=',f5.1,' lon=',f5.1,' slifcs=',f4.1, @@ -5857,7 +5859,8 @@ subroutine qcsice(ais,glacir,amxice,aicice,aicsea,sllnd,slmask, kount1 = 0 do i=1,len if(ais(i).ne.aicice.and.ais(i).ne.aicsea) then - print *,'sea ice mask not ',aicice,' or ',aicsea + print *,'FATAL ERROR: sea ice' + print *,'mask not ',aicice,' or ',aicsea print *,'ais(i),aicice,aicsea,rla(i),rlo(i,=', & ais(i),aicice,aicsea,rla(i),rlo(i) call abort @@ -6926,6 +6929,8 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, rltout(j) = rnlat + (j-1) * dlat enddo else ! grib file on some other grid + write(6,*) ' FATAL ERROR: Mask data on' + write(6,*) ' unsupported grid.' call abort endif dlon = 360.0 / imax @@ -8027,7 +8032,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, go to 10 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: Wrong rjday',rjday call abort 10 continue wei1m = (dayhf(mon2)-rjday)/(dayhf(mon2)-dayhf(mon1)) @@ -8106,7 +8111,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, go to 20 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: Wrong rjday',rjday call abort 20 continue wei1m = (dayhf(mon2)-rjday)/(dayhf(mon2)-dayhf(mon1)) @@ -8130,7 +8135,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, go to 30 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: Wrong rjday',rjday call abort 30 continue wei1s = (dayhf(sea2)-rjday)/(dayhf(sea2)-dayhf(sea1)) @@ -8154,7 +8159,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, go to 31 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: Wrong rjday',rjday call abort 31 continue wei1y = (dayhf(hyr2)-rjday)/(dayhf(hyr2)-dayhf(hyr1)) @@ -8243,7 +8248,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, if (me .eq. 0) write(6,*) 'climatological vegetation', & ' type read in.' elseif(index(fnsmcc,'soilmgldas') /= 0) then ! new soil moisture climo - if (me .eq. 0) write(6,*) 'fatal error: must choose' + if (me .eq. 0) write(6,*) 'FATAL ERROR: must choose' if (me .eq. 0) write(6,*) 'climatological veg type when' if (me .eq. 0) write(6,*) 'using new gldas soil moisture.' call abort @@ -8458,7 +8463,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, deallocate(slmask_noice) endif else - write(6,*) 'climatological soil wetness file not given' + write(6,*) 'FATAL ERROR: climatological soil' + write(6,*) 'wetness file not given.' call abort endif ! @@ -8491,7 +8497,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) else - write(6,*) 'climatological ice cover file not given' + write(6,*) 'FATAL ERROR: climatological ice' + write(6,*) 'cover file not given.' call abort endif ! @@ -8727,7 +8734,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, deallocate(slmask_noice) endif else - write(6,*) 'climatological soil wetness file not given' + write(6,*) 'FATAL ERROR: climatological soil' + write(6,*) 'wetness file not given.' call abort endif ! @@ -8745,7 +8753,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) else - write(6,*) 'climatological ice cover file not given' + write(6,*) 'FATAL ERROR: climatological ice cover' + write(6,*) 'file not given.' call abort endif ! @@ -8812,7 +8821,10 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, ! set to point at the proper vegetation type file. if (fnzorc(1:3) == 'sib') then if (fnvetc(1:4) == ' ') then - if (me==0) write(6,*) "must choose sib veg type climo file" + if (me==0) then + write(6,*) " FATAL ERROR: Must choose sib" + write(6,*) " veg type climo file." + endif call abort endif zorclm = 0.0 @@ -8824,7 +8836,10 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, enddo elseif(fnzorc(1:4) == 'igbp') then if (fnvetc(1:4) == ' ') then - if (me == 0) write(6,*) "must choose igbp veg type climo file" + if (me == 0) then + write(6,*) " FATAL ERROR: Must choose igbp" + write(6,*) " veg type climo file." + endif call abort endif zorclm = 0.0 @@ -9080,7 +9095,7 @@ subroutine fixrdc_tile(filename_raw, tile_num_ch, case(256:257) error=nf90_inq_varid(ncid, 'vegetation_greenness', id_var) case default - print*,'fatal error in fixrdc_tile of sfcsub.F.' + print*,'FATAL ERROR in fixrdc_tile of sfcsub.F.' print*,'unknown variable.' call abort end select @@ -9157,7 +9172,7 @@ subroutine netcdf_err(error) character(len=256) :: errmsg errmsg = nf90_strerror(error) - print*,'fatal error in sfcsub.F: ', trim(errmsg) + print*,'FATAL ERROR in sfcsub.F: ', trim(errmsg) call abort end subroutine netcdf_err @@ -9235,8 +9250,8 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,'FATAL ERROR: in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -9263,7 +9278,7 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, kpds0(4) = -1 kpds0(18) = -1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret if (iret==99) write(6,*) ' field not found.' call abort endif @@ -9290,7 +9305,7 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & (kpds(i),i=8,11) if(jret.eq.0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb.' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort @@ -9307,7 +9322,7 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, enddo if (me .eq. 0) write(6,*) 'imax,jmax,ijmax=',imax,jmax,ijmax else - write(6,*) ' error in getgb - jret=', jret + write(6,*) ' FATAL ERROR: in getgb - jret=', jret call abort endif ! @@ -9490,8 +9505,8 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,' FATAL ERROR: in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -9517,7 +9532,7 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, kpds0(4)=-1 kpds0(18)=-1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret if(iret==99) write(6,*) ' field not found.' call abort endif @@ -9561,7 +9576,7 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, & (kpds(i),i=8,11) if(jret.eq.0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb.' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort