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 3488 – NEMO

Changeset 3488


Ignore:
Timestamp:
2012-10-04T18:31:06+02:00 (12 years ago)
Author:
acc
Message:

Branch: dev_r3385_NOCS04_HAMF; #665. Stage 3 of 2012 development: Rationalisation of code. Added LIM3 changes, corrected coupled changes and highlighted areas of concern in CICE interface

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

Legend:

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

    r3414 r3488  
    221221            ! 
    222222            ! salt flux only       : add concentration dilution term in salt flux  and no  F-M term in volume flux 
    223             ! salt and mass fluxes : non concentartion dilution term in salt flux  and add F-M term in volume flux 
     223            ! salt and mass fluxes : non concentration dilution term in salt flux  and add F-M term in volume flux 
    224224            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) 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r3419 r3488  
    3434   USE prtctl           ! Print control 
    3535   USE cpl_oasis3, ONLY : lk_cpl 
    36    USE oce, ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass 
    37    USE dom_ice, ONLY : tms 
     36   USE oce,        ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n 
     37   USE dom_ice,    ONLY : tms 
    3838 
    3939   IMPLICIT NONE 
     
    395395      !!------------------------------------------------------------------- 
    396396      ! 
     397      INTEGER  ::   ji, jj                          ! dummy loop indices 
     398      REAL(wp) ::   zcoefu, zcoefv, zcoeff          ! local scalar 
    397399      IF(lwp) WRITE(numout,*) 
    398400      IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition' 
     
    422424         snwice_mass_b(:,:) = 0.0_wp         ! no mass exchanges 
    423425      ENDIF 
    424       IF( nn_ice_embd == 2 .AND.          &  ! full embedment (case 2) & no restart :  
    425          &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh belew sea-ice area 
     426      IF( nn_ice_embd == 2  .AND.         &  ! full embedment (case 2) & no restart 
     427         &  .NOT. ln_rstart ) THEN           ! deplete the initial ssh below sea-ice area 
    426428         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    427429         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     430         ! 
     431         ! Note: Changed the initial values of sshb and sshn=>  need to recompute ssh[u,v,f]_[b,n]  
     432         !       which were previously set in domvvl 
     433         IF ( lk_vvl ) THEN            ! Is this necessary? embd 2 should be restricted to vvl only??? 
     434            DO jj = 1, jpjm1 
     435               DO ji = 1, jpim1                    ! caution: use of Vector Opt. not possible 
     436                  zcoefu = 0.5  * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) ) 
     437                  zcoefv = 0.5  * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) ) 
     438                  zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1) 
     439                  sshu_b(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshb(ji  ,jj)     & 
     440                     &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) ) 
     441                  sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshb(ji,jj  )     & 
     442                     &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) ) 
     443                  sshu_n(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshn(ji  ,jj)     & 
     444                     &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) ) 
     445                  sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshn(ji,jj  )     & 
     446                     &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) ) 
     447               END DO 
     448            END DO 
     449            CALL lbc_lnk( sshu_b, 'U', 1. )   ;   CALL lbc_lnk( sshu_n, 'U', 1. ) 
     450            CALL lbc_lnk( sshv_b, 'V', 1. )   ;   CALL lbc_lnk( sshv_n, 'V', 1. ) 
     451            DO jj = 1, jpjm1 
     452               DO ji = 1, jpim1      ! NO Vector Opt. 
     453                  sshf_n(ji,jj) = 0.5  * umask(ji,jj,1) * umask(ji,jj+1,1)                   & 
     454                       &               / ( e1f(ji,jj  ) * e2f(ji,jj  ) )                     & 
     455                       &               * ( e1u(ji,jj  ) * e2u(ji,jj  ) * sshu_n(ji,jj  )     & 
     456                       &                 + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) ) 
     457               END DO 
     458            END DO 
     459            CALL lbc_lnk( sshf_n, 'F', 1. ) 
     460          ENDIF 
    428461      ENDIF 
    429462      ! 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r3419 r3488  
    372372         CALL histdef( nid_T, "sossheig", "Sea Surface Height"                 , "m"      ,   &  ! ssh 
    373373            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    374 !!$#if defined key_lim3 || defined key_lim2  
    375 !!$         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
    376 !!$         !    internal damping to Levitus that can be diagnosed from others 
    377 !!$         ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 
    378 !!$         CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater"          , "kg/m2/s",   &  ! fsalt 
    379 !!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    380 !!$         CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater"        , "kg/m2/s",   &  ! fmass 
    381 !!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    382 !!$#endif 
     374>>>>>>>>>>> 
     375      CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf )   , ndim_hT, ndex_hT )   ! upward water flux 
     376      CALL histwrite( nid_T, "sosfldow", it, sfx           , ndim_hT, ndex_hT )   ! downward salt flux  
     377                                                                                  ! (includes virtual salt flux beneath ice  
     378                                                                                  ! in linear free surface case) 
     379#if ! defined key_vvl 
     380      zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) * tmask(:,:,1) 
     381      CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT )             ! c/d term on sst 
     382      zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     383      CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT )             ! c/d term on sss 
     384#endif 
     385<<<<<<<<<< 
    383386         CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! (emp-rnf) 
    384387            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    385 !!$         CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
    386 !!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    387          CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! (emps-rnf) 
     388         CALL histdef( nid_T, "sofldow", "downward salt flux"                  , "PSU/m2/s",  &  ! sfx 
    388389            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    389390         CALL histdef( nid_T, "sosalflx", "Surface Salt Flux"                  , "Kg/m2/s",   &  ! (emps-rnf) * sn 
     
    540541      CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal), ndim_hT, ndex_hT )   ! sea surface salinity 
    541542      CALL histwrite( nid_T, "sossheig", it, sshn          , ndim_hT, ndex_hT )   ! sea surface height 
    542 !!$#if  defined key_lim3 || defined key_lim2  
    543 !!$      CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
    544 !!$      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
    545 !!$#endif 
    546543      CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf )   , ndim_hT, ndex_hT )   ! upward water flux 
    547 !!$      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    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) 
    550       CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux 
     544      CALL histwrite( nid_T, "sosfldow", it, sfx           , ndim_hT, ndex_hT )   ! downward salt flux  
     545                                                                                  ! (includes virtual salt flux beneath ice  
     546                                                                                  ! in linear free surface case) 
     547#if ! defined key_vvl 
     548      zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) 
     549      CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT )             ! c/d term on sst 
     550      zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal) 
     551      CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT )             ! c/d term on sss 
     552#endif 
    551553      CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux 
    552554      CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90

    r3402 r3488  
    178178      ! 
    179179      INTEGER                     ::   ji, jj, jc, jn   ! dummy loop indices 
    180       REAL(wp)                    ::   zze2 
     180      REAL(wp)                    ::   zze2, zcoef, zcoef1 
    181181      REAL(wp), DIMENSION (jpncs) ::   zfwf  
    182182      !!---------------------------------------------------------------------- 
     
    235235         IF( ncstt(jc) == 0 ) THEN  
    236236            ! water/evap excess is shared by all open ocean 
    237             emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     237            zcoef  = zfwf(jc) / surf(jpncs+1) 
     238            zcoef1 = rcp * zcoef 
     239            emp(:,:) = emp(:,:) + zcoef 
     240            qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) 
    238241         ELSEIF( ncstt(jc) == 1 ) THEN  
    239242            ! Excess water in open sea, at outflow location, excess evap shared 
     
    244247                  IF (      ji > 1 .AND. ji < jpi   & 
    245248                      .AND. jj > 1 .AND. jj < jpj ) THEN  
    246                       emp (ji,jj) = emp (ji,jj) + zfwf(jc) /   & 
    247                          (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj)) 
     249                      zcoef  = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) ) 
     250                      zcoef1 = rcp * zcoef 
     251                      emp(ji,jj) = emp(ji,jj) + zcoef 
     252                      qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) 
    248253                  END IF  
    249254                END DO  
    250255            ELSE  
    251                 emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     256                zcoef  = zfwf(jc) / surf(jpncs+1) 
     257                zcoef1 = rcp * zcoef 
     258                emp(:,:) = emp(:,:) + zcoef 
     259                qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) 
    252260            ENDIF 
    253261         ELSEIF( ncstt(jc) == 2 ) THEN  
     
    258266                  ji = mi0(ncsir(jc,jn)) 
    259267                  jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 
    260                   emp (ji,jj) = emp (ji,jj) + zfwf(jc)   & 
    261                       / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) ) 
     268                  zcoef  = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) ) 
     269                  zcoef1 = rcp * zcoef 
     270                  emp(ji,jj) = emp(ji,jj) + zcoef 
     271                  qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) 
    262272                END DO  
    263273            ENDIF  
     
    266276         DO jj = ncsj1(jc), ncsj2(jc) 
    267277            DO ji = ncsi1(jc), ncsi2(jc) 
    268                emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 
     278               zcoef  = zfwf(jc) / surf(jc) 
     279               zcoef1 = rcp * zcoef 
     280               emp(ji,jj) = emp(ji,jj) - zcoef 
     281               qns(ji,jj) = qns(ji,jj) + zcoef1 * sst_m(ji,jj) 
    269282            END DO   
    270283         END DO  
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r3402 r3488  
    3939   LOGICAL , PUBLIC ::   ln_ssr      = .FALSE.   !: Sea Surface restoring on SST and/or SSS       
    4040   LOGICAL , PUBLIC ::   ln_apr_dyn  = .FALSE.   !: Atmospheric pressure forcing used on dynamics (ocean & ice) 
    41    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) 
     41   INTEGER , PUBLIC ::   nn_ice      = 0         !: flag for ice in the surface boundary condition (=0/1/2/3) 
     42   INTEGER , PUBLIC ::   nn_ice_embd = 0         !: flag for levitating/embedding sea-ice in the ocean 
     43   !                                             !: =0 levitating ice (no mass exchange, concentration/dilution effect) 
     44   !                                             !: =1 levitating ice with mass and salt exchange but no presure effect 
     45   !                                             !: =2 embedded sea-ice (full salt and mass exchanges and pressure) 
    4346   INTEGER , PUBLIC ::   nn_fwb      = 0         !: FreshWater Budget:  
    4447   !                                             !:  = 0 unchecked  
     
    6265   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qns_tot           !: total non solar heat flux (over sea and ice) [W/m2] 
    6366   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp    , emp_b    !: freshwater budget: volume flux               [Kg/m2/s] 
    64    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx    , emps_b   !: freshwater budget: salt flux                 [Kg/m2/s] 
     67   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx    , sfx_b    !: salt flux                                    [PSU/m2/s] 
    6568   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp_tot           !: total E-P over ocean and ice                 [Kg/m2/s] 
    6669   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff   [Kg/m2/s]   
     
    106109         &      vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , STAT=ierr(1) )  
    107110         ! 
    108       ALLOCATE( qns_tot(jpi,jpj) , qns   (jpi,jpj) , qns_b(jpi,jpj),        & 
    109          &      qsr_tot(jpi,jpj) , qsr   (jpi,jpj) ,                        & 
    110          &      emp    (jpi,jpj) , emp_b (jpi,jpj) ,                        & 
    111          &      sfx    (jpi,jpj) , emps_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) ) 
     111      ALLOCATE( qns_tot(jpi,jpj) , qns  (jpi,jpj) , qns_b(jpi,jpj),        & 
     112         &      qsr_tot(jpi,jpj) , qsr  (jpi,jpj) ,                        & 
     113         &      emp    (jpi,jpj) , emp_b(jpi,jpj) ,                        & 
     114         &      sfx    (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) ) 
    112115         ! 
    113116      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/sbccpl.F90

    r3402 r3488  
    11451145 
    11461146      zicefr(:,:) = 1.- p_frld(:,:) 
    1147       !! zcptn(:,:) = rcp * sst_m(:,:)                       !! safer to use instantaneous sst value in case coupling frequency does not match nn_fsbc frequency ?? 
    1148       zcptn(:,:) = rcp * tsn(:,:,1,jp_tem) 
     1147      zcptn(:,:) = rcp * sst_m(:,:) 
    11491148      ! 
    11501149      !                                                      ! ========================= ! 
     
    12411240      qns_tot(:,:) = qns_tot(:,:)                         &            ! qns_tot update over free ocean with: 
    12421241         &          - ztmp(:,:)                           &            ! remove the latent heat flux of solid precip. melting 
    1243          &          + (  emp_tot(:,:)                     &            ! remove the heat content of mass flux (assumed to be at SST) 
    1244          &             - emp_ice(:,:) * p_frld(:,:,1)  ) * zcptn(:,:)  
     1242         &          - (  emp_tot(:,:)                     &            ! remove the heat content of mass flux (assumed to be at SST) 
     1243         &             - emp_ice(:,:) * zicefr(:,:)  ) * zcptn(:,:)  
    12451244      IF( lk_diaar5 )   CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) )   ! heat flux from snow (cell average) 
    12461245!!gm 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r3402 r3488  
    106106            zcoef = z_fwf * rcp 
    107107            emp(:,:) = emp(:,:) - z_fwf  
    108             qns(:,:) = qns(:,:) + zcoef * sst_m(:,:)                          ! ensure fw correction does not change the heat budget 
     108            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    109109         ENDIF 
    110110         ! 
    111111      CASE ( 2 )                             !==  fwf budget adjusted from the previous year  ==! 
    112112         ! 
    113          IF( kt == nit000 ) THEN                   ! initialisation 
    114             !                                      ! Read the corrective factor on precipitations (fwfold) 
     113         IF( kt == nit000 ) THEN                      ! initialisation 
     114            !                                         ! Read the corrective factor on precipitations (fwfold) 
    115115            CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    116116            READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 
     
    138138            zcoef = fwfold * rcp 
    139139            emp(:,:) = emp(:,:) + fwfold 
    140             qns(:,:) = qns(:,:) - zcoef * sst_m(:,:)  ! ensure fw correction does not change the heat budget 
     140            qns(:,:) = qns(:,:) - zcoef * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    141141         ENDIF 
    142142         ! 
     
    180180            ! 
    181181            emp(:,:) = emp(:,:) + zerp_cor(:,:) 
    182             qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)   
     182            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    183183            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
    184184            ! 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r3402 r3488  
    137137 
    138138   END SUBROUTINE sbc_ice_cice 
     139 
    139140 
    140141   SUBROUTINE cice_sbc_init (nsbc) 
     
    477478      ENDIF 
    478479 
     480!! ACC this block needs attention. sfx has replaced emps but its meaning is now 
     481!! different. Need the equivalent of this block: 
     482!     SELECT CASE( nn_ice_embd )                 ! levitating or embedded sea-ice option 
     483!       CASE( 0    )   ;   zswitch = 1           ! (0) standard levitating sea-ice : salt exchange only 
     484!       CASE( 1, 2 )   ;   zswitch = 0           ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 
     485!                                                ! (2) embedded sea-ice : salt and volume fluxes and pressure 
     486!     END SELECT 
     487! 
     488!     sfx (ji,jj) = zfsalt +                  zswitch  * zcd   ! salt flux (+ C/D if no ice/ocean mass exchange) 
     489!     emp (ji,jj) = zemp   + zemp_snw + ( 1.- zswitch) * zfmm  ! mass flux (- F/M mass flux if no ice/ocean mass exchange) 
     490! 
     491! Here zfsalt is salt flux between ice and ocean due to freezing and melting (PSU/m2/s) 
     492!      zcd    is the virtual salt flux that appears in the standard levitating case only (0 otherwise) 
     493!             it generates a change in SSS equivalent to that which would occur if a true mass exchange happened 
     494!      zemp   is:  
     495!              in coupled mode:  net mass flux over the grid cell (ice+ocean area) minus the mass flux intercepted by sea-ice 
     496!              in forced  mode:  mass flux budget (emp) over open ocean fraction minus liquid precip. over the ice  
     497!                                (assumed to instantaneous drain into the ocean). 
     498!    zemp_snw is the snow melt that enters the ocean as pure water (no associated salt flux)  
     499!    zfmm     is freezing minus melting 
     500! 
     501! with zswitch = 1 ( nn_ice_embd = 0 ) the results should be equivalent to the original CICE code.  
     502 
     503!! 
    479504! Subtract fluxes from CICE to get freshwater equivalent flux used in  
    480505! salinity calculation 
     
    498523! This should not be done in the variable volume case 
    499524 
     525 
    500526      IF (.NOT. lk_vvl) THEN 
    501527 
     
    510536 
    511537      ENDIF 
     538!! ACC end of questionable code 
    512539 
    513540      CALL lbc_lnk( emp , 'T', 1. ) 
    514541      CALL lbc_lnk( sfx  , 'T', 1. ) 
    515542 
     543!! ACC Now the latent heat for snow melting is already accounted for in the bulk formulea and coupled interfaces. 
     544!!     For the non-solar heat flux, in LIM2, code changes were needed to account for the heat content of the mass exchanged  
     545!      between ice and ocean. It was not necessary to make changes for LIM3 since all mass exchanges are referenced to  
     546!      zero degrees; this is most likely to be the case in CICE too?? 
     547!!  
    516548! Solar penetrative radiation and non solar surface heat flux 
    517549 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r3402 r3488  
    1212   !!             -   ! 2010-10  (J. Chanut, C. Bricaud, G. Madec)  add the surface pressure forcing 
    1313   !!            3.4  ! 2011-11  (C. Harris) CICE added as an option 
     14   !!            3.5  ! 2012-11  (A. Coward, G. Madec) Rethink of heat, mass and salt surface fluxes 
    1415   !!---------------------------------------------------------------------- 
    1516 
     
    162163      IF( nn_ice == 4 .AND. ( .NOT. ( cp_cfg == 'orca' ) .OR. lk_agrif ) )   & 
    163164         &   CALL ctl_stop( 'CICE sea-ice model currently only available in a global ORCA configuration without AGRIF' ) 
     165      IF( nn_ice == 3 .AND. nn_ice_embd == 0 )   & 
     166         &   CALL ctl_stop( 'LIM3 sea-ice model requires nn_ice_embd = 2 or 3' ) 
    164167       
    165168      IF( ln_dm2dc )   nday_qsr = -1   ! initialisation flag 
     
    222225      !! ** Action  : - set the ocean surface boundary condition at before and now  
    223226      !!                time step, i.e.   
    224       !!                utau_b, vtau_b, qns_b, qsr_b, emp_n, emps_b, qrp_b, erp_b 
    225       !!                utau  , vtau  , qns  , qsr  , emp  , sfx   , qrp  , erp 
     227      !!                utau_b, vtau_b, qns_b, qsr_b, emp_n, sfx_b, qrp_b, erp_b 
     228      !!                utau  , vtau  , qns  , qsr  , emp  , sfx  , qrp  , erp 
    226229      !!              - updte the ice fraction : fr_i 
    227230      !!---------------------------------------------------------------------- 
     
    239242         ! The 3D heat content due to qsr forcing is treated in traqsr 
    240243         ! qsr_b (:,:) = qsr (:,:) 
    241          emp_b (:,:) = emp (:,:) 
    242          emps_b(:,:) = sfx(:,:) 
     244         emp_b(:,:) = emp(:,:) 
     245         sfx_b(:,:) = sfx(:,:) 
    243246      ENDIF 
    244247      !                                            ! ---------------------------------------- ! 
     
    308311            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b  )   ! before non solar heat flux (T-point) 
    309312            ! The 3D heat content due to qsr forcing is treated in traqsr 
    310             ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b  )   ! before     solar heat flux (T-point) 
    311             CALL iom_get( numror, jpdom_autoglo, 'emp_b' , emp_b  )   ! before     freshwater flux (T-point) 
    312             CALL iom_get( numror, jpdom_autoglo, 'emps_b', emps_b )   ! before C/D freshwater flux (T-point) 
     313            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b  ) ! before     solar heat flux (T-point) 
     314            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b  )    ! before     freshwater flux (T-point) 
     315            ! To ensure restart capability with 3.3x/3.4 restart files    !! to be removed in v3.6 
     316            IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 
     317               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b )  ! before salt flux (T-point) 
     318            ELSE 
     319               sfx_b (:,:) = sfx(:,:) 
     320            ENDIF 
    313321         ELSE                                                   !* no restart: set from nit000 values 
    314322            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields set to nit000' 
     
    316324            vtau_b(:,:) = vtau(:,:) 
    317325            qns_b (:,:) = qns (:,:) 
    318             ! qsr_b (:,:) = qsr (:,:) 
    319             emp_b (:,:) = emp (:,:) 
    320             emps_b(:,:) = sfx(:,:) 
     326            emp_b (:,:) = emp(:,:) 
     327            sfx_b (:,:) = sfx(:,:) 
    321328         ENDIF 
    322329      ENDIF 
     
    334341         ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b'  , qsr  ) 
    335342         CALL iom_rstput( kt, nitrst, numrow, 'emp_b'  , emp  ) 
    336          CALL iom_rstput( kt, nitrst, numrow, 'emps_b' , sfx ) 
     343         CALL iom_rstput( kt, nitrst, numrow, 'sfx_b' , sfx ) 
    337344      ENDIF 
    338345 
     
    342349      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
    343350         CALL iom_put( "empmr" , emp  - rnf )                   ! upward water flux 
    344          CALL iom_put( "empsmr", sfx - rnf )                    ! c/d water flux 
     351         CALL iom_put( "saltflx", sfx  )                        ! downward salt flux   
     352                                                                ! (includes virtual salt flux beneath ice  
     353                                                                ! in linear free surface case) 
    345354         CALL iom_put( "qt"    , qns  + qsr )                   ! total heat flux  
    346355         CALL iom_put( "qns"   , qns        )                   ! solar heat flux 
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r3402 r3488  
    183183            END DO 
    184184         END DO 
     185         CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) )                          ! c/d term on sst 
     186         CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) )                          ! c/d term on sss 
    185187      ENDIF 
    186188      ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff   
  • branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r3352 r3488  
    318318      IF( lk_bdy        )   CALL     tide_init      ! Open boundaries initialisation of tidal harmonic forcing 
    319319 
    320                             CALL flush(numout) 
    321320                            CALL dyn_nept_init  ! simplified form of Neptune effect 
    322                             CALL flush(numout) 
    323321 
    324322                            CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
Note: See TracChangeset for help on using the changeset viewer.