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 5619 for branches/NERC/dev_r5589_is_oce_cpl/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2015-07-20T19:43:15+02:00 (9 years ago)
Author:
mathiot
Message:

ocean/ice sheet coupling: initial commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5589_is_oce_cpl/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r5431 r5619  
    2222   USE sbcrnf          ! River runoff   
    2323   USE sbcisf          ! Ice shelf    
     24   USE sbc_iscpl       ! Ice sheet coupling 
    2425   USE traqsr          ! solar radiation penetration 
    2526   USE trd_oce         ! trends: ocean variables 
     
    117118      INTEGER  ::   ji, jj, jk, jn           ! dummy loop indices   
    118119      INTEGER  ::   ikt, ikb  
    119       INTEGER  ::   nk_isf 
    120120      REAL(wp) ::   zfact, z1_e3t, zdep 
    121       REAL(wp) ::   zalpha, zhk 
    122       REAL(wp) ::  zt_frz, zpress 
     121      REAL(wp) ::   zt_frz, zpress 
    123122      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    124123      !!---------------------------------------------------------------------- 
     
    220219      ! 
    221220      IF( nn_isf > 0 ) THEN 
    222          zfact = 0.5e0 
     221         zfact = 0.5_wp 
    223222         DO jj = 2, jpj 
    224223            DO ji = fs_2, fs_jpim1 
     
    233232               ! compute tfreez for the temperature correction (we add water at freezing temperature) 
    234233!                  zpress = grav*rau0*fsdept(ji,jj,jk)*1.e-04 
    235                   zt_frz = -1.9 !eos_fzp( tsn(ji,jj,jk,jp_sal), zpress ) 
     234                  zt_frz = -1.9_wp !eos_fzp( tsn(ji,jj,jk,jp_sal), zpress ) 
    236235               ! compute trend 
    237236                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)                                          & 
     
    246245               ! compute tfreez for the temperature correction (we add water at freezing temperature) 
    247246!               zpress = grav*rau0*fsdept(ji,jj,ikb)*1.e-04 
    248                zt_frz = -1.9 !eos_fzp( tsn(ji,jj,ikb,jp_sal), zpress ) 
     247               zt_frz = -1.9_wp !eos_fzp( tsn(ji,jj,ikb,jp_sal), zpress ) 
    249248               ! compute trend 
    250249               tsa(ji,jj,ikb,jp_tem) = tsa(ji,jj,ikb,jp_tem)                                           & 
     
    288287      ENDIF 
    289288  
    290       IF( l_trdtra )   THEN                      ! send trends for further diagnostics 
     289      !---------------------------------------- 
     290      !        Ice Sheet coupling imbalance correction to have conservation 
     291      !---------------------------------------- 
     292      ! 
     293      IF( ln_iscpl .AND. ln_hfb) THEN         ! input of heat and salt due to river runoff  
     294         DO jk = 1,jpk 
     295            DO jj = 2, jpj  
     296               DO ji = fs_2, fs_jpim1 
     297                  zdep = 1._wp / fse3t_n(ji,jj,jk)  
     298                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - htsc_iscpl(ji,jj,jk,jp_tem)                       & 
     299                      &                                         * zdep 
     300                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - htsc_iscpl(ji,jj,jk,jp_sal)                       & 
     301                      &                                         * zdep   
     302               END DO   
     303            END DO   
     304         END DO 
     305      ENDIF 
     306 
     307      IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
    291308         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    292309         ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.