Changeset 3508
- Timestamp:
- 2012-10-17T13:40:14+02:00 (12 years ago)
- Location:
- branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90
r3488 r3508 18 18 USE oce ! dynamics and tracers 19 19 USE dom_oce ! ocean space and time domain 20 USE phycst 20 21 USE in_out_manager ! I/O manager 21 22 USE sbc_oce ! ocean surface boundary conditions -
branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90
r3396 r3508 187 187 WRITE(numout,*) ' fresh ice specific heat = ', cpic , ' J/kg/K' 188 188 WRITE(numout,*) ' latent heat of fusion of fresh ice / snow = ', lfus , ' J/kg' 189 #if defined key_lim3 189 #if defined key_lim3 || defined key_cice 190 190 WRITE(numout,*) ' latent heat of subl. of fresh ice / snow = ', lsub , ' J/kg' 191 191 #else -
branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r3488 r3508 15 15 USE dom_oce ! ocean space and time domain 16 16 USE domvvl 17 USE phycst, only : rcp, rau0 17 USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic 18 18 USE in_out_manager ! I/O manager 19 19 USE lib_mpp ! distributed memory computing library … … 37 37 USE ice_gather_scatter 38 38 USE ice_calendar, only: dt 39 USE ice_state, only: aice,aicen,uvel,vvel,vsno n,vicen39 USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen 40 40 USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow, & 41 41 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm, & … … 59 59 PUBLIC cice_sbc_final ! routine called by sbc_final 60 60 PUBLIC sbc_ice_cice ! routine called by sbc 61 62 INTEGER , PARAMETER :: ji_off = INT ( (jpiglo - nx_global) / 2 ) 63 INTEGER , PARAMETER :: jj_off = INT ( (jpjglo - ny_global) / 2 ) 61 64 62 65 INTEGER , PARAMETER :: jpfld = 13 ! maximum number of files to read … … 107 110 !! ** Action : - time evolution of the CICE sea-ice model 108 111 !! - update all sbc variables below sea-ice: 109 !! utau, vtau, qns , qsr, emp , sfx 112 !! utau, vtau, qns , qsr, emp , sfx 110 113 !!--------------------------------------------------------------------- 111 114 INTEGER, INTENT(in) :: kt ! ocean time step … … 138 141 END SUBROUTINE sbc_ice_cice 139 142 140 141 143 SUBROUTINE cice_sbc_init (nsbc) 142 144 !!--------------------------------------------------------------------- … … 144 146 !! ** Purpose: Initialise ice related fields for NEMO and coupling 145 147 !! 146 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 147 !!--------------------------------------------------------------------- 148 149 INTEGER :: ji, jj, jpl ! dummy loop indices 148 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 149 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 150 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar 151 INTEGER :: ji, jj, jl ! dummy loop indices 152 !!--------------------------------------------------------------------- 150 153 151 154 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_init') 155 ! 156 CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 152 157 ! 153 158 IF(lwp) WRITE(numout,*)'cice_sbc_init' … … 183 188 CALL cice2nemo(aice,fr_i, 'T', 1. ) 184 189 IF ( (nsbc == 2).OR.(nsbc == 5) ) THEN 185 DO j pl=1,ncat186 CALL cice2nemo(aicen(:,:,j pl,:),a_i(:,:,jpl), 'T', 1. )190 DO jl=1,ncat 191 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 187 192 ENDDO 188 193 ENDIF … … 199 204 CALL lbc_lnk ( fr_iu , 'U', 1. ) 200 205 CALL lbc_lnk ( fr_iv , 'V', 1. ) 206 207 ! ! embedded sea ice 208 IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 209 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 210 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 211 snwice_mass (:,:) = ( rhosn * ztmp1(:,:) + rhoic * ztmp2(:,:) ) 212 snwice_mass_b(:,:) = snwice_mass(:,:) 213 ELSE 214 snwice_mass (:,:) = 0.0_wp ! no mass exchanges 215 snwice_mass_b(:,:) = 0.0_wp ! no mass exchanges 216 ENDIF 217 IF( nn_ice_embd == 2 .AND. & ! full embedment (case 2) & no restart : 218 & .NOT.ln_rstart ) THEN ! deplete the initial ssh belew sea-ice area 219 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 220 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 221 ! 222 ! Note: Changed the initial values of sshb and sshn=> need to recompute ssh[u,v,f]_[b,n] 223 ! which were previously set in domvvl 224 IF ( lk_vvl ) THEN ! Is this necessary? embd 2 should be restricted to vvl only??? 225 DO jj = 1, jpjm1 226 DO ji = 1, jpim1 ! caution: use of Vector Opt. not possible 227 zcoefu = 0.5 * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) ) 228 zcoefv = 0.5 * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) ) 229 zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1) 230 sshu_b(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshb(ji ,jj) & 231 & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) ) 232 sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshb(ji,jj ) & 233 & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) ) 234 sshu_n(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshn(ji ,jj) & 235 & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) ) 236 sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshn(ji,jj ) & 237 & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) ) 238 END DO 239 END DO 240 CALL lbc_lnk( sshu_b, 'U', 1. ) ; CALL lbc_lnk( sshu_n, 'U', 1. ) 241 CALL lbc_lnk( sshv_b, 'V', 1. ) ; CALL lbc_lnk( sshv_n, 'V', 1. ) 242 DO jj = 1, jpjm1 243 DO ji = 1, jpim1 ! NO Vector Opt. 244 sshf_n(ji,jj) = 0.5 * umask(ji,jj,1) * umask(ji,jj+1,1) & 245 & / ( e1f(ji,jj ) * e2f(ji,jj ) ) & 246 & * ( e1u(ji,jj ) * e2u(ji,jj ) * sshu_n(ji,jj ) & 247 & + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) ) 248 END DO 249 END DO 250 CALL lbc_lnk( sshf_n, 'F', 1. ) 251 ENDIF 252 ENDIF 253 254 CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 201 255 ! 202 256 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_init') … … 213 267 INTEGER, INTENT(in ) :: nsbc ! surface forcing type 214 268 215 INTEGER :: ji, jj, j pl ! dummy loop indices216 REAL(wp), DIMENSION(:,:), POINTER :: ztmp 269 INTEGER :: ji, jj, jl ! dummy loop indices 270 REAL(wp), DIMENSION(:,:), POINTER :: ztmp, zpice 217 271 REAL(wp), DIMENSION(:,:,:), POINTER :: ztmpn 272 REAL(wp) :: zintb, zintn ! dummy argument 218 273 !!--------------------------------------------------------------------- 219 274 220 275 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_in') 221 276 ! 222 CALL wrk_alloc( jpi,jpj, ztmp )277 CALL wrk_alloc( jpi,jpj, ztmp, zpice ) 223 278 CALL wrk_alloc( jpi,jpj,ncat, ztmpn ) 224 279 … … 260 315 ! Surface downward latent heat flux (CI_5) 261 316 IF (nsbc == 2) THEN 262 DO j pl=1,ncat263 ztmpn(:,:,j pl)=qla_ice(:,:,1)*a_i(:,:,jpl)317 DO jl=1,ncat 318 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) 264 319 ENDDO 265 320 ELSE … … 270 325 DO ji=1,jpi 271 326 IF (fr_i(ji,jj).eq.0.0) THEN 272 DO j pl=1,ncat273 ztmpn(ji,jj,j pl)=0.0327 DO jl=1,ncat 328 ztmpn(ji,jj,jl)=0.0 274 329 ENDDO 275 330 ! This will then be conserved in CICE 276 331 ztmpn(ji,jj,1)=qla_ice(ji,jj,1) 277 332 ELSE 278 DO j pl=1,ncat279 ztmpn(ji,jj,j pl)=qla_ice(ji,jj,1)*a_i(ji,jj,jpl)/fr_i(ji,jj)333 DO jl=1,ncat 334 ztmpn(ji,jj,jl)=qla_ice(ji,jj,1)*a_i(ji,jj,jl)/fr_i(ji,jj) 280 335 ENDDO 281 336 ENDIF … … 283 338 ENDDO 284 339 ENDIF 285 DO j pl=1,ncat286 CALL nemo2cice(ztmpn(:,:,j pl),flatn_f(:,:,jpl,:),'T', 1. )340 DO jl=1,ncat 341 CALL nemo2cice(ztmpn(:,:,jl),flatn_f(:,:,jl,:),'T', 1. ) 287 342 288 343 ! GBM conductive flux through ice (CI_6) 289 344 ! Convert to GBM 290 345 IF (nsbc == 2) THEN 291 ztmp(:,:) = botmelt(:,:,j pl)*a_i(:,:,jpl)346 ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 292 347 ELSE 293 ztmp(:,:) = botmelt(:,:,j pl)348 ztmp(:,:) = botmelt(:,:,jl) 294 349 ENDIF 295 CALL nemo2cice(ztmp,fcondtopn_f(:,:,j pl,:),'T', 1. )350 CALL nemo2cice(ztmp,fcondtopn_f(:,:,jl,:),'T', 1. ) 296 351 297 352 ! GBM surface heat flux (CI_7) 298 353 ! Convert to GBM 299 354 IF (nsbc == 2) THEN 300 ztmp(:,:) = (topmelt(:,:,j pl)+botmelt(:,:,jpl))*a_i(:,:,jpl)355 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 301 356 ELSE 302 ztmp(:,:) = (topmelt(:,:,j pl)+botmelt(:,:,jpl))357 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 303 358 ENDIF 304 CALL nemo2cice(ztmp,fsurfn_f(:,:,j pl,:),'T', 1. )359 CALL nemo2cice(ztmp,fsurfn_f(:,:,jl,:),'T', 1. ) 305 360 ENDDO 306 361 … … 384 439 CALL nemo2cice(ztmp,vocn,'F', -1. ) 385 440 441 IF( nn_ice_embd == 2 ) THEN !== embedded sea ice: compute representative ice top surface ==! 442 ! 443 ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 444 ! = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1} 445 zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp 446 ! 447 ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1} 448 ! = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1}) 449 zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 450 ! 451 zpice(:,:) = ssh_m(:,:) + ( zintn * snwice_mass(:,:) + zintb * snwice_mass_b(:,:) ) * r1_rau0 452 ! 453 ! 454 ELSE !== non-embedded sea ice: use ocean surface for slope calculation ==! 455 zpice(:,:) = ssh_m(:,:) 456 ENDIF 457 386 458 ! x comp and y comp of sea surface slope (on F points) 387 459 ! T point to F point 388 460 DO jj=1,jpjm1 389 461 DO ji=1,jpim1 390 ztmp(ji,jj)=0.5 * ( ( ssh_m(ji+1,jj )-ssh_m(ji,jj ))/e1u(ji,jj ) &391 + ( ssh_m(ji+1,jj+1)-ssh_m(ji,jj+1))/e1u(ji,jj+1) ) &462 ztmp(ji,jj)=0.5 * ( (zpice(ji+1,jj )-zpice(ji,jj ))/e1u(ji,jj ) & 463 + (zpice(ji+1,jj+1)-zpice(ji,jj+1))/e1u(ji,jj+1) ) & 392 464 * fmask(ji,jj,1) 393 465 ENDDO … … 398 470 DO jj=1,jpjm1 399 471 DO ji=1,jpim1 400 ztmp(ji,jj)=0.5 * ( ( ssh_m(ji ,jj+1)-ssh_m(ji ,jj))/e2v(ji ,jj) &401 + ( ssh_m(ji+1,jj+1)-ssh_m(ji+1,jj))/e2v(ji+1,jj) ) &472 ztmp(ji,jj)=0.5 * ( (zpice(ji ,jj+1)-zpice(ji ,jj))/e2v(ji ,jj) & 473 + (zpice(ji+1,jj+1)-zpice(ji+1,jj))/e2v(ji+1,jj) ) & 402 474 * fmask(ji,jj,1) 403 475 ENDDO … … 421 493 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 422 494 423 INTEGER :: ji, jj, j pl ! dummy loop indices424 REAL(wp), DIMENSION(:,:), POINTER :: ztmp 495 INTEGER :: ji, jj, jl ! dummy loop indices 496 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 425 497 !!--------------------------------------------------------------------- 426 498 427 499 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_out') 428 500 ! 429 CALL wrk_alloc( jpi,jpj, ztmp )501 CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 430 502 431 503 IF( kt == nit000 ) THEN … … 434 506 435 507 ! x comp of ocean-ice stress 436 CALL cice2nemo(strocnx,ztmp ,'F', -1. )508 CALL cice2nemo(strocnx,ztmp1,'F', -1. ) 437 509 ss_iou(:,:)=0.0 438 510 ! F point to U point 439 511 DO jj=2,jpjm1 440 512 DO ji=2,jpim1 441 ss_iou(ji,jj) = 0.5 * ( ztmp (ji,jj-1) + ztmp(ji,jj) ) * umask(ji,jj,1)513 ss_iou(ji,jj) = 0.5 * ( ztmp1(ji,jj-1) + ztmp1(ji,jj) ) * umask(ji,jj,1) 442 514 ENDDO 443 515 ENDDO … … 445 517 446 518 ! y comp of ocean-ice stress 447 CALL cice2nemo(strocny,ztmp ,'F', -1. )519 CALL cice2nemo(strocny,ztmp1,'F', -1. ) 448 520 ss_iov(:,:)=0.0 449 521 ! F point to V point … … 451 523 DO jj=1,jpjm1 452 524 DO ji=2,jpim1 453 ss_iov(ji,jj) = 0.5 * ( ztmp (ji-1,jj) + ztmp(ji,jj) ) * vmask(ji,jj,1)525 ss_iov(ji,jj) = 0.5 * ( ztmp1(ji-1,jj) + ztmp1(ji,jj) ) * vmask(ji,jj,1) 454 526 ENDDO 455 527 ENDDO … … 474 546 emp(:,:) = (1.0-fr_i(:,:))*emp(:,:) 475 547 ELSE IF (nsbc ==5) THEN 476 ! emp_tot is set in sbc_cpl_ice_flx (call from cice_sbc_in above) 548 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 549 ! This is currently as required with the coupling fields from the UM atmosphere 477 550 emp(:,:) = emp_tot(:,:)+tprecip(:,:)*fr_i(:,:) 478 551 ENDIF 479 552 480 !! ACC this block needs attention. sfx has replaced emps but its meaning is now 481 !! different. Need the equivalent of this block: 482 ! SELECT CASE( nn_ice_embd ) ! levitating or embedded sea-ice option 483 ! CASE( 0 ) ; zswitch = 1 ! (0) standard levitating sea-ice : salt exchange only 484 ! CASE( 1, 2 ) ; zswitch = 0 ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 485 ! ! (2) embedded sea-ice : salt and volume fluxes and pressure 486 ! END SELECT 487 ! 488 ! sfx (ji,jj) = zfsalt + zswitch * zcd ! salt flux (+ C/D if no ice/ocean mass exchange) 489 ! emp (ji,jj) = zemp + zemp_snw + ( 1.- zswitch) * zfmm ! mass flux (- F/M mass flux if no ice/ocean mass exchange) 490 ! 491 ! Here zfsalt is salt flux between ice and ocean due to freezing and melting (PSU/m2/s) 492 ! zcd is the virtual salt flux that appears in the standard levitating case only (0 otherwise) 493 ! it generates a change in SSS equivalent to that which would occur if a true mass exchange happened 494 ! zemp is: 495 ! in coupled mode: net mass flux over the grid cell (ice+ocean area) minus the mass flux intercepted by sea-ice 496 ! in forced mode: mass flux budget (emp) over open ocean fraction minus liquid precip. over the ice 497 ! (assumed to instantaneous drain into the ocean). 498 ! zemp_snw is the snow melt that enters the ocean as pure water (no associated salt flux) 499 ! zfmm is freezing minus melting 500 ! 501 ! with zswitch = 1 ( nn_ice_embd = 0 ) the results should be equivalent to the original CICE code. 502 503 !! 504 ! Subtract fluxes from CICE to get freshwater equivalent flux used in 505 ! salinity calculation 506 CALL cice2nemo(fresh_gbm,ztmp,'T', 1. ) 507 sfx (:,:)=emp(:,:)-ztmp(:,:) 508 ! Note the 1000.0 is to convert from kg salt to g salt (needed for PSU) 509 CALL cice2nemo(fsalt_gbm,ztmp,'T', 1. ) 510 DO jj=1,jpj 511 DO ji=1,jpi 512 IF (sss_m(ji,jj).gt.0.0) THEN 513 sfx (ji,jj)=sfx (ji,jj)+ztmp(ji,jj)*1000.0/sss_m(ji,jj) 514 ENDIF 515 ENDDO 516 ENDDO 517 518 ! No longer remove precip over ice from free surface calculation on basis that the 519 ! weight of the precip will affect the free surface even if it falls on the ice 520 ! (same to the argument that freezing / melting of ice doesn't change the free surface) 521 ! Sublimation from the ice is treated in a similar way (included in emp but not sfx ) 522 ! 523 ! This should not be done in the variable volume case 524 525 526 IF (.NOT. lk_vvl) THEN 527 528 emp(:,:) = emp(:,:) - tprecip(:,:)*fr_i(:,:) 529 530 ! Take sublimation into account 531 IF (nsbc == 5 ) THEN 532 emp(:,:) = emp(:,:) + ( emp_ice(:,:) + sprecip(:,:) ) 533 ELSE IF (nsbc == 2 ) THEN 534 emp(:,:) = emp(:,:) - qla_ice(:,:,1) / Lsub 535 ENDIF 536 537 ENDIF 538 !! ACC end of questionable code 539 553 CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 554 CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 555 556 ! Check to avoid unphysical expression when ice is forming (ztmp1 negative) 557 ! Otherwise we are effectively allowing ice of higher salinity than the ocean to form 558 ! which has to be compensated for by the ocean salinity potentially going negative 559 ! This check breaks conservation but seems reasonable until we have prognostic ice salinity 560 ! Note the 1000.0 below is to convert from kg salt to g salt (needed for PSU) 561 WHERE (ztmp1(:,:).lt.0.0) ztmp2(:,:)=MAX(ztmp2(:,:),ztmp1(:,:)*sss_m(:,:)/1000.0) 562 sfx(:,:)=ztmp2(:,:)*1000.0 563 emp(:,:)=emp(:,:)-ztmp1(:,:) 564 540 565 CALL lbc_lnk( emp , 'T', 1. ) 541 CALL lbc_lnk( sfx , 'T', 1. ) 542 543 !! ACC Now the latent heat for snow melting is already accounted for in the bulk formulea and coupled interfaces. 544 !! For the non-solar heat flux, in LIM2, code changes were needed to account for the heat content of the mass exchanged 545 ! between ice and ocean. It was not necessary to make changes for LIM3 since all mass exchanges are referenced to 546 ! zero degrees; this is most likely to be the case in CICE too?? 547 !! 566 CALL lbc_lnk( sfx , 'T', 1. ) 567 548 568 ! Solar penetrative radiation and non solar surface heat flux 549 569 … … 564 584 ! Now add in ice / snow related terms 565 585 ! [fswthru will be zero unless running with calc_Tsfc=T in CICE] 566 CALL cice2nemo(fswthru_gbm,ztmp ,'T', 1. )567 qsr(:,:)=qsr(:,:)+ztmp (:,:)586 CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 587 qsr(:,:)=qsr(:,:)+ztmp1(:,:) 568 588 CALL lbc_lnk( qsr , 'T', 1. ) 569 589 … … 574 594 ENDDO 575 595 576 CALL cice2nemo(fhocn_gbm,ztmp ,'T', 1. )577 qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp (:,:)596 CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 597 qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 578 598 579 599 CALL lbc_lnk( qns , 'T', 1. ) … … 583 603 CALL cice2nemo(aice,fr_i,'T', 1. ) 584 604 IF ( (nsbc == 2).OR.(nsbc == 5) ) THEN 585 DO j pl=1,ncat586 CALL cice2nemo(aicen(:,:,j pl,:),a_i(:,:,jpl), 'T', 1. )605 DO jl=1,ncat 606 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 587 607 ENDDO 588 608 ENDIF … … 600 620 CALL lbc_lnk ( fr_iv , 'V', 1. ) 601 621 622 ! ! embedded sea ice 623 IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 624 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 625 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 626 snwice_mass (:,:) = ( rhosn * ztmp1(:,:) + rhoic * ztmp2(:,:) ) 627 snwice_mass_b(:,:) = snwice_mass(:,:) 628 snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / dt 629 ENDIF 630 602 631 ! Release work space 603 632 604 CALL wrk_dealloc( jpi,jpj, ztmp )633 CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 605 634 ! 606 635 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_out') … … 619 648 !!--------------------------------------------------------------------- 620 649 621 INTEGER :: j pl ! dummy loop index650 INTEGER :: jl ! dummy loop index 622 651 INTEGER :: ierror 623 652 … … 642 671 ! Snow and ice thicknesses (CO_2 and CO_3) 643 672 644 DO j pl = 1,ncat645 CALL cice2nemo(vsnon(:,:,j pl,:),ht_s(:,:,jpl),'T', 1. )646 CALL cice2nemo(vicen(:,:,j pl,:),ht_i(:,:,jpl),'T', 1. )673 DO jl = 1,ncat 674 CALL cice2nemo(vsnon(:,:,jl,:),ht_s(:,:,jl),'T', 1. ) 675 CALL cice2nemo(vicen(:,:,jl,:),ht_i(:,:,jl),'T', 1. ) 647 676 ENDDO 648 677 ! … … 812 841 REAL(wp), DIMENSION(jpi,jpj) :: pn 813 842 #if !defined key_nemocice_decomp 843 REAL(wp), DIMENSION(jpiglo,jpjglo) :: png2 814 844 REAL (kind=dbl_kind), dimension(nx_global,ny_global) :: pcg 815 845 #endif … … 830 860 ! Copy local domain data from NEMO to CICE field 831 861 pc(:,:,1)=0.0 832 DO jj=2,ny_block 833 DO ji=2,nx_block 834 pc(ji,jj,1)=pn(ji ,jj-1)862 DO jj=2,ny_block-1 863 DO ji=2,nx_block-1 864 pc(ji,jj,1)=pn(ji-1+ji_off,jj-1+jj_off) 835 865 ENDDO 836 866 ENDDO … … 856 886 ! pcg(:,:)=0.0 857 887 DO jn=1,jpnij 858 DO jj= 1,nlcjt(jn)-1859 DO ji= 2,nlcit(jn)-1860 p cg(ji+nimppt(jn)-2,jj+njmppt(jn)-1)=png(ji,jj,jn)888 DO jj=nldjt(jn),nlejt(jn) 889 DO ji=nldit(jn),nleit(jn) 890 png2(ji+nimppt(jn)-1,jj+njmppt(jn)-1)=png(ji,jj,jn) 861 891 ENDDO 892 ENDDO 893 ENDDO 894 DO jj=1,ny_global 895 DO ji=1,nx_global 896 pcg(ji,jj)=png2(ji+ji_off,jj+jj_off) 862 897 ENDDO 863 898 ENDDO … … 954 989 DO jj=1,jpjm1 955 990 DO ji=1,jpim1 956 pn(ji,jj)=pc(ji ,jj+1,1)991 pn(ji,jj)=pc(ji+1-ji_off,jj+1-jj_off,1) 957 992 ENDDO 958 993 ENDDO … … 968 1003 ! Need to make sure this is robust to changes in NEMO halo rows.... 969 1004 ! (may be OK but not spent much time thinking about it) 1005 ! Note that non-existent pcg elements may be used below, but 1006 ! the lbclnk call on pn will replace these with sensible values 970 1007 971 1008 IF (nproc==0) THEN 972 1009 png(:,:,:)=0.0 973 1010 DO jn=1,jpnij 974 DO jj= 1,nlcjt(jn)-1975 DO ji= 2,nlcit(jn)-1976 png(ji,jj,jn)=pcg(ji+nimppt(jn)- 2,jj+njmppt(jn)-1)1011 DO jj=nldjt(jn),nlejt(jn) 1012 DO ji=nldit(jn),nleit(jn) 1013 png(ji,jj,jn)=pcg(ji+nimppt(jn)-1-ji_off,jj+njmppt(jn)-1-jj_off) 977 1014 ENDDO 978 1015 ENDDO -
branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r3488 r3508 163 163 IF( nn_ice == 4 .AND. ( .NOT. ( cp_cfg == 'orca' ) .OR. lk_agrif ) ) & 164 164 & CALL ctl_stop( 'CICE sea-ice model currently only available in a global ORCA configuration without AGRIF' ) 165 IF( nn_ice == 3.AND. nn_ice_embd == 0 ) &166 & CALL ctl_stop( 'LIM3 sea-ice model requiresnn_ice_embd = 2 or 3' )165 IF( ( nn_ice == 3 .OR. nn_ice == 4 ) .AND. nn_ice_embd == 0 ) & 166 & CALL ctl_stop( 'LIM3 and CICE sea-ice models require nn_ice_embd = 2 or 3' ) 167 167 168 168 IF( ln_dm2dc ) nday_qsr = -1 ! initialisation flag
Note: See TracChangeset
for help on using the changeset viewer.