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 6164 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90 – NEMO

Ignore:
Timestamp:
2015-12-23T18:42:01+01:00 (8 years ago)
Author:
jpalmier
Message:

JPALM -- 23-12-2015 -- 1_ adapt CFC in MEDUSA branch - now Working properly 2_ add diagnostics to Ideal tracer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r6160 r6164  
    8585      ! 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 
    8686      IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    87          IF ( ln_rstdate ) THEN 
    88             !! JPALM -- 22-12-2015 -- modif to get the good date on restart trc file name 
    89             !!                     -- the condition to open the rst file is not the same than for the dynamic rst. 
    90             !!                     -- here it - for an obscure reason - is open 2 time-step before the restart writing process 
    91             !!                     instead of 1. 
    92             !!                     -- i am not sure if someone forgot +1 in the if loop condition as 
    93             !!                     it is writen in all comments nitrst - 2*nn_dttrc + 1 and the condition is nitrst - 2*nn_dttrc 
    94             !!                     -- nevertheless we didn't wanted to broke something already working  
    95             !!                     and just adapted the part we added. 
    96             !!                     -- So instead of calling ju2ymds( fjulday + (rdttra(1)) .... 
    97             !!                     we call ju2ymds( fjulday + (2*rdttra(1)) ..... 
    98             !!--------------------------------------------------------------------       
    99             CALL ju2ymds( fjulday + (2*rdttra(1)) / rday, iyear, imonth, iday, zsec ) 
    100             WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
    101          ELSE 
     87        ! IF ( ln_rstdate ) THEN 
     88        !    CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 
     89        !    WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     90        ! ELSE 
    10291            ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    10392            IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
    10493            ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst 
    10594            ENDIF 
    106         ENDIF 
     95        ! ENDIF 
    10796         ! create the file 
    10897         IF(lwp) WRITE(numout,*) 
     
    211200      if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', & 
    212201         &        fq0, fq1, fq2 
    213       !! 
    214       !! AXY (07/07/15): read in temporally averaged fields for DMS 
    215       !!                 calculations 
    216       !! 
    217       IF( iom_varid( numrtr, 'B_DMS_CHN', ldstop = .FALSE. ) > 0 ) THEN 
    218          !! YES; in which case read them 
    219          !! 
    220          IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS present - reading in ...' 
    221          CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_CHN',  zb_dms_chn(:,:)  ) 
    222          CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_CHN',  zn_dms_chn(:,:)  ) 
    223          CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_CHD',  zb_dms_chd(:,:)  ) 
    224          CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_CHD',  zn_dms_chd(:,:)  ) 
    225          CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_MLD',  zb_dms_mld(:,:)  ) 
    226          CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_MLD',  zn_dms_mld(:,:)  ) 
    227          CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_QSR',  zb_dms_qsr(:,:)  ) 
    228          CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_QSR',  zn_dms_qsr(:,:)  ) 
    229          CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_DIN',  zb_dms_din(:,:)  ) 
    230          CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_DIN',  zn_dms_din(:,:)  ) 
    231       ELSE 
    232          !! NO; in which case set them to zero 
    233          !! 
    234          IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS absent - setting to zero ...' 
    235          zb_dms_chn(:,:)  = 0.0   !! CHN 
    236          zn_dms_chn(:,:)  = 0.0 
    237          zb_dms_chd(:,:)  = 0.0   !! CHD 
    238          zn_dms_chd(:,:)  = 0.0 
    239          zb_dms_mld(:,:)  = 0.0   !! MLD 
    240          zn_dms_mld(:,:)  = 0.0 
    241          zb_dms_qsr(:,:)  = 0.0   !! QSR 
    242          zn_dms_qsr(:,:)  = 0.0 
    243          zb_dms_din(:,:)  = 0.0   !! DIN 
    244          zn_dms_din(:,:)  = 0.0 
    245       ENDIF 
    246       !! 
    247       !! calculate stats on these fields 
    248       IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS stats (min, max, sum) ...' 
    249       fq0 = MINVAL(zn_dms_chn(:,:)) 
    250       fq1 = MAXVAL(zn_dms_chn(:,:)) 
    251       fq2 = SUM(zn_dms_chn(:,:)) 
    252       if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHN ', fq0, fq1, fq2 
    253       fq0 = MINVAL(zn_dms_chd(:,:)) 
    254       fq1 = MAXVAL(zn_dms_chd(:,:)) 
    255       fq2 = SUM(zn_dms_chd(:,:)) 
    256       if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHD ', fq0, fq1, fq2 
    257       fq0 = MINVAL(zn_dms_mld(:,:)) 
    258       fq1 = MAXVAL(zn_dms_mld(:,:)) 
    259       fq2 = SUM(zn_dms_mld(:,:)) 
    260       if (lwp) write (numout,'(a,3f15.5)') 'DMS, MLD ', fq0, fq1, fq2 
    261       fq0 = MINVAL(zn_dms_qsr(:,:)) 
    262       fq1 = MAXVAL(zn_dms_qsr(:,:)) 
    263       fq2 = SUM(zn_dms_qsr(:,:)) 
    264       if (lwp) write (numout,'(a,3f15.5)') 'DMS, QSR ', fq0, fq1, fq2 
    265       fq0 = MINVAL(zn_dms_din(:,:)) 
    266       fq1 = MAXVAL(zn_dms_din(:,:)) 
    267       fq2 = SUM(zn_dms_din(:,:)) 
    268       if (lwp) write (numout,'(a,3f15.5)') 'DMS, DIN ', fq0, fq1, fq2 
    269  
    270202#endif 
    271203  
     
    349281      if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', & 
    350282         &        fq0, fq1, fq2 
    351       !! 
    352       !! AXY (07/07/15): write out temporally averaged fields for DMS 
    353       !!                 calculations 
    354       !! 
    355       IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS - writing out ...' 
    356       CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_CHN',  zb_dms_chn(:,:)  ) 
    357       CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_CHN',  zn_dms_chn(:,:)  ) 
    358       CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_CHD',  zb_dms_chd(:,:)  ) 
    359       CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_CHD',  zn_dms_chd(:,:)  ) 
    360       CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_MLD',  zb_dms_mld(:,:)  ) 
    361       CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_MLD',  zn_dms_mld(:,:)  ) 
    362       CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_QSR',  zb_dms_qsr(:,:)  ) 
    363       CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_QSR',  zn_dms_qsr(:,:)  ) 
    364       CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_DIN',  zb_dms_din(:,:)  ) 
    365       CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_DIN',  zn_dms_din(:,:)  ) 
    366       !! 
    367       !! calculate stats on these fields 
    368       IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS stats (min, max, sum) ...' 
    369       fq0 = MINVAL(zn_dms_chn(:,:)) 
    370       fq1 = MAXVAL(zn_dms_chn(:,:)) 
    371       fq2 = SUM(zn_dms_chn(:,:)) 
    372       if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHN ', fq0, fq1, fq2 
    373       fq0 = MINVAL(zn_dms_chd(:,:)) 
    374       fq1 = MAXVAL(zn_dms_chd(:,:)) 
    375       fq2 = SUM(zn_dms_chd(:,:)) 
    376       if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHD ', fq0, fq1, fq2 
    377       fq0 = MINVAL(zn_dms_mld(:,:)) 
    378       fq1 = MAXVAL(zn_dms_mld(:,:)) 
    379       fq2 = SUM(zn_dms_mld(:,:)) 
    380       if (lwp) write (numout,'(a,3f15.5)') 'DMS, MLD ', fq0, fq1, fq2 
    381       fq0 = MINVAL(zn_dms_qsr(:,:)) 
    382       fq1 = MAXVAL(zn_dms_qsr(:,:)) 
    383       fq2 = SUM(zn_dms_qsr(:,:)) 
    384       if (lwp) write (numout,'(a,3f15.5)') 'DMS, QSR ', fq0, fq1, fq2 
    385       fq0 = MINVAL(zn_dms_din(:,:)) 
    386       fq1 = MAXVAL(zn_dms_din(:,:)) 
    387       fq2 = SUM(zn_dms_din(:,:)) 
    388       if (lwp) write (numout,'(a,3f15.5)') 'DMS, DIN ', fq0, fq1, fq2 
    389       !!  
    390283#endif 
    391284 
Note: See TracChangeset for help on using the changeset viewer.