- Timestamp:
- 2015-05-18T17:19:50+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r4990 r5282 38 38 INTEGER :: nn_write !: model standard output frequency 39 39 INTEGER :: nn_stock !: restart file frequency 40 LOGICAL :: ln_dimgnnn !: type of dimgout. (F): 1 file for all proc41 !: (T): 1 file per proc42 40 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 43 41 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file -
branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r5043 r5282 8 8 !! 3.0 ! 2007-07 (D. Storkey) Changes to iom_gettime 9 9 !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) add C1D case 10 !! 3.6 ! 2014-15 DIMG format removed 10 11 !!-------------------------------------------------------------------- 11 12 … … 23 24 USE lbclnk ! lateal boundary condition / mpp exchanges 24 25 USE iom_def ! iom variables definitions 25 USE iom_ioipsl ! NetCDF format with IOIPSL library26 26 USE iom_nf90 ! NetCDF format with native NetCDF library 27 USE iom_rstdimg ! restarts access direct format "dimg" style...28 27 USE in_out_manager ! I/O manager 29 28 USE lib_mpp ! MPP library … … 205 204 CHARACTER(LEN=256) :: clname ! the name of the file based on cdname [[+clcpu]+clcpu] 206 205 CHARACTER(LEN=256) :: cltmpn ! tempory name to store clname (in writting mode) 207 CHARACTER(LEN=10) :: clsuffix ! ".nc" or ".dimg"206 CHARACTER(LEN=10) :: clsuffix ! ".nc" 208 207 CHARACTER(LEN=15) :: clcpu ! the cpu number (max jpmax_digits digits) 209 208 CHARACTER(LEN=256) :: clinfo ! info character … … 268 267 ! which suffix should we use? 269 268 SELECT CASE (iolib) 270 CASE (jpioipsl ) ; clsuffix = '.nc'271 269 CASE (jpnf90 ) ; clsuffix = '.nc' 272 CASE (jprstdimg) ; clsuffix = '.dimg'273 270 CASE DEFAULT ; clsuffix = '' 274 CALL ctl_stop( TRIM(clinfo), 'accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )271 CALL ctl_stop( TRIM(clinfo), 'accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 275 272 END SELECT 276 273 ! Add the suffix if needed … … 285 282 IF( .NOT.llok ) THEN 286 283 ! we try to add the cpu number to the name 287 IF( iolib == jprstdimg ) THEN ; WRITE(clcpu,*) narea 288 ELSE ; WRITE(clcpu,*) narea-1 289 ENDIF 284 WRITE(clcpu,*) narea-1 285 290 286 clcpu = TRIM(ADJUSTL(clcpu)) 291 287 iln = INDEX(clname,TRIM(clsuffix), back = .TRUE.) … … 334 330 END SELECT 335 331 ENDIF 336 ! Open the NetCDF or RSTDIMGfile332 ! Open the NetCDF file 337 333 ! ============= 338 334 ! do we have some free file identifier? … … 358 354 IF( istop == nstop ) THEN ! no error within this routine 359 355 SELECT CASE (iolib) 360 CASE (jpioipsl ) ; CALL iom_ioipsl_open( clname, kiomid, llwrt, llok, idompar )361 356 CASE (jpnf90 ) ; CALL iom_nf90_open( clname, kiomid, llwrt, llok, idompar ) 362 CASE (jprstdimg) ; CALL iom_rstdimg_open( clname, kiomid, llwrt, llok, idompar )363 357 CASE DEFAULT 364 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )358 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 365 359 END SELECT 366 360 ENDIF … … 397 391 IF( iom_file(jf)%nfid > 0 ) THEN 398 392 SELECT CASE (iom_file(jf)%iolib) 399 CASE (jpioipsl ) ; CALL iom_ioipsl_close( jf )400 393 CASE (jpnf90 ) ; CALL iom_nf90_close( jf ) 401 CASE (jprstdimg) ; CALL iom_rstdimg_close( jf )402 394 CASE DEFAULT 403 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )395 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 404 396 END SELECT 405 397 iom_file(jf)%nfid = 0 ! free the id … … 456 448 IF( iiv <= jpmax_vars ) THEN 457 449 SELECT CASE (iom_file(kiomid)%iolib) 458 CASE (jpioipsl ) ; iom_varid = iom_ioipsl_varid( kiomid, cdvar, iiv, kdimsz )459 450 CASE (jpnf90 ) ; iom_varid = iom_nf90_varid ( kiomid, cdvar, iiv, kdimsz, kndims ) 460 CASE (jprstdimg) ; iom_varid = -1 ! all variables are listed in iom_file 461 CASE DEFAULT 462 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 451 CASE DEFAULT 452 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 463 453 END SELECT 464 454 ELSE … … 518 508 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 519 509 SELECT CASE (iom_file(kiomid)%iolib) 520 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, pvar, itime )521 510 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar, itime ) 522 CASE (jprstdimg) ; CALL iom_rstdimg_get( kiomid, idvar, pvar ) 523 CASE DEFAULT 524 CALL ctl_stop( 'iom_g0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 511 CASE DEFAULT 512 CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 525 513 END SELECT 526 514 ENDIF … … 785 773 786 774 SELECT CASE (iom_file(kiomid)%iolib) 787 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, &788 & pv_r1d, pv_r2d, pv_r3d )789 775 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, & 790 776 & pv_r1d, pv_r2d, pv_r3d ) 791 CASE (jprstdimg) ; CALL iom_rstdimg_get( kiomid, idom, idvar, ix1, ix2, iy1, iy2, & 792 & pv_r1d, pv_r2d, pv_r3d ) 793 CASE DEFAULT 794 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 777 CASE DEFAULT 778 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 795 779 END SELECT 796 780 … … 879 863 IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN 880 864 SELECT CASE (iom_file(kiomid)%iolib) 881 CASE (jpioipsl ) ; CALL iom_ioipsl_gettime( kiomid, idvar, ptime, cdunits, cdcalendar )882 865 CASE (jpnf90 ) ; CALL iom_nf90_gettime( kiomid, idvar, ptime, cdunits, cdcalendar ) 883 CASE (jprstdimg) ; CALL ctl_stop( TRIM(clinfo)//' case IO library == jprstdimg not coded...' ) 884 CASE DEFAULT 885 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 866 CASE DEFAULT 867 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 886 868 END SELECT 887 869 ELSE … … 914 896 IF( iom_file(kiomid)%nfid > 0 ) THEN 915 897 SELECT CASE (iom_file(kiomid)%iolib) 916 CASE (jpioipsl ) ; CALL ctl_stop('iom_getatt: only nf90 available')917 898 CASE (jpnf90 ) ; CALL iom_nf90_getatt( kiomid, cdatt, pvar ) 918 CASE (jprstdimg) ; CALL ctl_stop('iom_getatt: only nf90 available') 919 CASE DEFAULT 920 CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 899 CASE DEFAULT 900 CALL ctl_stop( 'iom_g0d_att: accepted IO library is only jpnf90' ) 921 901 END SELECT 922 902 ENDIF … … 940 920 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 941 921 SELECT CASE (iom_file(kiomid)%iolib) 942 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )943 922 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 944 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar ) 945 CASE DEFAULT 946 CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 923 CASE DEFAULT 924 CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 947 925 END SELECT 948 926 ENDIF … … 962 940 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 963 941 SELECT CASE (iom_file(kiomid)%iolib) 964 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )965 942 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 966 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar ) 967 CASE DEFAULT 968 CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 943 CASE DEFAULT 944 CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 969 945 END SELECT 970 946 ENDIF … … 984 960 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 985 961 SELECT CASE (iom_file(kiomid)%iolib) 986 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )987 962 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 988 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar ) 989 CASE DEFAULT 990 CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 963 CASE DEFAULT 964 CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 991 965 END SELECT 992 966 ENDIF … … 1006 980 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1007 981 SELECT CASE (iom_file(kiomid)%iolib) 1008 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )1009 982 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1010 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar ) 1011 CASE DEFAULT 1012 CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' ) 983 CASE DEFAULT 984 CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1013 985 END SELECT 1014 986 ENDIF … … 1417 1389 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1418 1390 DO WHILE ( idx /= 0 ) 1419 cldate = iom_sdate( fjulday - rdt tra(1)/ rday )1391 cldate = iom_sdate( fjulday - rdt / rday ) 1420 1392 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 1421 1393 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') … … 1424 1396 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 1425 1397 DO WHILE ( idx /= 0 ) 1426 cldate = iom_sdate( fjulday - rdt tra(1)/ rday, ldfull = .TRUE. )1398 cldate = iom_sdate( fjulday - rdt / rday, ldfull = .TRUE. ) 1427 1399 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 1428 1400 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') … … 1431 1403 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 1432 1404 DO WHILE ( idx /= 0 ) 1433 cldate = iom_sdate( fjulday + rdt tra(1)/ rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. )1405 cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 1434 1406 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 1435 1407 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') … … 1438 1410 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 1439 1411 DO WHILE ( idx /= 0 ) 1440 cldate = iom_sdate( fjulday + rdt tra(1)/ rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. )1412 cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 1441 1413 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 1442 1414 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') -
branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r4205 r5282 28 28 INTEGER, PARAMETER, PUBLIC :: jpdom_autodta = 9 !: 29 29 30 INTEGER, PARAMETER, PUBLIC :: jpioipsl = 100 !: Use ioipsl (fliocom only) library31 30 INTEGER, PARAMETER, PUBLIC :: jpnf90 = 101 !: Use nf90 library 32 INTEGER, PARAMETER, PUBLIC :: jprstdimg = 102 !: Use restart dimgs (fortran direct acces) library 33 #if defined key_dimgout 34 INTEGER, PARAMETER, PUBLIC :: jprstlib = jprstdimg !: restarts io library 35 #else 31 36 32 INTEGER, PARAMETER, PUBLIC :: jprstlib = jpnf90 !: restarts io library 37 #endif38 33 39 34 INTEGER, PARAMETER, PUBLIC :: jp_r8 = 200 !: write REAL(8) … … 54 49 CHARACTER(LEN=240) :: name !: name of the file 55 50 INTEGER :: nfid !: identifier of the file (0 if closed) 56 INTEGER :: iolib !: library used to read the file (jpioipsl, jpnf90 or jprstdimg) 51 INTEGER :: iolib !: library used to read the file (jpnf90 or new formats, 52 !: jpioipsl option has been removed) 57 53 INTEGER :: nvars !: number of identified varibles in the file 58 54 INTEGER :: iduld !: id of the unlimited dimension -
branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r4990 r5282 82 82 WRITE(numout,*) 83 83 SELECT CASE ( jprstlib ) 84 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ocean restart binary file: '//clname85 84 CASE DEFAULT ; WRITE(numout,*) ' open ocean restart NetCDF file: '//clname 86 85 END SELECT … … 110 109 !!---------------------------------------------------------------------- 111 110 112 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics time step 113 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) ) ! surface tracer time step 111 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics and tracer time step 114 112 115 113 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub ) ! before fields … … 165 163 SELECT CASE ( jprstlib ) 166 164 CASE ( jpnf90 ) ; WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 167 CASE ( jprstdimg ) ; WRITE(numout,*) 'rst_read : read oce binary restart file'168 165 END SELECT 169 166 IF ( snc4set%luse ) WRITE(numout,*) 'rst_read : configured with NetCDF4 support' … … 171 168 ENDIF 172 169 173 IF ( jprstlib == jprstdimg ) THEN174 ! eventually read netcdf file (monobloc) for restarting on different number of processors175 ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90176 INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok )177 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF178 ENDIF179 170 CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 180 171 ENDIF … … 189 180 !! ** Method : Read in restart.nc file fields which are necessary for restart 190 181 !!---------------------------------------------------------------------- 191 REAL(wp) :: zrdt , zrdttra1182 REAL(wp) :: zrdt 192 183 INTEGER :: jk 193 184 LOGICAL :: llok … … 201 192 IF( zrdt /= rdt ) neuler = 0 202 193 ENDIF 203 IF( iom_varid( numror, 'rdttra1', ldstop = .FALSE. ) > 0 ) THEN 204 CALL iom_get( numror, 'rdttra1', zrdttra1 ) 205 IF( zrdttra1 /= rdttra(1) ) neuler = 0 206 ENDIF 207 ! 194 ! 208 195 IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN 209 196 CALL iom_get( numror, jpdom_autoglo, 'ub' , ub ) ! before fields
Note: See TracChangeset
for help on using the changeset viewer.