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 3402 for branches – NEMO

Changeset 3402 for branches


Ignore:
Timestamp:
2012-05-25T18:43:49+02:00 (12 years ago)
Author:
acc
Message:

Branch: dev_r3385_NOCS04_HAMF; #665. Stage 2 of 2012 development: suppression of emps array and introduction of sfx (salt flux) array with associated code to setup the options for embedding the seaice into the ocean

Location:
branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r3396 r3402  
    3939   USE prtctl           ! Print control 
    4040   USE cpl_oasis3, ONLY : lk_cpl 
     41   USE oce, ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass  
    4142 
    4243   IMPLICIT NONE 
     
    9293      !!              - qns     : sea heat flux    : non solar (including heat content of the mass flux) 
    9394      !!              - emp     : freshwater budget: mass flux  
    94       !!              - emps    : freshwater budget: salt flux due to Freezing/Melting 
     95      !!              - sfx     : freshwater budget: salt flux due to Freezing/Melting 
    9596      !!              - utau    : sea surface i-stress (ocean referential) 
    9697      !!              - vtau    : sea surface j-stress (ocean referential) 
     
    119120      CALL wrk_alloc( jpi, jpj, 1, zalb, zalbp ) 
    120121 
    121       zswitch = 1                                ! Default standard levitating sea-ice (salt exchanges only) 
    122 !!gm ice embedment 
    123 !     SELECT CASE( nn_ice_embd )                 ! levitating/embedded sea-ice option (not yet activated) 
    124 !       CASE( 0    )   ;   zswitch = 1           ! standard levitating sea-ice : salt exchange only 
    125 !       CASE( 1, 2 )   ;   zswitch = 0           ! other levitating sea-ice or embedded sea-ice : salt and volume fluxes 
    126 !     END SELECT                                 !     
    127 !!gm end embedment 
     122      SELECT CASE( nn_ice_embd )                 ! levitating or embedded sea-ice option 
     123        CASE( 0    )   ;   zswitch = 1           ! (0) standard levitating sea-ice : salt exchange only 
     124        CASE( 1, 2 )   ;   zswitch = 0           ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 
     125                                                 ! (2) embedded sea-ice : salt and volume fluxes and pressure 
     126      END SELECT                                 !     
     127 
    128128      !------------------------------------------! 
    129129      !      heat flux at the ocean surface      ! 
     
    147147!!$            i1mfr   = 1.0 - AINT(  frld(ji,jj) )                   ! = 0. if ice-free ocean else 1. (after ice thermo) 
    148148!!$ 
    149 !!$            IF( phicif(ji,jj) <= 0. ) THEN   ;   ifvt = zinda      ! = 1. if there was snow and ice before the ice thermo. which has been completely melted (possibly overmelted) 
     149!!$            IF( phicif(ji,jj) <= 0. ) THEN   ;   ifvt = zinda      ! = zinda if previous thermodynamic step overmelted the ice??? 
    150150!!$            ELSE                             ;   ifvt = 0.         !  
    151151!!$            ENDIF 
     
    222222            ! salt flux only       : add concentration dilution term in salt flux  and no  F-M term in volume flux 
    223223            ! salt and mass fluxes : non concentartion dilution term in salt flux  and add F-M term in volume flux 
    224             emps(ji,jj) = zfsalt +                  zswitch  * zcd   ! salt flux (+ C/D if no ice/ocean mass exchange) 
     224            sfx (ji,jj) = zfsalt +                  zswitch  * zcd   ! salt flux (+ C/D if no ice/ocean mass exchange) 
    225225            emp (ji,jj) = zemp   + zemp_snw + ( 1.- zswitch) * zfmm  ! mass flux (- F/M mass flux if no ice/ocean mass exchange) 
    226226            ! 
    227227         END DO 
    228228      END DO 
     229      !                                !------------------------------------------! 
     230      !                                !    mass of snow and ice per unit area    ! 
     231      !                                !------------------------------------------! 
     232      IF( nn_ice_embd /= 0 ) THEN      ! embedded sea-ice (mass required) 
     233         snwice_mass_b(:,:) = snwice_mass(:,:)                  ! save mass from the previous ice time step 
     234         !                                                      ! new mass per unit area 
     235         snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
     236         !                                                      ! time evolution of snow+ice mass 
     237         snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / rdt_ice 
     238      ENDIF 
    229239 
    230240      CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) )       
     
    255265      IF(ln_ctl) THEN            ! control print 
    256266         CALL prt_ctl(tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns   , clinfo2=' qns     : ') 
    257          CALL prt_ctl(tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps  , clinfo2=' emps    : ') 
     267         CALL prt_ctl(tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=sfx   , clinfo2=' sfx     : ') 
    258268         CALL prt_ctl(tab2d_1=utau  , clinfo1=' lim_sbc: utau   : ', mask1=umask,   & 
    259269            &         tab2d_2=vtau  , clinfo2=' vtau    : '        , mask2=vmask ) 
     
    451461         END WHERE 
    452462      ENDIF 
     463      !                                      ! embedded sea ice 
     464      IF( nn_ice_embd /= 0 ) THEN            ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 
     465         snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
     466         snwice_mass_b(:,:) = snwice_mass(:,:) 
     467      ELSE 
     468         snwice_mass  (:,:) = 0.e0           ! no mass exchanges 
     469         snwice_mass_b(:,:) = 0.e0           ! no mass exchanges 
     470      ENDIF 
     471      IF( nn_ice_embd == 2 .AND.          &  ! full embedment (case 2) & no restart :  
     472         &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh belew sea-ice area 
     473         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
     474         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     475      ENDIF 
    453476      ! 
    454477   END SUBROUTINE lim_sbc_init_2 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90

    r3294 r3402  
    173173            zcmo(ji,jj,13) = qns(ji,jj) 
    174174            ! See thersf for the coefficient 
    175             zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce    !!gm ??? 
     175            zcmo(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce    !!gm ??? 
    176176            zcmo(ji,jj,15) = utau_ice(ji,jj) 
    177177            zcmo(ji,jj,16) = vtau_ice(ji,jj) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90

    r3294 r3402  
    118118          zcmo(ji,jj,13) = qns(ji,jj) 
    119119          ! See thersf for the coefficient 
    120           zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
     120          zcmo(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
    121121          zcmo(ji,jj,15) = utau_ice(ji,jj) 
    122122          zcmo(ji,jj,16) = vtau_ice(ji,jj) 
     
    161161                rcmoy(ji,jj,13) = qns(ji,jj) 
    162162                ! See thersf for the coefficient 
    163                 rcmoy(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
     163                rcmoy(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
    164164                rcmoy(ji,jj,15) = utau_ice(ji,jj) 
    165165                rcmoy(ji,jj,16) = vtau_ice(ji,jj) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90

    r2715 r3402  
    113113               vinfor(31) = vinfor(31) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + &  
    114114                  v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12  
    115                vinfor(53) = vinfor(53) + emps(ji,jj)*aire(ji,jj) * 1.e-12_wp !salt flux 
     115               vinfor(53) = vinfor(53) + sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp !salt flux 
    116116               vinfor(55) = vinfor(55) + fsbri(ji,jj)*aire(ji,jj) * 1.e-12_wp !brine drainage flux 
    117117               vinfor(57) = vinfor(57) + fseqv(ji,jj)*aire(ji,jj) * 1.e-12_wp !equivalent salt flux 
     
    264264               vinfor(32) = vinfor(32) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + &  
    265265                  v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12 !ice vel 
    266                vinfor(54) = vinfor(54) + at_i(ji,jj)*emps(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Total salt flux 
     266               vinfor(54) = vinfor(54) + at_i(ji,jj)*sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp ! Total salt flux 
    267267               vinfor(56) = vinfor(56) + at_i(ji,jj)*fsbri(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Brine drainage salt flux 
    268268               vinfor(58) = vinfor(58) + at_i(ji,jj)*fseqv(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Equivalent salt flux 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90

    r3294 r3402  
    15451545               !                               rhoic * v_i(ji,jj,jl) / rdt_ice 
    15461546 
    1547                !           emps(i,j)      = emps(i,j)      + xtmp 
     1547               !           sfx (i,j)      = sfx (i,j)      + xtmp 
    15481548               !           fsalt_hist(i,j) = fsalt_hist(i,j) + xtmp 
    15491549 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r3294 r3402  
    8686      !!              - qns     : sea heat flux: non solar 
    8787      !!              - emp     : freshwater budget: volume flux  
    88       !!              - emps    : freshwater budget: concentration/dillution  
     88      !!              - sfx     : freshwater budget: concentration/dillution  
    8989      !!              - fr_i    : ice fraction 
    9090      !!              - tn_ice  : sea-ice surface temperature 
     
    263263 
    264264      IF( num_sal == 2 ) THEN      ! variable ice salinity: brine drainage included in the salt flux 
    265          emps(:,:) = fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) 
     265         sfx (:,:) = fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) 
    266266      ELSE                         ! constant ice salinity: 
    267          emps(:,:) =              fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) 
     267         sfx (:,:) =              fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:) 
    268268      ENDIF 
    269269 
     
    285285      IF(ln_ctl) THEN 
    286286         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' ) 
    287          CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps, clinfo2=' emps    : ' ) 
     287         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=sfx , clinfo2=' sfx     : ' ) 
    288288         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' ) 
    289289         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl ) 
     
    402402         END WHERE 
    403403      ENDIF 
     404      !                                      ! embedded sea ice 
     405      IF( nn_ice_embd /= 0 ) THEN            ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 
     406         snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
     407         snwice_mass_b(:,:) = snwice_mass(:,:) 
     408      ELSE 
     409         snwice_mass  (:,:) = 0.e0           ! no mass exchanges 
     410         snwice_mass_b(:,:) = 0.e0           ! no mass exchanges 
     411      ENDIF 
     412      IF( nn_ice_embd == 2 .AND.             ! full embedment (case 2) & no restart :  
     413         &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh belew sea-ice area 
     414         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
     415         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     416      ENDIF 
    404417      ! 
    405418   END SUBROUTINE lim_sbc_init 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90

    r2715 r3402  
    111111         zcmo(ji,jj,13) = qns(ji,jj) 
    112112         ! See thersf for the coefficient 
    113          zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
     113         zcmo(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
    114114         zcmo(ji,jj,15) = utau_ice(ji,jj) 
    115115         zcmo(ji,jj,16) = vtau_ice(ji,jj) 
     
    154154               rcmoy(ji,jj,13) = qns(ji,jj) 
    155155               ! See thersf for the coefficient 
    156                rcmoy(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
     156               rcmoy(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 
    157157               rcmoy(ji,jj,15) = utau_ice(ji,jj) 
    158158               rcmoy(ji,jj,16) = vtau_ice(ji,jj) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/ASM/asmtrj.F90

    r3294 r3402  
    213213         !                                   ! Output trajectory fields 
    214214         CALL iom_rstput( it, it, inum, 'emp'   , emp    ) 
    215          CALL iom_rstput( it, it, inum, 'emps'  , emps   ) 
     215         CALL iom_rstput( it, it, inum, 'sfx'   , sfx    ) 
    216216         CALL iom_rstput( it, it, inum, 'un'    , un     ) 
    217217         CALL iom_rstput( it, it, inum, 'vn'    , vn     ) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r3294 r3402  
    546546      CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf )   , ndim_hT, ndex_hT )   ! upward water flux 
    547547!!$      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    548       CALL histwrite( nid_T, "sowaflcd", it, ( emps-rnf )  , ndim_hT, ndex_hT )   ! c/d water flux 
    549       zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     548      CALL histwrite( nid_T, "sowaflcd", it, ( sfx -rnf )  , ndim_hT, ndex_hT )   ! c/d water flux 
     549      zw2d(:,:) = ( sfx (:,:) - rnf(:,:) ) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    550550      CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux 
    551551      CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r3294 r3402  
    5454    !!  level 14: qct(:,:)                 equivalent flux due to treshold SST 
    5555    !!  level 15: fbt(:,:)                 feedback term . 
    56     !!  level 16: ( emps(:,:) - rnf(:,:) ) concentration/dilution water flux 
     56    !!  level 16: ( sfx (:,:) - rnf(:,:) ) concentration/dilution water flux 
    5757    !!  level 17: fsalt(:,:)               Ice=>ocean net freshwater 
    5858    !!  level 18: gps(:,:)                 the surface pressure (m). 
     
    6262    !! History:  OPA  ! 1997-02 ( Clipper Group ) dimg files 
    6363    !!            -   ! 2003-12 ( J.M. Molines) f90, mpp output for OPA9.0 
    64     !!   NEMO    1.0  ! 2005-05  (S. Theetten) add emps fsalt move gps spgu spgv 2 lines below 
     64    !!   NEMO    1.0  ! 2005-05  (S. Theetten) add sfx fsalt move gps spgu spgv 2 lines below 
    6565    !!            -   ! 2005-11  (V. Garnier) Surface pressure gradient organization 
    6666    !!---------------------------------------------------------------------- 
     
    172172       !        fsel(:,:,14) = fsel(:,:,14) + qct(:,:) 
    173173       !        fsel(:,:,15) = fsel(:,:,15) + fbt(:,:) 
    174        fsel(:,:,16) = fsel(:,:,16) + ( emps(:,:)-rnf(:,:) )  
     174       fsel(:,:,16) = fsel(:,:,16) + ( sfx (:,:)-rnf(:,:) )  
    175175       ! 
    176176       ! Output of dynamics and tracer fields and selected fields 
     
    240240          !         fsel(:,:,14) =  qct(:,:) 
    241241          !         fsel(:,:,15) =  fbt(:,:) 
    242           fsel(:,:,16) = ( emps(:,:)-rnf(:,:) ) * tmask(:,:,1)  
     242          fsel(:,:,16) = ( sfx (:,:)-rnf(:,:) ) * tmask(:,:,1)  
    243243          ! 
    244244          !         qct(:,:) = 0._wp 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90

    r2715 r3402  
    173173      !!      put as run-off in open ocean. 
    174174      !! 
    175       !! ** Action  :   emp, emps   updated surface freshwater fluxes at kt 
     175      !! ** Action  :   emp   updated surface freshwater flux at kt 
    176176      !!---------------------------------------------------------------------- 
    177177      INTEGER, INTENT(in) ::   kt   ! ocean model time step 
     
    214214      ENDIF 
    215215      !                                                   !--------------------! 
    216       !                                                   !  update emp, emps  ! 
     216      !                                                   !  update emp        ! 
    217217      zfwf = 0.e0                                         !--------------------! 
    218218      DO jc = 1, jpncs 
     
    236236            ! water/evap excess is shared by all open ocean 
    237237            emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
    238             emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    239238         ELSEIF( ncstt(jc) == 1 ) THEN  
    240239            ! Excess water in open sea, at outflow location, excess evap shared 
     
    247246                      emp (ji,jj) = emp (ji,jj) + zfwf(jc) /   & 
    248247                         (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj)) 
    249                       emps(ji,jj) = emps(ji,jj) + zfwf(jc) /   & 
    250                           (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj)) 
    251248                  END IF  
    252249                END DO  
    253250            ELSE  
    254251                emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
    255                 emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    256252            ENDIF 
    257253         ELSEIF( ncstt(jc) == 2 ) THEN  
     
    264260                  emp (ji,jj) = emp (ji,jj) + zfwf(jc)   & 
    265261                      / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) ) 
    266                   emps(ji,jj) = emps(ji,jj) + zfwf(jc)   & 
    267                       / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) ) 
    268262                END DO  
    269263            ENDIF  
     
    273267            DO ji = ncsi1(jc), ncsi2(jc) 
    274268               emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 
    275                emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc) 
    276269            END DO   
    277270         END DO  
     
    280273      ! 
    281274      CALL lbc_lnk( emp , 'T', 1. ) 
    282       CALL lbc_lnk( emps, 'T', 1. ) 
    283275      ! 
    284276   END SUBROUTINE sbc_clo 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r3322 r3402  
    8181      ! 
    8282      INTEGER  ::   ji, jj, jk                             ! dummy loop indices 
    83       REAL(wp) ::   z2dt, zg_2                             ! temporary scalar 
     83      REAL(wp) ::   z2dt, zg_2, zintp, zgrau0r             ! temporary scalar 
    8484      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
     85      REAL(wp), POINTER, DIMENSION(:,:)   ::  zpice 
    8586      !!---------------------------------------------------------------------- 
    8687      ! 
     
    117118            END DO 
    118119         END DO 
     120      ENDIF 
     121 
     122      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: Pressure gradient due to snow-ice mass ==! 
     123         CALL wrk_alloc( jpi, jpj, zpice ) 
     124         !                                             
     125         zintp = REAL( MOD( kt-1, nn_fsbc ) ) / REAL( nn_fsbc ) 
     126         zgrau0r     = - grav * r1_rau0 
     127         zpice(:,:) = (  zintp * snwice_mass(:,:) + ( 1.- zintp ) * snwice_mass_b(:,:)  ) * zgrau0r 
     128         DO jj = 2, jpjm1 
     129            DO ji = fs_2, fs_jpim1   ! vector opt. 
     130               spgu(ji,jj) = ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 
     131               spgv(ji,jj) = ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 
     132            END DO 
     133         END DO 
     134         DO jk = 1, jpkm1                             ! Add the surface pressure trend to the general trend 
     135            DO jj = 2, jpjm1 
     136               DO ji = fs_2, fs_jpim1   ! vector opt. 
     137                  ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 
     138                  va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 
     139               END DO 
     140            END DO 
     141         END DO 
     142         ! 
     143         CALL wrk_dealloc( jpi, jpj, zpice ) 
    119144      ENDIF 
    120145 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90

    r3294 r3402  
    9494   ! finally, arrays corresponding to different ice categories 
    9595   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   a_i                !: category ice fraction 
    96    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   topmelt           !: category topmelt 
    97    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   botmelt           !: category botmelt 
     96   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   topmelt            !: category topmelt 
     97   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   botmelt            !: category botmelt 
    9898#endif 
    9999 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r3294 r3402  
    4040   LOGICAL , PUBLIC ::   ln_apr_dyn  = .FALSE.   !: Atmospheric pressure forcing used on dynamics (ocean & ice) 
    4141   INTEGER , PUBLIC ::   nn_ice      = 0         !: flag on ice in the surface boundary condition (=0/1/2/3) 
     42   INTEGER , PUBLIC ::   nn_ice_embd = 0         !: flag on ice embedding in the ocean (fully/partially/levitating) (=0/1/2) 
    4243   INTEGER , PUBLIC ::   nn_fwb      = 0         !: FreshWater Budget:  
    4344   !                                             !:  = 0 unchecked  
     
    6162   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qns_tot           !: total non solar heat flux (over sea and ice) [W/m2] 
    6263   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp    , emp_b    !: freshwater budget: volume flux               [Kg/m2/s] 
    63    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emps   , emps_b   !: freshwater budget: concentration/dillution   [Kg/m2/s] 
     64   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx    , emps_b   !: freshwater budget: salt flux                 [Kg/m2/s] 
    6465   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp_tot           !: total E-P over ocean and ice                 [Kg/m2/s] 
    6566   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff   [Kg/m2/s]   
     
    108109         &      qsr_tot(jpi,jpj) , qsr   (jpi,jpj) ,                        & 
    109110         &      emp    (jpi,jpj) , emp_b (jpi,jpj) ,                        & 
    110          &      emps   (jpi,jpj) , emps_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) ) 
     111         &      sfx    (jpi,jpj) , emps_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) ) 
    111112         ! 
    112113      ALLOCATE( rnf  (jpi,jpj) , sbc_tsc  (jpi,jpj,jpts) , qsr_hc  (jpi,jpj,jpk) ,     & 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90

    r3396 r3402  
    9090         ! 
    9191         emp (:,:) = rn_emp0 
     92         sfx (:,:) = 0.0_wp 
    9293         qns (:,:) = rn_qns0 - emp(:,:) * sst_m(:,:) * rcp      ! including heat content associated with mass flux at SST 
    9394         qsr (:,:) = rn_qsr0 
     
    129130      !! 
    130131      !! ** Action  : - set the ocean surface boundary condition, i.e.    
    131       !!                   utau, vtau, taum, wndm, qns, qsr, emp 
     132      !!                   utau, vtau, taum, wndm, qns, qsr, emp, sfx 
    132133      !! 
    133134      !! Reference : Hazeleger, W., and S. Drijfhout, JPO, 30, 677-695, 2000. 
     
    224225      ! freshwater (mass flux) and update of qns with heat content of emp 
    225226      emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1)        ! freshwater flux (=0 in domain average) 
     227      sfx (:,:) = 0.0_wp                                   ! no salt flux 
    226228      qns (:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp   ! evap and precip are at SST 
    227229 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90

    r3396 r3402  
    118118      !!              - qsr         solar heat flux 
    119119      !!              - emp         upward mass flux (evap. - precip) 
     120      !!              - sfx         salt flux; set to zero at nit000 but possibly non-zero 
     121      !!                            if ice is present (computed in limsbc(_2).F90) 
    120122      !!---------------------------------------------------------------------- 
    121123      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
     
    172174         ALLOCATE( sbudyko(jpi,jpj) , stauc(jpi,jpj), STAT=ierr3 ) 
    173175         IF( ierr3 > 0 )   CALL ctl_stop( 'STOP', 'sbc_blk_clio: unable to allocate arrays' ) 
     176         ! 
     177         sfx(:,:) = 0.0_wp                      ! salt flux; zero unless ice is present (computed in limsbc(_2).F90) 
    174178         ! 
    175179      ENDIF 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r3396 r3402  
    111111      !!              - utau, vtau  i- and j-component of the wind stress 
    112112      !!              - taum, wndm  wind stress and 10m wind modules at T-point 
    113       !!              - qns, qsr    non-solar and solar heat flux 
     113      !!              - qns, qsr    non-solar and solar heat fluxes 
    114114      !!              - emp         upward mass flux (evapo. - precip.) 
     115      !!              - sfx         salt flux due to freezing/melting (non-zero only if ice is present) 
     116      !!                            (set in limsbc(_2).F90) 
    115117      !!---------------------------------------------------------------------- 
    116118      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     
    177179         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' ) 
    178180         ! 
    179       ENDIF 
    180  
    181       CALL fld_read( kt, nn_fsbc, sf )        ! input fields provided at the current time-step 
    182  
    183       !                                                        ! surface ocean fluxes computed with CLIO bulk formulea 
     181         sfx(:,:) = 0.0_wp                         ! salt flux; zero unless ice is present (computed in limsbc(_2).F90) 
     182         ! 
     183      ENDIF 
     184 
     185      CALL fld_read( kt, nn_fsbc, sf )             ! input fields provided at the current time-step 
     186 
     187      !                                            ! compute the surface ocean fluxes using CORE bulk formulea 
    184188      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 
    185189 
     
    248252      zcoef_qsatw = 0.98 * 640380. / rhoa 
    249253       
    250       zst(:,:) = pst(:,:) + rt0      ! converte Celcius to Kelvin (and set minimum value far above 0 K) 
     254      zst(:,:) = pst(:,:) + rt0      ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 
    251255 
    252256      ! ----------------------------------------------------------------------------- ! 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90

    r3294 r3402  
    8484      !!              - wndm        10m wind module at T-point 
    8585      !!              - qns, qsr    non-slor and solar heat flux 
    86       !!              - emp, emps   evaporation minus precipitation 
     86      !!              - emp         evaporation minus precipitation 
    8787      !!---------------------------------------------------------------------- 
    8888      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  sh_now   ! specific humidity at T-point  
     
    258258           emp (:,:) = evap(:,:) - sf(jp_prec)%fnow(:,:,1) * tmask(:,:,1) 
    259259!CDIR COLLAPSE 
    260            emps(:,:) = emp(:,:) 
    261260 
    262261         CALL iom_put( "qlw_oce",   qbw  )                 ! output downward longwave heat over the ocean 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r3401 r3402  
    823823         !                                                   ! ========================= ! 
    824824         ! 
    825          !                                                       ! total freshwater fluxes over the ocean (emp, emps) 
     825         !                                                       ! total freshwater fluxes over the ocean (emp, sfx ) 
    826826         SELECT CASE( TRIM( sn_rcv_emp%cldes ) )                                    ! evaporation - precipitation 
    827827         CASE( 'conservative' ) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90

    r3396 r3402  
    7070      !!              - qsr         solar heat flux 
    7171      !!              - emp         upward mass flux (evap. - precip.) 
     72      !!              - sfx         salt flux; set to zero at nit000 but possibly non-zero 
     73      !!                            if ice is present (computed in limsbc(_2).F90) 
    7274      !!---------------------------------------------------------------------- 
    7375      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     
    120122         !                                         ! fill sf with slf_i and control print 
    121123         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_flx', 'flux formulation for ocean surface boundary condition', 'namsbc_flx' ) 
     124         ! 
     125         sfx(:,:) = 0.0_wp                         ! salt flux due to freezing/melting (non-zero only if ice is present; set in limsbc(_2).F90) 
    122126         ! 
    123127      ENDIF 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r3396 r3402  
    5959      !!                =3 global mean of emp set to zero at each nn_fsbc time step 
    6060      !!                   & spread out over erp area depending its sign 
     61      !! Note: if sea ice is embedded it is taken into account when computing the budget  
    6162      !!---------------------------------------------------------------------- 
    6263      INTEGER, INTENT( in ) ::   kt       ! ocean time-step index 
     
    8889         ! 
    8990         area = glob_sum( e1e2t(:,:) )           ! interior global domain surface 
     91         ! 
     92#if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice  
     93         snwice_mass_b(:,:) = 0.e0               ! no sea-ice model is being used : no snow+ice mass 
     94         snwice_mass  (:,:) = 0.e0 
     95#endif 
     96         ! 
    9097      ENDIF 
    9198       
     
    96103         ! 
    97104         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    98             z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area   ! sum over the global domain 
     105            z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) -  snwice_fmass(:,:) ) ) / area   ! sum over the global domain 
    99106            zcoef = z_fwf * rcp 
    100107            emp(:,:) = emp(:,:) - z_fwf  
     
    119126         ikty = 365 * 86400 / rdttra(1)    !!bug  use of 365 days leap year or 360d year !!!!!!! 
    120127         IF( MOD( kt, ikty ) == 0 ) THEN 
    121             a_fwb_b = a_fwb 
    122             a_fwb   = glob_sum( e1e2t(:,:) * sshn(:,:) )   ! sum over the global domain 
     128            a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
     129                                                      ! sum over the global domain 
     130            a_fwb   = glob_sum( e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 
    123131            a_fwb   = a_fwb * 1.e+3 / ( area * 86400. * 365. )     ! convert in Kg/m3/s = mm/s 
    124132!!gm        !                                                      !!bug 365d year  
     
    148156            zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp  
    149157            zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) ) 
    150             !                                                  ! fwf global mean  
    151             z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area 
     158            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges)  
     159            z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - snwice_fmass(:,:) ) ) / area 
    152160            !             
    153161            IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r3294 r3402  
    107107      !! ** Action  : - time evolution of the CICE sea-ice model 
    108108      !!              - update all sbc variables below sea-ice: 
    109       !!                utau, vtau, qns , qsr, emp , emps 
     109      !!                utau, vtau, qns , qsr, emp , sfx  
    110110      !!--------------------------------------------------------------------- 
    111111      INTEGER, INTENT(in) ::   kt      ! ocean time step 
     
    480480! salinity calculation 
    481481      CALL cice2nemo(fresh_gbm,ztmp,'T', 1. ) 
    482       emps(:,:)=emp(:,:)-ztmp(:,:) 
     482      sfx (:,:)=emp(:,:)-ztmp(:,:) 
    483483! Note the 1000.0 is to convert from kg salt to g salt (needed for PSU) 
    484484      CALL cice2nemo(fsalt_gbm,ztmp,'T', 1. ) 
     
    486486         DO ji=1,jpi 
    487487            IF (sss_m(ji,jj).gt.0.0) THEN 
    488                emps(ji,jj)=emps(ji,jj)+ztmp(ji,jj)*1000.0/sss_m(ji,jj) 
     488               sfx (ji,jj)=sfx (ji,jj)+ztmp(ji,jj)*1000.0/sss_m(ji,jj) 
    489489            ENDIF 
    490490         ENDDO 
     
    494494! weight of the precip will affect the free surface even if it falls on the ice 
    495495! (same to the argument that freezing / melting of ice doesn't change the free surface)  
    496 ! Sublimation from the ice is treated in a similar way (included in emp but not emps 
     496! Sublimation from the ice is treated in a similar way (included in emp but not sfx  
    497497! 
    498498! This should not be done in the variable volume case 
     
    512512 
    513513      CALL lbc_lnk( emp , 'T', 1. ) 
    514       CALL lbc_lnk( emps , 'T', 1. ) 
     514      CALL lbc_lnk( sfx , 'T', 1. ) 
    515515 
    516516! Solar penetrative radiation and non solar surface heat flux 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90

    r3294 r3402  
    5151      !!                taum, wndm : remain unchanged 
    5252      !!                qns, qsr   : update heat flux below sea-ice 
    53       !!                emp, emps  : update freshwater flux below sea-ice 
     53      !!                emp, sfx   : update freshwater flux below sea-ice 
    5454      !!                fr_i       : update the ice fraction 
    5555      !!--------------------------------------------------------------------- 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r3294 r3402  
    8888      !! ** Action  : - time evolution of the LIM sea-ice model 
    8989      !!              - update all sbc variables below sea-ice: 
    90       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps 
     90      !!                utau, vtau, taum, wndm, qns , qsr, emp , sfx  
    9191      !!--------------------------------------------------------------------- 
    9292      INTEGER, INTENT(in) ::   kt      ! ocean time step 
     
    392392      DO jj = 1, jpj 
    393393         DO ji = 1, jpi 
    394             IF( ABS( emps(ji,jj) ) .GT. 1.0e-2 ) THEN 
     394            IF( ABS( sfx (ji,jj) ) .GT. 1.0e-2 ) THEN 
    395395               CALL lim_prt_state( ji, jj, 3, ' ALERTE 5 :   High salt flux ' ) 
    396396               DO jl = 1, jpl 
     
    644644        WRITE(numout,*) 
    645645        WRITE(numout,*) ' - Salt fluxes at bottom interface ***' 
    646         WRITE(numout,*) ' emps       : ', emps(ki,kj) 
     646        WRITE(numout,*) ' sfx        : ', sfx (ki,kj) 
    647647        WRITE(numout,*) ' emp        : ', emp(ki,kj) 
    648648        WRITE(numout,*) ' fsbri      : ', fsbri(ki,kj) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90

    r3294 r3402  
    8282      !! ** Action  : - time evolution of the LIM sea-ice model 
    8383      !!              - update all sbc variables below sea-ice: 
    84       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps 
     84      !!                utau, vtau, taum, wndm, qns , qsr, emp , sfx  
    8585      !!--------------------------------------------------------------------- 
    8686      INTEGER, INTENT(in) ::   kt      ! ocean time step 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r3396 r3402  
    8282      INTEGER ::   icpt   ! local integer 
    8383      !! 
    84       NAMELIST/namsbc/ nn_fsbc   , ln_ana , ln_flx  , ln_blk_clio, ln_blk_core, ln_cpl,   & 
    85          &             ln_blk_mfs, ln_apr_dyn, nn_ice , ln_dm2dc, ln_rnf, ln_ssr     , nn_fwb, ln_cdgw 
     84      NAMELIST/namsbc/ nn_fsbc   , ln_ana    , ln_flx,  ln_blk_clio, ln_blk_core, ln_cpl,   & 
     85         &             ln_blk_mfs, ln_apr_dyn, nn_ice,  nn_ice_embd, ln_dm2dc   , ln_rnf,   & 
     86         &             ln_ssr    , nn_fwb    , ln_cdgw 
    8687      !!---------------------------------------------------------------------- 
    8788 
     
    119120         WRITE(numout,*) '              Patm gradient added in ocean & ice Eqs.    ln_apr_dyn  = ', ln_apr_dyn 
    120121         WRITE(numout,*) '              ice management in the sbc (=0/1/2/3)       nn_ice      = ', nn_ice  
     122         WRITE(numout,*) '              ice-ocean embedded/levitating (=0/1/2)     nn_ice_embd = ', nn_ice_embd 
    121123         WRITE(numout,*) '              daily mean to diurnal cycle qsr            ln_dm2dc    = ', ln_dm2dc  
    122124         WRITE(numout,*) '              runoff / runoff mouths                     ln_rnf      = ', ln_rnf 
     
    134136         IF( sbc_rnf_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_rnf arrays' ) 
    135137         nkrnf         = 0 
    136          rnf     (:,:) = 0.e0 
    137          rnfmsk  (:,:) = 0.e0 
    138          rnfmsk_z(:)   = 0.e0 
     138         rnf     (:,:) = 0.0_wp 
     139         rnfmsk  (:,:) = 0.0_wp 
     140         rnfmsk_z(:)   = 0.0_wp 
    139141      ENDIF 
    140142      IF( nn_ice == 0  )   fr_i(:,:) = 0.e0        ! no ice in the domain, ice fraction is always zero 
    141143 
    142       emps(:,:) = 0.e0                             ! the salt flux will be computed (i.e. will be non-zero) only if  
    143       !                                            ! sea-ice is present, or lk_vvl=F, or surface salt restoring is used. 
     144      sfx(:,:) = 0.0_wp                            ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero)  
     145                                                   ! only if sea-ice is present 
    144146 
    145147      !                                            ! restartability    
     
    221223      !!                time step, i.e.   
    222224      !!                utau_b, vtau_b, qns_b, qsr_b, emp_n, emps_b, qrp_b, erp_b 
    223       !!                utau  , vtau  , qns  , qsr  , emp  , emps  , qrp  , erp 
     225      !!                utau  , vtau  , qns  , qsr  , emp  , sfx   , qrp  , erp 
    224226      !!              - updte the ice fraction : fr_i 
    225227      !!---------------------------------------------------------------------- 
     
    238240         ! qsr_b (:,:) = qsr (:,:) 
    239241         emp_b (:,:) = emp (:,:) 
    240          emps_b(:,:) = emps(:,:) 
     242         emps_b(:,:) = sfx(:,:) 
    241243      ENDIF 
    242244      !                                            ! ---------------------------------------- ! 
     
    256258                                                             
    257259      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition 
    258       !                                                  ! (i.e. utau,vtau, qns, qsr, emp, emps) 
     260      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx) 
    259261      CASE(  0 )   ;   CALL sbc_gyre    ( kt )                    ! analytical formulation : GYRE configuration 
    260262      CASE(  1 )   ;   CALL sbc_ana     ( kt )                    ! analytical formulation : uniform sbc 
     
    316318            ! qsr_b (:,:) = qsr (:,:) 
    317319            emp_b (:,:) = emp (:,:) 
    318             emps_b(:,:) = emps(:,:) 
     320            emps_b(:,:) = sfx(:,:) 
    319321         ENDIF 
    320322      ENDIF 
     
    332334         ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b'  , qsr  ) 
    333335         CALL iom_rstput( kt, nitrst, numrow, 'emp_b'  , emp  ) 
    334          CALL iom_rstput( kt, nitrst, numrow, 'emps_b' , emps ) 
     336         CALL iom_rstput( kt, nitrst, numrow, 'emps_b' , sfx ) 
    335337      ENDIF 
    336338 
     
    340342      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
    341343         CALL iom_put( "empmr" , emp  - rnf )                   ! upward water flux 
    342          CALL iom_put( "empsmr", emps - rnf )                   ! c/d water flux 
     344         CALL iom_put( "empsmr", sfx - rnf )                    ! c/d water flux 
    343345         CALL iom_put( "qt"    , qns  + qsr )                   ! total heat flux  
    344346         CALL iom_put( "qns"   , qns        )                   ! solar heat flux 
     
    357359         CALL prt_ctl(tab2d_1=fr_i             , clinfo1=' fr_i     - : ', mask1=tmask, ovlap=1 ) 
    358360         CALL prt_ctl(tab2d_1=(emp-rnf)        , clinfo1=' emp-rnf  - : ', mask1=tmask, ovlap=1 ) 
    359          CALL prt_ctl(tab2d_1=(emps-rnf)       , clinfo1=' emps-rnf - : ', mask1=tmask, ovlap=1 ) 
     361         CALL prt_ctl(tab2d_1=(sfx-rnf)        , clinfo1=' sfx-rnf - : ', mask1=tmask, ovlap=1 ) 
    360362         CALL prt_ctl(tab2d_1=qns              , clinfo1=' qns      - : ', mask1=tmask, ovlap=1 ) 
    361363         CALL prt_ctl(tab2d_1=qsr              , clinfo1=' qsr      - : ', mask1=tmask, ovlap=1 ) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90

    r3396 r3402  
    6363      !!              - at each nscb time step 
    6464      !!                   add a retroaction term on qns    (nn_sstr = 1) 
    65       !!                   add a damping term on emps       (nn_sssr = 1) 
    66       !!                   add a damping term on emp & emps (nn_sssr = 2) 
     65      !!                   add a damping term on sfx        (nn_sssr = 1) 
     66      !!                   add a damping term on emp       (nn_sssr = 2) 
    6767      !!--------------------------------------------------------------------- 
    6868      INTEGER, INTENT(in   ) ::   kt   ! ocean time step 
     
    168168            ENDIF 
    169169            ! 
    170             IF( nn_sssr == 1 ) THEN                                   !* Salinity damping term (salt flux only (emps)) 
     170            IF( nn_sssr == 1 ) THEN                                   !* Salinity damping term (salt flux only (sfx)) 
    171171               zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s] 
    172172!CDIR COLLAPSE 
     
    175175                     zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths 
    176176                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )  
    177                      emps(ji,jj) = emps(ji,jj) + zerp                 ! salt flux 
    178                      erp( ji,jj) = zerp / MAX( sss_m(ji,jj), 1.e-20 ) ! converted into an equivalent volume flux (diagnostic only) 
     177                     sfx(ji,jj) = sfx(ji,jj) + zerp                 ! salt flux 
     178                     erp(ji,jj) = zerp / MAX( sss_m(ji,jj), 1.e-20 ) ! converted into an equivalent volume flux (diagnostic only) 
    179179                  END DO 
    180180               END DO 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r3396 r3402  
    6161      !!      (3) Fwe, tracer carried with the water that is exchanged.  
    6262      !!            - salinity    : salt flux only due to freezing/melting 
    63       !!            sa = sa +  fsalt / rau0 / e3t  for k=1 
     63      !!            sa = sa +  sfx / rau0 / e3t  for k=1 
    6464      !! 
    6565      !!      Fext, flux through the air-sea interface for temperature and salt:  
     
    8989      !!         freezing/melting, thus: 
    9090      !!            sa = sa + emp * sn / rau0 / e3t   for k=1 
    91       !!                    + fsalt    / rau0 / e3t 
     91      !!                    + sfx    / rau0 / e3t 
    9292      !!         where emp, the surface freshwater budget (evaporation minus 
    9393      !!         precipitation minus runoff) given in kg/m2/s is divided 
    94       !!         by 1035 kg/m3 (density of ocena water) to obtain m/s.     
     94      !!         by rau0 = 1020 kg/m3 (density of sea water) to obtain m/s.     
    9595      !!         Note: even though Fwe does not appear explicitly for  
    9696      !!         temperature in this routine, the heat carried by the water 
     
    169169            DO ji = 1, jpi  
    170170               sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)                              ! non solar heat flux 
    171                sbc_tsc(ji,jj,jp_sal) = r1_rau0     * emps(ji,jj)                             ! salt flux (freezing/melting) 
     171               sbc_tsc(ji,jj,jp_sal) = r1_rau0     * sfx(ji,jj)                              ! salt flux due to freezing/melting 
    172172            END DO 
    173173         END DO 
    174       ELSE                                         ! Constant Volume case 
     174      ELSE                                         ! Constant Volume case ==>> Concentration dilution effect 
    175175         DO jj = 2, jpj 
    176176            DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    178178               sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)                          &   ! non solar heat flux 
    179179                  &                  + r1_rau0     * emp(ji,jj)  * tsn(ji,jj,1,jp_tem)       ! concent./dilut. effect 
    180                ! salinity    : salt flux + concent./dilut. effect (both in emps) 
    181                sbc_tsc(ji,jj,jp_sal) = r1_rau0  * (  emps(ji,jj)                         &   ! salt flux (freezing/melting) 
    182                   &                                + emp (ji,jj) * tsn(ji,jj,1,jp_sal) )     ! concent./dilut. effect 
     180               ! salinity    : salt flux + concent./dilut. effect (both in sfx) 
     181               sbc_tsc(ji,jj,jp_sal) = r1_rau0  * (  sfx(ji,jj)                          &   ! salt flux (freezing/melting) 
     182                  &                                + emp(ji,jj) * tsn(ji,jj,1,jp_sal) )      ! concent./dilut. effect 
    183183            END DO 
    184184         END DO 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90

    r3396 r3402  
    426426            zBosol(ji,jj) = grav * zthermal * qsr(ji,jj) 
    427427            ! Non radiative surface buoyancy force 
    428             zBo   (ji,jj) = grav * zthermal * qns(ji,jj) -  grav * zhalin * ( emps(ji,jj)-rnf(ji,jj) )  
     428            zBo   (ji,jj) = grav * zthermal * qns(ji,jj) -  grav * zhalin * ( emp(ji,jj)-rnf(ji,jj) )  & 
     429               &                                         -  grav * rbeta * rcs * sfx(ji,jj) 
    429430            ! Surface Temperature flux for non-local term 
    430431            wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* r1_rau0_rcp * tmask(ji,jj,1) 
    431432            ! Surface salinity flux for non-local term 
    432             ws0(ji,jj) = - ( ( emps(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal) * rcs ) * tmask(ji,jj,1)  
     433            ws0(ji,jj) = - ( ( emp(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal)                          & 
     434               &             + sfx(ji,jj)                                     ) * rcs * tmask(ji,jj,1)  
    433435         ENDDO 
    434436      ENDDO 
     
    13241326               DO ji = fs_2, fs_jpim1 
    13251327                  ! Surface tracer flux for non-local term  
    1326                   zflx = - ( emps(ji,jj) * tra(ji,jj,1,jn) * rcs ) * tmask(ji,jj,1) 
     1328                  zflx = - ( sfx (ji,jj) * tra(ji,jj,1,jn) * rcs ) * tmask(ji,jj,1) 
    13271329                  ! compute the trend 
    13281330                  ztra = - ( ghats(ji,jj,jk  ) * fsavs(ji,jj,jk  )   & 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/oce.F90

    r3294 r3402  
    4747   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   gru , grv    !: horizontal gradient of rd at bottom u-point 
    4848 
     49   !! arrays relating to embedding ice in the ocean. These arrays need to be declared  
     50   !! even if no ice model is required. In the no ice model or traditional levitating  
     51   !! ice cases they contain only zeros 
     52   !! --------------------- 
     53   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   snwice_mass        !: mass of snow and ice at current  ice time step   [Kg/m2] 
     54   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   snwice_mass_b      !: mass of snow and ice at previous ice time step   [Kg/m2] 
     55   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   snwice_fmass       !: time evolution of mass of snow+ice               [Kg/m2/s] 
     56 
    4957   !!---------------------------------------------------------------------- 
    5058   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    5866      !!                   ***  FUNCTION oce_alloc  *** 
    5967      !!---------------------------------------------------------------------- 
    60       INTEGER :: ierr(2) 
     68      INTEGER :: ierr(3) 
    6169      !!---------------------------------------------------------------------- 
    6270      ! 
     
    6977         &      rn2b (jpi,jpj,jpk)      , rn2  (jpi,jpj,jpk)                              , STAT=ierr(1) ) 
    7078         ! 
    71       ALLOCATE(rhd (jpi,jpj,jpk) ,                                         & 
    72          &     rhop(jpi,jpj,jpk) ,                                         & 
    73          &     sshb  (jpi,jpj)   , sshn  (jpi,jpj) , ssha  (jpi,jpj) ,     & 
    74          &     sshu_b(jpi,jpj)   , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) ,     & 
    75          &     sshv_b(jpi,jpj)   , sshv_n(jpi,jpj) , sshv_a(jpi,jpj) ,     & 
    76          &                         sshf_n(jpi,jpj) ,                       & 
    77          &     spgu  (jpi,jpj)   , spgv(jpi,jpj)   ,                       & 
    78          &     gtsu(jpi,jpj,jpts), gtsv(jpi,jpj,jpts),                     & 
    79          &     gru(jpi,jpj)      , grv(jpi,jpj)                      , STAT=ierr(2) ) 
     79      ALLOCATE( rhd (jpi,jpj,jpk) ,                                         & 
     80         &      rhop(jpi,jpj,jpk) ,                                         & 
     81         &      sshb  (jpi,jpj)   , sshn  (jpi,jpj) , ssha  (jpi,jpj) ,     & 
     82         &      sshu_b(jpi,jpj)   , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) ,     & 
     83         &      sshv_b(jpi,jpj)   , sshv_n(jpi,jpj) , sshv_a(jpi,jpj) ,     & 
     84         &                          sshf_n(jpi,jpj) ,                       & 
     85         &      spgu  (jpi,jpj)   , spgv(jpi,jpj)   ,                       & 
     86         &      gtsu(jpi,jpj,jpts), gtsv(jpi,jpj,jpts),                     & 
     87         &      gru(jpi,jpj)      , grv(jpi,jpj)                      , STAT=ierr(2) ) 
     88         ! 
     89      ALLOCATE( snwice_mass(jpi,jpj)  , snwice_mass_b(jpi,jpj),             & 
     90         &      snwice_fmass(jpi,jpj), STAT= ierr(3) ) 
    8091         ! 
    8192      oce_alloc = MAXVAL( ierr ) 
Note: See TracChangeset for help on using the changeset viewer.