Changeset 7646 for trunk/NEMOGCM/NEMO/SAO_SRC/sao_read.F90
- Timestamp:
- 2017-02-06T10:25:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/SAO_SRC/sao_read.F90
r5063 r7646 1 1 MODULE sao_read 2 !!================================================================== 3 !! *** MODULE sao_read***2 !!====================================================================== 3 !! *** MODULE sao_read *** 4 4 !! Read routines : I/O for Stand Alone Observation operator 5 !!================================================================== 5 !!====================================================================== 6 6 USE mppini 7 7 USE lib_mpp … … 12 12 USE dom_oce, ONLY: nlci, nlcj, nimpp, njmpp, tmask 13 13 USE par_oce, ONLY: jpi, jpj, jpk 14 ! 14 15 USE obs_fbm, ONLY: fbimdi, fbrmdi, fbsp, fbdp 15 16 USE sao_data … … 20 21 PUBLIC sao_rea_dri 21 22 23 !!---------------------------------------------------------------------- 24 !! NEMO/OPA 3.7 , NEMO Consortium (2015) 25 !! $Id: trazdf_imp.F90 6140 2015-12-21 11:35:23Z timgraham $ 26 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 27 !!---------------------------------------------------------------------- 22 28 CONTAINS 23 SUBROUTINE sao_rea_dri(kfile) 29 30 SUBROUTINE sao_rea_dri( kfile ) 24 31 !!------------------------------------------------------------------------ 25 32 !! *** sao_rea_dri *** … … 31 38 !! 32 39 !!------------------------------------------------------------------------ 33 INTEGER, INTENT(IN) :: & 34 & kfile !: File number 35 CHARACTER(len=lc) :: & 36 & cdfilename !: File name 37 INTEGER :: & 38 & kindex !: File index to read 39 40 cdfilename = TRIM(sao_files(kfile)) 40 INTEGER, INTENT(in) :: kfile ! File number 41 ! 42 CHARACTER(len=lc) :: cdfilename ! File name 43 INTEGER :: kindex ! File index to read 44 !!------------------------------------------------------------------------ 45 ! 46 cdfilename = TRIM( sao_files(kfile) ) 41 47 kindex = nn_sao_idx(kfile) 42 CALL sao_read_file( TRIM(cdfilename), kindex)43 48 CALL sao_read_file( TRIM( cdfilename ), kindex ) 49 ! 44 50 END SUBROUTINE sao_rea_dri 45 51 46 SUBROUTINE sao_read_file(filename, ifcst) 52 53 SUBROUTINE sao_read_file( filename, ifcst ) 47 54 !!------------------------------------------------------------------------ 48 !! *** sao_read_file***55 !! *** sao_read_file *** 49 56 !! 50 57 !! Purpose : To fill tn and sn with dailymean field from netcdf files … … 54 61 !! Author : A. Ryan Oct 2010 55 62 !!------------------------------------------------------------------------ 56 57 INTEGER, INTENT(IN) :: ifcst 58 CHARACTER(len=*), INTENT(IN) :: filename 59 INTEGER :: ncid, & 60 & varid,& 61 & istat,& 62 & ntimes,& 63 & tdim, & 64 & xdim, & 65 & ydim, & 66 & zdim 67 INTEGER :: ii, ij, ik 68 INTEGER, DIMENSION(4) :: start_n, & 69 & count_n 70 INTEGER, DIMENSION(3) :: start_s, & 71 & count_s 72 REAL(fbdp), DIMENSION(:,:,:),ALLOCATABLE :: temp_tn, & 73 & temp_sn 74 REAL(fbdp), DIMENSION(:,:), ALLOCATABLE :: temp_sshn 75 REAL(fbdp) :: fill_val 63 INTEGER, INTENT(in) :: ifcst 64 CHARACTER(len=*), INTENT(in) :: filename 65 INTEGER :: ncid, varid, istat, ntimes 66 INTEGER :: tdim, xdim, ydim, zdim 67 INTEGER :: ii, ij, ik 68 INTEGER, DIMENSION(4) :: start_n, count_n 69 INTEGER, DIMENSION(3) :: start_s, count_s 70 REAL(fbdp) :: fill_val 71 REAL(fbdp), DIMENSION(:,:,:), ALLOCATABLE :: temp_tn, temp_sn 72 REAL(fbdp), DIMENSION(:,:) , ALLOCATABLE :: temp_sshn 76 73 77 74 ! DEBUG 78 INTEGER :: istage 75 INTEGER :: istage 76 !!------------------------------------------------------------------------ 79 77 80 78 IF (TRIM(filename) == 'nofile') THEN 81 tsn (:,:,:,:) = fbrmdi82 sshn(:,:) = fbrmdi79 tsn (:,:,:,:) = fbrmdi 80 sshn(:,:) = fbrmdi 83 81 ELSE 84 82 WRITE(numout,*) "Opening :", TRIM(filename) … … 169 167 istat = nf90_close(ncid) 170 168 END IF 169 ! 171 170 END SUBROUTINE sao_read_file 171 172 !!------------------------------------------------------------------------ 172 173 END MODULE sao_read
Note: See TracChangeset
for help on using the changeset viewer.