19 subroutine merge(lon, lat, binary_lake, lat2d, ocn_frac, &
20 lake_frac, lake_depth, land_frac, slmsk)
24 integer,
intent(in) :: lon, lat, binary_lake
26 real,
intent(in) :: lat2d(lon,lat)
27 real,
intent(in) :: ocn_frac(lon,lat)
28 real,
intent(inout) :: lake_frac(lon,lat)
29 real,
intent(inout) :: lake_depth(lon,lat)
30 real,
intent(out) :: land_frac(lon,lat)
31 real,
intent(out) :: slmsk(lon,lat)
33 real,
parameter :: min_land=1.e-4, def_lakedp=10.
35 integer :: i, j, nodp_pt, lake_pt
42 if (binary_lake.eq.1) lake_frac(i,j)=nint(lake_frac(i,j))
43 if (lat2d(i,j).le.-60.) lake_frac(i,j)=0.
44 land_frac(i,j)=1.-ocn_frac(i,j)
45 if (land_frac(i,j) < min_land) land_frac(i,j)=0.
46 if (land_frac(i,j) > 1.-min_land) land_frac(i,j)=1.
47 if (1.-land_frac(i,j) > 0.) lake_frac(i,j)=0.
49 if (lake_frac(i,j) > 0.)
then 51 if (binary_lake.eq.1)
then 54 land_frac(i,j)=1.-lake_frac(i,j)
56 if (lake_depth(i,j) <= 0.)
then 57 lake_depth(i,j)=def_lakedp
63 slmsk(i,j) = nint(land_frac(i,j))
67 write(*,
'(a,i8,a,i8,a)')
'Total lake point ',lake_pt,
' where ',nodp_pt,
' has no depth'