Changeset 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/IOM
- Timestamp:
- 2010-12-27T18:33:53+01:00 (13 years ago)
- Location:
- trunk/NEMOGCM/NEMO/OPA_SRC/IOM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
- Property svn:eol-style deleted
r1770 r2528 9 9 !! 3.0 ! 2008-06 (G. Madec) add ctmp4 to ctmp10 10 10 !! 3.2 ! 2009-08 (S. MAsson) add new ctl_opn 11 !! 3.3 ! 2010-10 (A. Coward) add NetCDF4 usage 11 12 !!---------------------------------------------------------------------- 12 13 … … 16 17 !! getunit : give the index of an unused logical unit 17 18 !!---------------------------------------------------------------------- 18 USE par_ kind ! kind definition19 USE par_oce ! ocean parameter20 USE lib_print ! formated print library19 USE par_oce ! ocean parameter 20 USE lib_print ! formated print library 21 USE nc4interface ! NetCDF4 interface 21 22 22 23 IMPLICIT NONE … … 26 27 !! namrun namelist parameters 27 28 !!---------------------------------------------------------------------- 28 CHARACTER(l en=16):: cn_exp = "exp0" !: experiment name used for output filename29 CHARACTER(l en=32):: cn_ocerst_in = "restart" !: suffix of ocean restart name (input)30 CHARACTER(l en=32):: cn_ocerst_out = "restart" !: suffix of ocean restart name (output)31 LOGICAL 32 INTEGER 33 INTEGER 34 INTEGER 35 INTEGER 36 INTEGER 37 INTEGER 38 INTEGER 39 INTEGER 40 INTEGER 41 INTEGER 42 LOGICAL 29 CHARACTER(lc) :: cn_exp = "exp0" !: experiment name used for output filename 30 CHARACTER(lc) :: cn_ocerst_in = "restart" !: suffix of ocean restart name (input) 31 CHARACTER(lc) :: cn_ocerst_out = "restart" !: suffix of ocean restart name (output) 32 LOGICAL :: ln_rstart = .FALSE. !: start from (F) rest or (T) a restart file 33 INTEGER :: nn_no = 0 !: job number 34 INTEGER :: nn_rstctl = 0 !: control of the time step (0, 1 or 2) 35 INTEGER :: nn_rstssh = 0 !: hand made initilization of ssh or not (1/0) 36 INTEGER :: nn_it000 = 1 !: index of the first time step 37 INTEGER :: nn_itend = 10 !: index of the last time step 38 INTEGER :: nn_date0 = 961115 !: initial calendar date aammjj 39 INTEGER :: nn_leapy = 0 !: Leap year calendar flag (0/1 or 30) 40 INTEGER :: nn_istate = 0 !: initial state output flag (0/1) 41 INTEGER :: nn_write = 10 !: model standard output frequency 42 INTEGER :: nn_stock = 10 !: restart file frequency 43 LOGICAL :: ln_dimgnnn = .FALSE. !: type of dimgout. (F): 1 file for all proc 43 44 !: (T): 1 file per proc 44 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 45 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file 46 INTEGER :: nn_chunksz = 0 !: chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 45 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 46 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file 47 INTEGER :: nn_chunksz = 0 !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 48 #if defined key_netcdf4 49 !!---------------------------------------------------------------------- 50 !! namnc4 namelist parameters (key_netcdf4) 51 !!---------------------------------------------------------------------- 52 ! The following four values determine the partitioning of the output fields 53 ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is 54 ! for runtime optimisation. The individual netcdf4 chunks can be optionally 55 ! gzipped (recommended) leading to significant reductions in I/O volumes 56 ! !!!** variables only used with iom_nf90 routines and key_netcdf4 ** 57 INTEGER :: nn_nchunks_i = 1 !: number of chunks required in the i-dimension 58 INTEGER :: nn_nchunks_j = 1 !: number of chunks required in the j-dimension 59 INTEGER :: nn_nchunks_k = 1 !: number of chunks required in the k-dimension 60 INTEGER :: nn_nchunks_t = 1 !: number of chunks required in the t-dimension 61 LOGICAL :: ln_nc4zip = .TRUE. !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4 62 ! ! (F) ignore chunking request and use the netcdf4 library 63 ! ! to produce netcdf3-compatible files 64 #endif 65 !$AGRIF_DO_NOT_TREAT 66 TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) 67 !$AGRIF_END_DO_NOT_TREAT 68 47 69 48 70 !! conversion of DOCTOR norm namelist name into model name 49 71 !! (this should disappear in a near futur) 50 72 51 CHARACTER(l en=16):: cexper !: experiment name used for output filename52 INTEGER 53 INTEGER 54 INTEGER 55 INTEGER 56 INTEGER 57 INTEGER 58 INTEGER 59 INTEGER 60 INTEGER 73 CHARACTER(lc) :: cexper !: experiment name used for output filename 74 INTEGER :: no !: job number 75 INTEGER :: nrstdt !: control of the time step (0, 1 or 2) 76 INTEGER :: nit000 !: index of the first time step 77 INTEGER :: nitend !: index of the last time step 78 INTEGER :: ndate0 !: initial calendar date aammjj 79 INTEGER :: nleapy !: Leap year calendar flag (0/1 or 30) 80 INTEGER :: ninist !: initial state output flag (0/1) 81 INTEGER :: nwrite !: model standard output frequency 82 INTEGER :: nstock !: restart file frequency 61 83 62 84 !!---------------------------------------------------------------------- 63 85 !! was in restart but moved here because of the OFF line... better solution should be found... 64 86 !!---------------------------------------------------------------------- 65 INTEGER :: nitrst!: time step at which restart file should be written87 INTEGER :: nitrst !: time step at which restart file should be written 66 88 67 89 !!---------------------------------------------------------------------- 68 90 !! output monitoring 69 91 !!---------------------------------------------------------------------- 70 LOGICAL 71 INTEGER 72 INTEGER 73 INTEGER 74 INTEGER 75 INTEGER 76 INTEGER 77 INTEGER 78 INTEGER 79 INTEGER 80 81 ! !: OLD namelist names82 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench , nbit_cmp83 84 INTEGER 92 LOGICAL :: ln_ctl = .FALSE. !: run control for debugging 93 INTEGER :: nn_print = 0 !: level of print (0 no print) 94 INTEGER :: nn_ictls = 0 !: Start i indice for the SUM control 95 INTEGER :: nn_ictle = 0 !: End i indice for the SUM control 96 INTEGER :: nn_jctls = 0 !: Start j indice for the SUM control 97 INTEGER :: nn_jctle = 0 !: End j indice for the SUM control 98 INTEGER :: nn_isplt = 1 !: number of processors following i 99 INTEGER :: nn_jsplt = 1 !: number of processors following j 100 INTEGER :: nn_bench = 0 !: benchmark parameter (0/1) 101 INTEGER :: nn_bit_cmp = 0 !: bit reproducibility (0/1) 102 103 ! 104 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench !: OLD namelist names 105 106 INTEGER :: ijsplt = 1 !: nb of local domain = nb of processors 85 107 86 108 !!---------------------------------------------------------------------- 87 109 !! logical units 88 110 !!---------------------------------------------------------------------- 89 INTEGER 90 INTEGER 91 INTEGER 92 INTEGER 93 INTEGER 94 INTEGER 111 INTEGER :: numstp = -1 !: logical unit for time step 112 INTEGER :: numout = 6 !: logical unit for output print 113 INTEGER :: numnam = -1 !: logical unit for namelist 114 INTEGER :: numnam_ice = -1 !: logical unit for ice namelist 115 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution) 116 INTEGER :: numsol = -1 !: logical unit for solver statistics 95 117 96 118 !!---------------------------------------------------------------------- 97 119 !! Run control 98 120 !!---------------------------------------------------------------------- 99 INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) 100 INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) 101 CHARACTER(len=200) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3 102 CHARACTER(len=200) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6 103 CHARACTER(len=200) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 104 CHARACTER(len=200) :: ctmp10 !: temporary character 10 105 CHARACTER (len=64) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !: 106 CHARACTER (len=64) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: 107 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only 108 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 109 !!---------------------------------------------------------------------- 110 !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008) 121 INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) 122 INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) 123 CHARACTER(lc) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3 124 CHARACTER(lc) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6 125 CHARACTER(lc) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 126 CHARACTER(lc) :: ctmp10 !: temporary character 10 127 CHARACTER(lc) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !: 128 CHARACTER(lc) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: 129 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only 130 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 131 132 !!---------------------------------------------------------------------- 133 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 111 134 !! $Id$ 112 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 113 !!---------------------------------------------------------------------- 114 135 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 136 !!---------------------------------------------------------------------- 115 137 CONTAINS 116 138 … … 129 151 nstop = nstop + 1 130 152 IF(lwp) THEN 131 WRITE(numout, "(/,' ===>>> : E R R O R', /,' ===========',/)")153 WRITE(numout,cform_err) 132 154 IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 133 155 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 … … 163 185 nwarn = nwarn + 1 164 186 IF(lwp) THEN 165 WRITE(numout, "(/,' ===>>> : W A R N I N G', /,' ===============',/)")187 WRITE(numout,cform_war) 166 188 IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 167 189 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 … … 180 202 181 203 182 SUBROUTINE ctl_opn 204 SUBROUTINE ctl_opn( knum, cdfile, cdstat, cdform, cdacce, klengh, kout, ldwp, karea ) 183 205 !!---------------------------------------------------------------------- 184 206 !! *** ROUTINE ctl_opn *** … … 187 209 !! 188 210 !! ** Method : Fortan open 189 !! 190 !! History : 191 !! ! 1995-12 (G. Madec) Original code 192 !! 8.5 ! 2002-06 (G. Madec) F90: Free form and module 193 !!---------------------------------------------------------------------- 194 211 !!---------------------------------------------------------------------- 195 212 INTEGER , INTENT( out) :: knum ! logical unit to open 196 213 CHARACTER(len=*) , INTENT(in ) :: cdfile ! file name to open … … 205 222 CHARACTER(len=80) :: clfile 206 223 INTEGER :: iost 224 !!---------------------------------------------------------------------- 207 225 208 226 ! adapt filename -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
- Property svn:eol-style deleted
r2499 r2528 44 44 #endif 45 45 PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get, iom_gettime, iom_rstput, iom_put 46 PUBLIC iom_getatt 46 47 47 48 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d … … 54 55 INTERFACE iom_get 55 56 MODULE PROCEDURE iom_g0d, iom_g1d, iom_g2d, iom_g3d 57 END INTERFACE 58 INTERFACE iom_getatt 59 MODULE PROCEDURE iom_g0d_intatt 56 60 END INTERFACE 57 61 INTERFACE iom_rstput … … 68 72 69 73 !!---------------------------------------------------------------------- 70 !! OPA 9.0 , LOCEAN-IPSL (2006)74 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 71 75 !! $Id$ 72 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)76 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 73 77 !!---------------------------------------------------------------------- 74 78 … … 824 828 ! 825 829 END SUBROUTINE iom_gettime 830 831 832 !!---------------------------------------------------------------------- 833 !! INTERFACE iom_getatt 834 !!---------------------------------------------------------------------- 835 SUBROUTINE iom_g0d_intatt( kiomid, cdatt, pvar ) 836 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 837 CHARACTER(len=*), INTENT(in ) :: cdatt ! Name of the attribute 838 INTEGER , INTENT( out) :: pvar ! read field 839 ! 840 IF( kiomid > 0 ) THEN 841 IF( iom_file(kiomid)%nfid > 0 ) THEN 842 SELECT CASE (iom_file(kiomid)%iolib) 843 CASE (jpioipsl ) ; CALL ctl_stop('iom_getatt: only nf90 available') 844 CASE (jpnf90 ) ; CALL iom_nf90_getatt( kiomid, cdatt, pvar ) 845 CASE (jprstdimg) ; CALL ctl_stop('iom_getatt: only nf90 available') 846 CASE DEFAULT 847 CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 848 END SELECT 849 ENDIF 850 ENDIF 851 END SUBROUTINE iom_g0d_intatt 826 852 827 853 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
- Property svn:eol-style deleted
r1359 r2528 8 8 !!-------------------------------------------------------------------- 9 9 !!--------------------------------------------------------------------------------- 10 !! OPA 9.0 , LOCEAN-IPSL (2006)10 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 11 11 !! $Id$ 12 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)12 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 13 13 !!--------------------------------------------------------------------------------- 14 14 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
- Property svn:eol-style deleted
r2174 r2528 35 35 END INTERFACE 36 36 !!---------------------------------------------------------------------- 37 !! OPA 9.0 , LOCEAN-IPSL (2006)37 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 38 38 !! $Id$ 39 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 40 40 !!---------------------------------------------------------------------- 41 41 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
- Property svn:eol-style deleted
r2172 r2528 28 28 29 29 PUBLIC iom_nf90_open, iom_nf90_close, iom_nf90_varid, iom_nf90_get, iom_nf90_gettime, iom_nf90_rstput 30 PUBLIC iom_nf90_getatt 30 31 31 32 INTERFACE iom_nf90_get 32 33 MODULE PROCEDURE iom_nf90_g0d, iom_nf90_g123d 34 END INTERFACE 35 INTERFACE iom_nf90_getatt 36 MODULE PROCEDURE iom_nf90_intatt 33 37 END INTERFACE 34 38 INTERFACE iom_nf90_rstput 35 39 MODULE PROCEDURE iom_nf90_rp0123d 36 40 END INTERFACE 41 37 42 !!---------------------------------------------------------------------- 38 !! OPA 9.0 , LOCEAN-IPSL (2006)43 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 39 44 !! $Id$ 40 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)45 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 41 46 !!---------------------------------------------------------------------- 42 47 … … 63 68 INTEGER :: jl ! loop variable 64 69 INTEGER :: ichunk ! temporary storage of nn_chunksz 65 INTEGER :: imode ! creation mode flag: NF90_CLOBBER or NF90_NOCLOBBER 70 INTEGER :: imode ! creation mode flag: NF90_CLOBBER or NF90_NOCLOBBER or NF90_HDF5 71 INTEGER :: ihdf5 ! local variable for retrieval of value for NF90_HDF5 66 72 LOGICAL :: llclobber ! local definition of ln_clobber 67 73 !--------------------------------------------------------------------- … … 78 84 IF( ldwrt ) THEN ! ... in write mode 79 85 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in WRITE mode' 80 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE , if90id, chunksize = ichunk ), clinfo) 86 IF( snc4set%luse ) THEN 87 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE , if90id ), clinfo) 88 ELSE 89 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE , if90id, chunksize = ichunk ), clinfo) 90 ENDIF 81 91 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo) 82 92 ELSE ! ... in read mode … … 97 107 ELSE ; imode = IOR( NF90_64BIT_OFFSET, NF90_NOCLOBBER ) 98 108 ENDIF 99 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id, chunksize = ichunk ), clinfo) 109 IF( snc4set%luse ) THEN 110 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' creating file: '//TRIM(cdname)//' in hdf5 (netcdf4) mode' 111 CALL GET_NF90_SYMBOL("NF90_HDF5", ihdf5) 112 IF( llclobber ) THEN ; imode = IOR(ihdf5, NF90_CLOBBER) 113 ELSE ; imode = IOR(ihdf5, NF90_NOCLOBBER) 114 ENDIF 115 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id ), clinfo) 116 ELSE 117 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id, chunksize = ichunk ), clinfo) 118 ENDIF 100 119 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo) 101 120 ! define dimensions … … 288 307 289 308 309 SUBROUTINE iom_nf90_intatt( kiomid, cdatt, pvar ) 310 !!----------------------------------------------------------------------- 311 !! *** ROUTINE iom_nf90_intatt *** 312 !! 313 !! ** Purpose : read an integer attribute with NF90 314 !!----------------------------------------------------------------------- 315 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 316 CHARACTER(len=*), INTENT(in ) :: cdatt ! attribute name 317 INTEGER , INTENT( out) :: pvar ! read field 318 ! 319 INTEGER :: if90id ! temporary integer 320 LOGICAL :: llok ! temporary logical 321 CHARACTER(LEN=100) :: clinfo ! info character 322 !--------------------------------------------------------------------- 323 ! 324 if90id = iom_file(kiomid)%nfid 325 llok = NF90_Inquire_attribute(if90id, NF90_GLOBAL, cdatt) == nf90_noerr 326 IF( llok) THEN 327 clinfo = 'iom_nf90_getatt, file: '//TRIM(iom_file(kiomid)%name)//', att: '//TRIM(cdatt) 328 CALL iom_nf90_check(NF90_GET_ATT(if90id, NF90_GLOBAL, cdatt, values=pvar), clinfo) 329 ELSE 330 CALL ctl_warn('iom_nf90_getatt: no attribute '//cdatt//' found') 331 pvar = -999 332 ENDIF 333 ! 334 END SUBROUTINE iom_nf90_intatt 335 336 290 337 SUBROUTINE iom_nf90_gettime( kiomid, kvid, ptime, cdunits, cdcalendar ) 291 338 !!-------------------------------------------------------------------- … … 346 393 INTEGER :: idmy ! dummy variable 347 394 INTEGER :: itype ! variable type 395 INTEGER, DIMENSION(4) :: ichunksz ! NetCDF4 chunk sizes. Will be computed using 396 ! nn_nchunks_[i,j,k,t] namelist parameters 397 INTEGER :: ichunkalg, ishuffle,& 398 ideflate, ideflate_level 399 ! NetCDF4 internally fixed parameters 400 LOGICAL :: lchunk ! logical switch to activate chunking and compression 401 ! when appropriate (currently chunking is applied to 4d fields only) 348 402 !--------------------------------------------------------------------- 349 403 ! … … 376 430 ! =============== 377 431 IF( kvid <= 0 ) THEN 432 ! 433 ! NetCDF4 chunking and compression fixed settings 434 ichunkalg = 0 435 ishuffle = 1 436 ideflate = 1 437 ideflate_level = 1 438 ! 378 439 idvar = iom_file(kiomid)%nvars + 1 379 440 ! are we in define mode? … … 406 467 & iom_file(kiomid)%nvid(idvar) ), clinfo) 407 468 ENDIF 469 lchunk = .false. 470 IF( snc4set%luse .AND. idims.eq.4 ) lchunk = .true. 408 471 ! update informations structure related the new variable we want to add... 409 472 iom_file(kiomid)%nvars = idvar … … 417 480 DO jd = 1, idims 418 481 CALL iom_nf90_check(NF90_INQUIRE_DIMENSION( if90id, idimid(jd), len = iom_file(kiomid)%dimsz(jd,idvar) ), clinfo) 482 IF ( lchunk ) ichunksz(jd) = iom_file(kiomid)%dimsz(jd,idvar) 419 483 END DO 484 IF ( lchunk ) THEN 485 ! Calculate chunk sizes by partitioning each dimension as requested in namnc4 namelist 486 ! Disallow very small chunk sizes and prevent chunk sizes larger than each individual dimension 487 ichunksz(1) = MIN( ichunksz(1),MAX( (ichunksz(1)-1)/snc4set%ni + 1 ,16 ) ) ! Suggested default nc4set%ni=4 488 ichunksz(2) = MIN( ichunksz(2),MAX( (ichunksz(2)-1)/snc4set%nj + 1 ,16 ) ) ! Suggested default nc4set%nj=2 489 ichunksz(3) = MIN( ichunksz(3),MAX( (ichunksz(3)-1)/snc4set%nk + 1 , 1 ) ) ! Suggested default nc4set%nk=6 490 ichunksz(4) = 1 ! Do not allow chunks to span the 491 ! unlimited dimension 492 CALL iom_nf90_check(SET_NF90_DEF_VAR_CHUNKING(if90id, idvar, ichunkalg, ichunksz), clinfo) 493 CALL iom_nf90_check(SET_NF90_DEF_VAR_DEFLATE(if90id, idvar, ishuffle, ideflate, ideflate_level), clinfo) 494 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' chunked ok. Chunks sizes: ', ichunksz 495 ENDIF 420 496 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' defined ok' 421 497 ELSE … … 497 573 END SUBROUTINE iom_nf90_check 498 574 499 500 575 !!====================================================================== 501 576 END MODULE iom_nf90 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90
- Property svn:eol-style deleted
r1488 r2528 35 35 36 36 !!---------------------------------------------------------------------- 37 !! OPA 9.0 , LOCEAN-IPSL (2006)37 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 38 38 !! $Id$ 39 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 40 40 !!---------------------------------------------------------------------- 41 41 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
- Property svn:eol-style deleted
r2029 r2528 31 31 PUBLIC prt_ctl_init ! called by opa.F90 32 32 !!---------------------------------------------------------------------- 33 !! OPA 9.0 , LOCEAN-IPSL (2005)33 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 34 34 !! $Id$ 35 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt35 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- 37 37 -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
- Property svn:eol-style deleted
r1613 r2528 4 4 !! Ocean restart : write the ocean restart file 5 5 !!====================================================================== 6 !! History : ! 99-11 (M. Imbard) Original code 7 !! 8.5 ! 02-08 (G. Madec) F90: Free form 8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 9 !! 9.0 ! 06-07 (S. Masson) use IOM for restart 6 !! History : OPA ! 1999-11 (M. Imbard) Original code 7 !! NEMO 1.0 ! 2002-08 (G. Madec) F90: Free form 8 !! 2.0 ! 2006-07 (S. Masson) use IOM for restart 9 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) modified LF-RA 10 !! - - ! 2010-10 (C. Ethe, G. Madec) TRC-TRA merge (T-S in 4D) 10 11 !!---------------------------------------------------------------------- 11 12 … … 15 16 !! rst_read : read the ocean restart file 16 17 !!---------------------------------------------------------------------- 18 USE oce ! ocean dynamics and tracers 17 19 USE dom_oce ! ocean space and time domain 18 USE oce ! ocean dynamics and tracers19 20 USE phycst ! physical constants 20 21 USE in_out_manager ! I/O manager 21 22 USE iom ! I/O module 22 USE c1d ! re-initialization of u-v mask for the 1D configuration23 USE zpshde ! partial step: hor. derivative (zps_hde routine)24 23 USE eosbn2 ! equation of state (eos bn2 routine) 25 USE zdfddm ! double diffusion mixing26 USE zdfmxl ! mixed layer depth27 24 USE trdmld_oce ! ocean active mixed layer tracers trends variables 25 USE domvvl ! variable volume 26 USE traswp ! swap from 4D T-S to 3D T & S and vice versa 28 27 29 28 IMPLICIT NONE … … 34 33 PUBLIC rst_read ! routine called by opa module 35 34 36 LOGICAL, PUBLIC :: lrst_oce = .FALSE. 37 INTEGER, PUBLIC :: numror, numrow 35 LOGICAL, PUBLIC :: lrst_oce = .FALSE. !: logical to control the oce restart write 36 INTEGER, PUBLIC :: numror, numrow !: logical unit for cean restart (read and write) 38 37 39 38 !! * Substitutions 39 # include "domzgr_substitute.h90" 40 40 # include "vectopt_loop_substitute.h90" 41 41 !!---------------------------------------------------------------------- 42 !! OPA 9.0 , LOCEAN-IPSL (2006)42 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 43 43 !! $Id$ 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 45 !!---------------------------------------------------------------------- 46 44 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 45 !!---------------------------------------------------------------------- 47 46 CONTAINS 48 47 … … 88 87 CASE DEFAULT ; WRITE(numout,*) ' open ocean restart NetCDF file: '//clname 89 88 END SELECT 89 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 90 90 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 91 91 ELSE ; WRITE(numout,*) ' kt = ' , kt 92 92 ENDIF 93 93 ENDIF 94 94 ! 95 95 CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib ) 96 96 lrst_oce = .TRUE. … … 107 107 !! 108 108 !! ** Method : Write in numrow when kt == nitrst in NetCDF 109 !! file, save fields which are necessary for restart109 !! file, save fields which are necessary for restart 110 110 !!---------------------------------------------------------------------- 111 111 INTEGER, INTENT(in) :: kt ! ocean time-step 112 112 !!---------------------------------------------------------------------- 113 113 114 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics time step115 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) ) ! surface tracer time step116 117 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub) ! before fields118 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb)119 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tb)120 CALL iom_rstput( kt, nitrst, numrow, 'sb' , sb)121 CALL iom_rstput( kt, nitrst, numrow, 'rotb' , rotb)122 CALL iom_rstput( kt, nitrst, numrow, 'hdivb' , hdivb)123 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb)124 !125 CALL iom_rstput( kt, nitrst, numrow, 'un' , un ) ! now fields126 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vn )127 CALL iom_rstput( kt, nitrst, numrow, 'tn' , tn)128 CALL iom_rstput( kt, nitrst, numrow, 'sn' , sn)129 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn)130 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn)131 CALL iom_rstput( kt, nitrst, numrow, 'sshn' , sshn)132 133 CALL iom_rstput( kt, nitrst, numrow, 'rhop' , rhop)114 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics time step 115 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) ) ! surface tracer time step 116 117 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub ) ! before fields 118 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb ) 119 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tb ) 120 CALL iom_rstput( kt, nitrst, numrow, 'sb' , sb ) 121 CALL iom_rstput( kt, nitrst, numrow, 'rotb' , rotb ) 122 CALL iom_rstput( kt, nitrst, numrow, 'hdivb' , hdivb ) 123 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb ) 124 IF( lk_vvl ) CALL iom_rstput( kt, nitrst, numrow, 'fse3t_b', fse3t_b(:,:,:) ) 125 ! 126 CALL iom_rstput( kt, nitrst, numrow, 'un' , un ) ! now fields 127 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vn ) 128 CALL iom_rstput( kt, nitrst, numrow, 'tn' , tn ) 129 CALL iom_rstput( kt, nitrst, numrow, 'sn' , sn ) 130 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn ) 131 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn ) 132 CALL iom_rstput( kt, nitrst, numrow, 'sshn' , sshn ) 133 CALL iom_rstput( kt, nitrst, numrow, 'rhop' , rhop ) 134 134 #if defined key_zdfkpp 135 CALL iom_rstput( kt, nitrst, numrow, 'rhd' , rhd)135 CALL iom_rstput( kt, nitrst, numrow, 'rhd' , rhd ) 136 136 #endif 137 138 137 IF( kt == nitrst ) THEN 139 138 CALL iom_close( numrow ) ! close the restart file (only at last time step) … … 153 152 !!---------------------------------------------------------------------- 154 153 REAL(wp) :: zrdt, zrdttra1 155 INTEGER :: j libalt = jprstlib154 INTEGER :: jk, jlibalt = jprstlib 156 155 LOGICAL :: llok 157 156 !!---------------------------------------------------------------------- … … 163 162 CASE ( jprstdimg ) ; WRITE(numout,*) 'rst_read : read oce binary restart file' 164 163 END SELECT 164 IF ( snc4set%luse ) WRITE(numout,*) 'rst_read : configured with NetCDF4 support' 165 165 WRITE(numout,*) '~~~~~~~~' 166 166 ENDIF … … 184 184 ENDIF 185 185 ! 186 CALL iom_get( numror, jpdom_autoglo, 'ub' , ub )! before fields187 CALL iom_get( numror, jpdom_autoglo, 'vb' , vb)188 CALL iom_get( numror, jpdom_autoglo, 'tb' , tb)189 CALL iom_get( numror, jpdom_autoglo, 'sb' , sb)190 CALL iom_get( numror, jpdom_autoglo, 'rotb' , rotb)191 CALL iom_get( numror, jpdom_autoglo, 'hdivb', hdivb)192 CALL iom_get( numror, jpdom_autoglo, 'sshb' , sshb)193 !194 CALL iom_get( numror, jpdom_autoglo, 'un' , un ) ! now fields195 CALL iom_get( numror, jpdom_autoglo, 'vn' , vn )196 CALL iom_get( numror, jpdom_autoglo, 'tn' , tn)197 CALL iom_get( numror, jpdom_autoglo, 'sn' , sn)198 CALL iom_get( numror, jpdom_autoglo, 'rotn' , rotn)199 CALL iom_get( numror, jpdom_autoglo, 'hdivn', hdivn)200 CALL iom_get( numror, jpdom_autoglo, 'sshn' , sshn)201 202 CALL iom_get( numror, jpdom_autoglo, 'rhop' , rhop )! now potential density186 CALL iom_get( numror, jpdom_autoglo, 'ub' , ub ) ! before fields 187 CALL iom_get( numror, jpdom_autoglo, 'vb' , vb ) 188 CALL iom_get( numror, jpdom_autoglo, 'tb' , tb ) 189 CALL iom_get( numror, jpdom_autoglo, 'sb' , sb ) 190 CALL iom_get( numror, jpdom_autoglo, 'rotb' , rotb ) 191 CALL iom_get( numror, jpdom_autoglo, 'hdivb' , hdivb ) 192 CALL iom_get( numror, jpdom_autoglo, 'sshb' , sshb ) 193 IF( lk_vvl ) CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) ) 194 ! 195 CALL iom_get( numror, jpdom_autoglo, 'un' , un ) ! now fields 196 CALL iom_get( numror, jpdom_autoglo, 'vn' , vn ) 197 CALL iom_get( numror, jpdom_autoglo, 'tn' , tn ) 198 CALL iom_get( numror, jpdom_autoglo, 'sn' , sn ) 199 CALL iom_get( numror, jpdom_autoglo, 'rotn' , rotn ) 200 CALL iom_get( numror, jpdom_autoglo, 'hdivn' , hdivn ) 201 CALL iom_get( numror, jpdom_autoglo, 'sshn' , sshn ) 202 CALL iom_get( numror, jpdom_autoglo, 'rhop' , rhop ) ! now potential density 203 203 #if defined key_zdfkpp 204 204 IF( iom_varid( numror, 'rhd', ldstop = .FALSE. ) > 0 ) THEN 205 CALL iom_get( numror, jpdom_autoglo, 'rhd' , rhd )! now in situ density anomaly205 CALL iom_get( numror, jpdom_autoglo, 'rhd' , rhd ) ! now in situ density anomaly 206 206 ELSE 207 CALL eos( tn, sn, rhd ) ! compute rhd 207 CALL tra_swap 208 CALL eos( tsn, rhd ) ! compute rhd 208 209 ENDIF 209 210 #endif 210 211 ! 211 212 IF( neuler == 0 ) THEN ! Euler restart (neuler=0) 212 213 tb (:,:,:) = tn (:,:,:) ! all before fields set to now values … … 217 218 hdivb(:,:,:) = hdivn(:,:,:) 218 219 sshb (:,:) = sshn (:,:) 220 IF( lk_vvl ) THEN 221 DO jk = 1, jpk 222 fse3t_b(:,:,jk) = fse3t_n(:,:,jk) 223 END DO 224 ENDIF 219 225 ENDIF 220 226 !
Note: See TracChangeset
for help on using the changeset viewer.