Changeset 9709 for NEMO/branches/CNRS/dev_r6568_Subduction_Diagnostics
- Timestamp:
- 2018-05-31T12:29:39+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/CNRS/dev_r6568_Subduction_Diagnostics/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90
r4996 r9709 1 !! 18 SEP 2016 : DC 1 2 MODULE trcwri_pisces 2 3 !!====================================================================== … … 15 16 USE sms_pisces ! PISCES variables 16 17 USE iom ! I/O manager 18 USE diasub 19 USE trcdiasub 17 20 18 21 IMPLICIT NONE … … 30 33 !! ** Purpose : output passive tracers fields 31 34 !!--------------------------------------------------------------------- 32 CHARACTER (len=20) :: cltra 33 REAL(wp) :: zfact 34 INTEGER :: ji, jj, jk, jn 35 REAL(wp), DIMENSION(jpi,jpj) :: zdic, zo2min, zdepo2min 35 CHARACTER (len=20) :: cltra 36 REAL(wp) :: zrfact 37 INTEGER :: jn 36 38 !!--------------------------------------------------------------------- 37 39 … … 41 43 DO jn = jp_pcs0, jp_pcs1 42 44 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 43 CALL iom_put( cltra, trn(:,:,:,jn) ) 45 IF( lk_vvl ) THEN 46 CALL iom_put( cltra, trn(:,:,:,jn) * fse3t_n(:,:,:) ) 47 ELSE 48 CALL iom_put( cltra, trn(:,:,:,jn) ) 49 ENDIF 44 50 END DO 45 51 #else 46 52 DO jn = jp_pcs0, jp_pcs1 47 z fact = 1.0e+648 IF( jn == jpno3 .OR. jn == jpnh4 ) z fact = rno3 * 1.0e+649 IF( jn == jppo4 ) z fact = po4r * 1.0e+653 zrfact = 1.0e+6 54 IF( jn == jpno3 .OR. jn == jpnh4 ) zrfact = rno3 * 1.0e+6 55 IF( jn == jppo4 ) zrfact = po4r * 1.0e+6 50 56 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 51 IF( iom_use( cltra ) ) CALL iom_put( cltra, trn(:,:,:,jn) * zfact ) 57 IF( lk_vvl ) THEN 58 CALL iom_put( cltra, trn(:,:,:,jn) * fse3t_n(:,:,:) * zrfact ) 59 ELSE 60 CALL iom_put( cltra, trn(:,:,:,jn) * zrfact ) 61 ENDIF 52 62 END DO 63 #endif 64 CALL trc_wri_sub !!! WORK DC 65 ! 66 END SUBROUTINE trc_wri_pisces 53 67 54 IF( iom_use( "INTDIC" ) ) THEN ! DIC content in kg/m2 55 zdic(:,:) = 0. 56 DO jk = 1, jpkm1 57 zdic(:,:) = zdic(:,:) + trn(:,:,jk,jpdic) * fse3t(:,:,jk) * tmask(:,:,jk) * 12. 58 ENDDO 59 CALL iom_put( 'INTDIC', zdic ) 60 ENDIF 61 ! 62 IF( iom_use( "O2MIN" ) .OR. iom_use ( "ZO2MIN" ) ) THEN ! Oxygen minimum concentration and depth 63 zo2min (:,:) = trn(:,:,1,jpoxy) * tmask(:,:,1) 64 zdepo2min(:,:) = fsdepw(:,:,1) * tmask(:,:,1) 65 DO jk = 2, jpkm1 66 DO jj = 1, jpj 67 DO ji = 1, jpi 68 IF( tmask(ji,jj,jk) == 1 ) then 69 IF( trn(ji,jj,jk,jpoxy) < zo2min(ji,jj) ) then 70 zo2min (ji,jj) = trn(ji,jj,jk,jpoxy) 71 zdepo2min(ji,jj) = fsdepw(ji,jj,jk) 72 ENDIF 73 ENDIF 74 END DO 75 END DO 76 END DO 77 ! 78 CALL iom_put('O2MIN' , zo2min ) ! oxygen minimum concentration 79 CALL iom_put('ZO2MIN', zdepo2min ) ! depth of oxygen minimum concentration 80 ! 81 ENDIF 68 # if defined key_diasub 69 70 SUBROUTINE trc_wri_sub 71 !!---------------------------------------------------------------------- 72 !! *** ROUTINE trc_wri_sub *** 73 !! 74 !! ** Purpose : output of passive tracer : advection-diffusion subduction subduction 75 !! 76 !!---------------------------------------------------------------------- 77 CHARACTER(len=8), DIMENSION(jptrsub) :: cltra1 78 CHARACTER(len=20) :: cltra, cltra2 79 INTEGER :: jn, jl, ji, jj, ik 80 REAL(wp), DIMENSION(jpi,jpj) :: zsed 81 REAL(wp), DIMENSION(jpi,jpj,jptrsub) :: ztrsubtpoc 82 !!---------------------------------------------------------------------- 83 84 DO jl = 1, jptrsub 85 IF( jl == jpsub_xad ) cltra1(jl) = TRIM("xad_sub_") ! x advection for tracer 86 IF( jl == jpsub_yad ) cltra1(jl) = TRIM("yad_sub_") ! y advection for tracer 87 IF( jl == jpsub_zad ) cltra1(jl) = TRIM("zad_sub_") ! z advection for tracer 88 IF( jl == jpsub_mld ) cltra1(jl) = TRIM("mld_sub_") ! mld for tracer 89 IF( jl == jpsub_xlf ) cltra1(jl) = TRIM("xlf_sub_") ! x lateral diffusion for tracer 90 IF( jl == jpsub_ylf ) cltra1(jl) = TRIM("ylf_sub_") ! y lateral diffusion for tracer 91 IF( jl == jpsub_zlf ) cltra1(jl) = TRIM("zlf_sub_") ! z lateral diffusion for tracer 92 IF( jl == jpsub_zdf ) cltra1(jl) = TRIM("zdf_sub_") ! z vertical diffusion for tracer 93 #if defined key_trcldf_eiv 94 IF( jl == jpsub_xei ) cltra1(jl) = TRIM("xei_sub_") ! x gent velocity for tracer 95 IF( jl == jpsub_yei ) cltra1(jl) = TRIM("yei_sub_") ! y gent velocity for tracer 96 IF( jl == jpsub_zei ) cltra1(jl) = TRIM("zei_sub_") ! z gent velocity for tracer 97 #endif 98 ENDDO 99 ! 100 # if defined key_pisces 101 DO jl = 1, jptrsub 102 ! write the trends 103 DO jn = 1, jptra 104 IF( jn == jpdic .OR. jn == jptal .OR. jn == jpoxy .OR. jn == jpdoc .OR. jn == jpcal & 105 & .OR. jn == jpno3 .OR. jn == jppo4 .OR. jn == jpsil .OR. jn == jpfer .OR. jn == jpnh4 ) THEN 106 cltra = TRIM(cltra1(jl))//TRIM(ctrcnm(jn)) 107 CALL iom_put( cltra, trsub(:,:,jn,jl) ) 108 ENDIF 109 END DO 110 ! 111 ! Sum of subduction of phy, phy2, zoo, zoo2, POC et GOC 112 ztrsubtpoc(:,:,jl) = trsub(:,:,jpphy,jl) + trsub(:,:,jpdia,jl) & 113 & + trsub(:,:,jpzoo,jl) + trsub(:,:,jpmes,jl) & 114 & + trsub(:,:,jppoc,jl) + trsub(:,:,jpgoc,jl) 115 cltra2 = "TOC" 116 cltra = TRIM(cltra1(jl))//TRIM(cltra2) 117 CALL iom_put( cltra, ztrsubtpoc(:,:,jl)) 118 END DO 119 120 ! Sedimentation a la base de la couche de mélane 121 cltra = TRIM("sedsed") 122 DO jj = 1, jpj 123 DO ji = 1, jpi 124 ik = nmln(ji,jj) 125 zsed(ji,jj) = ( sinking(ji,jj,ik) + sinking2(ji,jj,ik) ) * tmask(ji,jj,ik) 126 END DO 127 END DO 128 CALL iom_put( cltra, zsed(:,:) ) 129 #else 130 DO jl = 1, jptrsub 131 ! write the trends 132 DO jn = 1, jptra 133 cltra = TRIM(cltra1(jl))//TRIM(ctrcnm(jn)) 134 CALL iom_put( cltra, trsub(:,:,jn,jl) ) 135 END DO 136 ! 137 END DO 82 138 #endif 83 139 ! 84 END SUBROUTINE trc_wri_pisces 140 ! une fois ecrit, trsub est remis a 0 141 DO jl = 1, jptrsub 142 DO jn = 1, jptra 143 trsub(:,:,jn,jl) = 0. 144 END DO 145 END DO 146 ! 147 END SUBROUTINE trc_wri_sub 148 149 # else 150 SUBROUTINE trc_wri_sub ! Dummy routine 151 END SUBROUTINE trc_wri_sub 152 # endif 153 85 154 86 155 #else
Note: See TracChangeset
for help on using the changeset viewer.