ocean_merge 1.14.0
Loading...
Searching...
No Matches
merge_lake_ocnmsk.F90
Go to the documentation of this file.
1
7
18
19 implicit none
20
21 character(len=200) :: pth1
22 character(len=200) :: pth2,pth3
23 character(len=10) :: atmres,ocnres
24
25 integer :: binary_lake
26 integer :: lat,lon,tile
27
28 real, allocatable :: lake_frac(:,:),lake_depth(:,:),land_frac(:,:),ocn_frac(:,:),slmsk(:,:),lat2d(:,:)
29
30 print*,"- BEGIN OCEAN MERGE PROGRAM."
31
32 call read_nml(pth1, pth2, atmres, ocnres, pth3,binary_lake)
33
34 do tile=1,6
35
36 call read_grid_dims(pth1, atmres, ocnres, tile, lon, lat)
37
38 if (tile==1) then
39 write(6,*) 'lat=',lat,'lon=',lon
40 allocate (lake_frac(lon,lat),lake_depth(lon,lat),land_frac(lon,lat), &
41 ocn_frac(lon,lat),slmsk(lon,lat),lat2d(lon,lat))
42 endif
43
44 call read_ocean_frac(pth1,atmres,ocnres,tile,lon,lat,ocn_frac)
45
46 call read_lake_mask(pth2,atmres,tile,lon,lat,lake_frac, &
47 lake_depth,lat2d)
48
49 call merge(lon, lat, binary_lake, lat2d, ocn_frac, lake_frac, lake_depth, land_frac, slmsk)
50
51 call write_data(atmres,ocnres,pth3,tile,lon,lat,land_frac, &
52 lake_frac,lake_depth,slmsk)
53
54 end do ! tile
55
56 deallocate (lake_frac,lake_depth,land_frac,ocn_frac,slmsk,lat2d)
57
58 print*,"- NORMAL TERMINATION."
59
60end program merge_lake_ocnmsk
program merge_lake_ocnmsk
Determine the water mask by merging the lake mask with the mapped ocean mask from MOM6,...