From 98fd93a680f120e6daafa71142d1bd41401cca7c Mon Sep 17 00:00:00 2001 From: Geen Date: Thu, 14 May 2020 09:58:54 +0100 Subject: [PATCH 1/4] Add option to smooth Gibbs ripples over land as well as ocean for input topography. NB: will smooth mountains too --- .../init/spectral_init_cond.F90 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/atmos_spectral/init/spectral_init_cond.F90 b/src/atmos_spectral/init/spectral_init_cond.F90 index e11b902ee..3d4292a3f 100644 --- a/src/atmos_spectral/init/spectral_init_cond.F90 +++ b/src/atmos_spectral/init/spectral_init_cond.F90 @@ -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_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 @@ -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==.true.): + 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 From d45975c2553ec89c8d77dc0453ea3811e04895f4 Mon Sep 17 00:00:00 2001 From: Ruth Geen Date: Thu, 14 May 2020 10:53:36 +0100 Subject: [PATCH 2/4] Correct logic mistake --- src/atmos_spectral/init/spectral_init_cond.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atmos_spectral/init/spectral_init_cond.F90 b/src/atmos_spectral/init/spectral_init_cond.F90 index 3d4292a3f..ad34c7438 100644 --- a/src/atmos_spectral/init/spectral_init_cond.F90 +++ b/src/atmos_spectral/init/spectral_init_cond.F90 @@ -220,7 +220,7 @@ subroutine get_topography(topography_option, ocean_topog_smoothing, surf_geopote ' but '//trim('INPUT/'//topog_file_name)//' does not exist', FATAL) endif - if(smooth_input_land==.true.): + if(smooth_input_land): 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.) From 24ea0c3c0764fe94276b5e15442f940cf7a86f1a Mon Sep 17 00:00:00 2001 From: Ruth Geen Date: Thu, 14 May 2020 10:54:59 +0100 Subject: [PATCH 3/4] Correct typo --- src/atmos_spectral/init/spectral_init_cond.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atmos_spectral/init/spectral_init_cond.F90 b/src/atmos_spectral/init/spectral_init_cond.F90 index ad34c7438..28a5fecec 100644 --- a/src/atmos_spectral/init/spectral_init_cond.F90 +++ b/src/atmos_spectral/init/spectral_init_cond.F90 @@ -70,7 +70,7 @@ 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_land = .false. +logical :: smooth_input_land = .false. namelist / spectral_init_cond_nml / initial_temperature, topography_option, topog_file_name, topog_field_name, land_field_name, smooth_input_land From 7295483139b7cc07c9fd51f82337fb8a0d125e63 Mon Sep 17 00:00:00 2001 From: Ruth Geen Date: Thu, 14 May 2020 10:56:20 +0100 Subject: [PATCH 4/4] Correct typo --- src/atmos_spectral/init/spectral_init_cond.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atmos_spectral/init/spectral_init_cond.F90 b/src/atmos_spectral/init/spectral_init_cond.F90 index 28a5fecec..93034ca24 100644 --- a/src/atmos_spectral/init/spectral_init_cond.F90 +++ b/src/atmos_spectral/init/spectral_init_cond.F90 @@ -220,7 +220,7 @@ subroutine get_topography(topography_option, ocean_topog_smoothing, surf_geopote ' but '//trim('INPUT/'//topog_file_name)//' does not exist', FATAL) endif - if(smooth_input_land): + 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.)