[3117] | 1 | MODULE bdyice_lim2 |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE bdyice_lim2 *** |
---|
[3191] | 4 | !! Unstructured Open Boundary Cond. : Open boundary conditions for sea-ice (LIM2) |
---|
[3117] | 5 | !!====================================================================== |
---|
| 6 | !! History : 3.3 ! 2010-09 (D. Storkey) Original code |
---|
[3191] | 7 | !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge |
---|
[3680] | 8 | !! 3.5 ! 2012 (S. Mocavero, I. Epicoco) Optimization of BDY communications |
---|
[3117] | 9 | !!---------------------------------------------------------------------- |
---|
| 10 | #if defined key_bdy && defined key_lim2 |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! 'key_bdy' and Unstructured Open Boundary Conditions |
---|
| 13 | !! 'key_lim2' LIM-2 sea ice model |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | !! bdy_ice_lim_2 : Application of open boundaries to ice |
---|
| 16 | !! bdy_ice_frs : Application of Flow Relaxation Scheme |
---|
| 17 | !!---------------------------------------------------------------------- |
---|
[3182] | 18 | USE timing ! Timing |
---|
[3117] | 19 | USE oce ! ocean dynamics and tracers variables |
---|
| 20 | USE ice_2 ! LIM_2 ice variables |
---|
| 21 | USE dom_oce ! ocean space and time domain variables |
---|
| 22 | USE bdy_oce ! ocean open boundary conditions |
---|
| 23 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
| 24 | USE in_out_manager ! write to numout file |
---|
| 25 | USE lib_mpp ! distributed memory computing |
---|
| 26 | |
---|
| 27 | IMPLICIT NONE |
---|
| 28 | PRIVATE |
---|
| 29 | |
---|
| 30 | PUBLIC bdy_ice_lim_2 ! routine called in sbcmod |
---|
| 31 | |
---|
| 32 | !!---------------------------------------------------------------------- |
---|
| 33 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[4148] | 34 | !! $Id$ |
---|
[3117] | 35 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 36 | !!---------------------------------------------------------------------- |
---|
| 37 | CONTAINS |
---|
| 38 | |
---|
| 39 | SUBROUTINE bdy_ice_lim_2( kt ) |
---|
| 40 | !!---------------------------------------------------------------------- |
---|
| 41 | !! *** SUBROUTINE bdy_ice_lim_2 *** |
---|
| 42 | !! |
---|
| 43 | !! ** Purpose : - Apply open boundary conditions for ice (LIM2) |
---|
| 44 | !! |
---|
| 45 | !!---------------------------------------------------------------------- |
---|
| 46 | INTEGER, INTENT( in ) :: kt ! Main time step counter |
---|
| 47 | !! |
---|
| 48 | INTEGER :: ib_bdy ! Loop index |
---|
| 49 | |
---|
| 50 | DO ib_bdy=1, nb_bdy |
---|
| 51 | |
---|
| 52 | SELECT CASE( nn_ice_lim2(ib_bdy) ) |
---|
| 53 | CASE(jp_none) |
---|
| 54 | CYCLE |
---|
| 55 | CASE(jp_frs) |
---|
[3680] | 56 | CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), ib_bdy ) |
---|
[3117] | 57 | CASE DEFAULT |
---|
[3191] | 58 | CALL ctl_stop( 'bdy_ice_lim_2 : unrecognised option for open boundaries for ice fields' ) |
---|
[3117] | 59 | END SELECT |
---|
| 60 | ENDDO |
---|
| 61 | |
---|
| 62 | END SUBROUTINE bdy_ice_lim_2 |
---|
| 63 | |
---|
[3680] | 64 | SUBROUTINE bdy_ice_frs( idx, dta, ib_bdy ) |
---|
[3117] | 65 | !!------------------------------------------------------------------------------ |
---|
| 66 | !! *** SUBROUTINE bdy_ice_frs *** |
---|
| 67 | !! |
---|
| 68 | !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the case |
---|
| 69 | !! of unstructured open boundaries. Currently only tested for LIM2. |
---|
| 70 | !! |
---|
| 71 | !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in a three- |
---|
| 72 | !! dimensional baroclinic ocean model with realistic topography. Tellus, 365-382. |
---|
| 73 | !!------------------------------------------------------------------------------ |
---|
| 74 | TYPE(OBC_INDEX), INTENT(in) :: idx ! OBC indices |
---|
| 75 | TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data |
---|
[3680] | 76 | INTEGER, INTENT(in) :: ib_bdy ! BDY set index |
---|
[3117] | 77 | !! |
---|
[4148] | 78 | INTEGER :: jb, jgrd ! dummy loop indices |
---|
[3117] | 79 | INTEGER :: ii, ij ! local scalar |
---|
| 80 | REAL(wp) :: zwgt, zwgt1 ! local scalar |
---|
| 81 | !!------------------------------------------------------------------------------ |
---|
| 82 | ! |
---|
[3182] | 83 | IF( nn_timing == 1 ) CALL timing_start('bdy_ice_frs') |
---|
| 84 | ! |
---|
[3117] | 85 | jgrd = 1 ! Everything is at T-points here |
---|
| 86 | ! |
---|
| 87 | DO jb = 1, idx%nblen(jgrd) |
---|
| 88 | ii = idx%nbi(jb,jgrd) |
---|
| 89 | ij = idx%nbj(jb,jgrd) |
---|
| 90 | zwgt = idx%nbw(jb,jgrd) |
---|
| 91 | zwgt1 = 1.e0 - idx%nbw(jb,jgrd) |
---|
| 92 | frld (ii,ij) = ( frld (ii,ij) * zwgt1 + dta%frld (jb) * zwgt ) * tmask(ii,ij,1) ! Leads fraction |
---|
| 93 | hicif(ii,ij) = ( hicif(ii,ij) * zwgt1 + dta%hicif(jb) * zwgt ) * tmask(ii,ij,1) ! Ice depth |
---|
| 94 | hsnif(ii,ij) = ( hsnif(ii,ij) * zwgt1 + dta%hsnif(jb) * zwgt ) * tmask(ii,ij,1) ! Snow depth |
---|
| 95 | END DO |
---|
[3680] | 96 | CALL lbc_bdy_lnk( frld, 'T', 1., ib_bdy ) ! lateral boundary conditions |
---|
| 97 | CALL lbc_bdy_lnk( hicif, 'T', 1., ib_bdy ) ; CALL lbc_bdy_lnk( hsnif, 'T', 1., ib_bdy ) |
---|
[3117] | 98 | ! |
---|
[3182] | 99 | IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_frs') |
---|
| 100 | ! |
---|
[3117] | 101 | END SUBROUTINE bdy_ice_frs |
---|
| 102 | #else |
---|
| 103 | !!--------------------------------------------------------------------------------- |
---|
| 104 | !! Default option Empty module |
---|
| 105 | !!--------------------------------------------------------------------------------- |
---|
| 106 | CONTAINS |
---|
| 107 | SUBROUTINE bdy_ice_lim_2( kt ) ! Empty routine |
---|
[3191] | 108 | WRITE(*,*) 'bdy_ice_frs_lim_2: You should not have seen this print! error?', kt |
---|
[3117] | 109 | END SUBROUTINE bdy_ice_lim_2 |
---|
| 110 | #endif |
---|
| 111 | |
---|
| 112 | !!================================================================================= |
---|
| 113 | END MODULE bdyice_lim2 |
---|