diff --git a/sorc/ocean_merge.fd/merge_lake_ocnmsk.f90 b/sorc/ocean_merge.fd/merge_lake_ocnmsk.f90 index d723737f5..96be3d1e7 100644 --- a/sorc/ocean_merge.fd/merge_lake_ocnmsk.f90 +++ b/sorc/ocean_merge.fd/merge_lake_ocnmsk.f90 @@ -103,7 +103,7 @@ program merge_lake_ocnmsk else lake_depth(i,j)=0. end if -! slmsk(i,j) = ceiling(land_frac(i,j))! "ceiling is used for orog smoothing" +! slmsk(i,j) = ceiling(land_frac(i,j))! "ceiling is used for orog smoothing" slmsk(i,j) = nint(land_frac(i,j)) ! nint got the land pts correct end do end do @@ -160,6 +160,7 @@ end subroutine handle_err !! @param[out] out_dir Directory where output file will be written. !! @param[out] atmres Atmosphere grid resolution. !! @param[out] ocnres Ocean grid resolution. +!! @param[out] binary_lake or fractional lake !! @author Rahul Mahajan !! @author Sanath Kumar subroutine read_nml(ocean_mask_dir, lake_mask_dir, atmres,ocnres,out_dir,binary_lake) diff --git a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.F b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.F index b21f342ea..96e3b38d8 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.F +++ b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.F @@ -184,6 +184,8 @@ !! grid. When specified, will be interpolated to model tile. !! When not specified, program will create fields from !! raw high-resolution topography data. +!! @param[in] MASK_ONLY Flag to generate the Land Mask only +!! @param[in] MERGE_FILE Ocean merge file !! @author Jordan Alpert NOAA/EMC SUBROUTINE TERSUB(IMN,JMN,IM,JM,NM,NR,NF0,NF1,NW,EFAC,BLAT, & OUTGRID,INPUTOROG,MASK_ONLY,MERGE_FILE) @@ -2042,6 +2044,8 @@ END SUBROUTINE MAKE_MASK !! @param[in] jmn "j" dimension of the hi-res input orog/mask datasets. !! @param[in] lon_c Longitude of the model grid corner points. !! @param[in] lat_c Latitude on the model grid corner points. +!! @param[in] lake_frac Fractional lake within the grid +!! @param[in] land_frac Fractional land within the grid !! @author GFDL Programmer SUBROUTINE MAKEMT2(ZAVG,ZSLM,ORO,SLM,VAR,VAR4, 1 GLAT,IM,JM,IMN,JMN,lon_c,lat_c,lake_frac,land_frac) @@ -2549,6 +2553,7 @@ SUBROUTINE MAKEPC(ZAVG,ZSLM,THETA,GAMMA,SIGMA, !! @param[in] jmn "j" dimension of the hi-res input orog/mask datasets. !! @param[in] lon_c Longitude of model grid corner points. !! @param[in] lat_c Latitude of the model grid corner points. +!! @param[in] SLM mask !! @author GFDL Programmer SUBROUTINE MAKEPC2(ZAVG,ZSLM,THETA,GAMMA,SIGMA, 1 GLAT,IM,JM,IMN,JMN,lon_c,lat_c,SLM) diff --git a/sorc/orog_mask_tools.fd/orog.fd/netcdf_io.F90 b/sorc/orog_mask_tools.fd/orog.fd/netcdf_io.F90 index 1e2c2a1a9..09d994b0b 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/netcdf_io.F90 +++ b/sorc/orog_mask_tools.fd/orog.fd/netcdf_io.F90 @@ -228,6 +228,18 @@ subroutine netcdf_err( err, string ) return end subroutine netcdf_err +!> Write the land mask file +!! +!! @param[in] im 'i' dimension of a model grid tile. +!! @param[in] jm 'j' dimension of a model grid tile. +!! @param[in] slm Land-sea mask. +!! @param[in] land_frac Land fraction. +!! @param[in] ntiles Number of tiles to output. +!! @param[in] tile Tile number to output. +!! @param[in] geolon Longitude on the model grid tile. +!! @param[in] geolat Latitude on the model grid tile. +!! @author George Gayno NOAA/EMC + subroutine write_mask_netcdf(im, jm, slm, land_frac, ntiles, tile, geolon, geolat) implicit none integer, intent(in):: im, jm, ntiles, tile @@ -308,6 +320,17 @@ subroutine write_mask_netcdf(im, jm, slm, land_frac, ntiles, tile, geolon, geola end subroutine + +!> Read the land mask file +!! +!! @param[in] merge_file path +!! @param[in] slm Land-sea mask. +!! @param[in] land_frac Land fraction. +!! @param[in] lake_frac Lake fraction +!! @param[in] im 'i' dimension of a model grid tile. +!! @param[in] jm 'j' dimension of a model grid tile. +!! @author George Gayno NOAA/EMC + subroutine read_mask(merge_file,slm,land_frac,lake_frac,im,jm) implicit none