[3] | 1 | MODULE limistate |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limistate *** |
---|
| 4 | !! Initialisation of diagnostics ice variables |
---|
| 5 | !!====================================================================== |
---|
[717] | 6 | !! History : 1.0 ! 01-04 (C. Ethe, G. Madec) Original code |
---|
| 7 | !! 2.0 ! 03-08 (G. Madec) add lim_istate_init |
---|
[508] | 8 | !! ! 04-04 (S. Theetten) initialization from a file |
---|
| 9 | !! ! 06-07 (S. Masson) IOM to read the restart |
---|
[717] | 10 | !! ! 07-10 (G. Madec) surface module |
---|
[508] | 11 | !!-------------------------------------------------------------------- |
---|
[3] | 12 | #if defined key_ice_lim |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | !! 'key_ice_lim' : LIM sea-ice model |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
[508] | 16 | !!---------------------------------------------------------------------- |
---|
[3] | 17 | !! lim_istate : Initialisation of diagnostics ice variables |
---|
| 18 | !! lim_istate_init : initialization of ice state and namelist read |
---|
| 19 | !!---------------------------------------------------------------------- |
---|
| 20 | USE phycst |
---|
| 21 | USE ocfzpt |
---|
[77] | 22 | USE par_ice ! ice parameters |
---|
[3] | 23 | USE ice_oce ! ice variables |
---|
| 24 | USE dom_ice |
---|
[508] | 25 | USE lbclnk |
---|
[717] | 26 | USE oce |
---|
[3] | 27 | USE ice |
---|
[508] | 28 | USE iom |
---|
| 29 | USE in_out_manager |
---|
[3] | 30 | |
---|
| 31 | IMPLICIT NONE |
---|
| 32 | PRIVATE |
---|
| 33 | |
---|
[717] | 34 | PUBLIC lim_istate ! routine called by lim_init.F90 |
---|
[3] | 35 | |
---|
[717] | 36 | REAL(wp) :: & !!! ** init namelist (namiceini) ** |
---|
[3] | 37 | ttest = 2.0 , & ! threshold water temperature for initial sea ice |
---|
| 38 | hninn = 0.5 , & ! initial snow thickness in the north |
---|
| 39 | hginn = 3.0 , & ! initial ice thickness in the north |
---|
| 40 | alinn = 0.05 , & ! initial leads area in the north |
---|
| 41 | hnins = 0.1 , & ! initial snow thickness in the south |
---|
| 42 | hgins = 1.0 , & ! initial ice thickness in the south |
---|
| 43 | alins = 0.1 ! initial leads area in the south |
---|
| 44 | |
---|
[77] | 45 | REAL(wp) :: & ! constant values |
---|
| 46 | zzero = 0.e0 , & |
---|
| 47 | zone = 1.e0 |
---|
[3] | 48 | !!---------------------------------------------------------------------- |
---|
[508] | 49 | !! LIM 2.0, UCL-LOCEAN-IPSL (2006) |
---|
[699] | 50 | !! $Id$ |
---|
[508] | 51 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
[3] | 52 | !!---------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | CONTAINS |
---|
| 55 | |
---|
| 56 | SUBROUTINE lim_istate |
---|
| 57 | !!------------------------------------------------------------------- |
---|
| 58 | !! *** ROUTINE lim_istate *** |
---|
| 59 | !! |
---|
[77] | 60 | !! ** Purpose : defined the sea-ice initial state |
---|
| 61 | !! |
---|
| 62 | !! ** Method : restart from a state defined in a binary file |
---|
| 63 | !! or from arbitrary sea-ice conditions |
---|
[3] | 64 | !!-------------------------------------------------------------------- |
---|
[508] | 65 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 66 | REAL(wp) :: zidto, zs0, ztf, zbin ! temporary scalar |
---|
| 67 | REAL(wp), DIMENSION(jpi,jpj) :: ztn ! workspace |
---|
[3] | 68 | !-------------------------------------------------------------------- |
---|
[717] | 69 | |
---|
| 70 | CALL lim_istate_init ! reading the initials parameters of the ice |
---|
[3] | 71 | |
---|
[717] | 72 | IF( .NOT. ln_limini ) THEN |
---|
[419] | 73 | |
---|
| 74 | ! Initialisation at tn or -2 if ice |
---|
| 75 | DO jj = 1, jpj |
---|
| 76 | DO ji = 1, jpi |
---|
| 77 | zbin = MAX( 0., SIGN( 1., fzptn(ji,jj) - tn(ji,jj,1) ) ) |
---|
| 78 | ztn(ji,jj) = ( (1.-zbin) * tn(ji,jj,1) - 2. * zbin + rt0 ) * tmask(ji,jj,1) |
---|
| 79 | END DO |
---|
[77] | 80 | END DO |
---|
[717] | 81 | |
---|
| 82 | ! tfu: Melting point of sea water [Kelvin] |
---|
[419] | 83 | zs0 = 34.e0 |
---|
[717] | 84 | ztf = rt0 + ( - 0.0575 + 1.710523e-3 * SQRT( zs0 ) - 2.154996e-4 * zs0 ) * zs0 |
---|
| 85 | tfu(:,:) = ztf |
---|
[419] | 86 | |
---|
| 87 | DO jj = 1, jpj |
---|
| 88 | DO ji = 1, jpi |
---|
| 89 | !--- Criterion for presence (zidto=1) or absence (zidto=0) of ice |
---|
| 90 | zidto = tms(ji,jj) * ( 1.0 - MAX(zzero, SIGN( zone, ztn(ji,jj) - tfu(ji,jj) - ttest) ) ) |
---|
| 91 | |
---|
| 92 | IF( fcor(ji,jj) >= 0.e0 ) THEN !-- Northern hemisphere. |
---|
| 93 | hicif(ji,jj) = zidto * hginn |
---|
| 94 | frld(ji,jj) = zidto * alinn + ( 1.0 - zidto ) * 1.0 |
---|
| 95 | hsnif(ji,jj) = zidto * hninn |
---|
| 96 | ELSE !--- Southern hemisphere. |
---|
| 97 | hicif(ji,jj) = zidto * hgins |
---|
| 98 | frld(ji,jj) = zidto * alins + ( 1.0 - zidto ) * 1.0 |
---|
| 99 | hsnif(ji,jj) = zidto * hnins |
---|
| 100 | ENDIF |
---|
| 101 | END DO |
---|
| 102 | END DO |
---|
| 103 | |
---|
| 104 | sist (:,:) = tfu(:,:) |
---|
| 105 | tbif (:,:,1) = tfu(:,:) |
---|
| 106 | tbif (:,:,2) = tfu(:,:) |
---|
| 107 | tbif (:,:,3) = tfu(:,:) |
---|
[717] | 108 | |
---|
[419] | 109 | ENDIF |
---|
[717] | 110 | |
---|
[3] | 111 | fsbbq (:,:) = 0.e0 |
---|
| 112 | qstoif(:,:) = 0.e0 |
---|
[717] | 113 | ui_ice(:,:) = 0.e0 |
---|
| 114 | vi_ice(:,:) = 0.e0 |
---|
[3] | 115 | # if defined key_coupled |
---|
| 116 | albege(:,:) = 0.8 * tms(:,:) |
---|
| 117 | # endif |
---|
| 118 | |
---|
[77] | 119 | !--- Moments for advection. |
---|
[3] | 120 | |
---|
[77] | 121 | sxice (:,:) = 0.e0 ; sxsn (:,:) = 0.e0 ; sxa (:,:) = 0.e0 |
---|
| 122 | syice (:,:) = 0.e0 ; sysn (:,:) = 0.e0 ; sya (:,:) = 0.e0 |
---|
| 123 | sxxice(:,:) = 0.e0 ; sxxsn(:,:) = 0.e0 ; sxxa (:,:) = 0.e0 |
---|
| 124 | syyice(:,:) = 0.e0 ; syysn(:,:) = 0.e0 ; syya (:,:) = 0.e0 |
---|
| 125 | sxyice(:,:) = 0.e0 ; sxysn(:,:) = 0.e0 ; sxya (:,:) = 0.e0 |
---|
[3] | 126 | |
---|
[77] | 127 | sxc0 (:,:) = 0.e0 ; sxc1 (:,:) = 0.e0 ; sxc2 (:,:) = 0.e0 |
---|
| 128 | syc0 (:,:) = 0.e0 ; syc1 (:,:) = 0.e0 ; syc2 (:,:) = 0.e0 |
---|
| 129 | sxxc0 (:,:) = 0.e0 ; sxxc1(:,:) = 0.e0 ; sxxc2(:,:) = 0.e0 |
---|
| 130 | syyc0 (:,:) = 0.e0 ; syyc1(:,:) = 0.e0 ; syyc2(:,:) = 0.e0 |
---|
| 131 | sxyc0 (:,:) = 0.e0 ; sxyc1(:,:) = 0.e0 ; sxyc2(:,:) = 0.e0 |
---|
[3] | 132 | |
---|
[77] | 133 | sxst (:,:) = 0.e0 |
---|
| 134 | syst (:,:) = 0.e0 |
---|
| 135 | sxxst (:,:) = 0.e0 |
---|
| 136 | syyst (:,:) = 0.e0 |
---|
| 137 | sxyst (:,:) = 0.e0 |
---|
[3] | 138 | |
---|
[77] | 139 | !-- lateral boundary conditions |
---|
| 140 | CALL lbc_lnk( hicif, 'T', 1. ) |
---|
| 141 | CALL lbc_lnk( frld , 'T', 1. ) |
---|
[299] | 142 | |
---|
| 143 | ! C A U T I O N frld = 1 over land and lbc_lnk put zero along |
---|
| 144 | ! ************* closed boundaries herefore we force to one over land |
---|
| 145 | frld(:,:) = tms(:,:) * frld(:,:) + ( 1. - tms(:,:) ) |
---|
| 146 | |
---|
[77] | 147 | CALL lbc_lnk( hsnif, 'T', 1. ) |
---|
[717] | 148 | CALL lbc_lnk( sist , 'T', 1. , pval = rt0 ) ! set rt0 on closed boundary (required by bulk formulation) |
---|
[77] | 149 | DO jk = 1, jplayersp1 |
---|
| 150 | CALL lbc_lnk(tbif(:,:,jk), 'T', 1. ) |
---|
| 151 | END DO |
---|
| 152 | CALL lbc_lnk( fsbbq , 'T', 1. ) |
---|
| 153 | CALL lbc_lnk( qstoif , 'T', 1. ) |
---|
[717] | 154 | |
---|
[3] | 155 | END SUBROUTINE lim_istate |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | SUBROUTINE lim_istate_init |
---|
| 159 | !!------------------------------------------------------------------- |
---|
| 160 | !! *** ROUTINE lim_istate_init *** |
---|
| 161 | !! |
---|
[77] | 162 | !! ** Purpose : Definition of initial state of the ice |
---|
[3] | 163 | !! |
---|
[77] | 164 | !! ** Method : Read the namiceini namelist and check the parameter |
---|
[717] | 165 | !! values called at the first timestep (nit000) |
---|
[3] | 166 | !! |
---|
[77] | 167 | !! ** input : Namelist namiceini |
---|
[3] | 168 | !!------------------------------------------------------------------- |
---|
[508] | 169 | INTEGER :: inum_ice |
---|
[673] | 170 | INTEGER :: ji,jj |
---|
[419] | 171 | |
---|
[675] | 172 | NAMELIST/namiceini/ ln_limini, ttest, hninn, hginn, alinn, & |
---|
[419] | 173 | & hnins, hgins, alins |
---|
[3] | 174 | !!------------------------------------------------------------------- |
---|
[717] | 175 | ! |
---|
| 176 | REWIND ( numnam_ice ) ! Read Namelist namiceini |
---|
[3] | 177 | READ ( numnam_ice , namiceini ) |
---|
[717] | 178 | |
---|
| 179 | IF(lwp) THEN |
---|
| 180 | WRITE(numout,*) |
---|
| 181 | WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' |
---|
| 182 | WRITE(numout,*) '~~~~~~~~~~~~~~~' |
---|
| 183 | WRITE(numout,*) ' threshold water temp. for initial sea-ice ttest = ', ttest |
---|
| 184 | WRITE(numout,*) ' initial snow thickness in the north hninn = ', hninn |
---|
| 185 | WRITE(numout,*) ' initial ice thickness in the north hginn = ', hginn |
---|
| 186 | WRITE(numout,*) ' initial leads area in the north alinn = ', alinn |
---|
| 187 | WRITE(numout,*) ' initial snow thickness in the south hnins = ', hnins |
---|
| 188 | WRITE(numout,*) ' initial ice thickness in the south hgins = ', hgins |
---|
| 189 | WRITE(numout,*) ' initial leads area in the south alins = ', alins |
---|
| 190 | WRITE(numout,*) ' Ice state initialization using input file ln_limini = ', ln_limini |
---|
[3] | 191 | ENDIF |
---|
[419] | 192 | |
---|
| 193 | IF( ln_limini ) THEN ! Ice initialization using input file |
---|
[717] | 194 | ! |
---|
[508] | 195 | CALL iom_open( 'Ice_initialization.nc', inum_ice ) |
---|
[717] | 196 | ! |
---|
[508] | 197 | IF( inum_ice > 0 ) THEN |
---|
[717] | 198 | IF(lwp) WRITE(numout,*) |
---|
| 199 | IF(lwp) WRITE(numout,*) ' ice state initialization with : Ice_initialization.nc' |
---|
[3] | 200 | |
---|
[717] | 201 | CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif ) |
---|
| 202 | CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif ) |
---|
| 203 | CALL iom_get( inum_ice, jpdom_data, 'frld' , frld ) |
---|
| 204 | CALL iom_get( inum_ice, jpdom_data, 'ts' , sist ) |
---|
[673] | 205 | CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:), & |
---|
[508] | 206 | & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) ) |
---|
[673] | 207 | ! put some values in the extra-halo... |
---|
| 208 | DO jj = nlcj+1, jpj ; tbif(1:nlci,jj,:) = tbif(1:nlci,nlej,:) ; END DO |
---|
| 209 | DO ji = nlci+1, jpi ; tbif(ji ,: ,:) = tbif(nlei ,: ,:) ; END DO |
---|
[508] | 210 | |
---|
| 211 | CALL iom_close( inum_ice) |
---|
[717] | 212 | ! |
---|
[419] | 213 | ENDIF |
---|
| 214 | ENDIF |
---|
[717] | 215 | ! |
---|
[3] | 216 | END SUBROUTINE lim_istate_init |
---|
| 217 | |
---|
| 218 | #else |
---|
| 219 | !!---------------------------------------------------------------------- |
---|
| 220 | !! Default option : Empty module NO LIM sea-ice model |
---|
| 221 | !!---------------------------------------------------------------------- |
---|
| 222 | CONTAINS |
---|
| 223 | SUBROUTINE lim_istate ! Empty routine |
---|
| 224 | END SUBROUTINE lim_istate |
---|
| 225 | #endif |
---|
| 226 | |
---|
| 227 | !!====================================================================== |
---|
| 228 | END MODULE limistate |
---|