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.
sao_data.F90 in trunk/NEMOGCM/NEMO/SAO_SRC – NEMO

source: trunk/NEMOGCM/NEMO/SAO_SRC/sao_data.F90 @ 8809

Last change on this file since 8809 was 7646, checked in by timgraham, 7 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

File size: 3.7 KB
RevLine 
[4849]1MODULE sao_data
[7646]2   !!======================================================================
3   !!                       ***  MODULE sao_data  ***
4   !!======================================================================
5   !! History :  3.6  ! 2015-12  (A. Ryan)  Original code
6   !!----------------------------------------------------------------------
[4030]7   USE par_kind, ONLY: lc
[4844]8   USE lib_mpp         ! distributed memory computing
[7646]9   USE in_out_manager
[4110]10
[4030]11   IMPLICIT NONE
[4110]12
[4030]13   INTEGER, PARAMETER :: MaxNumFiles = 1000
[4048]14
[4846]15   !! Stand Alone Observation operator settings
[7646]16   CHARACTER(len=lc) ::   sao_files(MaxNumFiles)   !: model files
17   INTEGER           ::   n_files                  !: number of files
18   INTEGER           :: nn_sao_idx(MaxNumFiles)    !: time_counter indices
19   INTEGER           :: nn_sao_freq                !: read frequency in time steps
20   
21   !!----------------------------------------------------------------------
22   !! NEMO/OPA 3.7 , NEMO Consortium (2015)
23   !! $Id: trazdf_imp.F90 6140 2015-12-21 11:35:23Z timgraham $
24   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
25   !!----------------------------------------------------------------------
[4030]26CONTAINS
[7646]27
[5063]28   SUBROUTINE sao_data_init()
[4030]29      !!----------------------------------------------------------------------
[4849]30      !!                    ***  SUBROUTINE sao_data_init ***
[4030]31      !!
32      !! ** Purpose : To read namelists and initialise offline_oper run.
33      !!
34      !!----------------------------------------------------------------------
[7646]35      INTEGER ::   jf                   ! file dummy loop index
36      LOGICAL ::   lmask(MaxNumFiles)   ! Logical mask used for counting
37      INTEGER ::   ios
38      !!
[4846]39      NAMELIST/namsao/sao_files, nn_sao_idx, nn_sao_freq
[7646]40      !!----------------------------------------------------------------------
[4030]41
42      ! Standard offline obs_oper initialisation
[7646]43      n_files = 0                   ! number of files to cycle through
44      sao_files(:) = ''             ! list of files to read in
45      nn_sao_idx(:) = 0             ! list of indices inside each file
46      nn_sao_freq = -1              ! input frequency in time steps
[4030]47
48      ! Standard offline obs_oper settings
[4844]49      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark
[4846]50      READ  ( numnam_ref, namsao, IOSTAT = ios, ERR = 901 )
51901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsao in reference namelist', .TRUE. )
[7646]52      !
[4844]53      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints & Benchmark
[4846]54      READ  ( numnam_cfg, namsao, IOSTAT = ios, ERR = 902 )
55902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsao in configuration namelist', .TRUE. )
[7646]56     
57      lmask(:) = .FALSE.               ! count input files
[4846]58      WHERE (sao_files(:) /= '') lmask(:) = .TRUE.
[4048]59      n_files = COUNT(lmask)
[7646]60      !
61      IF(nn_sao_freq == -1) THEN      ! Initialise sub obs window frequency
62         nn_sao_freq = nitend - nit000 + 1      ! Run length
[4048]63      ENDIF
[7646]64      !
65      IF(lwp) THEN                     ! Print summary of settings
[4030]66         WRITE(numout,*)
67         WRITE(numout,*) 'offline obs_oper : Initialization'
68         WRITE(numout,*) '~~~~~~~~~~~~~~~~~'
[5063]69         WRITE(numout,*) '   Namelist namsao : set stand alone obs_oper parameters'
[4048]70         DO jf = 1, n_files
[7646]71            WRITE(numout,'(1X,2A)') '   Input forecast file name          forecastfile = ', TRIM(sao_files(jf))
72            WRITE(numout,*) '   Input forecast file index        forecastindex = ', nn_sao_idx(jf)
[4030]73         END DO
74      END IF
[7646]75      !
[4849]76   END SUBROUTINE sao_data_init
[4030]77
[7646]78   !!======================================================================
[4849]79END MODULE sao_data
[4030]80
Note: See TracBrowser for help on using the repository browser.