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 8326 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90 – NEMO

Ignore:
Timestamp:
2017-07-12T17:52:17+02:00 (7 years ago)
Author:
clem
Message:

STEP4 (2): put all thermodynamics in 1D (limthd_dh & limthd_sal OK)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90

    r8325 r8326  
    1818   USE par_oce        ! ocean parameters 
    1919   USE phycst         ! physical constants (OCE directory)  
    20    USE sbc_oce , ONLY : sst_m, sss_m 
    2120   USE ice            ! LIM variables 
    2221   USE thd_ice        ! LIM thermodynamics 
     
    7069      !!  
    7170      INTEGER  ::   ji , jk        ! dummy loop indices 
    72       INTEGER  ::   ii, ij         ! 2D corresponding indices to ji 
    7371      INTEGER  ::   iter 
    7472 
     
    8785      REAL(wp) ::   zdE          ! specific enthalpy difference (J/kg) 
    8886      REAL(wp) ::   zfmdt        ! exchange mass flux x time step (J/m2), >0 towards the ocean 
    89       REAL(wp) ::   zsstK        ! SST (K) 
    9087 
    9188      REAL(wp), POINTER, DIMENSION(:) ::   zqprec      ! energy of fallen snow                       (J.m-3) 
     
    403400      ! remaining "potential" evap is sent to ocean 
    404401      DO ji = kideb, kiut 
    405          ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 
    406          wfx_err_sub(ii,ij) = wfx_err_sub(ii,ij) - zevap_rema(ji) * a_i_1d(ji) * r1_rdtice  ! <=0 (net evap for the ocean in kg.m-2.s-1) 
     402         wfx_err_sub_1d(ji) = wfx_err_sub_1d(ji) - zevap_rema(ji) * a_i_1d(ji) * r1_rdtice  ! <=0 (net evap for the ocean in kg.m-2.s-1) 
    407403      END DO 
    408404 
     
    445441                  &               + zswi2  * 0.26 / ( 0.26 + 0.74 * EXP ( - 724300.0 * zgrr ) )  , 0.5 ) 
    446442 
    447                ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 
    448  
    449                s_i_new(ji)        = zswitch_sal * zfracs * sss_m(ii,ij)  &  ! New ice salinity 
     443               s_i_new(ji)        = zswitch_sal * zfracs * sss_1d(ji)  &  ! New ice salinity 
    450444                                  + ( 1. - zswitch_sal ) * sm_i_1d(ji)  
    451445               ! New ice growth 
     
    611605         wfx_snw_sum_1d(ji)  =  wfx_snw_sum_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 
    612606         !     
    613          ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 
    614607         ! Remaining heat flux (W.m-2) is sent to the ocean heat budget 
    615          hfx_out(ii,ij)  = hfx_out(ii,ij) + ( zq_rema(ji) * a_i_1d(ji) ) * r1_rdtice 
     608         hfx_out_1d(ji)  = hfx_out_1d(ji) + ( zq_rema(ji) * a_i_1d(ji) ) * r1_rdtice 
    616609 
    617610         IF( ln_limctl .AND. zq_rema(ji) < 0. .AND. lwp ) WRITE(numout,*) 'ALERTE zq_rema <0 = ', zq_rema(ji) 
     
    637630 
    638631         ! Contribution to energy flux to the ocean [J/m2], >0 (if sst<0) 
    639          ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 
    640632         zfmdt          = ( rhosn - rhoic ) * dh_snowice(ji)    ! <0 
    641          zsstK          = sst_m(ii,ij) + rt0                                 
    642          zEw            = rcp * ( zsstK - rt0 ) 
     633         zEw            = rcp * sst_1d(ji) 
    643634         zQm            = zfmdt * zEw  
    644635          
     
    647638 
    648639         ! Contribution to salt flux 
    649          sfx_sni_1d(ji) = sfx_sni_1d(ji) + sss_m(ii,ij) * a_i_1d(ji) * zfmdt * r1_rdtice  
     640         sfx_sni_1d(ji) = sfx_sni_1d(ji) + sss_1d(ji) * a_i_1d(ji) * zfmdt * r1_rdtice  
    650641 
    651642         ! virtual salt flux to keep salinity constant 
    652643         IF( nn_icesal == 1 .OR. nn_icesal == 3 )  THEN 
    653             sfx_bri_1d(ji) = sfx_bri_1d(ji) - sss_m(ii,ij) * a_i_1d(ji) * zfmdt                  * r1_rdtice  & ! put back sss_m     into the ocean 
     644            sfx_bri_1d(ji) = sfx_bri_1d(ji) - sss_1d (ji) * a_i_1d(ji) * zfmdt                  * r1_rdtice  & ! put back sss_m     into the ocean 
    654645               &                            - sm_i_1d(ji)  * a_i_1d(ji) * dh_snowice(ji) * rhoic * r1_rdtice    ! and get  rn_icesal from the ocean  
    655646         ENDIF 
Note: See TracChangeset for help on using the changeset viewer.