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 4048 for branches/2013/dev_r3987_UKMO4_OBS/NEMOGCM/NEMO/OOO_SRC/off_data.F90 – NEMO

Ignore:
Timestamp:
2013-10-02T18:32:18+02:00 (11 years ago)
Author:
djlea
Message:

Cleaning and debugging of the observation operator. Turn off the night time averaging of SST data by default, but add a namelist option to switch it on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r3987_UKMO4_OBS/NEMOGCM/NEMO/OOO_SRC/off_data.F90

    r4030 r4048  
    33   IMPLICIT NONE 
    44   INTEGER, PARAMETER :: MaxNumFiles = 1000 
     5 
    56   !! Class 4 file settings 
    67   INTEGER :: & 
    7            &  cl4_fclen, &            !: number of forecast days 
    8            &  jimatch, &              !: current match 
    9            &  n_match                 !: number of matches 
     8           & cl4_fcst_idx(MaxNumFiles), & !: forecast indices 
     9           & cl4_match_len, &             !: number of match types 
     10           & cl4_fcst_len                 !: number of forecast days 
    1011   CHARACTER(len=lc) :: & 
    11            & cl4_vars(MaxNumFiles), & !: class 4 variables 
    12            & cl4_sys, &               !: class 4 system 
    13            & cl4_cfg, &               !: class 4 configuration 
    14            & cl4_date, &              !: class 4 date 
    15            & cl4_vn,  &               !: class 4 version 
    16            & cl4_prefix, &            !: class 4 prefix 
    17            & cl4_contact, &           !: class 4 contact 
    18            & cl4_inst                 !: class 4 institute 
    19    REAL ::   cl4_modjuld              !: model Julian day 
     12           & cl4_vars(MaxNumFiles), &  !: class 4 variables 
     13           & cl4_sys, &                !: class 4 system 
     14           & cl4_cfg, &                !: class 4 configuration 
     15           & cl4_date, &               !: class 4 date 
     16           & cl4_vn,  &                !: class 4 version 
     17           & cl4_prefix, &             !: class 4 prefix 
     18           & cl4_contact, &            !: class 4 contact 
     19           & cl4_inst                  !: class 4 institute 
     20   REAL ::   cl4_modjuld               !: model Julian day 
    2021   REAL :: & 
    21       & cl4_leadtime(MaxNumFiles)     !: Lead time data 
     22      & cl4_leadtime(MaxNumFiles)      !: Lead time data 
     23 
    2224   !! Offline obs_oper settings 
    2325   CHARACTER(len=lc) :: & 
    24       & model_files(MaxNumFiles)      !: model files 
     26      & off_files(MaxNumFiles)         !: model files 
    2527   INTEGER            :: & 
    26       & nn_modindex(MaxNumFiles), &   !: model file indices 
    27       & nn_forecast(MaxNumFiles)      !: forecast indices 
     28      & jifile, &                      !: current file list index 
     29      & n_files, &                     !: number of files 
     30      & jimatch, &                     !: current match 
     31      & nn_off_idx(MaxNumFiles), &     !: time_counter indices 
     32      & nn_off_freq                    !: read frequency in time steps 
    2833   CHARACTER(len=128) :: & 
    29       & alt_file                      !: altimeter file 
     34      & alt_file                       !: altimeter file 
    3035CONTAINS 
    3136   SUBROUTINE off_data_init( ld_cl4 ) 
     
    4449 
    4550      ! Standard offline obs_oper information 
    46       NAMELIST/namoff/model_files, nn_modindex, nn_forecast 
     51      NAMELIST/namoff/off_files, nn_off_idx, nn_off_freq 
    4752 
    4853      ! Class 4 file specifiers 
    4954      NAMELIST/namcl4/cl4_vars, cl4_sys, cl4_cfg, cl4_date, cl4_vn, & 
    5055         &            cl4_prefix, cl4_contact, cl4_inst, cl4_leadtime, & 
    51          &            cl4_fclen 
     56         &            cl4_fcst_idx, cl4_fcst_len, cl4_match_len 
    5257 
    5358      ! Standard offline obs_oper initialisation 
    54       jimatch = 0                   !: match iteration variable  
    55       n_match = 0                   !: number of matches to perform 
    56       model_files(:) = ''           !: list of files to read in 
    57       nn_modindex(:) = 0            !: list of indices inside each file 
     59      jimatch = 0                   !: match-up iteration variable  
     60      jifile = 1                    !: input file iteration variable  
     61      n_files = 0                   !: number of files to cycle through 
     62      off_files(:) = ''             !: list of files to read in 
     63      nn_off_idx(:) = 0             !: list of indices inside each file 
     64      nn_off_freq = -1              !: input frequency in time steps 
    5865 
    5966      ! Class 4 initialisation 
    6067      cl4_leadtime(:) = 0           !: Lead time axis value for each file 
    61       cl4_fclen = 0                 !: Length of the forecast dimension 
     68      cl4_fcst_len = 0              !: Length of the forecast dimension 
     69      cl4_match_len = 1             !: Number of match types 
     70      cl4_fcst_idx(:) = 0           !: output file forecast index 
    6271      cl4_vars(:) = ''              !: output file variable names 
    6372      cl4_sys = ''                  !: output file system 
     
    7786      ENDIF 
    7887 
    79       ! count forecast/persistence files 
     88      ! count input files 
    8089      lmask(:) = .FALSE. 
    81       WHERE (model_files(:) /= '') lmask(:) = .TRUE. 
    82       n_match = COUNT(lmask) 
     90      WHERE (off_files(:) /= '') lmask(:) = .TRUE. 
     91      n_files = COUNT(lmask) 
    8392 
     93      !! Initialise sub obs window frequency 
     94      IF (nn_off_freq == -1) THEN 
     95         !! Run length 
     96         nn_off_freq = nitend - nit000 + 1 
     97      ENDIF 
     98 
     99      !! Print summary of settings 
    84100      IF(lwp) THEN 
    85101         WRITE(numout,*) 
     
    87103         WRITE(numout,*) '~~~~~~~~~~~~~~~~~' 
    88104         WRITE(numout,*) '   Namelist namoff : set offline obs_oper parameters'  
    89          DO jf = 1, n_match 
     105         DO jf = 1, n_files 
    90106            WRITE(numout,'(1X,2A)') '   Input forecast file name          forecastfile = ', & 
    91                TRIM(model_files(jf)) 
     107               TRIM(off_files(jf)) 
    92108            WRITE(numout,*) '   Input forecast file index        forecastindex = ', & 
    93                nn_modindex(jf) 
    94             WRITE(numout,*) '   Input forecast leadtime index    leadtimeindex = ', & 
    95                nn_forecast(jf) 
    96             WRITE(numout,*) '   Input forecast leadtime value    leadtimevalue = ', & 
     109               nn_off_idx(jf) 
     110            WRITE(numout,*) '   Output forecast leadtime index   leadtimeindex = ', & 
     111               cl4_fcst_idx(jf) 
     112            WRITE(numout,*) '   Output forecast leadtime value   leadtimevalue = ', & 
    97113               cl4_leadtime(jf) 
    98114            WRITE(numout,'(1X,2A)') '   Input class 4 variable       class 4 parameter = ', & 
Note: See TracChangeset for help on using the changeset viewer.