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 3570 for branches/2012/dev_r3327_MERCATOR1_BDY – NEMO

Ignore:
Timestamp:
2012-11-16T10:58:11+01:00 (11 years ago)
Author:
cbricaud
Message:

merge branche dev_r3327_MERCATOR1_BDY with trunk: rev3327 to rev3555

Location:
branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM
Files:
2 deleted
46 edited
8 copied

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_S.pro

    r2759 r3570  
    3131 
    3232; read exp1 data 
    33   std_ts_read, vsal, date1, date2, prefix, suffix, ts_Sal, ts_z $ 
     33  std_ts_read, vsal, date1, date2, prefix, suffix, ts_Sal, ts_z, masknp $ 
    3434               , WITHSSH = vssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz 
    3535 
     
    6262; read exp2 data 
    6363    tsave = time 
    64     std_ts_read, vsal2, date1_2, date2_2, prefix2, suffix2, ts_Sal2, ts_z2 $ 
     64    std_ts_read, vsal2, date1_2, date2_2, prefix2, suffix2, ts_Sal2, ts_z2, masknp $ 
    6565                 , WITHSSH = vssh2, SSHPREFIX = sshprefix2, SSHSUFFIX = sshsuffix2, LEVZ = levz 
    6666    time = tsave   &   IF n_elements(time) NE jpt THEN stop 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_T.pro

    r2751 r3570  
    3131 
    3232; read exp1 data 
    33   std_ts_read, vtemp, date1, date2, prefix, suffix, ts_Temp, ts_z $ 
     33  std_ts_read, vtemp, date1, date2, prefix, suffix, ts_Temp, ts_z, masknp $ 
    3434               , WITHSSH = vssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz 
    3535 
     
    6262; read exp2 data 
    6363    tsave = time 
    64     std_ts_read, vtemp2, date1_2, date2_2, prefix2, suffix2, ts_Temp2, ts_z2 $ 
     64    std_ts_read, vtemp2, date1_2, date2_2, prefix2, suffix2, ts_Temp2, ts_z2, masknp $ 
    6565                 , WITHSSH = vssh2, SSHPREFIX = sshprefix2, SSHSUFFIX = sshsuffix2, LEVZ = levz 
    6666    time = tsave   &   IF n_elements(time) NE jpt THEN stop 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_read.pro

    r2751 r3570  
    1 PRO std_ts_read, var_name, dt1, dt2, prefix, suffix, ts, ts_z $ 
     1PRO std_ts_read, var_name, dt1, dt2, prefix, suffix, ts, ts_z, masknp $ 
    22                 , WITHSSH = withssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz 
    33 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_pisces

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_pisces

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/CONFIG/cfg.txt

    r3295 r3570  
    55ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    66AMM12_PISCES OPA_SRC TOP_SRC 
     7ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 
    78ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 
    8 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/IOSERVER/mod_interface_ioipsl.f90

    r2458 r3570  
    3838  USE ioipsl 
    3939  USE xmlio 
     40  USE mod_ioserver_namelist 
    4041  IMPLICIT NONE 
    4142    INTEGER,INTENT(IN)  :: nb_server 
     
    8889                       pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,         & 
    8990                       initial_timestep, initial_date, timestep_value,                               & 
    90                        ioipsl_hori_id, ioipsl_file_id) 
     91                       ioipsl_hori_id, ioipsl_file_id, snc4chunks=snc4ioset) 
    9192           ELSE                                               
    9293 
     
    9596                       pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,          & 
    9697                       initial_timestep, initial_date, timestep_value,                                & 
    97                        ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id)                                               
     98                       ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id, snc4chunks=snc4ioset)                                               
    9899           
    99100           ENDIF 
     
    142143            ENDIF 
    143144          ENDDO 
    144           CALL histend(ioipsl_file_id) 
     145          CALL histend(ioipsl_file_id, snc4chunks=snc4ioset) 
    145146        ENDIF 
    146147        CALL sorted_list__delete(axis_id) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/LIM_SRC_2/limdmp_2.F90

    r2715 r3570  
    1111   !!   'key_lim2'                                    LIM 2.0 sea-ice model 
    1212   !!---------------------------------------------------------------------- 
    13    !!   lim_dmp_2      : ice model damping 
     13   !!   lim_dmp_2     : ice model damping 
    1414   !!---------------------------------------------------------------------- 
    15    USE ice_2           ! ice variables  
     15   USE ice_2          ! ice variables  
    1616   USE sbc_oce, ONLY : nn_fsbc ! for fldread 
    17    USE dom_oce         ! for mi0; mi1 etc ... 
    18    USE fldread         ! read input fields 
    19    USE in_out_manager  ! I/O manager 
    20    USE lib_mpp         ! MPP library 
     17   USE dom_oce        ! for mi0; mi1 etc ... 
     18   USE fldread        ! read input fields 
     19   USE in_out_manager ! I/O manager 
     20   USE lib_mpp        ! MPP library 
    2121 
    2222   IMPLICIT NONE 
     
    2525   PUBLIC   lim_dmp_2     ! called by sbc_ice_lim2 
    2626 
    27    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   resto_ice   ! restoring coeff. on ICE   [s-1] 
    28  
    29    INTEGER, PARAMETER :: jp_hicif = 1 , jp_frld = 2 
    30    TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_icedmp    ! structure of ice damping input 
     27   INTEGER  , PARAMETER :: jp_hicif = 1 , jp_frld = 2 
     28   REAL(wp) , ALLOCATABLE, DIMENSION(:,:,:) ::   resto_ice   ! restoring coeff. on ICE   [s-1] 
     29   TYPE(FLD), ALLOCATABLE, DIMENSION(:)     ::   sf_icedmp   ! structure of ice damping input 
    3130    
    3231   !! * Substitution 
     
    4342      !!                   ***  ROUTINE lim_dmp_2  *** 
    4443      !! 
    45       !! ** purpose : ice model damping : restoring ice thickness and fraction leads 
     44      !! ** purpose :   restore ice thickness and lead fraction 
    4645      !! 
    47       !! ** method  : the key_tradmp must be used to compute resto(:,:,1) coef. 
     46      !! ** method  :   restore ice thickness and lead fraction using a restoring 
     47      !!              coefficient defined by the user in lim_dmp_init 
     48      !! 
     49      !! ** Action  : - update hicif and frld   
     50      !! 
    4851      !!--------------------------------------------------------------------- 
    4952      INTEGER, INTENT(in) ::   kt   ! ocean time-step 
     
    5356      !!--------------------------------------------------------------------- 
    5457      ! 
    55       IF (kt == nit000) THEN  
     58      IF( kt == nit000 ) THEN  
    5659         IF(lwp) WRITE(numout,*) 
    5760         IF(lwp) WRITE(numout,*) 'lim_dmp_2 : Ice thickness and ice concentration restoring' 
     
    7174            &         hicif(:,:) - rdt_ice * resto_ice(:,:,1) * ( hicif(:,:) - sf_icedmp(jp_hicif)%fnow(:,:,1) )  )  
    7275!CDIR COLLAPSE 
    73          hicif(:,:) = MAX( 0._wp, MIN( 1._wp,         &        ! 0<= frld<=1    values which blow the run up 
     76         frld (:,:) = MAX( 0._wp, MIN( 1._wp,         &        ! 0<= frld<=1    values which blow the run up 
    7477            &         frld (:,:) - rdt_ice * resto_ice(:,:,1) * ( frld (:,:) - sf_icedmp(jp_frld )%fnow(:,:,1) )  )  ) 
    7578         ! 
     
    8386      !!                   ***  ROUTINE lim_dmp_init  *** 
    8487      !! 
    85       !! ** Purpose :   Initialization for the ice thickness and concentration  
    86       !!                restoring 
    87       !!              restoring will be used. It is used to mimic ice open 
    88       !!              boundaries. 
     88      !! ** Purpose :   set the coefficient for the ice thickness and lead fraction restoring 
    8989      !! 
    90       !! ** Method  :  ????? 
     90      !! ** Method  :   restoring is used to mimic ice open boundaries. 
     91      !!              the restoring coef. (a 2D array) has to be defined by the user. 
     92      !!              here is given as an example a restoring along north and south boundaries 
    9193      !!       
    9294      !! ** Action  :   define resto_ice(:,:,1) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90

    r3294 r3570  
    460460      ! 4) Moments for advection 
    461461      !-------------------------------------------------------------------- 
     462 
     463      sxopw (:,:) = 0.e0  
     464      syopw (:,:) = 0.e0  
     465      sxxopw(:,:) = 0.e0  
     466      syyopw(:,:) = 0.e0  
     467      sxyopw(:,:) = 0.e0 
    462468 
    463469      sxice (:,:,:)  = 0.e0   ;   sxsn (:,:,:)  = 0.e0   ;   sxa  (:,:,:)  = 0.e0 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90

    r3294 r3570  
    102102      INTEGER ::   nconv       ! number of iterations in iterative procedure 
    103103      INTEGER ::   minnumeqmin, maxnumeqmax 
    104  
    105       INTEGER , POINTER, DIMENSION(:) ::   numeqmin   ! reference number of top equation 
    106       INTEGER , POINTER, DIMENSION(:) ::   numeqmax   ! reference number of bottom equation 
    107       INTEGER , POINTER, DIMENSION(:) ::   isnow      ! switch for presence (1) or absence (0) of snow 
    108  
    109       !! * New local variables        
    110       REAL(wp), POINTER, DIMENSION(:,:) ::   ztcond_i   !Ice thermal conductivity 
    111       REAL(wp), POINTER, DIMENSION(:,:) ::   zradtr_i   !Radiation transmitted through the ice 
    112       REAL(wp), POINTER, DIMENSION(:,:) ::   zradab_i   !Radiation absorbed in the ice 
    113       REAL(wp), POINTER, DIMENSION(:,:) ::   zkappa_i   !Kappa factor in the ice 
    114  
    115       REAL(wp), POINTER, DIMENSION(:,:) ::   zradtr_s   !Radiation transmited through the snow 
    116       REAL(wp), POINTER, DIMENSION(:,:) ::   zradab_s   !Radiation absorbed in the snow 
    117       REAL(wp), POINTER, DIMENSION(:,:) ::   zkappa_s   !Kappa factor in the snow 
    118  
    119       REAL(wp), POINTER, DIMENSION(:,:) ::   ztiold      !Old temperature in the ice 
    120       REAL(wp), POINTER, DIMENSION(:,:) ::   zeta_i      !Eta factor in the ice  
    121       REAL(wp), POINTER, DIMENSION(:,:) ::   ztitemp     !Temporary temperature in the ice to check the convergence 
    122       REAL(wp), POINTER, DIMENSION(:,:) ::   zspeche_i   !Ice specific heat 
    123       REAL(wp), POINTER, DIMENSION(:,:) ::   z_i         !Vertical cotes of the layers in the ice 
    124  
    125       REAL(wp), POINTER, DIMENSION(:,:) ::   zeta_s      !Eta factor in the snow 
    126       REAL(wp), POINTER, DIMENSION(:,:) ::   ztstemp     !Temporary temperature in the snow to check the convergence 
    127       REAL(wp), POINTER, DIMENSION(:,:) ::   ztsold      !Temporary temperature in the snow 
    128       REAL(wp), POINTER, DIMENSION(:,:) ::   z_s         !Vertical cotes of the layers in the snow 
    129  
    130       REAL(wp), POINTER, DIMENSION(:,:)   ::   zindterm    ! Independent term 
    131       REAL(wp), POINTER, DIMENSION(:,:)   ::   zindtbis    ! temporary independent term 
    132       REAL(wp), POINTER, DIMENSION(:,:)   ::   zdiagbis 
    133       REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrid       ! tridiagonal system terms 
    134  
    135       REAL(wp), POINTER, DIMENSION(:) ::   ztfs        ! ice melting point 
    136       REAL(wp), POINTER, DIMENSION(:) ::   ztsuold     ! old surface temperature (before the iterative procedure ) 
    137       REAL(wp), POINTER, DIMENSION(:) ::   ztsuoldit   ! surface temperature at previous iteration 
    138       REAL(wp), POINTER, DIMENSION(:) ::   zh_i        ! ice layer thickness 
    139       REAL(wp), POINTER, DIMENSION(:) ::   zh_s        ! snow layer thickness 
    140       REAL(wp), POINTER, DIMENSION(:) ::   zfsw        ! solar radiation absorbed at the surface 
    141       REAL(wp), POINTER, DIMENSION(:) ::   zf          ! surface flux function 
    142       REAL(wp), POINTER, DIMENSION(:) ::   dzf         ! derivative of the surface flux function 
    143  
     104      INTEGER, DIMENSION(kiut) ::   numeqmin   ! reference number of top equation 
     105      INTEGER, DIMENSION(kiut) ::   numeqmax   ! reference number of bottom equation 
     106      INTEGER, DIMENSION(kiut) ::   isnow      ! switch for presence (1) or absence (0) of snow 
    144107      REAL(wp) ::   zeps      =  1.e-10_wp    ! 
    145108      REAL(wp) ::   zg1s      =  2._wp        ! for the tridiagonal system 
     
    150113      REAL(wp) ::   zkimin    =  0.10_wp      ! minimum ice thermal conductivity 
    151114      REAL(wp) ::   zht_smin  =  1.e-4_wp     ! minimum snow depth 
    152  
    153115      REAL(wp) ::   ztmelt_i    ! ice melting temperature 
    154116      REAL(wp) ::   zerritmax   ! current maximal error on temperature  
    155       REAL(wp), POINTER, DIMENSION(:) ::   zerrit       ! current error on temperature  
    156       REAL(wp), POINTER, DIMENSION(:) ::   zdifcase     ! case of the equation resolution (1->4) 
    157       REAL(wp), POINTER, DIMENSION(:) ::   zftrice      ! solar radiation transmitted through the ice 
    158       REAL(wp), POINTER, DIMENSION(:) ::   zihic, zhsu 
     117      REAL(wp), DIMENSION(kiut) ::   ztfs        ! ice melting point 
     118      REAL(wp), DIMENSION(kiut) ::   ztsuold     ! old surface temperature (before the iterative procedure ) 
     119      REAL(wp), DIMENSION(kiut) ::   ztsuoldit   ! surface temperature at previous iteration 
     120      REAL(wp), DIMENSION(kiut) ::   zh_i        ! ice layer thickness 
     121      REAL(wp), DIMENSION(kiut) ::   zh_s        ! snow layer thickness 
     122      REAL(wp), DIMENSION(kiut) ::   zfsw        ! solar radiation absorbed at the surface 
     123      REAL(wp), DIMENSION(kiut) ::   zf          ! surface flux function 
     124      REAL(wp), DIMENSION(kiut) ::   dzf         ! derivative of the surface flux function 
     125      REAL(wp), DIMENSION(kiut) ::   zerrit      ! current error on temperature 
     126      REAL(wp), DIMENSION(kiut) ::   zdifcase    ! case of the equation resolution (1->4) 
     127      REAL(wp), DIMENSION(kiut) ::   zftrice     ! solar radiation transmitted through the ice 
     128      REAL(wp), DIMENSION(kiut) ::   zihic, zhsu 
     129      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztcond_i    ! Ice thermal conductivity 
     130      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zradtr_i    ! Radiation transmitted through the ice 
     131      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zradab_i    ! Radiation absorbed in the ice 
     132      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zkappa_i    ! Kappa factor in the ice 
     133      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztiold      ! Old temperature in the ice 
     134      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zeta_i      ! Eta factor in the ice 
     135      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztitemp     ! Temporary temperature in the ice to check the convergence 
     136      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zspeche_i   ! Ice specific heat 
     137      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   z_i         ! Vertical cotes of the layers in the ice 
     138      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zradtr_s    ! Radiation transmited through the snow 
     139      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zradab_s    ! Radiation absorbed in the snow 
     140      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zkappa_s    ! Kappa factor in the snow 
     141      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zeta_s       ! Eta factor in the snow 
     142      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   ztstemp      ! Temporary temperature in the snow to check the convergence 
     143      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   ztsold       ! Temporary temperature in the snow 
     144      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   z_s          ! Vertical cotes of the layers in the snow 
     145      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zindterm   ! Independent term 
     146      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zindtbis   ! temporary independent term 
     147      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zdiagbis 
     148      REAL(wp), DIMENSION(kiut,jkmax+2,3) ::   ztrid   ! tridiagonal system terms 
    159149      !!------------------------------------------------------------------ 
    160       ! 
    161       CALL wrk_alloc( kiut, numeqmin, numeqmax, isnow )   ! integer 
    162       CALL wrk_alloc( kiut,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztiold, zeta_i, ztitemp, zspeche_i, z_i, kjstart=0 ) 
    163       CALL wrk_alloc( kiut,nlay_s+1, zradtr_s, zradab_s, zkappa_s, zeta_s, ztstemp, ztsold, z_s, kjstart=0 ) 
    164       CALL wrk_alloc( kiut,jkmax+2, zindterm, zindtbis, zdiagbis ) 
    165       CALL wrk_alloc( kiut,jkmax+2,3, ztrid ) 
    166       CALL wrk_alloc( kiut, ztfs, ztsuold, ztsuoldit, zh_i, zh_s, zfsw, zf, dzf ) 
    167       CALL wrk_alloc( kiut, zerrit, zdifcase, zftrice, zihic, zhsu ) 
    168  
     150       
     151      !  
    169152      !------------------------------------------------------------------------------! 
    170153      ! 1) Initialization                                                            ! 
     
    772755      ENDIF 
    773756      ! 
    774       CALL wrk_dealloc( kiut, numeqmin, numeqmax, isnow )   ! integer 
    775       CALL wrk_dealloc( kiut,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztiold, zeta_i, ztitemp, zspeche_i, z_i, kjstart=0 ) 
    776       CALL wrk_dealloc( kiut,nlay_s+1, zradtr_s, zradab_s, zkappa_s, zeta_s, ztstemp, ztsold, z_s, kjstart=0 ) 
    777       CALL wrk_dealloc( kiut,jkmax+2, zindterm, zindtbis, zdiagbis ) 
    778       CALL wrk_dealloc( kiut,jkmax+2,3, ztrid ) 
    779       CALL wrk_dealloc( kiut, ztfs, ztsuold, ztsuoldit, zh_i, zh_s, zfsw, zf, dzf ) 
    780       CALL wrk_dealloc( kiut, zerrit, zdifcase, zftrice, zihic, zhsu ) 
    781  
    782757   END SUBROUTINE lim_thd_dif 
    783758 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90

    r3294 r3570  
    174174         ELSE 
    175175            DO jk = 1, initad 
    176                CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0ow (:,:), sxopw(:,:),   &             !--- ice open water area 
     176               CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0ow (:,:), sxopw(:,:),   &             !--- ice open water area 
    177177                  &                                       sxxopw(:,:), syopw(:,:), syyopw(:,:), sxyopw(:,:)  ) 
    178                CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0ow (:,:), sxopw(:,:),   & 
     178               CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0ow (:,:), sxopw(:,:),   & 
    179179                  &                                       sxxopw(:,:), syopw(:,:), syyopw(:,:), sxyopw(:,:)  ) 
    180180               DO jl = 1, jpl 
    181                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0ice(:,:,jl), sxice(:,:,jl),   &    !--- ice volume  --- 
     181                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0ice(:,:,jl), sxice(:,:,jl),   &    !--- ice volume  --- 
    182182                     &                                       sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl)  ) 
    183                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0ice(:,:,jl), sxice(:,:,jl),   & 
     183                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0ice(:,:,jl), sxice(:,:,jl),   & 
    184184                     &                                       sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl)  ) 
    185                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0sn (:,:,jl), sxsn (:,:,jl),   &    !--- snow volume  --- 
     185                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0sn (:,:,jl), sxsn (:,:,jl),   &    !--- snow volume  --- 
    186186                     &                                       sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl)  ) 
    187                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0sn (:,:,jl), sxsn (:,:,jl),   & 
     187                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0sn (:,:,jl), sxsn (:,:,jl),   & 
    188188                     &                                       sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl)  ) 
    189                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0sm (:,:,jl), sxsal(:,:,jl),   &    !--- ice salinity --- 
     189                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0sm (:,:,jl), sxsal(:,:,jl),   &    !--- ice salinity --- 
    190190                     &                                       sxxsal(:,:,jl), sysal(:,:,jl), syysal(:,:,jl), sxysal(:,:,jl)  ) 
    191                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0sm (:,:,jl), sxsal(:,:,jl),   & 
     191                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0sm (:,:,jl), sxsal(:,:,jl),   & 
    192192                     &                                       sxxsal(:,:,jl), sysal(:,:,jl), syysal(:,:,jl), sxysal(:,:,jl)  ) 
    193193 
    194                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0oi (:,:,jl), sxage(:,:,jl),   &   !--- ice age      --- 
     194                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0oi (:,:,jl), sxage(:,:,jl),   &   !--- ice age      --- 
    195195                     &                                       sxxage(:,:,jl), syage(:,:,jl), syyage(:,:,jl), sxyage(:,:,jl)  ) 
    196                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0oi (:,:,jl), sxage(:,:,jl),   & 
     196                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0oi (:,:,jl), sxage(:,:,jl),   & 
    197197                     &                                       sxxage(:,:,jl), syage(:,:,jl), syyage(:,:,jl), sxyage(:,:,jl)  ) 
    198                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0a  (:,:,jl), sxa  (:,:,jl),   &   !--- ice concentrations --- 
     198                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0a  (:,:,jl), sxa  (:,:,jl),   &   !--- ice concentrations --- 
    199199                     &                                       sxxa  (:,:,jl), sya  (:,:,jl), syya  (:,:,jl), sxya  (:,:,jl)  ) 
    200                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0a  (:,:,jl), sxa  (:,:,jl),   & 
     200                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0a  (:,:,jl), sxa  (:,:,jl),   & 
    201201                     &                                       sxxa  (:,:,jl), sya  (:,:,jl), syya  (:,:,jl), sxya  (:,:,jl)  ) 
    202                   CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0c0 (:,:,jl), sxc0 (:,:,jl),   &  !--- snow heat contents --- 
     202                  CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0c0 (:,:,jl), sxc0 (:,:,jl),   &  !--- snow heat contents --- 
    203203                     &                                       sxxc0 (:,:,jl), syc0 (:,:,jl), syyc0 (:,:,jl), sxyc0 (:,:,jl)  ) 
    204                   CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0c0 (:,:,jl), sxc0 (:,:,jl),   & 
     204                  CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0c0 (:,:,jl), sxc0 (:,:,jl),   & 
    205205                     &                                       sxxc0 (:,:,jl), syc0 (:,:,jl), syyc0 (:,:,jl), sxyc0 (:,:,jl)  ) 
    206206                  DO layer = 1, nlay_i                                                           !--- ice heat contents --- 
    207                      CALL lim_adv_y( zusnit, v_ice, rzero, zsm, zs0e(:,:,layer,jl), sxe (:,:,layer,jl),   &  
     207                     CALL lim_adv_y( zusnit, v_ice, rone , zsm, zs0e(:,:,layer,jl), sxe (:,:,layer,jl),   &  
    208208                        &                                       sxxe(:,:,layer,jl), sye (:,:,layer,jl),   & 
    209209                        &                                       syye(:,:,layer,jl), sxye(:,:,layer,jl) ) 
    210                      CALL lim_adv_x( zusnit, u_ice, rone , zsm, zs0e(:,:,layer,jl), sxe (:,:,layer,jl),   &  
     210                     CALL lim_adv_x( zusnit, u_ice, rzero, zsm, zs0e(:,:,layer,jl), sxe (:,:,layer,jl),   &  
    211211                        &                                       sxxe(:,:,layer,jl), sye (:,:,layer,jl),   & 
    212212                        &                                       syye(:,:,layer,jl), sxye(:,:,layer,jl) ) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OFF_SRC/domain.F90

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

    r3294 r3570  
    5353            CYCLE 
    5454         CASE(jp_frs) 
    55             CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_idx(ib_bdy) ) 
     55            CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy) ) 
    5656         CASE DEFAULT 
    5757            CALL ctl_stop( 'bdy_ice_lim_2 : unrecognised option for open boundaries for ice fields' ) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90

    r3294 r3570  
    332332      !!---------------------------------------------------------------------- 
    333333      USE oce,     vt  =>   ua   ! use ua as workspace 
    334       USE oce,     vs  =>   ua   ! use ua as workspace 
     334      USE oce,     vs  =>   va   ! use va as workspace 
    335335      IMPLICIT none 
    336336      !! 
     
    378378                     zv = ( vn(ji,jj,jk) + vn(ji,jj-1,jk) ) * 0.5_wp 
    379379#endif  
    380                      vt(:,jj,jk) = zv * tsn(:,jj,jk,jp_tem) 
    381                      vs(:,jj,jk) = zv * tsn(:,jj,jk,jp_sal) 
     380                     vt(ji,jj,jk) = zv * tsn(ji,jj,jk,jp_tem) 
     381                     vs(ji,jj,jk) = zv * tsn(ji,jj,jk,jp_sal) 
    382382                  END DO 
    383383               END DO 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r3294 r3570  
    171171         z3d(:,:,jpk) = 0.e0 
    172172         DO jk = 1, jpkm1 
    173             z3d(:,:,jk) = rau0 * un(:,:,jk) * e1u(:,:) * fse3u(:,:,jk) 
     173            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) 
    174174         END DO 
    175175         CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction 
     
    186186         CALL iom_put( "u_heattr", z2d )                  ! heat transport in i-direction 
    187187         DO jk = 1, jpkm1 
    188             z3d(:,:,jk) = rau0 * vn(:,:,jk) * e2v(:,:) * fse3v(:,:,jk) 
     188            z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) 
    189189         END DO 
    190190         CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90

    r2715 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

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

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90

    r3294 r3570  
    118118      IF( PRESENT(tab2d_1) )   ztab2d_1(:,:)        = tab2d_1(:,:) 
    119119      IF( PRESENT(tab2d_2) )   ztab2d_2(:,:)        = tab2d_2(:,:) 
    120       IF( PRESENT(tab3d_1) )   ztab3d_1(:,:,1:kdir) = tab3d_1(:,:,:) 
    121       IF( PRESENT(tab3d_2) )   ztab3d_2(:,:,1:kdir) = tab3d_2(:,:,:) 
     120      IF( PRESENT(tab3d_1) )   ztab3d_1(:,:,1:kdir) = tab3d_1(:,:,1:kdir) 
     121      IF( PRESENT(tab3d_2) )   ztab3d_2(:,:,1:kdir) = tab3d_2(:,:,1:kdir) 
    122122      IF( PRESENT(mask1)   )   zmask1  (:,:,:)      = mask1  (:,:,:) 
    123123      IF( PRESENT(mask2)   )   zmask2  (:,:,:)      = mask2  (:,:,:) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r3294 r3570  
    272272      !                                            !==  Misc. Options  ==! 
    273273       
    274       SELECT CASE( nn_ice )                                     ! Update heat and freshwater fluxes over sea-ice areas 
    275       CASE(  1 )   ;       CALL sbc_ice_if   ( kt )                  ! Ice-cover climatology ("Ice-if" model) 
    276          !                                                       
    277       CASE(  2 )   ;       CALL sbc_ice_lim_2( kt, nsbc )            ! LIM-2 ice model 
    278          IF( lk_bdy )      CALL bdy_ice_lim_2( kt )                  ! BDY boundary condition 
    279          !                                                      
    280       CASE(  3 )   ;       CALL sbc_ice_lim  ( kt, nsbc )            ! LIM-3 ice model 
    281          ! 
    282       CASE(  4 )   ;       CALL sbc_ice_cice ( kt, nsbc )            ! CICE ice model 
     274      SELECT CASE( nn_ice )                                       ! Update heat and freshwater fluxes over sea-ice areas 
     275      CASE(  1 )   ;         CALL sbc_ice_if   ( kt )                ! Ice-cover climatology ("Ice-if" model) 
     276      CASE(  2 )   ;         CALL sbc_ice_lim_2( kt, nsbc )          ! LIM-2 ice model 
     277              IF( lk_bdy )   CALL bdy_ice_lim_2( kt )                ! BDY boundary condition 
     278      CASE(  3 )   ;         CALL sbc_ice_lim  ( kt, nsbc )          ! LIM-3 ice model 
     279      CASE(  4 )   ;         CALL sbc_ice_cice ( kt, nsbc )          ! CICE ice model 
    283280      END SELECT                                               
    284281 
    285       IF( ln_rnf       )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes 
     282      IF( ln_rnf         )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes 
    286283  
    287       IF( ln_ssr       )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term 
    288  
    289       IF( nn_fwb  /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
    290  
    291       IF( nclosea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain  
    292       !                                                         ! (update freshwater fluxes) 
     284      IF( ln_ssr         )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term 
     285 
     286      IF( nn_fwb    /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     287 
     288      IF( nn_closea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain  
     289      !                                                           ! (update freshwater fluxes) 
    293290!RBbug do not understand why see ticket 667 
    294291      CALL lbc_lnk( emp, 'T', 1. ) 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90

    r3294 r3570  
    225225            DO jj = 2, jpjm1 
    226226               DO ji = fs_2, fs_jpim1  ! vector opt. 
    227                   zw3d(ji,jj,jk) = (psiy_eiv(ji,jj,jk) - psiy_eiv(ji,jj-1,jk))/e2v(ji,jj) + & 
    228                        &    (psix_eiv(ji,jj,jk) - psix_eiv(ji-1,jj,jk))/e1u(ji,jj) ! w_eiv = dpsiy/dy + dpsiy/dx 
     227                  zw3d(ji,jj,jk) = (psiy_eiv(ji,jj,jk) - psiy_eiv(ji,jj-1,jk))/e2t(ji,jj) + & 
     228                       &    (psix_eiv(ji,jj,jk) - psix_eiv(ji-1,jj,jk))/e1t(ji,jj) ! w_eiv = dpsiy/dy + dpsiy/dx 
    229229               END DO 
    230230            END DO 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90

    r3294 r3570  
    227227      ENDIF 
    228228      ! 
    229       !                              ! allocate zdfddm arrays 
     229      !                               ! allocate zdfddm arrays 
    230230      IF( zdf_ddm_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'zdf_ddm_init : unable to allocate arrays' ) 
     231      !                               ! initialization to masked Kz 
     232      avs(:,:,:) = rn_avt0 * tmask(:,:,:)  
    231233      ! 
    232234   END SUBROUTINE zdf_ddm_init 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/lib_fortran.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r3490 r3570  
    413413         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    414414         WRITE(numout,*) '      benchmark parameter (0/1)       nn_bench   = ', nn_bench 
     415         WRITE(numout,*) '      timing activated    (0/1)       nn_timing  = ', nn_timing 
    415416      ENDIF 
    416417      ! 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/OPA_SRC/timing.F90

    r3294 r3570  
    7676   LOGICAL :: ln_onefile = .TRUE.  
    7777   LOGICAL :: lwriter 
    78  
    7978   !!---------------------------------------------------------------------- 
    8079   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    322321      IF( lwriter ) WRITE(numtime,*) 'Total timing (sum) :' 
    323322      IF( lwriter ) WRITE(numtime,*) '--------------------' 
    324       IF( lwriter ) WRITE(numtime,*) 'Elapsed Time (s)  ','CPU Time (s)' 
    325       IF( lwriter ) WRITE(numtime,'(5x,f12.3,2x,f12.3)')  tot_etime, tot_ctime 
     323      IF( lwriter ) WRITE(numtime,"('Elapsed Time (s)  CPU Time (s)')") 
     324      IF( lwriter ) WRITE(numtime,'(5x,f12.3,1x,f12.3)')  tot_etime, tot_ctime 
    326325      IF( lwriter ) WRITE(numtime,*)  
    327326#if defined key_mpp_mpi 
     
    406405      TYPE(timer), POINTER :: sl_timer_ave      => NULL() 
    407406      INTEGER :: icode 
     407      INTEGER :: ierr 
    408408      LOGICAL :: ll_ord            
    409409      CHARACTER(len=200) :: clfmt               
    410410                  
    411411      ! Initialised the global strucutre    
    412       ALLOCATE(sl_timer_glob_root) 
    413       ALLOCATE(sl_timer_glob_root%cname     (jpnij)) 
    414       ALLOCATE(sl_timer_glob_root%tsum_cpu  (jpnij)) 
    415       ALLOCATE(sl_timer_glob_root%tsum_clock(jpnij)) 
    416       ALLOCATE(sl_timer_glob_root%niter     (jpnij)) 
     412      ALLOCATE(sl_timer_glob_root, Stat=ierr) 
     413      IF(ierr /= 0)THEN 
     414         WRITE(numtime,*) 'Failed to allocate global timing structure in waver_info' 
     415         RETURN 
     416      END IF 
     417 
     418      ALLOCATE(sl_timer_glob_root%cname     (jpnij), & 
     419               sl_timer_glob_root%tsum_cpu  (jpnij), & 
     420               sl_timer_glob_root%tsum_clock(jpnij), & 
     421               sl_timer_glob_root%niter     (jpnij), Stat=ierr) 
     422      IF(ierr /= 0)THEN 
     423         WRITE(numtime,*) 'Failed to allocate global timing structure in waver_info' 
     424         RETURN 
     425      END IF 
    417426      sl_timer_glob_root%cname(:)       = '' 
    418427      sl_timer_glob_root%tsum_cpu(:)   = 0._wp 
     
    421430      sl_timer_glob_root%next => NULL() 
    422431      sl_timer_glob_root%prev => NULL() 
    423       ALLOCATE(sl_timer_glob) 
    424       ALLOCATE(sl_timer_glob%cname     (jpnij)) 
    425       ALLOCATE(sl_timer_glob%tsum_cpu  (jpnij)) 
    426       ALLOCATE(sl_timer_glob%tsum_clock(jpnij)) 
    427       ALLOCATE(sl_timer_glob%niter     (jpnij)) 
     432      !ARPDBG - don't need to allocate a pointer that's immediately then 
     433      !         set to point to some other object. 
     434      !ALLOCATE(sl_timer_glob) 
     435      !ALLOCATE(sl_timer_glob%cname     (jpnij)) 
     436      !ALLOCATE(sl_timer_glob%tsum_cpu  (jpnij)) 
     437      !ALLOCATE(sl_timer_glob%tsum_clock(jpnij)) 
     438      !ALLOCATE(sl_timer_glob%niter     (jpnij)) 
    428439      sl_timer_glob => sl_timer_glob_root 
    429440      ! 
     
    451462         sl_timer_ave => sl_timer_ave_root             
    452463      ENDIF  
    453        
     464 
    454465      ! Gather info from all processors 
    455466      s_timer => s_timer_root 
     
    467478                         sl_timer_glob%niter, 1, MPI_INTEGER,   & 
    468479                         0, MPI_COMM_OPA, icode) 
     480 
    469481         IF( narea == 1 .AND. ASSOCIATED(s_timer%next) ) THEN 
    470482            ALLOCATE(sl_timer_glob%next) 
     
    479491         s_timer => s_timer%next 
    480492      END DO       
     493 
     494         WRITE(*,*) 'ARPDBG: timing: done gathers' 
    481495       
    482496      IF( narea == 1 ) THEN     
     
    500514            ENDIF 
    501515            sl_timer_glob => sl_timer_glob%next                                 
    502          END DO          
     516         END DO 
     517 
     518         WRITE(*,*) 'ARPDBG: timing: done computing stats' 
    503519       
    504          ! reorder the avearged list by CPU time       
     520         ! reorder the averaged list by CPU time       
    505521         s_wrk => NULL() 
    506522         sl_timer_ave => sl_timer_ave_root 
     
    509525            sl_timer_ave => sl_timer_ave_root 
    510526            DO WHILE( ASSOCIATED( sl_timer_ave%next ) ) 
    511             IF( .NOT. ASSOCIATED(sl_timer_ave%next) ) EXIT 
     527 
     528               IF( .NOT. ASSOCIATED(sl_timer_ave%next) ) EXIT 
     529 
    512530               IF ( sl_timer_ave%tsum_clock < sl_timer_ave%next%tsum_clock ) THEN  
    513531                  ALLOCATE(s_wrk) 
     532                  ! Copy data into the new object pointed to by s_wrk 
    514533                  s_wrk = sl_timer_ave%next 
     534                  ! Insert this new timer object before our current position 
    515535                  CALL insert  (sl_timer_ave, sl_timer_ave_root, s_wrk) 
     536                  ! Remove the old object from the list 
    516537                  CALL suppress(sl_timer_ave%next)             
    517538                  ll_ord = .FALSE. 
    518539                  CYCLE             
    519540               ENDIF            
    520             IF( ASSOCIATED(sl_timer_ave%next) ) sl_timer_ave => sl_timer_ave%next 
     541               IF( ASSOCIATED(sl_timer_ave%next) ) sl_timer_ave => sl_timer_ave%next 
    521542            END DO          
    522            IF( ll_ord ) EXIT 
     543            IF( ll_ord ) EXIT 
    523544         END DO 
    524545 
    525546         ! write averaged info 
    526          WRITE(numtime,*) 'Averaged timing on all processors :' 
    527          WRITE(numtime,*) '-----------------------------------' 
    528          WRITE(numtime,*) 'Section             ',                & 
    529          &   'Elapsed Time (s)  ','Elapsed Time (%)  ',          & 
    530          &   'CPU Time(s)  ','CPU Time (%)  ','CPU/Elapsed  ',   & 
    531          &   'Max Elapsed (%)  ','Min elapsed (%)  ',            &            
    532          &   'Frequency'  
     547         WRITE(numtime,"('Averaged timing on all processors :')") 
     548         WRITE(numtime,"('-----------------------------------')") 
     549         WRITE(numtime,"('Section',13x,'Elap. Time(s)',2x,'Elap. Time(%)',2x, & 
     550         &   'CPU Time(s)',2x,'CPU Time(%)',2x,'CPU/Elap',1x,   & 
     551         &   'Max elap(%)',2x,'Min elap(%)',2x,            &            
     552         &   'Freq')") 
    533553         sl_timer_ave => sl_timer_ave_root   
    534          clfmt = '(1x,a,4x,f12.3,6x,f12.3,x,f12.3,2x,f12.3,6x,f7.3,5x,f12.3,5x,f12.3,2x,f9.2)' 
     554         clfmt = '((A),E15.7,2x,f6.2,5x,f12.2,5x,f6.2,5x,f7.2,2x,f12.2,4x,f6.2,2x,f9.2)' 
    535555         DO WHILE ( ASSOCIATED(sl_timer_ave) ) 
    536             WRITE(numtime,TRIM(clfmt))   sl_timer_ave%cname,                            & 
     556            WRITE(numtime,TRIM(clfmt))   sl_timer_ave%cname(1:18),                            & 
    537557            &   sl_timer_ave%tsum_clock,sl_timer_ave%tsum_clock*100.*jpnij/tot_etime,   & 
    538558            &   sl_timer_ave%tsum_cpu  ,sl_timer_ave%tsum_cpu*100.*jpnij/tot_ctime  ,   & 
     
    712732      !!---------------------------------------------------------------------- 
    713733      l_initdone = .TRUE.  
    714       IF(lwp) WRITE(numout,*) 
    715       IF(lwp) WRITE(numout,*) 'timing_reset : instrumented routines for timing' 
    716       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    717       CALL timing_list(s_timer_root) 
    718       WRITE(numout,*) 
     734!      IF(lwp) WRITE(numout,*) 
     735!      IF(lwp) WRITE(numout,*) 'timing_reset : instrumented routines for timing' 
     736!      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     737!      CALL timing_list(s_timer_root) 
     738!      WRITE(numout,*) 
    719739      ! 
    720740   END SUBROUTINE timing_reset 
     
    734754      !!---------------------------------------------------------------------- 
    735755      !!               ***  ROUTINE insert  *** 
    736       !! ** Purpose :   insert an element in  imer structure 
     756      !! ** Purpose :   insert an element in timer structure 
    737757      !!---------------------------------------------------------------------- 
    738758      TYPE(timer), POINTER, INTENT(inout) :: sd_current, sd_root, sd_ptr 
     
    740760      
    741761      IF( ASSOCIATED( sd_current, sd_root ) ) THEN 
     762         ! If our current element is the root element then 
     763         ! replace it with the one being inserted 
    742764         sd_root => sd_ptr 
    743765      ELSE 
     
    747769      sd_ptr%prev     => sd_current%prev 
    748770      sd_current%prev => sd_ptr 
     771      ! Nullify the pointer to the new element now that it is held 
     772      ! within the list. If we don't do this then a subsequent call 
     773      ! to ALLOCATE memory to this pointer will fail. 
     774      sd_ptr => NULL() 
    749775      !     
    750776   END SUBROUTINE insert 
     
    764790      IF ( ASSOCIATED(sl_temp%next) ) sl_temp%next%prev => sl_temp%prev 
    765791      DEALLOCATE(sl_temp) 
     792      sl_temp => NULL() 
    766793      ! 
    767794    END SUBROUTINE suppress 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zsink.F90

    r3295 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/NEMO/TOP_SRC/TRP/trdmod_trc.F90

    r3294 r3570  
    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_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE

    r3294 r3570  
    5454#  Run the parallel MPI executable  
    5555# 
     56  if [ MPI_FLAG == "yes" ]; then 
    5657  echo "Running time ${MPIRUN} ./opa" 
    57 # 
    58   if [ MPI_FLAG == "yes" ]; then 
    5958     time ${MPIRUN} ./opa 
    6059  else 
     60  echo "Running time ./opa" 
    6161     time ./opa 
    6262  fi 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER

    r3493 r3570  
    5757#  Run the parallel MPI executable  
    5858# 
     59  if [ MPI_FLAG == "yes" ]; then 
    5960  echo "Running time ${MPIRUN} ./opa" 
    60 # 
    61   if [ MPI_FLAG == "yes" ]; then 
    6261     time ${MPIRUN} ./opa 
    6362#cbr     mpirun -np $OCEANCORES ./opa 
    6463  else 
     64  echo "Running time ./opa" 
    6565     time ./opa 
    6666  fi 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template

    r3294 r3570  
    6464#  Run the parallel MPI executable  
    6565# 
     66  if [ MPI_FLAG == "yes" ]; then 
    6667  echo "Running time ${MPIRUN} ./opa" 
    67 # 
    68  
    69   if [ MPI_FLAG == "yes" ]; then 
    7068     time ${MPIRUN} ./opa 
    7169  else 
     70  echo "Running time./opa" 
    7271     time ./opa 
    7372  fi 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg

    r3294 r3570  
    1 ORCA2_LIM_AGRIF_nemo_v3.3.tar 
     1ORCA2_LIM_nemo_v3.4.tar 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/iodef_sette.xml

    r3294 r3570  
    209209 
    210210     <group id="ptrc_T" axis_ref="deptht" grid_ref="grid_T">   
    211        <field id="DIC"      description="Dissolved inorganic Concentration"        unit="molC/L"     /> 
    212        <field id="Alkalini" description="Total Alkalinity Concentration"           unit="eq/L"       /> 
    213        <field id="O2"       description="Oxygen Concentration"                     unit="molO2/L"    /> 
    214        <field id="CaCO3"    description="Calcite Concentration"                    unit="molC/L"     /> 
    215        <field id="PO4"      description="Phosphate Concentration"                  unit="molC/L"     /> 
    216        <field id="POC"      description="Small organic carbon Concentration"       unit="molC/L"     /> 
    217        <field id="Si"       description="Silicate Concentration"                   unit="molSi/L"    /> 
    218        <field id="PHY"      description="Nanophytoplankton Concentration"          unit="molC/L"     /> 
    219        <field id="ZOO"      description="Microzooplankton Concentration"           unit="molC/L"     /> 
    220        <field id="DOC"      description="Dissolved organic Concentration"          unit="molC/L"     /> 
    221        <field id="PHY2"     description="Diatoms Concentration"                    unit="molC/L"     /> 
    222        <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="molC/L"     /> 
    223        <field id="BSi"      description="Diatoms Silicate Concentration"           unit="molC/L"     /> 
    224        <field id="Fer"      description="Dissolved Iron Concentration"             unit="molFe/L"    /> 
    225        <field id="BFe"      description="Big iron particles Concentration"         unit="molFe/L"    /> 
    226        <field id="GOC"      description="Big organic carbon Concentration"         unit="molC/L"     /> 
    227        <field id="SFe"      description="Small iron particles Concentration"       unit="molFe/L"    /> 
    228        <field id="DFe"      description="Diatoms iron  Concentration"              unit="molFe/L"    /> 
    229        <field id="DSi"      description="Sinking biogenic Silicate Concentration"  unit="molC/L"     /> 
    230        <field id="NFe"      description="Nano iron Concentration"                  unit="molC/L"     /> 
    231        <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="gChl/L"     /> 
    232        <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="gChl/L"     /> 
    233        <field id="NO3"      description="Nitrates Concentration"                   unit="molC/L"     /> 
    234        <field id="NH4"      description="Ammonium Concentration"                   unit="molC/L"     /> 
    235        <field id="DET"      description="Detritus"                                 unit="mmole-N/m3" /> 
    236        <field id="ZOO"      description="Zooplankton Concentration"                unit="mmole-N/m3" /> 
    237        <field id="PHY"      description="Phytoplankton Concentration"              unit="mmole-N/m3" /> 
    238        <field id="NO3"      description="Nitrate Concentration"                    unit="mmole-N/m3" /> 
    239        <field id="NH4"      description="Ammonium Concentration"                   unit="mmole-N/m3" /> 
    240        <field id="DOM"      description="Dissolved Organic Matter"                 unit="mmole-N/m3" /> 
    241  
     211       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="mmol/m3" /> 
     212       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="mmol/m3"    /> 
     213       <field id="O2"       description="Oxygen Concentration"                     unit="mmol/m3" /> 
     214       <field id="CaCO3"    description="Calcite Concentration"                    unit="mmol/m3" /> 
     215       <field id="PO4"      description="Phosphate Concentration"                  unit="mmol/m3" /> 
     216       <field id="POC"      description="Small organic carbon Concentration"       unit="mmol/m3" /> 
     217       <field id="Si"       description="Silicate Concentration"                   unit="mmol/m3" /> 
     218       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="mmol/m3" /> 
     219       <field id="ZOO"      description="Microzooplankton Concentration"           unit="mmol/m3" /> 
     220       <field id="DOC"      description="Dissolved organic Concentration"          unit="mmol/m3" /> 
     221       <field id="PHY2"     description="Diatoms Concentration"                    unit="mmol/m3" /> 
     222       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="mmol/m3" /> 
     223       <field id="DSi"      description="Diatoms Silicate Concentration"           unit="mmol/m3" /> 
     224       <field id="Fer"      description="Dissolved Iron Concentration"             unit="mmol/m3" /> 
     225       <field id="BFe"      description="Big iron particles Concentration"         unit="mmol/m3" /> 
     226       <field id="GOC"      description="Big organic carbon Concentration"         unit="mmol/m3" /> 
     227       <field id="SFe"      description="Small iron particles Concentration"       unit="mmol/m3" /> 
     228       <field id="DFe"      description="Diatoms iron  Concentration"              unit="mmol/m3" /> 
     229       <field id="GSi"      description="Sinking biogenic Silicate Concentration"  unit="mmol/m3" /> 
     230       <field id="NFe"      description="Nano iron Concentration"                  unit="mmol/m3" /> 
     231       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="mg/m3" /> 
     232       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="mg/m3" /> 
     233       <field id="NO3"      description="Nitrates Concentration"                   unit="mmol/m3" /> 
     234       <field id="NH4"      description="Ammonium Concentration"                   unit="mmol/m3" /> 
    242235     </group> 
    243236 
     
    245238 
    246239     <group id="diad_T" axis_ref="none" grid_ref="grid_T"> 
    247        <field id="PH"          description="PH"                                       unit="-"           axis_ref="deptht" /> 
    248        <field id="CO3"         description="Bicarbonates"                             unit="mol/L"       axis_ref="deptht" /> 
    249        <field id="CO3sat"      description="CO3 saturation"                           unit="mol/L"       axis_ref="deptht" /> 
    250        <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"        axis_ref="deptht" /> 
     240       <field id="PH"          description="PH"                                       unit="-"          axis_ref="deptht" /> 
     241       <field id="CO3"         description="Bicarbonates"                             unit="mol/m3"     axis_ref="deptht" /> 
     242       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/m3"     axis_ref="deptht" /> 
     243       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"       axis_ref="deptht" /> 
    251244       <field id="PPPHY"       description="Primary production of nanophyto"          unit="molC/m3/s"   axis_ref="deptht" /> 
    252245       <field id="PPPHY2"      description="Primary production of diatoms"            unit="molC/m3/s"   axis_ref="deptht" /> 
    253246       <field id="PPNEWN"      description="New Primary production of nanophyto"      unit="molC/m3/s"   axis_ref="deptht" /> 
    254247       <field id="PPNEWD"      description="New Primary production of diatoms"        unit="molC/m3/s"   axis_ref="deptht" /> 
    255        <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"  axis_ref="deptht" /> 
    256        <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"  axis_ref="deptht" /> 
    257        <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"  axis_ref="deptht" /> 
     248       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"   axis_ref="deptht" /> 
     249       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"   axis_ref="deptht" /> 
     250       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"   axis_ref="deptht" /> 
     251       <field id="xfracal"     description="Calcifying fraction"                      unit="-"          axis_ref="deptht" /> 
    258252       <field id="PCAL"        description="Calcite production"                       unit="molC/m3/s"   axis_ref="deptht" /> 
    259253       <field id="DCAL"        description="Calcite dissolution"                      unit="molC/m3/s"   axis_ref="deptht" /> 
    260        <field id="GRAZ"        description="Grazing by zooplankton"                   unit="molC/m3/s"   axis_ref="deptht" /> 
    261        <field id="Nfix"        description="Nitrogen fixation at surface"             unit="molN/m2/s"       /> 
    262        <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="molC/m2/s"       /> 
    263        <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="molFe/m2/s"      /> 
    264        <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="molSi/m2/s"      /> 
    265        <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="molC/m2/s"       /> 
    266        <field id="Cflx"        description="DIC flux"                                 unit="molC/m2/s"       /> 
    267        <field id="Oflx"        description="Oxygen flux"                              unit="molC/m2/s"       /> 
    268        <field id="Kg"          description="Gas transfer"                             unit="molC/m2/s/uatm"  /> 
    269        <field id="Dpco2"       description="Delta CO2"                                unit="uatm"            /> 
    270        <field id="Dpo2"        description="Delta O2"                                 unit="uatm"            /> 
    271        <field id="Heup"        description="Euphotic layer depth"                     unit="m"               /> 
    272        <field id="Irondep"     description="Iron deposition"                          unit="molFe/m2/s"      /> 
    273        <field id="FNO3PHY"     description="FNO3PHY"                                  unit="-"           axis_ref="deptht" />  
    274        <field id="FNH4PHY"     description="FNH4PHY"                                  unit="-"           axis_ref="deptht" />  
    275        <field id="FNH4NO3"     description="FNH4NO3"                                  unit="-"           axis_ref="deptht" />  
    276        <field id="TNO3PHY"     description="TNO3PHY"                                  unit="-"  />  
    277        <field id="TNH4PHY"     description="TNH4PHY"                                  unit="-"  />  
    278        <field id="TPHYDOM"     description="TPHYDOM"                                  unit="-"  />  
    279        <field id="TPHYNH4"     description="TPHYNH4"                                  unit="-"  />  
    280        <field id="TPHYZOO"     description="TPHYZOO"                                  unit="-"  />  
    281        <field id="TPHYDET"     description="TPHYDET"                                  unit="-"  />  
    282        <field id="TDETZOO"     description="TDETZOO"                                  unit="-"  />  
    283        <field id="TDETSED"     description="TDETSED"                                  unit="-"  />  
    284        <field id="TZOODET"     description="TZOODET"                                  unit="-"  />  
    285        <field id="TZOOBOD"     description="TZOOBOD"                                  unit="-"  />  
    286        <field id="TZOONH4"     description="TZOONH4"                                  unit="-"  />  
    287        <field id="TZOODOM"     description="TZOODOM"                                  unit="-"  />  
    288        <field id="TNH4NO3"     description="TNH4NO3"                                  unit="-"  />  
    289        <field id="TDOMNH4"     description="TDOMNH4"                                  unit="-"  />  
    290        <field id="TDETNH4"     description="TDETNH4"                                  unit="-"  />  
    291        <field id="TPHYTOT"     description="TPHYTOT"                                  unit="-"  />  
    292        <field id="TZOOTOT"     description="TZOOTOT"                                  unit="-"  />  
    293        <field id="TDETDOM"     description="TDETDOM"                                  unit="-"  />  
    294        <field id="SEDPOC"      description="SEDPOC"                                   unit="-"  />  
     254       <field id="GRAZ1"       description="Grazing by microzooplankton"              unit="molC/m3/s"   axis_ref="deptht" /> 
     255       <field id="GRAZ2"       description="Grazing by mesozooplankton"              unit="molC/m3/s"   axis_ref="deptht" /> 
     256       <field id="REMIN"       description="Oxic remineralization of OM"             unit="molC/m3/s"   axis_ref="deptht" /> 
     257       <field id="DENIT"       description="Anoxic remineralization of OM"           unit="molC/m3/s"   axis_ref="deptht" /> 
     258       <field id="Nfix"        description="Nitrogen fixation"                         unit="molN/m3/s"   axis_ref="deptht" /> 
     259       <field id="Mumax"       description="Maximum growth rate"                      unit="s-1"        axis_ref="deptht" /> 
     260       <field id="MuN"         description="Realized growth rate for nanophyto"       unit="s-1"        axis_ref="deptht" /> 
     261       <field id="MuD"         description="Realized growth rate for diatomes"        unit="s-1"        axis_ref="deptht" /> 
     262       <field id="LNnut"       description="Nutrient limitation term in Nanophyto"    unit="-"          axis_ref="deptht" /> 
     263       <field id="LDnut"       description="Nutrient limitation term in Diatoms"      unit="-"          axis_ref="deptht" /> 
     264       <field id="LNFe"        description="Iron limitation term in Nanophyto"        unit="-"          axis_ref="deptht" /> 
     265       <field id="LDFe"        description="Iron limitation term in Diatoms"          unit="-"          axis_ref="deptht" /> 
     266       <field id="LNlight"     description="Light limitation term in Nanophyto"       unit="-"          axis_ref="deptht" /> 
     267       <field id="LDlight"     description="Light limitation term in Diatoms"         unit="-"          axis_ref="deptht" /> 
     268       <field id="Fe2"        description="Iron II concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     269       <field id="Fe3"        description="Iron III concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     270       <field id="FeL1"        description="Complexed Iron concentration with L1"       unit="nmol/L"   axis_ref="deptht" /> 
     271       <field id="FeL2"        description="Complexed Iron concentration with L2"       unit="nmol/L"   axis_ref="deptht" /> 
     272       <field id="FeP"        description="Precipitated Iron III"                      unit="nmol/L"   axis_ref="deptht" /> 
     273       <field id="TL1"        description="Total L1 concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     274       <field id="TL2"        description="Total L2 concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     275       <field id="pdust"        description="dust concentration"                      unit="g/L"    /> 
     276       <field id="Totlig"        description="Total ligand concentation"                unit="nmol/L"   axis_ref="deptht" /> 
     277       <field id="Biron"        description="Bioavailable iron"                       unit="nmol/L"   axis_ref="deptht" /> 
     278       <field id="Sdenit"        description="Nitrate reduction in the sediments"     unit="molN/m2/s"      /> 
     279       <field id="Ironice"     description="Iron input/uptake due to sea ice"             unit="molFe/m2/s"      /> 
     280       <field id="HYDR"       description="Iron input from hydrothemal vents"          unit="molFe/m2/s"      /> 
     281       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="mol/m2/s"                     /> 
     282       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="mol/m2/s"                     /> 
     283       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="mol/m2/s"                     /> 
     284       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="mol/m2/s"                     /> 
     285       <field id="Cflx"        description="DIC flux"                                 unit="mol/m2/s"                     /> 
     286       <field id="Oflx"        description="Oxygen flux"                              unit="mol/m2/s"                     /> 
     287       <field id="Kg"          description="Gas transfer"                             unit="mol/m2/s/uatm"                /> 
     288       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"                         /> 
     289       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"                         /> 
     290       <field id="Heup"        description="Euphotic layer depth"                     unit="m"                            /> 
     291       <field id="Irondep"     description="Iron deposition from dust"                 unit="mol/m2/s"                     /> 
     292       <field id="Ironsed"     description="Iron deposition from sediment"             unit="mol/m2/s"  axis_ref="deptht"  /> 
    295293     </group> 
    296294        
     
    549547  </context> 
    550548   
     549 
     550  <context id="1_nemo"> 
     551     
     552    <!-- $id$ --> 
     553 
     554    <!--  
     555============================================================================================================ 
     556=                                  definition of all existing variables                                    = 
     557=                                            DO NOT CHANGE                                                 = 
     558============================================================================================================ 
     559    --> 
     560     
     561    <field_definition level="1" prec="4" operation="ave(X)" enabled=".TRUE."> <!-- time step automaticaly defined --> 
     562 
     563      <!-- T grid --> 
     564       
     565      <group id="grid_T" axis_ref="none" grid_ref="grid_T"> 
     566   <field id="toce"         description="temperature"                               unit="degC" axis_ref="deptht"   /> 
     567         <field id="soce"         description="salinity"                                  unit="psu"  axis_ref="deptht"   /> 
     568   <field id="sst"          description="sea surface temperature"                   unit="degC"                     /> 
     569   <field id="sst2"         description="square of sea surface temperature"         unit="degC2"                    /> 
     570   <field id="sstgrad"      description="module of sst gradient"                    unit="degC/m"                   /> 
     571   <field id="sstgrad2"     description="square of module of sst gradient"          unit="degC2/m2"                 /> 
     572   <field id="sss"          description="sea surface salinity"                      unit="psu"                      /> 
     573   <field id="sss2"         description="square of sea surface salinity"            unit="psu2"                     /> 
     574   <field id="ssh"          description="sea surface height"                        unit="m"                        /> 
     575   <field id="ssh2"         description="square of sea surface height"              unit="m2"                       /> 
     576   <field id="mldkz5"       description="mixing layer depth (Turbocline)"           unit="m"                        /> 
     577   <field id="mldr10_1"     description="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        /> 
     578         <field id="rhop"         description="potential density (sigma0)"                unit="kg/m3" axis_ref="deptht"  /> 
     579   <!-- next variables available with key_diahth --> 
     580   <field id="mlddzt"       description="Thermocline Depth (max dT/dz)"             unit="m"                        /> 
     581   <field id="mldr10_3"     description="Mixed Layer Depth dr=0.03 (ref.10m)"       unit="m"                        /> 
     582   <field id="mldr0_1"      description="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        /> 
     583   <field id="mldr0_3"      description="Mixed Layer Depth dr=0.03 (ref.surf)"      unit="m"                        /> 
     584   <field id="mld_dt02"     description="Mixed Layer Depth |dt|=0.2 (ref.10m)"      unit="m"                        /> 
     585   <field id="topthdep"     description="Top of the thermocline dt=-0.2 (ref.10m)"  unit="m"                        /> 
     586   <field id="pycndep"      description="Pycnocline depth dr~dt=-0.2 (ref.10m)"     unit="m"                        /> 
     587   <field id="BLT"          description="Barrier Layer Thickness"                   unit="m"                        /> 
     588   <field id="tinv"         description="Max of vertical invertion of temperature"  unit="degC"                     /> 
     589   <field id="depti"        description="Depth of max. vert. inv. of temperature"   unit="m"                        /> 
     590        <field id="20d"          description="Depth of 20C isotherm"                     unit="m"                        /> 
     591   <field id="28d"          description="Depth of 28C isotherm"                     unit="m"                        /> 
     592   <field id="hc300"        description="Heat content 300 m"                        unit="W"                        /> 
     593   <!-- variables available with key_diaar5 --> 
     594   <field id="botpres"      description="Pressure at sea floor"                     unit="dbar"                     /> 
     595   <field id="cellthc"      description="Cell thickness"                            unit="m"     axis_ref="deptht"  /> 
     596     </group> 
     597 
     598      <!-- SBC --> 
     599       
     600      <group id="SBC" axis_ref="none" grid_ref="grid_T" > <!-- time step automaticaly defined based on nn_fsbc --> 
     601 
     602   <field id="empmr"        description="Net Upward Water Flux"                                        unit="kg/m2/s"  /> 
     603   <field id="empsmr"       description="concentration/dilution water flux"                            unit="kg/m2/s"  /> 
     604   <field id="snowpre"      description="Snow precipitation"                                           unit="kg/m2/s"  /> 
     605   <field id="runoffs"      description="River Runoffs"                                                unit="Kg/m2/s"  /> 
     606 
     607   <field id="qt"           description="Net Downward Heat Flux"                                       unit="W/m2"     /> 
     608   <field id="qns"          description="non solar Downward Heat Flux"                                 unit="W/m2"     /> 
     609   <field id="qsr"          description="Shortwave Radiation"                                          unit="W/m2"     /> 
     610   <field id="qsr3d"        description="Shortwave Radiation 3D distribution"        axis_ref="deptht" unit="W/m2"     /> 
     611   <field id="qrp"          description="Surface Heat Flux: Damping"                                   unit="W/m2"     /> 
     612   <field id="erp"          description="Surface Water Flux: Damping"                                  unit="Kg/m2/s"  /> 
     613   <field id="taum"         description="wind stress module"                                           unit="N/m2"     /> 
     614   <field id="wspd"         description="Wind speed module at 10 m"                                    unit="m/s"      /> 
     615 
     616        <!-- * variable relative to atmospheric pressure forcing : available with ln_apr_dyn --> 
     617        <field id="ssh_ib"       description="Inverse barometer sea surface height"                         unit="m"        /> 
     618    
     619   <!-- *_oce variables available with ln_blk_clio or ln_blk_core --> 
     620   <field id="qns_oce"      description="Non solar Downward Heat Flux over open ocean"                 unit="W/m2"     /> 
     621   <field id="qlw_oce"      description="Longwave Downward Heat Flux over open ocean"                  unit="W/m2"     /> 
     622   <field id="qsb_oce"      description="Sensible Downward Heat Flux over open ocean"                  unit="W/m2"     /> 
     623   <field id="qla_oce"      description="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     /> 
     624   <field id="taum_oce"     description="wind stress module over open ocean"                           unit="N/m2"     /> 
     625 
     626   <field id="ice_cover"    description="Ice fraction"                                                 unit="1"        /> 
     627 
     628   <field id="ioceflxb"     description="Oceanic flux at the ice base"                                 unit="W/m2"     /> 
     629   <field id="qsr_ai_cea"   description="Air-Ice downward solar heat flux (cell average)"              unit="W/m2"     /> 
     630   <field id="qns_ai_cea"   description="Air-Ice downward non-solar heat flux (cell average)"          unit="W/m2"     /> 
     631   <field id="qla_ai_cea"   description="Air-Ice downward Latent heat flux (cell average)"             unit="W/m2"     /> 
     632    
     633   <field id="qsr_io_cea"   description="Ice-Oce downward solar heat flux (cell average)"              unit="W/m2"     /> 
     634   <field id="qns_io_cea"   description="Ice-Oce downward non-solar heat flux (cell average)"          unit="W/m2"     /> 
     635    
     636   <field id="snowthic_cea" description="Snow thickness (cell average)"                                unit="m"        /> 
     637   <field id="icethic_cea"  description="Ice thickness (cell average)"                                 unit="m"        /> 
     638   <field id="iceprod_cea"  description="Ice production (cell average)"                                unit="m/s"      /> 
     639    
     640   <field id="ice_pres"     description="Ice presence"                                                 unit="-"        /> 
     641   <field id="ist_cea"      description="Ice surface temperature (cell average)"                       unit="degC"     /> 
     642   <field id="ist_ipa"      description="Ice surface temperature (ice presence average)"               unit="degC"     />       
     643   <field id="uice_ipa"     description="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />       
     644   <field id="vice_ipa"     description="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />       
     645    
     646   <field id="utau_ice"     description="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     /> 
     647   <field id="vtau_ice"     description="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     /> 
     648    
     649   <field id="u_imasstr"    description="Sea-ice mass transport along i-axis"                          unit="kg/s"     /> 
     650   <field id="v_imasstr"    description="Sea-ice mass transport along j-axis"                          unit="kg/s"     /> 
     651 
     652   <!-- available key_coupled --> 
     653   <field id="snow_ao_cea"  description="Snow over ice-free ocean (cell average)"                      unit="kg/m2/s"  /> 
     654   <field id="snow_ai_cea"  description="Snow over sea-ice (cell average)"                             unit="kg/m2/s"  /> 
     655   <field id="subl_ai_cea"  description="Sublimation over sea-ice (cell average)"                      unit="kg/m2/s"  /> 
     656   <field id="icealb_cea"   description="Ice albedo (cell average)"                                    unit="1"        /> 
     657   <field id="calving"      description="Calving"                                                      unit="kg/m2/s"  /> 
     658   <!-- available if key_coupled + conservative method --> 
     659   <field id="rain"         description="Liquid precipitation"                                         unit="Kg/m2/s"  /> 
     660   <field id="evap_ao_cea"  description="Evaporation over ice-free ocean (cell average)"               unit="kg/m2/s"  /> 
     661   <!-- variables available with key_diaar5 --> 
     662   <field id="isnwmlt_cea"   description="Snow over Ice melting (cell average)"                        unit="kg/m2/s"  /> 
     663   <field id="fsal_virt_cea" description="Virtual salt flux due to ice formation (cell average)"       unit="kg/m2/s"  /> 
     664   <field id="fsal_real_cea" description="Real salt flux due to ice formation (cell average)"          unit="kg/m2/s"  /> 
     665   <field id="hflx_rain_cea" description="heat flux due to rainfall"                                   unit="W/m2"     /> 
     666   <field id="hflx_evap_cea" description="heat flux due to evaporation"                                unit="W/m2"     /> 
     667   <field id="hflx_snow_cea" description="heat flux due to snow falling over ice-free ocean"           unit="W/m2"     /> 
     668   <field id="hflx_ice_cea"  description="heat flux due to ice thermodynamics"                         unit="W/m2"     /> 
     669   <field id="hflx_rnf_cea"  description="heat flux due to runoffs"                                    unit="W/m2"     /> 
     670   <field id="hflx_cal_cea"  description="heat flux due to calving"                                    unit="W/m2"     /> 
     671   <field id="bicemel_cea"  description="Rate of Melt at Sea Ice Base (cell average)"                  unit="kg/m2/s"  /> 
     672   <field id="licepro_cea"  description="Lateral Sea Ice Growth Rate (cell average)"                   unit="kg/m2/s"  /> 
     673   <field id="snowmel_cea"  description="Snow Melt Rate (cell average)"                                unit="kg/m2/s"  /> 
     674   <field id="sntoice_cea"  description="Snow-Ice Formation Rate (cell average)"                       unit="kg/m2/s"  /> 
     675   <field id="ticemel_cea"  description="Rate of Melt at Upper Surface of Sea Ice (cell average)"      unit="kg/m2/s"  /> 
     676 
     677      </group> 
     678 
     679      <!-- U grid --> 
     680       
     681      <group id="grid_U"  axis_ref="depthu" grid_ref="grid_U"> 
     682   <field id="utau"         description="Wind Stress along i-axis"                    unit="N/m2" axis_ref="none" /> 
     683   <field id="uoce"         description="ocean current along i-axis"                  unit="m/s"                  /> 
     684   <field id="uocetr_eff"   description="Effective ocean transport along i-axis"      unit="m3/s"                  /> 
     685   <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv --> 
     686   <field id="uoce_eiv"     description="EIV ocean current along i-axis"              unit="m/s"                  /> 
     687   <!-- uoce_eiv: available with key_trabbl --> 
     688   <field id="uoce_bbl"     description="BBL ocean current along i-axis"              unit="m/s"  axis_ref="none" /> 
     689   <field id="ahu_bbl"      description="BBL diffusive flux along i-axis"             unit="m3/s" axis_ref="none" /> 
     690   <!-- variables available with key_diaar5 --> 
     691   <field id="u_masstr"     description="ocean eulerian mass transport along i-axis"  unit="kg/s"                 /> 
     692   <field id="u_heattr"     description="ocean eulerian heat transport along i-axis"  unit="W"    axis_ref="none" /> 
     693   <field id="ueiv_heattr"  description="ocean bolus heat transport along i-axis"     unit="W"    axis_ref="none" /> 
     694   <field id="udiff_heattr" description="ocean diffusion heat transport along i-axis" unit="W"    axis_ref="none" /> 
     695     </group> 
     696       
     697      <!-- V grid --> 
     698       
     699      <group id="grid_V"  axis_ref="depthv" grid_ref="grid_V"> 
     700   <field id="vtau"         description="Wind Stress along j-axis"                    unit="N/m2" axis_ref="none" /> 
     701   <field id="voce"         description="ocean current along j-axis"                  unit="m/s"                  /> 
     702   <field id="vocetr_eff"   description="Effective ocean transport along j-axis"      unit="m3/s"                  /> 
     703   <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv --> 
     704   <field id="voce_eiv"     description="EIV ocean current along j-axis"              unit="m/s"                  /> 
     705   <!-- voce_eiv: available with key_trabbl --> 
     706   <field id="voce_bbl"     description="BBL ocean current along j-axis"              unit="m/s" axis_ref="none"  /> 
     707   <field id="ahv_bbl"      description="BBL diffusive flux along j-axis"             unit="m3/s" axis_ref="none" /> 
     708   <!-- variables available with key_diaar5 --> 
     709   <field id="v_masstr"     description="ocean eulerian mass transport along j-axis"  unit="kg/s"                 /> 
     710   <field id="v_heattr"     description="ocean eulerian heat transport along j-axis"  unit="W"    axis_ref="none" /> 
     711   <field id="veiv_heattr"  description="ocean bolus heat transport along j-axis"     unit="W"    axis_ref="none" /> 
     712   <field id="vdiff_heattr" description="ocean diffusion heat transport along j-axis" unit="W"    axis_ref="none" /> 
     713      </group> 
     714       
     715      <!-- W grid --> 
     716       
     717      <group id="grid_W"  axis_ref="depthw" grid_ref="grid_W"> 
     718   <field id="woce"         description="ocean vertical velocity"                     unit="m/s"                  /> 
     719   <field id="wocetr_eff"   description="effective ocean vertical transport"          unit="m3/s"                 /> 
     720   <!-- woce_eiv: available with key_traldf_eiv and key_diaeiv --> 
     721   <field id="woce_eiv"     description="EIV ocean vertical velocity"                 unit="m/s"                  /> 
     722   <!-- woce_eiv: available with key_trabbl_adv --> 
     723   <field id="avt"          description="vertical eddy diffusivity"                   unit="m2/s"                 /> 
     724   <field id="avm"          description="vertical eddy viscosity"                     unit="m2/s"                 /> 
     725   <!-- avs: available with key_zdfddm --> 
     726   <field id="avs"          description="salt vertical eddy diffusivity"              unit="m2/s"                 /> 
     727   <!-- avt_evd and avm_evd: available with ln_zdfevd --> 
     728   <field id="avt_evd"      description="enhanced vertical diffusivity"               unit="m2/s"                 /> 
     729   <field id="avm_evd"      description="enhanced vertical viscosity"                 unit="m2/s"                 /> 
     730   <!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d --> 
     731   <field id="aht2d"        description="lateral eddy diffusivity"                    unit="m2/s" axis_ref="none" /> 
     732   <field id="aht2d_eiv"    description="EIV lateral eddy diffusivity"                unit="m2/s" axis_ref="none" /> 
     733   <!-- avt_tide: available with key_zdftmx --> 
     734   <field id="av_tide"      description="tidal vertical diffusivity"                  unit="m2/s"                 /> 
     735   <!-- variables available with key_diaar5 -->    
     736   <field id="w_masstr"     description="vertical mass trasport"                      unit="kg/s"                 /> 
     737   <field id="w_masstr2"    description="square of vertical mass trasport"            unit="kg2/s2"               /> 
     738      </group> 
     739           
     740      <!-- scalar --> 
     741       
     742      <!-- variables available with key_diaar5 --> 
     743      <group id="scalar" axis_ref="none" grid_ref="scalarpoint" zoom_ref="1point" > 
     744   <field id="voltot"     description="global mean volume"                         unit="m3"   /> 
     745   <field id="sshtot"     description="global mean ssh"                            unit="m"    /> 
     746   <field id="sshsteric"  description="global mean ssh steric"                     unit="m"    /> 
     747   <field id="sshthster"  description="global mean ssh thermosteric"               unit="m"    /> 
     748   <field id="masstot"    description="global mean mass"                           unit="kg"   /> 
     749   <field id="temptot"    description="global mean temperature"                    unit="degC" /> 
     750   <field id="saltot"     description="global mean salinity"                       unit="psu"  /> 
     751   <field id="fram_trans" description="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" /> 
     752      </group> 
     753          
     754      <!-- ptrc on T grid --> 
     755 
     756     <group id="ptrc_T" axis_ref="deptht" grid_ref="grid_T">   
     757       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="mmol/m3" /> 
     758       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="mmol/m3"    /> 
     759       <field id="O2"       description="Oxygen Concentration"                     unit="mmol/m3" /> 
     760       <field id="CaCO3"    description="Calcite Concentration"                    unit="mmol/m3" /> 
     761       <field id="PO4"      description="Phosphate Concentration"                  unit="mmol/m3" /> 
     762       <field id="POC"      description="Small organic carbon Concentration"       unit="mmol/m3" /> 
     763       <field id="Si"       description="Silicate Concentration"                   unit="mmol/m3" /> 
     764       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="mmol/m3" /> 
     765       <field id="ZOO"      description="Microzooplankton Concentration"           unit="mmol/m3" /> 
     766       <field id="DOC"      description="Dissolved organic Concentration"          unit="mmol/m3" /> 
     767       <field id="PHY2"     description="Diatoms Concentration"                    unit="mmol/m3" /> 
     768       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="mmol/m3" /> 
     769       <field id="DSi"      description="Diatoms Silicate Concentration"           unit="mmol/m3" /> 
     770       <field id="Fer"      description="Dissolved Iron Concentration"             unit="mmol/m3" /> 
     771       <field id="BFe"      description="Big iron particles Concentration"         unit="mmol/m3" /> 
     772       <field id="GOC"      description="Big organic carbon Concentration"         unit="mmol/m3" /> 
     773       <field id="SFe"      description="Small iron particles Concentration"       unit="mmol/m3" /> 
     774       <field id="DFe"      description="Diatoms iron  Concentration"              unit="mmol/m3" /> 
     775       <field id="GSi"      description="Sinking biogenic Silicate Concentration"  unit="mmol/m3" /> 
     776       <field id="NFe"      description="Nano iron Concentration"                  unit="mmol/m3" /> 
     777       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="mg/m3" /> 
     778       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="mg/m3" /> 
     779       <field id="NO3"      description="Nitrates Concentration"                   unit="mmol/m3" /> 
     780       <field id="NH4"      description="Ammonium Concentration"                   unit="mmol/m3" /> 
     781     </group> 
     782 
     783      <!-- diad on T grid : variables available with key_diatrc --> 
     784 
     785     <group id="diad_T" axis_ref="none" grid_ref="grid_T"> 
     786       <field id="PH"          description="PH"                                       unit="-"          axis_ref="deptht" /> 
     787       <field id="CO3"         description="Bicarbonates"                             unit="mol/m3"     axis_ref="deptht" /> 
     788       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/m3"     axis_ref="deptht" /> 
     789       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"       axis_ref="deptht" /> 
     790       <field id="PPPHY"       description="Primary production of nanophyto"          unit="molC/m3/s"   axis_ref="deptht" /> 
     791       <field id="PPPHY2"      description="Primary production of diatoms"            unit="molC/m3/s"   axis_ref="deptht" /> 
     792       <field id="PPNEWN"      description="New Primary production of nanophyto"      unit="molC/m3/s"   axis_ref="deptht" /> 
     793       <field id="PPNEWD"      description="New Primary production of diatoms"        unit="molC/m3/s"   axis_ref="deptht" /> 
     794       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"   axis_ref="deptht" /> 
     795       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"   axis_ref="deptht" /> 
     796       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"   axis_ref="deptht" /> 
     797       <field id="xfracal"     description="Calcifying fraction"                      unit="-"          axis_ref="deptht" /> 
     798       <field id="PCAL"        description="Calcite production"                       unit="molC/m3/s"   axis_ref="deptht" /> 
     799       <field id="DCAL"        description="Calcite dissolution"                      unit="molC/m3/s"   axis_ref="deptht" /> 
     800       <field id="GRAZ1"       description="Grazing by microzooplankton"              unit="molC/m3/s"   axis_ref="deptht" /> 
     801       <field id="GRAZ2"       description="Grazing by mesozooplankton"              unit="molC/m3/s"   axis_ref="deptht" /> 
     802       <field id="REMIN"       description="Oxic remineralization of OM"             unit="molC/m3/s"   axis_ref="deptht" /> 
     803       <field id="DENIT"       description="Anoxic remineralization of OM"           unit="molC/m3/s"   axis_ref="deptht" /> 
     804       <field id="Nfix"        description="Nitrogen fixation"                         unit="molN/m3/s"   axis_ref="deptht" /> 
     805       <field id="Mumax"       description="Maximum growth rate"                      unit="s-1"        axis_ref="deptht" /> 
     806       <field id="MuN"         description="Realized growth rate for nanophyto"       unit="s-1"        axis_ref="deptht" /> 
     807       <field id="MuD"         description="Realized growth rate for diatomes"        unit="s-1"        axis_ref="deptht" /> 
     808       <field id="LNnut"       description="Nutrient limitation term in Nanophyto"    unit="-"          axis_ref="deptht" /> 
     809       <field id="LDnut"       description="Nutrient limitation term in Diatoms"      unit="-"          axis_ref="deptht" /> 
     810       <field id="LNFe"        description="Iron limitation term in Nanophyto"        unit="-"          axis_ref="deptht" /> 
     811       <field id="LDFe"        description="Iron limitation term in Diatoms"          unit="-"          axis_ref="deptht" /> 
     812       <field id="LNlight"     description="Light limitation term in Nanophyto"       unit="-"          axis_ref="deptht" /> 
     813       <field id="LDlight"     description="Light limitation term in Diatoms"         unit="-"          axis_ref="deptht" /> 
     814       <field id="Fe2"        description="Iron II concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     815       <field id="Fe3"        description="Iron III concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     816       <field id="FeL1"        description="Complexed Iron concentration with L1"       unit="nmol/L"   axis_ref="deptht" /> 
     817       <field id="FeL2"        description="Complexed Iron concentration with L2"       unit="nmol/L"   axis_ref="deptht" /> 
     818       <field id="FeP"        description="Precipitated Iron III"                      unit="nmol/L"   axis_ref="deptht" /> 
     819       <field id="TL1"        description="Total L1 concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     820       <field id="TL2"        description="Total L2 concentration"                      unit="nmol/L"   axis_ref="deptht" /> 
     821       <field id="pdust"        description="dust concentration"                      unit="g/L"    /> 
     822       <field id="Totlig"        description="Total ligand concentation"                unit="nmol/L"   axis_ref="deptht" /> 
     823       <field id="Biron"        description="Bioavailable iron"                       unit="nmol/L"   axis_ref="deptht" /> 
     824       <field id="Sdenit"        description="Nitrate reduction in the sediments"     unit="molN/m2/s"      /> 
     825       <field id="Ironice"     description="Iron input/uptake due to sea ice"             unit="molFe/m2/s"      /> 
     826       <field id="HYDR"       description="Iron input from hydrothemal vents"          unit="molFe/m2/s"      /> 
     827       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="mol/m2/s"                     /> 
     828       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="mol/m2/s"                     /> 
     829       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="mol/m2/s"                     /> 
     830       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="mol/m2/s"                     /> 
     831       <field id="Cflx"        description="DIC flux"                                 unit="mol/m2/s"                     /> 
     832       <field id="Oflx"        description="Oxygen flux"                              unit="mol/m2/s"                     /> 
     833       <field id="Kg"          description="Gas transfer"                             unit="mol/m2/s/uatm"                /> 
     834       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"                         /> 
     835       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"                         /> 
     836       <field id="Heup"        description="Euphotic layer depth"                     unit="m"                            /> 
     837       <field id="Irondep"     description="Iron deposition from dust"                 unit="mol/m2/s"                     /> 
     838       <field id="Ironsed"     description="Iron deposition from sediment"             unit="mol/m2/s"  axis_ref="deptht"  /> 
     839     </group> 
     840        
     841    </field_definition> 
     842     
     843    <!--  
     844============================================================================================================ 
     845=                                           output files definition                                        = 
     846=                                            Define your own files                                         = 
     847=                                         put the variables you want...                                    = 
     848============================================================================================================ 
     849    --> 
     850     
     851    <file_definition > 
     852 
     853      <group id="1h" output_freq="3600"   output_level="10" enabled=".TRUE.">                      <!-- 1h files --> 
     854      </group> 
     855       
     856      <group id="2h" output_freq="7200"   output_level="10" enabled=".TRUE.">                      <!-- 2h files --> 
     857      </group> 
     858       
     859      <group id="3h" output_freq="10800"  output_level="10" enabled=".TRUE.">                      <!-- 3h files --> 
     860      </group> 
     861       
     862      <group id="4h" output_freq="14400"  output_level="10" enabled=".TRUE.">                      <!-- 4h files --> 
     863      </group> 
     864       
     865      <group id="6h" output_freq="21600"  output_level="10" enabled=".TRUE.">                      <!-- 6h files --> 
     866      </group> 
     867       
     868      <group id="1d" output_freq="86400"  output_level="10" enabled=".TRUE.">                      <!-- 1d files --> 
     869      </group> 
     870       
     871      <group id="3d" output_freq="259200" output_level="10" enabled=".TRUE.">                      <!-- 3d files --> 
     872      </group> 
     873       
     874      <group id="5d" output_freq="432000" output_level="10" enabled=".TRUE.">                      <!-- 5d files --> 
     875      </group> 
     876       
     877      <group id="1m" output_freq="-1"     output_level="10" enabled=".TRUE.">                      <!-- real monthly files --> 
     878      </group> 
     879 
     880      <group id="2m" output_freq="-2"     output_level="10" enabled=".TRUE.">                      <!-- real 2m files --> 
     881      </group> 
     882 
     883      <group id="3m" output_freq="-3"     output_level="10" enabled=".TRUE.">                      <!-- real 3m files --> 
     884      </group> 
     885 
     886      <group id="4m" output_freq="-4"     output_level="10" enabled=".TRUE.">                      <!-- real 4m files --> 
     887      </group> 
     888 
     889      <group id="6m" output_freq="-6"     output_level="10" enabled=".TRUE.">                      <!-- real 6m files --> 
     890      </group> 
     891 
     892      <group id="1y" output_freq="-12"    output_level="10" enabled=".TRUE.">                      <!-- real yearly files --> 
     893      </group> 
     894 
     895      <group id="2y"  output_freq="-24"   output_level="10" enabled=".TRUE.">                      <!-- real 2y files --> 
     896      </group> 
     897 
     898      <group id="5y"  output_freq="-60"   output_level="10" enabled=".TRUE.">                      <!-- real 5y files --> 
     899      </group> 
     900 
     901      <group id="10y" output_freq="-120"  output_level="10" enabled=".TRUE.">                      <!-- real 10y files --> 
     902      </group> 
     903 
     904    </file_definition> 
     905     
     906    <!--  
     907============================================================================================================ 
     908=                                           grid definition                                                = 
     909=                                            DO NOT CHANGE                                                 = 
     910============================================================================================================ 
     911    --> 
     912     
     913    <axis_definition>   
     914      <axis id="deptht" description="Vertical T levels" unit="m" positive=".false." /> 
     915      <axis id="depthu" description="Vertical U levels" unit="m" positive=".false." /> 
     916      <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 
     917      <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 
     918      <axis id="none" description="axe non defini" unit="none" size="1" /> 
     919    </axis_definition>  
     920     
     921    <grid_definition> 
     922      <grid id="grid_T" description="grid T" > 
     923    <!--   Eq section   --> 
     924        <zoom id="EqT" ibegin="1" jbegin="0000" ni="0000" nj="1" /> 
     925    <!--   TAO   --> 
     926      <!--   137e   --> 
     927        <zoom id="2n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     928        <zoom id="5n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     929        <zoom id="8n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     930      <!--   147e   --> 
     931        <zoom id="0n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     932        <zoom id="2n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     933        <zoom id="5n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     934      <!--   156e   --> 
     935        <zoom id="5s156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     936        <zoom id="2s156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     937        <zoom id="0n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     938        <zoom id="2n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     939        <zoom id="5n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     940        <zoom id="8n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     941      <!--   165e   --> 
     942        <zoom id="8s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     943        <zoom id="5s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     944        <zoom id="2s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     945        <zoom id="0n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     946        <zoom id="2n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     947        <zoom id="5n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     948        <zoom id="8n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     949      <!--   180w   --> 
     950        <zoom id="8s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     951        <zoom id="5s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     952        <zoom id="2s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     953        <zoom id="0n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     954        <zoom id="2n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     955        <zoom id="5n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     956        <zoom id="8n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     957      <!--   170w   --> 
     958        <zoom id="8s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     959        <zoom id="5s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     960        <zoom id="2s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     961        <zoom id="0n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     962        <zoom id="2n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     963        <zoom id="5n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     964        <zoom id="8n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     965      <!--   155w   --> 
     966        <zoom id="8s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     967        <zoom id="5s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     968        <zoom id="2s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     969        <zoom id="0n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     970        <zoom id="2n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     971        <zoom id="5n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     972        <zoom id="8n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     973      <!--   140w   --> 
     974        <zoom id="8s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     975        <zoom id="5s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     976        <zoom id="2s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     977        <zoom id="0n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     978        <zoom id="2n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     979        <zoom id="5n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     980        <zoom id="8n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     981      <!--   125w   --> 
     982        <zoom id="8s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     983        <zoom id="5s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     984        <zoom id="2s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     985        <zoom id="0n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     986        <zoom id="2n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     987        <zoom id="5n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     988        <zoom id="8n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     989      <!--   110w   --> 
     990        <zoom id="8s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     991        <zoom id="5s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     992        <zoom id="2s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     993        <zoom id="0n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     994        <zoom id="2n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     995        <zoom id="5n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     996        <zoom id="8n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     997      <!--   95w   --> 
     998        <zoom id="8s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     999        <zoom id="5s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1000        <zoom id="2s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1001        <zoom id="0n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1002        <zoom id="2n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1003        <zoom id="5n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1004        <zoom id="8n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1005    <!--   RAMA   --> 
     1006      <!--   55e   --> 
     1007        <zoom id="16s55eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1008        <zoom id="12s55eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1009        <zoom id="8s55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1010        <zoom id="4s55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1011        <zoom id="1.5s55eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1012        <zoom id="0n55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1013        <zoom id="1.5n55eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1014        <zoom id="4n55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1015      <!--   65e   --> 
     1016        <zoom id="15n65eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1017      <!--   67e   --> 
     1018        <zoom id="16s67eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1019        <zoom id="12s67eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1020        <zoom id="8s67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1021        <zoom id="4s67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1022        <zoom id="1.5s67eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1023        <zoom id="0n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1024        <zoom id="1.5n67eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1025        <zoom id="4n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1026        <zoom id="8n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1027      <!--   80.5e   --> 
     1028        <zoom id="16s80.5eT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1029        <zoom id="12s80.5eT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1030        <zoom id="8s80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1031        <zoom id="4s80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1032        <zoom id="1.5s80.5eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1033        <zoom id="0n80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1034        <zoom id="1.5n80.5eT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1035        <zoom id="4n80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1036      <!--   90e   --> 
     1037        <zoom id="1.5s90eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1038        <zoom id="0n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1039        <zoom id="1.5n90eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1040        <zoom id="4n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1041        <zoom id="8n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1042        <zoom id="12n90eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1043        <zoom id="15n90eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1044      <!--   95e   --> 
     1045        <zoom id="16s95eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1046        <zoom id="12s95eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1047        <zoom id="8s95eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1048        <zoom id="5s95eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1049    <!--   PIRATA   --> 
     1050      <!--   38w-30w   --> 
     1051        <zoom id="19s34wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1052        <zoom id="14s32wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1053        <zoom id="8s30wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1054        <zoom id="0n35wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1055        <zoom id="4n38wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1056        <zoom id="8n38wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1057        <zoom id="12n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1058        <zoom id="15n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1059        <zoom id="20n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1060      <!--   23w   --> 
     1061        <zoom id="0n23wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1062        <zoom id="4n23wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1063        <zoom id="12n23wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1064        <zoom id="21n23wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1065      <!--   10w   --> 
     1066        <zoom id="10s10wT" ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1067        <zoom id="6s10wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1068        <zoom id="0n10wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1069      <!--   0e   --> 
     1070        <zoom id="0n0eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" /> 
     1071      </grid> 
     1072 
     1073      <grid id="grid_U" description="grid U" > 
     1074    <!--   Eq section   --> 
     1075        <zoom id="EqU" ibegin="1" jbegin="0000" ni="0000" nj="1" /> 
     1076      </grid> 
     1077 
     1078      <grid id="grid_V" description="grid V" > 
     1079      </grid> 
     1080 
     1081      <grid id="grid_W" description="grid W" > 
     1082    <!--   Eq section   --> 
     1083        <zoom id="EqW" ibegin="1" jbegin="0000" ni="0000" nj="1" /> 
     1084      </grid> 
     1085 
     1086      <grid id="scalarpoint" description="scalar" > 
     1087        <zoom id="1point" ibegin="1" jbegin="1" ni="1" nj="1" /> 
     1088      </grid> 
     1089 
     1090 
     1091    </grid_definition>     
     1092     
     1093</context> 
     1094 
    5511095</simulation> 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/prepare_job.sh

    r3492 r3570  
    11##################################################### 
    2 # Author : Italo Epicoco for NEMO 
    3 # Contact : italo.epicoco@unisalento.it 
    4 # 
    5 # Some scripts called by sette.sh  
    6 # prepare_job.sh   : create the job script for running job  
     2# Author : Simona Flavoni for NEMO 
     3# Contact : sflod@locean-ipsl.upmc.fr 
     4# 
     5# ---------------------------------------------------------------------- 
     6# NEMO/SETTE , NEMO Consortium (2010) 
     7# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     8# ---------------------------------------------------------------------- 
     9# 
     10# Some scripts called by sette.sh 
     11# prepare_job.sh   : creates the job script for running job  
    712###################################################### 
    8 #set -x 
     13#set -vx 
    914set -o posix 
    1015#set -u 
    1116#set -e 
    12 # 
     17#+ 
    1318# 
    1419# ================ 
     
    1621# ================ 
    1722# 
    18 # -------------------------- 
    19 # create the job script for NEMO tests  
    20 # -------------------------- 
     23# ------------------------------------------------- 
     24# script that creates the job script for NEMO tests  
     25# ------------------------------------------------- 
    2126# 
    2227# SYNOPSIS 
     
    2530# :: 
    2631# 
    27 #  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
     32#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE 
    2833# 
    2934# 
     
    3136# =========== 
    3237# 
    33 # Simple job for SET TESTS for NEMO (SETTE) 
     38# Part of the SETTE package to run tests for NEMO 
    3439#  
    35 #   get input files (if needed) : tar file   
    36 #  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 
    37 # 
    38 #   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
    39 # 
    40 #   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
    41 # 
    42 #   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 
     40# prepare the script $JOB_FILE to run the tests  
    4341# 
    4442# EXAMPLES 
     
    4745# :: 
    4846# 
    49 #  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
    50 # 
    51 #  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun 
    52 #  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no 
    53 # 
    54 #  run a job of config ORCA2_LIM_PISCES   with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun 
    55 #  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes 
     47#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE 
     48# 
     49# prepare the $JOB_FILE for execution  
    5650# 
    5751# 
     
    6559# ========== 
    6660# 
    67 # $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $ 
     61# $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $ 
    6862# 
    6963# 
     
    7468# 
    7569 
    76 usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG" 
    77 usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes" 
     70usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE" 
     71usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE" 
    7872 
    7973 
     
    8175        if [ ${#} -lt ${minargcount} ] 
    8276        then 
    83                 echo "not enought arguments for fcm_job.sh script" 
    84                 echo "control number of argument of fcm_job.sh in sette.sh" 
     77                echo "not enough arguments for prepare_job.sh script" 
     78                echo "control number of argument of prepare_job.sh in sette.sh" 
    8579                echo "${usage}" 
    8680        exit 1 
     
    165159    exit 1 
    166160fi 
    167 #if [ ${NB_PROC} == 1 ] ; then 
    168 #    echo "running opa" >> ${SETTE_DIR}/output.sette 
    169 #    echo "            " >> ${SETTE_DIR}/output.sette 
    170 #    ./opa 
    171 # 
    172 # Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree 
    173 # 
    174 #    post_test_tidyup 
    175 #else 
    176 #    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette 
    177 #    echo "            " >> ${SETTE_DIR}/output.sette 
    178  
    179 #    if [ ${MPI_INTERACT} == "yes" ] ; then 
    180 #  # 
    181 #  # example for brodie (NEC SX8) machine 
    182 #  #  mpirun -np ${NB_PROC} opa 
    183 #  # example for dedale machine 
    184 #  #  mpirun --mca btl self,tcp -np ${NB_PROC} opa 
    185 #  # example for vargas (IBM Power6) machine 
    186 #  mpiexec -n ${NB_PROC} opa 
    187 #  # 
    188 #  post_test_tidyup 
    189 #    fi 
    190 # 
     161 
    191162# example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
    192163# 
    193   #  if [ ${MPI_INTERACT} == "no" ] ; then 
     164  #  if [ ${MPI_FLAG} == "no" ] ; then 
    194165      case ${COMPILER} in  
    195166         ALTIX_NAUTILUS_MPT) 
     
    198169               # number of processes required is an integer multiple of 4 
    199170               # 
    200                NB_NODES=$( echo $NB_PROC | awk '{print $1  $1 / 4}') 
     171               NB_NODES=$( echo $NB_PROC | awk '{print $1 / 4}') 
    201172            else 
    202173               # 
     
    238209# Pass settings into job file by using sed to edit predefined strings 
    239210# 
    240          ((mem=5*NB_PROC)) 
    241          echo NB_NODES NB_PROC QUEUE ${NB_NODES} ${NB_PROC} ${QUEUE} 
    242         cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCSNODE/${NB_PROC_NODE}/" \ 
    243              -e"s/NPROCS/${NB_PROC}/" \ 
    244              -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 
     211        cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \ 
    245212             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 
    246213             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 
     
    266233   fi 
    267234    
    268    chmod a+x $JOB_FILE 
     235   chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready" 
    269236 
    270237#fi 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh

    r3492 r3570  
    129129#- 
    130130# Compiler among those in NEMOGCM/ARCH 
    131 COMPILER=ifort_MERCATOR_CLUSTER 
    132 export BATCH_COMMAND_PAR="qsub " 
     131COMPILER=PW6_VARGAS 
     132export BATCH_COMMAND_PAR="llsubmit" 
    133133export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
    134  
     134export INTERACT_FLAG="no" 
     135export MPIRUN_FLAG="yes" 
    135136 
    136137# Directory to run the tests 
     
    154155    export TEST_NAME="LONG" 
    155156    cd ${SETTE_DIR} 
    156     . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER -j 8   
    157     cd ${SETTE_DIR} 
    158     . param.cfg 
    159     . all_functions.sh 
    160     . prepare_exe_dir.sh 
    161     JOB_FILE=${EXE_DIR}/run_job.sh 
    162     MPIRUN_FLAG="yes" 
    163     NPROC=1 
    164     rm $JOB_FILE 
     157    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER add_key "key_mpp_mpi" 
     158    cd ${SETTE_DIR} 
     159    . param.cfg 
     160    . all_functions.sh 
     161    . prepare_exe_dir.sh 
     162    JOB_FILE=${EXE_DIR}/run_job.sh 
     163    NPROC=4 
     164    \rm ${JOB_FILE} 
    165165    cd ${EXE_DIR} 
    166166    set_namelist namelist cn_exp \"GYRELOB_LONG\" 
     
    171171    set_namelist namelist nn_solv 2 
    172172    set_namelist namelist_top ln_diatrc .false. 
    173     cd ${SETTE_DIR} 
    174     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
     173    set_namelist namelist jpni 2 
     174    set_namelist namelist jpnj 2 
     175    set_namelist namelist jpnij 4 
     176    cd ${SETTE_DIR} 
     177    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    175178 
    176179    cd ${SETTE_DIR} 
     
    186189    set_namelist namelist ln_clobber .true. 
    187190    set_namelist namelist nn_solv 2 
    188     ln -s -f ..\/LONG\/GYRELOB_LONG_00000060_restart.nc 
    189     ln -s -f ..\/LONG\/GYRELOB_LONG_00000060_restart_trc.nc 
     191    set_namelist namelist jpni 2 
     192    set_namelist namelist jpnj 2 
     193    set_namelist namelist jpnij 4 
    190194    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\" 
     195    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\" 
    191196    set_namelist namelist_top ln_diatrc .false. 
    192197    set_namelist namelist_top ln_rsttr .true. 
    193198    set_namelist namelist_top nn_rsttr 2 
    194     set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\" 
    195     cd ${SETTE_DIR} 
    196     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    197     cd ${SETTE_DIR} 
    198     . ./fcm_job.sh $NPROC $JOB_FILE 
     199    for (( i=1; i<=$NPROC; i++)) ; do 
     200        L_NPROC=$(( $i - 1 )) 
     201        L_NPROC=`printf "%04d\n" ${L_NPROC}` 
     202        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_${L_NPROC}.nc . 
     203        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_trc_${L_NPROC}.nc . 
     204    done 
     205    cd ${SETTE_DIR} 
     206    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     207    cd ${SETTE_DIR} 
     208    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    199209fi 
    200210 
    201211if [ ${config} -eq 2 ] ;  then 
    202     ## Reproducibility tests for GYRE_LOBSTER 
     212    ## Repropducibility tests for GYRE_LOBSTER 
    203213    export TEST_NAME="REPRO_1_4" 
    204214    cd ${SETTE_DIR} 
    205     . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER -j 8 add_key "key_mpp_rep key_mpp_mpi" 
    206     cd ${SETTE_DIR} 
    207     . param.cfg 
    208     . all_functions.sh 
    209     . prepare_exe_dir.sh 
    210     JOB_FILE=${EXE_DIR}/run_job.sh 
    211     MPIRUN_FLAG="yes" 
     215    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep" 
     216    cd ${SETTE_DIR} 
     217    . param.cfg 
     218    . all_functions.sh 
     219    . prepare_exe_dir.sh 
     220    JOB_FILE=${EXE_DIR}/run_job.sh 
    212221    NPROC=4 
    213     rm $JOB_FILE 
     222    \rm ${JOB_FILE} 
    214223    cd ${EXE_DIR} 
    215224    set_namelist namelist cn_exp \"GYRELOB_14\" 
     
    227236    set_namelist namelist jpnij 4 
    228237    cd ${SETTE_DIR} 
    229     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    230     cd ${SETTE_DIR} 
    231     . ./fcm_job.sh $NPROC $JOB_FILE 
     238    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     239    cd ${SETTE_DIR} 
     240    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    232241 
    233242    cd ${SETTE_DIR} 
    234243    export TEST_NAME="REPRO_2_2" 
    235244    . prepare_exe_dir.sh 
    236     JOB_FILE=${EXE_DIR}/run_job.sh 
    237     MPIRUN_FLAG="yes" 
    238     NPROC=4 
    239     rm $JOB_FILE 
    240245    cd ${EXE_DIR} 
    241246    set_namelist namelist cn_exp \"GYRELOB_22\" 
     
    252257    set_namelist namelist jpnij 4 
    253258    cd ${SETTE_DIR} 
    254     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    255     cd ${SETTE_DIR} 
    256     . ./fcm_job.sh $NPROC $JOB_FILE 
     259    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     260    cd ${SETTE_DIR} 
     261    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     262 
    257263fi 
    258264 
     
    262268    export TEST_NAME="LONG" 
    263269    cd ${SETTE_DIR} 
    264     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 
    265     cd ${SETTE_DIR} 
    266     . param.cfg 
    267     . all_functions.sh 
    268     . prepare_exe_dir.sh 
    269     JOB_FILE=${EXE_DIR}/run_job.sh 
    270     MPIRUN_FLAG="yes" 
    271     NPROC=1 
    272     rm $JOB_FILE 
     270    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi"  
     271    cd ${SETTE_DIR} 
     272    . param.cfg 
     273    . all_functions.sh 
     274    . prepare_exe_dir.sh 
     275    JOB_FILE=${EXE_DIR}/run_job.sh 
     276    NPROC=4 
     277    \rm ${JOB_FILE} 
    273278    cd ${EXE_DIR} 
    274279    set_namelist namelist cn_exp \"O2LP_LONG\" 
     
    277282    set_namelist namelist nn_stock 75 
    278283    set_namelist namelist ln_clobber .true. 
     284    set_namelist namelist jpni 2 
     285    set_namelist namelist jpnj 2 
     286    set_namelist namelist jpnij 4 
    279287    set_namelist namelist nn_solv 2 
    280288    set_namelist namelist_top ln_trcdta .false. 
     
    288296    set_namelist namelist_pisces ln_presatm .false. 
    289297    cd ${SETTE_DIR} 
    290     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
     298    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    291299     
    292300    cd ${SETTE_DIR} 
     
    301309    set_namelist namelist nn_rstctl 2 
    302310    set_namelist namelist ln_clobber .true. 
    303     set_namelist namelist nn_solv 2 
    304     ln -s -f ../LONG/O2LP_LONG_00000075_restart.nc 
    305     ln -s -f ../LONG/O2LP_LONG_00000075_restart_ice.nc 
    306     ln -s -f ../LONG/O2LP_LONG_00000075_restart_trc.nc 
     311    set_namelist namelist jpni 2 
     312    set_namelist namelist jpnj 2 
     313    set_namelist namelist jpnij 4 
     314    set_namelist namelist nn_solv 2 
    307315    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\" 
    308316    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\" 
     317    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\" 
    309318    set_namelist namelist_top ln_diatrc .false. 
    310319    set_namelist namelist_top ln_rsttr .true. 
    311320    set_namelist namelist_top nn_rsttr 2 
    312     set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\" 
    313321    # put ln_ironsed, ln_river, ln_ndepo, ln_dust 
    314322    # if not you need input files, and for tests is not necessary 
     
    318326    set_namelist namelist_pisces ln_dust .false. 
    319327    set_namelist namelist_pisces ln_presatm .false. 
    320     cd ${SETTE_DIR} 
    321     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    322     cd ${SETTE_DIR} 
    323     . ./fcm_job.sh $NPROC $JOB_FILE 
     328    for (( i=1; i<=$NPROC; i++)) ; do 
     329        L_NPROC=$(( $i - 1 )) 
     330        L_NPROC=`printf "%04d\n" ${L_NPROC}` 
     331        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc . 
     332        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc . 
     333        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc . 
     334    done 
     335    cd ${SETTE_DIR} 
     336    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     337    cd ${SETTE_DIR} 
     338    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    324339fi 
    325340 
    326341if [ ${config} -eq 4 ] ;  then 
    327     ## Reproducibility tests for ORCA2_LIM_PISCES 
     342    ## Repropducibility tests for ORCA2_LIM_PISCES 
    328343    export TEST_NAME="REPRO_4_4" 
    329344    cd ${SETTE_DIR} 
     
    334349    . prepare_exe_dir.sh 
    335350    JOB_FILE=${EXE_DIR}/run_job.sh 
    336     MPIRUN_FLAG="yes" 
    337351    NPROC=16 
    338     rm $JOB_FILE 
     352    \rm $JOB_FILE 
    339353    cd ${EXE_DIR} 
    340354    set_namelist namelist nn_it000 1 
    341355    set_namelist namelist nn_itend 75 
    342356    set_namelist namelist nn_fwb 0 
     357    set_namelist namelist ln_ctl .false. 
    343358    set_namelist namelist ln_clobber .true. 
    344359    set_namelist namelist jpni 4 
     
    356371    set_namelist namelist_pisces ln_presatm .false. 
    357372    cd ${SETTE_DIR} 
    358     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    359     cd ${SETTE_DIR} 
    360     . ./fcm_job.sh $NPROC $JOB_FILE 
     373    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     374    cd ${SETTE_DIR} 
     375    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    361376 
    362377    cd ${SETTE_DIR} 
    363378    export TEST_NAME="REPRO_2_8" 
    364379    . prepare_exe_dir.sh 
    365     JOB_FILE=${EXE_DIR}/run_job.sh 
    366     MPIRUN_FLAG="yes" 
    367     NPROC=16 
    368     rm $JOB_FILE 
    369380    cd ${EXE_DIR} 
    370381    set_namelist namelist nn_it000 1 
    371382    set_namelist namelist nn_itend 75 
    372383    set_namelist namelist nn_fwb 0 
     384    set_namelist namelist ln_ctl .false. 
    373385    set_namelist namelist ln_clobber .true. 
    374386    set_namelist namelist jpni 2 
     
    386398    set_namelist namelist_pisces ln_presatm .false. 
    387399    cd ${SETTE_DIR} 
    388     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    389     cd ${SETTE_DIR} 
    390     . ./fcm_job.sh $NPROC $JOB_FILE 
     400    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     401    cd ${SETTE_DIR} 
     402    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    391403fi 
    392404 
     
    396408    export TEST_NAME="LONG" 
    397409    cd ${SETTE_DIR} 
    398     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8  
    399     cd ${SETTE_DIR} 
    400     . param.cfg 
    401     . all_functions.sh 
    402     . prepare_exe_dir.sh 
    403     JOB_FILE=${EXE_DIR}/run_job.sh 
    404     MPIRUN_FLAG="yes" 
    405     NPROC=1 
    406     rm $JOB_FILE 
     410    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" 
     411    cd ${SETTE_DIR} 
     412    . param.cfg 
     413    . all_functions.sh 
     414    . prepare_exe_dir.sh 
     415    JOB_FILE=${EXE_DIR}/run_job.sh 
     416    NPROC=4 
     417    \rm $JOB_FILE 
    407418    cd ${EXE_DIR} 
    408419    set_namelist namelist cn_exp \"OFFP_LONG\" 
     
    411422    set_namelist namelist nn_stock 20 
    412423    set_namelist namelist ln_clobber .true. 
     424    set_namelist namelist jpni 2 
     425    set_namelist namelist jpnj 2 
     426    set_namelist namelist jpnij 4 
    413427    set_namelist namelist_top ln_trcdta .false. 
    414428    set_namelist namelist_top ln_diatrc .false. 
     
    421435    set_namelist namelist_pisces ln_presatm .false. 
    422436    cd ${SETTE_DIR} 
    423     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
     437    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    424438     
    425439    cd ${SETTE_DIR} 
    426440    export TEST_NAME="SHORT" 
    427441    . prepare_exe_dir.sh 
     442    JOB_FILE=${EXE_DIR}/run_job.sh 
     443    NPROC=4 
     444    \rm $JOB_FILE 
    428445    cd ${EXE_DIR} 
    429446    set_namelist namelist cn_exp \"OFFP_SHORT\" 
     
    432449    set_namelist namelist nn_stock 20 
    433450    set_namelist namelist ln_clobber .true. 
    434     ln -s ../LONG/OFFP_LONG_00000020_restart_trc.nc . 
     451    set_namelist namelist jpni 2 
     452    set_namelist namelist jpnj 2 
     453    set_namelist namelist jpnij 4 
     454    cp ../LONG/OFFP_LONG_00000020_restart*nc . 
    435455    set_namelist namelist_top ln_diatrc .false. 
    436456    set_namelist namelist_top ln_rsttr .true. 
    437457    set_namelist namelist_top nn_rsttr 2 
    438458    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\" 
     459    for (( i=1; i<=$NPROC; i++)) ; do 
     460        L_NPROC=$(( $i - 1 )) 
     461        L_NPROC=`printf "%04d\n" ${L_NPROC}` 
     462        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc . 
     463    done 
    439464    # put ln_ironsed, ln_river, ln_ndepo, ln_dust 
    440465    # if not you need input files, and for tests is not necessary 
     
    445470    set_namelist namelist_pisces ln_presatm .false. 
    446471    cd ${SETTE_DIR} 
    447     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    448     cd ${SETTE_DIR} 
    449     . ./fcm_job.sh $NPROC $JOB_FILE 
     472    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} 
     473    cd ${SETTE_DIR} 
     474    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    450475fi 
    451476 
    452477if [ ${config} -eq 6 ] ;  then 
    453     ## Reproducibility tests for ORCA2_OFF_PISCES 
     478    ## Repropducibility tests for ORCA2_OFF_PISCES 
    454479    export TEST_NAME="REPRO_4_4" 
    455480    cd ${SETTE_DIR} 
     
    460485    . prepare_exe_dir.sh 
    461486    JOB_FILE=${EXE_DIR}/run_job.sh 
    462     MPIRUN_FLAG="yes" 
    463487    NPROC=16 
    464     rm $JOB_FILE 
     488    \rm $JOB_FILE 
    465489    cd ${EXE_DIR} 
    466490    set_namelist namelist nn_it000 1 
    467491    set_namelist namelist nn_itend 40 
     492    set_namelist namelist ln_ctl .false. 
    468493    set_namelist namelist ln_clobber .true. 
    469494    set_namelist namelist jpni 4 
     
    480505    set_namelist namelist_pisces ln_presatm .false. 
    481506    cd ${SETTE_DIR} 
    482     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    483     cd ${SETTE_DIR} 
    484     . ./fcm_job.sh $NPROC $JOB_FILE 
     507    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     508    cd ${SETTE_DIR} 
     509    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    485510 
    486511    cd ${SETTE_DIR} 
    487512    export TEST_NAME="REPRO_2_8" 
    488513    . prepare_exe_dir.sh 
    489     JOB_FILE=${EXE_DIR}/run_job.sh 
    490     MPIRUN_FLAG="yes" 
    491     NPROC=16 
    492     rm $JOB_FILE 
    493514    cd ${EXE_DIR} 
    494515    set_namelist namelist nn_it000 1 
    495516    set_namelist namelist nn_itend 40 
     517    set_namelist namelist ln_ctl .false. 
    496518    set_namelist namelist ln_clobber .true. 
    497519    set_namelist namelist jpni 2 
     
    508530    set_namelist namelist_pisces ln_presatm .false. 
    509531    cd ${SETTE_DIR} 
    510     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    511     cd ${SETTE_DIR} 
    512     . ./fcm_job.sh $NPROC $JOB_FILE 
    513 fi 
    514  
    515 # TESTS FOR AMM12 CONFIGURATION 
     532    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     533    cd ${SETTE_DIR} 
     534    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     535fi 
     536 
    516537if [ ${config} -eq 7 ] ;  then 
    517     ## Reproducibility tests for AMM12 
    518     export TEST_NAME="REPRO_8_4" 
    519     cd ${SETTE_DIR} 
    520     . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep" 
    521     cd ${SETTE_DIR} 
    522     . param.cfg 
    523     . all_functions.sh 
    524     . prepare_exe_dir.sh 
    525     JOB_FILE=${EXE_DIR}/run_job.sh 
    526     MPIRUN_FLAG="yes" 
     538    ## Restartability tests for AMM12 
     539    export TEST_NAME="LONG" 
     540    cd ${SETTE_DIR} 
     541    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12  
     542    cd ${SETTE_DIR} 
     543    . param.cfg 
     544    . all_functions.sh 
     545    . prepare_exe_dir.sh 
     546    JOB_FILE=${EXE_DIR}/run_job.sh 
    527547    NPROC=32 
    528     rm $JOB_FILE 
    529     cd ${EXE_DIR} 
    530     set_namelist namelist nn_it000 1 
    531     set_namelist namelist nn_itend 576 
     548    \rm $JOB_FILE 
     549    cd ${EXE_DIR} 
     550    set_namelist namelist nn_it000 1 
     551    set_namelist namelist nn_itend 12 
     552    set_namelist namelist nn_stock 6 
    532553    set_namelist namelist nn_fwb 0 
    533554    set_namelist namelist ln_ctl .false. 
     
    539560    set_namelist namelist jpnij 32 
    540561    cd ${SETTE_DIR} 
    541     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    542     cd ${SETTE_DIR} 
    543     . ./fcm_job.sh $NPROC $JOB_FILE 
    544  
    545     cd ${SETTE_DIR} 
    546     export TEST_NAME="REPRO_4_8" 
    547     . prepare_exe_dir.sh 
    548     JOB_FILE=${EXE_DIR}/run_job.sh 
    549     MPIRUN_FLAG="yes" 
    550     NPROC=32 
    551     rm $JOB_FILE 
    552     cd ${EXE_DIR} 
    553     set_namelist namelist nn_it000 1 
    554     set_namelist namelist nn_itend 576 
    555     set_namelist namelist nn_fwb 0 
    556     set_namelist namelist ln_ctl .false. 
    557     set_namelist namelist nn_dyn2d 2 
    558     set_namelist namelist nn_tra_dta 0 
    559     set_namelist namelist ln_clobber .true. 
    560     set_namelist namelist jpni 4 
    561     set_namelist namelist jpnj 8 
    562     set_namelist namelist jpnij 32 
    563     cd ${SETTE_DIR} 
    564     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    565     cd ${SETTE_DIR} 
    566     . ./fcm_job.sh $NPROC $JOB_FILE 
    567 fi 
    568  
    569 if [ ${config} -eq 8 ] ;  then 
    570     ## Restartability tests for AMM12 
    571     export TEST_NAME="LONG" 
    572     cd ${SETTE_DIR} 
    573     . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_mpp_rep" 
    574     cd ${SETTE_DIR} 
    575     . param.cfg 
    576     . all_functions.sh 
    577     . prepare_exe_dir.sh 
    578     JOB_FILE=${EXE_DIR}/run_job.sh 
    579     MPIRUN_FLAG="yes" 
    580     NPROC=32 
    581     rm $JOB_FILE 
    582     cd ${EXE_DIR} 
    583     set_namelist namelist nn_it000 1 
    584     set_namelist namelist nn_itend 12 
    585     set_namelist namelist nn_stock 6 
    586     set_namelist namelist nn_fwb 0 
    587     set_namelist namelist ln_ctl .false. 
    588     set_namelist namelist ln_clobber .true. 
    589     set_namelist namelist nn_dyn2d 2 
    590     set_namelist namelist nn_tra_dta 0 
    591     set_namelist namelist jpni 8 
    592     set_namelist namelist jpnj 4 
    593     set_namelist namelist jpnij 32 
    594     cd ${SETTE_DIR} 
    595     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
     562    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    596563 
    597564    cd ${SETTE_DIR} 
     
    611578    set_namelist namelist ln_rstart .true. 
    612579    set_namelist namelist nn_rstctl 2 
    613     set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\" 
    614     cd ${SETTE_DIR} 
    615     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    616     cd ${SETTE_DIR} 
    617     . ./fcm_job.sh $NPROC $JOB_FILE 
     580    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\" 
     581    for (( i=1; i<=$NPROC; i++)) ; do 
     582        L_NPROC=$(( $i - 1 )) 
     583        L_NPROC=`printf "%04d\n" ${L_NPROC}` 
     584        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC}.nc . 
     585    done 
     586    cd ${SETTE_DIR} 
     587    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     588    cd ${SETTE_DIR} 
     589    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     590fi 
     591 
     592if [ ${config} -eq 8 ] ;  then 
     593    ## Reproducibility tests for AMM12 
     594    export TEST_NAME="REPO_8_4" 
     595    cd ${SETTE_DIR} 
     596    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep" 
     597    cd ${SETTE_DIR} 
     598    . param.cfg 
     599    . all_functions.sh 
     600    . prepare_exe_dir.sh 
     601    JOB_FILE=${EXE_DIR}/run_job.sh 
     602    NPROC=32 
     603    \rm ${JOB_FILE} 
     604    cd ${EXE_DIR} 
     605    set_namelist namelist nn_it000 1 
     606    set_namelist namelist nn_itend 576 
     607    set_namelist namelist nn_fwb 0 
     608    set_namelist namelist ln_ctl .false. 
     609    set_namelist namelist ln_clobber .true. 
     610    set_namelist namelist nn_dyn2d 2 
     611    set_namelist namelist nn_tra_dta 0 
     612    set_namelist namelist jpni 8 
     613    set_namelist namelist jpnj 4 
     614    set_namelist namelist jpnij 32 
     615    cd ${SETTE_DIR} 
     616    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     617    cd ${SETTE_DIR} 
     618    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     619 
     620    cd ${SETTE_DIR} 
     621    export TEST_NAME="REPO_4_8" 
     622    . prepare_exe_dir.sh 
     623    cd ${EXE_DIR} 
     624    set_namelist namelist nn_it000 1 
     625    set_namelist namelist nn_itend 576 
     626    set_namelist namelist nn_fwb 0 
     627    set_namelist namelist ln_ctl .false. 
     628    set_namelist namelist nn_dyn2d 2 
     629    set_namelist namelist nn_tra_dta 0 
     630    set_namelist namelist ln_clobber .true. 
     631    set_namelist namelist jpni 4 
     632    set_namelist namelist jpnj 8 
     633    set_namelist namelist jpnij 32 
     634    cd ${SETTE_DIR} 
     635    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     636    cd ${SETTE_DIR} 
     637    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    618638fi 
    619639 
     
    629649    . prepare_exe_dir.sh 
    630650    JOB_FILE=${EXE_DIR}/run_job.sh 
    631     MPIRUN_FLAG="yes" 
    632651    NPROC=2 
    633     rm $JOB_FILE 
     652    \rm ${JOB_FILE} 
    634653    cd ${EXE_DIR} 
    635654    set_namelist namelist nn_it000 1 
     
    645664    set_namelist 1_namelist ln_clobber .true. 
    646665    cd ${SETTE_DIR} 
    647     . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE 
    648     cd ${SETTE_DIR} 
    649     . ./fcm_job.sh $NPROC $JOB_FILE 
     666    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     667    cd ${SETTE_DIR} 
     668    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    650669fi 
    651670 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette_beginner.sh

    r3294 r3570  
    1111# 
    1212############################################################# 
    13 #set -x 
     13#set -vx 
    1414set -o posix 
    1515#set -u 
     
    3939# Compiler among those in NEMOGCM/ARCH 
    4040COMPILER=PW6_VARGAS 
    41 export BATCH_COMMAND=llsubmit 
    42 export MPI_INTERACT="no" 
     41export BATCH_COMMAND_PAR="llsubmit" 
     42export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
     43export INTERACT_FLAG="no" 
     44export MPIRUN_FLAG="yes" 
    4345 
    4446# Directory to run the tests 
     
    5759# small test to start 
    5860# compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file :  
    59 export TEST_NAME="TEST01" 
     61export TEST_NAME="prova_beginner" 
    6062cd ${SETTE_DIR} 
    61 . ../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" 
    6264cd ${SETTE_DIR} 
    6365. param.cfg  
     
    6567# creation of execution directory 
    6668. prepare_exe_dir.sh 
     69JOB_FILE=${EXE_DIR}/run_job.sh 
     70NPROC=4 
     71\rm $JOB_FILE 
    6772cd ${EXE_DIR} 
    6873# setting namelist parameters 
     
    7580# frequency of creation of a restart file 
    7681set_namelist namelist nn_stock 60 
     82 
    7783cd ${SETTE_DIR} 
     84. ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    7885# run job, with 1 processor, test named SHORT (= 60 time steps) 
    79 . ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME} 
     86cd ${SETTE_DIR}    
     87. ./fcm_job.sh 4 ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
  • branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90

    r3294 r3570  
    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.