- Timestamp:
- 2016-01-04T11:49:32+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_med_test/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r5575 r6200 161 161 INTEGER, INTENT( in ) :: ksbc ! surface forcing type 162 162 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 163 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar163 REAL(wp), DIMENSION(:,:,:), POINTER :: ztfrz3d 164 164 INTEGER :: ji, jj, jl, jk ! dummy loop indices 165 165 !!--------------------------------------------------------------------- … … 174 174 jj_off = INT ( (jpjglo - ny_global) / 2 ) 175 175 176 #if defined key_nemocice_decomp 177 ! Pass initial SST from NEMO to CICE so ice is initialised correctly if 178 ! there is no restart file. 179 ! Values from a CICE restart file would overwrite this 180 IF ( .NOT. ln_rstart ) THEN 181 CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.) 182 ENDIF 183 #endif 184 185 ! Initialize CICE 176 ! Initialize CICE 186 177 CALL CICE_Initialize 187 178 188 ! Do some CICE consistency checks179 ! Do some CICE consistency checks 189 180 IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 190 181 IF ( calc_strair .OR. calc_Tsfc ) THEN … … 198 189 199 190 200 ! allocate sbc_ice and sbc_cice arrays201 IF( sbc_ice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_ cice_alloc : unable to allocate arrays' )191 ! allocate sbc_ice and sbc_cice arrays 192 IF( sbc_ice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_alloc : unable to allocate arrays' ) 202 193 IF( sbc_ice_cice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_cice_alloc : unable to allocate cice arrays' ) 203 194 204 ! Ensure ocean temperatures are nowhere below freezing if not a NEMO restart195 ! Ensure that no temperature points are below freezing if not a NEMO restart 205 196 IF( .NOT. ln_rstart ) THEN 206 tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem),Tocnfrz) 197 198 CALL wrk_alloc( jpi,jpj,jpk, ztfrz3d ) 199 DO jk=1,jpk 200 ztfrz3d(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept_n(:,:,jk) ) 201 ENDDO 202 tsn(:,:,:,jp_tem) = MAX( tsn(:,:,:,jp_tem), ztfrz3d ) 207 203 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 208 ENDIF 209 210 fr_iu(:,:)=0.0 211 fr_iv(:,:)=0.0 204 CALL wrk_dealloc( jpi,jpj,jpk, ztfrz3d ) 205 206 #if defined key_nemocice_decomp 207 ! Pass initial SST from NEMO to CICE so ice is initialised correctly if 208 ! there is no restart file. 209 ! Values from a CICE restart file would overwrite this 210 CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.) 211 #endif 212 213 ENDIF 214 215 ! calculate surface freezing temperature and send to CICE 216 sstfrz(:,:) = eos_fzp(sss_m(:,:), fsdept_n(:,:,1)) 217 CALL nemo2cice(sstfrz,Tf, 'T', 1. ) 212 218 213 219 CALL cice2nemo(aice,fr_i, 'T', 1. ) … … 220 226 ! T point to U point 221 227 ! T point to V point 228 fr_iu(:,:)=0.0 229 fr_iv(:,:)=0.0 222 230 DO jj=1,jpjm1 223 231 DO ji=1,jpim1 … … 348 356 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) 349 357 ENDDO 350 ELSE 351 ! emp_ice is set in sbc_cpl_ice_flx as sublimation-snow 352 qla_ice(:,:,1)= - ( emp_ice(:,:)+sprecip(:,:) ) * Lsub 353 ! End of temporary code 354 DO jj=1,jpj 355 DO ji=1,jpi 356 IF (fr_i(ji,jj).eq.0.0) THEN 357 DO jl=1,ncat 358 ztmpn(ji,jj,jl)=0.0 359 ENDDO 360 ! This will then be conserved in CICE 361 ztmpn(ji,jj,1)=qla_ice(ji,jj,1) 362 ELSE 363 DO jl=1,ncat 364 ztmpn(ji,jj,jl)=qla_ice(ji,jj,1)*a_i(ji,jj,jl)/fr_i(ji,jj) 365 ENDDO 366 ENDIF 367 ENDDO 358 ELSE IF (ksbc == jp_purecpl) THEN 359 DO jl=1,ncat 360 ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 368 361 ENDDO 362 ELSE 363 !In coupled mode - qla_ice calculated in sbc_cpl for each category 364 ztmpn(:,:,1:ncat)=qla_ice(:,:,1:ncat) 369 365 ENDIF 370 366 DO jl=1,ncat
Note: See TracChangeset
for help on using the changeset viewer.