diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 index e9aa93a87..aac888d8e 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mod_process_hres_data.F90 @@ -1401,7 +1401,7 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) integer :: yy,j,month integer, allocatable, dimension (:) :: vegcls real, allocatable, dimension (:) :: & - modisvf, modisnf,albvf,albnf, lat,lon, & + modisvf, modisnf,albvf,albnf, & green,lai,lai_before,lai_after,grn_before,grn_after real, allocatable, dimension (:) :: & calbvf,calbnf, zero_array, one_array, albvr,albnr @@ -1435,8 +1435,8 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) close (10,status='keep') fname=trim(gfile)//'.til' - open (10,file=fname,status='old',action='read',form='formatted') + fname='clsm/mosaic_veg_typs_fracs' open (20,file=fname,status='old',action='read',form='formatted') @@ -1451,9 +1451,9 @@ SUBROUTINE modis_scale_para_high (ease_grid,MA,gfile) do n = 1,ip if (ease_grid) then - read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm + read(10,*,IOSTAT=ierr) typ !,pfs,lont,latt,ig,jg,fr_gcm else - read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & + read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & typ,tarea,lont,latt,ig,jg,fr_gcm,indx_dum,pfs,j_dum,fr_cat,j_dum endif if (typ == 100) then diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 index fd381b50c..33b2902a4 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/rmTinyCatchParaMod.F90 @@ -2728,7 +2728,7 @@ SUBROUTINE cti_stat_file (ease_grid,gfile, MaskFile) if (ease_grid) then read(10,*,IOSTAT=ierr) typ,pfs,lon,lat,ig,jg,fr_gcm,i_dum else - read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & + read(10,'(I10,3E20.12,9(2I10,E20.12,I10))',IOSTAT=ierr) & typ,tarea,lon,lat,ig,jg,fr_gcm,indx_dum,pfs,i_dum,fr_cat,j_dum endif @@ -6215,9 +6215,9 @@ SUBROUTINE FUNCIDEP( & endif enddo locmax=MAX(3,indimax10) - - endif ! if (nmax .ge. shift+1) - + ! add protection here in case nmax <3 . why 3 ? + if (locmax > nmax) locmax = nmax + endif ! if (nmax .ge. shift+1) 30 densmax=denstest(idep,locmax) aa(idep)=exp(1.)*densmax @@ -6441,10 +6441,10 @@ SUBROUTINE FUNCZBAR( & densaux(n) .gt. densaux(n-11) .and. & densaux(n) .gt. densaux(n-12) .and. & densaux(n) .gt. densaux(n-13) .and. & - densaux(n) .gt. densaux(n-14) .and. & - densaux(n) .gt. densaux(n-15)) then - locmax=n - goto 30 + densaux(n) .gt. densaux(n-14)) then ! .and. & + !densaux(n) .gt. densaux(n-15)) then + locmax=n + goto 30 endif enddo @@ -6459,7 +6459,8 @@ SUBROUTINE FUNCZBAR( & endif enddo locmax=MAX(3,indimax10) - + ! in case nmax < 3. why hard coded 3? + if(locmax > nmax) locmax = nmax endif ! if (nmax .ge. shift+1) 30 densmax=denstest(locmax)