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 12065 for NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP – NEMO

Ignore:
Timestamp:
2019-12-05T12:06:36+01:00 (5 years ago)
Author:
smueller
Message:

Synchronizing with /NEMO/trunk@12055 (ticket #2194)

Location:
NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/AGE/trcnam_age.F90

    r10069 r12065  
    5656      REWIND( numnat_ref )              ! Namelist namagedate in reference namelist : AGE parameters 
    5757      READ  ( numnat_ref, namage, IOSTAT = ios, ERR = 901) 
    58 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namage in reference namelist', lwp ) 
     58901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namage in reference namelist' ) 
    5959      REWIND( numnat_cfg )              ! Namelist namagedate in configuration namelist : AGE parameters 
    6060      READ  ( numnat_cfg, namage, IOSTAT = ios, ERR = 902 ) 
    61 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namage in configuration namelist', lwp ) 
     61902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namage in configuration namelist' ) 
    6262      IF(lwm) WRITE ( numont, namage ) 
    6363      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/C14/trcnam_c14.F90

    r10069 r12065  
    6363      REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    6464      READ  ( numtrc_ref, namc14_typ, IOSTAT = ios, ERR = 901) 
    65 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_typ in reference namelist', lwp ) 
     65901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_typ in reference namelist' ) 
    6666      REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    6767      READ  ( numtrc_cfg, namc14_typ, IOSTAT = ios, ERR = 902) 
    68 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_typ in configuration namelist', lwp ) 
     68902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_typ in configuration namelist' ) 
    6969      IF(lwm) WRITE ( numonr, namc14_typ ) 
    7070      ! 
     
    8080      REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    8181      READ  ( numtrc_ref, namc14_sbc, IOSTAT = ios, ERR = 903) 
    82 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_sbc in reference namelist', lwp ) 
     82903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_sbc in reference namelist' ) 
    8383      REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    8484      READ  ( numtrc_cfg, namc14_sbc, IOSTAT = ios, ERR = 904) 
    85 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_sbc in configuration namelist', lwp ) 
     85904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_sbc in configuration namelist' ) 
    8686      IF(lwm) WRITE( numonr, namc14_sbc ) 
    8787      ! 
     
    9696      REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist : 
    9797      READ  ( numtrc_ref, namc14_fcg, IOSTAT = ios, ERR = 905) 
    98 905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_fcg in reference namelist', lwp ) 
     98905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc14_fcg in reference namelist' ) 
    9999      REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist  
    100100      READ  ( numtrc_cfg, namc14_fcg, IOSTAT = ios, ERR = 906) 
    101 906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_fcg in configuration namelist', lwp ) 
     101906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc14_fcg in configuration namelist' ) 
    102102      IF(lwm) WRITE ( numonr, namc14_fcg ) 
    103103      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/CFC/trcnam_cfc.F90

    r10068 r12065  
    5353      REWIND( numtrc_ref )              ! Namelist namcfcdate in reference namelist : CFC parameters 
    5454      READ  ( numtrc_ref, namcfc, IOSTAT = ios, ERR = 901) 
    55 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfc in reference namelist', lwp ) 
     55901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfc in reference namelist' ) 
    5656      REWIND( numtrc_cfg )              ! Namelist namcfcdate in configuration namelist : CFC parameters 
    5757      READ  ( numtrc_cfg, namcfc, IOSTAT = ios, ERR = 902 ) 
    58 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfc in configuration namelist', lwp ) 
     58902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfc in configuration namelist' ) 
    5959      IF(lwm) WRITE( numonr, namcfc ) 
    6060      IF(lwm) CALL FLUSH ( numonr )     ! flush output namelist CFC 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P2Z/p2zbio.F90

    r10425 r12065  
    404404      REWIND( numnatp_ref )              ! Namelist namlobphy in reference namelist : Lobster biological parameters 
    405405      READ  ( numnatp_ref, namlobphy, IOSTAT = ios, ERR = 901) 
    406 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobphy in reference namelist', lwp ) 
     406901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobphy in reference namelist' ) 
    407407      REWIND( numnatp_cfg )              ! Namelist namlobphy in configuration namelist : Lobster biological parameters 
    408408      READ  ( numnatp_cfg, namlobphy, IOSTAT = ios, ERR = 902 ) 
    409 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobphy in configuration namelist', lwp ) 
     409902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobphy in configuration namelist' ) 
    410410      IF(lwm) WRITE ( numonp, namlobphy ) 
    411411      ! 
     
    421421      REWIND( numnatp_ref )              ! Namelist namlobnut in reference namelist : Lobster nutriments parameters 
    422422      READ  ( numnatp_ref, namlobnut, IOSTAT = ios, ERR = 903) 
    423 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobnut in reference namelist', lwp ) 
     423903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobnut in reference namelist' ) 
    424424      REWIND( numnatp_cfg )              ! Namelist namlobnut in configuration namelist : Lobster nutriments parameters 
    425425      READ  ( numnatp_cfg, namlobnut, IOSTAT = ios, ERR = 904 ) 
    426 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobnut in configuration namelist', lwp ) 
     426904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobnut in configuration namelist' ) 
    427427      IF(lwm) WRITE ( numonp, namlobnut ) 
    428428 
     
    438438      REWIND( numnatp_ref )              ! Namelist namlobzoo in reference namelist : Lobster zooplankton parameters 
    439439      READ  ( numnatp_ref, namlobzoo, IOSTAT = ios, ERR = 905) 
    440 905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobzoo in reference namelist', lwp ) 
     440905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobzoo in reference namelist' ) 
    441441      REWIND( numnatp_cfg )              ! Namelist namlobzoo in configuration namelist : Lobster zooplankton parameters 
    442442      READ  ( numnatp_cfg, namlobzoo, IOSTAT = ios, ERR = 906 ) 
    443 906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobzoo in configuration namelist', lwp ) 
     443906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobzoo in configuration namelist' ) 
    444444      IF(lwm) WRITE ( numonp, namlobzoo ) 
    445445 
     
    460460      REWIND( numnatp_ref )              ! Namelist namlobdet in reference namelist : Lobster detritus parameters 
    461461      READ  ( numnatp_ref, namlobdet, IOSTAT = ios, ERR = 907) 
    462 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdet in reference namelist', lwp ) 
     462907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdet in reference namelist' ) 
    463463      REWIND( numnatp_cfg )              ! Namelist namlobdet in configuration namelist : Lobster detritus parameters 
    464464      READ  ( numnatp_cfg, namlobdet, IOSTAT = ios, ERR = 908 ) 
    465 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdet in configuration namelist', lwp ) 
     465908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdet in configuration namelist' ) 
    466466      IF(lwm) WRITE ( numonp, namlobdet ) 
    467467 
     
    475475      REWIND( numnatp_ref )              ! Namelist namlobdom in reference namelist : Lobster DOM breakdown rate 
    476476      READ  ( numnatp_ref, namlobdom, IOSTAT = ios, ERR = 909) 
    477 909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdom in reference namelist', lwp ) 
     477909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlobdom in reference namelist' ) 
    478478      REWIND( numnatp_cfg )              ! Namelist namlobdom in configuration namelist : Lobster DOM breakdown rate 
    479479      READ  ( numnatp_cfg, namlobdom, IOSTAT = ios, ERR = 910 ) 
    480 910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdom in configuration namelist', lwp ) 
     480910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobdom in configuration namelist' ) 
    481481      IF(lwm) WRITE ( numonp, namlobdom ) 
    482482 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P2Z/p2zopt.F90

    r10068 r12065  
    161161      REWIND( numnatp_ref )              ! Namelist namlobopt in reference namelist : Lobster options 
    162162      READ  ( numnatp_ref, namlobopt, IOSTAT = ios, ERR = 901) 
    163 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in reference namelist', lwp ) 
     163901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in reference namelist' ) 
    164164 
    165165      REWIND( numnatp_cfg )              ! Namelist namlobopt in configuration namelist : Lobster options 
    166166      READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 ) 
    167 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp ) 
     167902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist' ) 
    168168      IF(lwm) WRITE ( numonp, namlobopt ) 
    169169 
     
    183183      REWIND( numnatp_ref )              ! Namelist namlobrat in reference namelist : Lobster ratios 
    184184      READ  ( numnatp_ref, namlobrat, IOSTAT = ios, ERR = 903) 
    185 903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in reference namelist', lwp ) 
     185903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in reference namelist' ) 
    186186 
    187187      REWIND( numnatp_cfg )              ! Namelist namlobrat in configuration namelist : Lobster ratios 
    188188      READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 ) 
    189 904   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp ) 
     189904   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist' ) 
    190190      IF(lwm) WRITE ( numonp, namlobrat ) 
    191191 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P2Z/p2zsed.F90

    r10068 r12065  
    134134      REWIND( numnatp_ref )              ! Namelist namlobsed in reference namelist : Lobster sediments 
    135135      READ  ( numnatp_ref, namlobsed, IOSTAT = ios, ERR = 901) 
    136 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlosed in reference namelist', lwp ) 
     136901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlosed in reference namelist' ) 
    137137      REWIND( numnatp_cfg )              ! Namelist namlobsed in configuration namelist : Lobster sediments 
    138138      READ  ( numnatp_cfg, namlobsed, IOSTAT = ios, ERR = 902 ) 
    139 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobsed in configuration namelist', lwp ) 
     139902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlobsed in configuration namelist' ) 
    140140      IF(lwm) WRITE ( numonp, namlobsed ) 
    141141      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zfechem.F90

    r10416 r12065  
    256256      REWIND( numnatp_ref )            ! Namelist nampisfer in reference namelist : Pisces iron chemistry 
    257257      READ  ( numnatp_ref, nampisfer, IOSTAT = ios, ERR = 901) 
    258 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisfer in reference namelist', lwp ) 
     258901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisfer in reference namelist' ) 
    259259      REWIND( numnatp_cfg )            ! Namelist nampisfer in configuration namelist : Pisces iron chemistry 
    260260      READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 ) 
    261 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp ) 
     261902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisfer in configuration namelist' ) 
    262262      IF(lwm) WRITE( numonp, nampisfer ) 
    263263 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zflx.F90

    r10425 r12065  
    241241      REWIND( numnatp_ref )              ! Namelist nampisext in reference namelist : Pisces atm. conditions 
    242242      READ  ( numnatp_ref, nampisext, IOSTAT = ios, ERR = 901) 
    243 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisext in reference namelist', lwp ) 
     243901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisext in reference namelist' ) 
    244244      REWIND( numnatp_cfg )              ! Namelist nampisext in configuration namelist : Pisces atm. conditions 
    245245      READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 ) 
    246 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp ) 
     246902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisext in configuration namelist' ) 
    247247      IF(lwm) WRITE ( numonp, nampisext ) 
    248248      ! 
     
    322322         REWIND( numnatp_ref )              ! Namelist nampisatm in reference namelist : Pisces atm. sea level pressure file 
    323323         READ  ( numnatp_ref, nampisatm, IOSTAT = ios, ERR = 901) 
    324 901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in reference namelist', lwp ) 
     324901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in reference namelist' ) 
    325325         REWIND( numnatp_cfg )              ! Namelist nampisatm in configuration namelist : Pisces atm. sea level pressure file  
    326326         READ  ( numnatp_cfg, nampisatm, IOSTAT = ios, ERR = 902 ) 
    327 902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisatm in configuration namelist', lwp ) 
     327902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisatm in configuration namelist' ) 
    328328         IF(lwm) WRITE ( numonp, nampisatm ) 
    329329         ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zligand.F90

    r10416 r12065  
    127127      REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization 
    128128      READ  ( numnatp_ref, nampislig, IOSTAT = ios, ERR = 901) 
    129 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampislig in reference namelist', lwp ) 
     129901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampislig in reference namelist' ) 
    130130      REWIND( numnatp_cfg )              ! Namelist nampislig in configuration namelist : Pisces remineralization 
    131131      READ  ( numnatp_cfg, nampislig, IOSTAT = ios, ERR = 902 ) 
    132 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampislig in configuration namelist', lwp ) 
     132902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampislig in configuration namelist' ) 
    133133      IF(lwm) WRITE ( numonp, nampislig ) 
    134134      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zlim.F90

    r10425 r12065  
    254254      REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    255255      READ  ( numnatp_ref, namp4zlim, IOSTAT = ios, ERR = 901) 
    256 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zlim in reference namelist', lwp ) 
     256901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zlim in reference namelist' ) 
    257257      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    258258      READ  ( numnatp_cfg, namp4zlim, IOSTAT = ios, ERR = 902 ) 
    259 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zlim in configuration namelist', lwp ) 
     259902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zlim in configuration namelist' ) 
    260260      IF(lwm) WRITE( numonp, namp4zlim ) 
    261261      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zlys.F90

    r10069 r12065  
    164164      REWIND( numnatp_ref )              ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution 
    165165      READ  ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901) 
    166 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampiscal in reference namelist', lwp ) 
     166901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampiscal in reference namelist' ) 
    167167      REWIND( numnatp_cfg )              ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution 
    168168      READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 ) 
    169 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp ) 
     169902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampiscal in configuration namelist' ) 
    170170      IF(lwm) WRITE( numonp, nampiscal ) 
    171171      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zmeso.F90

    r10367 r12065  
    292292      REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    293293      READ  ( numnatp_ref, namp4zmes, IOSTAT = ios, ERR = 901) 
    294 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmes in reference namelist', lwp ) 
     294901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmes in reference namelist' ) 
    295295      REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    296296      READ  ( numnatp_cfg, namp4zmes, IOSTAT = ios, ERR = 902 ) 
    297 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmes in configuration namelist', lwp ) 
     297902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmes in configuration namelist' ) 
    298298      IF(lwm) WRITE( numonp, namp4zmes ) 
    299299      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zmicro.F90

    r10374 r12065  
    245245      REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    246246      READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901) 
    247 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zzoo in reference namelist', lwp ) 
     247901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zzoo in reference namelist' ) 
    248248      REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    249249      READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 ) 
    250 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp ) 
     250902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist' ) 
    251251      IF(lwm) WRITE( numonp, namp4zzoo ) 
    252252      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zmort.F90

    r10227 r12065  
    229229      REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    230230      READ  ( numnatp_ref, namp4zmort, IOSTAT = ios, ERR = 901) 
    231 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmort in reference namelist', lwp ) 
     231901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zmort in reference namelist' ) 
    232232      REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    233233      READ  ( numnatp_cfg, namp4zmort, IOSTAT = ios, ERR = 902 ) 
    234 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmort in configuration namelist', lwp ) 
     234902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zmort in configuration namelist' ) 
    235235      IF(lwm) WRITE( numonp, namp4zmort ) 
    236236      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zopt.F90

    r10522 r12065  
    402402      REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR 
    403403      READ  ( numnatp_ref, nampisopt, IOSTAT = ios, ERR = 901) 
    404 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisopt in reference namelist', lwp ) 
     404901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisopt in reference namelist' ) 
    405405      REWIND( numnatp_cfg )              ! Namelist nampisopt in configuration namelist : Pisces attenuation coef. and PAR 
    406406      READ  ( numnatp_cfg, nampisopt, IOSTAT = ios, ERR = 902 ) 
    407 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisopt in configuration namelist', lwp ) 
     407902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisopt in configuration namelist' ) 
    408408      IF(lwm) WRITE ( numonp, nampisopt ) 
    409409 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zpoc.F90

    r10362 r12065  
    102102     ! particle scheme. Does not work with Kriest parameterization. 
    103103     ! ----------------------------------------------------------------------- 
     104     ztremint(:,:,:) = zremigoc(:,:,:) 
    104105     DO jk = 2, jpkm1 
    105106        DO jj = 1, jpj 
     
    166167                       &   + zsizek1 ) ) * zpoc + ( prodgoc(ji,jj,jk-1) / tgfunc(ji,jj,jk-1) * ( 1.           & 
    167168                       &   - exp( -reminp(jn) * zsizek1 ) ) * exp( -reminp(jn) * zsizek ) + prodgoc(ji,jj,jk) & 
    168                        &   / tgfunc(ji,jj,jk) * ( 1. - exp( -reminp(jn) * zsizek ) ) ) * rday / rfact2 / reminp(jn)  
     169                       &   / tgfunc(ji,jj,jk) * ( 1. - exp( -reminp(jn) * zsizek ) ) ) * rday / rfact2 / reminp(jn) * alphan(jn)  
    169170                       alphat = alphat + alphag(ji,jj,jk,jn) 
    170171                       remint = remint + alphag(ji,jj,jk,jn) * reminp(jn) 
     
    285286     ! layer, this spectrum is supposed to be uniform. 
    286287     ! --------------------------------------------------------------------- 
     288     ztremint(:,:,:) = zremipoc(:,:,:) 
    287289     DO jk = 1, jpkm1 
    288290        DO jj = 1, jpj 
     
    497499      REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    498500      READ  ( numnatp_ref, nampispoc, IOSTAT = ios, ERR = 901) 
    499 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampispoc in reference namelist', lwp ) 
     501901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampispoc in reference namelist' ) 
    500502      REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    501503      READ  ( numnatp_cfg, nampispoc, IOSTAT = ios, ERR = 902 ) 
    502 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampispoc in configuration namelist', lwp ) 
     504902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampispoc in configuration namelist' ) 
    503505      IF(lwm) WRITE( numonp, nampispoc ) 
    504506 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zprod.F90

    r10425 r12065  
    225225         DO jj = 1, jpj 
    226226            DO ji = 1, jpi 
    227                zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
    228                zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
    229227               zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
    230228               zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
     
    322320     ! 
    323321     IF( ln_ligand ) THEN 
     322         zpligprod1(:,:,:) = 0._wp    ;    zpligprod2(:,:,:) = 0._wp 
    324323         DO jk = 1, jpkm1 
    325324            DO jj = 1, jpj 
     
    493492      REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    494493      READ  ( numnatp_ref, namp4zprod, IOSTAT = ios, ERR = 901) 
    495 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zprod in reference namelist', lwp ) 
     494901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namp4zprod in reference namelist' ) 
    496495      REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    497496      READ  ( numnatp_cfg, namp4zprod, IOSTAT = ios, ERR = 902 ) 
    498 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zprod in configuration namelist', lwp ) 
     497902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namp4zprod in configuration namelist' ) 
    499498      IF(lwm) WRITE( numonp, namp4zprod ) 
    500499 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zrem.F90

    r10425 r12065  
    329329      REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
    330330      READ  ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901) 
    331 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist', lwp ) 
     331901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist' ) 
    332332      REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    333333      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 
    334 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp ) 
     334902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist' ) 
    335335      IF(lwm) WRITE( numonp, nampisrem ) 
    336336 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zsbc.F90

    r10522 r12065  
    2727   LOGICAL , PUBLIC ::   ln_ironsed   !: boolean for Fe input from sediments 
    2828   LOGICAL , PUBLIC ::   ln_hydrofe   !: boolean for Fe input from hydrothermal vents 
    29    LOGICAL , PUBLIC ::   ln_ironice   !: boolean for Fe input from sea ice 
    3029   REAL(wp), PUBLIC ::   sedfeinput   !: Coastal release of Iron 
    3130   REAL(wp), PUBLIC ::   dustsolub    !: Solubility of the dust 
     
    109108         IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_dust > 1 ) ) THEN 
    110109            CALL fld_read( kt, 1, sf_dust ) 
    111             IF( nn_ice_tr == -1 .AND. .NOT.ln_ironice ) THEN   ;   dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) 
    112             ELSE                                               ;   dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) * ( 1.-fr_i(:,:) ) ) 
    113             ENDIF 
     110            dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) * ( 1.0 - fr_i(:,:) ) 
    114111         ENDIF 
    115112      ENDIF 
     
    175172      IF( ln_ndepo ) THEN 
    176173         IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_ndep > 1 ) ) THEN 
    177              zcoef = rno3 * 14E6 * ryyss 
     174             zcoef = 14. * rno3 
    178175             CALL fld_read( kt, 1, sf_ndepo ) 
    179176             nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t_n(:,:,1) ) 
    180177         ENDIF 
    181178         IF( .NOT.ln_linssh ) THEN 
    182            zcoef = rno3 * 14E6 * ryyss 
    183            nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t_n(:,:,1) ) 
     179            zcoef = 14. * rno3 
     180            nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t_n(:,:,1) ) 
    184181         ENDIF 
    185182      ENDIF 
     
    235232      REWIND( numnatp_ref )              ! Namelist nampissbc in reference namelist : Pisces external sources of nutrients 
    236233      READ  ( numnatp_ref, nampissbc, IOSTAT = ios, ERR = 901) 
    237 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampissbc in reference namelist', lwp ) 
     234901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampissbc in reference namelist' ) 
    238235      REWIND( numnatp_cfg )              ! Namelist nampissbc in configuration namelist : Pisces external sources of nutrients 
    239236      READ  ( numnatp_cfg, nampissbc, IOSTAT = ios, ERR = 902 ) 
    240 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampissbc in configuration namelist', lwp ) 
     237902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampissbc in configuration namelist' ) 
    241238      IF(lwm) WRITE ( numonp, nampissbc ) 
    242239 
     
    265262      END IF 
    266263 
    267       IF( nn_ice_tr >= 0 .AND. ln_ironice ) THEN 
    268          IF(lwp) THEN 
    269             WRITE(numout,*) '   ==>>>   ln_ironice incompatible with nn_ice_tr = ', nn_ice_tr 
    270             WRITE(numout,*) '           Specify your sea ice iron concentration in nampisice instead ' 
    271             WRITE(numout,*) '           ln_ironice is forced to .FALSE. ' 
    272          ENDIF 
    273          ln_ironice = .FALSE. 
    274       ENDIF 
    275  
    276264      IF( ln_dust .OR. ln_river .OR. ln_ndepo ) THEN   ;   ll_sbc = .TRUE. 
    277265      ELSE                                             ;   ll_sbc = .FALSE. 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zsed.F90

    r10425 r12065  
    5353      INTEGER  ::  ji, jj, jk, ikt 
    5454      REAL(wp) ::  zrivalk, zrivsil, zrivno3 
    55       REAL(wp) ::  zwflux, zfminus, zfplus 
    56       REAL(wp) ::  zlim, zfact, zfactcal 
     55      REAL(wp) ::  zwflux, zlim, zfact, zfactcal 
    5756      REAL(wp) ::  zo2, zno3, zflx, zpdenit, z1pdenit, zolimit 
    5857      REAL(wp) ::  zsiloss, zcaloss, zws3, zws4, zwsc, zdep 
     
    104103               zdep    = rfact2 / e3t_n(ji,jj,1) 
    105104               zwflux  = fmmflx(ji,jj) / 1000._wp 
    106                zfminus = MIN( 0._wp, -zwflux ) * trb(ji,jj,1,jpfer) * zdep 
    107                zfplus  = MAX( 0._wp, -zwflux ) * icefeinput * zdep 
    108                zironice(ji,jj) =  zfplus + zfminus 
     105               zironice(ji,jj) =  MAX( -0.99 * trb(ji,jj,1,jpfer), -zwflux * icefeinput * zdep ) 
    109106            END DO 
    110107         END DO 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p4zsms.F90

    r10425 r12065  
    203203      REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables 
    204204      READ  ( numnatp_ref, nampisbio, IOSTAT = ios, ERR = 901) 
    205 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisbio in reference namelist', lwp ) 
     205901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisbio in reference namelist' ) 
    206206      REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    207207      READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 ) 
    208 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp ) 
     208902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisbio in configuration namelist' ) 
    209209      IF(lwm) WRITE( numonp, nampisbio ) 
    210210      ! 
     
    234234      REWIND( numnatp_ref )              ! Namelist nampisdmp in reference namelist : Pisces damping 
    235235      READ  ( numnatp_ref, nampisdmp, IOSTAT = ios, ERR = 905) 
    236 905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisdmp in reference namelist', lwp ) 
     236905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisdmp in reference namelist' ) 
    237237      REWIND( numnatp_cfg )              ! Namelist nampisdmp in configuration namelist : Pisces damping 
    238238      READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 ) 
    239 906   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp ) 
     239906   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisdmp in configuration namelist' ) 
    240240      IF(lwm) WRITE( numonp, nampisdmp ) 
    241241      ! 
     
    249249      REWIND( numnatp_ref )              ! Namelist nampismass in reference namelist : Pisces mass conservation check 
    250250      READ  ( numnatp_ref, nampismass, IOSTAT = ios, ERR = 907) 
    251 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismass in reference namelist', lwp ) 
     251907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismass in reference namelist' ) 
    252252      REWIND( numnatp_cfg )              ! Namelist nampismass in configuration namelist : Pisces mass conservation check  
    253253      READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 ) 
    254 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp ) 
     254908   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismass in configuration namelist' ) 
    255255      IF(lwm) WRITE( numonp, nampismass ) 
    256256 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p5zlim.F90

    r10425 r12065  
    450450      REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    451451      READ  ( numnatp_ref, namp5zlim, IOSTAT = ios, ERR = 901) 
    452 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist', lwp ) 
     452901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist' ) 
    453453      ! 
    454454      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    455455      READ  ( numnatp_cfg, namp5zlim, IOSTAT = ios, ERR = 902 ) 
    456 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp ) 
     456902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist' ) 
    457457      IF(lwm) WRITE ( numonp, namp5zlim ) 
    458458      ! 
     
    491491      REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    492492      READ  ( numnatp_ref, namp5zquota, IOSTAT = ios, ERR = 903) 
    493 903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist', lwp ) 
     493903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist' ) 
    494494      ! 
    495495      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    496496      READ  ( numnatp_cfg, namp5zquota, IOSTAT = ios, ERR = 904 ) 
    497 904   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist', lwp ) 
     497904   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist' ) 
    498498      IF(lwm) WRITE ( numonp, namp5zquota ) 
    499499      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p5zmeso.F90

    r10362 r12065  
    409409      REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    410410      READ  ( numnatp_ref, namp5zmes, IOSTAT = ios, ERR = 901) 
    411 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist', lwp ) 
     411901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist' ) 
    412412      ! 
    413413      REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    414414      READ  ( numnatp_cfg, namp5zmes, IOSTAT = ios, ERR = 902 ) 
    415 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp ) 
     415902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist' ) 
    416416      IF(lwm) WRITE ( numonp, namp5zmes ) 
    417417      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p5zmicro.F90

    r10362 r12065  
    351351      REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    352352      READ  ( numnatp_ref, namp5zzoo, IOSTAT = ios, ERR = 901) 
    353 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist', lwp ) 
     353901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist' ) 
    354354      ! 
    355355      REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    356356      READ  ( numnatp_cfg, namp5zzoo, IOSTAT = ios, ERR = 902 ) 
    357 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist', lwp ) 
     357902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist' ) 
    358358      IF(lwm) WRITE ( numonp, namp5zzoo ) 
    359359      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p5zmort.F90

    r10362 r12065  
    288288      REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    289289      READ  ( numnatp_ref, namp5zmort, IOSTAT = ios, ERR = 901) 
    290 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in reference namelist', lwp ) 
     290901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in reference namelist' ) 
    291291 
    292292      REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    293293      READ  ( numnatp_cfg, namp5zmort, IOSTAT = ios, ERR = 902 ) 
    294 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist', lwp ) 
     294902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist' ) 
    295295      IF(lwm) WRITE ( numonp, namp5zmort ) 
    296296 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/P4Z/p5zprod.F90

    r10425 r12065  
    444444     ! 
    445445     IF( ln_ligand ) THEN 
     446         zpligprod1(:,:,:) = 0._wp    ;    zpligprod2(:,:,:) = 0._wp 
    446447         DO jk = 1, jpkm1 
    447448            DO jj = 1, jpj 
     
    583584      REWIND( numnatp_ref )              ! Namelist nampisprod in reference namelist : Pisces phytoplankton production 
    584585      READ  ( numnatp_ref, namp5zprod, IOSTAT = ios, ERR = 901) 
    585 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in reference namelist', lwp ) 
     586901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in reference namelist' ) 
    586587 
    587588      REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    588589      READ  ( numnatp_cfg, namp5zprod, IOSTAT = ios, ERR = 902 ) 
    589 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist', lwp ) 
     590902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist' ) 
    590591      IF(lwm) WRITE ( numonp, namp5zprod ) 
    591592 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/SED/sedini.F90

    r10362 r12065  
    460460      REWIND( numnamsed_ref )              ! Namelist nam_run in reference namelist : Pisces variables 
    461461      READ  ( numnamsed_ref, nam_run, IOSTAT = ios, ERR = 901) 
    462 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in reference namelist', lwp ) 
     462901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in reference namelist' ) 
    463463 
    464464      REWIND( numnamsed_cfg )              ! Namelist nam_run in reference namelist : Pisces variables 
    465465      READ  ( numnamsed_cfg, nam_run, IOSTAT = ios, ERR = 902) 
    466 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in configuration namelist', lwp ) 
     466902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_run in configuration namelist' ) 
    467467 
    468468      IF (lwp) THEN 
     
    476476      REWIND( numnamsed_ref )              ! Namelist nam_geom in reference namelist : Pisces variables 
    477477      READ  ( numnamsed_ref, nam_geom, IOSTAT = ios, ERR = 903) 
    478 903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in reference namelist', lwp ) 
     478903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in reference namelist' ) 
    479479 
    480480      REWIND( numnamsed_cfg )              ! Namelist nam_geom in reference namelist : Pisces variables 
    481481      READ  ( numnamsed_cfg, nam_geom, IOSTAT = ios, ERR = 904) 
    482 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in configuration namelist', lwp ) 
     482904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_geom in configuration namelist' ) 
    483483 
    484484      IF (lwp) THEN  
     
    499499      REWIND( numnamsed_ref )              ! Namelist nam_trased in reference namelist : Pisces variables 
    500500      READ  ( numnamsed_ref, nam_trased, IOSTAT = ios, ERR = 905) 
    501 905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in reference namelist', lwp ) 
     501905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in reference namelist' ) 
    502502 
    503503      REWIND( numnamsed_cfg )              ! Namelist nam_trased in reference namelist : Pisces variables 
    504504      READ  ( numnamsed_cfg, nam_trased, IOSTAT = ios, ERR = 906) 
    505 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in configuration namelist', lwp ) 
     505906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_trased in configuration namelist' ) 
    506506 
    507507      DO jn = 1, jpsol 
     
    532532      REWIND( numnamsed_ref )              ! Namelist nam_diased in reference namelist : Pisces variables 
    533533      READ  ( numnamsed_ref, nam_diased, IOSTAT = ios, ERR = 907) 
    534 907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in reference namelist', lwp ) 
     534907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in reference namelist' ) 
    535535 
    536536      REWIND( numnamsed_cfg )              ! Namelist nam_diased in reference namelist : Pisces variables 
    537537      READ  ( numnamsed_cfg, nam_diased, IOSTAT = ios, ERR = 908) 
    538 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in configuration namelist', lwp ) 
     538908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diased in configuration namelist' ) 
    539539       
    540540      DO jn = 1, jpdia3dsed 
     
    574574      REWIND( numnamsed_ref )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    575575      READ  ( numnamsed_ref, nam_inorg, IOSTAT = ios, ERR = 909) 
    576 909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in reference namelist', lwp ) 
     576909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in reference namelist' ) 
    577577 
    578578      REWIND( numnamsed_cfg )              ! Namelist nam_inorg in reference namelist : Pisces variables 
    579579      READ  ( numnamsed_cfg, nam_inorg, IOSTAT = ios, ERR = 910) 
    580 910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in configuration namelist', lwp ) 
     580910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_inorg in configuration namelist' ) 
    581581 
    582582      IF (lwp) THEN 
     
    600600      REWIND( numnamsed_ref )              ! Namelist nam_poc in reference namelist : Pisces variables 
    601601      READ  ( numnamsed_ref, nam_poc, IOSTAT = ios, ERR = 911) 
    602 911   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in reference namelist', lwp ) 
     602911   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in reference namelist' ) 
    603603 
    604604      REWIND( numnamsed_cfg )              ! Namelist nam_poc in reference namelist : Pisces variables 
    605605      READ  ( numnamsed_cfg, nam_poc, IOSTAT = ios, ERR = 912) 
    606 912   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in configuration namelist', lwp ) 
     606912   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_poc in configuration namelist' ) 
    607607 
    608608      IF (lwp) THEN 
     
    652652      REWIND( numnamsed_ref )              ! Namelist nam_btb in reference namelist : Pisces variables 
    653653      READ  ( numnamsed_ref, nam_btb, IOSTAT = ios, ERR = 913) 
    654 913   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in reference namelist', lwp ) 
     654913   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in reference namelist' ) 
    655655 
    656656      REWIND( numnamsed_cfg )              ! Namelist nam_btb in reference namelist : Pisces variables 
    657657      READ  ( numnamsed_cfg, nam_btb, IOSTAT = ios, ERR = 914) 
    658 914   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in configuration namelist', lwp ) 
     658914   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_btb in configuration namelist' ) 
    659659 
    660660      IF (lwp) THEN 
     
    673673      REWIND( numnamsed_ref )              ! Namelist nam_rst in reference namelist : Pisces variables 
    674674      READ  ( numnamsed_ref, nam_rst, IOSTAT = ios, ERR = 915) 
    675 915   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in reference namelist', lwp ) 
     675915   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in reference namelist' ) 
    676676 
    677677      REWIND( numnamsed_cfg )              ! Namelist nam_rst in reference namelist : Pisces variables 
    678678      READ  ( numnamsed_cfg, nam_rst, IOSTAT = ios, ERR = 916) 
    679 916   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in configuration namelist', lwp ) 
     679916   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_rst in configuration namelist' ) 
    680680 
    681681      IF (lwp) THEN 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/SED/sedrst.F90

    r10425 r12065  
    4949            IF( ln_rst_list ) THEN 
    5050               nrst_lst = 1 
    51                nitrst = nstocklist( nrst_lst ) 
     51               nitrst = nn_stocklist( nrst_lst ) 
    5252            ELSE 
    5353               nitrst = nitend 
    5454            ENDIF 
    5555         ENDIF 
    56          IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 
     56         IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 
    5757            ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 
    58             nitrst = kt + nstock - 1                  ! define the next value of nitrst for restart writing 
     58            nitrst = kt + nn_stock - 1                  ! define the next value of nitrst for restart writing 
    5959            IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run 
    6060         ENDIF 
     
    6262         IF( kt == nittrc000 ) lrst_sed = .FALSE. 
    6363      ENDIF 
     64 
     65      IF( .NOT. ln_rst_list .AND. nn_stock == -1 )   RETURN   ! we will never do any restart 
    6466 
    6567      ! to get better performances with NetCDF format: 
    6668      ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 
    6769      ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 
    68       IF( kt == nitrst - 2*nn_dtsed .OR. nstock == nn_dtsed .OR. ( kt == nitend - nn_dtsed .AND. .NOT. lrst_sed ) ) THEN 
     70      IF( kt == nitrst - 2*nn_dtsed .OR. nn_stock == nn_dtsed .OR. ( kt == nitend - nn_dtsed .AND. .NOT. lrst_sed ) ) THEN 
    6971         ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    7072         IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
     
    300302          IF( l_offline .AND. ln_rst_list ) THEN 
    301303             nrst_lst = nrst_lst + 1 
    302              nitrst = nstocklist( nrst_lst ) 
     304             nitrst = nn_stocklist( nrst_lst ) 
    303305          ENDIF 
    304306      ENDIF 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/sms_pisces.F90

    r10425 r12065  
    6767   !!* Mass conservation 
    6868   LOGICAL  ::  ln_check_mass      !: Flag to check mass conservation 
     69   LOGICAL , PUBLIC ::   ln_ironice   !: boolean for Fe input from sea ice 
    6970 
    7071   !!*  Biological fluxes for light : variables shared by pisces & lobster 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/trcice_pisces.F90

    r10213 r12065  
    119119      zpisc(jpno3,1) =  5.79e-6_wp / rno3  
    120120      zpisc(jpnh4,1) =  3.22e-7_wp / rno3 
     121      zpisc(jplgw,1) =  1.0e-9_wp 
    121122 
    122123      ! ln_p5z 
     
    162163      zpisc(jpno3,2) =  3.51e-06_wp / rno3  
    163164      zpisc(jpnh4,2) =  6.15e-08_wp / rno3  
     165      zpisc(jplgw,2) =  1.0e-9_wp 
    164166 
    165167      ! ln_p5z 
     
    205207      zpisc(jpno3,3) =  2.64e-5_wp / rno3   
    206208      zpisc(jpnh4,3) =  3.39e-7_wp / rno3   
     209      zpisc(jplgw,3) =  1.0e-9_wp 
    207210 
    208211      ! ln_p5z 
     
    249252      zpisc(jpno3,4) = 5.36e-5_wp / rno3 
    250253      zpisc(jpnh4,4) = 7.18e-7_wp / rno3 
     254      zpisc(jplgw,4) = 1.0e-9_wp 
    251255 
    252256      ! ln_p5z 
     
    266270      zpisc(jpgon,4) =  1.05e-8_wp 
    267271      zpisc(jpgop,4) =  1.05e-8_wp 
    268   
     272! 
     273!     ln_ironice and tracers in seaice are redundant. Thus, if tracers in ice 
     274!     is activated, ln_ironice should be set to false 
     275!     ------------------------------------------------------------------------ 
     276      IF( nn_ice_tr /= 0 .AND. ln_ironice ) THEN 
     277         IF(lwp) THEN 
     278            WRITE(numout,*) '   ==>>>   ln_ironice incompatible with nn_ice_tr = ', nn_ice_tr 
     279            WRITE(numout,*) '           Specify your sea ice iron concentration in nampisice instead ' 
     280            WRITE(numout,*) '           ln_ironice is forced to .FALSE. ' 
     281         ENDIF 
     282         ln_ironice = .FALSE. 
     283      ENDIF 
     284!  
    269285      DO jn = jp_pcs0, jp_pcs1 
    270286         IF( cn_trc_o(jn) == 'GL ' ) trc_o(:,:,jn) = zpisc(jn,1)  ! Global case 
     
    310326            trc_i(:,:,jn) = trc_ice_prescr(jn) 
    311327         ENDIF 
    312         
    313328         !-- Baltic 
    314329         IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN      
     
    318333                     trc_i(:,:,jn) = zratio(jn,2) * trc_o(:,:,jn)  
    319334               END WHERE 
    320             ELSE                                 ! prescribed tracer concentration in ice 
    321                WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND.    & 
    322                    54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) 
    323                      trc_i(:,:,jn) = trc_ice_prescr(jn) 
    324                END WHERE 
    325             ENDIF ! trc_ice_ratio 
     335            ENDIF 
    326336         ENDIF 
    327337      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/trcini_pisces.F90

    r10425 r12065  
    275275 
    276276      ! Initialization of the sediment model 
    277       IF( ln_sediment) THEN 
    278          CALL sed_init 
    279       ELSE 
    280          ALLOCATE( profsed(2) ) 
    281       ENDIF 
     277      IF( ln_sediment)   CALL sed_init 
    282278 
    283279      IF(lwp) WRITE(numout,*)  
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/PISCES/trcnam_pisces.F90

    r10222 r12065  
    5757      REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables 
    5858      READ  ( numnatp_ref, nampismod, IOSTAT = ios, ERR = 901) 
    59 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismod in reference namelist', lwp ) 
     59901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismod in reference namelist' ) 
    6060      REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    6161      READ  ( numnatp_cfg, nampismod, IOSTAT = ios, ERR = 902 ) 
    62 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismod in configuration namelist', lwp ) 
     62902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismod in configuration namelist' ) 
    6363      IF(lwm) WRITE( numonp, nampismod ) 
    6464      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/README.rst

    r10549 r12065  
    33*************** 
    44 
     5.. todo:: 
     6 
     7 
     8 
    59.. contents:: 
    6    :local: 
    7  
    8 TOP (Tracers in the Ocean Paradigm) is the NEMO hardwired interface toward biogeochemical models and 
    9 provide the physical constraints/boundaries for oceanic tracers. 
    10 It consists of a modular framework to handle multiple ocean tracers, including also a variety of built-in modules. 
     10   :local: 
     11 
     12TOP (Tracers in the Ocean Paradigm) is the NEMO hardwired interface toward 
     13biogeochemical models and provide the physical constraints/boundaries for oceanic tracers. 
     14It consists of a modular framework to handle multiple ocean tracers, 
     15including also a variety of built-in modules. 
    1116 
    1217This component of the NEMO framework allows one to exploit available modules (see below) and 
    1318further develop a range of applications, spanning from the implementation of a dye passive tracer to 
    1419evaluate dispersion processes (by means of MY_TRC), track water masses age (AGE module), 
    15 assess the ocean interior penetration of persistent chemical compounds (e.g., gases like CFC or even PCBs), 
    16 up to the full set of equations involving marine biogeochemical cycles. 
     20assess the ocean interior penetration of persistent chemical compounds 
     21(e.g., gases like CFC or even PCBs), up to the full set of equations involving 
     22marine biogeochemical cycles. 
    1723 
    1824Structure 
    1925========= 
    2026 
    21 TOP interface has the following location in the source code ``./src/MBG/`` and 
     27TOP interface has the following location in the source code :file:`./src/TOP` and 
    2228the following modules are available: 
    2329 
    24 ``TRP`` 
    25    Interface to NEMO physical core for computing tracers transport 
    26  
    27 ``CFC`` 
    28    Inert carbon tracers (CFC11,CFC12,SF6) 
    29  
    30 ``C14`` 
    31    Radiocarbon passive tracer 
    32  
    33 ``AGE`` 
    34    Water age tracking 
    35  
    36 ``MY_TRC`` 
    37    Template for creation of new modules and external BGC models coupling 
    38  
    39 ``PISCES`` 
    40    Built in BGC model. 
    41    See [https://www.geosci-model-dev.net/8/2465/2015/gmd-8-2465-2015-discussion.html Aumont et al. (2015)] for 
    42    a throughout description. | 
    43  
    44 The usage of TOP is activated i) by including in the configuration definition  the component ``MBG`` and 
    45 ii) by adding the macro ``key_top`` in the configuration CPP file 
    46 (see for more details [http://forge.ipsl.jussieu.fr/nemo/wiki/Users "Learn more about the model"]). 
     30:file:`TRP` 
     31   Interface to NEMO physical core for computing tracers transport 
     32 
     33:file:`CFC` 
     34   Inert carbon tracers (CFC11,CFC12,SF6) 
     35 
     36:file:`C14` 
     37   Radiocarbon passive tracer 
     38 
     39:file:`AGE` 
     40   Water age tracking 
     41 
     42:file:`MY_TRC` 
     43   Template for creation of new modules and external BGC models coupling 
     44 
     45:file:`PISCES` 
     46   Built in BGC model. See :cite:`gmd-8-2465-2015` for a throughout description. 
     47 
     48The usage of TOP is activated 
     49*i)* by including in the configuration definition the component ``TOP`` and 
     50*ii)* by adding the macro ``key_top`` in the configuration CPP file 
     51(see for more details :forge:`"Learn more about the model" <wiki/Users>`). 
    4752 
    4853As an example, the user can refer to already available configurations in the code, 
     
    5156(see also Section 4) . 
    5257 
    53 Note that, since version 4.0, TOP interface core functionalities are activated by means of logical keys and 
     58Note that, since version 4.0, 
     59TOP interface core functionalities are activated by means of logical keys and 
    5460all submodules preprocessing macros from previous versions were removed. 
    5561 
     
    5763 
    5864``key_iomput`` 
    59    use XIOS I/O 
     65   use XIOS I/O 
    6066 
    6167``key_agrif`` 
    62    enable AGRIF coupling 
     68   enable AGRIF coupling 
    6369 
    6470``key_trdtrc`` & ``key_trdmxl_trc`` 
    65    trend computation for tracers 
     71   trend computation for tracers 
    6672 
    6773Synthetic Workflow 
    6874================== 
    6975 
    70 A synthetic description of the TOP interface workflow is given below to summarize the steps involved in 
    71 the computation of biogeochemical and physical trends and their time integration and outputs, 
     76A synthetic description of the TOP interface workflow is given below to 
     77summarize the steps involved in the computation of biogeochemical and physical trends and 
     78their time integration and outputs, 
    7279by reporting also the principal Fortran subroutine herein involved. 
    7380 
    74 **Model initialization (OPA_SRC/nemogcm.F90)** 
    75  
    76 call to trc_init (trcini.F90) 
    77  
    78   ↳ call trc_nam (trcnam.F90) to initialize TOP tracers and run setting 
    79  
    80   ↳ call trc_ini_sms, to initialize each submodule 
    81  
    82   ↳ call trc_ini_trp, to initialize transport for tracers 
    83  
    84   ↳ call trc_ice_ini, to initialize tracers in seaice 
    85  
    86   ↳ call trc_ini_state, read passive tracers from a restart or input data 
    87  
    88   ↳ call trc_sub_ini, setup substepping if {{{nn_dttrc /= 1}}} 
    89  
    90 **Time marching procedure (OPA_SRC/stp.F90)** 
    91  
    92 call to trc_stp.F90 (trcstp.F90) 
    93  
    94   ↳ call trc_sub_stp, averaging physical variables for sub-stepping 
    95  
    96   ↳ call trc_wri, call XIOS for output of data 
    97  
    98   ↳ call trc_sms, compute BGC trends for each submodule 
    99  
    100     ↳ call trc_sms_my_trc, includes also surface and coastal BCs trends 
    101  
    102   ↳ call trc_trp (TRP/trctrp.F90), compute physical trends 
    103  
    104     ↳ call trc_sbc, get trend due to surface concentration/dilution 
    105  
    106     ↳ call trc_adv, compute tracers advection 
    107  
    108     ↳ call to trc_ldf, compute tracers lateral diffusion 
    109  
    110     ↳ call to trc_zdf, vertical mixing and after tracer fields 
    111  
    112     ↳ call to trc_nxt, tracer fields at next time step. Lateral Boundary Conditions are solved in here. 
    113  
    114     ↳ call to trc_rad, Correct artificial negative concentrations 
    115  
    116   ↳ call trc_rst_wri, output tracers restart files 
     81Model initialization (:file:`./src/OCE/nemogcm.F90`) 
     82---------------------------------------------------- 
     83 
     84Call to ``trc_init`` subroutine (:file:`./src/TOP/trcini.F90`) to initialize TOP. 
     85 
     86.. literalinclude:: ../../../src/TOP/trcini.F90 
     87   :language:        fortran 
     88   :lines:           41-86 
     89   :emphasize-lines: 21,30-32,38-40 
     90   :caption:         ``trc_init`` subroutine 
     91 
     92Time marching procedure (:file:`./src/OCE/step.F90`) 
     93---------------------------------------------------- 
     94 
     95Call to ``trc_stp`` subroutine (:file:`./src/TOP/trcstp.F90`) to compute/update passive tracers. 
     96 
     97.. literalinclude:: ../../../src/TOP/trcstp.F90 
     98   :language:        fortran 
     99   :lines:           46-125 
     100   :emphasize-lines: 42,55-57 
     101   :caption:         ``trc_stp`` subroutine 
     102 
     103BGC trends computation for each submodule (:file:`./src/TOP/trcsms.F90`) 
     104------------------------------------------------------------------------ 
     105 
     106.. literalinclude:: ../../../src/TOP/trcsms.F90 
     107   :language:        fortran 
     108   :lines:           21 
     109   :caption:         :file:`trcsms` snippet 
     110 
     111Physical trends computation (:file:`./src/TOP/TRP/trctrp.F90`) 
     112-------------------------------------------------------------- 
     113 
     114.. literalinclude:: ../../../src/TOP/TRP/trctrp.F90 
     115   :language:        fortran 
     116   :lines:           46-95 
     117   :emphasize-lines: 17,21,29,33-35 
     118   :caption:         ``trc_trp`` subroutine 
    117119 
    118120Namelists walkthrough 
    119121===================== 
    120122 
    121 namelist_top 
    122 ------------ 
    123  
    124 Here below are listed the features/options of the TOP interface accessible through the namelist_top_ref and 
    125 modifiable by means of namelist_top_cfg (as for NEMO physical ones). 
    126  
    127 Note that ## is used to refer to a number in an array field. 
     123:file:`namelist_top` 
     124-------------------- 
     125 
     126Here below are listed the features/options of the TOP interface accessible through 
     127the :file:`namelist_top_ref` and modifiable by means of :file:`namelist_top_cfg` 
     128(as for NEMO physical ones). 
     129 
     130Note that ``##`` is used to refer to a number in an array field. 
    128131 
    129132.. literalinclude:: ../../namelists/namtrc_run 
     133   :language: fortran 
    130134 
    131135.. literalinclude:: ../../namelists/namtrc 
     136   :language: fortran 
    132137 
    133138.. literalinclude:: ../../namelists/namtrc_dta 
     139   :language: fortran 
    134140 
    135141.. literalinclude:: ../../namelists/namtrc_adv 
     142   :language: fortran 
    136143 
    137144.. literalinclude:: ../../namelists/namtrc_ldf 
     145   :language: fortran 
    138146 
    139147.. literalinclude:: ../../namelists/namtrc_rad 
     148   :language: fortran 
    140149 
    141150.. literalinclude:: ../../namelists/namtrc_snk 
     151   :language: fortran 
    142152 
    143153.. literalinclude:: ../../namelists/namtrc_dmp 
     154   :language: fortran 
    144155 
    145156.. literalinclude:: ../../namelists/namtrc_ice 
     157   :language: fortran 
    146158 
    147159.. literalinclude:: ../../namelists/namtrc_trd 
     160   :language: fortran 
    148161 
    149162.. literalinclude:: ../../namelists/namtrc_bc 
     163   :language: fortran 
    150164 
    151165.. literalinclude:: ../../namelists/namtrc_bdy 
     166   :language: fortran 
    152167 
    153168.. literalinclude:: ../../namelists/namage 
    154  
    155 Two main types of data structure are used within TOP interface to initialize tracer properties (1) and 
     169   :language: fortran 
     170 
     171Two main types of data structure are used within TOP interface 
     172to initialize tracer properties (1) and 
    156173to provide related initial and boundary conditions (2). 
    157174 
    158 **1. TOP tracers initialization**: sn_tracer (namtrc) 
     1751. TOP tracers initialization: ``sn_tracer`` (``&namtrc``) 
     176^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    159177 
    160178Beside providing name and metadata for tracers, 
    161 here are also defined the use of initial ({{{sn_tracer%llinit}}}) and 
    162 boundary ({{{sn_tracer%llsbc, sn_tracer%llcbc, sn_tracer%llobc}}}) conditions. 
    163  
    164 In the following, an example of the full structure definition is given for two idealized tracers both with 
    165 initial conditions given, while the first has only surface boundary forcing and 
     179here are also defined the use of initial (``sn_tracer%llinit``) and 
     180boundary (``sn_tracer%llsbc, sn_tracer%llcbc, sn_tracer%llobc``) conditions. 
     181 
     182In the following, an example of the full structure definition is given for 
     183two idealized tracers both with initial conditions given, 
     184while the first has only surface boundary forcing and 
    166185the second both surface and coastal forcings: 
    167186 
    168187.. code-block:: fortran 
    169188 
    170    !             !    name   !           title of the field            !   units    ! initial data ! sbc   !   cbc  !   obc  ! 
    171    sn_tracer(1)  = 'TRC1'    , 'Tracer 1 Concentration                ',   ' - '    ,  .true.      , .true., .false., .true. 
    172    sn_tracer(2)  = 'TRC2 '   , 'Tracer 2 Concentration                ',   ' - '    ,  .true.      , .true., .true. , .false. 
     189   !             !    name   !           title of the field            !   units    ! initial data ! sbc   !   cbc  !   obc  ! 
     190   sn_tracer(1)  = 'TRC1'    , 'Tracer 1 Concentration                ',   ' - '    ,  .true.      , .true., .false., .true. 
     191   sn_tracer(2)  = 'TRC2 '   , 'Tracer 2 Concentration                ',   ' - '    ,  .true.      , .true., .true. , .false. 
    173192 
    174193As tracers in BGC models are increasingly growing, 
     
    177196.. code-block:: fortran 
    178197 
    179    !             !    name   !           title of the field            !   units    ! initial data ! 
    180    sn_tracer(1)  = 'TRC1'    , 'Tracer 1 Concentration                ',   ' - '    ,   .true. 
    181    sn_tracer(2)  = 'TRC2 '   , 'Tracer 2 Concentration                ',   ' - '    ,   .true. 
    182    ! sbc 
    183    sn_tracer(1)%llsbc = .true. 
    184    sn_tracer(2)%llsbc = .true. 
    185    ! cbc 
    186    sn_tracer(2)%llcbc = .true. 
     198   !             !    name   !           title of the field            !   units    ! initial data ! 
     199   sn_tracer(1)  = 'TRC1'    , 'Tracer 1 Concentration                ',   ' - '    ,   .true. 
     200   sn_tracer(2)  = 'TRC2 '   , 'Tracer 2 Concentration                ',   ' - '    ,   .true. 
     201   ! sbc 
     202   sn_tracer(1)%llsbc = .true. 
     203   sn_tracer(2)%llsbc = .true. 
     204   ! cbc 
     205   sn_tracer(2)%llcbc = .true. 
    187206 
    188207The data structure is internally initialized by code with dummy names and 
    189 all initialization/forcing logical fields set to .false. . 
    190  
    191 **2. Structures to read input initial and boundary conditions**: namtrc_dta (sn_trcdta), namtrc_bc (sn_trcsbc/sn_trccbc/sn_trcobc) 
     208all initialization/forcing logical fields set to ``.false.`` . 
     209 
     2102. Structures to read input initial and boundary conditions: ``&namtrc_dta`` (``sn_trcdta``), ``&namtrc_bc`` (``sn_trcsbc`` / ``sn_trccbc`` / ``sn_trcobc``) 
     211^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    192212 
    193213The overall data structure (Fortran type) is based on the general one defined for NEMO core in the SBC component 
    194 (see details in User Manual SBC Chapter on Input Data specification). 
    195  
    196 Input fields are prescribed within namtrc_dta (with sn_trcdta structure), 
    197 while Boundary Conditions are applied to the model by means of namtrc_bc, 
    198 with dedicated structure fields for surface (sn_trcsbc), riverine (sn_trccbc), and 
    199 lateral open (sn_trcobc) boundaries. 
     214(see details in ``SBC`` Chapter of :doc:`Reference Manual <cite>` on Input Data specification). 
     215 
     216Input fields are prescribed within ``&namtrc_dta`` (with ``sn_trcdta`` structure), 
     217while Boundary Conditions are applied to the model by means of ``&namtrc_bc``, 
     218with dedicated structure fields for surface (``sn_trcsbc``), riverine (``sn_trccbc``), and 
     219lateral open (``sn_trcobc``) boundaries. 
    200220 
    201221The following example illustrates the data structure in the case of initial condition for 
    202 a single tracer contained in the file named tracer_1_data.nc (.nc is implicitly assumed in namelist filename), 
    203 with a doubled initial value, and located in the usr/work/model/inputdata/ folder: 
     222a single tracer contained in the file named :file:`tracer_1_data.nc` 
     223(``.nc`` is implicitly assumed in namelist filename), 
     224with a doubled initial value, and located in the :file:`usr/work/model/inputdata` folder: 
    204225 
    205226.. code-block:: fortran 
    206227 
    207    !               !  file name             ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    208    !               !                        !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    209      sn_trcdta(1)  = 'tracer_1_data'        ,        -12        ,  'TRC1'   ,    .false.   , .true. , 'yearly'  , ''       , ''       , '' 
    210      rf_trfac(1) = 2.0 
    211      cn_dir = “usr/work/model/inputdata/” 
    212  
    213 Note that, the Lateral Open Boundaries conditions are applied on the segments defined for the physical core of NEMO 
    214 (see BDY description in the User Manual). 
    215  
    216 namelist_trc 
    217 ------------ 
    218  
    219 Here below the description of namelist_trc_ref used to handle Carbon tracers modules, namely CFC and C14. 
    220  
    221 |||| &'''namcfc'''     !   CFC || 
    222  
    223 |||| &'''namc14_typ'''     !  C14 - type of C14 tracer, default values of C14/C and pco2 || 
    224  
    225 |||| &'''namc14_sbc'''     !  C14 - surface BC || 
    226  
    227 |||| &'''namc14_fcg'''     !  files & dates || 
     228   !               !  file name             ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     229   !               !                        !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     230     sn_trcdta(1)  = 'tracer_1_data'        ,        -12        ,  'TRC1'   ,    .false.   , .true. , 'yearly'  , ''       , ''       , '' 
     231     rf_trfac(1) = 2.0 
     232     cn_dir = 'usr/work/model/inputdata/' 
     233 
     234Note that, the Lateral Open Boundaries conditions are applied on 
     235the segments defined for the physical core of NEMO 
     236(see ``BDY`` description in the :doc:`Reference Manual <cite>`). 
     237 
     238:file:`namelist_trc` 
     239-------------------- 
     240 
     241Here below the description of :file:`namelist_trc_ref` used to handle Carbon tracers modules, 
     242namely CFC and C14. 
     243 
     244.. literalinclude:: ../../../cfgs/SHARED/namelist_trc_ref 
     245   :language: fortran 
     246   :lines: 7,17,26,34 
     247   :caption: :file:`namelist_trc_ref` snippet 
    228248 
    229249``MY_TRC`` interface for coupling external BGC models 
    230250===================================================== 
    231251 
    232 The generalized interface is pivoted on MY_TRC module that contains template files to build the coupling between 
     252The generalized interface is pivoted on MY_TRC module that contains template files to 
     253build the coupling between 
    233254NEMO and any external BGC model. 
    234255 
    235 The call to MY_TRC is activated by setting ``ln_my_trc = .true.`` (in namtrc) 
     256The call to MY_TRC is activated by setting ``ln_my_trc = .true.`` (in ``&namtrc``) 
    236257 
    237258The following 6 fortran files are available in MY_TRC with the specific purposes here described. 
    238259 
    239 ``par_my_trc.F90`` 
    240    This module allows to define additional arrays and public variables to be used within the MY_TRC interface 
    241  
    242 ``trcini_my_trc.F90`` 
    243    Here are initialized user defined namelists and the call to the external BGC model initialization procedures to 
    244    populate general tracer array (trn and trb). Here are also likely to be defined suport arrays related to 
    245    system metrics that could be needed by the BGC model. 
    246  
    247 ``trcnam_my_trc.F90`` 
    248    This routine is called at the beginning of trcini_my_trc and should contain the initialization of 
    249    additional namelists for the BGC model or user-defined code. 
    250  
    251 ``trcsms_my_trc.F90`` 
    252    The routine performs the call to Boundary Conditions and its main purpose is to 
    253    contain the Source-Minus-Sinks terms due to the biogeochemical processes of the external model. 
    254    Be aware that lateral boundary conditions are applied in trcnxt routine. 
    255    IMPORTANT: the routines to compute the light penetration along the water column and 
    256    the tracer vertical sinking should be defined/called in here, as generalized modules are still missing in 
    257    the code. 
    258  
    259 ``trcice_my_trc.F90`` 
    260    Here it is possible to prescribe the tracers concentrations in the seaice that will be used as 
    261    boundary conditions when ice melting occurs (nn_ice_tr =1 in namtrc_ice). 
    262    See e.g. the correspondent PISCES subroutine. 
    263  
    264 ``trcwri_my_trc.F90`` 
    265    This routine performs the output of the model tracers (only those defined in namtrc) using IOM module 
    266    (see Manual Chapter “Output and Diagnostics”). 
    267    It is possible to place here the output of additional variables produced by the model, 
    268    if not done elsewhere in the code, using the call to iom_put. 
     260:file:`par_my_trc.F90` 
     261   This module allows to define additional arrays and public variables to 
     262   be used within the MY_TRC interface 
     263 
     264:file:`trcini_my_trc.F90` 
     265   Here are initialized user defined namelists and 
     266   the call to the external BGC model initialization procedures to populate general tracer array 
     267   (``trn`` and ``trb``). 
     268   Here are also likely to be defined support arrays related to system metrics that 
     269   could be needed by the BGC model. 
     270 
     271:file:`trcnam_my_trc.F90` 
     272   This routine is called at the beginning of ``trcini_my_trc`` and 
     273   should contain the initialization of additional namelists for the BGC model or user-defined code. 
     274 
     275:file:`trcsms_my_trc.F90` 
     276   The routine performs the call to Boundary Conditions and its main purpose is to 
     277   contain the Source-Minus-Sinks terms due to the biogeochemical processes of the external model. 
     278   Be aware that lateral boundary conditions are applied in trcnxt routine. 
     279 
     280   .. warning:: 
     281      The routines to compute the light penetration along the water column and 
     282      the tracer vertical sinking should be defined/called in here, 
     283      as generalized modules are still missing in the code. 
     284 
     285:file:`trcice_my_trc.F90` 
     286   Here it is possible to prescribe the tracers concentrations in the sea-ice that 
     287   will be used as boundary conditions when ice melting occurs (``nn_ice_tr = 1`` in ``&namtrc_ice``). 
     288   See e.g. the correspondent PISCES subroutine. 
     289 
     290:file:`trcwri_my_trc.F90` 
     291   This routine performs the output of the model tracers (only those defined in ``&namtrc``) using 
     292   IOM module (see chapter “Output and Diagnostics” in the :doc:`Reference Manual <cite>`). 
     293   It is possible to place here the output of additional variables produced by the model, 
     294   if not done elsewhere in the code, using the call to ``iom_put``. 
    269295 
    270296Coupling an external BGC model using NEMO framework 
     
    273299The coupling with an external BGC model through the NEMO compilation framework can be achieved in 
    274300different ways according to the degree of coding complexity of the Biogeochemical model, like e.g., 
    275 the whole code is made only by one file or it has multiple modules and interfaces spread across several subfolders. 
    276  
    277 Beside the 6 core files of MY_TRC module, let’s assume an external BGC model named *MYBGC* and constituted by 
    278 a rather essential coding structure, likely few Fortran files. 
     301the whole code is made only by one file or 
     302it has multiple modules and interfaces spread across several subfolders. 
     303 
     304Beside the 6 core files of MY_TRC module, let’s assume an external BGC model named *MYBGC* and 
     305constituted by a rather essential coding structure, likely few Fortran files. 
    279306The new coupled configuration name is *NEMO_MYBGC*. 
    280307 
    281 The best solution is to have all files (the modified ``MY_TRC`` routines and the BGC model ones) placed in 
    282 a unique folder with root ``MYBGCPATH`` and to use the makenemo external readdressing of ``MY_SRC`` folder. 
    283  
    284 The coupled configuration listed in ``work_cfgs.txt`` will look like 
     308The best solution is to have all files (the modified ``MY_TRC`` routines and the BGC model ones) 
     309placed in a unique folder with root ``MYBGCPATH`` and 
     310to use the makenemo external readdressing of ``MY_SRC`` folder. 
     311 
     312The coupled configuration listed in :file:`work_cfgs.txt` will look like 
    285313 
    286314:: 
    287315 
    288    NEMO_MYBGC OPA_SRC TOP_SRC 
     316   NEMO_MYBGC OCE TOP 
    289317 
    290318and the related ``cpp_MYBGC.fcm`` content will be 
     
    292320.. code-block:: perl 
    293321 
    294    bld::tool::fppkeys key_iomput key_mpp_mpi key_top 
    295  
    296 the compilation with ``makenemo`` will be executed through the following syntax 
     322   bld::tool::fppkeys key_iomput key_mpp_mpi key_top 
     323 
     324the compilation with :file:`makenemo` will be executed through the following syntax 
    297325 
    298326.. code-block:: console 
    299327 
    300    $ makenemo -n 'NEMO_MYBGC' -m '<arch_my_machine>' -j 8 -e '<MYBGCPATH>' 
    301  
    302 The makenemo feature “-e” was introduced to readdress at compilation time the standard MY_SRC folder 
    303 (usually found in NEMO configurations) with a user defined external one. 
    304  
    305 The compilation of more articulated BGC model code & infrastructure, like in the case of BFM 
    306 ([http://www.bfm-community.eu/publications/bfmnemomanual_r1.0_201508.pdf BFM-NEMO coupling manual]), 
    307 requires some additional features. 
     328   $ makenemo -n 'NEMO_MYBGC' -m '<arch_my_machine>' -j 8 -e '<MYBGCPATH>' 
     329 
     330The makenemo feature ``-e`` was introduced to 
     331readdress at compilation time the standard MY_SRC folder (usually found in NEMO configurations) with 
     332a user defined external one. 
     333 
     334The compilation of more articulated BGC model code & infrastructure, 
     335like in the case of BFM (|BFM man|_), requires some additional features. 
    308336 
    309337As before, let’s assume a coupled configuration name *NEMO_MYBGC*, 
    310 but in this case MYBGC model root becomes ``<MYBGCPATH>`` that contains 4 different subfolders for 
    311 biogeochemistry, named ``initialization``, ``pelagic``, and ``benthic``, and 
    312 a separate one named ``nemo_coupling`` including the modified ``MY_SRC`` routines. 
     338but in this case MYBGC model root becomes :file:`MYBGC` path that 
     339contains 4 different subfolders for biogeochemistry, 
     340named :file:`initialization`, :file:`pelagic`, and :file:`benthic`, 
     341and a separate one named :file:`nemo_coupling` including the modified `MY_SRC` routines. 
    313342The latter folder containing the modified NEMO coupling interface will be still linked using 
    314 the makenemo “-e” option. 
     343the makenemo ``-e`` option. 
    315344 
    316345In order to include the BGC model subfolders in the compilation of NEMO code, 
    317 it will be necessary to extend the configuration ``cpp_NEMO_MYBGC.fcm`` file to include the specific paths of 
    318 ``MYBGC`` folders, as in the following example 
     346it will be necessary to extend the configuration :file:`cpp_NEMO_MYBGC.fcm` file to include the specific paths of :file:`MYBGC` folders, as in the following example 
    319347 
    320348.. code-block:: perl 
    321349 
    322    bld::tool::fppkeys  key_iomput key_mpp_mpi key_top 
    323     
    324    src::MYBGC::initialization         <MYBGCPATH>/initialization 
    325    src::MYBGC::pelagic                <MYBGCPATH>/pelagic 
    326    src::MYBGC::benthic                <MYBGCPATH>/benthic 
    327     
    328    bld::pp::MYBGC      1 
    329    bld::tool::fppflags::MYBGC   %FPPFLAGS 
    330    bld::tool::fppkeys           %bld::tool::fppkeys MYBGC_MACROS 
     350   bld::tool::fppkeys  key_iomput key_mpp_mpi key_top 
     351 
     352   src::MYBGC::initialization         <MYBGCPATH>/initialization 
     353   src::MYBGC::pelagic                <MYBGCPATH>/pelagic 
     354   src::MYBGC::benthic                <MYBGCPATH>/benthic 
     355 
     356   bld::pp::MYBGC      1 
     357   bld::tool::fppflags::MYBGC   %FPPFLAGS 
     358   bld::tool::fppkeys           %bld::tool::fppkeys MYBGC_MACROS 
    331359 
    332360where *MYBGC_MACROS* is the space delimited list of macros used in *MYBGC* model for 
    333361selecting/excluding specific parts of the code. 
    334 The BGC model code will be preprocessed in the configuration ``BLD`` folder as for NEMO, 
    335 but with an independent path, like ``NEMO_MYBGC/BLD/MYBGC/<subforlders>``. 
     362The BGC model code will be preprocessed in the configuration :file:`BLD` folder as for NEMO, 
     363but with an independent path, like :file:`NEMO_MYBGC/BLD/MYBGC/<subforlders>`. 
    336364 
    337365The compilation will be performed similarly to in the previous case with the following 
     
    339367.. code-block:: console 
    340368 
    341    $ makenemo -n 'NEMO_MYBGC' -m '<arch_my_machine>' -j 8 -e '<MYBGCPATH>/nemo_coupling' 
    342  
    343 Note that, the additional lines specific for the BGC model source and build paths can be written into 
    344 a separate file, e.g. named ``MYBGC.fcm``, and then simply included in the ``cpp_NEMO_MYBGC.fcm`` as follow 
    345  
    346 .. code-block:: perl 
    347  
    348    bld::tool::fppkeys  key_zdftke key_dynspg_ts key_iomput key_mpp_mpi key_top 
    349    inc <MYBGCPATH>/MYBGC.fcm 
    350  
    351 This will enable a more portable compilation structure for all MYBGC related configurations. 
    352  
    353 **Important**: the coupling interface contained in nemo_coupling cannot be added using the FCM syntax, 
    354 as the same files already exists in NEMO and they are overridden only with the readdressing of MY_SRC contents to 
    355 avoid compilation conflicts due to duplicate routines. 
    356  
    357 All modifications illustrated above, can be easily implemented using shell or python scripting to 
    358 edit the NEMO configuration CPP.fcm file and to create the BGC model specific FCM compilation file with code paths. 
     369   $ makenemo -n 'NEMO_MYBGC' -m '<arch_my_machine>' -j 8 -e '<MYBGCPATH>/nemo_coupling' 
     370 
     371.. note:: 
     372   The additional lines specific for the BGC model source and build paths can be written into 
     373   a separate file, e.g. named :file:`MYBGC.fcm`, 
     374   and then simply included in the :file:`cpp_NEMO_MYBGC.fcm` as follow 
     375 
     376   .. code-block:: perl 
     377 
     378      bld::tool::fppkeys  key_zdftke key_dynspg_ts key_iomput key_mpp_mpi key_top 
     379      inc <MYBGCPATH>/MYBGC.fcm 
     380 
     381   This will enable a more portable compilation structure for all MYBGC related configurations. 
     382 
     383.. warning:: 
     384   The coupling interface contained in :file:`nemo_coupling` cannot be added using the FCM syntax, 
     385   as the same files already exists in NEMO and they are overridden only with 
     386   the readdressing of MY_SRC contents to avoid compilation conflicts due to duplicate routines. 
     387 
     388All modifications illustrated above, can be easily implemented using shell or python scripting 
     389to edit the NEMO configuration :file:`CPP.fcm` file and 
     390to create the BGC model specific FCM compilation file with code paths. 
     391 
     392.. |BFM man| replace:: BFM-NEMO coupling manual 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcadv.F90

    r10068 r12065  
    166166      REWIND( numnat_ref )                   !  namtrc_adv in reference namelist  
    167167      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
    168 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp ) 
     168901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist' ) 
    169169      REWIND( numnat_cfg )                   ! namtrc_adv in configuration namelist 
    170170      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
    171 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp ) 
     171902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist' ) 
    172172      IF(lwm) WRITE ( numont, namtrc_adv ) 
    173173      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcdmp.F90

    r10351 r12065  
    183183      REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 
    184184      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) 
    185 909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp ) 
     185909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist' ) 
    186186      REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping 
    187187      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910) 
    188 910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp ) 
     188910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist' ) 
    189189      IF(lwm) WRITE ( numont, namtrc_dmp ) 
    190190 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcldf.F90

    r10068 r12065  
    145145      REWIND( numnat_ref )             !  namtrc_ldf in reference namelist  
    146146      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 
    147 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp ) 
     147903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist' ) 
    148148      ! 
    149149      REWIND( numnat_cfg )             !  namtrc_ldf in configuration namelist  
    150150      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 
    151 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp ) 
     151904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist' ) 
    152152      IF(lwm) WRITE ( numont, namtrc_ldf ) 
    153153      ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcnxt.F90

    r10425 r12065  
    139139      ENDIF 
    140140      !                                ! Leap-Frog + Asselin filter time stepping 
    141       IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap) 
     141      IF( (neuler == 0 .AND. kt == nittrc000) ) THEN 
     142         ! set up for leapfrog on second timestep 
     143         DO jn = 1, jptra 
     144            DO jk = 1, jpkm1 
     145               trb(:,:,jk,jn) = trn(:,:,jk,jn)   
     146               trn(:,:,jk,jn) = tra(:,:,jk,jn) 
     147            END DO 
     148         END DO 
     149      ELSE IF( ln_top_euler ) THEN 
     150         ! always doing euler timestepping 
    142151         DO jn = 1, jptra 
    143152            DO jk = 1, jpkm1 
     
    146155            END DO 
    147156         END DO 
     157      ENDIF 
     158      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap) 
    148159         IF (l_trdtrc .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl 
    149160            !                                        ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcrad.F90

    r10425 r12065  
    8989      REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    9090      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907) 
    91 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp ) 
     91907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist' ) 
    9292      REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    9393      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 ) 
    94 908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp ) 
     94908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist' ) 
    9595      IF(lwm) WRITE( numont, namtrc_rad ) 
    9696 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcsbc.F90

    r10425 r12065  
    6161      ! 
    6262      INTEGER  ::   ji, jj, jn                      ! dummy loop indices 
    63       REAL(wp) ::   zse3t, zrtrn, zratio, zfact     ! local scalars 
    64       REAL(wp) ::   zftra, zcd, zdtra, ztfx, ztra   !   -      - 
     63      REAL(wp) ::   zse3t, zrtrn, zfact     ! local scalars 
     64      REAL(wp) ::   zftra, zdtra, ztfx, ztra   !   -      - 
    6565      CHARACTER (len=22) :: charout 
    6666      REAL(wp), DIMENSION(jpi,jpj)   ::   zsfx 
     
    113113 
    114114      ! 0. initialization 
    115       IF( nn_ice_tr == -1 ) THEN    ! No tracers in sea ice (null concentration in sea ice) 
     115      SELECT CASE ( nn_ice_tr ) 
     116 
     117      CASE ( -1 ) ! No tracers in sea ice (null concentration in sea ice) 
    116118         ! 
    117119         DO jn = 1, jptra 
     
    123125         END DO 
    124126         ! 
    125        ELSE 
     127      CASE ( 0 )  ! Same concentration in sea ice and in the ocean 
     128         ! 
     129         DO jn = 1, jptra 
     130            DO jj = 2, jpj 
     131               DO ji = fs_2, fs_jpim1   ! vector opt. 
     132                  sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * trn(ji,jj,1,jn) 
     133               END DO 
     134            END DO 
     135         END DO 
     136         ! 
     137      CASE ( 1 )  ! Specific treatment of sea ice fluxes with an imposed concentration in sea ice  
    126138         ! 
    127139         DO jn = 1, jptra 
     
    131143                  ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    132144                  zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
    133                   zcd   =   trc_o(ji,jj,jn) * fmmflx(ji,jj) ! concentration dilution due to freezing-melting, 
    134145                  !                                         ! only used in the levitating sea ice case 
    135146                  ! tracer flux only       : add concentration dilution term in net tracer flux, no F-M in volume flux 
    136147                  ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 
    137                   ztfx  = zftra                             ! net tracer flux 
     148                  ztfx  = zftra                        ! net tracer flux 
    138149                  ! 
    139                   zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) )  
     150                  zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * trn(ji,jj,1,jn) )  
    140151                  IF ( zdtra < 0. ) THEN 
    141                      zratio = -zdtra * zse3t * r2dttrc / ( trn(ji,jj,1,jn) + zrtrn ) 
    142                      zdtra = MIN(1.0, zratio) * zdtra ! avoid negative concentrations to arise 
     152                     zdtra  = MAX(zdtra, -trn(ji,jj,1,jn) * e3t_n(ji,jj,1) / r2dttrc )   ! avoid negative concentrations to arise 
    143153                  ENDIF 
    144154                  sbc_trc(ji,jj,jn) =  zdtra  
     
    146156            END DO 
    147157         END DO 
    148       ENDIF 
     158      END SELECT 
    149159      ! 
    150160      CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. ) 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trcsink.F90

    r10376 r12065  
    8181            END DO 
    8282         END DO 
    83          iiter(ji,jj) = MIN( iiter(ji,jj), nitermax ) 
     83         iiter(:,:) = MIN( iiter(:,:), nitermax ) 
    8484      ENDIF 
    8585 
     
    8787         DO jj = 1, jpj 
    8888            DO ji = 1, jpi 
    89                IF( tmask(ji,jj,jk) == 1 ) THEN 
     89               IF( tmask(ji,jj,jk) == 1.0 ) THEN 
    9090                 zwsmax = 0.5 * e3t_n(ji,jj,jk) * rday / rsfact 
    9191                 zwsink(ji,jj,jk) = MIN( pwsink(ji,jj,jk), zwsmax * REAL( iiter(ji,jj), wp ) ) 
     92               ELSE 
     93                 ! provide a default value so there is no use of undefinite value in trc_sink2 for zwsink2 initialization 
     94                 zwsink(ji,jj,jk) = 0. 
    9295               ENDIF 
    9396            END DO 
     
    215218      REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
    216219      READ  ( numnat_ref, namtrc_snk, IOSTAT = ios, ERR = 907) 
    217 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist', lwp ) 
     220907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist' ) 
    218221      REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
    219222      READ  ( numnat_cfg, namtrc_snk, IOSTAT = ios, ERR = 908 ) 
    220 908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist', lwp ) 
     223908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist' ) 
    221224      IF(lwm) WRITE( numont, namtrc_snk ) 
    222225 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/TRP/trdmxl_trc.F90

    r10425 r12065  
    108108         ! ... Set nmld(ji,jj) = index of first T point below control surf. or outside mixed-layer 
    109109         SELECT CASE ( nn_ctls_trc )                                ! choice of the control surface 
    110             CASE ( -2  )   ;   STOP 'trdmxl_trc : not ready '     !     -> isopycnal surface (see ???) 
     110            CASE ( -2  )   ;   CALL ctl_stop( 'STOP', 'trdmxl_trc : not ready ' )     !     -> isopycnal surface (see ???) 
    111111            CASE ( -1  )   ;   nmld_trc(:,:) = neln(:,:)          !     -> euphotic layer with light criterion 
    112112            CASE (  0  )   ;   nmld_trc(:,:) = nmln(:,:)          !     -> ML with density criterion (see zdfmxl) 
     
    431431 
    432432#if defined key_diainstant 
    433                STOP 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.' 
     433               CALL ctl_stop( 'STOP', 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.' ) 
    434434#endif 
    435435            ENDIF 
     
    857857#  if defined key_diainstant 
    858858      IF( .NOT. ln_trdmxl_trc_instant ) THEN 
    859          STOP 'trd_mxl_trc : this was never checked. Comment this line to proceed...' 
     859         CALL ctl_stop( 'STOP', 'trd_mxl_trc : this was never checked. Comment this line to proceed...' ) 
    860860      ENDIF 
    861861      zsto = nn_trd_trc * rdt 
     
    928928      !-- Define miscellaneous passive tracer mixed-layer variables  
    929929      IF( jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb ) THEN 
    930          STOP 'Error : jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb' ! see below 
     930         CALL ctl_stop( 'STOP', 'Error : jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb' ) ! see below 
    931931      ENDIF 
    932932 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcbc.F90

    r10068 r12065  
    4444   TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:), TARGET  :: sf_trcobc 
    4545#endif 
    46    TYPE(MAP_POINTER), ALLOCATABLE, DIMENSION(:) :: nbmap_ptr   ! array of pointers to nbmap 
    4746 
    4847   !! * Substitutions 
     
    123122      REWIND( numnat_ref )              ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 
    124123      READ  ( numnat_ref, namtrc_bc, IOSTAT = ios, ERR = 901) 
    125 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bc in reference namelist', lwp ) 
     124901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bc in reference namelist' ) 
    126125      REWIND( numnat_cfg )              ! Namelist namtrc_bc in configuration namelist : Passive tracer data structure 
    127126      READ  ( numnat_cfg, namtrc_bc, IOSTAT = ios, ERR = 902 ) 
    128 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bc in configuration namelist', lwp ) 
     127902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bc in configuration namelist' ) 
    129128      IF(lwm) WRITE ( numont, namtrc_bc ) 
    130129 
     
    132131         REWIND( numnat_ref )              ! Namelist namtrc_bdy in reference namelist : Passive tracer data structure 
    133132         READ  ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 
    134 903      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist', lwp ) 
    135  
     133903      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist' ) 
     134         ! make sur that all elements of the namelist variables have a default definition from namelist_ref 
     135         cn_trc     (2:jp_bdy) = cn_trc     (1) 
     136         cn_trc_dflt(2:jp_bdy) = cn_trc_dflt(1) 
    136137         REWIND( numnat_cfg )              ! Namelist namtrc_bdy in configuration namelist : Passive tracer data structure 
    137138         READ  ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 
    138 904      IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist', lwp ) 
     139904      IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist' ) 
    139140         IF(lwm) WRITE ( numont, namtrc_bdy ) 
    140141       
     
    234235      ! OPEN Lateral boundary conditions 
    235236      IF( ln_bdy .AND. nb_trcobc > 0 ) THEN  
    236          ALLOCATE ( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), nbmap_ptr(nb_trcobc), STAT=ierr1 ) 
     237         ALLOCATE ( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), STAT=ierr1 ) 
    237238         IF( ierr1 > 0 ) THEN 
    238239            CALL ctl_stop( 'trc_bc_ini: unable to allocate sf_trcobc structure' )   ;   RETURN 
     
    257258                  trcdta_bdy(jn,ib)%trc => sf_trcobc(jl)%fnow(:,1,:) 
    258259                  trcdta_bdy(jn,ib)%rn_fac = rf_trofac(jl) 
    259                   ! create OBC mapping array 
    260                   nbmap_ptr(jl)%ptr => idx_bdy(ib)%nbmap(:,igrd) 
    261                   nbmap_ptr(jl)%ll_unstruc = ln_coords_file(igrd) 
    262                   ! 
    263260               ELSE                          !* Initialise obc arrays from initial conditions *! 
    264261                  ALLOCATE ( trcdta_bdy(jn,ib)%trc(nblen,jpk) ) 
     
    276273         ! 
    277274         CALL fld_fill( sf_trcobc, slf_i, cn_dir_obc, 'trc_bc_ini', 'Passive tracer OBC data', 'namtrc_bc' ) 
     275         DO jn = 1, ntrc   ! define imap pointer, must be done after the call to fld_fill 
     276            DO ib = 1, nb_bdy 
     277               IF( ln_trc_obc(jn) ) THEN     !* Initialise from external data *! 
     278                  jl = n_trc_indobc(jn) 
     279                  sf_trcobc(jl)%imap => idx_bdy(ib)%nbmap(1:idx_bdy(ib)%nblen(igrd),igrd) 
     280               ENDIF 
     281            END DO 
     282         END DO 
     283         ! 
    278284      ENDIF 
    279285 
     
    362368      IF( PRESENT(jit) ) THEN  
    363369         ! 
    364          ! OPEN boundary conditions (use time_offset=+1 as they are applied at the end of the step) 
     370         ! OPEN boundary conditions (use kt_offset=+1 as they are applied at the end of the step) 
    365371         IF( nb_trcobc > 0 ) THEN 
    366372           if (lwp) write(numout,'(a,i5,a,i10)') '   reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 
    367            CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, map=nbmap_ptr, kit=jit, kt_offset=+1) 
     373           CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, kit=jit, kt_offset=+1) 
    368374         ENDIF 
    369375         ! 
     
    382388      ELSE 
    383389         ! 
    384          ! OPEN boundary conditions (use time_offset=+1 as they are applied at the end of the step) 
     390         ! OPEN boundary conditions (use kt_offset=+1 as they are applied at the end of the step) 
    385391         IF( nb_trcobc > 0 ) THEN 
    386392           if (lwp) write(numout,'(a,i5,a,i10)') '   reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 
    387            CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, map=nbmap_ptr, kt_offset=+1) 
     393           CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, kt_offset=+1) 
    388394         ENDIF 
    389395         ! 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcbdy.F90

    r10425 r12065  
    2222   USE lbclnk                       ! ocean lateral boundary conditions (or mpp link) 
    2323   USE in_out_manager               ! I/O manager 
    24    USE bdy_oce, only: idx_bdy       ! ocean open boundary conditions 
     24   USE bdy_oce                      ! ocean open boundary conditions 
    2525 
    2626   IMPLICIT NONE 
     
    4646      INTEGER, INTENT( in ) :: kt     ! Main time step counter 
    4747      !! 
    48       INTEGER                           :: ib_bdy ,jn ,igrd ! Loop indeces 
     48      INTEGER                           :: ib_bdy ,ir, jn ,igrd ! Loop indices 
    4949      REAL(wp), POINTER, DIMENSION(:,:) ::  ztrc 
    5050      REAL(wp), POINTER                 ::  zfac 
     51      LOGICAL                           :: llrim0               ! indicate if rim 0 is treated 
     52      LOGICAL, DIMENSION(4)             :: llsend1, llrecv1     ! indicate how communications are to be carried out 
    5153      !!---------------------------------------------------------------------- 
    5254      ! 
     
    5456      ! 
    5557      igrd = 1  
    56       ! 
    57       DO ib_bdy=1, nb_bdy 
    58          DO jn = 1, jptra 
    59             ! 
    60             ztrc => trcdta_bdy(jn,ib_bdy)%trc  
    61             zfac => trcdta_bdy(jn,ib_bdy)%rn_fac 
    62             ! 
    63             SELECT CASE( TRIM(trcdta_bdy(jn,ib_bdy)%cn_obc) ) 
    64             CASE('none'        )   ;   CYCLE 
    65             CASE('frs'         )   ;   CALL bdy_frs( idx_bdy(ib_bdy),                tra(:,:,:,jn), ztrc*zfac ) 
    66             CASE('specified'   )   ;   CALL bdy_spe( idx_bdy(ib_bdy),                tra(:,:,:,jn), ztrc*zfac ) 
    67             CASE('neumann'     )   ;   CALL bdy_nmn( idx_bdy(ib_bdy), igrd         , tra(:,:,:,jn) ) 
    68             CASE('orlanski'    )   ;   CALL bdy_orl( idx_bdy(ib_bdy), trb(:,:,:,jn), tra(:,:,:,jn), ztrc*zfac, ll_npo=.false. ) 
    69             CASE('orlanski_npo')   ;   CALL bdy_orl( idx_bdy(ib_bdy), trb(:,:,:,jn), tra(:,:,:,jn), ztrc*zfac, ll_npo=.true. ) 
    70             CASE DEFAULT           ;   CALL ctl_stop( 'trc_bdy : unrecognised option for open boundaries for passive tracers' ) 
     58      llsend1(:) = .false.  ;   llrecv1(:) = .false. 
     59      DO ir = 1, 0, -1   ! treat rim 1 before rim 0 
     60         IF( ir == 0 ) THEN   ;   llrim0 = .TRUE. 
     61         ELSE                 ;   llrim0 = .FALSE. 
     62         END IF 
     63         DO ib_bdy=1, nb_bdy 
     64            DO jn = 1, jptra 
     65               ! 
     66               ztrc => trcdta_bdy(jn,ib_bdy)%trc  
     67               zfac => trcdta_bdy(jn,ib_bdy)%rn_fac 
     68               ! 
     69               SELECT CASE( TRIM(trcdta_bdy(jn,ib_bdy)%cn_obc) ) 
     70               CASE('none'        )   ;   CYCLE 
     71               CASE('frs'         )   ! treat the whole boundary at once 
     72                  IF( ir == 0 ) CALL bdy_frs( idx_bdy(ib_bdy),                tra(:,:,:,jn), ztrc*zfac ) 
     73               CASE('specified'   )   ! treat the whole rim      at once 
     74                  IF( ir == 0 ) CALL bdy_spe( idx_bdy(ib_bdy),                tra(:,:,:,jn), ztrc*zfac ) 
     75               CASE('neumann'     )   ;   CALL bdy_nmn( idx_bdy(ib_bdy), igrd         , tra(:,:,:,jn) )   ! tra masked 
     76               CASE('orlanski'    )   ;   CALL bdy_orl( idx_bdy(ib_bdy), trb(:,:,:,jn), tra(:,:,:,jn), ztrc*zfac, ll_npo=.false. ) 
     77               CASE('orlanski_npo')   ;   CALL bdy_orl( idx_bdy(ib_bdy), trb(:,:,:,jn), tra(:,:,:,jn), ztrc*zfac, ll_npo=.true. ) 
     78               CASE DEFAULT           ;   CALL ctl_stop( 'trc_bdy : unrecognised option for open boundaries for passive tracers' ) 
     79               END SELECT 
     80               ! 
     81            END DO 
     82         END DO 
     83         ! 
     84         IF( nn_hls > 1 .AND. ir == 1 ) CYCLE   ! at least 2 halos will be corrected -> no need to correct rim 1 before rim 0 
     85         IF( nn_hls == 1 ) THEN   ;   llsend1(:) = .false.   ;   llrecv1(:) = .false.   ;   END IF 
     86         DO ib_bdy=1, nb_bdy 
     87            SELECT CASE( TRIM(cn_tra(ib_bdy)) ) 
     88            CASE('neumann') 
     89               llsend1(:) = llsend1(:) .OR. lsend_bdyint(ib_bdy,1,:,ir)   ! possibly every direction, T points 
     90               llrecv1(:) = llrecv1(:) .OR. lrecv_bdyint(ib_bdy,1,:,ir)   ! possibly every direction, T points 
     91            CASE('orlanski','orlanski_npo') 
     92               llsend1(:) = llsend1(:) .OR. lsend_bdy(ib_bdy,1,:,ir)   ! possibly every direction, T points 
     93               llrecv1(:) = llrecv1(:) .OR. lrecv_bdy(ib_bdy,1,:,ir)   ! possibly every direction, T points 
    7194            END SELECT 
    72             ! Boundary points should be updated 
    73             CALL lbc_bdy_lnk( 'trcbdy', tra(:,:,:,jn), 'T', 1., ib_bdy ) 
    74             ! 
    7595         END DO 
    76       END DO 
     96         IF( ANY(llsend1) .OR. ANY(llrecv1) ) THEN   ! if need to send/recv in at least one direction 
     97            CALL lbc_lnk( 'trcbdy', tra, 'T',  1., kfillmode=jpfillnothing ,lsend=llsend1, lrecv=llrecv1 ) 
     98         END IF 
     99         ! 
     100      END DO   ! ir 
    77101      ! 
    78102      IF( ln_timing )   CALL timing_stop('trc_bdy') 
    79  
     103      ! 
    80104   END SUBROUTINE trc_bdy 
    81105 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcdta.F90

    r10222 r12065  
    100100      REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data 
    101101      READ  ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901) 
    102 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist', lwp ) 
     102901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist' ) 
    103103      REWIND( numnat_cfg )              ! Namelist namtrc_dta in configuration namelist : Passive tracer input data 
    104104      READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 ) 
    105 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist', lwp ) 
     105902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist' ) 
    106106      IF(lwm) WRITE ( numont, namtrc_dta ) 
    107107 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcice.F90

    r10069 r12065  
    8787      REWIND( numnat_ref )              ! Namelist namtrc_ice in reference namelist : Passive tracer input data 
    8888      READ  ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) 
    89  901  IF( ios /= 0 )   CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp ) 
     89 901  IF( ios /= 0 )   CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ' ) 
    9090      REWIND( numnat_cfg )              ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients 
    9191      READ  ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) 
    92  902  IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp ) 
     92 902  IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist' ) 
    9393 
    9494      IF( lwp ) THEN 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcini.F90

    r10570 r12065  
    181181      IF( ln_c14         )   CALL trc_ini_c14        !  C14 model 
    182182      IF( ln_age         )   CALL trc_ini_age        !  AGE 
    183       IF( .NOT.ln_pisces ) ALLOCATE( profsed(2) ) 
    184183      ! 
    185184      IF(lwp) THEN                   ! control print 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcnam.F90

    r10425 r12065  
    114114      REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    115115      READ  ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) 
    116 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 
     116901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    117117      REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    118118      READ  ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) 
    119 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 
     119902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
    120120      IF(lwm) WRITE( numont, namtrc_run ) 
    121121 
     
    160160      REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables 
    161161      READ  ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 
    162 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 
     162901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc in reference namelist' ) 
    163163      REWIND( numnat_cfg )              ! Namelist namtrc in configuration namelist : Passive tracer variables 
    164164      READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 
    165 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 
     165902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc in configuration namelist' ) 
    166166      IF(lwm) WRITE( numont, namtrc ) 
    167167 
     
    263263      REWIND( numnat_ref )              ! Namelist namtrc_trd in reference namelist : Passive tracer trends 
    264264      READ  ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) 
    265 905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_trd in reference namelist', lwp ) 
     265905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_trd in reference namelist' ) 
    266266      REWIND( numnat_cfg )              ! Namelist namtrc_trd in configuration namelist : Passive tracer trends 
    267267      READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) 
    268 906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp ) 
     268906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist' ) 
    269269      IF(lwm) WRITE( numont, namtrc_trd ) 
    270270 
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/TOP/trcrst.F90

    r10425 r12065  
    5858            IF( ln_rst_list ) THEN 
    5959               nrst_lst = 1 
    60                nitrst = nstocklist( nrst_lst ) 
     60               nitrst = nn_stocklist( nrst_lst ) 
    6161            ELSE 
    6262               nitrst = nitend 
     
    6464         ENDIF 
    6565 
    66          IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 
     66         IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 
    6767            ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 
    68             nitrst = kt + nstock - 1                  ! define the next value of nitrst for restart writing 
     68            nitrst = kt + nn_stock - 1                  ! define the next value of nitrst for restart writing 
    6969            IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run 
    7070         ENDIF 
     
    7272         IF( kt == nittrc000 ) lrst_trc = .FALSE. 
    7373      ENDIF 
     74 
     75      IF( .NOT. ln_rst_list .AND. nn_stock == -1 )   RETURN   ! we will never do any restart 
    7476 
    7577      ! to get better performances with NetCDF format: 
    7678      ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 
    7779      ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 
    78       IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
     80      IF( kt == nitrst - 2*nn_dttrc .OR. nn_stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    7981         ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    8082         IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
     
    153155          IF( l_offline .AND. ln_rst_list ) THEN 
    154156             nrst_lst = nrst_lst + 1 
    155              nitrst = nstocklist( nrst_lst ) 
     157             nitrst = nn_stocklist( nrst_lst ) 
    156158          ENDIF 
    157159      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.