orog_mask_tools  1.7.0
 All Data Structures Files Functions Variables
inland.F90 File Reference

Program and associated routines for creating inland mask. More...

Go to the source code of this file.

Functions/Subroutines

subroutine free_mem ()
 Deallocate module arrays. More...
 
program inland_mask
 This program creates the inland mask and writes it to the orography data files. More...
 
subroutine mark_global_inland (cs_res)
 Create inland mask for global grid. More...
 
recursive subroutine mark_global_inland_rec_d (i, j, t, rd)
 Recursively walk through neighbors marking inland points for global grid. More...
 
subroutine mark_inland_reg (cs_res)
 Create inland mask for regional grid. More...
 
recursive subroutine mark_regional_inland_rec_d (i, j, t, rd)
 Recursively walk through neighbors marking inland points for regional grid. More...
 
subroutine nc_opchk (stat, opname)
 Check NetCDF return code and print error message. More...
 
subroutine read_orog (cs_res)
 Read in orography (land fraction) data. More...
 
subroutine read_orog_reg (cs_res)
 Read in orography (land fraction) data for regional grid. More...
 
subroutine write_inland (cs_res)
 Write inland back to the orography data files for global grid. More...
 
subroutine write_inland_reg (cs_res)
 Write inland back to the orography data files for regional grid. More...
 

Detailed Description

Program and associated routines for creating inland mask.

Author
Ning Wang
Date
July 1, 2020

Definition in file inland.F90.

Function/Subroutine Documentation

subroutine inland_mask::free_mem ( )

Deallocate module arrays.

Definition at line 425 of file inland.F90.

Referenced by inland_mask().

program inland_mask ( )

This program creates the inland mask and writes it to the orography data files.

Author
Ning Wang
Returns
0 for success, error otherwise.

Definition at line 9 of file inland.F90.

References free_mem(), cs_nb::idx_init(), cs_nb::idx_init_reg(), mark_global_inland(), mark_inland_reg(), read_orog(), read_orog_reg(), write_inland(), and write_inland_reg().

subroutine inland_mask::mark_global_inland ( integer, intent(in)  cs_res)

Create inland mask for global grid.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 79 of file inland.F90.

References mark_global_inland_rec_d().

Referenced by inland_mask().

recursive subroutine inland_mask::mark_global_inland_rec_d ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  t,
integer, intent(in)  rd 
)

Recursively walk through neighbors marking inland points for global grid.

Parameters
[in]icell index
[in]jcell index
[in]ttile number
[in]rdcurrent recursive depth (starts at 0)
Author
Ning Wang

Definition at line 131 of file inland.F90.

References cs_nb::neighbors().

Referenced by mark_global_inland().

subroutine inland_mask::mark_inland_reg ( integer, intent(in)  cs_res)

Create inland mask for regional grid.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 99 of file inland.F90.

References mark_regional_inland_rec_d().

Referenced by inland_mask().

recursive subroutine inland_mask::mark_regional_inland_rec_d ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  t,
integer, intent(in)  rd 
)

Recursively walk through neighbors marking inland points for regional grid.

Parameters
[in]icell index
[in]jcell index
[in]ttile face
[in]rdcurrent recursive depth (starts at 0)
Author
Ning Wang

Definition at line 168 of file inland.F90.

References cs_nb::neighbors_reg().

Referenced by mark_inland_reg().

subroutine inland_mask::nc_opchk ( integer  stat,
character(len=*)  opname 
)

Check NetCDF return code and print error message.

Parameters
[in]statstatus code returned from NetCDF
[in]opnamedescription of NetCDF operation called
Author
Ning Wang

Definition at line 437 of file inland.F90.

Referenced by read_cubed_sphere_grid(), read_cubed_sphere_reg_grid(), read_orog(), read_orog_reg(), write_inland(), write_inland_reg(), write_lakedata_to_orodata(), and write_reg_lakedata_to_orodata().

subroutine inland_mask::read_orog ( integer, intent(in)  cs_res)

Read in orography (land fraction) data.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 202 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

subroutine inland_mask::read_orog_reg ( integer, intent(in)  cs_res)

Read in orography (land fraction) data for regional grid.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 248 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

subroutine inland_mask::write_inland ( integer, intent(in)  cs_res)

Write inland back to the orography data files for global grid.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 300 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

subroutine inland_mask::write_inland_reg ( integer, intent(in)  cs_res)

Write inland back to the orography data files for regional grid.

Parameters
[in]cs_rescubed sphere resolution (48, 96...)
Author
Ning Wang

Definition at line 362 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().