diff --git a/ben02/mod_ben02.F90 b/ben02/mod_ben02.F90 index f7154cca..513da355 100644 --- a/ben02/mod_ben02.F90 +++ b/ben02/mod_ben02.F90 @@ -658,11 +658,10 @@ subroutine initai real, dimension(0:atm_nwgt) :: r_wgt real :: piloc,min_d,d,r,l2 integer :: atm_idm_t,atm_jdm_t,idm_t,jdm_t,atm_nwgt_t,nw_2,is,js,it, & - jt,iso,jso,m,n,i,j,iii,ism1,isp1,jsm1,jsp1,itm1,itp1,jtm1, & - jtp1 + jt,iso,jso,m,n,i,j,iii,ism1,isp1,jsm1,jsp1,itm1,itp1,jtm1, & + jtp1,nfu logical :: dimok,exists character :: filename*120 - integer :: nfu ! --- Get global coordinates of p-points. call xcaget(tmp2da,plat,1) @@ -689,12 +688,12 @@ subroutine initai ! --- - Allocate memory for the atmospheric interpolation. allocate(atm_lon(atm_idm,atm_jdm), & - atm_lat(atm_idm,atm_jdm), & - atm_mask(atm_idm,atm_jdm), & - atm_topo(atm_idm,atm_jdm), & - atm_wgt(atm_nwgt,itdm,jtdm), & - atm_iwgt(atm_nwgt,itdm,jtdm), & - atm_jwgt(atm_nwgt,itdm,jtdm)) + atm_lat(atm_idm,atm_jdm), & + atm_mask(atm_idm,atm_jdm), & + atm_topo(atm_idm,atm_jdm), & + atm_wgt(atm_nwgt,itdm,jtdm), & + atm_iwgt(atm_nwgt,itdm,jtdm), & + atm_jwgt(atm_nwgt,itdm,jtdm)) ! --- - Read atmospheric lon/lat coordinates and land mask. filename = atm_path(1:atm_path_len)//'land.sfc.gauss.nc' @@ -881,12 +880,12 @@ subroutine fnlzai if (mnproc == 1) then deallocate(atm_lon, & - atm_lat, & - atm_mask, & - atm_topo, & - atm_wgt, & - atm_iwgt, & - atm_jwgt) + atm_lat, & + atm_mask, & + atm_topo, & + atm_wgt, & + atm_iwgt, & + atm_jwgt) end if end subroutine fnlzai @@ -1936,8 +1935,7 @@ subroutine rdcsic real, dimension(atm_idm,atm_jdm) :: atm_field real*4, dimension(atm_idm,atm_jdm) :: atm_field_r4 real, dimension(itdm,jtdm) :: tmp2d - integer :: i,j,k - integer :: nfu + integer :: i,j,k,nfu if (mnproc == 1) then write (lp,*) 'reading atm. climatological ice concentration...' @@ -1991,8 +1989,7 @@ subroutine rdctsf real, dimension(itdm,jtdm) :: tmp2d real :: dx2,dy2 integer, dimension(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) :: smtmsk - integer :: i,j,k,l - integer :: nfu + integer :: i,j,k,l,nfu if (mnproc == 1) then write (lp,*) & @@ -2105,53 +2102,52 @@ subroutine inifrc_ben02clim sht_sum,fwf_fac,dangle,garea,le,albedo,fac,swa_ave,lwa_ave, & lht_ave,sht_ave,crnf,cswa,A_cgs2mks real*4 :: rw4 - integer :: i,j,k,l,il,jl + integer :: i,j,k,l,il,jl,nfu integer*2 :: rn2,ri2,rj2 - integer :: nfu A_cgs2mks = 1./(L_mks2cgs**2) ! --- Allocate memory for additional monthly forcing fields. allocate(taud (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - tauxd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - tauyd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - dswrfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - nlwrfs(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - shtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - lhtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - precip(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - clouds(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - slpres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & - runoff(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12)) + tauxd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + tauyd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + dswrfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + nlwrfs(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + shtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + lhtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + precip(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + clouds(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + slpres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12), & + runoff(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,12)) ! --- Allocate memory for transfer coefficients, gustiness squared, and ! --- air density allocate(cd_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ch_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ce_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - wg2_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - cd_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ch_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ce_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - wg2_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rhoa(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + ch_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ce_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + wg2_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + cd_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ch_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ce_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + wg2_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rhoa(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- Allocate memory for accumulation variables allocate(tsi_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - tml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - sml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - alb_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - fice_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - tsi(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + tml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + sml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + alb_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + fice_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + tsi(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- Allocate memory for derivative of non-solar heat flux by surface ! --- temperature, albedos and instantaneous runoff flux and runoff ! --- reservoar allocate(dfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - albw(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - alb(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rnfins(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rnfres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + albw(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + alb(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rnfins(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rnfres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- number of iteration in the computation of transfer coefficients. tciter = 5 @@ -2171,8 +2167,8 @@ subroutine inifrc_ben02clim ! --- Allocate memory for temporary fields if (mnproc == 1) then allocate(atm_sktclm(atm_idm,atm_jdm,12), & - atm_field(atm_idm,atm_jdm), & - atm_field_r4(atm_idm,atm_jdm)) + atm_field(atm_idm,atm_jdm), & + atm_field_r4(atm_idm,atm_jdm)) end if ! --- Compute smoothing weights atm_ice_swgt and atm_rnf_swgt. For @@ -2658,8 +2654,8 @@ subroutine inifrc_ben02clim ! --- - areas allocate(rnf_wgt (atm_abdm,atm_idm,atm_jdm), & - rnf_ocdpi(atm_abdm,atm_idm,atm_jdm), & - rnf_ocdpj(atm_abdm,atm_idm,atm_jdm)) + rnf_ocdpi(atm_abdm,atm_idm,atm_jdm), & + rnf_ocdpj(atm_abdm,atm_idm,atm_jdm)) if (expcnf == 'single_column') then rnf_wgt = 0. @@ -2752,8 +2748,8 @@ subroutine inifrc_ben02clim if (mnproc == 1) then close (unit = nfu) deallocate(rnf_wgt, & - rnf_ocdpi, & - rnf_ocdpj) + rnf_ocdpi, & + rnf_ocdpj) end if call xctilr(runoff, 1,12, nbdy,nbdy, halo_ps) @@ -2761,8 +2757,8 @@ subroutine inifrc_ben02clim ! --- Deallocate memory used for interpolation of surface fields. if (mnproc == 1) then deallocate(atm_sktclm, & - atm_field, & - atm_field_r4) + atm_field, & + atm_field_r4) end if call fnlzai @@ -2935,53 +2931,52 @@ subroutine inifrc_ben02syn real :: dx2,dy2 real*4 :: rw4 - integer :: errstat,i,j,k,l + integer :: errstat,i,j,k,l,nfu integer*2 :: rn2,ri2,rj2 - integer :: nfu ! --- Allocate memory for daily forcing fields. allocate(taud (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - tauxd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - tauyd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - dswrfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - nlwrfs(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - shtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - lhtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - precip(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - clouds(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - slpres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - runoff(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - tmpsfc(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & - ricec (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5)) + tauxd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + tauyd (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + dswrfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + nlwrfs(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + shtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + lhtflx(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + precip(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + clouds(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + slpres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + runoff(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + tmpsfc(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5), & + ricec (1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy,5)) ! --- Allocate memory for transfer coefficients, gustiness squared, and ! --- air density allocate(cd_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ch_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ce_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - wg2_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - cd_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ch_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - ce_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - wg2_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rhoa(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + ch_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ce_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + wg2_d(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + cd_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ch_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + ce_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + wg2_m(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rhoa(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- Allocate memory for accumulation variables allocate(tsi_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - tml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - sml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - alb_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - fice_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - tsi(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + tml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + sml_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + alb_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + fice_tda(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + tsi(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- Allocate memory for derivative of non-solar heat flux by surface ! --- temperature, albedos and instantaneous runoff flux and runoff ! --- reservoar allocate(dfl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - albw(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - alb(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rnfins(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & - rnfres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) + albw(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + alb(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rnfins(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy), & + rnfres(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy)) ! --- Number of iteration in the computation of transfer coefficients. tciter = 1 @@ -3067,8 +3062,8 @@ subroutine inifrc_ben02syn ! --- - areas allocate(rnf_wgt (atm_abdm,atm_idm,atm_jdm), & - rnf_ocdpi(atm_abdm,atm_idm,atm_jdm), & - rnf_ocdpj(atm_abdm,atm_idm,atm_jdm)) + rnf_ocdpi(atm_abdm,atm_idm,atm_jdm), & + rnf_ocdpj(atm_abdm,atm_idm,atm_jdm)) open (newunit=nfu,file = 'runoffweights.uf', & form='unformatted',status='old',action = 'read') diff --git a/channel/mod_channel.F90 b/channel/mod_channel.F90 index 5e283124..f305b9fd 100644 --- a/channel/mod_channel.F90 +++ b/channel/mod_channel.F90 @@ -71,10 +71,9 @@ subroutine geoenv_channel real(r8), dimension(itdm,jtdm) :: rtmp real(r8) :: sldepth,sfdepth,rdepth,cwidth,swidth,scxy, & corio0, beta0, d_corru, r - integer :: i,j,l,ios + integer :: nfu,i,j,l,ios integer, dimension(:), allocatable :: seed logical :: fexist - integer :: nfu ! Read parameters from the namelist namelist /idlgeo/ sldepth,sfdepth,rdepth,acorru,wlcorru, & @@ -217,9 +216,8 @@ subroutine ictsz_channel 1 - nbdy:jdm + nbdy, kdm) :: dz real(r8), dimension(kdm) :: sigmr0, dz0 real(r8) :: S0,sig0,sig0dz,sigdz,sigscl,dztop,dzmax,dzscl - integer i,j,k,l,ios + integer :: nfu,i,j,k,l,ios logical :: fexist - integer :: nfu namelist /idlini/ S0,sig0,sig0dz,sigdz,sigscl,dztop,dzmax,dzscl @@ -334,9 +332,8 @@ subroutine inifrc_channel intrinsic tanh real(r8) :: ztx0,mty0,sst0,sss0 - integer :: i,j,l,k,ios + integer :: nfu,i,j,l,k,ios logical :: fexist - integer :: nfu namelist /idlfor/ ztx0,mty0,sst0,sss0 diff --git a/drivers/noforc/blom.F b/drivers/noforc/blom.F index c583c3e3..6cfe47ee 100644 --- a/drivers/noforc/blom.F +++ b/drivers/noforc/blom.F @@ -37,8 +37,7 @@ program blom # include "mpif.h" #endif c - integer i - integer nfu + integer :: nfu, i c #ifdef MPI call mpi_init diff --git a/phy/mod_budget.F90 b/phy/mod_budget.F90 index 9cd78266..403b592a 100644 --- a/phy/mod_budget.F90 +++ b/phy/mod_budget.F90 @@ -185,8 +185,7 @@ subroutine budget_output(m) integer, intent(in) :: m - integer :: i, j,l - integer :: nfu + integer :: nfu, i, j, l if (.not.cnsvdi) return diff --git a/phy/mod_dia.F90 b/phy/mod_dia.F90 index c14c5ae9..ccd19142 100644 --- a/phy/mod_dia.F90 +++ b/phy/mod_dia.F90 @@ -3355,8 +3355,7 @@ subroutine diasec(iogrp) integer :: iogrp ! Local variables - integer :: n,i,j,k,s,l - integer :: iostatus + integer :: nfu,iostatus,n,i,j,k,s,l integer, save :: nsi(max_sec) integer, save :: isi(max_sec,sdm) integer, save :: jsi(max_sec,sdm) @@ -3370,7 +3369,6 @@ subroutine diasec(iogrp) real, dimension(itdm,jtdm) :: & uflx_cumt,vflx_cumt,uflx_cum350t,vflx_cum350t real(8) :: volu,volv - integer :: nfu !--------------------------------------------------------------- ! read section information @@ -3505,7 +3503,7 @@ subroutine diamer(iogrp) integer, intent(in) :: iogrp ! Local variables - integer :: ncid,dimid,varid,i,j,k,l,m,n,o,s,ocn_nreg,iostatus + integer :: ncid,dimid,varid,i,j,k,l,m,n,o,s,ocn_nreg,nfu,iostatus integer :: istat,iind1,jind1,uflg1,vflg1,nind1 integer :: nfld,ACC_UIND,ACC_VIND,nind(ldm),iind(sdm,ldm),jind(sdm,ldm) integer :: kmxl(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) @@ -3517,7 +3515,6 @@ subroutine diamer(iogrp) real :: r character :: c20*20 logical :: iniflg = .true. - integer :: nfu save nind,iind,jind,oflg,uflg,vflg,depthst,iniflg,ocn_nreg diff --git a/phy/mod_diffusion.F90 b/phy/mod_diffusion.F90 index a43cdd9c..ba8de59f 100644 --- a/phy/mod_diffusion.F90 +++ b/phy/mod_diffusion.F90 @@ -195,9 +195,8 @@ subroutine readnml_diffusion ! Local variables character(len = 80) :: nml_fname - integer :: ios + integer :: nfu, ios logical :: fexist - integer :: nfu namelist /diffusion/ & egc, eggam, eglsmn, egmndf, egmxdf, egidfq, rhiscf, ri0, & diff --git a/phy/mod_geoenv.F90 b/phy/mod_geoenv.F90 index 40c77898..08984186 100644 --- a/phy/mod_geoenv.F90 +++ b/phy/mod_geoenv.F90 @@ -57,9 +57,8 @@ subroutine geoenv_file real, dimension(cwmlen) :: cwmwth integer, dimension(cwmlen) :: cwmi,cwmj integer, dimension(3) :: start,count - integer :: i,j,k,status,ncid,dimid,varid,ios,ncwm,l + integer :: i,j,k,status,ncid,dimid,varid,nfu,ios,ncwm,l logical :: fexist - integer :: nfu real, parameter :: iL_mks2cgs = 1./L_mks2cgs namelist /cwmod/ cwmtag,cwmedg,cwmi,cwmj,cwmwth diff --git a/phy/mod_idarlx.F90 b/phy/mod_idarlx.F90 index aa50f3c6..0ffc1828 100644 --- a/phy/mod_idarlx.F90 +++ b/phy/mod_idarlx.F90 @@ -40,8 +40,7 @@ subroutine idarlx() ! Local varaibles real, dimension(itdm,jtdm) :: tmp2d - integer :: i,j,k - integer :: nfu + integer :: nfu,i,j,k if (aptflx) then if (mnproc == 1) then diff --git a/phy/mod_rdlim.F90 b/phy/mod_rdlim.F90 index 7de210ab..c3424a51 100644 --- a/phy/mod_rdlim.F90 +++ b/phy/mod_rdlim.F90 @@ -124,8 +124,7 @@ subroutine rdlim() type(date_type) :: date0_rest character(len = 256) :: nlfnm,runtyp,rstfnm logical :: fexist - integer :: m,n,idate,idate0,ios - integer :: nfu + integer :: m,n,idate,idate0,nfu,ios namelist /limits/ nday1,nday2,idate,idate0,runid,expcnf,runtyp, & grfile,icfile,pref,baclin,batrop, & diff --git a/phy/mod_restart.F90 b/phy/mod_restart.F90 index d339f3e4..5db92863 100644 --- a/phy/mod_restart.F90 +++ b/phy/mod_restart.F90 @@ -1037,11 +1037,10 @@ subroutine restart_write ! Write model state to restart files. ! --------------------------------------------------------------------------- - integer :: i, j, n + integer :: nfu, i, j, n character(len = 256), dimension(4) :: rstdate_str character(len = 256) :: rstfnm, fnm character(len = 2) :: c2 - integer :: nfu ! Formulate restart filename. if (expcnf == 'cesm') then @@ -1280,12 +1279,11 @@ subroutine restart_read ! --------------------------------------------------------------------------- type(date_type) :: date_rest - integer errstat, dndiff, i, j, l, n + integer :: nfu, errstat, dndiff, i, j, l, n character(len = 256) :: rstfnm, fnm character(len = 2) :: c2 real(r8) :: pb_max, phi_min, rho_restart logical :: file_exist, fld_read - integer :: nfu ! Open restart file and adjust time information if needed. if (nday1 + nint(time0) == 0 .and. (.not.resume_flag)) then diff --git a/phy/mod_vcoord.F90 b/phy/mod_vcoord.F90 index a49f6eb5..7db1b85d 100644 --- a/phy/mod_vcoord.F90 +++ b/phy/mod_vcoord.F90 @@ -78,9 +78,8 @@ subroutine readnml_vcoord character(len = 80) :: nml_fname real(r8) :: dpmin - integer :: ios, k + integer :: nfu, ios, k logical :: fexist - integer :: nfu namelist /vcoord/ & vcoord_type, dpmin_surface, dpmin_inflation_factor, &