ocean_merge  1.13.0
 All Files Functions
merge_lake_ocnmsk.f90 File Reference

Determines the water mask by merging the lake mask with the mapped ocean mask from MOM6. More...

Go to the source code of this file.

Functions/Subroutines

subroutine handle_err (ret)
 Handle netCDF errors. More...
 
program merge_lake_ocnmsk
 Determine the water mask by merging the lake mask with the mapped ocean mask from MOM6, both are on the FV3 grid. More...
 
subroutine read_nml (ocean_mask_dir, lake_mask_dir, atmres, ocnres, out_dir, binary_lake)
 Read program namelist. More...
 

Detailed Description

Determines the water mask by merging the lake mask with the mapped ocean mask from MOM6.

Author
Shan Sun
Rahul Mahajan
Sanath Kumar

Definition in file merge_lake_ocnmsk.f90.

Function/Subroutine Documentation

subroutine handle_err ( integer, intent(in)  ret)

Handle netCDF errors.

Parameters
[in]retNetCDF return code.
Author
Shan Sun

Definition at line 146 of file merge_lake_ocnmsk.f90.

Referenced by merge_lake_ocnmsk(), and read_nml().

program merge_lake_ocnmsk ( )

Determine the water mask by merging the lake mask with the mapped ocean mask from MOM6, both are on the FV3 grid.

During merge, the ocean mask dominates the lake mask if there is a conflict. After the merge, the remaining non-water fraction is the land fraction.

Returns
0 for success, error code otherwise.
Author
Shan Sun
Rahul Mahajan
Sanath Kumar

Definition at line 17 of file merge_lake_ocnmsk.f90.

References handle_err(), and read_nml().

subroutine read_nml ( character(len=120), intent(out)  ocean_mask_dir,
character(len=120), intent(out)  lake_mask_dir,
character(len=10), intent(out)  atmres,
character(len=10), intent(out)  ocnres,
character(len=120), intent(out)  out_dir,
integer, intent(out)  binary_lake 
)

Read program namelist.

Parameters
[out]ocean_mask_dirDirectory containing MOM6 ocean mask file.
[out]lake_mask_dirDirectory containing the lake mask file.
[out]out_dirDirectory where output file will be written.
[out]atmresAtmosphere grid resolution.
[out]ocnresOcean grid resolution.
[out]binary_lakeor fractional lake
Author
Rahul Mahajan
Sanath Kumar

Definition at line 166 of file merge_lake_ocnmsk.f90.

References handle_err().

Referenced by merge_lake_ocnmsk().