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 2000 for branches/DEV_r1784_mid_year_merge_2010 – NEMO

Ignore:
Timestamp:
2010-07-09T13:27:11+02:00 (14 years ago)
Author:
acc
Message:

ticket #684 step 7: Add in changes between the head of the DEV_r1821_Rivers branch and the trunk@1821. Note untested changes were made to the Rivers branch before this merge see wiki ticket page for details

Location:
branches/DEV_r1784_mid_year_merge_2010
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1784_mid_year_merge_2010/CONFIG/GYRE/EXP00/namelist

    r1976 r2000  
    214214   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    215215   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     216   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     217   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     218   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    216219  
    217220   cn_dir       = './'      !  root directory for the location of the runoff files 
    218221   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    219222   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     223   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    220224   rn_hrnf      =   0.e0    !  depth over which enhanced vertical mixing is used 
    221225   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/CONFIG/GYRE_LOBSTER/EXP00/namelist

    r1976 r2000  
    214214   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    215215   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     216   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     217   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     218   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    216219  
    217220   cn_dir       = './'      !  root directory for the location of the runoff files 
    218221   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    219222   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     223   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    220224   rn_hrnf      =   0.e0    !  depth over which enhanced vertical mixing is used 
    221225   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/CONFIG/ORCA2_LIM/EXP00/namelist

    r1976 r2000  
    241241   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    242242   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     243   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     245   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
     246 
    243247  
    244248   cn_dir       = './'      !  root directory for the location of the runoff files 
    245249   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    246250   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     251   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input   
    247252   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
    248253   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist

    r1976 r2000  
    241241   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    242242   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     243   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     245   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    243246  
    244247   cn_dir       = './'      !  root directory for the location of the runoff files 
    245248   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    246249   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     250   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    247251   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
    248252   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/CONFIG/POMME/EXP00/namelist

    r1976 r2000  
    240240   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    241241   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     242   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     243   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    242245  
    243246   cn_dir       = './'      !  root directory for the location of the runoff files 
    244247   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    245248   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     249   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    246250   rn_hrnf      =  0.e0    !  depth over which enhanced vertical mixing is used 
    247251   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/BDY/bdyvol.F90

    r1739 r2000  
    8686      z_cflxemp = 0.e0 
    8787      zraur = 1.e0 / rau0 
    88       z_cflxemp = SUM ( emp(:,:) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) * zraur ) 
     88      z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:) ) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) * zraur )  
    8989      IF( lk_mpp )   CALL mpp_sum( z_cflxemp )   ! sum over the global domain 
    9090 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diafwb.F90

    r1581 r2000  
    3030   LOGICAL, PUBLIC, PARAMETER ::   lk_diafwb = .TRUE.    !: fresh water budget flag 
    3131 
    32    REAL(wp)               ::   a_emp ,          & 
     32   REAL(wp)               ::   a_fwf ,          & 
    3333      &                        a_sshb, a_sshn, a_salb, a_saln 
    3434   REAL(wp), DIMENSION(4) ::   a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 
     
    5959      REAL(wp) ::  ztemi(4), ztemo(4), zsali(4), zsalo(4), zflxi(4), zflxo(4) 
    6060      REAL(wp) ::  zt, zs, zu   
    61       REAL(wp) ::  zsm0, zempnew 
     61      REAL(wp) ::  zsm0, zfwfnew 
    6262      !!---------------------------------------------------------------------- 
    6363 
     
    6565      zsm0 = 34.72654 
    6666 
    67       ! To compute emp mean value mean emp 
     67      ! To compute fwf mean value mean fwf 
    6868 
    6969      IF( kt == nit000 ) THEN 
    7070 
    71          a_emp    = 0.e0 
     71         a_fwf    = 0.e0 
    7272         a_sshb   = 0.e0 ! valeur de ssh au debut de la simulation 
    7373         a_salb   = 0.e0 ! valeur de sal au debut de la simulation 
     
    8787      ENDIF 
    8888       
    89       a_emp    = SUM( e1t(:,:) * e2t(:,:) * emp   (:,:) * tmask_i(:,:) ) 
    90       IF( lk_mpp )   CALL mpp_sum( a_emp    )       ! sum over the global domain 
     89      a_fwf    = SUM( e1t(:,:) * e2t(:,:) * ( emp(:,:)-rnf(:,:) ) * tmask_i(:,:) )  
     90      IF( lk_mpp )   CALL mpp_sum( a_fwf    )       ! sum over the global domain 
    9191 
    9292      IF( kt == nitend ) THEN 
     
    9595         zarea = 0.e0 
    9696         zvol  = 0.e0 
    97          zempnew = 0.e0 
     97         zfwfnew = 0.e0 
    9898         ! Mean sea level at nitend 
    9999         a_sshn = SUM( e1t(:,:) * e2t(:,:) * sshn(:,:) * tmask_i(:,:) ) 
     
    115115          
    116116         ! Conversion in m3 
    117          a_emp    = a_emp * rdttra(1) * 1.e-3  
     117         a_fwf    = a_fwf * rdttra(1) * 1.e-3  
    118118          
    119          ! emp correction to bring back the mean ssh to zero 
    120          zempnew = a_sshn / ( ( nitend - nit000 + 1 ) * rdt ) * 1.e3 / zarea 
     119         ! fwf correction to bring back the mean ssh to zero 
     120         zfwfnew = a_sshn / ( ( nitend - nit000 + 1 ) * rdt ) * 1.e3 / zarea 
    121121 
    122122      ENDIF 
     
    362362         WRITE(inum,*) 
    363363         WRITE(inum,*)    'Net freshwater budget ' 
    364          WRITE(inum,9010) '  emp    = ',a_emp,   ' m3 =', a_emp   /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 
     364         WRITE(inum,9010) '  fwf    = ',a_fwf,   ' m3 =', a_fwf   /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 
    365365         WRITE(inum,*) 
    366366         WRITE(inum,9010) '  zarea =',zarea 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diawri.F90

    r1953 r2000  
    346346!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    347347!!$#endif 
    348          CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! emp 
     348         CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! (emp-rnf) 
    349349            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    350350!!$         CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
    351351!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    352          CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! emps 
    353             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    354          CALL histdef( nid_T, "sosalflx", "Surface Salt Flux"                  , "Kg/m2/s",   &  ! emps * sn 
     352         CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! (emps-rnf) 
     353            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     354         CALL histdef( nid_T, "sosalflx", "Surface Salt Flux"                  , "Kg/m2/s",   &  ! (emps-rnf) * sn 
    355355            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    356356         CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qns + qsr 
     
    498498!!$      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
    499499!!$#endif 
    500       CALL histwrite( nid_T, "sowaflup", it, emp           , ndim_hT, ndex_hT )   ! upward water flux 
     500      CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf )   , ndim_hT, ndex_hT )   ! upward water flux 
    501501!!$      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    502       CALL histwrite( nid_T, "sowaflcd", it, emps          , ndim_hT, ndex_hT )   ! c/d water flux 
    503       zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 
     502      CALL histwrite( nid_T, "sowaflcd", it, ( emps-rnf )  , ndim_hT, ndex_hT )   ! c/d water flux 
     503      zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * sn(:,:,1) * tmask(:,:,1) 
    504504      CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux 
    505505      CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux 
     
    700700      CALL histwrite( id_i, "vomecrty", kt, vn       , jpi*jpj*jpk, idex )    ! now j-velocity 
    701701      CALL histwrite( id_i, "vovecrtz", kt, wn       , jpi*jpj*jpk, idex )    ! now k-velocity 
    702       CALL histwrite( id_i, "sowaflup", kt, emp      , jpi*jpj    , idex )    ! freshwater budget 
     702      CALL histwrite( id_i, "sowaflup", kt, (emp-rnf), jpi*jpj    , idex )    ! freshwater budget 
    703703      CALL histwrite( id_i, "sohefldo", kt, qsr + qns, jpi*jpj    , idex )    ! total heat flux 
    704704      CALL histwrite( id_i, "soshfldo", kt, qsr      , jpi*jpj    , idex )    ! solar heat flux 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r1685 r2000  
    4242    !!  level 2:  vtau(:,:) * vmask(:,:,1) meridional stress in N. m-2 
    4343    !!  level 3:  qsr + qns                total heat flux (W/m2) 
    44     !!  level 4:  emp (:,:)               E-P flux (mm/day) 
     44    !!  level 4:  ( emp (:,:)-rnf(:,:) )   E-P flux (mm/day) 
    4545    !!  level 5:  tb  (:,:,1)-sst          model SST -forcing sst (degree C) ! deprecated 
    4646    !!  level 6:  bsfb(:,:)         streamfunction (m**3/s) 
     
    5454    !!  level 14: qct(:,:)                 equivalent flux due to treshold SST 
    5555    !!  level 15: fbt(:,:)                 feedback term . 
    56     !!  level 16: emps(:,:)                concentration/dilution water flux 
     56    !!  level 16: ( emps(:,:) - rnf(:,:) ) concentration/dilution water flux 
    5757    !!  level 17: fsalt(:,:)               Ice=>ocean net freshwater 
    5858    !!  level 18: gps(:,:)                 the surface pressure (m). 
     
    167167       fsel(:,:,2 ) = fsel(:,:,2 ) + vtau(:,:) * vmask(:,:,1) 
    168168       fsel(:,:,3 ) = fsel(:,:,3 ) + qsr (:,:) + qns  (:,:)  
    169        fsel(:,:,4 ) = fsel(:,:,4 ) + emp (:,:) 
     169       fsel(:,:,4 ) = fsel(:,:,4 ) + ( emp(:,:)-rnf(:,:) )  
    170170       !        fsel(:,:,5 ) = fsel(:,:,5 ) + tb  (:,:,1)  !RB not used 
    171171       fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:)  
     
    179179       !        fsel(:,:,14) = fsel(:,:,14) + qct(:,:) 
    180180       !        fsel(:,:,15) = fsel(:,:,15) + fbt(:,:) 
    181        fsel(:,:,16) = fsel(:,:,16) + emps(:,:) 
     181       fsel(:,:,16) = fsel(:,:,16) + ( emps(:,:)-rnf(:,:) )  
    182182#ifdef key_diaspr    
    183183       fsel(:,:,18) = fsel(:,:,18) + gps(:,:)/g  
     
    242242          fsel(:,:,2 ) = vtau(:,:) * vmask(:,:,1) 
    243243          fsel(:,:,3 ) = (qsr (:,:) + qns (:,:)) * tmask(:,:,1) 
    244           fsel(:,:,4 ) = emp (:,:) * tmask(:,:,1) 
     244          fsel(:,:,4 ) = ( emp(:,:)-rnf(:,:) ) * tmask(:,:,1)  
    245245          !         fsel(:,:,5 ) = (tb  (:,:,1) - sf_sst(1)%fnow(:,:) ) *tmask(:,:,1) !RB not used 
    246246 
     
    255255          !         fsel(:,:,14) =  qct(:,:) 
    256256          !         fsel(:,:,15) =  fbt(:,:) 
    257           fsel(:,:,16) =  emps(:,:) * tmask(:,:,1) 
     257          fsel(:,:,16) = ( emps(:,:)-rnf(:,:) ) * tmask(:,:,1)  
    258258#ifdef key_diaspr            
    259259          fsel(:,:,18) =      gps(:,:) /g 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/closea.F90

    r1601 r2000  
    180180      INTEGER                     ::   ji, jj, jc, jn   ! dummy loop indices 
    181181      REAL(wp)                    ::   zze2 
    182       REAL(wp), DIMENSION (jpncs) ::   zemp 
     182      REAL(wp), DIMENSION (jpncs) ::   zfwf  
     183  
    183184      !!---------------------------------------------------------------------- 
    184185      ! 
     
    216217      !                                                   !--------------------! 
    217218      !                                                   !  update emp, emps  ! 
    218       zemp = 0.e0                                         !--------------------! 
     219      zfwf = 0.e0                                         !--------------------! 
    219220      DO jc = 1, jpncs 
    220221         DO jj = ncsj1(jc), ncsj2(jc) 
    221222            DO ji = ncsi1(jc), ncsi2(jc) 
    222                zemp(jc) = zemp(jc) + e1t(ji,jj) * e2t(ji,jj) * emp(ji,jj) * tmask_i(ji,jj) 
     223               zfwf(jc) = zfwf(jc) + e1t(ji,jj) * e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj)  
    223224            END DO   
    224225         END DO  
    225226      END DO 
    226       IF( lk_mpp )   CALL mpp_sum ( zemp(:) , jpncs )       ! mpp: sum over all the global domain 
     227      IF( lk_mpp )   CALL mpp_sum ( zfwf(:) , jpncs )       ! mpp: sum over all the global domain 
    227228 
    228229      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN      ! Black Sea case for ORCA_R2 configuration 
    229          zze2    = ( zemp(3) + zemp(4) ) / 2. 
    230          zemp(3) = zze2 
    231          zemp(4) = zze2 
     230         zze2    = ( zfwf(3) + zfwf(4) ) / 2. 
     231         zfwf(3) = zze2 
     232         zfwf(4) = zze2 
    232233      ENDIF 
    233234 
     
    236237         IF( ncstt(jc) == 0 ) THEN  
    237238            ! water/evap excess is shared by all open ocean 
    238             emp (:,:) = emp (:,:) + zemp(jc) / surf(jpncs+1) 
    239             emps(:,:) = emps(:,:) + zemp(jc) / surf(jpncs+1) 
     239            emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     240            emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    240241         ELSEIF( ncstt(jc) == 1 ) THEN  
    241242            ! Excess water in open sea, at outflow location, excess evap shared 
    242             IF ( zemp(jc) <= 0.e0 ) THEN  
     243            IF ( zfwf(jc) <= 0.e0 ) THEN  
    243244                DO jn = 1, ncsnr(jc) 
    244245                  ji = mi0(ncsir(jc,jn)) 
     
    246247                  IF (      ji > 1 .AND. ji < jpi   & 
    247248                      .AND. jj > 1 .AND. jj < jpj ) THEN  
    248                       emp (ji,jj) = emp (ji,jj) + zemp(jc) /   & 
     249                      emp (ji,jj) = emp (ji,jj) + zfwf(jc) /   & 
    249250                         (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj)) 
    250                       emps(ji,jj) = emps(ji,jj) + zemp(jc) /   & 
     251                      emps(ji,jj) = emps(ji,jj) + zfwf(jc) /   & 
    251252                          (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj)) 
    252253                  END IF  
    253254                END DO  
    254255            ELSE  
    255                 emp (:,:) = emp (:,:) + zemp(jc) / surf(jpncs+1) 
    256                 emps(:,:) = emps(:,:) + zemp(jc) / surf(jpncs+1) 
     256                emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     257                emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    257258            ENDIF 
    258259         ELSEIF( ncstt(jc) == 2 ) THEN  
     
    263264                  ji = mi0(ncsir(jc,jn)) 
    264265                  jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 
    265                   emp (ji,jj) = emp (ji,jj) + zemp(jc)   & 
     266                  emp (ji,jj) = emp (ji,jj) + zfwf(jc)   & 
    266267                      / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) ) 
    267                   emps(ji,jj) = emps(ji,jj) + zemp(jc)   & 
     268                  emps(ji,jj) = emps(ji,jj) + zfwf(jc)   & 
    268269                      / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) ) 
    269270                END DO  
     
    273274         DO jj = ncsj1(jc), ncsj2(jc) 
    274275            DO ji = ncsi1(jc), ncsi2(jc) 
    275                emp (ji,jj) = emp (ji,jj) - zemp(jc) / surf(jc) 
    276                emps(ji,jj) = emps(ji,jj) - zemp(jc) / surf(jc) 
     276               emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 
     277               emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc) 
    277278            END DO   
    278279         END DO  
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DYN/dynspg_flt.F90

    r1976 r2000  
    8686      !!         where (spgu,spgv) are given by: 
    8787      !!            spgu = vertical sum[ e3u (ub+ 2 rdt ua ) ] 
    88       !!                 - grav 2 rdt hu /e1u di[sshn + emp] 
     88      !!                 - grav 2 rdt hu /e1u di[sshn + (emp-rnf)] 
    8989      !!            spgv = vertical sum[ e3v (vb+ 2 rdt va) ] 
    90       !!                 - grav 2 rdt hv /e2v dj[sshn + emp] 
     90      !!                 - grav 2 rdt hv /e2v dj[sshn + (emp-rnf)] 
    9191      !!         and define the first guess from previous computation : 
    9292      !!            zbtd = btda 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r1779 r2000  
    379379         DO jj = 2, jpjm1                                      ! leap-frog on ssh_e 
    380380            DO ji = fs_2, fs_jpim1   ! vector opt. 
    381                ssha_e(ji,jj) = ( zsshb_e(ji,jj) - z2dt_e * ( zraur * emp(ji,jj) + zhdiv(ji,jj) ) ) * tmask(ji,jj,1) 
     381               ssha_e(ji,jj) = ( zsshb_e(ji,jj) - z2dt_e * ( zraur * ( emp(ji,jj)-rnf(ji,jj) ) + zhdiv(ji,jj) ) ) * tmask(ji,jj,1)  
    382382            END DO 
    383383         END DO 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DYN/sshwzv.F90

    r1953 r2000  
    154154 
    155155      !                                                ! Sea surface elevation time stepping 
    156       ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * emp(:,:) + zhdiv(:,:) )  ) * tmask(:,:,1) 
     156      ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * ( emp(:,:)-rnf(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1)  
    157157 
    158158#if defined key_obc 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/OBC/obcvol.F90

    r1739 r2000  
    9797      ! --------------------------------------------------------------------------- 
    9898 
    99       zCflxemp = SUM ( emp(:,:)*obctmsk(:,:)* e1t(:,:) * e2t(:,:)  / rau0 ) 
     99      zCflxemp = SUM ( ( emp(:,:)-rnf(:,:) )*obctmsk(:,:)* e1t(:,:) * e2t(:,:)  / rau0 )  
    100100 
    101101      IF( lk_mpp )   CALL mpp_sum( zCflxemp )   ! sum over the global domain 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r1705 r2000  
    4949   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp       !: freshwater budget: volume flux               [Kg/m2/s] 
    5050   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emps      !: freshwater budget: concentration/dillution   [Kg/m2/s] 
     51   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rnf       !: river runoff   [Kg/m2/s]   
    5152   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp_tot   !: total evaporation - (liquid + solid) precpitation over oce and ice 
    5253   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tprecip   !: total precipitation           [Kg/m2/s] 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r1976 r2000  
    3232   REAL(wp) ::   a_fwb_b            ! annual domain averaged freshwater budget 
    3333   REAL(wp) ::   a_fwb              ! for 2 year before (_b) and before year. 
    34    REAL(wp) ::   empold             ! empold to be suppressed 
     34   REAL(wp) ::   fwfold             ! fwfold to be suppressed 
    3535   REAL(wp) ::   area               ! global mean ocean surface (interior domain) 
    3636 
     
    6666      INTEGER  ::   inum                  ! temporary logical unit 
    6767      INTEGER  ::   ikty, iyear           !  
    68       REAL(wp) ::   z_emp, z_emp_nsrf       ! temporary scalars 
     68      REAL(wp) ::   z_fwf, z_fwf_nsrf       ! temporary scalars 
    6969      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread 
    7070      REAL(wp), DIMENSION(jpi,jpj) ::   ztmsk_neg, ztmsk_pos, ztmsk_tospread 
     
    8080            IF( kn_fwb == 1 )   WRITE(numout,*) '          instantaneously set to zero' 
    8181            IF( kn_fwb == 2 )   WRITE(numout,*) '          adjusted from previous year budget' 
    82             IF( kn_fwb == 3 )   WRITE(numout,*) '          emp set to zero and spread out over erp area' 
     82            IF( kn_fwb == 3 )   WRITE(numout,*) '          fwf set to zero and spread out over erp area' 
    8383            ! 
    8484            IF( kn_fwb == 3 .AND. nn_sssr /= 2 )   & 
     
    101101          
    102102      ! 
    103       CASE ( 1 )                               ! global mean emp set to zero 
     103      CASE ( 1 )                               ! global mean fwf set to zero 
    104104         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    105             z_emp = glob_sum( e1e2_i(:,:) * emp(:,:) ) / area   ! sum over the global domain 
    106             emp (:,:) = emp (:,:) - z_emp 
    107             emps(:,:) = emps(:,:) - z_emp 
    108          ENDIF 
    109          ! 
    110       CASE ( 2 )                               ! emp budget adjusted from the previous year 
     105            z_fwf = glob_sum( e1e2_i(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area   ! sum over the global domain 
     106            emp (:,:) = emp (:,:) - z_fwf  
     107            emps(:,:) = emps(:,:) - z_fwf  
     108         ENDIF 
     109         ! 
     110      CASE ( 2 )                               ! fwf budget adjusted from the previous year 
    111111         ! initialisation 
    112112         IF( kt == nit000 ) THEN 
    113             ! Read the corrective factor on precipitations (empold) 
     113            ! Read the corrective factor on precipitations (fwfold) 
    114114            CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    115115            READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 
    116116            CLOSE( inum ) 
    117             empold = a_fwb                  ! current year freshwater budget correction 
     117            fwfold = a_fwb                  ! current year freshwater budget correction 
    118118            !                               ! estimate from the previous year budget 
    119119            IF(lwp)WRITE(numout,*) 
    120             IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear  , ' freshwater budget correction = ', empold 
     120            IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear  , ' freshwater budget correction = ', fwfold 
    121121            IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb 
    122122            IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b 
    123123         ENDIF    
    124124         !  
    125          ! Update empold if new year start 
     125         ! Update fwfold if new year start 
    126126         ikty = 365 * 86400 / rdttra(1)    !!bug  use of 365 days leap year or 360d year !!!!!!! 
    127127         IF( MOD( kt, ikty ) == 0 ) THEN 
     
    130130            a_fwb   = a_fwb * 1.e+3 / ( area * 86400. * 365. )     ! convert in Kg/m3/s = mm/s 
    131131!!gm        !                                                      !!bug 365d year  
    132             empold =  a_fwb                 ! current year freshwater budget correction 
     132            fwfold =  a_fwb                 ! current year freshwater budget correction 
    133133            !                               ! estimate from the previous year budget 
    134134         ENDIF 
     
    136136         ! correct the freshwater fluxes 
    137137         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    138             emp (:,:) = emp (:,:) + empold 
    139             emps(:,:) = emps(:,:) + empold 
    140          ENDIF 
    141          ! 
    142          ! save empold value in a file 
     138            emp (:,:) = emp (:,:) + fwfold 
     139            emps(:,:) = emps(:,:) + fwfold 
     140         ENDIF 
     141         ! 
     142         ! save fwfold value in a file 
    143143         IF( kt == nitend .AND. lwp ) THEN 
    144144            CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 
     
    147147         ENDIF 
    148148         ! 
    149       CASE ( 3 )                               ! global emp set to zero and spread out over erp area 
     149      CASE ( 3 )                               ! global fwf set to zero and spread out over erp area 
    150150         ! 
    151151         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
     
    159159            zsurf_pos = SUM( e1e2_i(:,:)*ztmsk_pos(:,:) ) 
    160160         
    161             ! emp global mean  
    162             z_emp = glob_sum( e1e2_i(:,:) * emp(:,:) ) / area 
     161            ! fwf global mean  
     162            z_fwf = glob_sum( e1e2_i(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area 
    163163            ! 
    164164             
    165             IF( z_emp < 0.e0 ) THEN 
     165            IF( z_fwf < 0.e0 ) THEN 
    166166                ! to spread out over >0 erp area to increase evaporation damping process 
    167167                zsurf_tospread = zsurf_pos 
     
    173173            ENDIF 
    174174 
    175             ! emp global mean over <0 or >0 erp area 
    176             z_emp_nsrf = SUM( e1e2_i(:,:) * z_emp ) / ( zsurf_tospread + rsmall ) 
     175            ! fwf global mean over <0 or >0 erp area 
     176            z_fwf_nsrf = SUM( e1e2_i(:,:) * z_fwf ) / ( zsurf_tospread + rsmall ) 
    177177            ! weight to respect erp field 2D structure  
    178178            z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( SUM( ztmsk_tospread(:,:) * erp(:,:) * e1e2_i(:,:) ) + rsmall ) 
    179179            ! final correction term to apply 
    180             zerp_cor(:,:) = -1. * z_emp_nsrf * zsurf_tospread * z_wgt(:,:) 
     180            zerp_cor(:,:) = -1. * z_fwf_nsrf * zsurf_tospread * z_wgt(:,:) 
    181181 
    182182            CALL lbc_lnk( zerp_cor, 'T', 1. ) 
     
    187187             
    188188            IF( nprint == 1 .AND. lwp ) THEN 
    189                IF( z_emp < 0.e0 ) THEN 
    190                   WRITE(numout,*)'       z_emp < 0' 
     189               IF( z_fwf < 0.e0 ) THEN 
     190                  WRITE(numout,*)'       z_fwf < 0' 
    191191                  WRITE(numout,*)'       SUM(erp+)        = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2_i(:,:) )*1.e-3,' m3.s-1' 
    192192               ELSE 
    193                    WRITE(numout,*)'      z_emp >= 0' 
     193                   WRITE(numout,*)'      z_fwf >= 0' 
    194194                   WRITE(numout,*)'      SUM(erp-)        = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2_i(:,:) )*1.e-3,' m3.s-1' 
    195195               ENDIF 
    196                WRITE(numout,*)'      SUM(empG)        = ', SUM( z_emp*e1e2_i(:,:) )*1.e-3,' m3.s-1' 
    197                WRITE(numout,*)'      z_emp            = ', z_emp      ,' mm.s-1' 
    198                WRITE(numout,*)'      z_emp_nsrf       = ', z_emp_nsrf ,' mm.s-1' 
     196               WRITE(numout,*)'      SUM(empG)        = ', SUM( z_fwf*e1e2_i(:,:) )*1.e-3,' m3.s-1' 
     197               WRITE(numout,*)'      z_fwf            = ', z_fwf      ,' mm.s-1' 
     198               WRITE(numout,*)'      z_fwf_nsrf       = ', z_fwf_nsrf ,' mm.s-1' 
    199199               WRITE(numout,*)'      MIN(zerp_cor)    = ', MINVAL(zerp_cor)  
    200200               WRITE(numout,*)'      MAX(zerp_cor)    = ', MAXVAL(zerp_cor)  
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/sbcmod.F90

    r1953 r2000  
    237237      ! 
    238238      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
    239          CALL iom_put( "emp"    , emp       )                   ! upward water flux 
    240          CALL iom_put( "emps"   , emps      )                   ! c/d water flux 
    241          CALL iom_put( "qns+qsr", qns + qsr )                   ! total heat flux   (caution if ln_dm2dc=true, to be  
    242          CALL iom_put( "qns"    , qns       )                   ! solar heat flux    moved after the call to iom_setkt) 
    243          CALL iom_put( "qsr"    ,       qsr )                   ! solar heat flux    moved after the call to iom_setkt) 
     239         CALL iom_put( "emp-rnf"  , (emp-rnf)  )                ! upward water flux  
     240         CALL iom_put( "emps-rnf" , (emps-rnf) )                ! c/d water flux  
     241         CALL iom_put( "qns+qsr"  , qns + qsr  )                ! total heat flux   (caution if ln_dm2dc=true, to be  
     242         CALL iom_put( "qns"      , qns        )                ! solar heat flux    moved after the call to iom_setkt) 
     243         CALL iom_put( "qsr"      ,       qsr  )                ! solar heat flux    moved after the call to iom_setkt) 
    244244         IF(  nn_ice > 0 )   CALL iom_put( "ice_cover", fr_i )  ! ice fraction  
    245245      ENDIF 
     
    254254      IF(ln_ctl) THEN         ! print mean trends (used for debugging) 
    255255         CALL prt_ctl(tab2d_1=fr_i   , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 
    256          CALL prt_ctl(tab2d_1=emp    , clinfo1=' emp  - : ', mask1=tmask, ovlap=1 ) 
    257          CALL prt_ctl(tab2d_1=emps   , clinfo1=' emps - : ', mask1=tmask, ovlap=1 ) 
     256         CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf  - : ', mask1=tmask, ovlap=1 )  
     257         CALL prt_ctl(tab2d_1=(emps-rnf), clinfo1=' emps-rnf - : ', mask1=tmask, ovlap=1 )  
    258258         CALL prt_ctl(tab2d_1=qns    , clinfo1=' qns  - : ', mask1=tmask, ovlap=1 ) 
    259259         CALL prt_ctl(tab2d_1=qsr    , clinfo1=' qsr  - : ', mask1=tmask, ovlap=1 ) 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r1951 r2000  
    3232   TYPE(FLD_N)       , PUBLIC ::   sn_rnf                 !: information about the runoff file to be read 
    3333   TYPE(FLD_N)       , PUBLIC ::   sn_cnf                 !: information about the runoff mouth file to be read 
     34   TYPE(FLD_N)                ::   sn_sal_rnf             !: information about the salinities of runoff file to be read   
     35   TYPE(FLD_N)                ::   sn_tmp_rnf             !: information about the temperatures of runoff file to be read   
     36   TYPE(FLD_N)                ::   sn_dep_rnf             !: information about the depth which river inflow affects 
    3437   LOGICAL           , PUBLIC ::   ln_rnf_mouth = .false. !: specific treatment in mouths vicinity 
    3538   REAL(wp)          , PUBLIC ::   rn_hrnf      = 0.e0    !: runoffs, depth over which enhanced vertical mixing is used 
    3639   REAL(wp)          , PUBLIC ::   rn_avt_rnf   = 0.e0    !: runoffs, value of the additional vertical mixing coef. [m2/s] 
     40   LOGICAL           , PUBLIC ::   ln_rnf_att   = .false. !: river runoffs attributes (temp, sal & depth) are specified in a file  
    3741   REAL(wp)          , PUBLIC ::   rn_rfact     = 1.e0    !: multiplicative factor for runoff 
    3842 
     
    4145   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   rnfmsk_z    !: river mouth mask (vert.) 
    4246 
    43    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_rnf   ! structure of input SST (file information, fields read) 
     47   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_rnf        !: structure of input river runoff (file information, fields read) 
     48 
     49   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sal_rnf    !: structure of input river runoff salinity (file information, fields read)   
     50   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tmp_rnf    !: structure of input river runoff temperature (file information, fields read)   
     51  
     52   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_dep         !: depth of runoff in m   
     53   INTEGER, PUBLIC, DIMENSION(jpi,jpj) ::  rnf_mod_dep     !: depth of runoff in model levels   
     54   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_sal         !: salinity of river runoff   
     55   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_tmp         !: temperature of river runoff   
     56   
     57   INTEGER  ::  ji, jj ,jk    ! dummy loop indices   
     58   INTEGER  ::  inum          ! temporary logical unit   
     59   
     60   !! * Substitutions   
     61#  include "domzgr_substitute.h90"   
    4462 
    4563   !!---------------------------------------------------------------------- 
     
    7088      !                                    
    7189      IF( kt == nit000 ) THEN   
    72          IF( .NOT. ln_rnf_emp ) THEN 
    73             ALLOCATE( sf_rnf(1), STAT=ierror ) 
    74             IF( ierror > 0 ) THEN 
    75                CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
    76             ENDIF 
    77             ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1  ) ) 
    78             ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) ) 
    79          ENDIF 
    80          CALL sbc_rnf_init(sf_rnf) 
     90         CALL sbc_rnf_init                      ! Read namelist and allocate structures 
    8191      ENDIF 
    8292 
     
    8797         CALL fld_read( kt, nn_fsbc, sf_rnf )   ! Read Runoffs data and provides it 
    8898         !                                      ! at the current time-step 
     99         IF ( ln_rnf_att ) THEN   
     100            CALL fld_read ( kt, nn_fsbc, sf_sal_rnf )   
     101            CALL fld_read ( kt, nn_fsbc, sf_tmp_rnf )   
     102         ENDIF   
    89103 
    90104         ! Runoff reduction only associated to the ORCA2_LIM configuration 
     
    101115 
    102116         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
    103             emp (:,:) = emp (:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:,1) ) 
    104             emps(:,:) = emps(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:,1) ) 
    105             CALL iom_put( "runoffs", sf_rnf(1)%fnow )         ! runoffs 
     117            rnf(:,:)  = rn_rfact * ( sf_rnf(1)%fnow(:,:) )   
     118            IF ( ln_rnf_att ) THEN   
     119               rnf_sal(:,:) = ( sf_sal_rnf(1)%fnow(:,:) )   
     120               rnf_tmp(:,:) = ( sf_tmp_rnf(1)%fnow(:,:) )   
     121            ELSE   
     122               rnf_sal(:,:) = 0   
     123               rnf_tmp(:,:) = -999   
     124            ENDIF   
     125            CALL iom_put( "runoffs", rnf )         ! runoffs 
    106126         ENDIF 
    107127         ! 
     
    111131 
    112132 
    113    SUBROUTINE sbc_rnf_init( sf_rnf ) 
     133   SUBROUTINE sbc_rnf_init 
    114134      !!---------------------------------------------------------------------- 
    115135      !!                  ***  ROUTINE sbc_rnf_init  *** 
     
    121141      !! ** Action  : - read parameters 
    122142      !!---------------------------------------------------------------------- 
    123       TYPE(FLD), INTENT(inout), DIMENSION(:) :: sf_rnf   ! input data 
    124       !! 
    125       NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, ln_rnf_mouth,   & 
    126          &                 rn_hrnf, rn_avt_rnf, rn_rfact 
     143      CHARACTER(len=32) ::   rn_dep_file   ! runoff file name   
     144      !!  
     145      NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, sn_sal_rnf, sn_tmp_rnf, sn_dep_rnf,   &   
     146         &                 ln_rnf_mouth, ln_rnf_att, rn_hrnf, rn_avt_rnf, rn_rfact   
    127147      !!---------------------------------------------------------------------- 
    128148 
     
    136156      sn_cnf = FLD_N( 'runoffs',     0     , 'sorunoff' ,  .FALSE.   , .true. ,   'yearly'  , ''       , ''         ) 
    137157 
     158      sn_sal_rnf = FLD_N( 'runoffs',  24.  , 'rosaline' ,  .TRUE.    , .true. ,   'yearly'  , ''    , ''  )   
     159      sn_tmp_rnf = FLD_N( 'runoffs',  24.  , 'rotemper' ,  .TRUE.    , .true. ,   'yearly'  , ''    , ''  )   
     160      sn_dep_rnf = FLD_N( 'runoffs',   0.  , 'rodepth'  ,  .FALSE.   , .true. ,   'yearly'  , ''    , ''  )   
    138161      ! 
    139162      REWIND ( numnam )                         ! Read Namelist namsbc_rnf 
     
    160183         IF(lwp) WRITE(numout,*) 
    161184         IF(lwp) WRITE(numout,*) '          runoffs directly provided in the precipitations' 
     185         IF ( ln_rnf_att ) THEN 
     186           CALL ctl_warn( 'runoffs already included in precipitations & so runoff attributes will not be used' )  
     187           ln_rnf_att = .FALSE. 
     188         ENDIF 
    162189         ! 
    163190      ELSE                                      ! runoffs read in a file : set sf_rnf structure  
    164191         ! 
    165          ! sf_rnf already allocated in main routine 
     192         ! Allocate sf_rnf structure and (if required) sf_sal_rnf and sf_tmp_rnf structures 
     193         ALLOCATE( sf_rnf(1), STAT=ierror ) 
     194         IF( ierror > 0 ) THEN 
     195            CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
     196         ENDIF 
     197         ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) ) 
     198         ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 
     199 
     200         IF( ln_rnf_att ) THEN 
     201            ALLOCATE( sf_sal_rnf(1), STAT=ierror ) 
     202            IF( ierror > 0 ) THEN 
     203               CALL ctl_stop( 'sbc_sal_rnf: unable to allocate sf_sal_rnf structure' )   ;   RETURN 
     204            ENDIF 
     205            ALLOCATE( sf_sal_rnf(1)%fnow(jpi,jpj) ) 
     206            ALLOCATE( sf_sal_rnf(1)%fdta(jpi,jpj,2) ) 
     207 
     208            ALLOCATE( sf_tmp_rnf(1), STAT=ierror ) 
     209            IF( ierror > 0 ) THEN 
     210                CALL ctl_stop( 'sbc_tmp_rnf: unable to allocate sf_tmp_rnf structure' )   ;   RETURN 
     211            ENDIF 
     212            ALLOCATE( sf_tmp_rnf(1)%fnow(jpi,jpj) ) 
     213            ALLOCATE( sf_tmp_rnf(1)%fdta(jpi,jpj,2) ) 
     214         ENDIF 
    166215         ! fill sf_rnf with sn_rnf and control print 
    167216         CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
    168          ! 
     217  
     218         IF ( ln_rnf_att ) THEN   
     219            CALL fld_fill (sf_sal_rnf, (/ sn_sal_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff salinity data', 'namsbc_rnf' )   
     220            CALL fld_fill (sf_tmp_rnf, (/ sn_tmp_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff temperature data', 'namsbc_rnf' )   
     221   
     222            rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname )   
     223            CALL iom_open ( rn_dep_file, inum )                           ! open file   
     224            CALL iom_get  ( inum, jpdom_data, sn_dep_rnf%clvar, rnf_dep )    ! read the river mouth array   
     225            CALL iom_close( inum )                                      ! close file   
     226   
     227            rnf_mod_dep(:,:)=0   
     228            DO jj=1,jpj   
     229              DO ji=1,jpi   
     230                IF ( rnf_dep(ji,jj) > 0.e0 ) THEN   
     231                  jk=2   
     232                  DO WHILE ( jk/=jpkm1 .AND. fsdept(ji,jj,jk) < rnf_dep(ji,jj) );  jk=jk+1;   ENDDO   
     233                  rnf_mod_dep(ji,jj)=jk   
     234                ELSE IF ( rnf_dep(ji,jj) .eq. -1 ) THEN   
     235                  rnf_mod_dep(ji,jj)=1   
     236                ELSE IF ( rnf_dep(ji,jj) .eq. -999 ) THEN   
     237                  rnf_mod_dep(ji,jj)=jpkm1   
     238                ELSE IF ( rnf_dep(ji,jj) /= 0 ) THEN   
     239                  CALL ctl_stop( 'runoff depth not positive, and not -999 or -1, rnf value in file fort.999'  )   
     240                  WRITE(999,*) 'ji, jj, rnf(ji,jj) :', ji, jj, rnf(ji,jj)   
     241                ENDIF   
     242              ENDDO   
     243            ENDDO   
     244         ELSE   
     245            rnf_mod_dep(:,:)=1   
     246         ENDIF   
     247      !  
    169248      ENDIF 
    170249 
     
    179258         ! 
    180259         !                                          ! Number of level over which Kz increase 
     260         IF ( ln_rnf_att )  &   
     261              &  CALL ctl_warn( 'increased mixing turned on but effects may already be spread through depth by ln_rnf_att' )  
    181262         nkrnf = 0 
    182263         IF( rn_hrnf > 0.e0 ) THEN 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/TRA/trasbc.F90

    r1739 r2000  
    2121   USE in_out_manager  ! I/O manager 
    2222   USE prtctl          ! Print control 
     23   USE sbcrnf          ! River runoff   
     24   USE sbcmod          ! ln_rnf   
    2325 
    2426   IMPLICIT NONE 
     
    103105      INTEGER, INTENT(in) ::   kt     ! ocean time-step index 
    104106      !! 
    105       INTEGER  ::   ji, jj                   ! dummy loop indices 
    106       REAL(wp) ::   zta, zsa, zsrau, zse3t   ! temporary scalars 
     107      INTEGER  ::   ji, jj, jk           ! dummy loop indices   
     108      REAL(wp) ::   zta, zsa             ! temporary scalars, adjustment to temperature and salinity   
     109      REAL(wp) ::   zata, zasa           ! temporary scalars, calculations of automatic change to temp & sal due to vvl (done elsewhere)   
     110      REAL(wp) ::   zsrau, zse3t, zdep   ! temporary scalars, 1/density, 1/height of box, 1/height of effected water column   
     111      REAL(wp) ::   zdheat, zdsalt       ! total change of temperature and salinity   
    107112      !!---------------------------------------------------------------------- 
    108113 
     
    125130      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
    126131 
    127       ! Concentration dillution effect on (t,s) 
     132      ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff   
    128133      DO jj = 2, jpj 
    129134         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    132137#endif 
    133138            IF( lk_vvl) THEN 
    134                zta = ro0cpr * qns(ji,jj) * zse3t &                   ! temperature : heat flux 
    135                 &    - emp(ji,jj) * zsrau * tn(ji,jj,1)  * zse3t     ! & cooling/heating effet of EMP flux 
     139               zta =  ro0cpr * qns(ji,jj) * zse3t &                  ! temperature : heat flux  
     140                &    - emp(ji,jj) * zsrau * tn(ji,jj,1) * zse3t      ! & cooling/heating effet of EMP flux  
    136141               zsa = 0.e0                                            ! No salinity concent./dilut. effect 
    137142            ELSE 
    138                zta = ro0cpr * qns(ji,jj) * zse3t     ! temperature : heat flux 
    139                zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t     ! salinity :  concent./dilut. effect 
     143               zta =  ro0cpr * qns(ji,jj) * zse3t                    ! temperature : heat flux  
     144               zsa =  emps(ji,jj) * zsrau * sn(ji,jj,1) * zse3t      ! salinity :  concent./dilut. effect  
    140145            ENDIF 
    141146            ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
     
    143148         END DO 
    144149      END DO 
     150 
     151      IF ( ln_rnf .AND. ln_rnf_att ) THEN   
     152      ! Concentration / dilution effect on (t,s) due to river runoff   
     153        DO jj=1,jpj   
     154           DO ji=1,jpi   
     155              rnf_dep(ji,jj)=0   
     156              DO jk=1,rnf_mod_dep(ji,jj)                          ! recalculates rnf_dep to be the depth   
     157                rnf_dep(ji,jj)=rnf_dep(ji,jj)+fse3t(ji,jj,jk)    ! in metres to the bottom of the relevant grid box   
     158              ENDDO   
     159              zdep = 1. / rnf_dep(ji,jj)   
     160              zse3t= 1. / fse3t(ji,jj,1)   
     161              IF ( rnf_tmp(ji,jj) == -999 )   rnf_tmp(ji,jj)=tn(ji,jj,1)        ! if not specified set runoff temp to be sst   
     162   
     163              IF ( rnf(ji,jj) .gt. 0.0 ) THEN   
     164   
     165                IF( lk_vvl) THEN   
     166                  !!!indirect flux, concentration or dilution effect   
     167                  !!!force a dilution effect in all levels;   
     168                  zdheat=0.0   
     169                  zdsalt=0.0   
     170                  DO jk=1, rnf_mod_dep(ji,jj)   
     171                    zta = -tn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep   
     172                    zsa = -sn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep   
     173                    ta(ji,jj,jk)=ta(ji,jj,jk)+zta   
     174                    sa(ji,jj,jk)=sa(ji,jj,jk)+zsa   
     175                    zdheat=zdheat+zta*fse3t(ji,jj,jk)   
     176                    zdsalt=zdsalt+zsa*fse3t(ji,jj,jk)   
     177                  ENDDO   
     178                  !!!negate this total change in heat and salt content from top level   
     179                  zta=-zdheat*zse3t   
     180                  zsa=-zdsalt*zse3t   
     181                  ta(ji,jj,1)=ta(ji,jj,1)+zta   
     182                  sa(ji,jj,1)=sa(ji,jj,1)+zsa   
     183     
     184                  !!!direct flux   
     185                  zta = rnf_tmp(ji,jj) * rnf(ji,jj) * zsrau * zdep   
     186                  zsa = rnf_sal(ji,jj) * rnf(ji,jj) * zsrau * zdep   
     187     
     188                  DO jk=1, rnf_mod_dep(ji,jj)   
     189                    ta(ji,jj,jk) = ta(ji,jj,jk) + zta   
     190                    sa(ji,jj,jk) = sa(ji,jj,jk) + zsa   
     191                  ENDDO   
     192    
     193                ELSE   
     194                  DO jk=1, rnf_mod_dep(ji,jj)   
     195                    zta = ( rnf_tmp(ji,jj)-tn(ji,jj,jk) ) * rnf(ji,jj) * zsrau * zdep   
     196                    zsa = ( rnf_sal(ji,jj)-sn(ji,jj,jk) ) * rnf(ji,jj) * zsrau * zdep   
     197                    ta(ji,jj,jk) = ta(ji,jj,jk) + zta   
     198                    sa(ji,jj,jk) = sa(ji,jj,jk) + zsa   
     199                  ENDDO   
     200                ENDIF   
     201   
     202              ELSEIF (rnf(ji,jj) .lt. 0.) THEN   !! for use in baltic when flow is out of domain, want no change in temp and sal   
     203   
     204                IF( lk_vvl) THEN   
     205                  !calculate automatic adjustment to sal and temp due to dilution/concentraion effect    
     206                  zata = tn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
     207                  zasa = sn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
     208                  ta(ji,jj,1)=ta(ji,jj,1) + zata   
     209                  sa(ji,jj,1)=sa(ji,jj,1) + zasa   
     210                ENDIF   
     211   
     212              ENDIF   
     213   
     214           ENDDO   
     215        ENDDO   
     216 
     217      ELSE IF( ln_rnf ) THEN 
     218 
     219      ! Concentration dilution effect on (t,s) due to runoff without temperatue, salinity and depth attributes 
     220        DO jj = 2, jpj 
     221           DO ji = fs_2, fs_jpim1   ! vector opt. 
     222#if ! defined key_zco 
     223              zse3t = 1. / fse3t(ji,jj,1) 
     224#endif 
     225              IF( lk_vvl) THEN 
     226                 zta =  rnf(ji,jj) * zsrau * tn(ji,jj,1) * zse3t       ! & cooling/heating effect of runoff 
     227                 zsa = 0.e0                                            ! No salinity concent./dilut. effect 
     228              ELSE 
     229                 zta =  0.0                                            ! temperature : heat flux  
     230                 zsa =  - rnf(ji,jj) * zsrau * sn(ji,jj,1) * zse3t     ! salinity :  concent./dilut. effect 
     231              ENDIF 
     232              ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
     233              sa(ji,jj,1) = sa(ji,jj,1) + zsa 
     234           END DO 
     235        END DO 
     236  
     237      ENDIF   
    145238 
    146239      IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/ZDF/zdfkpp.F90

    r1695 r2000  
    453453            zBosol(ji,jj) = grav * zthermal * qsr(ji,jj) 
    454454            ! Non radiative surface buoyancy force 
    455             zBo   (ji,jj) = grav * zthermal * qns(ji,jj) -  grav * zhalin * emps(ji,jj) 
     455            zBo   (ji,jj) = grav * zthermal * qns(ji,jj) -  grav * zhalin * ( emps(ji,jj)-rnf(ji,jj) )  
    456456            ! Surface Temperature flux for non-local term 
    457457            wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* ro0cpr * tmask(ji,jj,1) 
    458458            ! Surface salinity flux for non-local term 
    459             ws0(ji,jj) = - ( emps(ji,jj) * sn(ji,jj,1) * rcs ) * tmask(ji,jj,1) 
     459            ws0(ji,jj) = - ( ( emps(ji,jj)-rnf(ji,jj) ) * sn(ji,jj,1) * rcs ) * tmask(ji,jj,1)  
    460460         ENDDO 
    461461      ENDDO 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/cla.F90

    r1146 r2000  
    163163         DO ji = mi0(148), mi1(160) 
    164164            zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    165             zempred = zempred + emp(ji,jj) * zwei 
     165            zempred = zempred + ( emp(ji,jj) - rnf(ji,jj) ) * zwei  
    166166         END DO 
    167167      END DO 
     
    365365         DO ji = mi0(141),mi1(181) 
    366366            zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    367             zempmed = zempmed + emp(ji,jj) * zwei 
     367            zempmed = zempmed + ( emp(ji,jj) - rnf(ji,jj) ) * zwei  
    368368         END DO 
    369369      END DO 
     
    374374      DO jj = mj0(96),mj1(96) 
    375375         DO ji = mi0(148),mi1(148) 
    376             zempmed = zempmed  -  emp(ji  ,jj) * tmask(ji  ,jj,1) * e1t(ji  ,jj) * e2t(ji  ,jj)   & 
    377                                -  emp(ji+1,jj) * tmask(ji+1,jj,1) * e1t(ji+1,jj) * e2t(ji+1,jj)    
     376            zempmed = zempmed  -  ( emp(ji  ,jj)-rnf(ji  ,jj) ) * tmask(ji  ,jj,1) * e1t(ji  ,jj) * e2t(ji  ,jj)   &  
     377                               -  ( emp(ji+1,jj)-rnf(ji+1,jj) ) * tmask(ji+1,jj,1) * e1t(ji+1,jj) * e2t(ji+1,jj)     
    378378         END DO 
    379379      END DO 
     
    389389      zu3_ms(:) = zu3_ms_i(:) 
    390390 
    391       ! velocity profile at 139,101  South point + emp on surface  
     391      ! velocity profile at 139,101  South point + (emp-rnf) on surface  
    392392      DO jk = 1, 14                       
    393393         DO jj = mj0(102), mj1(102)  
     
    399399 
    400400      ! profile at East Gibraltar     
    401       ! velocity profile at 141,102  + emp on surface  
     401      ! velocity profile at 141,102  + (emp-rnf) on surface  
    402402      DO  jk = 1, 14                      
    403403         DO jj = mj0(102), mj1(102)  
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/cla_div.F90

    r1146 r2000  
    124124         DO ji = mi0(148), mi1(160)  
    125125            zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    126             zempred = zempred + emp(ji,jj) * zwei 
     126            zempred = zempred + ( emp(ji,jj) - rnf(ji,jj) ) * zwei  
    127127         END DO 
    128128      END DO 
     
    234234         DO ji = mi0(141),mi1(181) 
    235235            zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    236             zempmed = zempmed + emp(ji,jj) * zwei 
     236            zempmed = zempmed + ( emp(ji,jj) - rnf(ji,jj) ) * zwei  
    237237         END DO 
    238238      END DO 
     
    242242      DO jj = mj0(96), mj1(96) 
    243243         DO ji = mi0(148),mi1(148) 
    244             zempmed = zempmed -  emp(ji  , jj) * tmask(ji  , jj,1) * e1t(ji  , jj) * e2t(ji  , jj)   & 
    245                               -  emp(ji+1, jj) * tmask(ji+1, jj,1) * e1t(ji+1, jj) * e2t(ji+1, jj)    
     244            zempmed = zempmed -  ( emp(ji  , jj) - rnf(ji  ,jj) ) * tmask(ji  , jj,1) * e1t(ji  , jj) * e2t(ji  , jj)   &  
     245                              -  ( emp(ji+1, jj) - rnf(ji+1,jj) ) * tmask(ji+1, jj,1) * e1t(ji+1, jj) * e2t(ji+1, jj)     
    246246         END DO 
    247247      END DO 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/cla_dynspg.F90

    r1556 r2000  
    7979      ! EMP on Mediterranean Sea and Red Sea  
    8080      ! ------------------------------------ 
    81       ! compute the emp in Mediterranean Sea 
     81      ! compute the (emp-rnf) in Mediterranean Sea 
    8282      zempmed = 0.e0 
    8383      zwei = 0.e0 
     
    8787         DO ji = mi0(ii0),mi1(ii1) 
    8888            zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    89             zempmed = zempmed + emp(ji,jj) * zwei 
     89            zempmed = zempmed + ( emp(ji,jj)-rnf(ji,jj) ) * zwei  
    9090         END DO 
    9191      END DO 
     
    9797      DO jj = mj0(ij0), mj1(ij1) 
    9898         DO ji = mi0(ii0),mi1(ii1) 
    99             zempmed = zempmed - emp(ji  ,jj) * tmask(ji  ,jj,1) * e1t(ji  ,jj) * e2t(ji  ,jj)   & 
    100                &              - emp(ji+1,jj) * tmask(ji+1,jj,1) * e1t(ji+1,jj) * e2t(ji+1,jj)    
     99            zempmed = zempmed - ( emp(ji  ,jj) - rnf(ji  ,jj) ) * tmask(ji  ,jj,1) * e1t(ji  ,jj) * e2t(ji  ,jj)   &  
     100               &              - ( emp(ji+1,jj) - rnf(ji+1,jj) ) * tmask(ji+1,jj,1) * e1t(ji+1,jj) * e2t(ji+1,jj)     
    101101         END DO 
    102102      END DO 
     
    104104      zempmed = zempmed * 1.e-3 
    105105 
    106       ! compute the emp in Red Sea    
     106      ! compute the (emp-rnf) in Red Sea    
    107107      zempred = 0.e0 
    108108      zwei = 0.e0 
     
    112112         DO ji = mi0(ii0),mi1(ii1) 
    113113            zwei      = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj) 
    114             zempred   = zempred + emp(ji,jj) * zwei 
     114            zempred   = zempred + ( emp(ji,jj) - rnf(ji,jj) ) * zwei  
    115115         END DO 
    116116      END DO 
Note: See TracChangeset for help on using the changeset viewer.