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

Location:
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3
Files:
4 edited

Legend:

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

    r8325 r8326  
    2323   USE dom_oce        ! ocean space and time domain variables 
    2424   USE ice            ! sea-ice variables 
    25    USE sbc_oce , ONLY : sst_m, e3t_m, utau, vtau, ssu_m, ssv_m, frq_m, qns_tot, qsr_tot, sprecip, ln_cpl 
     25   USE sbc_oce , ONLY : sss_m, sst_m, e3t_m, utau, vtau, ssu_m, ssv_m, frq_m, qns_tot, qsr_tot, sprecip, ln_cpl 
    2626   USE sbc_ice , ONLY : qsr_oce, qns_oce, qemp_oce, qsr_ice, qns_ice, dqns_ice, evap_ice, qprec_ice, qevap_ice, & 
    2727      &                 fr1_i0, fr2_i0, nn_limflx 
     
    5555#  include "vectopt_loop_substitute.h90" 
    5656   !!---------------------------------------------------------------------- 
    57    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 
     57   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2010) 
    5858   !! $Id$ 
    5959   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    458458         CALL tab_2d_1d( nbpb, wfx_snw_sub_1d(1:nbpb), wfx_snw_sub  , jpi, jpj, npb(1:nbpb) ) 
    459459         CALL tab_2d_1d( nbpb, wfx_ice_sub_1d(1:nbpb), wfx_ice_sub  , jpi, jpj, npb(1:nbpb) ) 
     460         CALL tab_2d_1d( nbpb, wfx_err_sub_1d(1:nbpb), wfx_err_sub  , jpi, jpj, npb(1:nbpb) ) 
    460461         ! 
    461462         CALL tab_2d_1d( nbpb, wfx_bog_1d (1:nbpb), wfx_bog         , jpi, jpj, npb(1:nbpb) ) 
     
    487488         CALL tab_2d_1d( nbpb, hfx_err_dif_1d (1:nbpb), hfx_err_dif , jpi, jpj, npb(1:nbpb) ) 
    488489         CALL tab_2d_1d( nbpb, hfx_err_rem_1d (1:nbpb), hfx_err_rem , jpi, jpj, npb(1:nbpb) ) 
     490         CALL tab_2d_1d( nbpb, hfx_out_1d (1:nbpb), hfx_out         , jpi, jpj, npb(1:nbpb) ) 
    489491         ! 
    490492         ! SIMIP diagnostics 
    491493         CALL tab_2d_1d( nbpb, diag_fc_bo_1d   (1:nbpb), diag_fc_bo  , jpi, jpj, npb(1:nbpb) ) 
    492494         CALL tab_2d_1d( nbpb, diag_fc_su_1d   (1:nbpb), diag_fc_su  , jpi, jpj, npb(1:nbpb) ) 
     495         ! ocean surface fields 
     496         CALL tab_2d_1d( nbpb, sst_1d(1:nbpb), sst_m, jpi, jpj, npb(1:nbpb) ) 
     497         CALL tab_2d_1d( nbpb, sss_1d(1:nbpb), sss_m, jpi, jpj, npb(1:nbpb) ) 
    493498         ! 
    494499      CASE( 2 )            ! from 1D to 2D 
     
    516521         CALL tab_1d_2d( nbpb, wfx_snw_sub   , npb, wfx_snw_sub_1d(1:nbpb), jpi, jpj ) 
    517522         CALL tab_1d_2d( nbpb, wfx_ice_sub   , npb, wfx_ice_sub_1d(1:nbpb), jpi, jpj ) 
     523         CALL tab_1d_2d( nbpb, wfx_err_sub   , npb, wfx_err_sub_1d(1:nbpb), jpi, jpj ) 
    518524         ! 
    519525         CALL tab_1d_2d( nbpb, wfx_bog       , npb, wfx_bog_1d(1:nbpb)   , jpi, jpj ) 
     
    545551         CALL tab_1d_2d( nbpb, hfx_err_rem   , npb, hfx_err_rem_1d(1:nbpb), jpi, jpj ) 
    546552         CALL tab_1d_2d( nbpb, hfx_err_dif   , npb, hfx_err_dif_1d(1:nbpb), jpi, jpj ) 
     553         CALL tab_1d_2d( nbpb, hfx_out       , npb, hfx_out_1d(1:nbpb)   , jpi, jpj ) 
    547554         ! 
    548555         CALL tab_1d_2d( nbpb, qns_ice(:,:,jl), npb, qns_ice_1d(1:nbpb) , jpi, jpj) 
  • 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 
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90

    r8321 r8326  
    1616   USE par_oce        ! ocean parameters 
    1717   USE phycst         ! physical constants (ocean directory) 
    18    USE sbc_oce , ONLY : sss_m 
    1918   USE ice            ! LIM variables 
    2019   USE thd_ice        ! LIM thermodynamics 
     
    5150      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index 
    5251      ! 
    53       INTEGER  ::   ii, ij, ji, jk               ! dummy loop indices  
     52      INTEGER  ::   ji, jk                       ! dummy loop indices  
    5453      REAL(wp) ::   iflush, igravdr              ! local scalars 
    5554      REAL(wp) ::   zs_sni, zsm_i_gd, zsm_i_fl, zsm_i_si, zsm_i_bg   ! local scalars 
     
    6867         DO ji = kideb, kiut 
    6968 
    70             ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 
    7169            !--------------------------------------------------------- 
    7270            !  Update ice salinity from snow-ice and bottom growth 
    7371            !--------------------------------------------------------- 
    74             zs_sni   = sss_m(ii,ij) * ( rhoic - rhosn ) * r1_rhoic   ! Salinity of snow ice 
     72            zs_sni   = sss_1d(ji) * ( rhoic - rhosn ) * r1_rhoic   ! Salinity of snow ice 
    7573            rswitch  = MAX( 0._wp , SIGN( 1._wp , ht_i_1d(ji) - epsi20 ) ) 
    7674            zsm_i_si = ( zs_sni      - sm_i_1d(ji) ) *             dh_snowice(ji)  / MAX( ht_i_1d(ji), epsi20 ) * rswitch ! snow-ice     
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/thd_ice.F90

    r8325 r8326  
    4848   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   hfx_err_rem_1d 
    4949   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   hfx_err_dif_1d 
     50   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   hfx_out_1d 
    5051 
    5152   ! heat flux associated with ice-atmosphere mass exchange 
     
    6263   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   wfx_snw_sub_1d  
    6364   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   wfx_ice_sub_1d  
     65   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   wfx_err_sub_1d  
    6466 
    6567   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   wfx_bog_1d     
     
    121123   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   diag_fc_su_1d      !: <==> the 2D  diag_fc_su 
    122124 
     125   ! surface fields from the ocean 
     126   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   sst_1d 
     127   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   sss_1d 
     128 
    123129   INTEGER , PUBLIC ::   jiindex_1d   ! 1D index of debugging point 
    124130 
     
    135141      !!---------------------------------------------------------------------! 
    136142      INTEGER ::   thd_ice_alloc   ! return value 
    137       INTEGER ::   ierr(5), ii 
     143      INTEGER ::   ierr(6), ii 
    138144      !!---------------------------------------------------------------------! 
    139145      ierr(:) = 0 
     
    149155         &      hfx_thd_1d(jpij) , hfx_spr_1d(jpij) ,                      & 
    150156         &      hfx_snw_1d(jpij) , hfx_sub_1d(jpij) , hfx_err_1d(jpij) ,   & 
    151          &      hfx_res_1d(jpij) , hfx_err_rem_1d(jpij) , hfx_err_dif_1d(jpij) , STAT=ierr(ii) ) 
     157         &      hfx_res_1d(jpij) , hfx_err_rem_1d(jpij) , hfx_err_dif_1d(jpij) , hfx_out_1d(jpij), STAT=ierr(ii) ) 
    152158      ! 
    153159      ii = ii + 1 
     
    156162         &      fhld_1d    (jpij) , wfx_sub_1d (jpij) , wfx_bog_1d (jpij) , wfx_bom_1d(jpij) ,  & 
    157163         &      wfx_sum_1d(jpij)  , wfx_sni_1d (jpij) , wfx_opw_1d (jpij) , wfx_res_1d(jpij) ,  & 
    158          &      wfx_snw_sub_1d(jpij), wfx_ice_sub_1d(jpij) ,                                    & 
     164         &      wfx_snw_sub_1d(jpij), wfx_ice_sub_1d(jpij), wfx_err_sub_1d(jpij) ,              & 
    159165         &      dqns_ice_1d(jpij) , evap_ice_1d (jpij),                                         & 
    160166         &      qprec_ice_1d(jpij), qevap_ice_1d(jpij), i0         (jpij) ,                     &   
     
    177183      ii = ii + 1 
    178184      ALLOCATE( diag_fc_bo_1d(jpij)      , diag_fc_su_1d(jpij)      , STAT=ierr(ii) ) 
     185      ! 
     186      ii = ii + 1 
     187      ALLOCATE( sst_1d(jpij) , sss_1d(jpij) , STAT=ierr(ii) ) 
    179188 
    180189      thd_ice_alloc = MAXVAL( ierr(:) ) 
Note: See TracChangeset for help on using the changeset viewer.