New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5033 for branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90 – NEMO

Ignore:
Timestamp:
2015-01-15T14:28:25+01:00 (9 years ago)
Author:
timgraham
Message:

Changes to use salinity dependent freezing temperature with CICE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r5030 r5033  
    1515   USE dom_oce         ! ocean space and time domain 
    1616   USE domvvl 
     17   USE eosbn2, only : eos_fzp ! Function to calculate freezing point of seawater 
    1718   USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic 
    1819   USE in_out_manager  ! I/O manager 
     
    161162      INTEGER, INTENT( in  ) ::   ksbc                ! surface forcing type 
    162163      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 
     164      REAL(wp), DIMENSION(:,:,:), POINTER :: ztfrz3d 
    163165      REAL(wp) ::   zcoefu, zcoefv, zcoeff            ! local scalar 
    164166      INTEGER  ::   ji, jj, jl, jk                    ! dummy loop indices 
     
    173175      ji_off = INT ( (jpiglo - nx_global) / 2 ) 
    174176      jj_off = INT ( (jpjglo - ny_global) / 2 ) 
     177 
     178      ! Set freezing temperatures and ensure consistencey between NEMO and CICE 
     179      CALL wrk_alloc( jpi,jpj,jpk, ztfrz3d )  
     180      DO jk=1,jpk 
     181         ztfrz3d(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdewq(:,:,jk) ) 
     182      ENDDO 
     183      sstfrz(:,:)=ztfrz(:,:,1) 
     184 
     185      !Ensure that no temperature points are below freezing if not a NEMO restart 
     186      IF( .NOT. ln_rstart ) THEN 
     187         tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem),ztfrz3d) 
     188         tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 
     189      ENDIF 
    175190 
    176191#if defined key_nemocice_decomp 
     
    202217      IF( sbc_ice_cice_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_ice_cice_alloc : unable to allocate cice arrays' ) 
    203218 
    204 ! Ensure ocean temperatures are nowhere below freezing if not a NEMO restart 
    205       IF( .NOT. ln_rstart ) THEN 
    206          tsn(:,:,:,jp_tem) = MAX (tsn(:,:,:,jp_tem),Tocnfrz) 
    207          tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 
    208       ENDIF 
     219 
    209220 
    210221      fr_iu(:,:)=0.0 
     
    283294  
    284295      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 
     296      CALL wrk_dealloc( jpi,jpj,jpk, ztfrz3d )  
    285297      ! 
    286298      IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_init') 
     
    427439      CALL nemo2cice(ztmp,frain,'T', 1. )  
    428440 
     441! Recalculate freezing temperature and send to CICE  
     442      sstfrz(:,:)=tfreez(sss_m(:,:))  
     443      CALL nemo2cice(sstfrz,Tf,'T', 1. ) 
     444 
    429445! Freezing/melting potential 
    430446! Calculated over NEMO leapfrog timestep (hence 2*dt) 
    431       nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:)*(Tocnfrz-sst_m(:,:))/(2.0*dt) 
    432  
    433       ztmp(:,:) = nfrzmlt(:,:) 
    434       CALL nemo2cice(ztmp,frzmlt,'T', 1. ) 
     447      nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:,1)*(sstfrz(:,:)-sst_m(:,:))/(2.0*dt)  
     448      CALL nemo2cice(nfrzmlt,frzmlt,'T', 1. ) 
    435449 
    436450! SST  and SSS 
Note: See TracChangeset for help on using the changeset viewer.