Changeset 3356
- Timestamp:
- 2012-04-13T15:48:38+02:00 (12 years ago)
- Location:
- branches/2012/dev_3352_UKMO8_CICE/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_3352_UKMO8_CICE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r3355 r3356 16 16 USE domvvl 17 17 USE phycst, only : rcp, rau0 18 USE eosbn2, only : tfreez 18 19 USE in_out_manager ! I/O manager 19 20 USE lib_mpp ! distributed memory computing library … … 43 44 flatn_f,fsurfn_f,fcondtopn_f, & 44 45 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl, & 45 swvdr,swvdf,swidr,swidf 46 swvdr,swvdf,swidr,swidf,Tf 46 47 USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf 47 48 USE ice_atmo, only: calc_strair … … 146 147 !!--------------------------------------------------------------------- 147 148 148 INTEGER :: ji, jj, jl ! dummy loop indices 149 INTEGER :: ji, jj, jk, jl ! dummy loop indices 150 REAL(wp), DIMENSION(:,:,:), POINTER :: ztmp 149 151 150 152 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_init') 151 153 ! 154 CALL wrk_alloc( jpi,jpj,jpk, ztmp ) 152 155 IF(lwp) WRITE(numout,*)'cice_sbc_init' 153 156 … … 171 174 IF( sbc_ice_cice_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_ice_cice_alloc : unable to allocate cice arrays' ) 172 175 176 ! Set freezing temperatures and ensure consistency between NEMO and CICE 177 ! (-1.8 for fully coupled, salinity dependence otherwise) 178 ! Setting of Tf here or in cice_sbc_in will over-write anything already done in cice_init 173 179 ! Ensure ocean temperatures are nowhere below freezing if not a NEMO restart 180 181 IF (nsbc == 5) THEN 182 ztmp(:,:,:)=-1.8 183 CALL nemo2cice(ztmp(:,:,1),Tf,'T', 1. ) ! Set in CICE here as won't be updated in cice_sbc_in 184 ELSE 185 DO jk=1,jpk 186 ztmp(:,:,jk)= tfreez(tsn(:,:,jk,jp_sal),fsdepw(:,:,jk)) 187 ENDDO 188 ENDIF 189 174 190 IF( .NOT. ln_rstart ) THEN 175 tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem), Tocnfrz)191 tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem),ztmp) 176 192 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 177 193 ENDIF … … 198 214 CALL lbc_lnk ( fr_iu , 'U', 1. ) 199 215 CALL lbc_lnk ( fr_iv , 'V', 1. ) 216 ! 217 CALL wrk_dealloc( jpi,jpj,jpk, ztmp ) 200 218 ! 201 219 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_init') … … 354 372 CALL nemo2cice(ztmp,frain,'T', 1. ) 355 373 374 ! Recalculate freezing temperature and send to CICE except for fully coupled when 375 ! it remains as -1.8 throughout the run 376 IF ( nsbc==5 ) THEN 377 ztmp(:,:)=-1.8 378 ELSE 379 ztmp(:,:)=tfreez(sss_m(:,:)) 380 CALL nemo2cice(ztmp,Tf,'T', 1. ) 381 ENDIF 382 356 383 ! Freezing/melting potential 357 384 ! Calculated over NEMO leapfrog timestep (hence 2*dt) 358 nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:,1)*(Tocnfrz-sst_m(:,:))/(2.0*dt) 359 360 ztmp(:,:) = nfrzmlt(:,:) 361 CALL nemo2cice(ztmp,frzmlt,'T', 1. ) 385 nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:,1)*(ztmp(:,:)-sst_m(:,:))/(2.0*dt) 386 CALL nemo2cice(nfrzmlt,frzmlt,'T', 1. ) 362 387 363 388 ! SST and SSS -
branches/2012/dev_3352_UKMO8_CICE/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
r3294 r3356 678 678 679 679 680 FUNCTION tfreez( psal ) RESULT( ptf )680 FUNCTION tfreez( psal, ppress ) RESULT( ptf ) 681 681 !!---------------------------------------------------------------------- 682 682 !! *** ROUTINE eos_init *** … … 691 691 !!---------------------------------------------------------------------- 692 692 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: psal ! salinity [psu] 693 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ), OPTIONAL :: ppress ! pressure [dBar] 693 694 ! Leave result array automatic rather than making explicitly allocated 694 695 REAL(wp), DIMENSION(jpi,jpj) :: ptf ! freezing temperature [Celcius] 696 REAL(wp), DIMENSION(jpi,jpj) :: zpress ! pressure [dBar] 695 697 !!---------------------------------------------------------------------- 696 698 ! 697 699 ptf(:,:) = ( - 0.0575_wp + 1.710523e-3_wp * SQRT( psal(:,:) ) & 698 700 & - 2.154996e-4_wp * psal(:,:) ) * psal(:,:) 701 702 IF( PRESENT(ppress) ) THEN 703 ptf(:,:) = ptf(:,:) - 7.53e-4_wp * ppress(:,:) 704 ENDIF 705 699 706 ! 700 707 END FUNCTION tfreez
Note: See TracChangeset
for help on using the changeset viewer.