orog_mask_tools
1.13.0
|
Compute lake fraction and depth. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | cal_lake_frac_depth (lakestat, cs_lakestat, lakedpth, cs_lakedpth) |
Calculate lake fraction and depth on the model grid from high-resolution data. More... | |
subroutine | include_exclude_lakes (lake_frac, land_frac, lake_depth, geolat, geolon, tile_num) |
Include Caspian Sea and Aral Sea if GLDB dataset is used, and exclude lakes in the coastal areas of Antarctica if MODIS dataset is used. More... | |
subroutine | lake_cell_comp (lkst, lkdp, lake_ct, lake_avg_frac, lake_dpth_sum) |
Compute cumulatively the lake fraction and lake depth for a cell. More... | |
program | lake_frac |
This program computes lake fraction and depth numbers for FV3 cubed sphere grid cells, from a high resolution lat/lon data set. More... | |
subroutine | nc_opchk (stat, opname) |
Check NetCDF error code. More... | |
subroutine | read_cubed_sphere_grid (res, grid) |
Read the latitude and longitude for a cubed-sphere grid from the 'grid' files. More... | |
subroutine | read_cubed_sphere_reg_grid (res, grid, halo_depth, res_x, res_y) |
Read the latitude and longitude for a regional grid from the 'grid' file. More... | |
subroutine | read_lakedata (lakedata_path, lake_stat, lake_dpth, nlat, nlon) |
Read a high-resolution lake depth dataset, and a corresponding lake status dataset which provides a status code on the reliability of each lake depth point. More... | |
subroutine | write_lakedata_to_orodata (cs_res, cs_lakestat, cs_lakedpth) |
Write lake depth and fraction to an existing model orography file. More... | |
subroutine | write_reg_lakedata_to_orodata (cs_res, tile_x_dim, tile_y_dim, cs_lakestat, cs_lakedpth) |
Write lake depth and fraction to an existing model orography file. More... | |
Compute lake fraction and depth.
Definition in file lakefrac.F90.
subroutine lake_frac::cal_lake_frac_depth | ( | integer*1, dimension(:), intent(in) | lakestat, |
real, dimension(:), intent(out) | cs_lakestat, | ||
integer*2, dimension(:), intent(in) | lakedpth, | ||
real, dimension(:), intent(out) | cs_lakedpth | ||
) |
Calculate lake fraction and depth on the model grid from high-resolution data.
[in] | lakestat | High-resolution lake status code. |
[in] | lakedpth | High-resolution lake depth. |
[out] | cs_lakestat | Lake fraction on the model grid. |
[out] | cs_lakedpth | Lake depth on the model grid. |
Definition at line 170 of file lakefrac.F90.
References enclosure_cnvx(), find_limit(), and lake_cell_comp().
Referenced by lake_frac().
subroutine lake_frac::include_exclude_lakes | ( | real, dimension(cs_res*cs_res), intent(inout) | lake_frac, |
real, dimension(cs_res*cs_res), intent(in) | land_frac, | ||
real, dimension(cs_res*cs_res), intent(inout) | lake_depth, | ||
real, dimension(cs_res*cs_res), intent(in) | geolat, | ||
real, dimension(cs_res*cs_res), intent(in) | geolon, | ||
integer, intent(in) | tile_num | ||
) |
Include Caspian Sea and Aral Sea if GLDB dataset is used, and exclude lakes in the coastal areas of Antarctica if MODIS dataset is used.
[in,out] | lake_frac | lake fraction array of the given tile. |
[in,out] | lake_depth | lake depth array of the given tile. |
[in] | land_frac | land fraction array of the given tile. |
[in] | geolat | latitude array of the given tile. |
[in] | geolon | longitude array of the given tile. |
[in] | tile_num | tile number of the given tile. |
Definition at line 1048 of file lakefrac.F90.
References lake_frac().
Referenced by write_lakedata_to_orodata(), and write_reg_lakedata_to_orodata().
subroutine lake_frac::lake_cell_comp | ( | integer*1, intent(in) | lkst, |
integer*2, intent(in) | lkdp, | ||
integer, intent(out) | lake_ct, | ||
real*8, intent(out) | lake_avg_frac, | ||
real*8, intent(out) | lake_dpth_sum | ||
) |
Compute cumulatively the lake fraction and lake depth for a cell.
[in] | lkst | lake status value from a grid point in the source data. |
[in] | lkdp | lake depth value from a grid point in the source data. |
[out] | lake_ct | lake points number accumulated for the cell |
[out] | lake_avg_frac | lake fraction value accumulated for the cell. |
[out] | lake_dpth_sum | is the lake depth value accumulated for the cell. |
Definition at line 384 of file lakefrac.F90.
Referenced by cal_lake_frac_depth().
program lake_frac | ( | ) |
This program computes lake fraction and depth numbers for FV3 cubed sphere grid cells, from a high resolution lat/lon data set.
Definition at line 21 of file lakefrac.F90.
References cal_lake_frac_depth(), read_cubed_sphere_grid(), read_cubed_sphere_reg_grid(), read_lakedata(), write_lakedata_to_orodata(), and write_reg_lakedata_to_orodata().
Referenced by include_exclude_lakes(), makemt2(), read_mask(), tersub(), write_lakedata_to_orodata(), and write_reg_lakedata_to_orodata().
subroutine lake_frac::nc_opchk | ( | integer | stat, |
character(len=*) | opname | ||
) |
Check NetCDF error code.
[in] | stat | Error code. |
[in] | opname | NetCDF operation that failed. |
Definition at line 1111 of file lakefrac.F90.
subroutine lake_frac::read_cubed_sphere_grid | ( | integer, intent(in) | res, |
real, dimension(:,:), intent(out) | grid | ||
) |
Read the latitude and longitude for a cubed-sphere grid from the 'grid' files.
For global grids, all six sides are returned.
[in] | res | The resolution. Example: '96' for C96. |
[out] | grid | Array containing the latitude and longitude on the 'supergrid'. Multiple tiles are concatenated. |
Definition at line 423 of file lakefrac.F90.
References nc_opchk().
Referenced by lake_frac().
subroutine lake_frac::read_cubed_sphere_reg_grid | ( | integer, intent(in) | res, |
real, dimension(:,:), intent(out), allocatable | grid, | ||
integer, intent(in) | halo_depth, | ||
integer, intent(out) | res_x, | ||
integer, intent(out) | res_y | ||
) |
Read the latitude and longitude for a regional grid from the 'grid' file.
[in] | res | Resolution of grid. Example: '96' for C96. |
[out] | grid | Latitude and longitude on the supergrid. |
[in] | halo_depth | Lateral halo. Not used. |
[out] | res_x | Number of grid points in the 'x' direction. |
[out] | res_y | Number of grid points in the 'y' direction. |
Definition at line 483 of file lakefrac.F90.
References nc_opchk().
Referenced by lake_frac().
subroutine lake_frac::read_lakedata | ( | character(len=256), intent(in) | lakedata_path, |
integer*1, dimension(:), intent(out) | lake_stat, | ||
integer*2, dimension(:), intent(out) | lake_dpth, | ||
integer, intent(in) | nlat, | ||
integer, intent(in) | nlon | ||
) |
Read a high-resolution lake depth dataset, and a corresponding lake status dataset which provides a status code on the reliability of each lake depth point.
[in] | lakedata_path | Path to the lake depth and lake status dataset. |
[out] | lake_stat | Status code. |
[out] | lake_dpth | Lake depth. |
[in] | nlat | 'j' dimension of both datasets. |
[in] | nlon | 'i' dimension of both datasets. |
Definition at line 553 of file lakefrac.F90.
Referenced by lake_frac().
subroutine lake_frac::write_lakedata_to_orodata | ( | integer, intent(in) | cs_res, |
real, dimension(:), intent(in) | cs_lakestat, | ||
real, dimension(:), intent(in) | cs_lakedpth | ||
) |
Write lake depth and fraction to an existing model orography file.
Also, perform some quality control checks on the lake data. This routine is used for non-regional grids.
[in] | cs_res | Resolution. Example: '96' for C96. |
[in] | cs_lakestat | Lake fraction. |
[in] | cs_lakedpth | Lake depth. |
Definition at line 609 of file lakefrac.F90.
References include_exclude_lakes(), lake_frac(), and nc_opchk().
Referenced by lake_frac().
subroutine lake_frac::write_reg_lakedata_to_orodata | ( | integer, intent(in) | cs_res, |
integer, intent(in) | tile_x_dim, | ||
integer, intent(in) | tile_y_dim, | ||
real, dimension(:), intent(in) | cs_lakestat, | ||
real, dimension(:), intent(in) | cs_lakedpth | ||
) |
Write lake depth and fraction to an existing model orography file.
Also, perform some quality control checks on the lake data. This routine is used for regional grids.
[in] | cs_res | Resolution. Example: '96' for C96. |
[in] | cs_lakestat | Lake fraction. |
[in] | cs_lakedpth | Lake depth. |
[in] | tile_x_dim | 'x' dimension of the model grid. |
[in] | tile_y_dim | 'y' dimension of the model grid. |
Definition at line 826 of file lakefrac.F90.
References include_exclude_lakes(), lake_frac(), and nc_opchk().
Referenced by lake_frac().