orog_mask_tools  1.8.0
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

◆ free_mem()

subroutine inland_mask::free_mem ( )

Deallocate module arrays.

Definition at line 426 of file inland.F90.

Referenced by inland_mask().

◆ 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(), mark_global_inland(), mark_inland_reg(), read_orog(), read_orog_reg(), write_inland(), and write_inland_reg().

◆ mark_global_inland()

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 80 of file inland.F90.

References mark_global_inland_rec_d().

Referenced by inland_mask().

◆ mark_global_inland_rec_d()

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 132 of file inland.F90.

Referenced by mark_global_inland().

◆ mark_inland_reg()

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 100 of file inland.F90.

References mark_regional_inland_rec_d().

Referenced by inland_mask().

◆ mark_regional_inland_rec_d()

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 169 of file inland.F90.

Referenced by mark_inland_reg().

◆ nc_opchk()

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 438 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().

◆ read_orog()

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 203 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

◆ read_orog_reg()

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 249 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

◆ write_inland()

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 301 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().

◆ write_inland_reg()

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 363 of file inland.F90.

References nc_opchk().

Referenced by inland_mask().