Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow option to use default smoothing over land #164

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/atmos_spectral/init/spectral_init_cond.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ module spectral_init_cond_mod
character(len=64) :: topog_file_name = 'topography.data.nc'
character(len=64) :: topog_field_name = 'zsurf'
character(len=256) :: land_field_name = 'land_mask'
logical :: smooth_input_land = .false.

namelist / spectral_init_cond_nml / initial_temperature, topography_option, topog_file_name, topog_field_name, land_field_name
namelist / spectral_init_cond_nml / initial_temperature, topography_option, topog_file_name, topog_field_name, land_field_name, smooth_input_land

contains

Expand Down Expand Up @@ -218,12 +219,16 @@ subroutine get_topography(topography_option, ocean_topog_smoothing, surf_geopote
call error_mesg('get_topography','topography_option="'//trim(topography_option)//'"'// &
' but '//trim('INPUT/'//topog_file_name)//' does not exist', FATAL)
endif

where(land_ones > 0.)
ocean_mask = .false.
elsewhere
ocean_mask = .true.
end where

if(smooth_input_land) then
ocean_mask = .true. ! If Broccoli smoothing is to be applied over 'input' land as well as ocean, set this as 'ocean' here
else
where(land_ones > 0.)
ocean_mask = .false.
elsewhere
ocean_mask = .true.
end where
endif

surf_geopotential = grav*surf_height

Expand Down