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

Changeset 3575


Ignore:
Timestamp:
2012-11-16T12:29:24+01:00 (11 years ago)
Author:
adani
Message:

ticket #998. Step 3: Add in changes from the trunk between revisions 3389 and 3521.

Location:
branches/2012/dev_INGV/NEMOGCM
Files:
2 deleted
23 edited
10 copied

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_INGV/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_pisces

    r3294 r3575  
    1616!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    1717   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F) 
    18    atcco2     =  287.    ! Constant value atmospheric pCO2 - ln_co2int = F 
     18   atcco2     =  280.    ! Constant value atmospheric pCO2 - ln_co2int = F 
    1919   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T 
    2020   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T 
     
    3535&nampisbio     !   biological parameters 
    3636!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    37    nrdttrc    =  1        ! time step frequency for biology 
     37   nrdttrc    =  4        ! time step frequency for biology 
    3838   wsbio      =  2.       ! POC sinking speed 
    39    xkmort     =  1.E-7    ! half saturation constant for mortality 
     39   xkmort     =  2.E-7    ! half saturation constant for mortality 
    4040   ferat3     =  10.E-6   ! Fe/C in zooplankton  
    4141   wsbio2     =  30.      ! Big particles sinking speed 
     
    4444&nampislim     !   parameters for nutrient limitations 
    4545!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    46    conc0      =  2.e-6    ! Phosphate half saturation 
     46   conc0      =  1.e-6    ! Phosphate half saturation 
    4747   conc1      =  8E-6     ! Phosphate half saturation for diatoms 
    48    conc2      =  2E-9     ! Iron half saturation for phyto 
    49    conc2m     =  4E-9     ! Max iron half saturation for phyto 
     48   conc2      =  1E-9     ! Iron half saturation for phyto 
     49   conc2m     =  3E-9     ! Max iron half saturation for phyto 
    5050   conc3      =  3E-9     ! Iron half saturation for diatoms 
    51    conc3m     =  9E-9     ! Maxi iron half saturation for diatoms 
    52    xsizedia   =  5.E-7    ! Minimum size criteria for diatoms 
     51   conc3m     =  8E-9     ! Maxi iron half saturation for diatoms 
     52   xsizedia   =  1.E-6    ! Minimum size criteria for diatoms 
    5353   xsizephy   =  1.E-6    ! Minimum size criteria for phyto 
    5454   concnnh4   =  1.E-7    ! NH4 half saturation for phyto 
    55    concdnh4   =  4.E-7    ! NH4 half saturation for diatoms 
     55   concdnh4   =  8.E-7    ! NH4 half saturation for diatoms 
    5656   xksi1      =  2.E-6    ! half saturation constant for Si uptake 
    5757   xksi2      =  3.33E-6  ! half saturation constant for Si/C 
    5858   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization 
    59    concfebac  =  3.E-11   ! Half-saturation for Fe limitation of Bacteria 
     59   concfebac  =  1.E-11   ! Half-saturation for Fe limitation of Bacteria 
    6060   qnfelim    =  7.E-6    ! Optimal quota of phyto 
    6161   qdfelim    =  7.E-6    ! Optimal quota of diatoms 
     
    6565&nampisprod     !   parameters for phytoplankton growth 
    6666!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    67    pislope    =  3.       ! P-I slope 
     67   pislope    =  2.       ! P-I slope 
    6868   pislope2   =  2.       ! P-I slope  for diatoms 
    6969   excret     =  0.05     ! excretion ratio of phytoplankton 
    7070   excret2    =  0.05     ! excretion ratio of diatoms 
    71    ln_newprod =  .false.  ! Enable new parame. of production (T/F)  
     71   ln_newprod =  .true.  ! Enable new parame. of production (T/F)  
    7272   bresp      =  0.00333  ! Basal respiration rate 
    7373   chlcnm     =  0.033    ! Minimum Chl/C in nanophytoplankton 
    74    chlcdm     =  0.04     ! Minimum Chl/C in diatoms 
     74   chlcdm     =  0.05     ! Minimum Chl/C in diatoms 
    7575   chlcmin    =  0.0033   ! Maximum Chl/c in phytoplankton 
    7676   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton 
     
    100100   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton  
    101101   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton  
    102    xthresh2phy = 2E-7     ! nanophyto feeding threshold for mesozooplankton  
     102   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton  
    103103   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton  
    104    xthresh2   =  0.       ! Food threshold for grazing 
     104   xthresh2   =  2E-7    ! Food threshold for grazing 
    105105   xkgraz2    =  20.E-6   ! half sturation constant for meso grazing 
    106    epsher2    =  0.33     ! Efficicency of Mesozoo growth 
     106   epsher2    =  0.3      ! Efficicency of Mesozoo growth 
    107107   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM 
    108108   unass2     =  0.3      ! non assimilated fraction of P by mesozoo 
    109    grazflux   =  3.e3     ! flux-feeding rate 
     109   grazflux   =  2.e3     ! flux-feeding rate 
    110110/ 
    111111!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    115115   grazrat    =  3.0      ! maximal zoo grazing rate 
    116116   resrat     =  0.03     ! exsudation rate of zooplankton 
    117    mzrat      =  0.0      ! zooplankton mortality rate 
     117   mzrat      =  0.001    ! zooplankton mortality rate 
    118118   xpref2c    =  0.1      ! Microzoo preference for POM 
    119119   xpref2p    =  1.       ! Microzoo preference for Nanophyto 
    120    xpref2d    =  0.6      ! Microzoo preference for Diatoms 
     120   xpref2d    =  0.5      ! Microzoo preference for Diatoms 
    121121   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton  
    122    xthreshphy =  2.E-7    ! Nanophyto feeding threshold for microzooplankton  
     122   xthreshphy =  1.E-8    ! Nanophyto feeding threshold for microzooplankton  
    123123   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton  
    124    xthresh    =  0.       ! Food threshold for feeding 
     124   xthresh    =  2.E-7    ! Food threshold for feeding 
    125125   xkgraz     =  20.E-6   ! half sturation constant for grazing 
    126    epsher     =  0.33     ! Efficiency of microzoo growth 
     126   epsher     =  0.3      ! Efficiency of microzoo growth 
    127127   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM 
    128128   unass      =  0.3      ! non assimilated fraction of phyto by zoo 
     
    160160   cn_dir      = './'      !  root directory for the location of the dynamical files 
    161161   ln_dust     =  .true.   ! boolean for dust input from the atmosphere 
    162    ln_river    =  .true.   ! boolean for river input of nutrients 
     162   ln_river    =  .false.   ! boolean for river input of nutrients 
    163163   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N 
    164164   ln_ironsed  =  .true.   ! boolean for Fe input from sediments 
  • branches/2012/dev_INGV/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_pisces

    r3294 r3575  
    1616!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    1717   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F) 
    18    atcco2     =  287.    ! Constant value atmospheric pCO2 - ln_co2int = F 
     18   atcco2     =  280.    ! Constant value atmospheric pCO2 - ln_co2int = F 
    1919   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T 
    2020   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T 
     
    3737   nrdttrc    =  4        ! time step frequency for biology 
    3838   wsbio      =  2.       ! POC sinking speed 
    39    xkmort     =  1.E-7    ! half saturation constant for mortality 
     39   xkmort     =  2.E-7    ! half saturation constant for mortality 
    4040   ferat3     =  10.E-6   ! Fe/C in zooplankton  
    4141   wsbio2     =  30.      ! Big particles sinking speed 
     
    4444&nampislim     !   parameters for nutrient limitations 
    4545!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    46    conc0      =  2.e-6    ! Phosphate half saturation 
     46   conc0      =  1.e-6    ! Phosphate half saturation 
    4747   conc1      =  8E-6     ! Phosphate half saturation for diatoms 
    48    conc2      =  2E-9     ! Iron half saturation for phyto 
    49    conc2m     =  4E-9     ! Max iron half saturation for phyto 
     48   conc2      =  1E-9     ! Iron half saturation for phyto 
     49   conc2m     =  3E-9     ! Max iron half saturation for phyto 
    5050   conc3      =  3E-9     ! Iron half saturation for diatoms 
    51    conc3m     =  9E-9     ! Maxi iron half saturation for diatoms 
    52    xsizedia   =  5.E-7    ! Minimum size criteria for diatoms 
     51   conc3m     =  8E-9     ! Maxi iron half saturation for diatoms 
     52   xsizedia   =  1.E-6    ! Minimum size criteria for diatoms 
    5353   xsizephy   =  1.E-6    ! Minimum size criteria for phyto 
    5454   concnnh4   =  1.E-7    ! NH4 half saturation for phyto 
    55    concdnh4   =  4.E-7    ! NH4 half saturation for diatoms 
     55   concdnh4   =  8.E-7    ! NH4 half saturation for diatoms 
    5656   xksi1      =  2.E-6    ! half saturation constant for Si uptake 
    5757   xksi2      =  3.33E-6  ! half saturation constant for Si/C 
    5858   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization 
    59    concfebac  =  3.E-11   ! Half-saturation for Fe limitation of Bacteria 
     59   concfebac  =  1.E-11   ! Half-saturation for Fe limitation of Bacteria 
    6060   qnfelim    =  7.E-6    ! Optimal quota of phyto 
    6161   qdfelim    =  7.E-6    ! Optimal quota of diatoms 
     
    6565&nampisprod     !   parameters for phytoplankton growth 
    6666!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    67    pislope    =  3.       ! P-I slope 
     67   pislope    =  2.       ! P-I slope 
    6868   pislope2   =  2.       ! P-I slope  for diatoms 
    6969   excret     =  0.05     ! excretion ratio of phytoplankton 
    7070   excret2    =  0.05     ! excretion ratio of diatoms 
    71    ln_newprod =  .false.  ! Enable new parame. of production (T/F)  
     71   ln_newprod =  .true.  ! Enable new parame. of production (T/F)  
    7272   bresp      =  0.00333  ! Basal respiration rate 
    7373   chlcnm     =  0.033    ! Minimum Chl/C in nanophytoplankton 
    74    chlcdm     =  0.04     ! Minimum Chl/C in diatoms 
     74   chlcdm     =  0.05     ! Minimum Chl/C in diatoms 
    7575   chlcmin    =  0.0033   ! Maximum Chl/c in phytoplankton 
    7676   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton 
     
    100100   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton  
    101101   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton  
    102    xthresh2phy = 2E-7     ! nanophyto feeding threshold for mesozooplankton  
     102   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton  
    103103   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton  
    104    xthresh2   =  0.       ! Food threshold for grazing 
     104   xthresh2   =  2E-7    ! Food threshold for grazing 
    105105   xkgraz2    =  20.E-6   ! half sturation constant for meso grazing 
    106    epsher2    =  0.33     ! Efficicency of Mesozoo growth 
     106   epsher2    =  0.3      ! Efficicency of Mesozoo growth 
    107107   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM 
    108108   unass2     =  0.3      ! non assimilated fraction of P by mesozoo 
    109    grazflux   =  3.e3     ! flux-feeding rate 
     109   grazflux   =  2.e3     ! flux-feeding rate 
    110110/ 
    111111!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    115115   grazrat    =  3.0      ! maximal zoo grazing rate 
    116116   resrat     =  0.03     ! exsudation rate of zooplankton 
    117    mzrat      =  0.0      ! zooplankton mortality rate 
     117   mzrat      =  0.001    ! zooplankton mortality rate 
    118118   xpref2c    =  0.1      ! Microzoo preference for POM 
    119119   xpref2p    =  1.       ! Microzoo preference for Nanophyto 
    120    xpref2d    =  0.6      ! Microzoo preference for Diatoms 
     120   xpref2d    =  0.5      ! Microzoo preference for Diatoms 
    121121   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton  
    122    xthreshphy =  2.E-7    ! Nanophyto feeding threshold for microzooplankton  
     122   xthreshphy =  1.E-8    ! Nanophyto feeding threshold for microzooplankton  
    123123   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton  
    124    xthresh    =  0.       ! Food threshold for feeding 
     124   xthresh    =  2.E-7    ! Food threshold for feeding 
    125125   xkgraz     =  20.E-6   ! half sturation constant for grazing 
    126    epsher     =  0.33     ! Efficiency of microzoo growth 
     126   epsher     =  0.3      ! Efficiency of microzoo growth 
    127127   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM 
    128128   unass      =  0.3      ! non assimilated fraction of phyto by zoo 
     
    160160   cn_dir      = './'      !  root directory for the location of the dynamical files 
    161161   ln_dust     =  .true.   ! boolean for dust input from the atmosphere 
    162    ln_river    =  .true.   ! boolean for river input of nutrients 
     162   ln_river    =  .false.   ! boolean for river input of nutrients 
    163163   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N 
    164164   ln_ironsed  =  .true.   ! boolean for Fe input from sediments 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OFF_SRC/domain.F90

    r2574 r3575  
    205205      rdtmax    = rn_rdtmin 
    206206      rdth      = rn_rdth 
    207       nclosea   = nn_closea 
    208207 
    209208      REWIND( numnam )             ! Namelist cross land advection 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r3298 r3575  
    773773            DO ib = 1, idx_bdy(ib_bdy)%nblenrim(igrd) 
    774774               nbi => idx_bdy(ib_bdy)%nbi(ib,igrd) 
    775                nbj => idx_bdy(ib_bdy)%nbi(ib,igrd) 
     775               nbj => idx_bdy(ib_bdy)%nbj(ib,igrd) 
    776776               flagu => idx_bdy(ib_bdy)%flagu(ib) 
    777777               bdysurftot = bdysurftot + hu     (nbi  , nbj)                           & 
     
    786786            DO ib = 1, idx_bdy(ib_bdy)%nblenrim(igrd) 
    787787               nbi => idx_bdy(ib_bdy)%nbi(ib,igrd) 
    788                nbj => idx_bdy(ib_bdy)%nbi(ib,igrd) 
     788               nbj => idx_bdy(ib_bdy)%nbj(ib,igrd) 
    789789               flagv => idx_bdy(ib_bdy)%flagv(ib) 
    790790               bdysurftot = bdysurftot + hv     (nbi, nbj  )                           & 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90

    r3294 r3575  
    3838  USE dianam          ! build name of file 
    3939  USE lib_mpp         ! distributed memory computing library 
    40 #if defined key_lim2 || defined key_lim3 
    41   USE ice 
     40#if defined key_lim2 
     41  USE ice_2 
     42#endif 
     43#if defined key_lim3 
     44  USE ice_3 
    4245#endif 
    4346  USE domvvl 
     
    362365              WRITE(numout,*)"      List of points in global domain:" 
    363366              DO jpt=1,iptglo 
    364                  WRITE(numout,*)'        # I J ',jpt,coordtemp(jpt) 
     367                 WRITE(numout,*)'        # I J ',jpt,coordtemp(jpt),directemp(jpt) 
    365368              ENDDO                   
    366369           ENDIF 
     
    403406 
    404407              IF(jsec==nn_secdebug .AND. secs(jsec)%nb_point .NE. 0)THEN 
    405               WRITE(narea+200,*)'avant secs(jsec)%nb_point iptloc ',secs(jsec)%nb_point,iptloc 
    406408              DO jpt = 1,iptloc 
    407409                 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 + nimpp - 1 
    408410                 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 + njmpp - 1 
    409                  WRITE(narea+200,*)'avant # I J : ',iiglo,ijglo 
    410411              ENDDO 
    411412              ENDIF 
     
    421422           ENDIF 
    422423           IF(jsec==nn_secdebug .AND. secs(jsec)%nb_point .NE. 0)THEN 
    423               WRITE(narea+200,*)'apres secs(jsec)%nb_point iptloc ',secs(jsec)%nb_point,iptloc 
    424424              DO jpt = 1,secs(jsec)%nb_point 
    425425                 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 + nimpp - 1 
    426426                 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 + njmpp - 1 
    427                  WRITE(narea+200,*)'apres # I J : ',iiglo,ijglo 
    428427              ENDDO 
    429428           ENDIF 
     
    626625        ELSE                                ; isgnv =  1 
    627626        ENDIF 
    628  
    629         IF( ld_debug )write(numout,*)"isgnu isgnv ",isgnu,isgnv 
     627        IF( sec%slopeSection .GE. 9999. )     isgnv =  1 
     628 
     629        IF( ld_debug )write(numout,*)"sec%slopeSection isgnu isgnv ",sec%slopeSection,isgnu,isgnv 
    630630 
    631631        !--------------------------------------! 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90

    r2715 r3575  
    77   !!             8.5  !  02-06  (E. Durand, G. Madec)  F90 
    88   !!             9.0  !  06-07  (G. Madec)  add clo_rnf, clo_ups, clo_bat 
     9   !!        NEMO 3.4  !  03-12  (P.G. Fogli) sbc_clo bug fix & mpp reproducibility 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    2021   USE in_out_manager  ! I/O manager 
    2122   USE sbc_oce         ! ocean surface boundary conditions 
    22    USE lib_mpp         ! distributed memory computing library 
    23    USE lbclnk          ! ??? 
     23   USE lib_fortran,    ONLY: glob_sum, DDPDD 
     24   USE lbclnk          ! lateral boundary condition - MPP exchanges 
     25   USE lib_mpp         ! MPP library 
     26   USE timing 
    2427 
    2528   IMPLICIT NONE 
     
    8588         SELECT CASE ( jp_cfg ) 
    8689         !                                           ! ======================= 
     90         CASE ( 1 )                                  ! ORCA_R1 configuration 
     91            !                                        ! ======================= 
     92            ncsnr(1)   = 1    ; ncstt(1)   = 0           ! Caspian Sea 
     93            ncsi1(1)   = 332  ; ncsj1(1)   = 203 
     94            ncsi2(1)   = 344  ; ncsj2(1)   = 235 
     95            ncsir(1,1) = 1    ; ncsjr(1,1) = 1 
     96            !                                         
     97            !                                        ! ======================= 
    8798         CASE ( 2 )                                  !  ORCA_R2 configuration 
    8899            !                                        ! ======================= 
     
    177188      INTEGER, INTENT(in) ::   kt   ! ocean model time step 
    178189      ! 
    179       INTEGER                     ::   ji, jj, jc, jn   ! dummy loop indices 
    180       REAL(wp)                    ::   zze2 
    181       REAL(wp), DIMENSION (jpncs) ::   zfwf  
    182       !!---------------------------------------------------------------------- 
    183       ! 
     190      INTEGER             ::   ji, jj, jc, jn   ! dummy loop indices 
     191      REAL(wp), PARAMETER ::   rsmall = 1.e-20_wp    ! Closed sea correction epsilon 
     192      REAL(wp)            ::   zze2, ztmp, zcorr     !  
     193      COMPLEX(wp)         ::   ctmp  
     194      REAL(wp), DIMENSION(jpncs) ::   zfwf   ! 1D workspace 
     195      !!---------------------------------------------------------------------- 
     196      ! 
     197      IF( nn_timing == 1 )  CALL timing_start('sbc_clo') 
    184198      !                                                   !------------------! 
    185199      IF( kt == nit000 ) THEN                             !  Initialisation  ! 
     
    189203         IF(lwp) WRITE(numout,*)'~~~~~~~' 
    190204 
    191          ! Total surface of ocean 
    192          surf(jpncs+1) = SUM( e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) 
    193  
    194          DO jc = 1, jpncs 
    195             surf(jc) =0.e0 
    196             DO jj = ncsj1(jc), ncsj2(jc) 
    197                DO ji = ncsi1(jc), ncsi2(jc) 
    198                   surf(jc) = surf(jc) + e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)      ! surface of closed seas 
     205         surf(:) = 0.e0_wp 
     206         ! 
     207         surf(jpncs+1) = glob_sum( e1e2t(:,:) )   ! surface of the global ocean 
     208         ! 
     209         !                                        ! surface of closed seas  
     210         IF( lk_mpp_rep ) THEN                         ! MPP reproductible calculation 
     211            DO jc = 1, jpncs 
     212               ctmp = CMPLX( 0.e0, 0.e0, wp ) 
     213               DO jj = ncsj1(jc), ncsj2(jc) 
     214                  DO ji = ncsi1(jc), ncsi2(jc) 
     215                     ztmp = e1e2t(ji,jj) * tmask_i(ji,jj) 
     216                     CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp ) 
     217                  END DO  
    199218               END DO  
    200             END DO  
    201          END DO  
    202          IF( lk_mpp )   CALL mpp_sum ( surf, jpncs+1 )       ! mpp: sum over all the global domain 
     219               IF( lk_mpp )   CALL mpp_sum( ctmp ) 
     220               surf(jc) = REAL(ctmp,wp) 
     221            END DO 
     222         ELSE                                          ! Standard calculation            
     223            DO jc = 1, jpncs 
     224               DO jj = ncsj1(jc), ncsj2(jc) 
     225                  DO ji = ncsi1(jc), ncsi2(jc) 
     226                     surf(jc) = surf(jc) + e1e2t(ji,jj) * tmask_i(ji,jj)      ! surface of closed seas 
     227                  END DO  
     228               END DO  
     229            END DO  
     230            IF( lk_mpp )   CALL mpp_sum ( surf, jpncs )       ! mpp: sum over all the global domain 
     231         ENDIF 
    203232 
    204233         IF(lwp) WRITE(numout,*)'     Closed sea surfaces' 
     
    215244      !                                                   !--------------------! 
    216245      !                                                   !  update emp, emps  ! 
    217       zfwf = 0.e0                                         !--------------------! 
    218       DO jc = 1, jpncs 
    219          DO jj = ncsj1(jc), ncsj2(jc) 
    220             DO ji = ncsi1(jc), ncsi2(jc) 
    221                zfwf(jc) = zfwf(jc) + e1t(ji,jj) * e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj)  
    222             END DO   
    223          END DO  
    224       END DO 
    225       IF( lk_mpp )   CALL mpp_sum ( zfwf(:) , jpncs )       ! mpp: sum over all the global domain 
     246      zfwf = 0.e0_wp                                      !--------------------! 
     247      IF( lk_mpp_rep ) THEN                         ! MPP reproductible calculation 
     248         DO jc = 1, jpncs 
     249            ctmp = CMPLX( 0.e0, 0.e0, wp ) 
     250            DO jj = ncsj1(jc), ncsj2(jc) 
     251               DO ji = ncsi1(jc), ncsi2(jc) 
     252                  ztmp = e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj) 
     253                  CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp ) 
     254               END DO   
     255            END DO  
     256            IF( lk_mpp )   CALL mpp_sum( ctmp ) 
     257            zfwf(jc) = REAL(ctmp,wp) 
     258         END DO 
     259      ELSE                                          ! Standard calculation            
     260         DO jc = 1, jpncs 
     261            DO jj = ncsj1(jc), ncsj2(jc) 
     262               DO ji = ncsi1(jc), ncsi2(jc) 
     263                  zfwf(jc) = zfwf(jc) + e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj)  
     264               END DO   
     265            END DO  
     266         END DO 
     267         IF( lk_mpp )   CALL mpp_sum ( zfwf(:) , jpncs )       ! mpp: sum over all the global domain 
     268      ENDIF 
    226269 
    227270      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN      ! Black Sea case for ORCA_R2 configuration 
    228          zze2    = ( zfwf(3) + zfwf(4) ) / 2. 
     271         zze2    = ( zfwf(3) + zfwf(4) ) * 0.5_wp 
    229272         zfwf(3) = zze2 
    230273         zfwf(4) = zze2 
    231274      ENDIF 
    232275 
     276      zcorr = 0._wp 
     277 
    233278      DO jc = 1, jpncs 
    234279         ! 
    235          IF( ncstt(jc) == 0 ) THEN  
    236             ! water/evap excess is shared by all open ocean 
    237             emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
    238             emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    239          ELSEIF( ncstt(jc) == 1 ) THEN  
    240             ! Excess water in open sea, at outflow location, excess evap shared 
    241             IF ( zfwf(jc) <= 0.e0 ) THEN  
    242                 DO jn = 1, ncsnr(jc) 
     280         ! The following if avoids the redistribution of the round off 
     281         IF ( ABS(zfwf(jc) / surf(jpncs+1) ) > rsmall) THEN 
     282            ! 
     283            IF( ncstt(jc) == 0 ) THEN           ! water/evap excess is shared by all open ocean 
     284               emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     285               emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
     286               ! accumulate closed seas correction 
     287               zcorr     = zcorr     + zfwf(jc) / surf(jpncs+1) 
     288               ! 
     289            ELSEIF( ncstt(jc) == 1 ) THEN       ! Excess water in open sea, at outflow location, excess evap shared 
     290               IF ( zfwf(jc) <= 0.e0_wp ) THEN  
     291                   DO jn = 1, ncsnr(jc) 
     292                     ji = mi0(ncsir(jc,jn)) 
     293                     jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 
     294                     IF (      ji > 1 .AND. ji < jpi   & 
     295                         .AND. jj > 1 .AND. jj < jpj ) THEN  
     296                         emp (ji,jj) = emp (ji,jj) + zfwf(jc) / ( REAL(ncsnr(jc)) * e1e2t(ji,jj) ) 
     297                         emps(ji,jj) = emps(ji,jj) + zfwf(jc) / ( REAL(ncsnr(jc)) * e1e2t(ji,jj) ) 
     298                     ENDIF  
     299                   END DO  
     300               ELSE  
     301                   emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
     302                   emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
     303                   ! accumulate closed seas correction 
     304                   zcorr     = zcorr     + zfwf(jc) / surf(jpncs+1) 
     305               ENDIF 
     306            ELSEIF( ncstt(jc) == 2 ) THEN       ! Excess e-p-r (either sign) goes to open ocean, at outflow location 
     307               DO jn = 1, ncsnr(jc) 
    243308                  ji = mi0(ncsir(jc,jn)) 
    244309                  jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 
    245                   IF (      ji > 1 .AND. ji < jpi   & 
    246                       .AND. jj > 1 .AND. jj < jpj ) THEN  
    247                       emp (ji,jj) = emp (ji,jj) + zfwf(jc) /   & 
    248                          (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)) 
    251                   END IF  
    252                 END DO  
    253             ELSE  
    254                 emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 
    255                 emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 
    256             ENDIF 
    257          ELSEIF( ncstt(jc) == 2 ) THEN  
    258             ! Excess e-p+r (either sign) goes to open ocean, at outflow location 
    259             IF(      ji > 1 .AND. ji < jpi    & 
    260                .AND. jj > 1 .AND. jj < jpj ) THEN  
    261                 DO jn = 1, ncsnr(jc) 
    262                   ji = mi0(ncsir(jc,jn)) 
    263                   jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 
    264                   emp (ji,jj) = emp (ji,jj) + zfwf(jc)   & 
    265                       / (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) ) 
    268                 END DO  
     310                  IF(      ji > 1 .AND. ji < jpi    & 
     311                     .AND. jj > 1 .AND. jj < jpj ) THEN  
     312                     emp (ji,jj) = emp (ji,jj) + zfwf(jc) / ( REAL(ncsnr(jc)) *  e1e2t(ji,jj) ) 
     313                     emps(ji,jj) = emps(ji,jj) + zfwf(jc) / ( REAL(ncsnr(jc)) *  e1e2t(ji,jj) ) 
     314                  ENDIF  
     315               END DO  
    269316            ENDIF  
    270          ENDIF  
    271          ! 
    272          DO jj = ncsj1(jc), ncsj2(jc) 
    273             DO ji = ncsi1(jc), ncsi2(jc) 
    274                emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 
    275                emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc) 
    276             END DO   
    277          END DO  
    278          ! 
     317            ! 
     318            DO jj = ncsj1(jc), ncsj2(jc) 
     319               DO ji = ncsi1(jc), ncsi2(jc) 
     320                  emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 
     321                  emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc) 
     322               END DO   
     323            END DO  
     324            ! 
     325         END IF 
    279326      END DO  
    280       ! 
    281       CALL lbc_lnk( emp , 'T', 1. ) 
    282       CALL lbc_lnk( emps, 'T', 1. ) 
     327 
     328      IF ( ABS(zcorr) > rsmall ) THEN      ! remove the global correction from the closed seas 
     329         DO jc = 1, jpncs                  ! only if it is large enough 
     330            DO jj = ncsj1(jc), ncsj2(jc) 
     331               DO ji = ncsi1(jc), ncsi2(jc) 
     332                  emp (ji,jj) = emp (ji,jj) - zcorr 
     333                  emps(ji,jj) = emps(ji,jj) - zcorr 
     334               END DO   
     335             END DO  
     336          END DO 
     337      ENDIF 
     338      ! 
     339      emp (:,:) = emp (:,:) * tmask(:,:,1) 
     340      emps(:,:) = emps(:,:) * tmask(:,:,1) 
     341      ! 
     342      CALL lbc_lnk( emp , 'T', 1._wp ) 
     343      CALL lbc_lnk( emps, 'T', 1._wp ) 
     344      ! 
     345      IF( nn_timing == 1 )  CALL timing_stop('sbc_clo') 
    283346      ! 
    284347   END SUBROUTINE sbc_clo 
    285     
    286     
     348 
     349 
    287350   SUBROUTINE clo_rnf( p_rnfmsk ) 
    288351      !!--------------------------------------------------------------------- 
     
    308371               ii = mi0( ncsir(jc,jn) ) 
    309372               ij = mj0( ncsjr(jc,jn) ) 
    310                p_rnfmsk(ii,ij) = MAX( p_rnfmsk(ii,ij), 1.0 ) 
     373               p_rnfmsk(ii,ij) = MAX( p_rnfmsk(ii,ij), 1.0_wp ) 
    311374            END DO  
    312375         ENDIF  
     
    336399         DO jj = ncsj1(jc), ncsj2(jc) 
    337400            DO ji = ncsi1(jc), ncsi2(jc) 
    338                p_upsmsk(ji,jj) = 0.5            ! mixed upstream/centered scheme over closed seas 
     401               p_upsmsk(ji,jj) = 0.5_wp         ! mixed upstream/centered scheme over closed seas 
    339402            END DO  
    340403         END DO  
     
    374437   !!====================================================================== 
    375438END MODULE closea 
     439 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r3294 r3575  
    5252   REAL(wp), PUBLIC ::   rdtmax          !: maximum time step on tracers 
    5353   REAL(wp), PUBLIC ::   rdth            !: depth variation of tracer step 
    54    INTEGER , PUBLIC ::   nclosea         !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
    5554 
    5655   !                                                  !!! associated variables 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r3294 r3575  
    238238      rdtmax    = rn_rdtmin 
    239239      rdth      = rn_rdth 
    240       nclosea   = nn_closea 
    241240 
    242241      REWIND( numnam )              ! Namelist cross land advection 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r3294 r3575  
    422422            CALL iom_close( inum ) 
    423423            mbathy(:,:) = INT( bathy(:,:) ) 
    424             !                                                ! ===================== 
     424            ! 
    425425            IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration 
    426                !                                             ! ===================== 
     426               ! 
    427427               IF( nn_cla == 0 ) THEN 
    428428                  ii0 = 140   ;   ii1 = 140                  ! Gibraltar Strait open  
     
    454454            CALL iom_get  ( inum, jpdom_data, 'Bathymetry', bathy ) 
    455455            CALL iom_close( inum ) 
    456             !                                                ! ===================== 
     456            !                                                 
    457457            IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration 
    458                !                                             ! ===================== 
     458               ! 
    459459              IF( nn_cla == 0 ) THEN 
    460460                 ii0 = 140   ;   ii1 = 140                   ! Gibraltar Strait open  
     
    489489      ENDIF 
    490490      ! 
    491       !                                               ! =========================== ! 
    492       IF( nclosea == 0 ) THEN                         !   NO closed seas or lakes   ! 
    493          DO jl = 1, jpncs                             ! =========================== ! 
    494             DO jj = ncsj1(jl), ncsj2(jl) 
    495                DO ji = ncsi1(jl), ncsi2(jl) 
    496                   mbathy(ji,jj) = 0                   ! suppress closed seas and lakes from bathymetry 
    497                   bathy (ji,jj) = 0._wp                
    498                END DO 
    499             END DO 
    500          END DO 
    501       ENDIF 
    502       ! 
    503       !                                               ! =========================== ! 
    504       !                                               !     set a minimum depth     ! 
    505       !                                               ! =========================== ! 
    506       IF ( .not. ln_sco ) THEN 
     491      IF( nn_closea == 0 )   CALL clo_bat( bathy, mbathy )    !==  NO closed seas or lakes  ==! 
     492      !                        
     493      IF ( .not. ln_sco ) THEN                                !==  set a minimum depth  ==! 
    507494         IF( rn_hmin < 0._wp ) THEN    ;   ik = - INT( rn_hmin )                                      ! from a nb of level 
    508495         ELSE                          ;   ik = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 )  ! from a depth 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r3294 r3575  
    678678      REAL(wp) :: zrhdt1  
    679679      REAL(wp) :: zdpdx1, zdpdx2, zdpdy1, zdpdy2 
    680       INTEGER  :: zbhitwe, zbhitns 
    681       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdeptht, zrhh  
     680      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdept, zrhh  
    682681      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp 
    683682      !!---------------------------------------------------------------------- 
    684683      ! 
    685684      CALL wrk_alloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )  
    686       CALL wrk_alloc( jpi,jpj,jpk, zdeptht, zrhh )  
     685      CALL wrk_alloc( jpi,jpj,jpk, zdept, zrhh )  
    687686      ! 
    688687      IF( kt == nit000 ) THEN 
     
    717716      END DO 
    718717 
    719       ! Transfer the depth of "T(:,:,:)" to vertical coordinate "zdeptht(:,:,:)" 
    720       DO jj = 1, jpj 
    721         DO ji = 1, jpi 
    722           zdeptht(ji,jj,1) = 0.5_wp * fse3w(ji,jj,1) 
    723           zdeptht(ji,jj,1) = zdeptht(ji,jj,1) - sshn(ji,jj) * znad 
    724           DO jk = 2, jpk 
    725              zdeptht(ji,jj,jk) = zdeptht(ji,jj,jk-1) + fse3w(ji,jj,jk) 
    726           END DO 
    727         END DO 
    728       END DO 
    729  
    730       DO jk = 1, jpkm1 
    731         DO jj = 1, jpj 
    732           DO ji = 1, jpi 
    733             fsp(ji,jj,jk) = zrhh(ji,jj,jk) 
    734             xsp(ji,jj,jk) = zdeptht(ji,jj,jk) 
    735           END DO 
    736         END DO 
    737       END DO 
     718      ! Transfer the depth of "T(:,:,:)" to vertical coordinate "zdept(:,:,:)" 
     719      DO jj = 1, jpj;   DO ji = 1, jpi 
     720          zdept(ji,jj,1) = 0.5_wp * fse3w(ji,jj,1) - sshn(ji,jj) * znad 
     721      END DO        ;   END DO 
     722 
     723      DO jk = 2, jpk;   DO jj = 1, jpj;   DO ji = 1, jpi 
     724          zdept(ji,jj,jk) = zdept(ji,jj,jk-1) + fse3w(ji,jj,jk) 
     725      END DO        ;   END DO        ;   END DO 
     726 
     727      fsp(:,:,:) = zrhh(:,:,:) 
     728      xsp(:,:,:) = zdept(:,:,:) 
    738729 
    739730      ! Construct the vertical density profile with the  
     
    745736      DO jj = 2, jpj 
    746737        DO ji = 2, jpi  
    747           zrhdt1 = zrhh(ji,jj,1) - interp3(zdeptht(ji,jj,1),asp(ji,jj,1), & 
     738          zrhdt1 = zrhh(ji,jj,1) - interp3(zdept(ji,jj,1),asp(ji,jj,1), & 
    748739                                         bsp(ji,jj,1),   csp(ji,jj,1), & 
    749                                          dsp(ji,jj,1) ) * 0.5_wp * zdeptht(ji,jj,1) 
    750           zrhdt1 = MAX(zrhdt1, 1000._wp - rau0)        ! no lighter than fresh water 
     740                                         dsp(ji,jj,1) ) * 0.25_wp * fse3w(ji,jj,1) 
    751741 
    752742          ! assuming linear profile across the top half surface layer 
     
    760750          DO ji = 2, jpi 
    761751            zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) +                          & 
    762                              integ2(zdeptht(ji,jj,jk-1), zdeptht(ji,jj,jk),& 
     752                             integ_spline(zdept(ji,jj,jk-1), zdept(ji,jj,jk),& 
    763753                                    asp(ji,jj,jk-1),    bsp(ji,jj,jk-1), & 
    764754                                    csp(ji,jj,jk-1),    dsp(ji,jj,jk-1)) 
     
    793783      END DO 
    794784 
     785      DO jk = 1, jpkm1 
     786        DO jj = 2, jpjm1 
     787          DO ji = 2, jpim1 
     788            zu(ji,jj,jk) = min(zu(ji,jj,jk), max(-zdept(ji,jj,jk), -zdept(ji+1,jj,jk))) 
     789            zu(ji,jj,jk) = max(zu(ji,jj,jk), min(-zdept(ji,jj,jk), -zdept(ji+1,jj,jk))) 
     790            zv(ji,jj,jk) = min(zv(ji,jj,jk), max(-zdept(ji,jj,jk), -zdept(ji,jj+1,jk))) 
     791            zv(ji,jj,jk) = max(zv(ji,jj,jk), min(-zdept(ji,jj,jk), -zdept(ji,jj+1,jk))) 
     792          END DO 
     793        END DO 
     794      END DO 
     795 
     796 
    795797      DO jk = 1, jpkm1                                   
    796798        DO jj = 2, jpjm1      
     
    803805            !!!!!     for u equation 
    804806            IF( jk <= mbku(ji,jj) ) THEN 
    805                IF( -zdeptht(ji+1,jj,mbku(ji,jj)) >= -zdeptht(ji,jj,mbku(ji,jj)) ) THEN 
     807               IF( -zdept(ji+1,jj,jk) >= -zdept(ji,jj,jk) ) THEN 
    806808                 jis = ji + 1; jid = ji 
    807809               ELSE 
     
    811813               ! integrate the pressure on the shallow side 
    812814               jk1 = jk  
    813                zbhitwe = 0 
    814                DO WHILE ( -zdeptht(jis,jj,jk1) > zuijk ) 
     815               DO WHILE ( -zdept(jis,jj,jk1) > zuijk ) 
    815816                 IF( jk1 == mbku(ji,jj) ) THEN 
    816                    zbhitwe = 1 
     817                   zuijk = -zdept(jis,jj,jk1) 
    817818                   EXIT 
    818819                 ENDIF 
    819                  zdeps = MIN(zdeptht(jis,jj,jk1+1), -zuijk) 
     820                 zdeps = MIN(zdept(jis,jj,jk1+1), -zuijk) 
    820821                 zpwes = zpwes +                                    &  
    821                       integ2(zdeptht(jis,jj,jk1), zdeps,            & 
     822                      integ_spline(zdept(jis,jj,jk1), zdeps,            & 
    822823                             asp(jis,jj,jk1),    bsp(jis,jj,jk1), & 
    823824                             csp(jis,jj,jk1),    dsp(jis,jj,jk1)) 
     
    825826               END DO 
    826827             
    827                IF(zbhitwe == 1) THEN 
    828                  zuijk = -zdeptht(jis,jj,jk1) 
    829                ENDIF 
    830  
    831828               ! integrate the pressure on the deep side 
    832829               jk1 = jk  
    833                zbhitwe = 0 
    834                DO WHILE ( -zdeptht(jid,jj,jk1) < zuijk ) 
     830               DO WHILE ( -zdept(jid,jj,jk1) < zuijk ) 
    835831                 IF( jk1 == 1 ) THEN 
    836                    zbhitwe = 1 
     832                   zdeps = zdept(jid,jj,1) + MIN(zuijk, sshn(jid,jj)*znad) 
     833                   zrhdt1 = zrhh(jid,jj,1) - interp3(zdept(jid,jj,1), asp(jid,jj,1), & 
     834                                                     bsp(jid,jj,1),   csp(jid,jj,1), & 
     835                                                     dsp(jid,jj,1)) * zdeps 
     836                   zpwed  = zpwed + 0.5_wp * (zrhh(jid,jj,1) + zrhdt1) * zdeps 
    837837                   EXIT 
    838838                 ENDIF 
    839                  zdeps = MAX(zdeptht(jid,jj,jk1-1), -zuijk) 
     839                 zdeps = MAX(zdept(jid,jj,jk1-1), -zuijk) 
    840840                 zpwed = zpwed +                                        &  
    841                         integ2(zdeps,              zdeptht(jid,jj,jk1), & 
     841                        integ_spline(zdeps,              zdept(jid,jj,jk1), & 
    842842                               asp(jid,jj,jk1-1), bsp(jid,jj,jk1-1),  & 
    843843                               csp(jid,jj,jk1-1), dsp(jid,jj,jk1-1) ) 
     
    845845               END DO 
    846846             
    847                IF( zbhitwe == 1 ) THEN 
    848                  zdeps = zdeptht(jid,jj,1) + MIN(zuijk, sshn(jid,jj)*znad) 
    849                  zrhdt1 = zrhh(jid,jj,1) - interp3(zdeptht(jid,jj,1), asp(jid,jj,1), & 
    850                                                  bsp(jid,jj,1),    csp(jid,jj,1), & 
    851                                                  dsp(jid,jj,1)) * zdeps 
    852                  zrhdt1 = MAX(zrhdt1, 1000._wp - rau0)        ! no lighter than fresh water 
    853                  zpwed  = zpwed + 0.5_wp * (zrhh(jid,jj,1) + zrhdt1) * zdeps 
    854                ENDIF 
    855  
    856847               ! update the momentum trends in u direction 
    857848 
     
    870861            !!!!!     for v equation 
    871862            IF( jk <= mbkv(ji,jj) ) THEN 
    872                IF( -zdeptht(ji,jj+1,mbkv(ji,jj)) >= -zdeptht(ji,jj,mbkv(ji,jj)) ) THEN 
     863               IF( -zdept(ji,jj+1,jk) >= -zdept(ji,jj,jk) ) THEN 
    873864                 jjs = jj + 1; jjd = jj 
    874865               ELSE 
     
    878869               ! integrate the pressure on the shallow side 
    879870               jk1 = jk  
    880                zbhitns = 0 
    881                DO WHILE ( -zdeptht(ji,jjs,jk1) > zvijk ) 
     871               DO WHILE ( -zdept(ji,jjs,jk1) > zvijk ) 
    882872                 IF( jk1 == mbkv(ji,jj) ) THEN 
    883                    zbhitns = 1 
     873                   zvijk = -zdept(ji,jjs,jk1) 
    884874                   EXIT 
    885875                 ENDIF 
    886                  zdeps = MIN(zdeptht(ji,jjs,jk1+1), -zvijk) 
     876                 zdeps = MIN(zdept(ji,jjs,jk1+1), -zvijk) 
    887877                 zpnss = zpnss +                                      &  
    888                         integ2(zdeptht(ji,jjs,jk1), zdeps,            & 
     878                        integ_spline(zdept(ji,jjs,jk1), zdeps,            & 
    889879                               asp(ji,jjs,jk1),    bsp(ji,jjs,jk1), & 
    890880                               csp(ji,jjs,jk1),    dsp(ji,jjs,jk1) ) 
     
    892882               END DO 
    893883             
    894                IF(zbhitns == 1) THEN 
    895                  zvijk = -zdeptht(ji,jjs,jk1) 
    896                ENDIF 
    897  
    898884               ! integrate the pressure on the deep side 
    899885               jk1 = jk  
    900                zbhitns = 0 
    901                DO WHILE ( -zdeptht(ji,jjd,jk1) < zvijk ) 
     886               DO WHILE ( -zdept(ji,jjd,jk1) < zvijk ) 
    902887                 IF( jk1 == 1 ) THEN 
    903                    zbhitns = 1 
     888                   zdeps = zdept(ji,jjd,1) + MIN(zvijk, sshn(ji,jjd)*znad) 
     889                   zrhdt1 = zrhh(ji,jjd,1) - interp3(zdept(ji,jjd,1), asp(ji,jjd,1), & 
     890                                                     bsp(ji,jjd,1),   csp(ji,jjd,1), & 
     891                                                     dsp(ji,jjd,1) ) * zdeps 
     892                   zpnsd  = zpnsd + 0.5_wp * (zrhh(ji,jjd,1) + zrhdt1) * zdeps 
    904893                   EXIT 
    905894                 ENDIF 
    906                  zdeps = MAX(zdeptht(ji,jjd,jk1-1), -zvijk) 
     895                 zdeps = MAX(zdept(ji,jjd,jk1-1), -zvijk) 
    907896                 zpnsd = zpnsd +                                        &  
    908                         integ2(zdeps,              zdeptht(ji,jjd,jk1), & 
     897                        integ_spline(zdeps,              zdept(ji,jjd,jk1), & 
    909898                               asp(ji,jjd,jk1-1), bsp(ji,jjd,jk1-1), & 
    910899                               csp(ji,jjd,jk1-1), dsp(ji,jjd,jk1-1) ) 
     
    912901               END DO 
    913902             
    914                IF( zbhitns == 1 ) THEN 
    915                  zdeps = zdeptht(ji,jjd,1) + MIN(zvijk, sshn(ji,jjd)*znad) 
    916                  zrhdt1 = zrhh(ji,jjd,1) - interp3(zdeptht(ji,jjd,1), asp(ji,jjd,1), & 
    917                                                  bsp(ji,jjd,1),    csp(ji,jjd,1), & 
    918                                                  dsp(ji,jjd,1) ) * zdeps 
    919                  zrhdt1 = MAX(zrhdt1, 1000._wp - rau0)        ! no lighter than fresh water 
    920                  zpnsd  = zpnsd + 0.5_wp * (zrhh(ji,jjd,1) + zrhdt1) * zdeps 
    921                ENDIF 
    922903 
    923904               ! update the momentum trends in v direction 
     
    941922      ! 
    942923      CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )  
    943       CALL wrk_dealloc( jpi,jpj,jpk, zdeptht, zrhh )  
     924      CALL wrk_dealloc( jpi,jpj,jpk, zdept, zrhh )  
    944925      ! 
    945926   END SUBROUTINE hpg_prj 
     
    11211102 
    11221103    
    1123    FUNCTION integ2(xl, xr, a, b, c, d)  RESULT(f)  
     1104   FUNCTION integ_spline(xl, xr, a, b, c, d)  RESULT(f)  
    11241105      !!---------------------------------------------------------------------- 
    11251106      !!                 ***  ROUTINE interp1  *** 
     
    11431124         & xl * ( a + xl * ( za1 + xl * ( za2 + za3 * xl ) ) ) 
    11441125 
    1145    END FUNCTION integ2 
     1126   END FUNCTION integ_spline 
    11461127 
    11471128 
    11481129   !!====================================================================== 
    11491130END MODULE dynhpg 
     1131 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r3294 r3575  
    8080   END INTERFACE 
    8181   INTERFACE mpp_sum 
    82 # if defined key_mpp_rep 
    8382      MODULE PROCEDURE mppsum_a_int, mppsum_int, mppsum_a_real, mppsum_real, & 
    8483                       mppsum_realdd, mppsum_a_realdd 
    85 # else 
    86       MODULE PROCEDURE mppsum_a_int, mppsum_int, mppsum_a_real, mppsum_real 
    87 # endif 
    8884   END INTERFACE 
    8985   INTERFACE mpp_lbc_north 
     
    114110!$AGRIF_END_DO_NOT_TREAT 
    115111 
    116 # if defined key_mpp_rep 
    117112   INTEGER :: MPI_SUMDD 
    118 # endif 
    119113 
    120114   ! variables used in case of sea-ice 
    121    INTEGER, PUBLIC ::   ncomm_ice       !: communicator made by the processors with sea-ice 
     115   INTEGER, PUBLIC ::   ncomm_ice       !: communicator made by the processors with sea-ice (public so that it can be freed in limthd) 
     116   INTEGER ::   ngrp_iworld     !  group ID for the world processors (for rheology) 
    122117   INTEGER ::   ngrp_ice        !  group ID for the ice processors (for rheology) 
    123118   INTEGER ::   ndim_rank_ice   !  number of 'ice' processors 
     
    355350      mynode = mpprank 
    356351      !  
    357 #if defined key_mpp_rep 
    358352      CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr) 
    359 #endif 
    360353      ! 
    361354   END FUNCTION mynode 
     
    15061499   END SUBROUTINE mppsum_real 
    15071500 
    1508 # if defined key_mpp_rep 
    15091501   SUBROUTINE mppsum_realdd( ytab, kcom ) 
    15101502      !!---------------------------------------------------------------------- 
     
    15591551 
    15601552   END SUBROUTINE mppsum_a_realdd 
    1561 # endif    
    15621553    
    15631554   SUBROUTINE mpp_minloc2d( ptab, pmask, pmin, ki,kj ) 
     
    19771968      !!      ndim_rank_ice = number of processors with ice 
    19781969      !!      nrank_ice (ndim_rank_ice) = ice processors 
    1979       !!      ngrp_world = group ID for the world processors 
     1970      !!      ngrp_iworld = group ID for the world processors 
    19801971      !!      ngrp_ice = group ID for the ice processors 
    19811972      !!      ncomm_ice = communicator for the ice procs. 
     
    20262017 
    20272018      ! Create the world group 
    2028       CALL MPI_COMM_GROUP( mpi_comm_opa, ngrp_world, ierr ) 
     2019      CALL MPI_COMM_GROUP( mpi_comm_opa, ngrp_iworld, ierr ) 
    20292020 
    20302021      ! Create the ice group from the world group 
    2031       CALL MPI_GROUP_INCL( ngrp_world, ndim_rank_ice, nrank_ice, ngrp_ice, ierr ) 
     2022      CALL MPI_GROUP_INCL( ngrp_iworld, ndim_rank_ice, nrank_ice, ngrp_ice, ierr ) 
    20322023 
    20332024      ! Create the ice communicator , ie the pool of procs with sea-ice 
     
    20362027      ! Find proc number in the world of proc 0 in the north 
    20372028      ! The following line seems to be useless, we just comment & keep it as reminder 
    2038       ! CALL MPI_GROUP_TRANSLATE_RANKS(ngrp_ice,1,0,ngrp_world,n_ice_root,ierr) 
    2039       ! 
     2029      ! CALL MPI_GROUP_TRANSLATE_RANKS(ngrp_ice,1,0,ngrp_iworld,n_ice_root,ierr) 
     2030      ! 
     2031      CALL MPI_GROUP_FREE(ngrp_ice, ierr) 
     2032      CALL MPI_GROUP_FREE(ngrp_iworld, ierr) 
     2033 
    20402034      DEALLOCATE(kice, zwork) 
    20412035      ! 
     
    25992593   END SUBROUTINE mpi_init_opa 
    26002594 
    2601 #if defined key_mpp_rep 
    26022595   SUBROUTINE DDPDD_MPI (ydda, yddb, ilen, itype) 
    26032596      !!--------------------------------------------------------------------- 
     
    26282621 
    26292622   END SUBROUTINE DDPDD_MPI 
    2630 #endif 
    26312623 
    26322624#else 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r3294 r3575  
    721721               !                                                       ! (geographical to local grid -> rotate the components) 
    722722               CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )    
    723                frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
    724723               IF( srcv(jpr_otx2)%laction ) THEN 
    725724                  CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )    
     
    727726                  CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )   
    728727               ENDIF 
     728               frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
    729729               frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid 
    730730            ENDIF 
     
    949949               !                                                       ! (geographical to local grid -> rotate the components) 
    950950               CALL rot_rep( frcv(jpr_itx1)%z3(:,:,1), frcv(jpr_ity1)%z3(:,:,1), srcv(jpr_itx1)%clgrid, 'en->i', ztx )    
    951                frcv(jpr_itx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
    952951               IF( srcv(jpr_itx2)%laction ) THEN 
    953952                  CALL rot_rep( frcv(jpr_itx2)%z3(:,:,1), frcv(jpr_ity2)%z3(:,:,1), srcv(jpr_itx2)%clgrid, 'en->j', zty )    
     
    955954                  CALL rot_rep( frcv(jpr_itx1)%z3(:,:,1), frcv(jpr_ity1)%z3(:,:,1), srcv(jpr_itx1)%clgrid, 'en->j', zty )   
    956955               ENDIF 
     956               frcv(jpr_itx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
    957957               frcv(jpr_ity1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 1st grid 
    958958            ENDIF 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r3574 r3575  
    284284      !                                            !==  Misc. Options  ==! 
    285285       
    286       SELECT CASE( nn_ice )                                     ! Update heat and freshwater fluxes over sea-ice areas 
    287       CASE(  1 )   ;       CALL sbc_ice_if   ( kt )                  ! Ice-cover climatology ("Ice-if" model) 
    288          !                                                       
    289       CASE(  2 )   ;       CALL sbc_ice_lim_2( kt, nsbc )            ! LIM-2 ice model 
    290          IF( lk_bdy )      CALL bdy_ice_lim_2( kt )                  ! BDY boundary condition 
    291          !                                                      
    292       CASE(  3 )   ;       CALL sbc_ice_lim  ( kt, nsbc )            ! LIM-3 ice model 
    293          ! 
    294       CASE(  4 )   ;       CALL sbc_ice_cice ( kt, nsbc )            ! CICE ice model 
     286      SELECT CASE( nn_ice )                                       ! Update heat and freshwater fluxes over sea-ice areas 
     287      CASE(  1 )   ;         CALL sbc_ice_if   ( kt )                ! Ice-cover climatology ("Ice-if" model) 
     288      CASE(  2 )   ;         CALL sbc_ice_lim_2( kt, nsbc )          ! LIM-2 ice model 
     289              IF( lk_bdy )   CALL bdy_ice_lim_2( kt )                ! BDY boundary condition 
     290      CASE(  3 )   ;         CALL sbc_ice_lim  ( kt, nsbc )          ! LIM-3 ice model 
     291      CASE(  4 )   ;         CALL sbc_ice_cice ( kt, nsbc )          ! CICE ice model 
    295292      END SELECT                                               
    296293 
    297       IF( ln_rnf       )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes 
     294      IF( ln_rnf         )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes 
    298295  
    299       IF( ln_ssr       )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term 
    300  
    301       IF( nn_fwb  /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
    302  
    303       IF( nclosea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain  
    304       !                                                         ! (update freshwater fluxes) 
     296      IF( ln_ssr         )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term 
     297 
     298      IF( nn_fwb    /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     299 
     300      IF( nn_closea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain  
     301      !                                                           ! (update freshwater fluxes) 
    305302!RBbug do not understand why see ticket 667 
    306303      CALL lbc_lnk( emp, 'T', 1. ) 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r3294 r3575  
    457457      CALL iom_close( inum )                                      ! close file 
    458458       
    459       IF( nclosea == 1 )    CALL clo_rnf( rnfmsk )                ! closed sea inflow set as ruver mouth 
    460  
    461       rnfmsk_z(:)   = 0._wp                                        ! vertical structure  
     459      IF( nn_closea == 1 )   CALL clo_rnf( rnfmsk )               ! closed sea inflow set as ruver mouth 
     460 
     461      rnfmsk_z(:)   = 0._wp                                       ! vertical structure  
    462462      rnfmsk_z(1)   = 1.0 
    463463      rnfmsk_z(2)   = 1.0                                         ! ********** 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r3294 r3575  
    88   !!            3.3  !  2010-06  (C. Ethe) merge TRA-TRC  
    99   !!---------------------------------------------------------------------- 
    10 #if  defined key_trdtra || defined key_trdmld || defined key_trdmld_trc  
     10#if  defined key_trdtra || defined key_trdtrc || defined key_trdmld || defined key_trdmld_trc  
    1111   !!---------------------------------------------------------------------- 
    1212   !!   trd_tra      : Call the trend to be computed 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90

    r3294 r3575  
    8787   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   htau           ! depth of tke penetration (nn_htau) 
    8888   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dissl          ! now mixing lenght of dissipation 
     89   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avt_k , avm_k  ! not enhanced Kz 
     90   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avmu_k, avmv_k ! not enhanced Kz 
    8991#if defined key_c1d 
    9092   !                                                                        !!** 1D cfg only  **   ('key_c1d') 
     
    112114         &      e_pdl(jpi,jpj,jpk) , e_ric(jpi,jpj,jpk) ,                          & 
    113115#endif 
    114          &      en   (jpi,jpj,jpk) , htau (jpi,jpj)     , dissl(jpi,jpj,jpk) , STAT= zdf_tke_alloc ) 
     116         &      en    (jpi,jpj,jpk) , htau  (jpi,jpj)    , dissl(jpi,jpj,jpk) ,     &  
     117         &      avt_k (jpi,jpj,jpk) , avm_k (jpi,jpj,jpk),                          & 
     118         &      avmu_k(jpi,jpj,jpk) , avmv_k(jpi,jpj,jpk), STAT= zdf_tke_alloc      ) 
    115119         ! 
    116120      IF( lk_mpp             )   CALL mpp_sum ( zdf_tke_alloc ) 
     
    168172      !!---------------------------------------------------------------------- 
    169173      ! 
     174      IF( kt /= nit000 ) THEN   ! restore before value to compute tke 
     175         avt (:,:,:) = avt_k (:,:,:)  
     176         avm (:,:,:) = avm_k (:,:,:)  
     177         avmu(:,:,:) = avmu_k(:,:,:)  
     178         avmv(:,:,:) = avmv_k(:,:,:)  
     179      ENDIF  
     180      ! 
    170181      CALL tke_tke      ! now tke (en) 
    171182      ! 
    172183      CALL tke_avn      ! now avt, avm, avmu, avmv 
     184      ! 
     185      avt_k (:,:,:) = avt (:,:,:)  
     186      avm_k (:,:,:) = avm (:,:,:)  
     187      avmu_k(:,:,:) = avmu(:,:,:)  
     188      avmv_k(:,:,:) = avmv(:,:,:)  
    173189      ! 
    174190   END SUBROUTINE zdf_tke 
     
    811827        !                                   ! ------------------- 
    812828        IF(lwp) WRITE(numout,*) '---- tke-rst ----' 
    813         CALL iom_rstput( kt, nitrst, numrow, 'en'   , en    ) 
    814         CALL iom_rstput( kt, nitrst, numrow, 'avt'  , avt   ) 
    815         CALL iom_rstput( kt, nitrst, numrow, 'avm'  , avm   ) 
    816         CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu  ) 
    817         CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv  ) 
    818         CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl ) 
     829        CALL iom_rstput( kt, nitrst, numrow, 'en'   , en     ) 
     830        CALL iom_rstput( kt, nitrst, numrow, 'avt'  , avt_k  ) 
     831        CALL iom_rstput( kt, nitrst, numrow, 'avm'  , avm_k  ) 
     832        CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k ) 
     833        CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k ) 
     834        CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl  ) 
    819835        ! 
    820836     ENDIF 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/lib_fortran.F90

    r3294 r3575  
    1414   !!                 of intrinsinc sign function 
    1515   !!---------------------------------------------------------------------- 
    16    USE par_oce          ! Ocean parameter 
    17    USE lib_mpp          ! distributed memory computing 
    18    USE dom_oce          ! ocean domain 
    19    USE in_out_manager   ! I/O manager 
     16   USE par_oce         ! Ocean parameter 
     17   USE dom_oce         ! ocean domain 
     18   USE in_out_manager  ! I/O manager 
     19   USE lib_mpp         ! distributed memory computing 
    2020 
    2121   IMPLICIT NONE 
    2222   PRIVATE 
    2323 
    24    PUBLIC glob_sum 
     24   PUBLIC   glob_sum   ! used in many places 
     25   PUBLIC   DDPDD      ! also used in closea module 
    2526#if defined key_nosignedzero 
    2627   PUBLIC SIGN 
     
    4748 
    4849#if ! defined key_mpp_rep 
     50 
    4951   FUNCTION glob_sum_2d( ptab )  
    5052      !!----------------------------------------------------------------------- 
     
    246248   END FUNCTION glob_sum_3d_a    
    247249 
     250#endif 
    248251 
    249252   SUBROUTINE DDPDD( ydda, yddb ) 
     
    280283      ! 
    281284   END SUBROUTINE DDPDD 
    282 #endif 
    283285 
    284286#if defined key_nosignedzero 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zsink.F90

    r3295 r3575  
    295295      ENDIF 
    296296      ! 
    297       CALL wrk_alloc( jpi, jpj, jpk, znum3d ) 
     297      CALL wrk_dealloc( jpi, jpj, jpk, znum3d ) 
    298298      ! 
    299299      IF( nn_timing == 1 )  CALL timing_stop('p4z_sink') 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r3294 r3575  
    101101      END SELECT 
    102102 
    103       IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
     103      IF( l_trdtrc )   THEN                      ! save the vertical diffusive trends for further diagnostics 
    104104         DO jn = 1, jptra 
    105105            DO jk = 1, jpkm1 
  • branches/2012/dev_INGV/NEMOGCM/NEMO/TOP_SRC/TRP/trdmod_trc.F90

    r3294 r3575  
    5959      ! Mixed layer trends for passive tracers 
    6060      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     61#if defined key_trdmld_trc   
    6162      IF( lk_trdmld_trc .AND. ln_trdtrc( kjn ) ) THEN 
    6263         ! 
     
    8283         ! 
    8384      END IF 
     85#endif 
    8486 
    8587      IF( lk_trdtrc .AND. ln_trdtrc( kjn ) ) THEN 
    8688         ! 
    8789         SELECT CASE( ktrd ) 
    88          CASE( jptra_trd_xad )       ;    WRITE (cltra,'("XAD_",16a)')   ctrcnm(kjn) 
    89          CASE( jptra_trd_yad )       ;    WRITE (cltra,'("YAD_",16a)')   ctrcnm(kjn) 
    90          CASE( jptra_trd_zad )       ;    WRITE (cltra,'("ZAD_",16a)')   ctrcnm(kjn) 
    91          CASE( jptra_trd_ldf )       ;    WRITE (cltra,'("LDF_",16a)')   ctrcnm(kjn) 
    92          CASE( jptra_trd_bbl )       ;    WRITE (cltra,'("BBL_",16a)')   ctrcnm(kjn) 
    93          CASE( jptra_trd_zdf )       ;    WRITE (cltra,'("ZDF_",16a)')   ctrcnm(kjn) 
    94          CASE( jptra_trd_dmp )       ;    WRITE (cltra,'("DMP_",16a)')   ctrcnm(kjn) 
    95          CASE( jptra_trd_nsr )       ;    WRITE (cltra,'("FOR_",16a)')   ctrcnm(kjn) 
     90         CASE( jptra_trd_xad  )       ;    WRITE (cltra,'("XAD_",4a)') 
     91         CASE( jptra_trd_yad  )       ;    WRITE (cltra,'("YAD_",4a)') 
     92         CASE( jptra_trd_zad  )       ;    WRITE (cltra,'("ZAD_",4a)') 
     93         CASE( jptra_trd_ldf  )       ;    WRITE (cltra,'("LDF_",4a)') 
     94         CASE( jptra_trd_bbl  )       ;    WRITE (cltra,'("BBL_",4a)') 
     95         CASE( jptra_trd_nsr  )       ;    WRITE (cltra,'("FOR_",4a)') 
     96         CASE( jptra_trd_zdf  )       ;    WRITE (cltra,'("ZDF_",4a)') 
     97         CASE( jptra_trd_dmp  )       ;    WRITE (cltra,'("DMP_",4a)') 
     98         CASE( jptra_trd_sms  )       ;    WRITE (cltra,'("SMS_",4a)') 
     99         CASE( jptra_trd_atf  )       ;    WRITE (cltra,'("ATF_",4a)') 
     100         CASE( jptra_trd_radb )       ;    WRITE (cltra,'("RDB_",4a)') 
     101         CASE( jptra_trd_radn )       ;    WRITE (cltra,'("RDN_",4a)') 
    96102         END SELECT 
     103                                          cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) 
    97104                                          CALL iom_put( cltra,  ptrtrd(:,:,:) ) 
    98105         ! 
     
    111118      !!---------------------------------------------------------------------- 
    112119 
     120#if defined key_trdmld_trc   
    113121      CALL trd_mld_bio_zint( ptrbio, ktrd ) ! Verticaly integrated biological trends 
     122#endif 
    114123 
    115124   END SUBROUTINE trd_mod_trc_bio 
  • branches/2012/dev_INGV/NEMOGCM/SETTE/input_ORCA2_LIM_PISCES.cfg

    r2732 r3575  
    1 ORCA2_LIM_nemo_v3.3.tar 
     1ORCA2_LIM_PISCES_v3.4.tar 
  • branches/2012/dev_INGV/NEMOGCM/SETTE/sette_beginner.sh

    r3336 r3575  
    4141export BATCH_COMMAND_PAR="llsubmit" 
    4242export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
    43 # export MPI_INTERACT="no" 
     43export INTERACT_FLAG="no" 
     44export MPIRUN_FLAG="yes" 
    4445 
    4546# Directory to run the tests 
     
    5859# small test to start 
    5960# compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file :  
    60 export TEST_NAME="TEST02" 
     61export TEST_NAME="prova_beginner" 
    6162cd ${SETTE_DIR} 
    62 . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE 
     63. ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE -j 10 add_key "key_mpp_mpi" 
    6364cd ${SETTE_DIR} 
    6465. param.cfg  
     
    6768. prepare_exe_dir.sh 
    6869JOB_FILE=${EXE_DIR}/run_job.sh 
     70NPROC=4 
     71\rm $JOB_FILE 
    6972cd ${EXE_DIR} 
    7073# setting namelist parameters 
     
    7982 
    8083cd ${SETTE_DIR} 
    81 # . ./prepare_job.sh input_file_config_name NB_PROCS TEST_NAME MPI_FLAG JOB_FILE 
    82 . ./prepare_job.sh input_GYRE.cfg 1 SHORT no $JOB_FILE 
     84. ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    8385# run job, with 1 processor, test named SHORT (= 60 time steps) 
    84 #. ./fcm_job.sh NB_PROCS JOB_FILE INTERACT_FLAG MPI_FLAG 
    85     cd ${SETTE_DIR}    
    86 . ./fcm_job.sh 1 $JOB_FILE no no 
    87  
     86cd ${SETTE_DIR}    
     87. ./fcm_job.sh 4 ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
  • branches/2012/dev_INGV/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90

    r3294 r3575  
    370370        DO WHILE ( (  sec%listPoint(jseg)%I .NE.  endingPoint%I    & 
    371371                 .OR. sec%listPoint(jseg)%J .NE. endingPoint%J   ) & 
    372                  .AND. jseg .LT. nb_inmesh + 1 .AND. sec%listPoint(jseg)%I .GT. 0  )          
     372                 .AND. jseg .LT. nb_inmesh + 10 .AND. sec%listPoint(jseg)%I .GT. 0  )          
    373373    
    374374           ! a. find the 4 adjacent points (North, South, East, West) 
     
    429429           !-------------------- 
    430430           IF(      SouthPoint%I==endingPoint%I .AND. SouthPoint%J==endingPoint%J )THEN  
    431                jseg = jseg+1 ; sec%listPoint(jseg) = SouthPoint 
     431               sec%direction(jseg)=2 ; jseg = jseg+1 ; sec%listPoint(jseg) = SouthPoint 
    432432           ELSE IF( NorthPoint%I==endingPoint%I .AND. NorthPoint%J==endingPoint%J )THEN 
    433                jseg = jseg+1 ; sec%listPoint(jseg) = NorthPoint 
     433               sec%direction(jseg)=3 ; jseg = jseg+1 ; sec%listPoint(jseg) = NorthPoint 
    434434           ELSE IF(  WestPoint%I==endingPoint%I .AND.  WestPoint%J==endingPoint%J )THEN 
    435                jseg = jseg+1 ; sec%listPoint(jseg) = WestPoint 
     435               sec%direction(jseg)=0 ; jseg = jseg+1 ; sec%listPoint(jseg) = WestPoint 
    436436           ELSE IF(   EstPoint%I==endingPoint%I .AND.   EstPoint%J==endingPoint%J )THEN 
    437                jseg = jseg+1 ; sec%listPoint(jseg) = EstPoint 
     437               sec%direction(jseg)=1 ; jseg = jseg+1 ; sec%listPoint(jseg) = EstPoint 
    438438 
    439439           ELSE 
Note: See TracChangeset for help on using the changeset viewer.