Changeset 544
- Timestamp:
- 2006-10-20T16:23:21+02:00 (18 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 5 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/LIM_SRC/limrst.F90
r508 r544 32 32 PUBLIC lim_rst_read ! routine called by ??? module 33 33 34 LOGICAL, PUBLIC :: lrst_ice !: logical to control the oce restart write34 LOGICAL, PUBLIC :: lrst_ice !: logical to control the ice restart write 35 35 INTEGER, PUBLIC :: numrir, numriw !: logical unit for ice restart (read and write) 36 36 … … 43 43 CONTAINS 44 44 45 # if ( defined key_mpp_mpi || defined key_mpp_shmem ) && defined key_dimgout46 !!----------------------------------------------------------------------47 !! 'key_mpp_mpi' OR 'key_mpp_shmem' MPP computing48 !! 'key_dimgout' : Direct access file (DIMG format)49 !!----------------------------------------------------------------------50 # include "limrst_dimg.h90"51 52 # else53 !!----------------------------------------------------------------------54 !! Default option NetCDF file55 !!----------------------------------------------------------------------56 57 45 SUBROUTINE lim_rst_opn( kt ) 58 46 !!---------------------------------------------------------------------- … … 69 57 IF( kt == nit000 ) lrst_ice = .FALSE. 70 58 71 IF ( kt == nitrst - 2*nfice + 1 .AND. lrst_ice ) THEN 72 CALL ctl_stop( 'lim_rst_opn: ice restart frequency must be larger than nfice' ) 73 numriw = 0 74 ELSEIF( kt == nitrst - 2*nfice + 1 .OR. nitend - nit000 +1 < 2*nfice ) THEN 75 ! beware if model runs less than 2*nfice time step 59 IF( kt == nitrst - 2*nfice + 1 .OR. nitend - nit000 + 1 <= nfice ) THEN 60 ! beware if model runs less than nfice + 1 time step 76 61 ! beware of the format used to write kt (default is i8.8, that should be large enough) 77 62 IF( nitrst > 1.0e9 ) THEN … … 84 69 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_ice" 85 70 IF(lwp) WRITE(numout,*) ' open ice restart.output NetCDF file: '//clname 86 CALL iom_open( clname, numriw, ldwrt = .TRUE. )71 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstdimg ) 87 72 lrst_ice = .TRUE. 88 73 ENDIF … … 191 176 ENDIF 192 177 193 CALL iom_open ( 'restart_ice_in', numrir )178 CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstdimg ) 194 179 195 180 CALL iom_get( numrir, 'nfice' , zfice ) … … 265 250 END SUBROUTINE lim_rst_read 266 251 267 # endif268 269 252 #else 270 253 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DOM/domwri.F90
r526 r544 14 14 USE dom_oce ! ocean space and time domain 15 15 USE in_out_manager 16 USE iom 16 17 17 18 IMPLICIT NONE … … 27 28 28 29 CONTAINS 29 30 #if ( defined key_mpp_mpi || defined key_mpp_shmem ) && defined key_dimgout31 !!----------------------------------------------------------------------32 !! 'key_mpp_mpi' OR33 !! 'key_mpp_shmem'34 !! 'key_dimgout' : each processor makes its own direct access file35 !! use build_nc_meshmask off line to retrieve36 !! a ioipsl compliant meshmask file37 !!----------------------------------------------------------------------38 # include "domwri_dimg.h90"39 40 #else41 !!----------------------------------------------------------------------42 !! Default option : NetCDF file43 !!----------------------------------------------------------------------44 30 45 31 SUBROUTINE dom_wri … … 71 57 !! 9.0 ! 02-08 (G. Madec) F90 and several file 72 58 !!---------------------------------------------------------------------- 73 !! * Modules used 74 USE ioipsl 75 76 !! * Local declarations 77 INTEGER :: & !!! * temprary units for : 78 inum0 , & ! 'mesh_mask.nc' file 79 inum1 , & ! 'mesh.nc' file 80 inum2 , & ! 'mask.nc' file 81 inum3 , & ! 'mesh_hgr.nc' file 82 inum4 ! 'mesh_zgr.nc' file 83 INTEGER :: itime ! output from restini ??? 84 REAL(wp) :: zdate0 85 REAL(wp), DIMENSION(jpi,jpj) :: & 86 zprt ! temporary array for bathymetry 87 88 CHARACTER (len=21) :: & 89 clnam0 , & ! filename (mesh and mask informations) 90 clnam1 , & ! filename (mesh informations) 91 clnam2 , & ! filename (mask informations) 92 clnam3 , & ! filename (horizontal mesh informations) 93 clnam4 ! filename (vertical mesh informations) 59 INTEGER :: inum0 ! temprary units for 'mesh_mask.nc' file 60 INTEGER :: inum1 ! temprary units for 'mesh.nc' file 61 INTEGER :: inum2 ! temprary units for 'mask.nc' file 62 INTEGER :: inum3 ! temprary units for 'mesh_hgr.nc' file 63 INTEGER :: inum4 ! temprary units for 'mesh_zgr.nc' file 64 REAL(wp), DIMENSION(jpi,jpj) :: zprt ! temporary array for bathymetry 65 CHARACTER (len=21) :: clnam0 ! filename (mesh and mask informations) 66 CHARACTER (len=21) :: clnam1 ! filename (mesh informations) 67 CHARACTER (len=21) :: clnam2 ! filename (mask informations) 68 CHARACTER (len=21) :: clnam3 ! filename (horizontal mesh informations) 69 CHARACTER (len=21) :: clnam4 ! filename (vertical mesh informations) 94 70 !!---------------------------------------------------------------------- 95 71 … … 103 79 clnam3 = 'mesh_hgr' ! filename (horizontal mesh informations) 104 80 clnam4 = 'mesh_zgr' ! filename (vertical mesh informations) 105 106 #if defined key_agrif107 IF ( .NOT. Agrif_Root() ) THEN108 clnam0 = TRIM(Agrif_CFixed())//'_'//TRIM(clnam0)109 clnam1 = TRIM(Agrif_CFixed())//'_'//TRIM(clnam1)110 clnam2 = TRIM(Agrif_CFixed())//'_'//TRIM(clnam2)111 clnam3 = TRIM(Agrif_CFixed())//'_'//TRIM(clnam3)112 clnam4 = TRIM(Agrif_CFixed())//'_'//TRIM(clnam4)113 ENDIF114 #endif115 116 CALL ymds2ju( 0, 1, 1, 0.e0, zdate0 ) ! calendar initialization117 81 118 82 ! note that mbathy has been modified in dommsk or in solver. … … 127 91 CASE ( 1 ) ! create 'mesh_mask.nc' file 128 92 ! ! ============================ 129 130 93 IF(lwp) WRITE(numout,*) ' one file in "mesh_mask.nc" ' 131 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mesh_mask.nc' file 132 & jpk , gdept_0 , trim(clnam0) , & ! in unit inum0 133 & itime , zdate0, rdt , inum0 , domain_id=nidom ) 94 CALL iom_open( TRIM(clnam0), inum0, ldwrt = .TRUE., kiolib = jprstdimg ) 134 95 inum2 = inum0 ! put all the informations 135 96 inum3 = inum0 ! in unit inum0 … … 140 101 ! ! 'mask.nc' files 141 102 ! ! ============================ 142 143 103 IF(lwp) WRITE(numout,*) ' two files in "mesh.nc" and "mask.nc" ' 144 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mesh.nc' file 145 & jpk , gdept_0 , trim(clnam1) , & ! in unit inum1 146 & itime , zdate0, rdt , inum1, domain_id=nidom ) 147 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mask.nc' file 148 & jpk , gdept_0 , trim(clnam2) , & ! in unit inum2 149 & itime , zdate0, rdt , inum2, domain_id=nidom ) 104 CALL iom_open( TRIM(clnam1), inum1, ldwrt = .TRUE., kiolib = jprstdimg ) 105 CALL iom_open( TRIM(clnam2), inum2, ldwrt = .TRUE., kiolib = jprstdimg ) 150 106 inum3 = inum1 ! put mesh informations 151 107 inum4 = inum1 ! in unit inum1 152 153 108 ! ! ============================ 154 109 CASE ( 3 ) ! create 'mesh_hgr.nc' … … 156 111 ! ! 'mask.nc' files 157 112 ! ! ============================ 158 159 113 IF(lwp) WRITE(numout,*) ' three files in "mesh_hgr.nc" , mesh_zgr.nc" and "mask.nc" ' 160 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mesh_hgr.nc' file 161 & jpk , gdept_0 , trim(clnam3) , & ! in unit inum3 162 & itime , zdate0, rdt , inum3, domain_id=nidom ) 163 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mesh_zgr.nc' file 164 & jpk , gdept_0 , trim(clnam4) , & ! in unit inum4 165 & itime , zdate0, rdt , inum4, domain_id=nidom ) 166 CALL restini( 'NONE', jpi , jpj , glamt, gphit, & ! create 'mask.nc' file 167 & jpk , gdept_0 , trim(clnam2) , & ! in unit inum2 168 & itime , zdate0, rdt , inum2, domain_id=nidom ) 114 CALL iom_open( TRIM(clnam2), inum2, ldwrt = .TRUE., kiolib = jprstdimg ) 115 CALL iom_open( TRIM(clnam3), inum3, ldwrt = .TRUE., kiolib = jprstdimg ) 116 CALL iom_open( TRIM(clnam4), inum4, ldwrt = .TRUE., kiolib = jprstdimg ) 169 117 170 118 END SELECT 171 119 172 120 ! ! masks (inum2) 173 CALL restput( inum2, 'tmask', jpi, jpj, jpk, 0, tmask)174 CALL restput( inum2, 'umask', jpi, jpj, jpk, 0, umask)175 CALL restput( inum2, 'vmask', jpi, jpj, jpk, 0, vmask)176 CALL restput( inum2, 'fmask', jpi, jpj, jpk, 0, fmask)121 CALL iom_rstput( 0, 0, inum2, 'tmask', tmask, ktype = jp_i1 ) 122 CALL iom_rstput( 0, 0, inum2, 'umask', umask, ktype = jp_i1 ) 123 CALL iom_rstput( 0, 0, inum2, 'vmask', vmask, ktype = jp_i1 ) 124 CALL iom_rstput( 0, 0, inum2, 'fmask', fmask, ktype = jp_i1 ) 177 125 178 126 ! ! horizontal mesh (inum3) 179 CALL restput( inum3, 'glamt', jpi, jpj, 1, 0, glamt) ! ! latitude180 CALL restput( inum3, 'glamu', jpi, jpj, 1, 0, glamu)181 CALL restput( inum3, 'glamv', jpi, jpj, 1, 0, glamv)182 CALL restput( inum3, 'glamf', jpi, jpj, 1, 0, glamf)183 184 CALL restput( inum3, 'gphit', jpi, jpj, 1, 0, gphit) ! ! longitude185 CALL restput( inum3, 'gphiu', jpi, jpj, 1, 0, gphiu)186 CALL restput( inum3, 'gphiv', jpi, jpj, 1, 0, gphiv)187 CALL restput( inum3, 'gphif', jpi, jpj, 1, 0, gphif)188 189 CALL restput( inum3, 'e1t', jpi, jpj, 1, 0, e1t) ! ! e1 scale factors190 CALL restput( inum3, 'e1u', jpi, jpj, 1, 0, e1u)191 CALL restput( inum3, 'e1v', jpi, jpj, 1, 0, e1v)192 CALL restput( inum3, 'e1f', jpi, jpj, 1, 0, e1f)193 194 CALL restput( inum3, 'e2t', jpi, jpj, 1, 0, e2t) ! ! e2 scale factors195 CALL restput( inum3, 'e2u', jpi, jpj, 1, 0, e2u)196 CALL restput( inum3, 'e2v', jpi, jpj, 1, 0, e2v)197 CALL restput( inum3, 'e2f', jpi, jpj, 1, 0, e2f)198 199 CALL restput( inum3, 'ff', jpi, jpj, 1, 0, ff) ! ! coriolis factor200 201 CALL restput( inum4, 'mbathy', jpi, jpj, 1, 0, zprt)127 CALL iom_rstput( 0, 0, inum3, 'glamt', glamt, ktype = jp_r4 ) ! ! latitude 128 CALL iom_rstput( 0, 0, inum3, 'glamu', glamu, ktype = jp_r4 ) 129 CALL iom_rstput( 0, 0, inum3, 'glamv', glamv, ktype = jp_r4 ) 130 CALL iom_rstput( 0, 0, inum3, 'glamf', glamf, ktype = jp_r4 ) 131 132 CALL iom_rstput( 0, 0, inum3, 'gphit', gphit, ktype = jp_r4 ) ! ! longitude 133 CALL iom_rstput( 0, 0, inum3, 'gphiu', gphiu, ktype = jp_r4 ) 134 CALL iom_rstput( 0, 0, inum3, 'gphiv', gphiv, ktype = jp_r4 ) 135 CALL iom_rstput( 0, 0, inum3, 'gphif', gphif, ktype = jp_r4 ) 136 137 CALL iom_rstput( 0, 0, inum3, 'e1t', e1t, ktype = jp_r8 ) ! ! e1 scale factors 138 CALL iom_rstput( 0, 0, inum3, 'e1u', e1u, ktype = jp_r8 ) 139 CALL iom_rstput( 0, 0, inum3, 'e1v', e1v, ktype = jp_r8 ) 140 CALL iom_rstput( 0, 0, inum3, 'e1f', e1f, ktype = jp_r8 ) 141 142 CALL iom_rstput( 0, 0, inum3, 'e2t', e2t, ktype = jp_r8 ) ! ! e2 scale factors 143 CALL iom_rstput( 0, 0, inum3, 'e2u', e2u, ktype = jp_r8 ) 144 CALL iom_rstput( 0, 0, inum3, 'e2v', e2v, ktype = jp_r8 ) 145 CALL iom_rstput( 0, 0, inum3, 'e2f', e2f, ktype = jp_r8 ) 146 147 CALL iom_rstput( 0, 0, inum3, 'ff', ff, ktype = jp_r8 ) ! ! coriolis factor 148 149 CALL iom_rstput( 0, 0, inum4, 'mbathy', zprt, ktype = jp_i2 ) 202 150 203 151 #if ! defined key_zco 204 152 IF( ln_sco ) THEN ! s-coordinate 205 CALL restput( inum4, 'hbatt', jpi, jpj, 1, 0, hbatt ) ! ! depth206 CALL restput( inum4, 'hbatu', jpi, jpj, 1, 0, hbatu )207 CALL restput( inum4, 'hbatv', jpi, jpj, 1, 0, hbatv )208 CALL restput( inum4, 'hbatf', jpi, jpj, 1, 0, hbatf )153 CALL iom_rstput( 0, 0, inum4, 'hbatt', hbatt ) ! ! depth 154 CALL iom_rstput( 0, 0, inum4, 'hbatu', hbatu ) 155 CALL iom_rstput( 0, 0, inum4, 'hbatv', hbatv ) 156 CALL iom_rstput( 0, 0, inum4, 'hbatf', hbatf ) 209 157 210 CALL restput( inum4, 'gsigt', 1, 1, jpk, 0, gsigt ) ! ! scaling coef.211 CALL restput( inum4, 'gsigw', 1, 1, jpk, 0, gsigw )212 CALL restput( inum4, 'gsi3w', 1, 1, jpk, 0, gsi3w )213 CALL restput( inum4, 'esigt', 1, 1, jpk, 0, esigt )214 CALL restput( inum4, 'esigw', 1, 1, jpk, 0, esigw )215 216 CALL restput( inum4, 'e3t', jpi, jpj, jpk, 0, e3t ) ! ! scale factors217 CALL restput( inum4, 'e3u', jpi, jpj, jpk, 0, e3u )218 CALL restput( inum4, 'e3v', jpi, jpj, jpk, 0, e3v )219 CALL restput( inum4, 'e3w', jpi, jpj, jpk, 0, e3w )220 221 CALL restput( inum4, 'gdept_0' , 1, 1, jpk, 0, gdept_0 ) ! ! stretched system222 CALL restput( inum4, 'gdepw_0' , 1, 1, jpk, 0, gdepw_0 )158 CALL iom_rstput( 0, 0, inum4, 'gsigt', gsigt ) ! ! scaling coef. 159 CALL iom_rstput( 0, 0, inum4, 'gsigw', gsigw ) 160 CALL iom_rstput( 0, 0, inum4, 'gsi3w', gsi3w ) 161 CALL iom_rstput( 0, 0, inum4, 'esigt', esigt ) 162 CALL iom_rstput( 0, 0, inum4, 'esigw', esigw ) 163 164 CALL iom_rstput( 0, 0, inum4, 'e3t', e3t ) ! ! scale factors 165 CALL iom_rstput( 0, 0, inum4, 'e3u', e3u ) 166 CALL iom_rstput( 0, 0, inum4, 'e3v', e3v ) 167 CALL iom_rstput( 0, 0, inum4, 'e3w', e3w ) 168 169 CALL iom_rstput( 0, 0, inum4, 'gdept_0' , gdept_0 ) ! ! stretched system 170 CALL iom_rstput( 0, 0, inum4, 'gdepw_0' , gdepw_0 ) 223 171 ENDIF 224 172 225 173 IF( ln_zps ) THEN ! z-coordinate - partial steps 226 CALL restput( inum4, 'hdept' , jpi, jpj, 1, 0, hdept ) ! ! depth227 CALL restput( inum4, 'hdepw' , jpi, jpj, 1, 0, hdepw )228 229 CALL restput( inum4, 'e3t' , jpi, jpj, jpk, 0, e3t ) ! ! scale factors230 CALL restput( inum4, 'e3u' , jpi, jpj, jpk, 0, e3u )231 CALL restput( inum4, 'e3v' , jpi, jpj, jpk, 0, e3v )232 CALL restput( inum4, 'e3w' , jpi, jpj, jpk, 0, e3w )233 234 CALL restput( inum4, 'gdept_0', 1, 1, jpk, 0, gdept_0 ) ! ! reference z-coord.235 CALL restput( inum4, 'gdepw_0', 1, 1, jpk, 0, gdepw_0 )236 CALL restput( inum4, 'e3t_0' , 1, 1, jpk, 0, e3t_0 )237 CALL restput( inum4, 'e3w_0' , 1, 1, jpk, 0, e3w_0 )174 CALL iom_rstput( 0, 0, inum4, 'hdept' , hdept ) ! ! depth 175 CALL iom_rstput( 0, 0, inum4, 'hdepw' , hdepw ) 176 177 CALL iom_rstput( 0, 0, inum4, 'e3t' , e3t ) ! ! scale factors 178 CALL iom_rstput( 0, 0, inum4, 'e3u' , e3u ) 179 CALL iom_rstput( 0, 0, inum4, 'e3v' , e3v ) 180 CALL iom_rstput( 0, 0, inum4, 'e3w' , e3w ) 181 182 CALL iom_rstput( 0, 0, inum4, 'gdept_0', gdept_0 ) ! ! reference z-coord. 183 CALL iom_rstput( 0, 0, inum4, 'gdepw_0', gdepw_0 ) 184 CALL iom_rstput( 0, 0, inum4, 'e3t_0' , e3t_0 ) 185 CALL iom_rstput( 0, 0, inum4, 'e3w_0' , e3w_0 ) 238 186 ENDIF 239 187 … … 242 190 IF( ln_zco ) THEN 243 191 ! ! z-coordinate - full steps 244 CALL restput( inum4, 'gdept_0', 1, 1, jpk, 0, gdept_0 ) ! ! depth245 CALL restput( inum4, 'gdepw_0', 1, 1, jpk, 0, gdepw_0 )246 CALL restput( inum4, 'e3t_0' , 1, 1, jpk, 0, e3t_0 ) ! ! scale factors247 CALL restput( inum4, 'e3w_0' , 1, 1, jpk, 0, e3w_0 )192 CALL iom_rstput( 0, 0, inum4, 'gdept_0', gdept_0 ) ! ! depth 193 CALL iom_rstput( 0, 0, inum4, 'gdepw_0', gdepw_0 ) 194 CALL iom_rstput( 0, 0, inum4, 'e3t_0' , e3t_0 ) ! ! scale factors 195 CALL iom_rstput( 0, 0, inum4, 'e3w_0' , e3w_0 ) 248 196 ENDIF 249 250 197 ! ! ============================ 251 198 ! ! close the files … … 253 200 SELECT CASE ( nmsh ) 254 201 CASE ( 1 ) 255 CALL restclo( inum0 )202 CALL iom_close( inum0 ) 256 203 CASE ( 2 ) 257 CALL restclo( inum1 )258 CALL restclo( inum2 )204 CALL iom_close( inum1 ) 205 CALL iom_close( inum2 ) 259 206 CASE ( 3 ) 260 CALL restclo( inum2 )261 CALL restclo( inum3 )262 CALL restclo( inum4 )207 CALL iom_close( inum2 ) 208 CALL iom_close( inum3 ) 209 CALL iom_close( inum4 ) 263 210 END SELECT 264 211 265 212 END SUBROUTINE dom_wri 266 267 #endif268 213 269 214 !!====================================================================== -
trunk/NEMO/OPA_SRC/istate.F90
r508 r544 36 36 USE in_out_manager ! I/O manager 37 37 USE iom 38 USE ini1d ! re-initialization of u-v mask for the 1D configuration 39 USE zpshde ! partial step: hor. derivative (zps_hde routine) 40 USE eosbn2 ! equation of state (eos bn2 routine) 38 41 39 42 IMPLICIT NONE … … 59 62 !! ** Purpose : Initialization of the dynamics and tracer fields. 60 63 !!---------------------------------------------------------------------- 64 USE eosbn2 ! eq. of state, Brunt Vaisala frequency (eos routine) 61 65 62 66 IF(lwp) WRITE(numout,*) … … 113 117 ENDIF 114 118 119 CALL eos( tb, sb, rhd, rhop ) ! before potential and in situ densities 120 121 IF( ln_zps .AND. .NOT. lk_cfg_1d ) & 122 & CALL zps_hde( nit000, tb, sb, rhd, & ! Partial steps: before Horizontal DErivative 123 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 124 & gtv, gsv, grv ) 125 115 126 ENDIF 127 128 116 129 ! ! Vertical velocity 117 130 ! ! ----------------- … … 430 443 !! p=integral [ rau*g dz ] 431 444 !!---------------------------------------------------------------------- 432 USE eosbn2 ! eq. of state, Brunt Vaisala frequency (eos routine)433 445 USE dynspg ! surface pressure gradient (dyn_spg routine) 434 446 USE divcur ! hor. divergence & rel. vorticity (div_cur routine) -
trunk/NEMO/OPA_SRC/oce.F90
r467 r544 21 21 !! --------------------------- 22 22 LOGICAL, PUBLIC :: ln_dynhpg_imp = .FALSE. !: semi-implicite hpg flag 23 INTEGER, PUBLIC :: nn_dynhpg_rst = 0 !: add dynhpg implicit variables in restart ot not 23 24 24 25 !! dynamics and tracer fields -
trunk/NEMO/OPA_SRC/opa.F90
r532 r544 349 349 !! * Local declarations 350 350 351 NAMELIST/namflg/ ln_dynhpg_imp 351 NAMELIST/namflg/ ln_dynhpg_imp, nn_dynhpg_rst 352 352 !!---------------------------------------------------------------------- 353 353 … … 449 449 WRITE(numout,*) ' centered (F) or semi-implicit (T) ln_dynhpg_imp = ', ln_dynhpg_imp 450 450 WRITE(numout,*) ' hydrostatic pressure gradient' 451 ENDIF 451 WRITE(numout,*) ' add dynhpg implicit variable nn_dynhpg_rst = ', nn_dynhpg_rst 452 WRITE(numout,*) ' in restart ot not nn_dynhpg_rst' 453 ENDIF 454 IF( .NOT. ln_dynhpg_imp ) nn_dynhpg_rst = 0 ! force no adding dynhpg implicit variables in restart 452 455 453 456 END SUBROUTINE opa_flg -
trunk/NEMO/OPA_SRC/restart.F90
r521 r544 25 25 USE iom ! I/O module 26 26 USE trdmld_oce ! ! ocean active mixed layer tracers trends variables 27 USE ini1d ! re-initialization of u-v mask for the 1D configuration 28 USE zpshde ! partial step: hor. derivative (zps_hde routine) 29 USE eosbn2 ! equation of state (eos bn2 routine) 27 30 28 31 IMPLICIT NONE … … 82 85 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart" 83 86 IF(lwp) WRITE(numout,*) ' open ocean restart.output NetCDF file: '//clname 84 CALL iom_open( clname, numrow, ldwrt = .TRUE. )87 CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstdimg ) 85 88 IF( lk_trdmld ) THEN 86 89 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_mld" 87 90 IF(lwp) WRITE(numout,*) ' open ocean restart_mld NetCDF file: '//clname 88 CALL iom_open( clname, nummldw, ldwrt = .TRUE. )91 CALL iom_open( clname, nummldw, ldwrt = .TRUE., kiolib = jprstdimg ) 89 92 ENDIF 90 93 lrst_oce = .TRUE. … … 93 96 END SUBROUTINE rst_opn 94 97 95 96 #if ( defined key_mpp_mpi || defined key_mpp_shmem ) && defined key_dimgout97 !!----------------------------------------------------------------------98 !! 'key_mpp_mpi' OR MPI massively parallel processing library99 !! 'key_mpp_shmem' SHMEM massively parallel processing library100 !! AND101 !! 'key_dimgout'102 !!----------------------------------------------------------------------103 !! direct acces file one per processor104 !! (merging/splitting is done off-line, eventually)105 !!-----------------------------------------------------------------------106 # include "restart_dimg.h90"107 108 #else109 !!----------------------------------------------------------------------110 !! Default option NetCDF file111 !!----------------------------------------------------------------------112 98 113 99 SUBROUTINE rst_write( kt ) … … 128 114 WRITE(numout,*) '~~~~~~~~~' 129 115 ENDIF 130 116 131 117 ! calendar control 132 118 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) ) ! time-step 133 119 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) ) ! date 134 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj) ! number of elapsed days since120 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj ) ! number of elapsed days since 135 121 ! ! the begining of the run [s] 122 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics time step 123 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) ) ! surface tracer time step 136 124 137 125 ! prognostic variables … … 148 136 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn ) 149 137 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn ) 150 151 # 138 139 #if defined key_ice_lim 152 140 CALL iom_rstput( kt, nitrst, numrow, 'nfice' , REAL( nfice, wp) ) ! ice computation frequency 153 141 CALL iom_rstput( kt, nitrst, numrow, 'sst_io' , sst_io ) … … 155 143 CALL iom_rstput( kt, nitrst, numrow, 'u_io' , u_io ) 156 144 CALL iom_rstput( kt, nitrst, numrow, 'v_io' , v_io ) 157 # 145 # if defined key_coupled 158 146 CALL iom_rstput( kt, nitrst, numrow, 'alb_ice', alb_ice ) 159 # endif160 147 # endif 161 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 148 #endif 149 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 162 150 CALL iom_rstput( kt, nitrst, numrow, 'nfbulk' , REAL( nfbulk, wp) ) ! bulk computation frequency 163 151 CALL iom_rstput( kt, nitrst, numrow, 'gsst' , gsst ) 164 # endif 152 #endif 153 154 IF( nn_dynhpg_rst == 1 ) THEN 155 CALL iom_rstput( kt, nitrst, numrow, 'rhd' , rhd ) 156 CALL iom_rstput( kt, nitrst, numrow, 'rhop', rhop ) 157 IF( ln_zps ) THEN 158 CALL iom_rstput( kt, nitrst, numrow, 'gtu' , gtu ) 159 CALL iom_rstput( kt, nitrst, numrow, 'gsu' , gsu ) 160 CALL iom_rstput( kt, nitrst, numrow, 'gru' , gru ) 161 CALL iom_rstput( kt, nitrst, numrow, 'gtv' , gtv ) 162 CALL iom_rstput( kt, nitrst, numrow, 'gsv' , gsv ) 163 CALL iom_rstput( kt, nitrst, numrow, 'grv' , grv ) 164 ENDIF 165 ENDIF 165 166 166 167 IF( kt == nitrst ) THEN … … 201 202 !! has been stored in the restart file. 202 203 !!---------------------------------------------------------------------- 203 REAL(wp) :: zcoef, zkt, z ndastp, znfice, znfbulk204 # 204 REAL(wp) :: zcoef, zkt, zrdt, zrdttra1, zndastp, znfice, znfbulk 205 #if defined key_ice_lim 205 206 INTEGER :: ji, jj 206 # 207 #endif 207 208 !!---------------------------------------------------------------------- 208 209 … … 214 215 WRITE(numout,*) ' *** Info on the present job : ' 215 216 WRITE(numout,*) ' time-step : ', nit000 216 !!$ WRITE(numout,*) ' solver type : ', nsolv217 !!$ IF( lk_zdftke ) THEN218 !!$ WRITE(numout,*) ' tke option : 1 '219 !!$ ELSE220 !!$ WRITE(numout,*) ' tke option : 0 '221 !!$ ENDIF222 217 WRITE(numout,*) ' date ndastp : ', ndastp 223 218 WRITE(numout,*) … … 237 232 ENDIF 238 233 239 CALL iom_open( 'restart', numror )! Open234 CALL iom_open( 'restart', numror, kiolib = jprstdimg ) ! Open 240 235 241 236 ! Calendar informations 242 CALL iom_get( numror, 'kt' , zkt ) ! time-step 243 CALL iom_get( numror, 'ndastp', zndastp ) ! date 244 ! Additional contol prints 237 CALL iom_get( numror, 'kt' , zkt ) ! time-step 238 CALL iom_get( numror, 'ndastp' , zndastp ) ! date 245 239 IF(lwp) THEN 246 240 WRITE(numout,*) 247 241 WRITE(numout,*) ' *** Info on the restart file read : ' 248 242 WRITE(numout,*) ' time-step : ', NINT( zkt ) 249 !!$ WRITE(numout,*) ' solver type : ', +++250 !!$ WRITE(numout,*) ' tke option : ', +++251 243 WRITE(numout,*) ' date ndastp : ', NINT( zndastp ) 252 244 WRITE(numout,*) … … 259 251 adatrj0 = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 260 252 IF ( nrstdt == 2 ) THEN 261 !by default ndatsp has been set to ndate0 in dom_nam262 !ndate0 has been read in the namelist (standard OPA 8)263 !here when nrstdt=2 we keep the final date of previous run253 ! by default ndatsp has been set to ndate0 in dom_nam 254 ! ndate0 has been read in the namelist (standard OPA 8) 255 ! here when nrstdt=2 we keep the final date of previous run 264 256 ndastp = NINT( zndastp ) 265 CALL iom_get( numror, 'adatrj', adatrj ) ! number of elapsed days since the begining of last run 266 ENDIF 267 257 CALL iom_get( numror, 'adatrj', adatrj ) ! number of elapsed days since the begining of last run 258 ENDIF 259 ! Check dynamics and tracer time-step consistency and force Euler restart if changed 260 IF( iom_varid( numror, 'rdt' ) > 0 ) THEN 261 CALL iom_get( numror, 'rdt', zrdt ) 262 IF( zrdt /= rdt ) neuler = 0 263 ENDIF 264 IF( iom_varid( numror, 'rdttra1' ) > 0 ) THEN 265 CALL iom_get( numror, 'rdttra1', zrdttra1 ) 266 IF( zrdttra1 /= rdttra(1) ) neuler = 0 267 ENDIF 268 ! 268 269 ! ! Read prognostic variables 269 270 CALL iom_get( numror, jpdom_local, 'ub' , ub ) ! before i-component velocity … … 292 293 !!sm: TO BE MOVED IN NEW SURFACE MODULE... 293 294 294 # 295 #if defined key_ice_lim 295 296 ! Louvain La Neuve Sea Ice Model 296 297 IF( iom_varid( numror, 'nfice' ) > 0 ) then … … 300 301 CALL iom_get( numror, jpdom_local, 'u_io' , u_io ) 301 302 CALL iom_get( numror, jpdom_local, 'v_io' , v_io ) 302 # if defined key_coupled303 # if defined key_coupled 303 304 CALL iom_get( numror, jpdom_local, 'alb_ice', alb_ice ) 304 # endif305 # endif 305 306 IF( znfice /= REAL( nfice, wp ) ) THEN ! if nfice changed between 2 runs 306 307 zcoef = REAL( nfice-1, wp ) / znfice … … 324 325 END DO 325 326 END DO 326 # 327 # if defined key_coupled 327 328 alb_ice(:,:) = 0.8 * tmask(:,:,1) 328 # endif329 ENDIF330 329 # endif 331 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 330 ENDIF 331 #endif 332 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 332 333 ! Louvain La Neuve Sea Ice Model 333 334 IF( iom_varid( numror, 'nfbulk' ) > 0 ) THEN … … 344 345 gsst(:,:) = REAL( nfbulk - 1, wp )*( tn(:,:,1) + rt0 ) 345 346 ENDIF 346 # 347 #endif 347 348 348 349 !!sm: end of TO BE MOVED IN NEW SURFACE MODULE... 350 351 IF( iom_varid( numror, 'rhd' ) > 0 ) THEN 352 CALL iom_get( numror, jpdom_local, 'rhd' , rhd ) 353 CALL iom_get( numror, jpdom_local, 'rhop', rhop ) 354 ELSE 355 CALL eos( tb, sb, rhd, rhop ) ! before potential and in situ densities 356 ENDIF 357 IF( ln_zps .AND. .NOT. lk_cfg_1d ) THEN 358 IF( iom_varid( numror, 'gtu' ) > 0 ) THEN 359 CALL iom_get( numror, jpdom_local, 'gtu' , gtu ) 360 CALL iom_get( numror, jpdom_local, 'gsu' , gsu ) 361 CALL iom_get( numror, jpdom_local, 'gru' , gru ) 362 CALL iom_get( numror, jpdom_local, 'gtv' , gtv ) 363 CALL iom_get( numror, jpdom_local, 'gsv' , gsv ) 364 CALL iom_get( numror, jpdom_local, 'grv' , grv ) 365 ELSE 366 CALL zps_hde( nit000, tb , sb , rhd, & ! Partial steps: before Horizontal DErivative 367 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 368 & gtv, gsv, grv ) 369 ENDIF 370 ENDIF 349 371 ! 350 372 END SUBROUTINE rst_read 351 373 352 #endif353 374 354 375 !!===================================================================== -
trunk/UTIL/fait_AA_make
r510 r544 253 253 echo 'TMP = ../../../tmp' 254 254 echo '#-Q- sxnec # Compiler options for NEMO (IDRIS SX5-NEC) ' 255 echo '#-Q- sxnec F_O = -dw -Wf\"-A idbl4\" -sx5 -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce '255 echo '#-Q- sxnec F_O = -dw -Wf\"-A idbl4\" -sx5 -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 256 256 echo '#-Q- sxnec F_F = $(F_O)' 257 257 echo '#-Q- sxnec L_X = $(L_O)' 258 258 echo '#-Q- sx6nec # Compiler options NEMO (CEA SX6-NEC) ' 259 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -C vopt -Wf"-P nh" -Wf',-pvctl noassume loopcnt=10000 -L transform' -I $(MODDIR) -I $(MODDIR)/oce '260 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce '259 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -C vopt -Wf"-P nh" -Wf',-pvctl noassume loopcnt=10000 -L transform' -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 260 echo '#-Q- sx6nec F_O = -size_t64 -dw -Wf\"-A dbl4\" -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 261 261 echo '#-Q- sx6nec F_F = $(F_O)' 262 262 echo '#-Q- sx6nec L_X = $(L_O) -ftrace' 263 263 echo '#-Q- sx8brodie # Compiler options NEMO (CEA SX6-NEC) ' 264 echo '#-Q- sx8brodie F_O = -dw -Wf\"-A idbl4\" -sx8 -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce '264 echo '#-Q- sx8brodie F_O = -dw -Wf\"-A idbl4\" -sx8 -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 265 265 echo '#-Q- sx8brodie F_F = $(F_O)' 266 266 echo '#-Q- sx8brodie L_X = $(L_O)' 267 267 echo '#-Q- sxdkrz # Compiler options for NEMO (DKRZ SX6-NEC) ' 268 echo '#-Q- sxdkrz F_O = -ew -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf"-pvctl noassume loopcnt=10000" -L transform -I $(MODDIR) -I $(MODDIR)/oce '268 echo '#-Q- sxdkrz F_O = -ew -sx6 -ftrace -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh" -Wf"-pvctl noassume loopcnt=10000" -L transform -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 269 269 echo '#-Q- sxdkrz F_F = $(F_O)' 270 270 echo '#-Q- sxdkrz L_X = $(L_O) -ftrace' 271 271 echo '#-Q- eshpux # Compiler options for NEMO (Earth Simulator)' 272 272 echo '#-Q- eshpux # for super perfs!' 273 echo '#-Q- eshpux # F_O = $(FTRACE) -pi nest=5 line=10000 expin=Fmpplib.F -Wf,-A idbl4 -C hopt -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce '273 echo '#-Q- eshpux # F_O = $(FTRACE) -pi nest=5 line=10000 expin=Fmpplib.F -Wf,-A idbl4 -C hopt -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 274 274 echo '#-Q- eshpux # regular options!' 275 echo '#-Q- eshpux F_O = $(FTRACE) -Wf,-A idbl4 -C vopt -P stack -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -Wf,-pvctl nomsg -Wf"-O nomsg" -I $(MODDIR) -I $(MODDIR)/oce '275 echo '#-Q- eshpux F_O = $(FTRACE) -Wf,-A idbl4 -C vopt -P stack -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 -L transform -Wf,-pvctl nomsg -Wf"-O nomsg" -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 276 276 echo '#-Q- eshpux F_F = $(F_O)' 277 277 echo '#-Q- eshpux L_X = $(L_O)' 278 278 echo '#-Q- linux # Compiler options for NEMO (pgf version)' 279 echo '#-Q- linux F_O = -Mlist -O3 -byteswapio -r8 -I $(MODDIR) -I$(MODDIR)/oce '279 echo '#-Q- linux F_O = -Mlist -O3 -byteswapio -r8 -I $(MODDIR) -I$(MODDIR)/oce -I $(NCDF_INC)' 280 280 echo '#-Q- linux F_F = $(F_O)' 281 281 echo '#-Q- linux L_X = -r8 -O3' 282 282 echo '#-Q- lxiv7 # Compiler options for NEMO (ifc version)' 283 echo '#-Q- lxiv7 F_O = -O3 -r8 -I $(MODDIR) -I$(MODDIR)/oce '283 echo '#-Q- lxiv7 F_O = -O3 -r8 -I $(MODDIR) -I$(MODDIR)/oce -I $(NCDF_INC)' 284 284 echo '#-Q- lxiv7 L_X = -r8 -O3' 285 285 echo '#-Q- lxiv8 # Compiler options for NEMO (ifort version)' … … 288 288 echo '#-Q- lxiv8 L_X = -r8 -O3' 289 289 echo '#-Q- g95 # Compiler options for NEMO (g95 version)' 290 echo '#-Q- g95 F_O = -O3 -fno-second-underscore -r8 -funroll-all-loops -I $(MODDIR) -I $(MODDIR)/oce '290 echo '#-Q- g95 F_O = -O3 -fno-second-underscore -r8 -funroll-all-loops -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 291 291 echo '#-Q- g95 F_F = $(F_O)' 292 292 echo '#-Q- g95 L_X = -r8 -O3' 293 293 echo '#-Q- aix # Compiler options for NEMO (aix version)' 294 echo '#-Q- aix F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce '295 echo '#-Q- aix F_F = -O3 -qsave -qrealsize=8 -qsuffix=f=f -qsuffix=cpp=F -qfixed -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce '294 echo '#-Q- aix F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 295 echo '#-Q- aix F_F = -O3 -qsave -qrealsize=8 -qsuffix=f=f -qsuffix=cpp=F -qfixed -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 296 296 echo '#-Q- aix L_O = $(F_P) -q64 -O3' 297 297 echo '#-Q- aix L_X = $(L_O)' 298 298 echo '#-Q- osxxlf # Compiler options for NEMO (osxxlf version)' 299 echo '#-Q- osxxlf F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qsource -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce '300 echo '#-Q- osxxlf F_F = -O3 -qsave -qrealsize=8 -qsuffix=f=f -qsuffix=cpp=F -qfixed -qsource -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce '299 echo '#-Q- osxxlf F_O = -O3 -qsave -qrealsize=8 -qsuffix=f=f90 -qsuffix=cpp=F90 -qsource -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 300 echo '#-Q- osxxlf F_F = -O3 -qsave -qrealsize=8 -qsuffix=f=f -qsuffix=cpp=F -qfixed -qsource -qmaxmem=-1 -I $(MODDIR) -I $(MODDIR)/oce -I $(NCDF_INC)' 301 301 echo '#-Q- osxxlf L_X = -qrealsize=8 -O3' 302 302 … … 469 469 if [ $fuse0 != "Agrif_Types" ] 470 470 then 471 if [ $fuse0 != "netcdf" ] 472 then 471 473 lfuse0=$fuse0.f90 472 474 [ -f $fuse0.F90 ] && lfuse0=$fuse0.F90 473 475 luse0="$luse0\n$lfuse0\n\$(MODEL_LIB)($fuse0.o)" 476 fi 474 477 fi 475 478 fi … … 489 492 if [ $fuse0 != "Agrif_Types" ] 490 493 then 494 if [ $fuse0 != "netcdf" ] 495 then 491 496 lfuse0=$fuse0.f90 492 497 [ -f $fuse0.F90 ] && lfuse0=$fuse0.F90 493 498 luse0="$luse0\n$lfuse0\n\$(MODEL_LIB)($fuse0.o)" 499 fi 494 500 fi 495 501 fi … … 507 513 then 508 514 if [ $fuse1 != "Agrif_Types" ] 515 then 516 if [ $fuse1 != "netcdf" ] 509 517 then 510 518 lfuse1=$fuse1.f90 … … 518 526 then 519 527 if [ $fuse2 != "Agrif_Types" ] 528 then 529 if [ $fuse2 != "netcdf" ] 520 530 then 521 531 lfuse2=$fuse2.f90 … … 531 541 if [ $fuse3 != "Agrif_Types" ] 532 542 then 543 if [ $fuse3 != "netcdf" ] 544 then 533 545 luse3="$luse3\n$lfuse3\n\$(MODEL_LIB)($fuse3.o)" 546 fi 534 547 fi 535 548 fi … … 539 552 fi 540 553 fi 554 fi 541 555 done 556 fi 542 557 fi 543 558 fi … … 641 656 echo ' ln -sf ../OPA_SRC/DTA/*.[Ffh]90 . ; \' 642 657 echo ' ln -sf ../OPA_SRC/SBC/*.[Ffh]90 . ; \' 658 echo ' ln -sf ../OPA_SRC/IOM/*.[Ffh]90 . ; \' 643 659 echo ' fi ' 644 660 echo ' @check=`grep LIM_SRC .config` ; \'
Note: See TracChangeset
for help on using the changeset viewer.