- Timestamp:
- 2015-12-23T18:42:01+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r6160 r6164 85 85 ! 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 86 86 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 102 91 ! beware of the format used to write kt (default is i8.8, that should be large enough) 103 92 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst 104 93 ELSE ; WRITE(clkt,'(i8.8)') nitrst 105 94 ENDIF 106 ENDIF95 ! ENDIF 107 96 ! create the file 108 97 IF(lwp) WRITE(numout,*) … … 211 200 if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', & 212 201 & fq0, fq1, fq2 213 !!214 !! AXY (07/07/15): read in temporally averaged fields for DMS215 !! calculations216 !!217 IF( iom_varid( numrtr, 'B_DMS_CHN', ldstop = .FALSE. ) > 0 ) THEN218 !! YES; in which case read them219 !!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 ELSE232 !! NO; in which case set them to zero233 !!234 IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS absent - setting to zero ...'235 zb_dms_chn(:,:) = 0.0 !! CHN236 zn_dms_chn(:,:) = 0.0237 zb_dms_chd(:,:) = 0.0 !! CHD238 zn_dms_chd(:,:) = 0.0239 zb_dms_mld(:,:) = 0.0 !! MLD240 zn_dms_mld(:,:) = 0.0241 zb_dms_qsr(:,:) = 0.0 !! QSR242 zn_dms_qsr(:,:) = 0.0243 zb_dms_din(:,:) = 0.0 !! DIN244 zn_dms_din(:,:) = 0.0245 ENDIF246 !!247 !! calculate stats on these fields248 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, fq2253 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, fq2257 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, fq2261 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, fq2265 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, fq2269 270 202 #endif 271 203 … … 349 281 if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', & 350 282 & fq0, fq1, fq2 351 !!352 !! AXY (07/07/15): write out temporally averaged fields for DMS353 !! calculations354 !!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 fields368 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, fq2373 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, fq2377 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, fq2381 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, fq2385 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, fq2389 !!390 283 #endif 391 284
Note: See TracChangeset
for help on using the changeset viewer.