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 1731 – NEMO

Changeset 1731


Ignore:
Timestamp:
2009-11-16T15:50:33+01:00 (14 years ago)
Author:
smasson
Message:

monthly and yearly output files, see ticket:597

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CONFIG/ORCA2_LIM/EXP00/iodef.xml

    r1725 r1731  
    277277      </group> 
    278278 
    279       <group id="1y" output_freq="0000"   output_level="10" enabled=".TRUE.">                      <!-- yearly files --> 
     279      <group id="2m" output_freq="-2"     output_level="10" enabled=".TRUE.">                      <!-- real 2m files --> 
     280      </group> 
     281 
     282      <group id="3m" output_freq="-3"     output_level="10" enabled=".TRUE.">                      <!-- real 3m files --> 
     283      </group> 
     284 
     285      <group id="4m" output_freq="-4"     output_level="10" enabled=".TRUE.">                      <!-- real 4m files --> 
     286      </group> 
     287 
     288      <group id="6m" output_freq="-6"     output_level="10" enabled=".TRUE.">                      <!-- real 6m files --> 
     289      </group> 
     290 
     291      <group id="1y" output_freq="-12"    output_level="10" enabled=".TRUE.">                      <!-- real yearly files --> 
    280292 
    281293   <file id="1y_grid_T" name="auto" description="ocean T grid variables" > 
     
    285297      </group> 
    286298 
    287       <group id="2y"  output_freq="0000"   output_level="10" enabled=".TRUE.">                     <!-- 2y files --> 
    288       </group> 
    289  
    290       <group id="5y"  output_freq="0000"   output_level="10" enabled=".TRUE.">                     <!-- 5y files --> 
    291       </group> 
    292  
    293       <group id="10y" output_freq="0000"   output_level="10" enabled=".TRUE.">                     <!-- 10y files --> 
     299      <group id="2y"  output_freq="-24"   output_level="10" enabled=".TRUE.">                      <!-- real 2y files --> 
     300      </group> 
     301 
     302      <group id="5y"  output_freq="-60"   output_level="10" enabled=".TRUE.">                      <!-- real 5y files --> 
     303      </group> 
     304 
     305      <group id="10y" output_freq="-120"  output_level="10" enabled=".TRUE.">                      <!-- real 10y files --> 
    294306      </group> 
    295307 
  • trunk/NEMO/OPA_SRC/DIA/dianam.F90

    r1725 r1731  
    4444      CHARACTER (len=*), INTENT(  out)           ::   cdfnam   ! file name 
    4545      CHARACTER (len=*), INTENT(in   )           ::   cdsuff   ! to be added at the end of the file name 
    46       INTEGER          , INTENT(in   )           ::   kfreq    ! output frequency. < 0 for monthly outputs; = 0 if no frequency 
     46      INTEGER          , INTENT(in   )           ::   kfreq    ! output frequency: > 0 in time-step (or seconds see ldfsec) 
     47      !                                                                            < 0 in months 
     48      !                                                                            = 0 no frequency 
    4749      LOGICAL          , INTENT(in   ), OPTIONAL ::   ldfsec   ! kfreq in second(in time-step) if .true.(.false. default) 
    4850      ! 
     
    5658      INTEGER            ::   indg                             ! number of digits needed to write a number      
    5759      INTEGER            ::   inbsec, inbmn, inbhr             ! output frequency in seconds, minutes and hours 
    58       INTEGER            ::   inbday, inbyr                    ! output frequency in days and years 
     60      INTEGER            ::   inbday, inbmo, inbyr             ! output frequency in days, months and years 
    5961      INTEGER            ::   iyyss, iddss, ihhss, immss       ! number of seconds in 1 year, 1 day, 1 hour and 1 minute 
     62      INTEGER            ::   iyymo                            ! number of months in 1 year 
    6063      REAL(wp)           ::   zsec1, zsec2                     ! not used 
    6164      REAL(wp)           ::   zdrun, zjul                      ! temporary scalars 
     
    6871      ENDIF 
    6972 
    70       IF( llfsec ) THEN   ;   inbsec = kfreq                                ! output frequency already in seconds 
    71       ELSE                ;   inbsec = kfreq * NINT( rdttra(1) )            ! from time-step to seconds 
     73      IF( llfsec .OR. kfreq < 0 ) THEN   ;   inbsec = kfreq                       ! output frequency already in seconds 
     74      ELSE                               ;   inbsec = kfreq * NINT( rdttra(1) )   ! from time-step to seconds 
    7275      ENDIF 
    73       iddss = NINT( rday          )                                         ! seconds in 1 day 
    74       ihhss = NINT( rmmss * rhhmm )                                         ! seconds in 1 hour 
    75       immss = NINT( rmmss         )                                         ! seconds in 1 minute 
     76      iddss = NINT( rday          )                                         ! number of seconds in 1 day 
     77      ihhss = NINT( rmmss * rhhmm )                                         ! number of seconds in 1 hour 
     78      immss = NINT( rmmss         )                                         ! number of seconds in 1 minute 
     79      iyymo = NINT( raamo         )                                         ! number of months  in 1 year 
    7680      iyyss = iddss * nyear_len(1)                                          ! seconds in 1 year (not good: multi years with leap) 
    7781      clfmt0 = "('(a,i',i1,',a)')"                                          ! format '(a,ix,a)' with x to be defined 
    7882      !  
    7983      IF(          inbsec == 0           ) THEN   ;   clave = ''            ! no frequency 
    80       ELSEIF(      inbsec <  0           ) THEN   ;   clave = '_1m'         ! frequency in month 
     84      ELSEIF(      inbsec <  0           ) THEN         
     85         inbmo = -inbsec                                                    ! frequency in month 
     86         IF( MOD( inbmo, iyymo  ) == 0 ) THEN                               ! frequency in years 
     87            inbyr  = inbmo / iyymo 
     88            indg   = INT(LOG10(REAL(inbyr,wp))) + 1                         ! number of digits needed to write years   frequency 
     89            WRITE(clfmt, clfmt0) indg             ;   WRITE(clave, clfmt) '_', inbyr , 'y' 
     90         ELSE                                                               ! frequency in month 
     91            indg   = INT(LOG10(REAL(inbmo,wp))) + 1                         ! number of digits needed to write months  frequency 
     92            WRITE(clfmt, clfmt0) indg             ;   WRITE(clave, clfmt) '_', inbmo, 'm' 
     93         ENDIF 
    8194      ELSEIF( MOD( inbsec, iyyss  ) == 0 ) THEN                             ! frequency in years 
    8295         inbyr  = inbsec / iyyss 
  • trunk/NEMO/OPA_SRC/IOM/iom.F90

    r1730 r1731  
    966966      CHARACTER(len=2)               ::   cl2                      ! 1 character 
    967967      INTEGER                        ::   idt                      ! time-step in seconds 
    968       INTEGER                        ::   iddss, ihhss, iyyss      ! number of seconds in 1 day, 1 hour and 1 year 
    969       INTEGER                        ::   ji, jj, jg, jh, jd, jy   ! loop counters 
     968      INTEGER                        ::   iddss, ihhss             ! number of seconds in 1 day, 1 hour and 1 year 
     969      INTEGER                        ::   iyymo                    ! number of months in 1 year 
     970      INTEGER                        ::   jg, jh, jd, jm, jy       ! loop counters 
    970971      INTEGER                        ::   ix, iy                   ! i-,j- index 
    971972      REAL(wp)        ,DIMENSION(11) ::   zlontao                  ! longitudes of tao    moorings 
     
    980981      iddss = NINT( rday          )                                         ! number of seconds in 1 day 
    981982      ihhss = NINT( rmmss * rhhmm )                                         ! number of seconds in 1 hour 
    982       iyyss = nyear_len(1) * iddss                                          ! number of seconds in 1 year 
     983      iyymo = NINT( raamo         )                                         ! number of months in 1 year 
    983984 
    984985      ! frequency of the call of iom_put (attribut: freq_op) 
    985986      CALL event__set_attribut( 'field_definition', attr( field__freq_op, idt           ) )    ! model time-step 
    986987      CALL event__set_attribut( 'SBC'             , attr( field__freq_op, idt * nn_fsbc ) )    ! SBC time-step 
    987       ! average frequency: directly specified in the xml file except for yearly mean (attribut: output_freq) 
    988       ! note that average frequency of -1 correspond to exact monthly mean (-> according to the calendar)  
    989       DO jy = 1, 10                                                                         ! 1, 2, 5, 10 years   
    990          IF( MOD(10,jy) == 0 ) THEN  
    991             WRITE(cl2,'(i1)') jy  
    992             CALL event__set_attribut( TRIM(ADJUSTL(cl2))//'y', attr( file__output_freq, jy * iyyss ) ) 
    993          ENDIF 
    994       END DO 
    995988       
    996989      ! output file names (attribut: name) 
     
    10091002            CALL event__set_attribut( cl1//'d_'//clsuff(jg), attr( file__name, TRIM(clname) ) ) 
    10101003         END DO 
    1011          CALL dia_nam( clname, -1, clsuff(jg) )                                                ! 1 month 
    1012          CALL event__set_attribut( '1m_'//clsuff(jg), attr( file__name, TRIM(clname) ) ) 
     1004         DO jm = 1, 6                                                                          ! 1, 2, 3, 4, 6 months 
     1005            IF( MOD(6,jm) == 0 ) THEN  
     1006               WRITE(cl1,'(i1)') jm  
     1007               CALL dia_nam( clname, -jm, clsuff(jg) ) 
     1008               CALL event__set_attribut( cl1//'m_'//clsuff(jg), attr( file__name, TRIM(clname) ) ) 
     1009            ENDIF 
     1010         END DO 
    10131011         DO jy = 1, 10                                                                         ! 1, 2, 5, 10 years   
    10141012            IF( MOD(10,jy) == 0 ) THEN  
    10151013               WRITE(cl2,'(i2)') jy  
    1016                CALL dia_nam( clname, jy * iyyss, clsuff(jg), ldfsec = .TRUE. ) 
     1014               CALL dia_nam( clname, -jy * iyymo, clsuff(jg) ) 
    10171015               CALL event__set_attribut( TRIM(ADJUSTL(cl2))//'y_'//clsuff(jg), attr( file__name, TRIM(clname) ) ) 
    10181016            ENDIF 
Note: See TracChangeset for help on using the changeset viewer.