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 – 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

Location:
branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC
Files:
2 edited

Legend:

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

    r5030 r5033  
    8888   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iu              !: ice fraction at NEMO U point 
    8989   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iv              !: ice fraction at NEMO V point 
     90   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sstfrz             !: sea surface freezing temperature 
    9091    
    9192   ! variables used in the coupled interface 
     
    140141 
    141142#if defined key_cice 
    142       ALLOCATE( qla_ice(jpi,jpj,ncat)    , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,1)    , & 
     143      ALLOCATE( qla_ice(jpi,jpj,ncat) , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,1)    , & 
    143144                wndi_ice(jpi,jpj)     , tatm_ice(jpi,jpj)     , qatm_ice(jpi,jpj)     , & 
    144145                wndj_ice(jpi,jpj)     , nfrzmlt(jpi,jpj)      , ss_iou(jpi,jpj)       , & 
    145146                ss_iov(jpi,jpj)       , fr_iu(jpi,jpj)        , fr_iv(jpi,jpj)        , & 
    146147                a_i(jpi,jpj,ncat)     , topmelt(jpi,jpj,ncat) , botmelt(jpi,jpj,ncat) , & 
    147                 STAT= ierr(1) ) 
     148                sstfrz(jpi,jpj)       , STAT= ierr(1) ) 
    148149      IF( lk_cpl )   ALLOCATE( u_ice(jpi,jpj)        , fr1_i0(jpi,jpj)       , tn_ice (jpi,jpj,1)    , & 
    149150         &                     v_ice(jpi,jpj)        , fr2_i0(jpi,jpj)       , alb_ice(jpi,jpj,1)    , & 
  • 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.