- Timestamp:
- 2014-11-27T16:41:22+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r4897 r4901 95 95 END FUNCTION sbc_ice_cice_alloc 96 96 97 SUBROUTINE sbc_ice_cice( kt, nsbc )97 SUBROUTINE sbc_ice_cice( kt, ksbc ) 98 98 !!--------------------------------------------------------------------- 99 99 !! *** ROUTINE sbc_ice_cice *** … … 113 113 !!--------------------------------------------------------------------- 114 114 INTEGER, INTENT(in) :: kt ! ocean time step 115 INTEGER, INTENT(in) :: nsbc ! surface forcing type115 INTEGER, INTENT(in) :: ksbc ! surface forcing type 116 116 !!---------------------------------------------------------------------- 117 117 ! … … 123 123 124 124 ! Make sure any fluxes required for CICE are set 125 IF ( nsbc == 2 )THEN125 IF ( ksbc == jp_flx ) THEN 126 126 CALL cice_sbc_force(kt) 127 ELSE IF ( nsbc == 5) THEN127 ELSE IF ( ksbc == jp_cpl ) THEN 128 128 CALL sbc_cpl_ice_flx( 1.0-fr_i ) 129 129 ENDIF 130 130 131 CALL cice_sbc_in ( kt, nsbc )131 CALL cice_sbc_in ( kt, ksbc ) 132 132 CALL CICE_Run 133 CALL cice_sbc_out ( kt, nsbc )134 135 IF ( nsbc == 5) CALL cice_sbc_hadgam(kt+1)133 CALL cice_sbc_out ( kt, ksbc ) 134 135 IF ( ksbc == jp_cpl ) CALL cice_sbc_hadgam(kt+1) 136 136 137 137 ENDIF ! End sea-ice time step only … … 141 141 END SUBROUTINE sbc_ice_cice 142 142 143 SUBROUTINE cice_sbc_init ( nsbc)143 SUBROUTINE cice_sbc_init (ksbc) 144 144 !!--------------------------------------------------------------------- 145 145 !! *** ROUTINE cice_sbc_init *** 146 146 !! ** Purpose: Initialise ice related fields for NEMO and coupling 147 147 !! 148 INTEGER, INTENT( in ) :: nsbc ! surface forcing type148 INTEGER, INTENT( in ) :: ksbc ! surface forcing type 149 149 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 150 150 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar … … 165 165 166 166 ! Do some CICE consistency checks 167 IF ( ( nsbc == 2) .OR. (nsbc == 5) ) THEN167 IF ( (ksbc == jp_flx) .OR. (ksbc == jp_cpl) ) THEN 168 168 IF ( calc_strair .OR. calc_Tsfc ) THEN 169 169 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=F and calc_Tsfc=F in ice_in' ) 170 170 ENDIF 171 ELSEIF ( nsbc == 4) THEN171 ELSEIF (ksbc == jp_core) THEN 172 172 IF ( .NOT. (calc_strair .AND. calc_Tsfc) ) THEN 173 173 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=T and calc_Tsfc=T in ice_in' ) … … 190 190 191 191 CALL cice2nemo(aice,fr_i, 'T', 1. ) 192 IF ( ( nsbc == 2).OR.(nsbc == 5) ) THEN192 IF ( (ksbc == jp_flx) .OR. (ksbc == jp_cpl) ) THEN 193 193 DO jl=1,ncat 194 194 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) … … 232 232 233 233 234 SUBROUTINE cice_sbc_in (kt, nsbc)234 SUBROUTINE cice_sbc_in (kt, ksbc) 235 235 !!--------------------------------------------------------------------- 236 236 !! *** ROUTINE cice_sbc_in *** … … 238 238 !!--------------------------------------------------------------------- 239 239 INTEGER, INTENT(in ) :: kt ! ocean time step 240 INTEGER, INTENT(in ) :: nsbc ! surface forcing type240 INTEGER, INTENT(in ) :: ksbc ! surface forcing type 241 241 242 242 INTEGER :: ji, jj, jl ! dummy loop indices … … 262 262 ! forced and coupled case 263 263 264 IF ( ( nsbc == 2).OR.(nsbc == 5) ) THEN264 IF ( (ksbc == jp_flx).OR.(ksbc == jp_cpl) ) THEN 265 265 266 266 ztmpn(:,:,:)=0.0 … … 287 287 288 288 ! Surface downward latent heat flux (CI_5) 289 IF ( nsbc == 2) THEN289 IF (ksbc == jp_flx) THEN 290 290 DO jl=1,ncat 291 291 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) … … 316 316 ! GBM conductive flux through ice (CI_6) 317 317 ! Convert to GBM 318 IF ( nsbc == 2) THEN318 IF (ksbc == jp_flx) THEN 319 319 ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 320 320 ELSE … … 325 325 ! GBM surface heat flux (CI_7) 326 326 ! Convert to GBM 327 IF ( nsbc == 2) THEN327 IF (ksbc == jp_flx) THEN 328 328 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 329 329 ELSE … … 333 333 ENDDO 334 334 335 ELSE IF ( nsbc == 4) THEN335 ELSE IF (ksbc == jp_core) THEN 336 336 337 337 ! Pass CORE forcing fields to CICE (which will calculate heat fluxes etc itself) … … 458 458 459 459 460 SUBROUTINE cice_sbc_out (kt, nsbc)460 SUBROUTINE cice_sbc_out (kt,ksbc) 461 461 !!--------------------------------------------------------------------- 462 462 !! *** ROUTINE cice_sbc_out *** … … 464 464 !!--------------------------------------------------------------------- 465 465 INTEGER, INTENT( in ) :: kt ! ocean time step 466 INTEGER, INTENT( in ) :: nsbc ! surface forcing type466 INTEGER, INTENT( in ) :: ksbc ! surface forcing type 467 467 468 468 INTEGER :: ji, jj, jl ! dummy loop indices … … 510 510 ! Freshwater fluxes 511 511 512 IF ( nsbc == 2) THEN512 IF (ksbc == jp_flx) THEN 513 513 ! Note that emp from the forcing files is evap*(1-aice)-(tprecip-aice*sprecip) 514 514 ! What we want here is evap*(1-aice)-tprecip*(1-aice) hence manipulation below … … 516 516 ! Better to use evap and tprecip? (but for now don't read in evap in this case) 517 517 emp(:,:) = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 518 ELSE IF ( nsbc == 4) THEN518 ELSE IF (ksbc == jp_core) THEN 519 519 emp(:,:) = (1.0-fr_i(:,:))*emp(:,:) 520 ELSE IF ( nsbc ==5) THEN520 ELSE IF (ksbc == jp_cpl) THEN 521 521 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 522 522 ! This is currently as required with the coupling fields from the UM atmosphere … … 543 543 ! Scale qsr and qns according to ice fraction (bulk formulae only) 544 544 545 IF ( nsbc == 4) THEN545 IF (ksbc == jp_core) THEN 546 546 qsr(:,:)=qsr(:,:)*(1.0-fr_i(:,:)) 547 547 qns(:,:)=qns(:,:)*(1.0-fr_i(:,:)) 548 548 ENDIF 549 549 ! Take into account snow melting except for fully coupled when already in qns_tot 550 IF ( nsbc == 5) THEN550 IF (ksbc == jp_cpl) THEN 551 551 qsr(:,:)= qsr_tot(:,:) 552 552 qns(:,:)= qns_tot(:,:) … … 575 575 576 576 CALL cice2nemo(aice,fr_i,'T', 1. ) 577 IF ( ( nsbc == 2).OR.(nsbc == 5) ) THEN577 IF ( (ksbc == jp_flx).OR.(ksbc == jp_cpl) ) THEN 578 578 DO jl=1,ncat 579 579 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) … … 611 611 612 612 613 #if defined key_oasis3 || defined key_oasis4614 613 SUBROUTINE cice_sbc_hadgam( kt ) 615 614 !!--------------------------------------------------------------------- … … 653 652 END SUBROUTINE cice_sbc_hadgam 654 653 655 #else656 SUBROUTINE cice_sbc_hadgam( kt ) ! Dummy routine657 INTEGER, INTENT( in ) :: kt ! ocean time step658 WRITE(*,*) 'cice_sbc_hadgam: You should not have seen this print! error?'659 END SUBROUTINE cice_sbc_hadgam660 #endif661 654 662 655 SUBROUTINE cice_sbc_final … … 1001 994 CONTAINS 1002 995 1003 SUBROUTINE sbc_ice_cice ( kt, nsbc ) ! Dummy routine996 SUBROUTINE sbc_ice_cice ( kt, ksbc ) ! Dummy routine 1004 997 WRITE(*,*) 'sbc_ice_cice: You should not have seen this print! error?', kt 1005 998 END SUBROUTINE sbc_ice_cice 1006 999 1007 SUBROUTINE cice_sbc_init ( nsbc) ! Dummy routine1000 SUBROUTINE cice_sbc_init (ksbc) ! Dummy routine 1008 1001 WRITE(*,*) 'cice_sbc_init: You should not have seen this print! error?' 1009 1002 END SUBROUTINE cice_sbc_init
Note: See TracChangeset
for help on using the changeset viewer.