- Timestamp:
- 2015-10-15T13:04:41+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_coupling_GSI7_GSI8_landice/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r5796 r5797 172 172 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 173 173 REAL(wp), DIMENSION(:,:,:), POINTER :: ztfrz3d 174 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar175 174 INTEGER :: ji, jj, jl, jk ! dummy loop indices 176 175 !!--------------------------------------------------------------------- … … 185 184 jj_off = INT ( (jpjglo - ny_global) / 2 ) 186 185 187 ! Set freezing temperatures and ensure consistencey between NEMO and CICE 188 CALL wrk_alloc( jpi,jpj,jpk, ztfrz3d ) 189 DO jk=1,jpk 190 ztfrz3d(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept_n(:,:,jk) ) 191 ENDDO 192 193 !Ensure that no temperature points are below freezing if not a NEMO restart 194 IF( .NOT. ln_rstart ) THEN 195 tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem),ztfrz3d) 196 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 197 ENDIF 198 199 #if defined key_nemocice_decomp 200 ! Pass initial SST from NEMO to CICE so ice is initialised correctly if 201 ! there is no restart file. 202 ! Values from a CICE restart file would overwrite this 203 IF ( .NOT. ln_rstart ) THEN 204 CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.) 205 ENDIF 206 #endif 207 208 ! Initialize CICE 186 ! Initialize CICE 209 187 CALL CICE_Initialize 210 188 211 ! Do some CICE consistency checks189 ! Do some CICE consistency checks 212 190 IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 213 191 IF ( calc_strair .OR. calc_Tsfc ) THEN … … 221 199 222 200 223 ! allocate sbc_ice and sbc_cice arrays224 IF( sbc_ice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_ cice_alloc : unable to allocate arrays' )201 ! allocate sbc_ice and sbc_cice arrays 202 IF( sbc_ice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_alloc : unable to allocate arrays' ) 225 203 IF( sbc_ice_cice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_cice_alloc : unable to allocate cice arrays' ) 226 204 227 ! Populate the surface freezing temperature array 228 sstfrz(:,:)=ztfrz3d(:,:,1) 229 230 fr_iu(:,:)=0.0 231 fr_iv(:,:)=0.0 205 ! Ensure that no temperature points are below freezing if not a NEMO restart 206 IF( .NOT. ln_rstart ) THEN 207 208 CALL wrk_alloc( jpi,jpj,jpk, ztfrz3d ) 209 DO jk=1,jpk 210 ztfrz3d(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept_n(:,:,jk) ) 211 ENDDO 212 tsn(:,:,:,jp_tem) = MAX( tsn(:,:,:,jp_tem), ztfrz3d ) 213 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 214 CALL wrk_dealloc( jpi,jpj,jpk, ztfrz3d ) 215 216 #if defined key_nemocice_decomp 217 ! Pass initial SST from NEMO to CICE so ice is initialised correctly if 218 ! there is no restart file. 219 ! Values from a CICE restart file would overwrite this 220 CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.) 221 #endif 222 223 ENDIF 224 225 ! calculate surface freezing temperature and send to CICE 226 sstfrz(:,:) = eos_fzp(sss_m(:,:), fsdept_n(:,:,1)) 227 CALL nemo2cice(sstfrz,Tf, 'T', 1. ) 232 228 233 229 CALL cice2nemo(aice,fr_i, 'T', 1. ) … … 240 236 ! T point to U point 241 237 ! T point to V point 238 fr_iu(:,:)=0.0 239 fr_iv(:,:)=0.0 242 240 DO jj=1,jpjm1 243 241 DO ji=1,jpim1 … … 303 301 304 302 CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 305 CALL wrk_dealloc( jpi,jpj,jpk, ztfrz3d )306 303 ! 307 304 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_init') … … 381 378 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) 382 379 ENDDO 383 ELSE IF (ksbc == jp_purecpl) THEN 384 DO jl=1,ncat 385 ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 386 ENDDO 387 ELSE 380 ELSE IF (ksbc == jp_purecpl) THEN 381 DO jl=1,ncat 382 ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 383 ENDDO 384 ELSE 388 385 !In coupled mode - qla_ice calculated in sbc_cpl for each category 389 386 ztmpn(:,:,1:ncat)=qla_ice(:,:,1:ncat)
Note: See TracChangeset
for help on using the changeset viewer.