Changeset 888 for trunk/NEMO/LIM_SRC_2/limistate_2.F90
- Timestamp:
- 2008-04-11T19:05:03+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/LIM_SRC_2/limistate_2.F90
r823 r888 4 4 !! Initialisation of diagnostics ice variables 5 5 !!====================================================================== 6 !! History : 2.0 ! 01-04 (C. Ethe, G. Madec) Original code 6 !! History : 1.0 ! 01-04 (C. Ethe, G. Madec) Original code 7 !! 2.0 ! 03-08 (G. Madec) add lim_istate_init 7 8 !! ! 04-04 (S. Theetten) initialization from a file 8 9 !! ! 06-07 (S. Masson) IOM to read the restart 10 !! ! 07-10 (G. Madec) surface module 9 11 !!-------------------------------------------------------------------- 10 12 #if defined key_lim2 … … 18 20 USE phycst 19 21 USE ocfzpt 20 USE oce ! dynamics and tracers variables !!gm used???21 USE dom_oce !!gm used???22 22 USE par_ice_2 ! ice parameters 23 23 USE ice_oce ! ice variables 24 24 USE dom_ice_2 25 25 USE lbclnk 26 USE oce 26 27 USE ice_2 27 28 USE iom … … 47 48 !!---------------------------------------------------------------------- 48 49 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 49 !! $ Header$50 !! $ Id: $ 50 51 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 52 !!---------------------------------------------------------------------- … … 66 67 REAL(wp), DIMENSION(jpi,jpj) :: ztn ! workspace 67 68 !-------------------------------------------------------------------- 68 69 CALL lim_istate_init_2 ! reading the initials parameters of the ice 70 71 !-- Initialisation of sst,sss,u,v do i=1,jpi 72 u_io(:,:) = 0.e0 ! ice velocity in x direction 73 v_io(:,:) = 0.e0 ! ice velocity in y direction 74 75 IF( ln_limini ) THEN ! 76 77 ! Initialisation at tn if no ice or sst_ini if ice 78 ! Idem for salinity 79 80 !--- Criterion for presence (zidto=1.) or absence (zidto=0.) of ice 81 DO jj = 1 , jpj 82 DO ji = 1 , jpi 83 84 zidto = MAX(zzero, - SIGN(1.,frld(ji,jj) - 1.)) 85 86 sst_io(ji,jj) = ( nfice - 1 ) * (zidto * sst_ini(ji,jj) + & ! use the ocean initial values 87 & (1.0 - zidto ) * ( tn(ji,jj,1) + rt0 )) ! tricky trick *(nfice-1) ! 88 sss_io(ji,jj) = ( nfice - 1 ) * (zidto * sss_ini(ji,jj) + & 89 & (1.0 - zidto ) * sn(ji,jj,1) ) 90 91 ! to avoid the the melting of ice, several layers (mixed layer) should be 92 ! set to sst_ini (sss_ini) if there is ice 93 ! example for one layer 94 ! tn(ji,jj,1) = zidto * ( sst_ini(ji,jj) - rt0 ) + (1.0 - zidto ) * tn(ji,jj,1) 95 ! sn(ji,jj,1) = zidto * sss_ini(ji,jj) + (1.0 - zidto ) * sn(ji,jj,1) 96 ! tb(ji,jj,1) = tn(ji,jj,1) 97 ! sb(ji,jj,1) = sn(ji,jj,1) 98 END DO 99 END DO 100 101 102 ! tfu: Melting point of sea water 103 tfu(:,:) = ztf 104 105 tfu(:,:) = ABS ( rt0 - 0.0575 * sss_ini(:,:) & 106 & + 1.710523e-03 * sss_ini(:,:) * SQRT( sss_ini(:,:) ) & 107 & - 2.154996e-04 * sss_ini(:,:) * sss_ini(:,:) ) 108 ELSE ! 109 69 70 CALL lim_istate_init_2 ! reading the initials parameters of the ice 71 72 IF( .NOT. ln_limini ) THEN 110 73 111 74 ! Initialisation at tn or -2 if ice … … 116 79 END DO 117 80 END DO 118 119 u_io (:,:) = 0.e0 120 v_io (:,:) = 0.e0 121 sst_io(:,:) = ( nfice - 1 ) * ( tn(:,:,1) + rt0 ) ! use the ocean initial values 122 sss_io(:,:) = ( nfice - 1 ) * sn(:,:,1) ! tricky trick *(nfice-1) ! 123 124 ! reference salinity 34psu 81 82 ! tfu: Melting point of sea water [Kelvin] 125 83 zs0 = 34.e0 126 ztf = ABS ( rt0 - 0.0575 * zs0 & 127 & + 1.710523e-03 * zs0 * SQRT( zs0 ) & 128 & - 2.154996e-04 * zs0 *zs0 ) 129 130 ! tfu: Melting point of sea water 131 tfu(:,:) = ztf 84 ztf = rt0 + ( - 0.0575 + 1.710523e-3 * SQRT( zs0 ) - 2.154996e-4 * zs0 ) * zs0 85 tfu(:,:) = ztf 132 86 133 87 DO jj = 1, jpj … … 152 106 tbif (:,:,2) = tfu(:,:) 153 107 tbif (:,:,3) = tfu(:,:) 154 108 155 109 ENDIF 110 156 111 fsbbq (:,:) = 0.e0 157 112 qstoif(:,:) = 0.e0 158 u _ice(:,:) = 0.e0159 v _ice(:,:) = 0.e0113 ui_ice(:,:) = 0.e0 114 vi_ice(:,:) = 0.e0 160 115 # if defined key_coupled 161 116 albege(:,:) = 0.8 * tms(:,:) … … 191 146 192 147 CALL lbc_lnk( hsnif, 'T', 1. ) 193 CALL lbc_lnk( sist , 'T', 1. )148 CALL lbc_lnk( sist , 'T', 1. , pval = rt0 ) ! set rt0 on closed boundary (required by bulk formulation) 194 149 DO jk = 1, jplayersp1 195 150 CALL lbc_lnk(tbif(:,:,jk), 'T', 1. ) … … 197 152 CALL lbc_lnk( fsbbq , 'T', 1. ) 198 153 CALL lbc_lnk( qstoif , 'T', 1. ) 199 CALL lbc_lnk( sss_io , 'T', 1. ) 200 ! 154 201 155 END SUBROUTINE lim_istate_2 202 156 … … 209 163 !! 210 164 !! ** Method : Read the namiceini namelist and check the parameter 211 !! values called at the first timestep (nit000) 212 !! or 213 !! Read 7 variables from a previous restart file 214 !! sst, sst, hicif, hsnif, frld, ts & tbif 165 !! values called at the first timestep (nit000) 215 166 !! 216 167 !! ** input : Namelist namiceini … … 222 173 & hnins, hgins, alins 223 174 !!------------------------------------------------------------------- 224 225 ! Read Namelist namiceini 226 REWIND ( numnam_ice ) 175 ! 176 REWIND ( numnam_ice ) ! Read Namelist namiceini 227 177 READ ( numnam_ice , namiceini ) 228 229 IF(.NOT. ln_limini) THEN 230 IF(lwp) THEN 231 WRITE(numout,*) 232 WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' 233 WRITE(numout,*) '~~~~~~~~~~~~~~~' 234 WRITE(numout,*) ' threshold water temp. for initial sea-ice ttest = ', ttest 235 WRITE(numout,*) ' initial snow thickness in the north hninn = ', hninn 236 WRITE(numout,*) ' initial ice thickness in the north hginn = ', hginn 237 WRITE(numout,*) ' initial leads area in the north alinn = ', alinn 238 WRITE(numout,*) ' initial snow thickness in the south hnins = ', hnins 239 WRITE(numout,*) ' initial ice thickness in the south hgins = ', hgins 240 WRITE(numout,*) ' initial leads area in the south alins = ', alins 241 ENDIF 178 ! 179 IF(lwp) THEN 180 WRITE(numout,*) 181 WRITE(numout,*) 'lim_istate_init_2 : 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 242 191 ENDIF 243 192 244 193 IF( ln_limini ) THEN ! Ice initialization using input file 245 194 ! 246 195 CALL iom_open( 'Ice_initialization.nc', inum_ice ) 247 196 ! 248 197 IF( inum_ice > 0 ) THEN 249 IF(lwp) THEN 250 WRITE(numout,*) ' ' 251 WRITE(numout,*) 'lim_istate_init : ice state initialization with : Ice_initialization.nc' 252 WRITE(numout,*) '~~~~~~~~~~~~~~~' 253 WRITE(numout,*) ' Ice state initialization using input file ln_limini = ', ln_limini 254 WRITE(numout,*) ' ' 255 ENDIF 198 IF(lwp) WRITE(numout,*) 199 IF(lwp) WRITE(numout,*) ' ice state initialization with : Ice_initialization.nc' 256 200 257 CALL iom_get( inum_ice, jpdom_data, 'sst' , sst_ini(:,:) ) 258 CALL iom_get( inum_ice, jpdom_data, 'sss' , sss_ini(:,:) ) 259 CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif (:,:) ) 260 CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif (:,:) ) 261 CALL iom_get( inum_ice, jpdom_data, 'frld' , frld (:,:) ) 262 CALL iom_get( inum_ice, jpdom_data, 'ts' , sist (:,:) ) 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 ) 263 205 CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:), & 264 206 & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) ) … … 268 210 269 211 CALL iom_close( inum_ice) 270 212 ! 271 213 ENDIF 272 214 ENDIF 273 ! 215 ! 274 216 END SUBROUTINE lim_istate_init_2 275 217
Note: See TracChangeset
for help on using the changeset viewer.