diff --git a/cicecore/cicedynB/general/ice_forcing.F90 b/cicecore/cicedynB/general/ice_forcing.F90 index 7b1e2eac7..9e75c8170 100755 --- a/cicecore/cicedynB/general/ice_forcing.F90 +++ b/cicecore/cicedynB/general/ice_forcing.F90 @@ -310,6 +310,12 @@ subroutine init_forcing_atmo call ISPOL_files elseif (trim(atm_data_type) == 'box2001') then call box2001_data + elseif (trim(atm_data_type) == 'uniform_northeast') then + call uniform_data('NE') + elseif (trim(atm_data_type) == 'uniform_east') then + call uniform_data('E') + elseif (trim(atm_data_type) == 'uniform_north') then + call uniform_data('N') elseif (trim(atm_data_type) == 'hycom') then call hycom_atm_files endif @@ -626,6 +632,12 @@ subroutine get_forcing_atmo call oned_data elseif (trim(atm_data_type) == 'box2001') then call box2001_data + elseif (trim(atm_data_type) == 'uniform_northeast') then + call uniform_data('NE') + elseif (trim(atm_data_type) == 'uniform_east') then + call uniform_data('E') + elseif (trim(atm_data_type) == 'uniform_north') then + call uniform_data('N') elseif (trim(atm_data_type) == 'hycom') then call hycom_atm_data else ! default values set in init_flux @@ -5343,6 +5355,66 @@ subroutine box2001_data end subroutine box2001_data +!======================================================================= +! + subroutine uniform_data(dir) + +! uniform wind fields in some direction + + use ice_domain, only: nblocks + use ice_domain_size, only: max_blocks + use ice_blocks, only: nx_block, ny_block, nghost + use ice_flux, only: uocn, vocn, uatm, vatm, wind, rhoa, strax, stray + use ice_grid, only: uvm, grid_average_X2Y + + character(len=*), intent(in) :: dir + + ! local parameters + + integer (kind=int_kind) :: & + iblk, i,j ! loop indices + + real (kind=dbl_kind) :: & + tau + + character(len=*), parameter :: subname = '(uniform_data)' + + if (local_debug .and. my_task == master_task) write(nu_diag,*) subname,'fdbg start' + + ! ocean currents + uocn = c0 + vocn = c0 + ! wind components + if (dir == 'NE') then + uatm = c5 + vatm = c5 + elseif (dir == 'N') then + uatm = c0 + vatm = c5 + elseif (dir == 'E') then + uatm = c5 + vatm = c0 + else + call abort_ice (subname//'ERROR: dir unknown, dir = '//trim(dir), & + file=__FILE__, line=__LINE__) + endif + + do iblk = 1, nblocks + do j = 1, ny_block + do i = 1, nx_block + + ! wind stress + wind(i,j,iblk) = sqrt(uatm(i,j,iblk)**2 + vatm(i,j,iblk)**2) + tau = rhoa(i,j,iblk) * 0.0012_dbl_kind * wind(i,j,iblk) + strax(i,j,iblk) = tau * uatm(i,j,iblk) + stray(i,j,iblk) = tau * vatm(i,j,iblk) + + enddo + enddo + enddo ! nblocks + + end subroutine uniform_data + !======================================================================= subroutine get_wave_spec diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index 45af42adf..1b4d50927 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -2632,42 +2632,56 @@ subroutine set_state_var (nx_block, ny_block, & endif ! ice_data_type - if (trim(grid_type) == 'rectangular') then - - ! place ice on left side of domain - icells = 0 - do j = jlo, jhi - do i = ilo, ihi - if (tmask(i,j)) then - if (ULON(i,j) < -50./rad_to_deg) then - icells = icells + 1 - indxi(icells) = i - indxj(icells) = j - endif ! ULON - endif ! tmask - enddo ! i - enddo ! j - - else - - ! place ice at high latitudes where ocean sfc is cold - icells = 0 - do j = jlo, jhi - do i = ilo, ihi - if (tmask(i,j)) then - ! place ice in high latitudes where ocean sfc is cold - if ( (sst (i,j) <= Tf(i,j)+p2) .and. & - (TLAT(i,j) < edge_init_sh/rad_to_deg .or. & - TLAT(i,j) > edge_init_nh/rad_to_deg) ) then + if ((trim(ice_data_type) == 'box2001') .or. & + (trim(ice_data_type) == 'boxslotcyl')) then + + ! place ice on left side of domain + icells = 0 + do j = jlo, jhi + do i = ilo, ihi + if (tmask(i,j)) then + if (ULON(i,j) < -50./rad_to_deg) then + icells = icells + 1 + indxi(icells) = i + indxj(icells) = j + endif ! ULON + endif ! tmask + enddo ! i + enddo ! j + + else if (trim(ice_data_type) == 'uniform') then + ! all cells not land mask are ice + icells = 0 + do j = jlo, jhi + do i = ilo, ihi + if (tmask(i,j)) then icells = icells + 1 indxi(icells) = i indxj(icells) = j - endif ! cold surface - endif ! tmask - enddo ! i - enddo ! j - - endif ! rectgrid + endif + enddo + enddo + + else ! default behavior + + ! place ice at high latitudes where ocean sfc is cold + icells = 0 + do j = jlo, jhi + do i = ilo, ihi + if (tmask(i,j)) then + ! place ice in high latitudes where ocean sfc is cold + if ( (sst (i,j) <= Tf(i,j)+p2) .and. & + (TLAT(i,j) < edge_init_sh/rad_to_deg .or. & + TLAT(i,j) > edge_init_nh/rad_to_deg) ) then + icells = icells + 1 + indxi(icells) = i + indxj(icells) = j + endif ! cold surface + endif ! tmask + enddo ! i + enddo ! j + + endif ! ice_data_type do n = 1, ncat @@ -2699,7 +2713,9 @@ subroutine set_state_var (nx_block, ny_block, & ! / (real(ny_global,kind=dbl_kind)) * p5) endif vicen(i,j,n) = hinit(n) * aicen(i,j,n) ! m + elseif (trim(ice_data_type) == 'boxslotcyl') then + if (hinit(n) > c0) then ! slotted cylinder call boxslotcyl_data_aice(aicen, i, j, & @@ -2708,9 +2724,12 @@ subroutine set_state_var (nx_block, ny_block, & iglob, jglob) endif vicen(i,j,n) = hinit(n) * aicen(i,j,n) ! m - else + + else ! default case. ice_data_type = uniform + vicen(i,j,n) = hinit(n) * ainit(n) ! m - endif + endif ! ice_data_type + vsnon(i,j,n) = min(aicen(i,j,n)*hsno_init,p2*vicen(i,j,n)) call icepack_init_trcr(Tair = Tair(i,j), Tf = Tf(i,j), & diff --git a/configuration/scripts/options/set_nml.boxsyme b/configuration/scripts/options/set_nml.boxsyme new file mode 100644 index 000000000..ca8f81e63 --- /dev/null +++ b/configuration/scripts/options/set_nml.boxsyme @@ -0,0 +1,54 @@ +days_per_year = 360 +use_leap_years = .false. +npt_unit = 'd' +npt = 5 +ice_ic = 'default' +restart_ext = .true. +histfreq = 'd','1','x','x','x' +grid_type = 'rectangular' +dxrect = 16.e5 +dyrect = 16.e5 +close_boundaries = .true. +ew_boundary_type = 'open' +ns_boundary_type = 'open' +tr_iage = .false. +tr_FY = .false. +tr_lvl = .false. +tr_pond_lvl = .false. +ktherm = -1 +kstrength = 0 +kdyn = 1 +kridge = -1 +ktransport = -1 +coriolis = 'constant' +atmbndy = 'constant' +atm_data_type = 'uniform_east' +ice_data_type = 'uniform' +calc_strair = .false. +rotate_wind = .false. +restore_ice = .true. +f_aice = 'd1' +f_hi = 'd1' +f_hs = 'd' +f_Tsfc = 'd' +f_uvel = 'd1' +f_vvel = 'd1' +f_uatm = 'd' +f_vatm = 'd' +f_uocn = 'd' +f_vocn = 'd' +f_strairx = 'd1' +f_strairy = 'd1' +f_strtltx = 'd1' +f_strtlty = 'd1' +f_strcorx = 'd1' +f_strcory = 'd1' +f_strocnx = 'd1' +f_strocny = 'd1' +f_strintx = 'd1' +f_strinty = 'd1' +f_taubx = 'd1' +f_tauby = 'd1' +f_divu = 'd1' +f_sig1 = 'd1' +f_sig2 = 'd1' diff --git a/configuration/scripts/options/set_nml.boxsymn b/configuration/scripts/options/set_nml.boxsymn new file mode 100644 index 000000000..2a1449ae2 --- /dev/null +++ b/configuration/scripts/options/set_nml.boxsymn @@ -0,0 +1,54 @@ +days_per_year = 360 +use_leap_years = .false. +npt_unit = 'd' +npt = 5 +ice_ic = 'default' +restart_ext = .true. +histfreq = 'd','1','x','x','x' +grid_type = 'rectangular' +dxrect = 16.e5 +dyrect = 16.e5 +close_boundaries = .true. +ew_boundary_type = 'open' +ns_boundary_type = 'open' +tr_iage = .false. +tr_FY = .false. +tr_lvl = .false. +tr_pond_lvl = .false. +ktherm = -1 +kstrength = 0 +kdyn = 1 +kridge = -1 +ktransport = -1 +coriolis = 'constant' +atmbndy = 'constant' +atm_data_type = 'uniform_north' +ice_data_type = 'uniform' +calc_strair = .false. +rotate_wind = .false. +restore_ice = .true. +f_aice = 'd1' +f_hi = 'd1' +f_hs = 'd' +f_Tsfc = 'd' +f_uvel = 'd1' +f_vvel = 'd1' +f_uatm = 'd' +f_vatm = 'd' +f_uocn = 'd' +f_vocn = 'd' +f_strairx = 'd1' +f_strairy = 'd1' +f_strtltx = 'd1' +f_strtlty = 'd1' +f_strcorx = 'd1' +f_strcory = 'd1' +f_strocnx = 'd1' +f_strocny = 'd1' +f_strintx = 'd1' +f_strinty = 'd1' +f_taubx = 'd1' +f_tauby = 'd1' +f_divu = 'd1' +f_sig1 = 'd1' +f_sig2 = 'd1' diff --git a/configuration/scripts/options/set_nml.boxsymne b/configuration/scripts/options/set_nml.boxsymne new file mode 100644 index 000000000..af38fa6fe --- /dev/null +++ b/configuration/scripts/options/set_nml.boxsymne @@ -0,0 +1,54 @@ +days_per_year = 360 +use_leap_years = .false. +npt_unit = 'd' +npt = 5 +ice_ic = 'default' +restart_ext = .true. +histfreq = 'd','1','x','x','x' +grid_type = 'rectangular' +dxrect = 16.e5 +dyrect = 16.e5 +close_boundaries = .true. +ew_boundary_type = 'open' +ns_boundary_type = 'open' +tr_iage = .false. +tr_FY = .false. +tr_lvl = .false. +tr_pond_lvl = .false. +ktherm = -1 +kstrength = 0 +kdyn = 1 +kridge = -1 +ktransport = -1 +coriolis = 'constant' +atmbndy = 'constant' +atm_data_type = 'uniform_northeast' +ice_data_type = 'uniform' +calc_strair = .false. +rotate_wind = .false. +restore_ice = .true. +f_aice = 'd1' +f_hi = 'd1' +f_hs = 'd' +f_Tsfc = 'd' +f_uvel = 'd1' +f_vvel = 'd1' +f_uatm = 'd' +f_vatm = 'd' +f_uocn = 'd' +f_vocn = 'd' +f_strairx = 'd1' +f_strairy = 'd1' +f_strtltx = 'd1' +f_strtlty = 'd1' +f_strcorx = 'd1' +f_strcory = 'd1' +f_strocnx = 'd1' +f_strocny = 'd1' +f_strintx = 'd1' +f_strinty = 'd1' +f_taubx = 'd1' +f_tauby = 'd1' +f_divu = 'd1' +f_sig1 = 'd1' +f_sig2 = 'd1' diff --git a/configuration/scripts/options/set_nml.gridb b/configuration/scripts/options/set_nml.gridb new file mode 100644 index 000000000..2a209410b --- /dev/null +++ b/configuration/scripts/options/set_nml.gridb @@ -0,0 +1,2 @@ +grid_system = 'B' + diff --git a/configuration/scripts/options/set_nml.gridcd b/configuration/scripts/options/set_nml.gridcd new file mode 100644 index 000000000..9426056e9 --- /dev/null +++ b/configuration/scripts/options/set_nml.gridcd @@ -0,0 +1,2 @@ +grid_system = 'CD' + diff --git a/configuration/scripts/tests/gridsys_suite.ts b/configuration/scripts/tests/gridsys_suite.ts new file mode 100644 index 000000000..0a3d07025 --- /dev/null +++ b/configuration/scripts/tests/gridsys_suite.ts @@ -0,0 +1,16 @@ +# Test Grid PEs Sets BFB-compare +smoke gx3 8x2 diag1,run5day +restart gx3 4x2 debug,diag1 +smoke gbox80 1x1 box2001 +smoke gbox80 1x1 boxslotcyl +smoke gbox80 1x1 boxsymn +smoke gbox80 1x1 boxsyme +smoke gbox80 1x1 boxsymne + +smoke gx3 8x2 diag1,run5day,gridcd +restart gx3 4x2 debug,diag1,gridcd +smoke gbox80 1x1 box2001,gridcd +smoke gbox80 1x1 boxslotcyl,gridcd +smoke gbox80 1x1 boxsymn,gridcd +smoke gbox80 1x1 boxsyme,gridcd +smoke gbox80 1x1 boxsymne,gridcd