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 2854 for branches/2011/dev_r2802_MERCATOR10_diadct/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90 – NEMO

Ignore:
Timestamp:
2011-09-22T12:11:36+02:00 (13 years ago)
Author:
cbricaud
Message:

add comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2802_MERCATOR10_diadct/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90

    r2848 r2854  
    66  !! History :  
    77  !! 
     8  !!         original  : 02/99 (Y Drillet) 
     9  !!         addition  : 10/01 (Y Drillet, R Bourdalle Badie) 
     10  !!                   : 10/05 (M Laborie) F90 
     11  !!         addition  : 04/07 (G Garric) Ice sections 
     12  !!         bugfix    : 04/07 (C Bricaud) test on sec%nb_point 
     13  !!                                      initialisation of ztransp1,ztransp2,... 
     14  !!         nemo_v_3_4: 09/2011 (C Bricaud) 
    815  !! 
    916  !! 
     
    1421  !!---------------------------------------------------------------------- 
    1522  !!---------------------------------------------------------------------- 
    16   !!   dia_dct      :  Compute the transport trough a sec. 
    17   !!   dia_dct_init : 
    18   !!   readsec      : 
    19   !!   removepoints : 
    20   !!   transport    : 
    21   !!   dia_dct_wri  : 
    22   !!   interp       : 
     23  !!   dia_dct      :  compute the transport trough a sec. 
     24  !!   dia_dct_init :  read namelist. 
     25  !!   readsec      :  read sections description and pathway 
     26  !!   removepoints :  remove points which are common to 2 procs 
     27  !!   transport    :  Compute transport for each sections 
     28  !!   dia_dct_wri  :  write tranports results in ascii files 
     29  !!   interp       :  compute Temperature/Salinity/density on U-point or V-point 
    2330  !!    
    2431  !!---------------------------------------------------------------------- 
     
    100107     !!               ***  ROUTINE diadct  ***   
    101108     !! 
    102      !!  ** Purpose: Read the namelist parametres and the  
    103      !!              file containing the sections definitions 
    104      !! 
    105      !!  ** Input : Read a binary file generated by the tools "????" 
    106      !!    
    107      !!  ** Output:  secs array 
    108      !!   
    109      !! History : 
    110      !!         !  03-09 (JM. Lellouche and E. Durand) mpprsum modified 
    111      !!         !  04-01 (C.Derval) bugfix 
    112      !!         !  04-2007 (C.Bricaud) bugfix  
    113      !!         !          mise à zéro de secs(jsec)%transport(:,:) apres chaque ecriture 
     109     !!  ** Purpose: Read the namelist parametres 
     110     !!              Open output files 
     111     !! 
    114112     !!--------------------------------------------------------------------- 
    115113     NAMELIST/namdct/nn_dct,nn_dctwri,nn_secdebug 
     
    206204     !!               ***  ROUTINE readsec  *** 
    207205     !! 
    208      !!  ** Purpose: Read the sections definitions  
     206     !!  ** Purpose: 
     207     !!            Read a binary file(section_ijglobal.diadct)  
     208     !!            generated by the tools "NEMOGCM/TOOLS/SECTIONS_DIADCT" 
     209     !! 
     210     !! 
    209211     !!--------------------------------------------------------------------- 
    210212     !! * Local variables 
     
    387389     !!             *** function removepoints 
    388390     !! 
     391     !!   ** Purpose :: 
     392     !!              remove points which are common to 2 procs 
     393     !! 
     394     !! 
    389395     !---------------------------------------------------------------------------- 
    390396     !! * arguments 
     
    471477     !! ** Output: sec%transport: transport in the 2 direction and temperature,  
    472478     !!                       salinity, density meaned by the transport 
    473      !! ** History : 
    474      !!         original : 02/99 (Y Drillet) 
    475      !!         addition : 10/01 (Y Drillet, R Bourdalle Badie) 
    476      !!                  : 10/05 (M Laborie) F90 
    477      !!         addition : 04/07 (G Garric) Ice sections 
    478      !!         bugfix   : 04/07 (C Bricaud) test on sec%nb_point 
    479      !!                                      initialisation of ztransp1,ztransp2,... 
     479     !! 
     480     !! 
    480481     !!------------------------------------------------------------------- 
    481482     !! * Arguments 
     
    785786              sec%transport(3,jclass)=sec%transport(3,jclass)+zsum(3,jclass)/zsum(1,jclass) 
    786787              sec%transport(5,jclass)=sec%transport(5,jclass)+zsum(5,jclass)/zsum(1,jclass) 
    787               sec%transport(7,jclass)=sec%transport(7,jclass)+zsum(7,jclass)/zsum(1,jclass) 
    788               sec%transport(9,jclass)=sec%transport(9,jclass)+zsum(9,jclass)/zsum(1,jclass) 
     788!              sec%transport(7,jclass)=sec%transport(7,jclass)+zsum(7,jclass)/zsum(1,jclass) 
     789!              sec%transport(9,jclass)=sec%transport(9,jclass)+zsum(9,jclass)/zsum(1,jclass) 
     790              sec%transport(7,jclass)=sec%transport(7,jclass)+zsum(7,jclass) 
     791              sec%transport(9,jclass)=sec%transport(9,jclass)+zsum(9,jclass) 
    789792           ELSE 
    790793              sec%transport(3,jclass)=0. 
     
    796799              sec%transport( 4,jclass)=sec%transport( 4,jclass)+zsum( 4,jclass)/zsum(2,jclass) 
    797800              sec%transport( 6,jclass)=sec%transport( 6,jclass)+zsum( 6,jclass)/zsum(2,jclass) 
    798               sec%transport( 8,jclass)=sec%transport( 8,jclass)+zsum( 8,jclass)/zsum(2,jclass) 
    799               sec%transport(10,jclass)=sec%transport(10,jclass)+zsum(10,jclass)/zsum(2,jclass) 
     801!              sec%transport( 8,jclass)=sec%transport( 8,jclass)+zsum( 8,jclass)/zsum(2,jclass) 
     802!              sec%transport(10,jclass)=sec%transport(10,jclass)+zsum(10,jclass)/zsum(2,jclass) 
     803              sec%transport( 8,jclass)=sec%transport( 8,jclass)+zsum( 8,jclass) 
     804              sec%transport(10,jclass)=sec%transport(10,jclass)+zsum(10,jclass) 
    800805           ELSE 
    801806              sec%transport( 4,jclass)=0. 
     
    828833     !! Write transport output in numdct  
    829834     !!  
    830      !! Author: 10/05 Matthieu Laborie 
     835     !! Purpose: Write  transports in ascii files 
     836     !!  
     837     !! Method: 
     838     !!        1. Write volume transports in "volume_transport" 
     839     !!           Unit: Sv : Surface * Velocity / 1.e6  
     840     !!  
     841     !!        2. Write heat transports in "heat_transport" 
     842     !!           Unit: Peta W : Surface * Velocity * T * rhau * Cp / 1.e15 
     843     !!  
     844     !!        3. Write salt transports in "salt_transport" 
     845     !!           Unit: Mega m^3 / s : Surface * Velocity * S / 1.e6 
     846     !! 
    831847     !!-------------------------------------------------------------  
    832848     !!arguments 
     
    836852 
    837853     !!local declarations 
    838      REAL(wp) ,DIMENSION(2):: zsumclass 
     854     REAL(wp) ,DIMENSION(nb_type_class):: zsumclass 
    839855     INTEGER               :: jcl,ji        !Dummy loop 
    840 !     CHARACTER(len=35)     :: zcritere 
    841856     CHARACTER(len=2)      :: classe 
    842857     REAL(wp)              :: zbnd1,zbnd2 
     
    853868        zbnd1   = 0._wp 
    854869        zbnd2   = 0._wp 
    855         zsumclass(1)=zsumclass(1)+sec%transport(1,jcl) 
    856         zsumclass(2)=zsumclass(2)+sec%transport(2,jcl) 
     870        zsumclass(1:nb_type_class)=zsumclass(1:nb_type_class)+sec%transport(1:nb_type_class,jcl) 
    857871 
    858872    
     
    893907        ENDIF 
    894908                   
    895 !        ! Delate spaces and blank: 
    896 !        zcritere = ADJUSTL(zcritere) 
    897 !        ji = SCAN(TRIM(zcritere)," ") 
    898 !        DO WHILE( ji .NE. 0 ) 
    899 !           zcritere(ji:ji) = "_" 
    900 !           ji = SCAN(TRIM(zcritere)," ") 
    901 !        ENDDO    
    902  
    903909        !write volume transport per class 
    904910        WRITE(numdct_vol,118) ndastp,kt,jsec,sec%name,sec%slopeSection, & 
     
    909915        IF( sec%llstrpond )THEN 
    910916 
    911            !write heat transport per class 
     917           !write heat transport per class: 
    912918           WRITE(numdct_heat,119) ndastp,kt,jsec,sec%name,sec%slopeSection,  & 
    913919                              jcl,classe,zbnd1,zbnd2,& 
    914                               sec%transport(7,jcl)*rau0*rcp,sec%transport(8,jcl)* rau0*rcp, & 
    915                               ( sec%transport(7,jcl)+sec%transport(8,jcl) )*rau0*rcp 
     920                              !sec%transport(7,jcl)*rau0*rcp,sec%transport(8,jcl)* rau0*rcp, & 
     921                              !( sec%transport(7,jcl)+sec%transport(8,jcl) )*rau0*rcp 
     922                              sec%transport(7,jcl)*1000._wp*rcp/1.e15,sec%transport(8,jcl)*1000._wp*rcp/1.e15, & 
     923                              ( sec%transport(7,jcl)+sec%transport(8,jcl) )*1000._wp*rcp/1.e15 
    916924           !write salt transport per class 
    917925           WRITE(numdct_salt,119) ndastp,kt,jsec,sec%name,sec%slopeSection,  & 
    918926                              jcl,classe,zbnd1,zbnd2,& 
    919                               sec%transport(9,jcl)*rau0,sec%transport(10,jcl)*rau0,& 
    920                               (sec%transport(9,jcl)+sec%transport(10,jcl))*rau0 
     927                              !sec%transport(9,jcl)*rau0,sec%transport(10,jcl)*rau0,& 
     928                              !(sec%transport(9,jcl)+sec%transport(10,jcl))*rau0 
     929                              sec%transport(9,jcl)/1.e6,sec%transport(10,jcl)/1.e6,& 
     930                              (sec%transport(9,jcl)+sec%transport(10,jcl))/1.e6 
    921931        ENDIF 
    922932 
    923933     ENDDO 
    924934 
    925 !     zcritere = "total" 
    926935     zbnd1 = 0._wp 
    927936     zbnd2 = 0._wp 
     
    938947        WRITE(numdct_heat,119) ndastp,kt,jsec,sec%name,sec%slopeSection, & 
    939948                           jcl,"total",zbnd1,zbnd2,& 
    940                            zsumclass(7)* rau0*rcp,zsumclass(8)* rau0*rcp,(zsumclass(7)+zsumclass(8) )* rau0*rcp 
     949                           !zsumclass(7)* rau0*rcp,zsumclass(8)* rau0*rcp,(zsumclass(7)+zsumclass(8) )* rau0*rcp 
     950                           zsumclass(7)* 1000._wp*rcp/1.e15,zsumclass(8)* 1000._wp*rcp/1.e15,(zsumclass(7)+zsumclass(8) )* 1000._wp*rcp/1.e15 
    941951        !write total salt transport 
    942952        WRITE(numdct_salt,119) ndastp,kt,jsec,sec%name,sec%slopeSection, & 
    943953                           jcl,"total",zbnd1,zbnd2,& 
    944                            zsumclass(9)*rau0,zsumclass(10)*rau0,(zsumclass(9)+zsumclass(10))*rau0 
     954                           !zsumclass(9)*rau0,zsumclass(10)*rau0,(zsumclass(9)+zsumclass(10))*rau0 
     955                           zsumclass(9)/1.e6,zsumclass(10)/1.e6,(zsumclass(9)+zsumclass(10))/1.e6 
    945956     ENDIF 
    946957 
     
    959970     ENDIF 
    960971                                               
    961 !--------- 
    962 !117 format means: X bound1 bound2 
    963 !with X=T/S/D/Z for Temperature/Salinity/Density/Depth classes 
    964 !or   X=N if there is No class  
    965 !or   X=total/ice_surf/ice_vol 
    966972118 FORMAT(I8,1X,I8,1X,I4,1X,A30,1X,f9.2,1X,I4,3X,A8,1X,2F12.4,5X,3F12.4) 
    967973119 FORMAT(I8,1X,I8,1X,I4,1X,A30,1X,f9.2,1X,I4,3X,A8,1X,2F12.4,5X,3E15.6) 
    968 !--------- 
    969974 
    970975  END SUBROUTINE dia_dct_wri 
     
    973978  !!---------------------------------------------------------------------- 
    974979  !! 
     980  !!   Purpose: compute Temperature/Salinity/density on U-point or V-point 
    975981  !! 
    976   !! 
     982  !!    |    I       |    I+1     | 
     983  !!    |            |            | 
     984  !!  --------------------------------     1.Compute Tbis: 
     985  !!    |            |            |          interpolate T(I,J,K) et T(I,J,K+1) 
     986  !!    |            |            | 
     987  !!    |            |            |        2. 1.Compute Temp/Salt/Rho à U point:  
     988  !! K  |    T       |            |          interpolate Tbis et T(I+U,J,K+1)   
     989  !!    |            |            | 
     990  !!    |            |            | 
     991  !!    |            |            | 
     992  !!  -------------------------------- 
     993  !!    |            |            | 
     994  !!    |            |            | 
     995  !!    |            |            | 
     996  !!K+1 |    Tbis    U     T      | 
     997  !!    |            |            | 
     998  !!    |    T       |            | 
     999  !!    |            |------------| 
     1000  !!    |            | partials   | 
     1001  !!    |            |  steps     | 
     1002  !!  -------------------------------- 
    9771003  !! 
    9781004  !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.