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 3680 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC – NEMO

Ignore:
Timestamp:
2012-11-27T15:42:24+01:00 (11 years ago)
Author:
rblod
Message:

First commit of the final branch for 2012 (future nemo_3_5), see ticket #1028

Location:
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC
Files:
18 deleted
35 edited
6 copied

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/C14b/par_c14b.F90

    r2715 r3680  
    66   !! History :   2.0  !  2008-12  (C. Ethe, G. Madec)  revised architecture 
    77   !!---------------------------------------------------------------------- 
    8    USE par_lobster, ONLY : jp_lobster      !: number of tracers in LOBSTER 
    9    USE par_lobster, ONLY : jp_lobster_2d   !: number of 2D diag in LOBSTER 
    10    USE par_lobster, ONLY : jp_lobster_3d   !: number of 3D diag in LOBSTER 
    11    USE par_lobster, ONLY : jp_lobster_trd  !: number of biological diag in LOBSTER 
    12  
    138   USE par_pisces , ONLY : jp_pisces       !: number of tracers in PISCES 
    149   USE par_pisces , ONLY : jp_pisces_2d    !: number of 2D diag in PISCES 
     
    2419   IMPLICIT NONE 
    2520 
    26    INTEGER, PARAMETER ::   jp_lb      = jp_lobster     + jp_pisces     + jp_cfc     !: cum. number of pass. tracers 
    27    INTEGER, PARAMETER ::   jp_lb_2d   = jp_lobster_2d  + jp_pisces_2d  + jp_cfc_2d  !: 
    28    INTEGER, PARAMETER ::   jp_lb_3d   = jp_lobster_3d  + jp_pisces_3d  + jp_cfc_3d  !: 
    29    INTEGER, PARAMETER ::   jp_lb_trd  = jp_lobster_trd + jp_pisces_trd + jp_cfc_trd !: 
     21   INTEGER, PARAMETER ::   jp_lb      = jp_pisces     + jp_cfc     !: cum. number of pass. tracers 
     22   INTEGER, PARAMETER ::   jp_lb_2d   = jp_pisces_2d  + jp_cfc_2d  !: 
     23   INTEGER, PARAMETER ::   jp_lb_3d   = jp_pisces_3d  + jp_cfc_3d  !: 
     24   INTEGER, PARAMETER ::   jp_lb_trd  = jp_pisces_trd + jp_cfc_trd !: 
    3025    
    3126#if defined key_c14b 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90

    r3294 r3680  
    125125         xdecay  = EXP( - xlambda * rdt ) 
    126126         xaccum  = 1._wp -  xdecay 
     127         ! 
     128         IF( ln_rsttr ) THEN 
     129            IF(lwp) WRITE(numout,*) 
     130            IF(lwp) WRITE(numout,*) ' Read specific variables from C14b model ' 
     131            IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
     132            CALL iom_get( numrtr, jpdom_autoglo, 'qint_c14', qint_c14 ) 
     133         ENDIF 
     134         ! 
     135         IF(lwp) WRITE(numout,*) 
     136         ! 
    127137      ENDIF 
    128138 
     
    271281      END DO 
    272282 
     283      ! 
     284      IF( lrst_trc ) THEN 
     285         IF(lwp) WRITE(numout,*) 
     286         IF(lwp) WRITE(numout,*) 'trc_sms_c14b : cumulated input function fields written in ocean restart file ',   & 
     287            &                    'at it= ', kt,' date= ', ndastp 
     288         IF(lwp) WRITE(numout,*) '~~~~' 
     289         CALL iom_rstput( kt, nitrst, numrtw, 'qint_c14', qint_c14 ) 
     290      ENDIF 
     291      !     
    273292      IF( ln_diatrc ) THEN 
    274293         IF( lk_iomput ) THEN 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90

    r3294 r3680  
    1010   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    1111   !!---------------------------------------------------------------------- 
    12    USE par_lobster, ONLY : jp_lobster      !: number of tracers in LOBSTER 
    13    USE par_lobster, ONLY : jp_lobster_2d   !: number of 2D diag in LOBSTER 
    14    USE par_lobster, ONLY : jp_lobster_3d   !: number of 3D diag in LOBSTER 
    15    USE par_lobster, ONLY : jp_lobster_trd  !: number of biological diag in LOBSTER 
    16  
    1712   USE par_pisces , ONLY : jp_pisces       !: number of tracers in PISCES 
    1813   USE par_pisces , ONLY : jp_pisces_2d    !: number of 2D diag in PISCES 
     
    2217   IMPLICIT NONE 
    2318 
    24    INTEGER, PARAMETER ::   jp_lc      = jp_lobster     + jp_pisces     !: cumulative number of passive tracers 
    25    INTEGER, PARAMETER ::   jp_lc_2d   = jp_lobster_2d  + jp_pisces_2d  !: 
    26    INTEGER, PARAMETER ::   jp_lc_3d   = jp_lobster_3d  + jp_pisces_3d  !: 
    27    INTEGER, PARAMETER ::   jp_lc_trd  = jp_lobster_trd + jp_pisces_trd !: 
     19   INTEGER, PARAMETER ::   jp_lc      = jp_pisces     !: cumulative number of passive tracers 
     20   INTEGER, PARAMETER ::   jp_lc_2d   = jp_pisces_2d  !: 
     21   INTEGER, PARAMETER ::   jp_lc_3d   = jp_pisces_3d  !: 
     22   INTEGER, PARAMETER ::   jp_lc_trd  = jp_pisces_trd !: 
    2823    
    2924#if defined key_cfc 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90

    r3294 r3680  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   trc_sms_cfc  :  compute and add CFC suface forcing to CFC trends 
    15    !!   trc_cfc_cst  :  sets constants for CFC surface forcing computation 
     15   !!   cfc_init     :  sets constants for CFC surface forcing computation 
    1616   !!---------------------------------------------------------------------- 
    1717   USE oce_trc       ! Ocean variables 
     
    9999      ENDIF 
    100100 
    101       IF( kt == nittrc000 )   CALL trc_cfc_cst 
     101      IF( kt == nittrc000 )   CALL cfc_init 
    102102 
    103103      ! Temporal interpolation 
     
    176176         !                                                  !----------------! 
    177177      END DO                                                !  end CFC loop  ! 
    178       !                                                     !----------------! 
     178      ! 
     179      IF( lrst_trc ) THEN 
     180         IF(lwp) WRITE(numout,*) 
     181         IF(lwp) WRITE(numout,*) 'trc_sms_cfc : cumulated input function fields written in ocean restart file ',   & 
     182            &                    'at it= ', kt,' date= ', ndastp 
     183         IF(lwp) WRITE(numout,*) '~~~~' 
     184         DO jn = jp_cfc0, jp_cfc1 
     185            CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 
     186         END DO 
     187      ENDIF 
     188      !                                               
    179189      IF( ln_diatrc ) THEN 
    180190        ! 
     
    200210 
    201211 
    202    SUBROUTINE trc_cfc_cst 
     212   SUBROUTINE cfc_init 
    203213      !!--------------------------------------------------------------------- 
    204       !!                     ***  trc_cfc_cst  ***   
     214      !!                     ***  cfc_init  ***   
    205215      !! 
    206216      !! ** Purpose : sets constants for CFC model 
    207217      !!--------------------------------------------------------------------- 
     218      INTEGER :: jn 
    208219 
    209220      ! coefficient for CFC11  
     
    245256      sca(4,2) =  -0.067430 
    246257 
    247    END SUBROUTINE trc_cfc_cst 
     258      IF( ln_rsttr ) THEN 
     259         IF(lwp) WRITE(numout,*) 
     260         IF(lwp) WRITE(numout,*) ' Read specific variables from CFC model ' 
     261         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
     262         ! 
     263         DO jn = jp_cfc0, jp_cfc1 
     264            CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) )  
     265         END DO 
     266      ENDIF 
     267      IF(lwp) WRITE(numout,*) 
     268      ! 
     269   END SUBROUTINE cfc_init 
    248270 
    249271 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90

    r2528 r3680  
    1010   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    1111   !!---------------------------------------------------------------------- 
    12    USE par_lobster, ONLY : jp_lobster      !: number of tracers in LOBSTER 
    13    USE par_lobster, ONLY : jp_lobster_2d   !: number of 2D diag in LOBSTER 
    14    USE par_lobster, ONLY : jp_lobster_3d   !: number of 3D diag in LOBSTER 
    15    USE par_lobster, ONLY : jp_lobster_trd  !: number of biological diag in LOBSTER 
    16  
    1712   USE par_pisces , ONLY : jp_pisces       !: number of tracers in PISCES 
    1813   USE par_pisces , ONLY : jp_pisces_2d    !: number of 2D diag in PISCES 
     
    3227   IMPLICIT NONE 
    3328 
    34    INTEGER, PARAMETER ::   jp_lm      = jp_lobster     + jp_pisces     + jp_cfc     + jp_c14b     !:  
    35    INTEGER, PARAMETER ::   jp_lm_2d   = jp_lobster_2d  + jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d  !: 
    36    INTEGER, PARAMETER ::   jp_lm_3d   = jp_lobster_3d  + jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d  !: 
    37    INTEGER, PARAMETER ::   jp_lm_trd  = jp_lobster_trd + jp_pisces_trd + jp_cfc_trd + jp_c14b_trd !: 
     29   INTEGER, PARAMETER ::   jp_lm      = jp_pisces     + jp_cfc     + jp_c14b     !:  
     30   INTEGER, PARAMETER ::   jp_lm_2d   = jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d  !: 
     31   INTEGER, PARAMETER ::   jp_lm_3d   = jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d  !: 
     32   INTEGER, PARAMETER ::   jp_lm_trd  = jp_pisces_trd + jp_cfc_trd + jp_c14b_trd !: 
    3833 
    3934#if defined key_my_trc 
     
    4237   !!--------------------------------------------------------------------- 
    4338   LOGICAL, PUBLIC, PARAMETER ::   lk_my_trc     = .TRUE.   !: PTS flag  
    44    INTEGER, PUBLIC, PARAMETER ::   jp_my_trc     =  2       !: number of PTS tracers 
     39   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc     =  1       !: number of PTS tracers 
    4540   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_2d  =  0       !: additional 2d output arrays ('key_trc_diaadd') 
    4641   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_3d  =  0       !: additional 3d output arrays ('key_trc_diaadd') 
     
    4944   ! assign an index in trc arrays for each PTS prognostic variables 
    5045   INTEGER, PUBLIC, PARAMETER ::   jpmyt1 = jp_lm + 1     !: 1st MY_TRC tracer 
    51    INTEGER, PUBLIC, PARAMETER ::   jpmyt2 = jp_lm + 2     !: 2nd MY_TRC tracer 
    5246 
    5347#else 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90

    r2528 r3680  
    22   !!====================================================================== 
    33   !!                      ***  MODULE trcnam_my_trc  *** 
    4    !! TOP :   initialisation of some run parameters for LOBSTER bio-model 
     4   !! TOP :   initialisation of some run parameters for MY_TRC bio-model 
    55   !!====================================================================== 
    66   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) Original code 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90

    r3294 r3680  
    6262      END WHERE 
    6363 
    64       WHERE( ((glamt <= -165) .OR. (glamt >= 160)) .AND. (gphit <= -76) .AND. (gphit >=-80)) 
    65         trn(:,:,1,jpmyt2) = 1._wp 
    66         trb(:,:,1,jpmyt2) = 1._wp 
    67         tra(:,:,1,jpmyt2) = 0._wp 
    68       END WHERE 
    69  
    7064      IF( l_trdtrc ) THEN      ! Save the trends in the ixed layer 
    7165          DO jn = jp_myt0, jp_myt1 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r3531 r3680  
    105105            DO ji = 1, jpi 
    106106               zdep    = rfact2 / fse3t(ji,jj,1) 
    107                zwflux  = ( emps(ji,jj) - emp(ji,jj) ) & 
    108                &        * tsn(ji,jj,1,jp_sal) / ( tsn(ji,jj,1,jp_sal) - 6.0 ) / 1000. 
     107    !           zwflux  = ( emps(ji,jj) - emp(ji,jj) ) & 
     108    !           &        * tsn(ji,jj,1,jp_sal) / ( tsn(ji,jj,1,jp_sal) - 6.0 ) / 1000. 
     109               zwflux = 0. 
    109110               zfminus = MIN( 0., -zwflux ) * trn(ji,jj,1,jpfer) * zdep 
    110111               zfplus  = MAX( 0., -zwflux ) * 10E-9 * zdep 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90

    r3295 r3680  
    1010   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    1111   !!---------------------------------------------------------------------- 
    12    USE par_lobster, ONLY : jp_lobster      !: number of tracers in LOBSTER 
    13    USE par_lobster, ONLY : jp_lobster_2d   !: number of 2D diag in LOBSTER 
    14    USE par_lobster, ONLY : jp_lobster_3d   !: number of 3D diag in LOBSTER 
    15    USE par_lobster, ONLY : jp_lobster_trd  !: number of biological diag in LOBSTER 
    1612 
    1713   IMPLICIT NONE 
    1814 
    19    INTEGER, PUBLIC, PARAMETER ::   jp_lp      = jp_lobster      !: cumulative number of already defined TRC 
    20    INTEGER, PUBLIC, PARAMETER ::   jp_lp_2d   = jp_lobster_2d   !: 
    21    INTEGER, PUBLIC, PARAMETER ::   jp_lp_3d   = jp_lobster_3d   !: 
    22    INTEGER, PUBLIC, PARAMETER ::   jp_lp_trd  = jp_lobster_trd  !: 
     15#if defined key_pisces_reduced 
     16   !!--------------------------------------------------------------------- 
     17   !!   'key_pisces_reduced'   :                                LOBSTER bio-model 
     18   !!--------------------------------------------------------------------- 
     19   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .TRUE.  !: PISCES flag  
     20   LOGICAL, PUBLIC, PARAMETER ::   lk_p4z        = .FALSE. !: p4z flag  
     21   INTEGER, PUBLIC, PARAMETER ::   jp_pisces     =  6      !: number of passive tracers 
     22   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  =  19     !: additional 2d output  
     23   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_3d  =   3     !: additional 3d output  
     24   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_trd =   17    !: number of sms trends for PISCES 
    2325 
    24 #if defined key_pisces  &&  defined key_kriest 
     26   ! assign an index in trc arrays for each LOBSTER prognostic variables 
     27   INTEGER, PUBLIC, PARAMETER ::   jpdet     =  1        !: detritus                    [mmoleN/m3] 
     28   INTEGER, PUBLIC, PARAMETER ::   jpzoo     =  2        !: zooplancton concentration   [mmoleN/m3] 
     29   INTEGER, PUBLIC, PARAMETER ::   jpphy     =  3        !: phytoplancton concentration [mmoleN/m3] 
     30   INTEGER, PUBLIC, PARAMETER ::   jpno3     =  4        !: nitrate concentration       [mmoleN/m3] 
     31   INTEGER, PUBLIC, PARAMETER ::   jpnh4     =  5        !: ammonium concentration      [mmoleN/m3] 
     32   INTEGER, PUBLIC, PARAMETER ::   jpdom     =  6        !: dissolved organic matter    [mmoleN/m3] 
     33 
     34   ! productive layer depth 
     35   INTEGER, PUBLIC, PARAMETER ::   jpkb      = 12        !: first vertical layers where biology is active 
     36   INTEGER, PUBLIC, PARAMETER ::   jpkbm1    = jpkb - 1  !: first vertical layers where biology is active 
     37 
     38#elif defined key_pisces  &&  defined key_kriest 
    2539   !!--------------------------------------------------------------------- 
    2640   !!   'key_pisces' & 'key_kriest'                 PISCES bio-model + ??? 
    2741   !!--------------------------------------------------------------------- 
    2842   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .TRUE.  !: PISCES flag  
     43   LOGICAL, PUBLIC, PARAMETER ::   lk_p4z        = .TRUE. !: p4z flag  
    2944   LOGICAL, PUBLIC, PARAMETER ::   lk_kriest     = .TRUE.  !: Kriest flag  
    3045   INTEGER, PUBLIC, PARAMETER ::   jp_pisces     =  23     !: number of passive tracers 
     
    3651   !    WARNING: be carefull about the order when reading the restart 
    3752        !   !!gm  this warning should be obsolet with IOM 
    38    INTEGER, PUBLIC, PARAMETER ::   jpdic = jp_lp + 1    !: dissolved inoganic carbon concentration  
    39    INTEGER, PUBLIC, PARAMETER ::   jptal = jp_lp + 2    !: total alkalinity  
    40    INTEGER, PUBLIC, PARAMETER ::   jpoxy = jp_lp + 3    !: oxygen carbon concentration  
    41    INTEGER, PUBLIC, PARAMETER ::   jpcal = jp_lp + 4    !: calcite  concentration  
    42    INTEGER, PUBLIC, PARAMETER ::   jppo4 = jp_lp + 5    !: phosphate concentration  
    43    INTEGER, PUBLIC, PARAMETER ::   jppoc = jp_lp + 6    !: small particulate organic phosphate concentration 
    44    INTEGER, PUBLIC, PARAMETER ::   jpsil = jp_lp + 7    !: silicate concentration 
    45    INTEGER, PUBLIC, PARAMETER ::   jpphy = jp_lp + 8    !: phytoplancton concentration  
    46    INTEGER, PUBLIC, PARAMETER ::   jpzoo = jp_lp + 9    !: zooplancton concentration 
    47    INTEGER, PUBLIC, PARAMETER ::   jpdoc = jp_lp + 10    !: dissolved organic carbon concentration  
    48    INTEGER, PUBLIC, PARAMETER ::   jpdia = jp_lp + 11    !: Diatoms Concentration 
    49    INTEGER, PUBLIC, PARAMETER ::   jpmes = jp_lp + 12    !: Mesozooplankton Concentration 
    50    INTEGER, PUBLIC, PARAMETER ::   jpdsi = jp_lp + 13    !: (big) Silicate Concentration 
    51    INTEGER, PUBLIC, PARAMETER ::   jpfer = jp_lp + 14    !: Iron Concentration 
    52    INTEGER, PUBLIC, PARAMETER ::   jpnum = jp_lp + 15    !: Big iron particles Concentration 
    53    INTEGER, PUBLIC, PARAMETER ::   jpsfe = jp_lp + 16    !: number of particulate organic phosphate concentration 
    54    INTEGER, PUBLIC, PARAMETER ::   jpdfe = jp_lp + 17    !: Diatoms iron Concentration 
    55    INTEGER, PUBLIC, PARAMETER ::   jpgsi = jp_lp + 18    !: Diatoms Silicate Concentration 
    56    INTEGER, PUBLIC, PARAMETER ::   jpnfe = jp_lp + 19    !: Nano iron Concentration 
    57    INTEGER, PUBLIC, PARAMETER ::   jpnch = jp_lp + 20    !: Nano Chlorophyll Concentration 
    58    INTEGER, PUBLIC, PARAMETER ::   jpdch = jp_lp + 21    !: Diatoms Chlorophyll Concentration 
    59    INTEGER, PUBLIC, PARAMETER ::   jpno3 = jp_lp + 22    !: Nitrates Concentration 
    60    INTEGER, PUBLIC, PARAMETER ::   jpnh4 = jp_lp + 23    !: Ammonium Concentration 
     53   INTEGER, PUBLIC, PARAMETER ::   jpdic = 1    !: dissolved inoganic carbon concentration  
     54   INTEGER, PUBLIC, PARAMETER ::   jptal = 2    !: total alkalinity  
     55   INTEGER, PUBLIC, PARAMETER ::   jpoxy = 3    !: oxygen carbon concentration  
     56   INTEGER, PUBLIC, PARAMETER ::   jpcal = 4    !: calcite  concentration  
     57   INTEGER, PUBLIC, PARAMETER ::   jppo4 = 5    !: phosphate concentration  
     58   INTEGER, PUBLIC, PARAMETER ::   jppoc = 6    !: small particulate organic phosphate concentration 
     59   INTEGER, PUBLIC, PARAMETER ::   jpsil = 7    !: silicate concentration 
     60   INTEGER, PUBLIC, PARAMETER ::   jpphy = 8    !: phytoplancton concentration  
     61   INTEGER, PUBLIC, PARAMETER ::   jpzoo = 9    !: zooplancton concentration 
     62   INTEGER, PUBLIC, PARAMETER ::   jpdoc = 10    !: dissolved organic carbon concentration  
     63   INTEGER, PUBLIC, PARAMETER ::   jpdia = 11    !: Diatoms Concentration 
     64   INTEGER, PUBLIC, PARAMETER ::   jpmes = 12    !: Mesozooplankton Concentration 
     65   INTEGER, PUBLIC, PARAMETER ::   jpdsi = 13    !: (big) Silicate Concentration 
     66   INTEGER, PUBLIC, PARAMETER ::   jpfer = 14    !: Iron Concentration 
     67   INTEGER, PUBLIC, PARAMETER ::   jpnum = 15    !: Big iron particles Concentration 
     68   INTEGER, PUBLIC, PARAMETER ::   jpsfe = 16    !: number of particulate organic phosphate concentration 
     69   INTEGER, PUBLIC, PARAMETER ::   jpdfe = 17    !: Diatoms iron Concentration 
     70   INTEGER, PUBLIC, PARAMETER ::   jpgsi = 18    !: Diatoms Silicate Concentration 
     71   INTEGER, PUBLIC, PARAMETER ::   jpnfe = 19    !: Nano iron Concentration 
     72   INTEGER, PUBLIC, PARAMETER ::   jpnch = 20    !: Nano Chlorophyll Concentration 
     73   INTEGER, PUBLIC, PARAMETER ::   jpdch = 21    !: Diatoms Chlorophyll Concentration 
     74   INTEGER, PUBLIC, PARAMETER ::   jpno3 = 22    !: Nitrates Concentration 
     75   INTEGER, PUBLIC, PARAMETER ::   jpnh4 = 23    !: Ammonium Concentration 
    6176 
    6277#elif defined key_pisces 
     
    6580   !!--------------------------------------------------------------------- 
    6681   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .TRUE.  !: PISCES flag  
     82   LOGICAL, PUBLIC, PARAMETER ::   lk_p4z        = .TRUE.  !: p4z flag  
    6783   LOGICAL, PUBLIC, PARAMETER ::   lk_kriest     = .FALSE. !: Kriest flag  
    6884   INTEGER, PUBLIC, PARAMETER ::   jp_pisces     = 24      !: number of PISCES passive tracers 
     
    7490   !    WARNING: be carefull about the order when reading the restart 
    7591        !   !!gm  this warning should be obsolet with IOM 
    76    INTEGER, PUBLIC, PARAMETER ::   jpdic = jp_lp + 1    !: dissolved inoganic carbon concentration  
    77    INTEGER, PUBLIC, PARAMETER ::   jptal = jp_lp + 2    !: total alkalinity  
    78    INTEGER, PUBLIC, PARAMETER ::   jpoxy = jp_lp + 3    !: oxygen carbon concentration  
    79    INTEGER, PUBLIC, PARAMETER ::   jpcal = jp_lp + 4    !: calcite  concentration  
    80    INTEGER, PUBLIC, PARAMETER ::   jppo4 = jp_lp + 5    !: phosphate concentration  
    81    INTEGER, PUBLIC, PARAMETER ::   jppoc = jp_lp + 6    !: small particulate organic phosphate concentration 
    82    INTEGER, PUBLIC, PARAMETER ::   jpsil = jp_lp + 7    !: silicate concentration 
    83    INTEGER, PUBLIC, PARAMETER ::   jpphy = jp_lp + 8    !: phytoplancton concentration  
    84    INTEGER, PUBLIC, PARAMETER ::   jpzoo = jp_lp + 9    !: zooplancton concentration 
    85    INTEGER, PUBLIC, PARAMETER ::   jpdoc = jp_lp + 10    !: dissolved organic carbon concentration  
    86    INTEGER, PUBLIC, PARAMETER ::   jpdia = jp_lp + 11    !: Diatoms Concentration 
    87    INTEGER, PUBLIC, PARAMETER ::   jpmes = jp_lp + 12    !: Mesozooplankton Concentration 
    88    INTEGER, PUBLIC, PARAMETER ::   jpdsi = jp_lp + 13    !: (big) Silicate Concentration 
    89    INTEGER, PUBLIC, PARAMETER ::   jpfer = jp_lp + 14    !: Iron Concentration 
    90    INTEGER, PUBLIC, PARAMETER ::   jpbfe = jp_lp + 15    !: Big iron particles Concentration 
    91    INTEGER, PUBLIC, PARAMETER ::   jpgoc = jp_lp + 16    !: big particulate organic phosphate concentration 
    92    INTEGER, PUBLIC, PARAMETER ::   jpsfe = jp_lp + 17    !: Small iron particles Concentration 
    93    INTEGER, PUBLIC, PARAMETER ::   jpdfe = jp_lp + 18    !: Diatoms iron Concentration 
    94    INTEGER, PUBLIC, PARAMETER ::   jpgsi = jp_lp + 19    !: Diatoms Silicate Concentration 
    95    INTEGER, PUBLIC, PARAMETER ::   jpnfe = jp_lp + 20    !: Nano iron Concentration 
    96    INTEGER, PUBLIC, PARAMETER ::   jpnch = jp_lp + 21    !: Nano Chlorophyll Concentration 
    97    INTEGER, PUBLIC, PARAMETER ::   jpdch = jp_lp + 22    !: Diatoms Chlorophyll Concentration 
    98    INTEGER, PUBLIC, PARAMETER ::   jpno3 = jp_lp + 23    !: Nitrates Concentration 
    99    INTEGER, PUBLIC, PARAMETER ::   jpnh4 = jp_lp + 24    !: Ammonium Concentration 
     92   INTEGER, PUBLIC, PARAMETER ::   jpdic = 1    !: dissolved inoganic carbon concentration  
     93   INTEGER, PUBLIC, PARAMETER ::   jptal = 2    !: total alkalinity  
     94   INTEGER, PUBLIC, PARAMETER ::   jpoxy = 3    !: oxygen carbon concentration  
     95   INTEGER, PUBLIC, PARAMETER ::   jpcal = 4    !: calcite  concentration  
     96   INTEGER, PUBLIC, PARAMETER ::   jppo4 = 5    !: phosphate concentration  
     97   INTEGER, PUBLIC, PARAMETER ::   jppoc = 6    !: small particulate organic phosphate concentration 
     98   INTEGER, PUBLIC, PARAMETER ::   jpsil = 7    !: silicate concentration 
     99   INTEGER, PUBLIC, PARAMETER ::   jpphy = 8    !: phytoplancton concentration  
     100   INTEGER, PUBLIC, PARAMETER ::   jpzoo = 9    !: zooplancton concentration 
     101   INTEGER, PUBLIC, PARAMETER ::   jpdoc = 10    !: dissolved organic carbon concentration  
     102   INTEGER, PUBLIC, PARAMETER ::   jpdia = 11    !: Diatoms Concentration 
     103   INTEGER, PUBLIC, PARAMETER ::   jpmes = 12    !: Mesozooplankton Concentration 
     104   INTEGER, PUBLIC, PARAMETER ::   jpdsi = 13    !: (big) Silicate Concentration 
     105   INTEGER, PUBLIC, PARAMETER ::   jpfer = 14    !: Iron Concentration 
     106   INTEGER, PUBLIC, PARAMETER ::   jpbfe = 15    !: Big iron particles Concentration 
     107   INTEGER, PUBLIC, PARAMETER ::   jpgoc = 16    !: big particulate organic phosphate concentration 
     108   INTEGER, PUBLIC, PARAMETER ::   jpsfe = 17    !: Small iron particles Concentration 
     109   INTEGER, PUBLIC, PARAMETER ::   jpdfe = 18    !: Diatoms iron Concentration 
     110   INTEGER, PUBLIC, PARAMETER ::   jpgsi = 19    !: Diatoms Silicate Concentration 
     111   INTEGER, PUBLIC, PARAMETER ::   jpnfe = 20    !: Nano iron Concentration 
     112   INTEGER, PUBLIC, PARAMETER ::   jpnch = 21    !: Nano Chlorophyll Concentration 
     113   INTEGER, PUBLIC, PARAMETER ::   jpdch = 22    !: Diatoms Chlorophyll Concentration 
     114   INTEGER, PUBLIC, PARAMETER ::   jpno3 = 23    !: Nitrates Concentration 
     115   INTEGER, PUBLIC, PARAMETER ::   jpnh4 = 24    !: Ammonium Concentration 
    100116 
    101117#else 
     
    103119   !!   Default                                   No CFC geochemical model 
    104120   !!--------------------------------------------------------------------- 
    105    LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .FALSE.  !: CFC flag  
    106    LOGICAL, PUBLIC, PARAMETER ::   lk_kriest     = .FALSE.  !: Kriest flag  
     121   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .FALSE.  !: PISCES flag  
     122   LOGICAL, PUBLIC, PARAMETER ::   lk_p4z        = .FALSE.  !: p4z flag  
    107123   INTEGER, PUBLIC, PARAMETER ::   jp_pisces     =  0       !: No CFC tracers 
    108124   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  =  0       !: No CFC additional 2d output arrays  
     
    112128 
    113129   ! Starting/ending PISCES do-loop indices (N.B. no PISCES : jpl_pcs < jpf_pcs the do-loop are never done) 
    114    INTEGER, PUBLIC, PARAMETER ::   jp_pcs0     = jp_lp + 1                  !: First index of PISCES tracers 
    115    INTEGER, PUBLIC, PARAMETER ::   jp_pcs1     = jp_lp + jp_pisces          !: Last  index of PISCES tracers 
    116    INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_2d  = jp_lp_2d + 1               !: First index of 2D diag 
    117    INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_2d  = jp_lp_2d + jp_pisces_2d    !: Last  index of 2D diag 
    118    INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_3d  = jp_lp_3d + 1               !: First index of 3D diag 
    119    INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_3d  = jp_lp_3d + jp_pisces_3d    !: Last  index of 3d diag 
    120    INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_trd = jp_lp_trd + 1              !: First index of bio diag 
    121    INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_trd = jp_lp_trd + jp_pisces_trd  !: Last  index of bio diag 
     130   INTEGER, PUBLIC, PARAMETER ::   jp_pcs0     = 1                  !: First index of PISCES tracers 
     131   INTEGER, PUBLIC, PARAMETER ::   jp_pcs1     = jp_pisces          !: Last  index of PISCES tracers 
     132   INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_2d  = 1               !: First index of 2D diag 
     133   INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_2d  = jp_pisces_2d    !: Last  index of 2D diag 
     134   INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_3d  = 1               !: First index of 3D diag 
     135   INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_3d  = jp_pisces_3d    !: Last  index of 3d diag 
     136   INTEGER, PUBLIC, PARAMETER ::   jp_pcs0_trd = 1              !: First index of bio diag 
     137   INTEGER, PUBLIC, PARAMETER ::   jp_pcs1_trd = jp_pisces_trd  !: Last  index of bio diag 
    122138 
    123139 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90

    r3294 r3680  
    77   !!             3.2  !  2009-04 (C. Ethe & NEMO team) style 
    88   !!---------------------------------------------------------------------- 
    9 #if defined key_pisces 
     9#if defined key_pisces || defined key_pisces_reduced  
    1010   !!---------------------------------------------------------------------- 
    1111   !!   'key_pisces'                                         PISCES model 
     
    1919   INTEGER ::   numnatp 
    2020 
     21   !!*  Biological fluxes for light : variables shared by pisces & lobster 
     22   INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  neln  !: number of T-levels + 1 in the euphotic layer 
     23   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  heup  !: euphotic layer depth 
     24   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  etot  !: par (photosynthetic available radiation) 
     25   ! 
     26   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  xksi  !:  LOBSTER : zooplakton closure 
     27   !                                                       !:  PISCES  : silicon dependant half saturation 
     28 
     29#if defined key_pisces  
    2130   !!*  Time variables 
    2231   INTEGER  ::   nrdttrc           !: ??? 
     
    2736 
    2837   !!*  Biological parameters  
     38   INTEGER  ::   niter1max, niter2max   !: Maximum number of iterations for sinking 
    2939   REAL(wp) ::   rno3              !: ??? 
    3040   REAL(wp) ::   o2ut              !: ??? 
     
    3747   REAL(wp) ::   ferat3            !: ??? 
    3848 
    39    !!* Damping  
    40    LOGICAL  ::   ln_pisdmp         !: relaxation or not of nutrients to a mean value 
    41    INTEGER  ::   nn_pisdmp         !: frequency of relaxation or not of nutrients to a mean value 
    42    LOGICAL  ::   ln_pisclo         !: Restoring or not of nutrients to initial value 
    43                                    !: on close seas 
     49   !!*  diagnostic parameters  
     50   REAL(wp) ::  tpp                !: total primary production 
     51   REAL(wp) ::  t_oce_co2_exp      !: total carbon export 
     52   REAL(wp) ::  t_oce_co2_flx      !: Total ocean carbon flux 
     53   REAL(wp) ::  t_atm_co2_flx      !: global mean of atmospheric pco2 
    4454 
    45    !!*  Biological fluxes for light 
    46    INTEGER , ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::  neln       !: number of T-levels + 1 in the euphotic layer 
    47    REAL(wp), ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::  heup       !: euphotic layer depth 
     55   !!* restoring 
     56   LOGICAL  ::  ln_pisdmp          !: restoring or not of nutrients to a mean value 
     57   INTEGER  ::  nn_pisdmp          !: frequency of relaxation or not of nutrients to a mean value 
     58   LOGICAL  ::  ln_pisclo          !: Restoring or not of nutrients to initial value on closed seas 
     59 
     60   !!* Mass conservation 
     61   LOGICAL  ::  ln_check_mass      !: Flag to check mass conservation 
    4862 
    4963   !!*  Biological fluxes for primary production 
    50    REAL(wp), ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::   xksi       !: ??? 
    5164   REAL(wp), ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::   xksimax    !: ??? 
    5265   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   xnanono3   !: ??? 
     
    6174   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   xlimdfe    !: ??? 
    6275   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   xlimsi     !: ??? 
     76   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   biron      !: bioavailable fraction of iron 
    6377 
    6478 
     
    6781   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   nitrfac    !: ?? 
    6882   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xlimbac    !: ?? 
     83   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xlimbacl   !: ?? 
    6984   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xdiss      !: ?? 
    70     REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   prodcal    !: Calcite production 
    71     REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   grazing    !: Total zooplankton grazing 
     85   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   prodcal    !: Calcite production 
    7286 
    7387   !!* Variable for chemistry of the CO2 cycle 
     
    96110#endif 
    97111 
     112#endif 
    98113   !!---------------------------------------------------------------------- 
    99114   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    111126      !!---------------------------------------------------------------------- 
    112127      ierr(:) = 0 
    113       !*  Biological fluxes for light 
    114       ALLOCATE( neln(jpi,jpj), heup(jpi,jpj),                  STAT=ierr(1) ) 
     128      !*  Biological fluxes for light : shared variables for pisces & lobster 
     129      ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) ) 
    115130      ! 
     131#if defined key_pisces 
    116132      !*  Biological fluxes for primary production 
    117       ALLOCATE( xksimax(jpi,jpj)     , xksi(jpi,jpj)        ,       & 
     133      ALLOCATE( xksimax(jpi,jpj)     , biron   (jpi,jpj,jpk),       & 
    118134         &      xnanono3(jpi,jpj,jpk), xdiatno3(jpi,jpj,jpk),       & 
    119135         &      xnanonh4(jpi,jpj,jpk), xdiatnh4(jpi,jpj,jpk),       & 
     
    121137         &      xlimnfe (jpi,jpj,jpk), xlimdfe (jpi,jpj,jpk),       & 
    122138         &      xlimsi  (jpi,jpj,jpk), concdfe (jpi,jpj,jpk),       & 
    123          &      concnfe (jpi,jpj,jpk),                          STAT=ierr(2) )  
     139         &      concnfe (jpi,jpj,jpk),                           STAT=ierr(2) )  
    124140         ! 
    125141      !*  SMS for the organic matter 
    126142      ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac(jpi,jpj,jpk),       & 
    127          &      prodcal(jpi,jpj,jpk) , grazing(jpi,jpj,jpk),       & 
    128          &      xlimbac (jpi,jpj,jpk), xdiss  (jpi,jpj,jpk),   STAT=ierr(3) )   
    129          ! 
     143         &      xlimbac (jpi,jpj,jpk), xdiss  (jpi,jpj,jpk),       &  
     144         &      xlimbacl(jpi,jpj,jpk), prodcal(jpi,jpj,jpk),     STAT=ierr(3) ) 
     145 
    130146      !* Variable for chemistry of the CO2 cycle 
    131147      ALLOCATE( akb3(jpi,jpj,jpk)    , ak13  (jpi,jpj,jpk) ,       & 
    132148         &      ak23(jpi,jpj,jpk)    , aksp  (jpi,jpj,jpk) ,       & 
    133149         &      akw3(jpi,jpj,jpk)    , borat (jpi,jpj,jpk) ,       & 
    134          &      hi  (jpi,jpj,jpk)    , excess(jpi,jpj,jpk) ,   STAT=ierr(4) ) 
     150         &      hi  (jpi,jpj,jpk)    , excess(jpi,jpj,jpk) ,     STAT=ierr(4) ) 
    135151         ! 
    136152      !* Temperature dependancy of SMS terms 
    137       ALLOCATE( tgfunc(jpi,jpj,jpk)  , tgfunc2(jpi,jpj,jpk) ,   STAT=ierr(5) ) 
     153      ALLOCATE( tgfunc(jpi,jpj,jpk)  , tgfunc2(jpi,jpj,jpk) ,    STAT=ierr(5) ) 
    138154         ! 
    139155      !* Array used to indicate negative tracer values   
    140       ALLOCATE( xnegtr(jpi,jpj,jpk)  ,                          STAT=ierr(6) ) 
     156      ALLOCATE( xnegtr(jpi,jpj,jpk)  ,                           STAT=ierr(6) ) 
     157#endif 
    141158      ! 
    142159      sms_pisces_alloc = MAXVAL( ierr ) 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90

    r3295 r3680  
    99   !!             1.0  !  2005-03  (O. Aumont, A. El Moussaoui) F90 
    1010   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcini.pisces.h90 
    11    !!---------------------------------------------------------------------- 
    12 #if defined key_pisces 
     11   !!             3.5  !  2012-05  (C. Ethe) Merge PISCES-LOBSTER 
     12   !!---------------------------------------------------------------------- 
     13#if defined key_pisces || defined key_pisces_reduced 
    1314   !!---------------------------------------------------------------------- 
    1415   !!   'key_pisces'                                       PISCES bio-model 
     
    2021   USE trc             !  passive tracers common variables  
    2122   USE sms_pisces      !  PISCES Source Minus Sink variables 
    22    USE p4zche          !  Chemical model 
    23    USE p4zsink         !  vertical flux of particulate matter due to sinking 
    24    USE p4zopt          !  optical model 
    25    USE p4zrem          !  Remineralisation of organic matter 
    26    USE p4zflx          !  Gas exchange 
    27    USE p4zsed          !  Sedimentation 
    28    USE p4zlim          !  Co-limitations of differents nutrients 
    29    USE p4zprod         !  Growth rate of the 2 phyto groups 
    30    USE p4zmicro        !  Sources and sinks of microzooplankton 
    31    USE p4zmeso         !  Sources and sinks of mesozooplankton 
    32    USE p4zmort         !  Mortality terms for phytoplankton 
    33    USE p4zlys          !  Calcite saturation 
    34    USE p4zsed          !  Sedimentation 
    3523 
    3624   IMPLICIT NONE 
     
    3927   PUBLIC   trc_ini_pisces   ! called by trcini.F90 module 
    4028 
    41    REAL(wp) :: sco2   =  2.312e-3_wp 
    42    REAL(wp) :: alka0  =  2.423e-3_wp 
    43    REAL(wp) :: oxyg0  =  177.6e-6_wp  
    44    REAL(wp) :: po4    =  2.174e-6_wp  
    45    REAL(wp) :: bioma0 =  1.000e-8_wp   
    46    REAL(wp) :: silic1 =  91.65e-6_wp   
    47    REAL(wp) :: no3    =  31.04e-6_wp * 7.625_wp 
    4829 
    4930#  include "top_substitute.h90" 
     
    6142      !! ** Purpose :   Initialisation of the PISCES biochemical model 
    6243      !!---------------------------------------------------------------------- 
    63       ! 
    64       INTEGER  ::  ji, jj, jk 
     44 
     45      IF( lk_pisces ) THEN  ;   CALL p4z_ini   !  PISCES 
     46      ELSE                  ;   CALL p2z_ini   !  LOBSTER 
     47      ENDIF 
     48 
     49   END SUBROUTINE trc_ini_pisces 
     50 
     51   SUBROUTINE p4z_ini 
     52      !!---------------------------------------------------------------------- 
     53      !!                   ***  ROUTINE p4z_ini *** 
     54      !! 
     55      !! ** Purpose :   Initialisation of the PISCES biochemical model 
     56      !!---------------------------------------------------------------------- 
     57#if defined key_pisces  
     58      ! 
     59      USE p4zsms          ! Main P4Z routine 
     60      USE p4zche          !  Chemical model 
     61      USE p4zsink         !  vertical flux of particulate matter due to sinking 
     62      USE p4zopt          !  optical model 
     63      USE p4zsbc          !  Boundary conditions 
     64      USE p4zfechem       !  Iron chemistry 
     65      USE p4zrem          !  Remineralisation of organic matter 
     66      USE p4zflx          !  Gas exchange 
     67      USE p4zlim          !  Co-limitations of differents nutrients 
     68      USE p4zprod         !  Growth rate of the 2 phyto groups 
     69      USE p4zmicro        !  Sources and sinks of microzooplankton 
     70      USE p4zmeso         !  Sources and sinks of mesozooplankton 
     71      USE p4zmort         !  Mortality terms for phytoplankton 
     72      USE p4zlys          !  Calcite saturation 
     73      ! 
     74      REAL(wp), SAVE :: sco2   =  2.312e-3_wp 
     75      REAL(wp), SAVE :: alka0  =  2.423e-3_wp 
     76      REAL(wp), SAVE :: oxyg0  =  177.6e-6_wp  
     77      REAL(wp), SAVE :: po4    =  2.174e-6_wp  
     78      REAL(wp), SAVE :: bioma0 =  1.000e-8_wp   
     79      REAL(wp), SAVE :: silic1 =  91.65e-6_wp   
     80      REAL(wp), SAVE :: no3    =  31.04e-6_wp * 7.625_wp 
     81      ! 
     82      INTEGER  ::  ji, jj, jk, ierr 
    6583      REAL(wp) ::  zcaralk, zbicarb, zco3 
    6684      REAL(wp) ::  ztmas, ztmas1 
    6785      !!---------------------------------------------------------------------- 
     86 
    6887      IF(lwp) WRITE(numout,*) 
    69       IF(lwp) WRITE(numout,*) ' trc_ini_pisces :   PISCES biochemical model initialisation' 
     88      IF(lwp) WRITE(numout,*) ' p4z_ini :   PISCES biochemical model initialisation' 
    7089      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    7190 
    72       CALL pisces_alloc()                          ! Allocate PISCES arrays 
    73  
     91                                                 ! Allocate PISCES arrays 
     92      ierr =         sms_pisces_alloc()           
     93      ierr = ierr +  p4z_che_alloc() 
     94      ierr = ierr +  p4z_sink_alloc() 
     95      ierr = ierr +  p4z_opt_alloc() 
     96      ierr = ierr +  p4z_prod_alloc() 
     97      ierr = ierr +  p4z_rem_alloc() 
     98      ierr = ierr +  p4z_flx_alloc() 
     99      ! 
     100      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     101      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' ) 
     102      ! 
     103 
     104      CALL p4z_sms_init       !  Maint routine 
    74105      !                                            ! Time-step 
    75106      rfact   = rdttrc(1)                          ! --------- 
     
    132163         xksimax(:,:) = xksi(:,:) 
    133164 
    134       ENDIF 
    135  
    136       IF( .NOT. ln_rsttr ) THEN 
    137165         ! Initialization of chemical variables of the carbon cycle 
    138166         ! -------------------------------------------------------- 
     
    159187      CALL p4z_lim_init       !  co-limitations by the various nutrients 
    160188      CALL p4z_prod_init      !  phytoplankton growth rate over the global ocean. 
     189      CALL p4z_sbc_init       !  boundary conditions 
     190      CALL p4z_fechem_init    !  Iron chemistry 
    161191      CALL p4z_rem_init       !  remineralisation 
    162192      CALL p4z_mort_init      !  phytoplankton mortality  
    163193      CALL p4z_micro_init     !  microzooplankton 
    164194      CALL p4z_meso_init      !  mesozooplankton 
    165       CALL p4z_sed_init       !  sedimentation  
    166195      CALL p4z_lys_init       !  calcite saturation 
    167196      CALL p4z_flx_init       !  gas exchange  
     
    172201      IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done' 
    173202      IF(lwp) WRITE(numout,*)  
    174       ! 
    175    END SUBROUTINE trc_ini_pisces 
    176  
    177  
    178    SUBROUTINE pisces_alloc 
    179       !!---------------------------------------------------------------------- 
    180       !!                     ***  ROUTINE pisces_alloc *** 
     203#endif 
     204      ! 
     205   END SUBROUTINE p4z_ini 
     206 
     207   SUBROUTINE p2z_ini 
     208      !!---------------------------------------------------------------------- 
     209      !!                   ***  ROUTINE p2z_ini *** 
    181210      !! 
    182       !! ** Purpose :   Allocate all the dynamic arrays of PISCES  
    183       !!---------------------------------------------------------------------- 
    184       ! 
    185       INTEGER :: ierr 
    186       !!---------------------------------------------------------------------- 
    187       ! 
    188       ierr =         sms_pisces_alloc()          ! Start of PISCES-related alloc routines... 
    189       ierr = ierr +  p4z_che_alloc() 
    190       ierr = ierr +  p4z_sink_alloc() 
    191       ierr = ierr +  p4z_opt_alloc() 
    192       ierr = ierr +  p4z_prod_alloc() 
    193       ierr = ierr +  p4z_rem_alloc() 
    194       ierr = ierr +  p4z_sed_alloc() 
    195       ierr = ierr +  p4z_flx_alloc() 
     211      !! ** Purpose :   Initialisation of the LOBSTER biochemical model 
     212      !!---------------------------------------------------------------------- 
     213#if defined key_pisces_reduced  
     214      ! 
     215      USE p2zopt 
     216      USE p2zexp 
     217      USE p2zbio 
     218      USE p2zsed 
     219      ! 
     220      INTEGER  ::  ji, jj, jk, ierr 
     221      !!---------------------------------------------------------------------- 
     222 
     223      IF(lwp) WRITE(numout,*) 
     224      IF(lwp) WRITE(numout,*) ' p2z_ini :   LOBSTER biochemical model initialisation' 
     225      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
     226 
     227      ierr =        sms_pisces_alloc()           
     228      ierr = ierr + p2z_exp_alloc() 
    196229      ! 
    197230      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
    198       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' ) 
    199       ! 
    200    END SUBROUTINE pisces_alloc 
    201  
     231      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' ) 
     232 
     233      ! LOBSTER initialisation for GYRE : init NO3=f(density) by asklod AS Kremeur 2005-07 
     234      ! ---------------------- 
     235      IF( .NOT. ln_rsttr ) THEN             ! in case of  no restart  
     236         trn(:,:,:,jpdet) = 0.1 * tmask(:,:,:) 
     237         trn(:,:,:,jpzoo) = 0.1 * tmask(:,:,:) 
     238         trn(:,:,:,jpnh4) = 0.1 * tmask(:,:,:) 
     239         trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:) 
     240         trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:) 
     241         WHERE( rhd(:,:,:) <= 24.5e-3 )  ;  trn(:,:,:,jpno3 ) = 2._wp * tmask(:,:,:) 
     242         ELSE WHERE                      ;  trn(:,:,:,jpno3) = ( 15.55 * ( rhd(:,:,:) * 1000. ) - 380.11 ) * tmask(:,:,:) 
     243         END WHERE                        
     244      ENDIF 
     245      !                       !  Namelist read 
     246      CALL p2z_opt_init       !  Optics parameters 
     247      CALL p2z_sed_init       !  sedimentation 
     248      CALL p2z_bio_init       !  biology 
     249      CALL p2z_exp_init       !  export  
     250      ! 
     251      IF(lwp) WRITE(numout,*)  
     252      IF(lwp) WRITE(numout,*) 'Initialization of LOBSTER tracers done' 
     253      IF(lwp) WRITE(numout,*)  
     254#endif 
     255      ! 
     256   END SUBROUTINE p2z_ini 
    202257#else 
    203258   !!---------------------------------------------------------------------- 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90

    r3294 r3680  
    11MODULE trcnam_pisces 
    22   !!====================================================================== 
    3    !!                      ***  MODULE trcnam_lobster  *** 
     3   !!                      ***  MODULE trcnam_pisces  *** 
    44   !! TOP :   initialisation of some run parameters for PISCES bio-model 
    55   !!====================================================================== 
     
    99   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.pisces.h90 
    1010   !!---------------------------------------------------------------------- 
    11 #if defined key_pisces 
     11#if defined key_pisces || defined key_pisces_reduced 
    1212   !!---------------------------------------------------------------------- 
    1313   !!   'key_pisces'   :                                   PISCES bio-model 
     
    1919   USE trc             ! TOP variables 
    2020   USE sms_pisces      ! sms trends 
     21   USE trdmod_trc_oce 
    2122   USE iom             ! I/O manager 
    2223 
     
    4849      !! 
    4950      INTEGER :: jl, jn 
    50       TYPE(DIAG), DIMENSION(jp_pisces_2d) :: pisdia2d 
    51       TYPE(DIAG), DIMENSION(jp_pisces_3d) :: pisdia3d 
     51      TYPE(DIAG), DIMENSION(jp_pisces_2d)  :: pisdia2d 
     52      TYPE(DIAG), DIMENSION(jp_pisces_3d)  :: pisdia3d 
     53      TYPE(DIAG), DIMENSION(jp_pisces_trd) :: pisdiabio 
     54      CHARACTER(LEN=20)   ::   clname 
    5255      !! 
    53       NAMELIST/nampisbio/ nrdttrc, wsbio, xkmort, ferat3, wsbio2 
    54 #if defined key_kriest 
    55       NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_mass_min, xkr_mass_max 
     56      NAMELIST/nampisdia/ pisdia3d, pisdia2d     ! additional diagnostics 
     57#if defined key_pisces_reduced 
     58      NAMELIST/nampisdbi/ pisdiabio 
    5659#endif 
    57       NAMELIST/nampisdia/ pisdia3d, pisdia2d     ! additional diagnostics 
    58       NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp, ln_pisclo 
    5960 
    6061      !!---------------------------------------------------------------------- 
    6162 
    6263      IF(lwp) WRITE(numout,*) 
    63       IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read PISCES namelists' 
     64      clname = 'namelist_pisces' 
     65#if defined key_pisces 
     66      IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read PISCES namelist' 
     67#else 
     68      IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read LOBSTER namelist' 
     69#endif 
    6470      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
     71      CALL ctl_opn( numnatp, TRIM( clname ), 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    6572 
    66  
    67       !                               ! Open the namelist file 
    68       !                               ! ---------------------- 
    69       CALL ctl_opn( numnatp, 'namelist_pisces', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    70  
    71       REWIND( numnatp )                     
    72       READ  ( numnatp, nampisbio ) 
    73  
    74       IF(lwp) THEN                         ! control print 
    75          WRITE(numout,*) ' Namelist : nampisbio' 
    76          WRITE(numout,*) '    frequence pour la biologie                nrdttrc   =', nrdttrc 
    77          WRITE(numout,*) '    POC sinking speed                         wsbio     =', wsbio 
    78          WRITE(numout,*) '    half saturation constant for mortality    xkmort    =', xkmort 
    79          WRITE(numout,*) '    Fe/C in zooplankton                       ferat3    =', ferat3 
    80          WRITE(numout,*) '    Big particles sinking speed               wsbio2    =', wsbio2 
    81       ENDIF 
    82  
    83 #if defined key_kriest 
    84  
    85       !                               ! nampiskrp : kriest parameters 
    86       !                               ! ----------------------------- 
    87       xkr_eta      = 0.62         
    88       xkr_zeta     = 1.62         
    89       xkr_mass_min = 0.0002      
    90       xkr_mass_max = 1.       
    91  
    92       REWIND( numnatp )                     ! read natkriest 
    93       READ  ( numnatp, nampiskrp ) 
    94  
    95       IF(lwp) THEN 
    96          WRITE(numout,*) 
    97          WRITE(numout,*) ' Namelist : nampiskrp' 
    98          WRITE(numout,*) '    Sinking  exponent                        xkr_eta      = ', xkr_eta 
    99          WRITE(numout,*) '    N content exponent                       xkr_zeta     = ', xkr_zeta 
    100          WRITE(numout,*) '    Minimum mass for Aggregates              xkr_mass_min = ', xkr_mass_min 
    101          WRITE(numout,*) '    Maximum mass for Aggregates              xkr_mass_max = ', xkr_mass_max 
    102          WRITE(numout,*) 
    103      ENDIF 
    104  
    105  
    106      ! Computation of some variables 
    107      xkr_massp = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta 
    108  
    109 #endif 
    11073      ! 
    11174      IF( .NOT.lk_iomput .AND. ln_diatrc ) THEN 
     
    162125      ENDIF 
    163126 
    164       REWIND( numnatp ) 
    165       READ  ( numnatp, nampisdmp ) 
     127#if defined key_pisces_reduced 
    166128 
    167       IF(lwp) THEN                         ! control print 
    168          WRITE(numout,*) 
    169          WRITE(numout,*) ' Namelist : nampisdmp' 
    170          WRITE(numout,*) '    Relaxation of tracer to glodap mean value             ln_pisdmp      =', ln_pisdmp 
    171          WRITE(numout,*) '    Frequency of Relaxation                               nn_pisdmp      =', nn_pisdmp 
    172          WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo 
    173          WRITE(numout,*) ' ' 
    174       ENDIF 
     129      IF( ( .NOT.lk_iomput .AND. ln_diabio ) .OR. lk_trdmld_trc ) THEN 
     130         ! 
     131         ! Namelist nampisdbi 
     132         ! ------------------- 
     133         DO jl = 1, jp_pisces_trd 
     134            IF(     jl <  10 ) THEN   ;   WRITE (pisdiabio(jl)%sname,'("BIO_",I1)') jl      ! short name 
     135            ELSEIF (jl < 100 ) THEN   ;   WRITE (pisdiabio(jl)%sname,'("BIO_",I2)') jl 
     136            ELSE                      ;   WRITE (pisdiabio(jl)%sname,'("BIO_",I3)') jl 
     137            ENDIF 
     138            WRITE(pisdiabio(jl)%lname,'("BIOLOGICAL TREND NUMBER ",I2)') jl                 ! long name 
     139            pisdiabio(jl)%units = 'mmoleN/m3/s '                                            ! units 
     140         END DO 
     141 
     142         REWIND( numnatp ) 
     143         READ  ( numnatp, nampisdbi ) 
     144 
     145         DO jl = 1, jp_pisces_trd 
     146            jn = jp_pcs0_trd + jl - 1 
     147            ctrbio(jl) = pisdiabio(jl)%sname 
     148            ctrbil(jl) = pisdiabio(jl)%lname 
     149            ctrbiu(jl) = pisdiabio(jl)%units 
     150         END DO 
     151 
     152         IF(lwp) THEN                   ! control print 
     153            WRITE(numout,*) 
     154            WRITE(numout,*) ' Namelist : nampisdbi' 
     155            DO jl = 1, jp_pisces_trd 
     156               jn = jp_pcs0_trd + jl - 1 
     157               WRITE(numout,*) '  biological trend No : ', jn, '    short name : ', ctrbio(jn), & 
     158                 &             '  long name  : ', ctrbio(jn), '   unit : ', ctrbio(jn) 
     159            END DO 
     160            WRITE(numout,*) ' ' 
     161         END IF 
     162         ! 
     163      END IF 
     164 
     165#endif 
    175166 
    176167   END SUBROUTINE trc_nam_pisces 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90

    r3320 r3680  
    77   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90 
    88   !!---------------------------------------------------------------------- 
    9 #if defined key_pisces 
     9#if defined key_pisces || defined key_pisces_reduced 
    1010   !!---------------------------------------------------------------------- 
    1111   !!   'key_pisces'                                       PISCES bio-model 
     
    1313   !!   trcsms_pisces        :  Time loop of passive tracers sms 
    1414   !!---------------------------------------------------------------------- 
    15    USE oce_trc         !  shared variables between ocean and passive tracers 
    16    USE trc             !  passive tracers common variables  
    17    USE sms_pisces      !  PISCES Source Minus Sink variables 
    18    USE p4zbio          !  Biological model 
    19    USE p4zche          !  Chemical model 
    20    USE p4zlys          !  Calcite saturation 
    21    USE p4zflx          !  Gas exchange 
    22    USE p4zsed          !  Sedimentation 
    23    USE p4zint          !  time interpolation 
    24    USE trdmod_oce      !  Ocean trends variables 
    25    USE trdmod_trc      !  TOP trends variables 
    26    USE sedmodel        !  Sediment model 
    27    USE prtctl_trc      !  print control for debugging 
     15   USE par_pisces 
     16   USE p4zsms 
     17   USE p2zsms 
    2818 
    2919   IMPLICIT NONE 
     
    3121 
    3222   PUBLIC   trc_sms_pisces    ! called in trcsms.F90 
    33  
    34    LOGICAL ::  ln_check_mass = .false.       !: Flag to check mass conservation  
    35  
    36    INTEGER ::  numno3  !: logical unit for NO3 budget 
    37    INTEGER ::  numalk  !: logical unit for talk budget 
    38    INTEGER ::  numsil  !: logical unit for Si budget 
    39  
    4023   !!---------------------------------------------------------------------- 
    4124   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    4629CONTAINS 
    4730 
     31      !!---------------------------------------------------------------------- 
     32      !!                   ***  ROUTINE trc_ini_pisces *** 
     33      !! 
     34      !! ** Purpose :   Initialisation of the PISCES biochemical model 
     35      !!---------------------------------------------------------------------- 
     36 
     37 
    4838   SUBROUTINE trc_sms_pisces( kt ) 
    4939      !!--------------------------------------------------------------------- 
     
    5141      !! 
    5242      !! ** Purpose :   Managment of the call to Biological sources and sinks  
    53       !!              routines of PISCES bio-model 
    54       !! 
    55       !! ** Method  : - at each new day ... 
    56       !!              - several calls of bio and sed ??? 
    57       !!              - ... 
    58       !!--------------------------------------------------------------------- 
    59       ! 
    60       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    61       !! 
    62       INTEGER ::   jnt, jn, jl 
    63       CHARACTER (len=25) :: charout 
    64       REAL(wp), POINTER, DIMENSION(:,:,:,:)  :: ztrdpis 
    65       !!--------------------------------------------------------------------- 
    66       ! 
    67       IF( nn_timing == 1 )  CALL timing_start('trc_sms_pisces') 
    68       ! 
    69       IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 )   CALL trc_sms_pisces_dmp( kt )  ! Relaxation of some tracers 
    70                                                                    CALL trc_sms_pisces_mass_conserv( kt ) ! Mass conservation checking 
    71       IF( l_trdtrc )  THEN 
    72          CALL wrk_alloc( jpi, jpj, jpk, jp_pisces, ztrdpis )  
    73          DO jn = 1, jp_pisces 
    74             jl = jn + jp_pcs0 - 1 
    75             ztrdpis(:,:,:,jn) = trn(:,:,:,jl) 
    76          ENDDO 
    77       ENDIF 
    78  
    79       IF( ndayflxtr /= nday_year ) THEN      ! New days 
    80          ! 
    81          ndayflxtr = nday_year 
    82  
    83          IF(lwp) write(numout,*) 
    84          IF(lwp) write(numout,*) ' New chemical constants and various rates for biogeochemistry at new day : ', nday_year 
    85          IF(lwp) write(numout,*) '~~~~~~' 
    86  
    87          CALL p4z_che              ! computation of chemical constants 
    88          CALL p4z_int              ! computation of various rates for biogeochemistry 
    89          ! 
    90       ENDIF 
    91  
    92  
    93       DO jnt = 1, nrdttrc          ! Potential time splitting if requested 
    94          ! 
    95          CALL p4z_bio (kt, jnt)    ! Compute soft tissue production (POC) 
    96          CALL p4z_sed (kt, jnt)    ! compute soft tissue remineralisation 
    97          ! 
    98          DO jn = jp_pcs0, jp_pcs1 
    99             trb(:,:,:,jn) = trn(:,:,:,jn) 
    100          ENDDO 
    101          ! 
    102       END DO 
    103  
    104       IF( l_trdtrc )  THEN 
    105          DO jn = 1, jp_pisces 
    106             jl = jn + jp_pcs0 - 1 
    107             ztrdpis(:,:,:,jn) = ( ztrdpis(:,:,:,jn) - trn(:,:,:,jl) ) * rfact2r 
    108          ENDDO 
    109       ENDIF 
    110  
    111       CALL p4z_lys( kt )             ! Compute CaCO3 saturation 
    112       CALL p4z_flx( kt )             ! Compute surface fluxes 
    113  
    114       DO jn = jp_pcs0, jp_pcs1 
    115         CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) 
    116         CALL lbc_lnk( trb(:,:,:,jn), 'T', 1. ) 
    117         CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) 
    118       END DO 
    119  
    120       IF( l_trdtrc ) THEN 
    121          DO jn = 1, jp_pisces 
    122             jl = jn + jp_pcs0 - 1 
    123              ztrdpis(:,:,:,jn) = ztrdpis(:,:,:,jn) + tra(:,:,:,jl) 
    124              CALL trd_mod_trc( ztrdpis(:,:,:,jn), jn, jptra_trd_sms, kt )   ! save trends 
    125           END DO 
    126           CALL wrk_dealloc( jpi, jpj, jpk, jp_pisces, ztrdpis )  
    127       END IF 
    128  
    129       IF( lk_sed ) THEN  
    130          ! 
    131          CALL sed_model( kt )     !  Main program of Sediment model 
    132          ! 
    133          DO jn = jp_pcs0, jp_pcs1 
    134            CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) 
    135          END DO 
    136          ! 
    137       ENDIF 
    138       ! 
    139       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_pisces') 
    140       ! 
    141    END SUBROUTINE trc_sms_pisces 
    142  
    143    SUBROUTINE trc_sms_pisces_dmp( kt ) 
    144       !!---------------------------------------------------------------------- 
    145       !!                    ***  trc_sms_pisces_dmp  *** 
    146       !! 
    147       !! ** purpose  : Relaxation of some tracers 
    148       !!---------------------------------------------------------------------- 
    149       ! 
    150       INTEGER, INTENT( in )  ::     kt ! time step 
    151       ! 
    152       REAL(wp) ::  alkmean = 2426.     ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) 
    153       REAL(wp) ::  po4mean = 2.165     ! mean value of phosphates 
    154       REAL(wp) ::  no3mean = 30.90     ! mean value of nitrate 
    155       REAL(wp) ::  silmean = 91.51     ! mean value of silicate 
    156       ! 
    157       REAL(wp) :: zarea, zalksum, zpo4sum, zno3sum, zsilsum 
    158       !!--------------------------------------------------------------------- 
    159  
    160  
    161       IF(lwp)  WRITE(numout,*) 
    162       IF(lwp)  WRITE(numout,*) ' trc_sms_pisces_dmp : Relaxation of nutrients at time-step kt = ', kt 
    163       IF(lwp)  WRITE(numout,*) 
    164  
    165       IF( cp_cfg == "orca" .AND. .NOT. lk_c1d ) THEN      ! ORCA condiguration (not 1D) ! 
    166          !                                                    ! --------------------------- ! 
    167          ! set total alkalinity, phosphate, nitrate & silicate 
    168          zarea          = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6               
    169  
    170          zalksum = glob_sum( trn(:,:,:,jptal) * cvol(:,:,:)  ) * zarea 
    171          zpo4sum = glob_sum( trn(:,:,:,jppo4) * cvol(:,:,:)  ) * zarea / 122. 
    172          zno3sum = glob_sum( trn(:,:,:,jpno3) * cvol(:,:,:)  ) * zarea / 7.6 
    173          zsilsum = glob_sum( trn(:,:,:,jpsil) * cvol(:,:,:)  ) * zarea 
    174   
    175          IF(lwp) WRITE(numout,*) '       TALK mean : ', zalksum 
    176          trn(:,:,:,jptal) = trn(:,:,:,jptal) * alkmean / zalksum 
    177  
    178          IF(lwp) WRITE(numout,*) '       PO4  mean : ', zpo4sum 
    179          trn(:,:,:,jppo4) = trn(:,:,:,jppo4) * po4mean / zpo4sum 
    180  
    181          IF(lwp) WRITE(numout,*) '       NO3  mean : ', zno3sum 
    182          trn(:,:,:,jpno3) = trn(:,:,:,jpno3) * no3mean / zno3sum 
    183  
    184          IF(lwp) WRITE(numout,*) '       SiO3 mean : ', zsilsum 
    185          trn(:,:,:,jpsil) = MIN( 400.e-6,trn(:,:,:,jpsil) * silmean / zsilsum ) 
    186          ! 
    187       ENDIF 
    188  
    189    END SUBROUTINE trc_sms_pisces_dmp 
    190  
    191    SUBROUTINE trc_sms_pisces_mass_conserv ( kt ) 
    192       !!---------------------------------------------------------------------- 
    193       !!                  ***  ROUTINE trc_sms_pisces_mass_conserv  *** 
    194       !! 
    195       !! ** Purpose :  Mass conservation check  
     43      !!                routines of PISCES or LOBSTER bio-model 
    19644      !! 
    19745      !!--------------------------------------------------------------------- 
    19846      ! 
    19947      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    200       !! 
    201       REAL(wp) :: zalkbudget, zno3budget, zsilbudget 
     48      !!--------------------------------------------------------------------- 
    20249      ! 
    203       NAMELIST/nampismass/ ln_check_mass 
    204       !!--------------------------------------------------------------------- 
    205  
    206       IF( kt == nittrc000 ) THEN  
    207          REWIND( numnatp )        
    208          READ  ( numnatp, nampismass ) 
    209          IF(lwp) THEN                         ! control print 
    210             WRITE(numout,*) ' ' 
    211             WRITE(numout,*) ' Namelist parameter for mass conservation checking' 
    212             WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 
    213             WRITE(numout,*) '    Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass 
    214          ENDIF 
    215  
    216          IF( ln_check_mass .AND. lwp) THEN      !   Open budget file of NO3, ALK, Si 
    217             CALL ctl_opn( numno3, 'no3.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
    218             CALL ctl_opn( numsil, 'sil.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
    219             CALL ctl_opn( numalk, 'talk.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
    220          ENDIF 
     50      IF( lk_p4z ) THEN  ;   CALL p4z_sms( kt )   !  PISCES 
     51      ELSE               ;   CALL p2z_sms( kt )   !  LOBSTER 
    22152      ENDIF 
    222  
    223       IF( ln_check_mass ) THEN      !   Compute the budget of NO3, ALK, Si 
    224          zno3budget = glob_sum( (   trn(:,:,:,jpno3) + trn(:,:,:,jpnh4)  & 
    225             &                     + trn(:,:,:,jpphy) + trn(:,:,:,jpdia)  & 
    226             &                     + trn(:,:,:,jpzoo) + trn(:,:,:,jpmes)  & 
    227             &                     + trn(:,:,:,jppoc) + trn(:,:,:,jpgoc)  & 
    228             &                     + trn(:,:,:,jpdoc)                     ) * cvol(:,:,:)  )  
    229          !  
    230          zsilbudget = glob_sum( (   trn(:,:,:,jpsil) + trn(:,:,:,jpgsi)  & 
    231             &                     + trn(:,:,:,jpdsi)                     ) * cvol(:,:,:)  ) 
    232          !  
    233          zalkbudget = glob_sum( (   trn(:,:,:,jpno3) * rno3              & 
    234             &                     + trn(:,:,:,jptal)                     & 
    235             &                     + trn(:,:,:,jpcal) * 2.                ) * cvol(:,:,:)  ) 
    236  
    237          IF( lwp ) THEN 
    238             WRITE(numno3,9500) kt,  zno3budget / areatot 
    239             WRITE(numsil,9500) kt,  zsilbudget / areatot 
    240             WRITE(numalk,9500) kt,  zalkbudget / areatot 
    241          ENDIF 
    242        ENDIF 
    243  9500  FORMAT(i10,e18.10)      
    244        ! 
    245    END SUBROUTINE trc_sms_pisces_mass_conserv 
     53      ! 
     54   END SUBROUTINE trc_sms_pisces 
    24655 
    24756#else 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90

    r3295 r3680  
    66   !! History :   1.0  !  2009-05 (C. Ethe)  Original code 
    77   !!---------------------------------------------------------------------- 
    8 #if defined key_top && key_pisces && defined key_iomput 
     8#if defined key_top && defined key_iomput && ( defined key_pisces || defined key_pisces_reduced ) 
    99   !!---------------------------------------------------------------------- 
    10    !!   'key_pisces'                                           PISCES model 
     10   !!   'key_pisces or key_pisces_reduced'                     PISCES model 
    1111   !!---------------------------------------------------------------------- 
    1212   !! trc_wri_pisces   :  outputs of concentration fields 
    1313   !!---------------------------------------------------------------------- 
    1414   USE trc         ! passive tracers common variables  
     15   USE sms_pisces  ! PISCES variables 
    1516   USE iom         ! I/O manager 
    1617 
     
    3536      ! write the tracer concentrations in the file 
    3637      ! --------------------------------------- 
    37       DO jn = 1, jptra 
    38          zrfact = 1.0e+6  
    39          IF( jn == jpno3 .OR. jn == jpnh4 ) zrfact = 1.0e+6 / 7.6 
    40          IF( jn == jppo4  )                 zrfact = 1.0e+6 / 122. 
     38#if defined key_pisces_reduced 
     39      DO jn = jp_pcs0, jp_pcs1 
    4140         cltra = TRIM( ctrcnm(jn) )                  ! short title for tracer 
    4241         CALL iom_put( cltra, trn(:,:,:,jn) * zrfact ) 
    4342      END DO 
     43#else 
     44      DO jn = jp_pcs0, jp_pcs1 
     45         zrfact = 1.0e+6  
     46         IF( jn == jpno3 .OR. jn == jpnh4 ) zrfact = rno3 * 1.0e+6  
     47         IF( jn == jppo4  )                 zrfact = po4r * 1.0e+6 
     48         cltra = TRIM( ctrcnm(jn) )                  ! short title for tracer 
     49         CALL iom_put( cltra, trn(:,:,:,jn) * zrfact ) 
     50      END DO 
     51#endif 
    4452      ! 
    4553   END SUBROUTINE trc_wri_pisces 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r3294 r3680  
    8282      IF( kt == nittrc000 )   CALL trc_adv_ctl          ! initialisation & control of options 
    8383 
    84 #if ! defined key_pisces 
    85       IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
    86          r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping) 
    87       ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1 
    88          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     84      IF( ln_top_euler) THEN 
     85         r2dt(:) =  rdttrc(:)              ! = rdttrc (use Euler time stepping) 
     86      ELSE 
     87         IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
     88            r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping) 
     89         ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1 
     90            r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     91         ENDIF 
    8992      ENDIF 
    90 #else 
    91       r2dt(:) =  rdttrc(:)              ! = rdttrc (for PISCES use Euler time stepping) 
    92 #endif 
    9393 
    9494      !                                                   ! effective transport 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90

    r3294 r3680  
    8181      NAMELIST/namtrc_rad/ ln_trcrad 
    8282#if defined key_trcdmp 
    83       NAMELIST/namtrc_dmp/ nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, & 
     83      NAMELIST/namtrc_dmp/ ln_trcdmp, nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, & 
    8484        &                  rn_bot_tr , rn_dep_tr , nn_file_tr 
    8585#endif 
     
    156156         WRITE(numout,*) '~~~~~~~' 
    157157         WRITE(numout,*) '   Namelist namtrc_dmp : set damping parameter' 
     158         WRITE(numout,*) '      add a damping term or not      ln_trcdmp = ', ln_trcdmp 
    158159         WRITE(numout,*) '      tracer damping option          nn_hdmp_tr = ', nn_hdmp_tr 
    159160         WRITE(numout,*) '      mixed layer damping option     nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)' 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90

    r3294 r3680  
    3434   USE tranxt 
    3535# if defined key_agrif 
    36    USE agrif_top_update 
    3736   USE agrif_top_interp 
    3837# endif 
     
    146145      ENDIF 
    147146 
    148 #if defined key_agrif 
    149       ! Update tracer at AGRIF zoom boundaries 
    150       IF( .NOT.Agrif_Root() )    CALL Agrif_Update_Trc( kt )      ! children only 
    151 #endif       
    152  
    153147      ! trends computation 
    154148      IF( l_trdtrc ) THEN                                      ! trends 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90

    r3294 r3680  
    6363      IF( lk_cfc     )   CALL trc_rad_sms( kt, trb, trn, jp_cfc0 , jp_cfc1               )  ! CFC model 
    6464      IF( lk_c14b    )   CALL trc_rad_sms( kt, trb, trn, jp_c14b0, jp_c14b1              )  ! bomb C14 
    65       IF( lk_lobster )   CALL trc_rad_sms( kt, trb, trn, jp_lob0 , jp_lob1, cpreserv='Y' )  ! LOBSTER model 
    6665      IF( lk_pisces  )   CALL trc_rad_sms( kt, trb, trn, jp_pcs0 , jp_pcs1, cpreserv='Y' )  ! PISCES model 
    6766      IF( lk_my_trc  )   CALL trc_rad_sms( kt, trb, trn, jp_myt0 , jp_myt1               )  ! MY_TRC model 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r3625 r3680  
    5050      !!            tra = tra + emp * trn / e3t   for k=1 
    5151      !!         where emp, the surface freshwater budget (evaporation minus 
    52       !!         precipitation minus runoff) given in kg/m2/s is divided 
     52      !!         precipitation ) given in kg/m2/s is divided 
    5353      !!         by 1035 kg/m3 (density of ocean water) to obtain m/s. 
    5454      !! 
     
    7979      ENDIF 
    8080 
     81      ! Coupling online : river runoff is added to the horizontal divergence (hdivn) in the subroutine sbc_rnf_div  
     82      ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 
    8183 
    82       IF( lk_offline ) THEN          ! sfx in dynamical files contains sfx  - rnf 
    83          zsfx(:,:) = sfx(:,:)   
    84       ELSE                           ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff 
    85          IF( lk_vvl ) THEN                      ! volume variable 
    86             zsfx(:,:) = sfx(:,:) - emp(:,:)    
    87 !!ch         zsfx(:,:) = 0. 
    88          ELSE                                   ! linear free surface 
    89             IF( ln_rnf ) THEN  ;  zsfx(:,:) = sfx(:,:) - rnf(:,:)   !  E-P-R 
    90             ELSE               ;  zsfx(:,:) = sfx(:,:) 
    91             ENDIF  
    92          ENDIF  
    93       ENDIF  
     84      IF( .NOT. lk_offline .AND. lk_vvl ) THEN  ! online coupling + volume variable 
     85         zemps(:,:) = sfx(:,:) - emp(:,:) 
     86      ELSE 
     87         zemps(:,:) = emp(:,:) 
     88      ENDIF 
    9489 
    9590      ! 0. initialization 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r3294 r3680  
    2929 
    3030#if defined key_agrif 
    31    USE agrif_top_sponge ! Momemtum and tracers sponges 
     31   USE agrif_top_sponge ! tracers sponges 
     32   USE agrif_top_update ! tracers updates 
    3233#endif 
    3334 
     
    7677                                CALL trc_nxt( kstp )            ! tracer fields at next time step      
    7778         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     79 
     80#if defined key_agrif 
     81      IF( .NOT. Agrif_Root())   CALL Agrif_Update_Trc( kstp )   ! Update tracer at AGRIF zoom boundaries : children only 
     82#endif 
    7883         IF( ln_zps    )        CALL zps_hde( kstp, jptra, trn, gtru, gtrv )  ! Partial steps: now horizontal gradient of passive 
    7984                                                                ! tracers at the bottom ocean level 
     
    98103   !!---------------------------------------------------------------------- 
    99104CONTAINS 
    100    SUBROUTINE trc_trp( kt )              ! Empty routine 
    101       INTEGER, INTENT(in) ::   kt 
    102       WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt 
     105   SUBROUTINE trc_trp( kstp )              ! Empty routine 
     106      INTEGER, INTENT(in) ::   kstp 
     107      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp 
    103108   END SUBROUTINE trc_trp 
    104109#endif 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r3632 r3680  
    7373      IF( kt == nittrc000 )   CALL zdf_ctl          ! initialisation & control of options 
    7474 
    75 #if ! defined key_pisces 
    76       IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
    77          r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping) 
    78       ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1 
    79          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     75      IF( ln_top_euler) THEN 
     76         r2dt(:) =  rdttrc(:)              ! = rdttrc (use Euler time stepping) 
     77      ELSE 
     78         IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
     79            r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping) 
     80         ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1 
     81            r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     82         ENDIF 
    8083      ENDIF 
    81 #else 
    82       r2dt(:) =  rdttrc(:)              ! = rdttrc (for PISCES use Euler time stepping) 
    83 #endif 
    8484 
    8585      IF( l_trdtrc )  THEN 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc.F90

    r3320 r3680  
    3434   USE prtctl            ! print control 
    3535   USE sms_pisces        ! PISCES bio-model 
    36    USE sms_lobster       ! LOBSTER bio-model 
    3736   USE wrk_nemo          ! Memory allocation 
    3837 
     
    5352   INTEGER ::   ndimtrd1                         
    5453   INTEGER, SAVE ::  ionce, icount 
    55 #if defined key_lobster 
     54#if defined key_pisces_reduced 
    5655   INTEGER ::   nidtrdbio, nh_tb 
    5756   INTEGER, SAVE ::  ioncebio, icountbio 
     
    6261 
    6362   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::  ztmltrd2   ! 
    64 #if defined key_lobster 
     63#if defined key_pisces_reduced 
    6564   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ztmltrdbio2  ! only needed for mean diagnostics in trd_mld_bio() 
    6665#endif 
     
    8180      !!---------------------------------------------------------------------- 
    8281      ALLOCATE( ztmltrd2(jpi,jpj,jpltrd_trc,jptra) ,      & 
    83 #if defined key_lobster 
     82#if defined key_pisces_reduced 
    8483         &      ztmltrdbio2(jpi,jpj,jpdiabio)      ,      & 
    8584#endif 
     
    133132         SELECT CASE ( nn_ctls_trc )                                ! choice of the control surface 
    134133            CASE ( -2  )   ;   STOP 'trdmld_trc : not ready '     !     -> isopycnal surface (see ???) 
    135 #if defined key_pisces || defined key_lobster 
     134#if defined key_pisces || defined key_pisces_reduced 
    136135            CASE ( -1  )   ;   nmld_trc(:,:) = neln(:,:)          !     -> euphotic layer with light criterion 
    137136#endif 
     
    232231      INTEGER                         , INTENT(in) ::   ktrd          ! bio trend index 
    233232      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) ::   ptrc_trdmld   ! passive trc trend 
    234 #if defined key_lobster 
     233#if defined key_pisces_reduced 
    235234      ! 
    236235      INTEGER ::   ji, jj, jk, isum 
     
    940939      !!---------------------------------------------------------------------- 
    941940      INTEGER, INTENT( in ) ::   kt                       ! ocean time-step index 
    942 #if defined key_lobster 
     941#if defined key_pisces_reduced 
    943942      INTEGER  ::  jl, it, itmod 
    944943      LOGICAL  :: llwarn  = .TRUE., lldebug = .TRUE. 
     
    12171216      tmltrd_csum_ln_trc (:,:,:,:) = 0.e0   ;   rmld_sum_trc       (:,:)     = 0.e0 
    12181217 
    1219 #if defined key_lobster 
     1218#if defined key_pisces_reduced 
    12201219      nmoymltrdbio   = 0 
    12211220      tmltrd_sum_bio     (:,:,:) = 0.e0     ;   tmltrd_csum_ln_bio (:,:,:) = 0.e0 
    1222       DO jl = 1, jp_lobster_trd 
     1221      DO jl = 1, jp_pisces_trd 
    12231222          ctrd_bio(jl,1) = ctrbil(jl)   ! long name 
    12241223          ctrd_bio(jl,2) = ctrbio(jl)   ! short name 
     
    12341233         tml_sumb_trc       (:,:,:)   = 0.e0   ;   tmltrd_csum_ub_trc (:,:,:,:) = 0.e0     ! mean 
    12351234         tmltrd_atf_sumb_trc(:,:,:)   = 0.e0   ;   tmltrd_rad_sumb_trc(:,:,:)   = 0.e0  
    1236 #if defined key_lobster 
     1235#if defined key_pisces_reduced 
    12371236         tmltrd_csum_ub_bio (:,:,:) = 0.e0 
    12381237#endif 
     
    12421241      icount = 1   ;   ionce  = 1  ! open specifier    
    12431242 
    1244 #if defined key_lobster 
     1243#if defined key_pisces_reduced 
    12451244      icountbio = 1   ;   ioncebio  = 1  ! open specifier 
    12461245#endif 
     
    13371336      END DO 
    13381337 
    1339 #if defined key_lobster 
     1338#if defined key_pisces_reduced 
    13401339          !-- Create a NetCDF file and enter the define mode 
    13411340          CALL dia_nam( clhstnam, nn_trd_trc, 'trdbio' ) 
     
    13831382      END DO 
    13841383 
    1385 #if defined key_lobster 
    1386       DO jl = 1, jp_lobster_trd 
     1384#if defined key_pisces_reduced 
     1385      DO jl = 1, jp_pisces_trd 
    13871386         CALL histdef(nidtrdbio, TRIM("ML_"//ctrd_bio(jl,2)), TRIM(clmxl//" ML_"//ctrd_bio(jl,1))   ,            & 
    13881387             &    cltrcu, jpi, jpj, nh_tb, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) ! IOIPSL: time mean 
     
    13951394      END DO 
    13961395 
    1397 #if defined key_lobster 
     1396#if defined key_pisces_reduced 
    13981397      !-- Leave IOIPSL/NetCDF define mode 
    13991398      CALL histend( nidtrdbio, snc4set ) 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90

    r2528 r3680  
    105105            END DO                                                     ! tracer loop 
    106106            !                                                          ! =========== 
    107 #if defined key_lobster 
    108             DO jl = 1, jp_lobster_trd 
     107#if defined key_pisces_reduced 
     108            DO jl = 1, jp_pisces_trd 
    109109               CALL iom_rstput( kt, nitrst, nummldw_trc, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) ) 
    110110            ENDDO 
     
    190190         !                                                          ! =========== 
    191191 
    192 #if defined key_lobster 
    193          DO jl = 1, jp_lobster_trd 
     192#if defined key_pisces_reduced 
     193         DO jl = 1, jp_pisces_trd 
    194194            CALL iom_get( inum, jpdom_autoglo, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) ) 
    195195         ENDDO 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmod_trc_oce.F90

    r3320 r3680  
    106106# endif 
    107107 
    108 # if defined key_lobster 
     108# if defined key_pisces_reduced 
    109109   CHARACTER(LEN=80) :: clname_bio, ctrd_bio(jpdiabio,2) 
    110110   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  & 
     
    154154#endif 
    155155      ! 
    156 # if defined key_lobster 
     156# if defined key_pisces_reduced 
    157157      ALLOCATE( tmltrd_bio        (jpi,jpj,jpdiabio) ,     & 
    158158         &      tmltrd_sum_bio    (jpi,jpj,jpdiabio) ,     & 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90

    r3625 r3680  
    5656 
    5757   !* model domain * 
    58    USE dom_oce , ONLY :   lzoom      => lzoom        !: zoom flag 
    59    USE dom_oce , ONLY :   lzoom_e    => lzoom_e      !: East  zoom type flag 
    60    USE dom_oce , ONLY :   lzoom_w    => lzoom_w      !: West  zoom type flag 
    61    USE dom_oce , ONLY :   lzoom_s    => lzoom_s      !: South zoom type flag 
    62    USE dom_oce , ONLY :   lzoom_n    => lzoom_n      !: North zoom type flag 
    63    USE dom_oce , ONLY :   lzoom_arct => lzoom_arct   !: ORCA    arctic zoom flag 
    64    USE dom_oce , ONLY :   lzoom_anta => lzoom_anta   !: ORCA antarctic zoom flag 
    65    USE dom_oce , ONLY :   nperio     =>   nperio     !: type of lateral boundary condition        
    66    USE dom_oce , ONLY :   nimpp      =>   nimpp      !: i index for mpp-subdomain left bottom 
    67    USE dom_oce , ONLY :   njmpp      =>   njmpp      !: j index for mpp-subdomain left bottom 
    68    USE dom_oce , ONLY :   nproc      =>   nproc      !: number for local processor 
    69    USE dom_oce , ONLY :   narea      =>   narea      !: number for local area 
    70    USE dom_oce , ONLY :   mig        =>   mig        !: local  ==> global  domain i-indice 
    71    USE dom_oce , ONLY :   mjg        =>   mjg        !: local  ==> global  domain i-indice 
    72    USE dom_oce , ONLY :   mi0        =>   mi0        !: global ==> local domain i-indice  
    73    USE dom_oce , ONLY :   mi1        =>   mi1        !: (mi0=1 and mi1=0 if the global indice is not in the local one) 
    74    USE dom_oce , ONLY :   mj0        =>   mj0        !: global ==> local domain j-indice  
    75    USE dom_oce , ONLY :   mj1        =>   mj1        !: (mj0=1 and mj1=0 if the global indice is not in the local one) 
    76    USE dom_oce , ONLY :   nidom      =>   nidom 
    77    USE dom_oce , ONLY :   nimppt     => nimppt     !:i-indexes for each processor 
    78    USE dom_oce , ONLY :   njmppt     => njmppt       !:j-indexes for each processor 
    79    USE dom_oce , ONLY :   ibonit     => ibonit       !:i-processor neighbour existence 
    80    USE dom_oce , ONLY :   ibonjt     => ibonjt       !:j- processor neighbour existence  
    81    USE dom_oce , ONLY :   nlci       => nlci         !:i- & j-dimensions of the local subdomain 
    82    USE dom_oce , ONLY :   nlcj       => nlcj         !: 
    83    USE dom_oce , ONLY :   nldi       => nldi         !:first and last indoor i- and j-indexes 
    84    USE dom_oce , ONLY :   nlei       => nlei         !: 
    85    USE dom_oce , ONLY :   nldj       => nldj         !: 
    86    USE dom_oce , ONLY :   nlej       => nlej         !: 
    87    USE dom_oce , ONLY :   nlcit      => nlcit        !:dimensions of every i-subdomain 
    88    USE dom_oce , ONLY :   nlcjt      => nlcjt        !:dimensions of every j-subdomain 
    89    USE dom_oce , ONLY :   nldit      => nldit        !:first indoor index for each i-domain  
    90    USE dom_oce , ONLY :   nleit      => nleit        !:last indoor index for each i-domain  
    91    USE dom_oce , ONLY :   nldjt      => nldjt        !:first indoor index for each j-domain  
    92    USE dom_oce , ONLY :   nlejt      => nlejt        !:last indoor index for each j-domain  
    93   
    94    !* horizontal mesh * 
    95    USE dom_oce , ONLY :   glamt      =>   glamt      !: longitude of t-point (degre)   
    96    USE dom_oce , ONLY :   glamu      =>   glamu      !: longitude of t-point (degre)   
    97    USE dom_oce , ONLY :   glamv      =>   glamv      !: longitude of t-point (degre)   
    98    USE dom_oce , ONLY :   glamf      =>   glamf      !: longitude of t-point (degre)   
    99    USE dom_oce , ONLY :   gphit      =>   gphit      !: latitude  of t-point (degre)    
    100    USE dom_oce , ONLY :   gphiu      =>   gphiu      !: latitude  of t-point (degre)    
    101    USE dom_oce , ONLY :   gphiv      =>   gphiv      !: latitude  of t-point (degre)    
    102    USE dom_oce , ONLY :   gphif      =>   gphif      !: latitude  of t-point (degre)    
    103    USE dom_oce , ONLY :   e1t        =>   e1t        !: horizontal scale factors at t-point (m)   
    104    USE dom_oce , ONLY :   e2t        =>   e2t        !: horizontal scale factors at t-point (m)    
    105    USE dom_oce , ONLY :   e1e2t      =>   e1e2t      !: cell surface at t-point (m2) 
    106    USE dom_oce , ONLY :   e1u        =>   e1u        !: horizontal scale factors at u-point (m) 
    107    USE dom_oce , ONLY :   e2u        =>   e2u        !: horizontal scale factors at u-point (m) 
    108    USE dom_oce , ONLY :   e1v        =>   e1v        !: horizontal scale factors at v-point (m) 
    109    USE dom_oce , ONLY :   e2v        =>   e2v        !: horizontal scale factors at v-point (m)   
    110  
    111    !* vertical mesh * 
    112    USE dom_oce , ONLY :   gdept_0    =>   gdept_0    !: reference depth of t-points (m) 
    113    USE dom_oce , ONLY :   e3t_0      =>   e3t_0      !: reference depth of t-points (m)   
    114    USE dom_oce , ONLY :   e3w_0      =>   e3w_0      !: reference depth of w-points (m) 
    115    USE dom_oce , ONLY :   gdepw_0    =>   gdepw_0    !: reference depth of w-points (m) 
    116 # if ! defined key_zco 
    117    USE dom_oce , ONLY :   gdep3w     =>  gdep3w      !: ??? 
    118    USE dom_oce , ONLY :   gdept      =>  gdept       !: depth of t-points (m) 
    119    USE dom_oce , ONLY :   gdepw      =>  gdepw       !: depth of t-points (m) 
    120    USE dom_oce , ONLY :   e3t        =>  e3t         !: vertical scale factors at t- 
    121    USE dom_oce , ONLY :   e3u        =>  e3u         !: vertical scale factors at u- 
    122    USE dom_oce , ONLY :   e3v        =>  e3v         !: vertical scale factors v- 
    123    USE dom_oce , ONLY :   e3w        =>  e3w         !: w-points (m) 
    124    USE dom_oce , ONLY :   e3f        =>  e3f         !: f-points (m) 
    125    USE dom_oce , ONLY :   e3uw       =>  e3uw        !: uw-points (m) 
    126    USE dom_oce , ONLY :   e3vw       =>  e3vw        !: vw-points (m) 
    127 # endif 
    128    USE dom_oce , ONLY :   ln_zps     =>  ln_zps      !: partial steps flag 
    129    USE dom_oce , ONLY :   ln_sco     =>  ln_sco      !: s-coordinate flag 
    130    USE dom_oce , ONLY :   ln_zco     =>  ln_zco      !: z-coordinate flag 
    131    USE dom_oce , ONLY :   hbatt      =>  hbatt       !: ocean depth at the vertical of  t-point (m) 
    132    USE dom_oce , ONLY :   hbatu      =>  hbatu       !: ocean depth at the vertical of  u-point (m) 
    133    USE dom_oce , ONLY :   hbatv      =>  hbatv       !: ocean depth at the vertical of w-point (m) 
    134    USE dom_oce , ONLY :   gsigt      =>  gsigt       !: model level depth coefficient at T-levels 
    135    USE dom_oce , ONLY :   gsigw      =>  gsigw       !: model level depth coefficient at W-levels 
    136    USE dom_oce , ONLY :   gsi3w      =>  gsi3w       !: model level depth coef at w-levels (defined as the sum of e3w) 
    137    USE dom_oce , ONLY :   esigt      =>  esigt       !: vertical scale factor coef. at t-levels 
    138    USE dom_oce , ONLY :   esigw      =>  esigw       !: vertical scale factor coef. at w-levels 
    139    USE dom_oce , ONLY :   lk_vvl     =>  lk_vvl      !: variable grid flag 
    140 # if defined key_vvl 
    141    USE dom_oce , ONLY :   gdep3w_1   =>  gdep3w_1    !: ??? 
    142    USE dom_oce , ONLY :   gdept_1    =>  gdept_1     !: depth of t-points (m) 
    143    USE dom_oce , ONLY :   gdepw_1    =>  gdepw_1     !: depth of t-points (m) 
    144    USE dom_oce , ONLY :   e3t_1      =>  e3t_1       !: vertical scale factors at t- 
    145    USE dom_oce , ONLY :   e3u_1      =>  e3u_1       !: vertical scale factors at u- 
    146    USE dom_oce , ONLY :   e3v_1      =>  e3v_1       !: vertical scale factors v- 
    147    USE dom_oce , ONLY :   e3w_1      =>  e3w_1       !: w-points (m) 
    148    USE dom_oce , ONLY :   e3f_1      =>  e3f_1       !: f-points (m) 
    149    USE dom_oce , ONLY :   e3uw_1     =>  e3uw_1      !: uw-points (m) 
    150    USE dom_oce , ONLY :   e3vw_1     =>  e3vw_1      !: vw-points (m) 
    151 # endif 
    152    !* masks, bathymetry * 
    153    USE dom_oce , ONLY :   mbkt       =>   mbkt       !: vertical index of the bottom last T- ocean level 
    154    USE dom_oce , ONLY :   mbku       =>   mbku       !: vertical index of the bottom last U- ocean level 
    155    USE dom_oce , ONLY :   mbkv       =>   mbkv       !: vertical index of the bottom last V- ocean level 
    156    USE dom_oce , ONLY :   tmask_i    =>   tmask_i    !: Interior mask at t-points 
    157    USE dom_oce , ONLY :   tmask      =>   tmask      !: land/ocean mask at t-points 
    158    USE dom_oce , ONLY :   umask      =>   umask      !: land/ocean mask at u-points    
    159    USE dom_oce , ONLY :   vmask      =>   vmask      !: land/ocean mask at v-points  
    160    USE dom_oce , ONLY :   fmask      =>   fmask      !: land/ocean mask at f-points  
    161  
    162    !* time domain * 
    163    USE dom_oce , ONLY :   neuler     =>   neuler     !: restart euler forward option (0=Euler) 
    164    USE dom_oce , ONLY :   rdt        =>   rdt        !: time step for the dynamics  
    165    USE dom_oce , ONLY :   atfp       =>   atfp       !: asselin time filter parameter 
    166    USE dom_oce , ONLY :   atfp1      =>   atfp1      !: asselin time filter coeff. (atfp1= 1-2*atfp) 
    167    USE dom_oce , ONLY :   rdttra     =>   rdttra     !: vertical profile of tracer time step 
    168    !                                                 !: it is the accumulated duration of previous runs 
    169    !                                                 !: that may have been run with different time steps. 
    170    !* calendar variables * 
    171    USE dom_oce , ONLY :   nyear      =>   nyear      !: current year 
    172    USE dom_oce , ONLY :   nmonth     =>   nmonth     !: current month 
    173    USE dom_oce , ONLY :   nday       =>   nday       !: current day of the month 
    174    USE dom_oce , ONLY :   ndastp     =>   ndastp     !: time step date in yyyymmdd format 
    175    USE dom_oce , ONLY :   nday_year  =>   nday_year  !: current day counted from jan 1st of the current year 
    176    USE dom_oce , ONLY :   nsec_year  =>   nsec_year  !: current time step counted in second since 00h jan 1st of the current year 
    177    USE dom_oce , ONLY :   nsec_month =>   nsec_month !: current time step counted in second since 00h 1st day of the current month 
    178    USE dom_oce , ONLY :   nsec_day   =>   nsec_day   !: current time step counted in second since 00h of the current day 
    179    USE dom_oce , ONLY :   fjulday    =>   fjulday    !: julian day 
    180    USE dom_oce , ONLY :   adatrj     =>   adatrj     !: number of elapsed days since the begining of the whole simulation 
    181                                                      !: (cumulative duration of previous runs  
    182                                                      !: that may have used different time-step size) 
    183    USE dom_oce , ONLY :   nyear_len  =>   nyear_len  !: length in days of the previous/current year 
    184    USE dom_oce , ONLY :   nmonth_len =>   nmonth_len !: length in days of the months of the current year 
     58   USE dom_oce  
    18559 
    18660 
     
    21791   USE oce , ONLY :   grv     =>    grv     !:  
    21892#endif 
    219  
    220    USE dom_oce , ONLY :   nn_cla    =>  nn_cla        !: flag (0/1) for cross land advection  
    22193 
    22294   !* surface fluxes * 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/par_trc.F90

    r2528 r3680  
    55   !!====================================================================== 
    66   !! History :    -   !  1996-01  (M. Levy)  original code 
    7    !!              -   !  1999-07  (M. Levy)  for LOBSTER1 or NPZD model 
    87   !!              -   !  2000-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD 
    98   !!             1.0  !  2004-03  (C. Ethe) Free form and module 
     
    1211   USE par_kind          ! kind parameters 
    1312   ! 
    14    USE par_lobster   ! LOBSTER model 
    1513   USE par_pisces    ! PISCES  model 
    1614   USE par_c14b      ! C14 bomb tracer 
     
    2220   ! Passive tracers : Total size 
    2321   ! ---------------               ! total number of passive tracers, of 2d and 3d output and trend arrays 
    24    INTEGER, PUBLIC,  PARAMETER ::   jptra    =  jp_lobster    + jp_pisces     + jp_cfc     + jp_c14b    + jp_my_trc 
    25    INTEGER, PUBLIC,  PARAMETER ::   jpdia2d  =  jp_lobster_2d + jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d + jp_my_trc_2d 
    26    INTEGER, PUBLIC,  PARAMETER ::   jpdia3d  =  jp_lobster_3d + jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d + jp_my_trc_3d 
     22   INTEGER, PUBLIC,  PARAMETER ::   jptra    =  jp_pisces     + jp_cfc     + jp_c14b    + jp_my_trc 
     23   INTEGER, PUBLIC,  PARAMETER ::   jpdia2d  =  jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d + jp_my_trc_2d 
     24   INTEGER, PUBLIC,  PARAMETER ::   jpdia3d  =  jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d + jp_my_trc_3d 
    2725   !                     ! total number of sms diagnostic arrays 
    28    INTEGER, PUBLIC,  PARAMETER ::   jpdiabio = jp_lobster_trd + jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd 
     26   INTEGER, PUBLIC,  PARAMETER ::   jpdiabio = jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd 
    2927    
    3028   !  1D configuration ("key_c1d") 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90

    r3294 r3680  
    1717   USE par_trc          ! TOP parameters 
    1818   USE oce_trc          ! ocean space and time domain variables 
     19   USE prtctl           ! print control for OPA 
    1920 
    2021   IMPLICIT NONE 
     
    296297   END SUBROUTINE prt_ctl_trc_init 
    297298 
    298  
    299    SUBROUTINE sub_dom 
    300       !!---------------------------------------------------------------------- 
    301       !!                  ***  ROUTINE sub_dom  *** 
    302       !!                     
    303       !! ** Purpose :   Lay out the global domain over processors.  
    304       !!                CAUTION:  
    305       !!                This part has been extracted from the mpp_init 
    306       !!                subroutine and names of variables/arrays have been  
    307       !!                slightly changed to avoid confusion but the computation 
    308       !!                is exactly the same. Any modification about indices of 
    309       !!                each sub-domain in the mppini.F90 module should be reported  
    310       !!                here. 
    311       !! 
    312       !! ** Method  :   Global domain is distributed in smaller local domains. 
    313       !!                Periodic condition is a function of the local domain position 
    314       !!                (global boundary or neighbouring domain) and of the global 
    315       !!                periodic 
    316       !!                Type :         jperio global periodic condition 
    317       !!                               nperio local  periodic condition 
    318       !! 
    319       !! ** Action  : - set domain parameters 
    320       !!                    nimpp     : longitudinal index  
    321       !!                    njmpp     : latitudinal  index 
    322       !!                    nperio    : lateral condition type  
    323       !!                    narea     : number for local area 
    324       !!                    nlcil      : first dimension 
    325       !!                    nlcjl      : second dimension 
    326       !!                    nbondil    : mark for "east-west local boundary" 
    327       !!                    nbondjl    : mark for "north-south local boundary" 
    328       !!---------------------------------------------------------------------- 
    329       INTEGER ::   ji, jj, js               ! dummy loop indices 
    330       INTEGER ::   ii, ij                   ! temporary integers 
    331       INTEGER ::   irestil, irestjl         !    "          " 
    332       INTEGER ::   ijpi  , ijpj, nlcil      ! temporary logical unit 
    333       INTEGER ::   nlcjl , nbondil, nbondjl 
    334       INTEGER ::   nrecil, nrecjl, nldil, nleil, nldjl, nlejl 
    335       REAL(wp) ::   zidom, zjdom            ! temporary scalars 
    336       INTEGER, POINTER, DIMENSION(:,:) ::   iimpptl, ijmpptl, ilcitl, ilcjtl   ! temporary workspace 
    337       !!---------------------------------------------------------------------- 
    338       ! 
    339       CALL wrk_alloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl ) 
    340       ! 
    341       ! Dimension arrays for subdomains 
    342       ! ------------------------------- 
    343       !  Computation of local domain sizes ilcitl() ilcjtl() 
    344       !  These dimensions depend on global sizes isplt,jsplt and jpiglo,jpjglo 
    345       !  The subdomains are squares leeser than or equal to the global 
    346       !  dimensions divided by the number of processors minus the overlap 
    347       !  array (cf. par_oce.F90). 
    348  
    349       ijpi = ( jpiglo-2*jpreci + (isplt-1) ) / isplt + 2*jpreci 
    350       ijpj = ( jpjglo-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj 
    351  
    352       nrecil  = 2 * jpreci 
    353       nrecjl  = 2 * jprecj 
    354       irestil = MOD( jpiglo - nrecil , isplt ) 
    355       irestjl = MOD( jpjglo - nrecjl , jsplt ) 
    356  
    357       IF(  irestil == 0 )   irestil = isplt 
    358       DO jj = 1, jsplt 
    359          DO ji = 1, irestil 
    360             ilcitl(ji,jj) = ijpi 
    361          END DO 
    362          DO ji = irestil+1, isplt 
    363             ilcitl(ji,jj) = ijpi -1 
    364          END DO 
    365       END DO 
    366        
    367       IF( irestjl == 0 )   irestjl = jsplt 
    368       DO ji = 1, isplt 
    369          DO jj = 1, irestjl 
    370             ilcjtl(ji,jj) = ijpj 
    371          END DO 
    372          DO jj = irestjl+1, jsplt 
    373             ilcjtl(ji,jj) = ijpj -1 
    374          END DO 
    375       END DO 
    376        
    377       zidom = nrecil 
    378       DO ji = 1, isplt 
    379          zidom = zidom + ilcitl(ji,1) - nrecil 
    380       END DO 
    381        
    382       zjdom = nrecjl 
    383       DO jj = 1, jsplt 
    384          zjdom = zjdom + ilcjtl(1,jj) - nrecjl 
    385       END DO 
    386  
    387       ! Index arrays for subdomains 
    388       ! --------------------------- 
    389  
    390       iimpptl(:,:) = 1 
    391       ijmpptl(:,:) = 1 
    392        
    393       IF( isplt > 1 ) THEN 
    394          DO jj = 1, jsplt 
    395             DO ji = 2, isplt 
    396                iimpptl(ji,jj) = iimpptl(ji-1,jj) + ilcitl(ji-1,jj) - nrecil 
    397             END DO 
    398          END DO 
    399       ENDIF 
    400  
    401       IF( jsplt > 1 ) THEN 
    402          DO jj = 2, jsplt 
    403             DO ji = 1, isplt 
    404                ijmpptl(ji,jj) = ijmpptl(ji,jj-1)+ilcjtl(ji,jj-1)-nrecjl 
    405             END DO 
    406          END DO 
    407       ENDIF 
    408        
    409       ! Subdomain description 
    410       ! --------------------- 
    411  
    412       DO js = 1, ijsplt 
    413          ii = 1 + MOD( js-1, isplt ) 
    414          ij = 1 + (js-1) / isplt 
    415          nimpptl(js) = iimpptl(ii,ij) 
    416          njmpptl(js) = ijmpptl(ii,ij) 
    417          nlcitl (js) = ilcitl (ii,ij)      
    418          nlcil       = nlcitl (js)      
    419          nlcjtl (js) = ilcjtl (ii,ij)      
    420          nlcjl       = nlcjtl (js) 
    421          nbondjl = -1                                    ! general case 
    422          IF( js   >  isplt          )   nbondjl = 0      ! first row of processor 
    423          IF( js   >  (jsplt-1)*isplt )  nbondjl = 1     ! last  row of processor 
    424          IF( jsplt == 1             )   nbondjl = 2      ! one processor only in j-direction 
    425          ibonjtl(js) = nbondjl 
    426           
    427          nbondil = 0                                     !  
    428          IF( MOD( js, isplt ) == 1 )   nbondil = -1      ! 
    429          IF( MOD( js, isplt ) == 0 )   nbondil =  1      ! 
    430          IF( isplt            == 1 )   nbondil =  2      ! one processor only in i-direction 
    431          ibonitl(js) = nbondil 
    432           
    433          nldil =  1   + jpreci 
    434          nleil = nlcil - jpreci 
    435          IF( nbondil == -1 .OR. nbondil == 2 )   nldil = 1 
    436          IF( nbondil ==  1 .OR. nbondil == 2 )   nleil = nlcil 
    437          nldjl =  1   + jprecj 
    438          nlejl = nlcjl - jprecj 
    439          IF( nbondjl == -1 .OR. nbondjl == 2 )   nldjl = 1 
    440          IF( nbondjl ==  1 .OR. nbondjl == 2 )   nlejl = nlcjl 
    441          nlditl(js) = nldil 
    442          nleitl(js) = nleil 
    443          nldjtl(js) = nldjl 
    444          nlejtl(js) = nlejl 
    445       END DO 
    446       ! 
    447       CALL wrk_dealloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl ) 
    448       ! 
    449    END SUBROUTINE sub_dom 
    450   
    451299#else 
    452300   !!---------------------------------------------------------------------- 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trc.F90

    r3625 r3680  
    55   !!====================================================================== 
    66   !! History :   OPA  !  1996-01  (M. Levy)  Original code 
    7    !!              -   !  1999-07  (M. Levy)  for LOBSTER1 or NPZD model 
    87   !!              -   !  2000-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD 
    98   !!   NEMO      1.0  !  2004-03  (C. Ethe)  Free form and module 
     
    2524   INTEGER, PUBLIC                                                 ::   numnat        !: logicla unit for the passive tracer NAMELIST 
    2625   INTEGER, PUBLIC                                                 ::   numstr        !: logical unit for tracer statistics 
     26   INTEGER, PUBLIC                                                 ::   numrtr        !: logical unit for trc restart (read ) 
     27   INTEGER, PUBLIC                                                 ::   numrtw        !: logical unit for trc restart ( write ) 
     28   LOGICAL, PUBLIC                                                 ::   ln_top_euler  !: boolean term for euler integration in the first timestep 
    2729 
    2830   !! passive tracers fields (before,now,after) 
     
    6870   CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ctrcln         !: trccer field long name 
    6971   CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ctrcun         !: tracer unit 
    70    LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_ini     !: Initialisation from data input file 
    7172   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_wri     !: save the tracer or not 
    7273 
     
    7677      CHARACTER(len = 20)  :: units    !: unit 
    7778   END TYPE DIAG 
     79 
     80   !! information for inputs 
     81   !! -------------------------------------------------- 
     82   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_ini     !: Initialisation from data input file 
     83   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_obc     !: Use open boundary condition data 
     84   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_sbc     !: Use surface boundary condition data 
     85   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_cbc     !: Use coastal boundary condition data 
    7886 
    7987   !! additional 2D/3D outputs namelist 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r3294 r3680  
    2121   USE trcnam          ! Namelist read 
    2222   USE trcini_cfc      ! CFC      initialisation 
    23    USE trcini_lobster  ! LOBSTER  initialisation 
    2423   USE trcini_pisces   ! PISCES   initialisation 
    2524   USE trcini_c14b     ! C14 bomb initialisation 
     
    7069      CALL top_alloc()              ! allocate TOP arrays 
    7170 
    72       IF( ln_dm2dc .AND. ( lk_pisces .OR. lk_lobster ) )    & 
    73          &  CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES or LOBSTER  ' ) 
     71      IF( ln_dm2dc .AND. lk_pisces )    & 
     72         &  CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES ' ) 
    7473 
    7574      IF( nn_cla == 1 )   & 
     
    101100      areatot = glob_sum( cvol(:,:,:) ) 
    102101 
    103       IF( lk_lobster )       CALL trc_ini_lobster      ! LOBSTER bio-model 
    104102      IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model 
    105103      IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r3319 r3680  
    2121   USE trc               ! passive tracers common variables 
    2222   USE trcnam_trp        ! Transport namelist 
    23    USE trcnam_lobster    ! LOBSTER namelist 
    2423   USE trcnam_pisces     ! PISCES namelist 
    2524   USE trcnam_cfc        ! CFC SMS namelist 
     
    5352      !! ** Method  : - read passive tracer namelist  
    5453      !!              - read namelist of each defined SMS model 
    55       !!                ( (LOBSTER, PISCES, CFC, MY_TRC ) 
     54      !!                ( (PISCES, CFC, MY_TRC ) 
    5655      !!--------------------------------------------------------------------- 
    5756      INTEGER ::  jn, ierr 
     
    6059      !! 
    6160      NAMELIST/namtrc/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, & 
    62          &             cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, ln_trcdmp 
     61         &             cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, ln_trcdmp, & 
     62         &             ln_top_euler 
    6363#if defined key_trdmld_trc  || defined key_trdtrc 
    6464      NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & 
     
    7979      nn_dttrc      = 1                 ! default values 
    8080      nn_writetrc   = 10  
     81      ln_top_euler  = .FALSE. 
    8182      ln_rsttr      = .FALSE. 
    8283      nn_rsttr      =  0 
     
    120121         WRITE(numout,*) '   Read inputs data from file (y/n)             ln_trcdta     = ', ln_trcdta 
    121122         WRITE(numout,*) '   Damping of passive tracer (y/n)              ln_trcdmp     = ', ln_trcdmp 
     123         WRITE(numout,*) '   Use euler integration for TRC (y/n)          ln_top_euler  = ', ln_top_euler 
    122124         WRITE(numout,*) ' ' 
    123125         DO jn = 1, jptra 
     
    234236      ! namelist of SMS 
    235237      ! ---------------       
    236       IF( lk_lobster ) THEN   ;   CALL trc_nam_lobster      ! LOBSTER bio-model 
    237       ELSE                    ;   IF(lwp) WRITE(numout,*) '          LOBSTER not used' 
    238       ENDIF 
    239  
    240238      IF( lk_pisces  ) THEN   ;   CALL trc_nam_pisces      ! PISCES  bio-model 
    241239      ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES not used' 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r3294 r3680  
    2727   USE trcnam_trp 
    2828   USE iom 
    29    USE trcrst_cfc      ! CFC       
    30    USE trcrst_lobster  ! LOBSTER  restart 
    31    USE trcrst_pisces   ! PISCES   restart 
    32    USE trcrst_c14b     ! C14 bomb restart 
    33    USE trcrst_my_trc   ! MY_TRC   restart 
    3429   USE daymod 
    3530   IMPLICIT NONE 
     
    4035   PUBLIC   trc_rst_wri       ! called by ??? 
    4136   PUBLIC   trc_rst_cal 
    42  
    43    INTEGER, PUBLIC ::   numrtr, numrtw   !: logical unit for trc restart (read and write) 
    4437 
    4538   !! * Substitutions 
     
    115108         CALL iom_get( numrtr, jpdom_autoglo, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) ) 
    116109      END DO 
    117  
    118       IF( lk_lobster )   CALL trc_rst_read_lobster( numrtr )      ! LOBSTER bio-model 
    119       IF( lk_pisces  )   CALL trc_rst_read_pisces ( numrtr )      ! PISCES  bio-model 
    120       IF( lk_cfc     )   CALL trc_rst_read_cfc    ( numrtr )      ! CFC     tracers 
    121       IF( lk_c14b    )   CALL trc_rst_read_c14b   ( numrtr )      ! C14 bomb  tracer 
    122       IF( lk_my_trc  )   CALL trc_rst_read_my_trc ( numrtr )      ! MY_TRC  tracers 
    123  
    124       CALL iom_close( numrtr ) 
    125110      ! 
    126111   END SUBROUTINE trc_rst_read 
     
    138123      !!---------------------------------------------------------------------- 
    139124      ! 
    140       CALL trc_rst_cal( kt, 'WRITE' )   ! calendar 
    141125      CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc(1) )   ! surface passive tracer time step 
    142126      ! prognostic variables  
     
    149133         CALL iom_rstput( kt, nitrst, numrtw, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) ) 
    150134      END DO 
    151  
    152       IF( lk_lobster )   CALL trc_rst_wri_lobster( kt, nitrst, numrtw )      ! LOBSTER bio-model 
    153       IF( lk_pisces  )   CALL trc_rst_wri_pisces ( kt, nitrst, numrtw )      ! PISCES  bio-model 
    154       IF( lk_cfc     )   CALL trc_rst_wri_cfc    ( kt, nitrst, numrtw )      ! CFC     tracers 
    155       IF( lk_c14b    )   CALL trc_rst_wri_c14b   ( kt, nitrst, numrtw )      ! C14 bomb  tracer 
    156       IF( lk_my_trc  )   CALL trc_rst_wri_my_trc ( kt, nitrst, numrtw )      ! MY_TRC  tracers 
    157  
     135      ! 
    158136      IF( kt == nitrst ) THEN 
    159137          CALL trc_rst_stat            ! statistics 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcsms.F90

    r3294 r3680  
    1515   USE oce_trc            ! 
    1616   USE trc                ! 
    17    USE trcsms_lobster     ! LOBSTER bio-model 
    1817   USE trcsms_pisces      ! PISCES biogeo-model 
    1918   USE trcsms_cfc         ! CFC 11 & 12 
     
    4948      IF( nn_timing == 1 )   CALL timing_start('trc_sms') 
    5049      ! 
    51       IF( lk_lobster )   CALL trc_sms_lobster( kt )    ! main program of LOBSTER 
    5250      IF( lk_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES  
    5351      IF( lk_cfc     )   CALL trc_sms_cfc    ( kt )    ! surface fluxes of CFC 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r3319 r3680  
    7878         ! 
    7979                                   CALL trc_rst_opn  ( kt )       ! Open tracer restart file  
     80         IF( lrst_trc )            CALL trc_rst_cal  ( kt, 'WRITE' )   ! calendar 
    8081         IF( lk_iomput ) THEN  ;   CALL trc_wri      ( kt )       ! output of passive tracers with iom I/O manager 
    8182         ELSE                  ;   CALL trc_dia      ( kt )       ! output of passive tracers with old I/O manager 
     
    8384                                   CALL trc_sms      ( kt )       ! tracers: sinks and sources 
    8485                                   CALL trc_trp      ( kt )       ! transport of passive tracers 
     86         IF( kt == nittrc000 )     CALL iom_close( numrtr )       ! close input tracer restart file 
    8587         IF( lrst_trc )            CALL trc_rst_wri  ( kt )       ! write tracer restart file 
    8688         IF( lk_trdmld_trc  )      CALL trd_mld_trc  ( kt )       ! trends: Mixed-layer 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcsub.F90

    r3625 r3680  
    2929   USE sbc_oce         ! surface boundary condition: ocean 
    3030   USE bdy_oce 
     31#if defined key_obc 
     32   USE obc_oce, ONLY: obctmsk 
     33#endif 
    3134#if defined key_agrif 
    3235   USE agrif_opa_update 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcwri.F90

    r3295 r3680  
    1818   USE dianam      ! Output file name 
    1919   USE trcwri_pisces 
     20   USE trcwri_cfc 
     21   USE trcwri_c14b 
     22   USE trcwri_my_trc 
    2023 
    2124   IMPLICIT NONE 
     
    6972      ! write the tracer concentrations in the file 
    7073      ! --------------------------------------- 
    71       IF( lk_pisces )  THEN 
    72          CALL trc_wri_pisces 
    73       ELSE 
    74          DO jn = 1, jptra 
    75             cltra = TRIM( ctrcnm(jn) )                  ! short title for tracer 
    76             CALL iom_put( cltra, trn(:,:,:,jn) ) 
    77          END DO 
    78       ENDIF 
     74      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES  
     75      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC 
     76      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14 
     77      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers 
    7978      ! 
    8079   END SUBROUTINE trc_wri_trc 
Note: See TracChangeset for help on using the changeset viewer.