Changeset 8644
- Timestamp:
- 2017-10-20T10:04:07+02:00 (7 years ago)
- Location:
- branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r8630 r8644 369 369 IF( .NOT. ln_diahsb ) RETURN 370 370 371 IF(lwxios) THEN 372 ! define variables in restart file when writing with XIOS 373 CALL set_rstw_var_active('frc_v') 374 CALL set_rstw_var_active('frc_t') 375 CALL set_rstw_var_active('frc_s') 376 IF( ln_linssh ) THEN 377 CALL set_rstw_var_active('frc_wn_t') 378 CALL set_rstw_var_active('frc_wn_s') 379 ENDIF 380 CALL set_rstw_var_active('surf_ini') 381 CALL set_rstw_var_active('ssh_ini') 382 CALL set_rstw_var_active('e3t_ini') 383 CALL set_rstw_var_active('hc_loc_ini') 384 CALL set_rstw_var_active('sc_loc_ini') 385 IF( ln_linssh ) THEN 386 CALL set_rstw_var_active('ssh_hc_loc_ini') 387 CALL set_rstw_var_active('ssh_sc_loc_ini') 388 ENDIF 389 ENDIF 371 390 ! ------------------- ! 372 391 ! 1 - Allocate memory ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r8630 r8644 144 144 CALL day( nit000 ) 145 145 ! 146 IF( lwxios ) THEN 147 ! define variables in restart file when writing with XIOS 148 CALL set_rstw_var_active('kt') 149 CALL set_rstw_var_active('ndastp') 150 CALL set_rstw_var_active('adatrj') 151 CALL set_rstw_var_active('ntime') 152 ENDIF 153 146 154 END SUBROUTINE day_init 147 155 … … 341 349 ndastp = NINT( zndastp ) 342 350 CALL iom_get( numror, 'adatrj', adatrj ) 343 344 351 CALL iom_get( numror, 'ntime', ktime ) 352 nn_time0=INT(ktime) 345 353 ! calculate start time in hours and minutes 346 347 ksecs = NINT(zdayfrac*86400)! Nearest second to catch rounding errors in adatrj348 349 350 354 zdayfrac=adatrj-INT(adatrj) 355 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 356 ihour = INT(ksecs/3600) 357 iminute = ksecs/60-ihour*60 358 351 359 ! Add to nn_time0 352 360 nhour = nn_time0 / 100 353 361 nminute = ( nn_time0 - nhour * 100 ) 354 355 356 357 358 359 360 361 362 363 364 ENDIF365 366 362 nminute=nminute+iminute 363 364 IF( nminute >= 60 ) THEN 365 nminute=nminute-60 366 nhour=nhour+1 367 ENDIF 368 nhour=nhour+ihour 369 IF( nhour >= 24 ) THEN 370 nhour=nhour-24 371 adatrj=adatrj+1 372 ENDIF 373 nn_time0 = nhour * 100 + nminute 374 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated 367 375 ELSE 368 376 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) … … 378 386 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 379 387 nhour = nn_time0 / 100 380 388 nminute = ( nn_time0 - nhour * 100 ) 381 389 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 382 390 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday … … 388 396 WRITE(numout,*) ' date ndastp : ', ndastp 389 397 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 390 398 WRITE(numout,*) ' nn_time0 : ',nn_time0 391 399 WRITE(numout,*) 392 400 ENDIF … … 405 413 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj, lxios = lwxios ) ! number of elapsed days since 406 414 ! ! the begining of the run [s] 407 415 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), lxios = lwxios ) ! time 408 416 IF( lwxios ) CALL iom_swap( cxios_context ) 409 417 ENDIF -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r8630 r8644 47 47 USE wrk_nemo ! Memory Allocation 48 48 USE timing ! Timing 49 USE iom_def, ONLY:lwxios, wxioso ! write restart flag and output type 49 USE iom_def, ONLY:lwxios, wxioso, rst_wfields ! write restart flag and output type 50 USE iom, ONLY : set_rst_vars, set_rstw_core 50 51 IMPLICIT NONE 51 52 PRIVATE … … 201 202 IF( nn_timing == 1 ) CALL timing_stop('dom_init') 202 203 ! 204 IF( lwxios ) THEN 205 !define names for restart write 206 CALL set_rst_vars(rst_wfields) 207 CALL set_rstw_core() 208 ENDIF 203 209 END SUBROUTINE dom_init 204 210 … … 334 340 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 335 341 WRITE(numout,*) ' IS coupling at the restart step ln_iscpl = ', ln_iscpl 336 WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios337 342 IF( TRIM(Agrif_CFixed()) == '0' ) & 338 343 & WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r8630 r8644 242 242 ENDIF 243 243 ! 244 IF(lwxios) THEN 245 ! define variables in restart file when writing with XIOS 246 CALL set_rstw_var_active('e3t_b') 247 CALL set_rstw_var_active('e3t_n') 248 ! ! ----------------------- ! 249 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 250 ! ! ----------------------- ! 251 CALL set_rstw_var_active('tilde_e3t_b') 252 CALL set_rstw_var_active('tilde_e3t_n') 253 END IF 254 ! ! -------------! 255 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 256 ! ! ------------ ! 257 CALL set_rstw_var_active('hdiv_lf') 258 ENDIF 259 ! 260 ENDIF 261 244 262 IF( nn_timing == 1 ) CALL timing_stop('dom_vvl_init') 245 263 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r8630 r8644 138 138 INTEGER, INTENT(in) :: kt ! ocean time-step index 139 139 ! 140 LOGICAL :: ll_fw_start 141 LOGICAL :: ll_init 140 LOGICAL :: ll_fw_start ! if true, forward integration 141 LOGICAL :: ll_init ! if true, special startup of 2d equations 142 142 LOGICAL :: ll_tmp1, ll_tmp2 ! local logical variables used in W/D 143 INTEGER :: ji, jj, jk, jn 144 INTEGER :: ikbu, ikbv, noffset 145 INTEGER :: iktu, iktv 143 INTEGER :: ji, jj, jk, jn ! dummy loop indices 144 INTEGER :: ikbu, ikbv, noffset ! local integers 145 INTEGER :: iktu, iktv ! local integers 146 146 REAL(wp) :: zmdi 147 REAL(wp) :: zraur, z1_2dt_b, z2dt_bf 147 REAL(wp) :: zraur, z1_2dt_b, z2dt_bf ! local scalars 148 148 REAL(wp) :: zx1, zy1, zx2, zy2 ! - - 149 REAL(wp) :: z1_12, z1_8, z1_4, z1_2 149 REAL(wp) :: z1_12, z1_8, z1_4, z1_2 ! - - 150 150 REAL(wp) :: zu_spg, zv_spg ! - - 151 REAL(wp) :: zhura, zhvra 152 REAL(wp) :: za0, za1, za2, za3 151 REAL(wp) :: zhura, zhvra ! - - 152 REAL(wp) :: za0, za1, za2, za3 ! - - 153 153 ! 154 154 REAL(wp), POINTER, DIMENSION(:,:) :: zsshp2_e … … 192 192 ENDIF 193 193 ! 194 IF( kt == nit000 ) THEN 194 IF( kt == nit000 ) THEN !* initialisation 195 195 ! 196 196 IF(lwp) WRITE(numout,*) … … 1325 1325 CALL wrk_dealloc( jpi,jpj, zcu ) 1326 1326 ! 1327 IF( lwxios ) THEN 1328 ! define variables in restart file when writing with XIOS 1329 CALL set_rstw_var_active('ub2_b') 1330 CALL set_rstw_var_active('vb2_b') 1331 ! 1332 IF (.NOT.ln_bt_av) THEN 1333 CALL set_rstw_var_active('sshbb_e') 1334 CALL set_rstw_var_active('ubb_e') 1335 CALL set_rstw_var_active('vbb_e') 1336 CALL set_rstw_var_active('sshb_e') 1337 CALL set_rstw_var_active('ub_e') 1338 CALL set_rstw_var_active('vb_e') 1339 ENDIF 1340 #if defined key_agrif 1341 ! Save time integrated fluxes 1342 IF ( .NOT.Agrif_Root() ) THEN 1343 CALL set_rstw_var_active('ub2_i_b') 1344 CALL set_rstw_var_active('vb2_i_b') 1345 ENDIF 1346 #endif 1347 ENDIF 1348 1327 1349 END SUBROUTINE dyn_spg_ts_init 1328 1350 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8630 r8644 41 41 USE dianam ! build name of file 42 42 USE xios 43 USE iom_def, ONLY : wxioso43 USE iom_def, ONLY : max_rst_fields, rst_wfields, RST_FIELD 44 44 # endif 45 45 USE ioipsl, ONLY : ju2ymds ! for calendar 46 46 USE crs ! Grid coarsening 47 USE sbc_oce, ONLY : lk_oasis, ln_coupled_iceshelf_fluxes, ln_apr_dyn, ln_rnf, nn_components, jp_iam_sas48 USE di adct, ONLY : lk_diadct47 USE lib_fortran 48 USE diurnal_bulk, ONLY : ln_diurnal_only 49 49 50 50 IMPLICIT NONE 51 ! values needed to set correctlyfiles in reast file when using XIOS for writing52 LOGICAL, PUBLIC :: lr_vvl_ztilde, lr_vvl_layer, lr_traadv_cen253 54 51 PUBLIC ! must be public to be able to access iom_def through iom 52 55 53 #if defined key_iomput 56 54 LOGICAL, PUBLIC, PARAMETER :: lk_iomput = .TRUE. !: iom_put flag … … 61 59 PUBLIC iom_getatt, iom_putatt, iom_gettime, iom_rstput, iom_put 62 60 PUBLIC iom_use, iom_context_finalize 61 63 62 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 64 63 PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d … … 67 66 PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 68 67 PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 69 PRIVATE set_rstw_active 68 PRIVATE set_rst_context, set_rstw_active 69 PUBLIC set_rstw_var_active, set_rst_vars 70 70 # endif 71 71 … … 94 94 CONTAINS 95 95 96 SUBROUTINE iom_init( cdname )96 SUBROUTINE iom_init( cdname, fname ) 97 97 !!---------------------------------------------------------------------- 98 98 !! *** ROUTINE *** … … 102 102 !!---------------------------------------------------------------------- 103 103 CHARACTER(len=*), INTENT(in) :: cdname 104 CHARACTER(len=*), OPTIONAL, INTENT(in) :: fname 104 105 #if defined key_iomput 105 106 106 107 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 107 108 TYPE(xios_date) :: start_date 108 CHARACTER(len= 10) :: clname109 CHARACTER(len=lc) :: clname 109 110 INTEGER :: ji, jkmin 111 LOGICAL :: lrst_context ! is context related to restart 110 112 ! 111 113 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds … … 118 120 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 119 121 CALL iom_swap( cdname ) 120 122 lrst_context = (TRIM(cdname) == TRIM(wxios_context)) 121 123 122 124 ! Calendar type is now defined in xml file … … 129 131 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 130 132 END SELECT 133 131 134 ! horizontal grid definition 132 CALL set_scalar133 134 IF( TRIM(cdname) == TRIM(cxios_context) ) THEN135 CALL set_grid( "T", glamt, gphit, . TRUE. )136 CALL set_grid( "U", glamu, gphiu, . TRUE. )137 CALL set_grid( "V", glamv, gphiv, . TRUE. )138 CALL set_grid( "W", glamt, gphit, . TRUE. )135 IF(.NOT.lrst_context) CALL set_scalar 136 137 IF( TRIM(cdname) == TRIM(cxios_context) ) THEN 138 CALL set_grid( "T", glamt, gphit, .FALSE. ) 139 CALL set_grid( "U", glamu, gphiu, .FALSE. ) 140 CALL set_grid( "V", glamv, gphiv, .FALSE. ) 141 CALL set_grid( "W", glamt, gphit, .FALSE. ) 139 142 CALL set_grid_znl( gphit ) 140 143 ! … … 154 157 CALL dom_grid_crs ! Save the parent grid information & Switch to coarse grid domain 155 158 ! 156 CALL set_grid( "T", glamt_crs, gphit_crs, ln_mskland)157 CALL set_grid( "U", glamu_crs, gphiu_crs, ln_mskland)158 CALL set_grid( "V", glamv_crs, gphiv_crs, ln_mskland)159 CALL set_grid( "W", glamt_crs, gphit_crs, ln_mskland)159 CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE. ) 160 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE. ) 161 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE. ) 162 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE. ) 160 163 CALL set_grid_znl( gphit_crs ) 161 164 ! 162 165 CALL dom_grid_glo ! Return to parent grid domain 163 166 ! 164 IF( ln_cfmeta ) THEN ! Add additional grid metadata167 IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(wxios_context)) THEN ! Add additional grid metadata 165 168 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej)) 166 169 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej)) … … 175 178 176 179 ! vertical grid definition 177 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 178 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 179 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 180 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 181 182 ! Add vertical grid bounds 183 jkmin = MIN(2,jpk) ! in case jpk=1 (i.e. sas2D) 184 zt_bnds(2,: ) = gdept_1d(:) 185 zt_bnds(1,jkmin:jpk) = gdept_1d(1:jpkm1) 186 zt_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 187 zw_bnds(1,: ) = gdepw_1d(:) 188 zw_bnds(2,1:jpkm1 ) = gdepw_1d(jkmin:jpk) 189 zw_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 190 CALL iom_set_axis_attr( "deptht", bounds=zt_bnds ) 191 CALL iom_set_axis_attr( "depthu", bounds=zt_bnds ) 192 CALL iom_set_axis_attr( "depthv", bounds=zt_bnds ) 193 CALL iom_set_axis_attr( "depthw", bounds=zw_bnds ) 180 IF(.NOT.lrst_context) THEN 181 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 182 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 183 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 184 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 185 186 ! Add vertical grid bounds 187 jkmin = MIN(2,jpk) ! in case jpk=1 (i.e. sas2D) 188 zt_bnds(2,: ) = gdept_1d(:) 189 zt_bnds(1,jkmin:jpk) = gdept_1d(1:jpkm1) 190 zt_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 191 zw_bnds(1,: ) = gdepw_1d(:) 192 zw_bnds(2,1:jpkm1 ) = gdepw_1d(jkmin:jpk) 193 zw_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 194 CALL iom_set_axis_attr( "deptht", bounds=zt_bnds ) 195 CALL iom_set_axis_attr( "depthu", bounds=zt_bnds ) 196 CALL iom_set_axis_attr( "depthv", bounds=zt_bnds ) 197 CALL iom_set_axis_attr( "depthw", bounds=zw_bnds ) 194 198 195 199 196 200 # if defined key_floats 197 CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,nfloat) /) )201 CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,nfloat) /) ) 198 202 # endif 199 203 #if defined key_lim3 || defined key_lim2 200 CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) )204 CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) ) 201 205 #endif 202 CALL iom_set_axis_attr( "icbcla", class_num ) 203 CALL iom_set_axis_attr( "iax_20C", (/ REAL(20,wp) /) ) 204 CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) ) 205 206 CALL set_xmlatt 206 CALL iom_set_axis_attr( "icbcla", class_num ) 207 CALL iom_set_axis_attr( "iax_20C", (/ REAL(20,wp) /) ) 208 CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) ) 209 ENDIF 210 ! automatic definitions of some of the xml attributs 211 if(lwp) write(numout,*) TRIM(cdname),' ',TRIM(wxios_context),' TEST1' 212 IF( TRIM(cdname) == TRIM(wxios_context) ) THEN 213 !set names of the fields in restart file IF using XIOS to read/write data 214 CALL set_rst_context() 215 CALL set_rst_vars(rst_wfields) 216 !set which fields are to be read from restart file 217 CALL set_rstw_active(fname) 218 ELSE 219 CALL set_xmlatt 220 ENDIF 207 221 208 222 ! end file definition … … 219 233 END SUBROUTINE iom_init 220 234 221 SUBROUTINE iom_rstw_init( cdname, filename ) 222 !!---------------------------------------------------------------------- 223 !! *** ROUTINE *** 224 !! 225 !! ** Purpose : 226 !! 227 !!---------------------------------------------------------------------- 228 CHARACTER(len=*), INTENT(in) :: cdname 229 #if defined key_iomput 230 #if defined key_xios2 231 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 232 TYPE(xios_date) :: start_date 233 TYPE(xios_domaingroup) :: domaingroup_hdl 234 TYPE(xios_domain) :: domain_hdl 235 TYPE(xios_axisgroup) :: axisgroup_hdl 236 TYPE(xios_axis) :: axis_hdl 237 TYPE(xios_scalar) :: scalar_hdl 238 TYPE(xios_scalargroup) :: scalargroup_hdl 239 #endif 240 CHARACTER(len=128) :: clname 241 INTEGER :: ji 242 ! 243 CHARACTER(len=*), OPTIONAL, INTENT(in) :: filename 244 !!---------------------------------------------------------------------- 245 246 clname = cdname 247 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname) 248 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 249 CALL iom_swap( cdname ) 250 ! calendar parameters 251 #if defined key_xios2 252 ! Calendar type is now defined in xml file 253 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 254 CASE ( 1) ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 255 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 256 CASE ( 0) ; CALL xios_define_calendar( TYPE = "NoLeap" , time_origin = xios_date(1900,01,01,00,00,00), & 257 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 258 CASE (30) ; CALL xios_define_calendar( TYPE = "D360" , time_origin = xios_date(1900,01,01,00,00,00), & 259 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 260 END SELECT 261 262 #endif 263 CALL xios_get_handle("domain_definition",domaingroup_hdl) 264 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 265 CALL set_grid("N", glamt, gphit, .FALSE.) 266 267 CALL xios_get_handle("axis_definition",axisgroup_hdl) 268 CALL xios_add_child(axisgroup_hdl, axis_hdl, "deptht") 269 !if unit="m" is present AGRIF configuration fails to compile 270 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels in meters", positive="down") 271 ! vertical grid definition 272 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 273 274 CALL xios_get_handle("scalar_definition",scalargroup_hdl) 275 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 276 277 ! automatic definitions of some of the xml attributs 278 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 279 !set which fields are to be read from restart file 280 CALL set_rstw_active(filename) 281 ENDIF 282 283 ! end file definition 284 dtime%second = rdt 285 CALL xios_set_timestep(dtime) 286 CALL xios_close_context_definition() 287 #endif 288 289 END SUBROUTINE iom_rstw_init 235 SUBROUTINE set_rstw_var_active(field) 236 CHARACTER(len = *), INTENT(IN) :: field 237 INTEGER :: i 238 LOGICAL :: is_set 239 240 is_set = .FALSE. 241 242 DO i = 1, max_rst_fields 243 IF(TRIM(rst_wfields(i)%vname) == field) THEN 244 rst_wfields(i)%active = .TRUE. 245 is_set = .TRUE. 246 EXIT 247 ENDIF 248 ENDDO 249 !Warn if variable is not in defined in rst_wfields 250 IF(.NOT.is_set) THEN 251 IF(lwp) write(numout,*) 'variable ', field ,' is available for writing but not defined' 252 ENDIF 253 254 END SUBROUTINE set_rstw_var_active 255 256 SUBROUTINE set_rstw_core() 257 !from restart.F90 258 CALL set_rstw_var_active("rdt") 259 IF ( .NOT. ln_diurnal_only ) THEN 260 CALL set_rstw_var_active('ub' ) 261 CALL set_rstw_var_active('vb' ) 262 CALL set_rstw_var_active('tb' ) 263 CALL set_rstw_var_active('sb' ) 264 CALL set_rstw_var_active('sshb') 265 ! 266 CALL set_rstw_var_active('un' ) 267 CALL set_rstw_var_active('vn' ) 268 CALL set_rstw_var_active('tn' ) 269 CALL set_rstw_var_active('sn' ) 270 CALL set_rstw_var_active('sshn') 271 CALL set_rstw_var_active('rhop') 272 ! extra variable needed for the ice sheet coupling 273 IF ( ln_iscpl ) THEN 274 CALL set_rstw_var_active('tmask') 275 CALL set_rstw_var_active('umask') 276 CALL set_rstw_var_active('vmask') 277 CALL set_rstw_var_active('smask') 278 CALL set_rstw_var_active('e3t_n') 279 CALL set_rstw_var_active('e3u_n') 280 CALL set_rstw_var_active('e3v_n') 281 CALL set_rstw_var_active('gdepw_n') 282 END IF 283 ELSE 284 CALL set_rstw_var_active('Dsst') 285 ENDIF 286 !from trasbc.F90 287 CALL set_rstw_var_active('sbc_hc_b') 288 CALL set_rstw_var_active('sbc_sc_b') 289 END SUBROUTINE set_rstw_core 290 291 SUBROUTINE set_rst_vars(fields) 292 !set names for variables in restart file 293 TYPE(RST_FIELD), INTENT(INOUT) :: fields(max_rst_fields) 294 INTEGER :: i 295 i = 0 296 i = i + 1; fields(i)%vname="rdt"; fields(i)%grid="grid_scalar" 297 i = i + 1; fields(i)%vname="un"; fields(i)%grid="grid_N_3D" 298 i = i + 1; fields(i)%vname="ub"; fields(i)%grid="grid_N_3D" 299 i = i + 1; fields(i)%vname="vn"; fields(i)%grid="grid_N_3D" 300 i = i + 1; fields(i)%vname="vb"; fields(i)%grid="grid_N_3D" 301 i = i + 1; fields(i)%vname="tn"; fields(i)%grid="grid_N_3D" 302 i = i + 1; fields(i)%vname="tb"; fields(i)%grid="grid_N_3D" 303 i = i + 1; fields(i)%vname="sn"; fields(i)%grid="grid_N_3D" 304 i = i + 1; fields(i)%vname="sb"; fields(i)%grid="grid_N_3D" 305 i = i + 1; fields(i)%vname="sshn"; fields(i)%grid="grid_N" 306 i = i + 1; fields(i)%vname="sshb"; fields(i)%grid="grid_N" 307 i = i + 1; fields(i)%vname="rhop"; fields(i)%grid="grid_N_3D" 308 i = i + 1; fields(i)%vname="kt"; fields(i)%grid="grid_scalar" 309 i = i + 1; fields(i)%vname="ndastp"; fields(i)%grid="grid_scalar" 310 i = i + 1; fields(i)%vname="adatrj"; fields(i)%grid="grid_scalar" 311 i = i + 1; fields(i)%vname="utau_b"; fields(i)%grid="grid_N" 312 i = i + 1; fields(i)%vname="vtau_b"; fields(i)%grid="grid_N" 313 i = i + 1; fields(i)%vname="qns_b"; fields(i)%grid="grid_N" 314 i = i + 1; fields(i)%vname="emp_b"; fields(i)%grid="grid_N" 315 i = i + 1; fields(i)%vname="sfx_b"; fields(i)%grid="grid_N" 316 i = i + 1; fields(i)%vname="en" ; fields(i)%grid="grid_N_3D" 317 i = i + 1; fields(i)%vname="avt"; fields(i)%grid="grid_N_3D" 318 i = i + 1; fields(i)%vname="avm"; fields(i)%grid="grid_N_3D" 319 i = i + 1; fields(i)%vname="avmu"; fields(i)%grid="grid_N_3D" 320 i = i + 1; fields(i)%vname="avmv"; fields(i)%grid="grid_N_3D" 321 i = i + 1; fields(i)%vname="dissl"; fields(i)%grid="grid_N_3D" 322 i = i + 1; fields(i)%vname="sbc_hc_b"; fields(i)%grid="grid_N" 323 i = i + 1; fields(i)%vname="sbc_sc_b"; fields(i)%grid="grid_N" 324 i = i + 1; fields(i)%vname="qsr_hc_b"; fields(i)%grid="grid_N_3D" 325 i = i + 1; fields(i)%vname="fraqsr_1lev"; fields(i)%grid="grid_N" 326 i = i + 1; fields(i)%vname="greenland_icesheet_mass" 327 fields(i)%grid="grid_scalar" 328 i = i + 1; fields(i)%vname="greenland_icesheet_timelapsed" 329 fields(i)%grid="grid_scalar" 330 i = i + 1; fields(i)%vname="greenland_icesheet_mass_roc" 331 fields(i)%grid="grid_scalar" 332 i = i + 1; fields(i)%vname="antarctica_icesheet_mass" 333 fields(i)%grid="grid_scalar" 334 i = i + 1; fields(i)%vname="antarctica_icesheet_timelapsed" 335 fields(i)%grid="grid_scalar" 336 i = i + 1; fields(i)%vname="antarctica_icesheet_mass_roc" 337 fields(i)%grid="grid_scalar" 338 i = i + 1; fields(i)%vname="frc_v"; fields(i)%grid="grid_scalar" 339 i = i + 1; fields(i)%vname="frc_t"; fields(i)%grid="grid_scalar" 340 i = i + 1; fields(i)%vname="frc_s"; fields(i)%grid="grid_scalar" 341 i = i + 1; fields(i)%vname="frc_wn_t"; fields(i)%grid="grid_scalar" 342 i = i + 1; fields(i)%vname="frc_wn_s"; fields(i)%grid="grid_scalar" 343 i = i + 1; fields(i)%vname="ssh_ini"; fields(i)%grid="grid_N" 344 i = i + 1; fields(i)%vname="e3t_ini"; fields(i)%grid="grid_N_3D" 345 i = i + 1; fields(i)%vname="hc_loc_ini"; fields(i)%grid="grid_N_3D" 346 i = i + 1; fields(i)%vname="sc_loc_ini"; fields(i)%grid="grid_N_3D" 347 i = i + 1; fields(i)%vname="ssh_hc_loc_ini"; fields(i)%grid="grid_N" 348 i = i + 1; fields(i)%vname="ssh_sc_loc_ini"; fields(i)%grid="grid_N" 349 i = i + 1; fields(i)%vname="tilde_e3t_b"; fields(i)%grid="grid_N" 350 i = i + 1; fields(i)%vname="tilde_e3t_n"; fields(i)%grid="grid_N" 351 i = i + 1; fields(i)%vname="hdiv_lf"; fields(i)%grid="grid_N" 352 i = i + 1; fields(i)%vname="ub2_b"; fields(i)%grid="grid_N" 353 i = i + 1; fields(i)%vname="vb2_b"; fields(i)%grid="grid_N" 354 i = i + 1; fields(i)%vname="sshbb_e"; fields(i)%grid="grid_N" 355 i = i + 1; fields(i)%vname="ubb_e"; fields(i)%grid="grid_N" 356 i = i + 1; fields(i)%vname="vbb_e"; fields(i)%grid="grid_N" 357 i = i + 1; fields(i)%vname="sshb_e"; fields(i)%grid="grid_N" 358 i = i + 1; fields(i)%vname="ub_e"; fields(i)%grid="grid_N" 359 i = i + 1; fields(i)%vname="vb_e"; fields(i)%grid="grid_N" 360 i = i + 1; fields(i)%vname="fwf_isf_b"; fields(i)%grid="grid_N" 361 i = i + 1; fields(i)%vname="isf_sc_b"; fields(i)%grid="grid_N" 362 i = i + 1; fields(i)%vname="isf_hc_b"; fields(i)%grid="grid_N" 363 i = i + 1; fields(i)%vname="ssh_ibb"; fields(i)%grid="grid_N" 364 i = i + 1; fields(i)%vname="rnf_b"; fields(i)%grid="grid_N" 365 i = i + 1; fields(i)%vname="rnf_hc_b"; fields(i)%grid="grid_N" 366 i = i + 1; fields(i)%vname="rnf_sc_b"; fields(i)%grid="grid_N" 367 i = i + 1; fields(i)%vname="nn_fsbc"; fields(i)%grid="grid_scalar" 368 i = i + 1; fields(i)%vname="ssu_m"; fields(i)%grid="grid_N" 369 i = i + 1; fields(i)%vname="ssv_m"; fields(i)%grid="grid_N" 370 i = i + 1; fields(i)%vname="sst_m"; fields(i)%grid="grid_N" 371 i = i + 1; fields(i)%vname="sss_m"; fields(i)%grid="grid_N" 372 i = i + 1; fields(i)%vname="ssh_m"; fields(i)%grid="grid_N" 373 i = i + 1; fields(i)%vname="e3t_m"; fields(i)%grid="grid_N" 374 i = i + 1; fields(i)%vname="frq_m"; fields(i)%grid="grid_N" 375 i = i + 1; fields(i)%vname="avmb"; fields(i)%grid="grid_vector" 376 i = i + 1; fields(i)%vname="avtb"; fields(i)%grid="grid_vector" 377 i = i + 1; fields(i)%vname="ub2_i_b"; fields(i)%grid="grid_N" 378 i = i + 1; fields(i)%vname="vb2_i_b"; fields(i)%grid="grid_N" 379 i = i + 1; fields(i)%vname="ntime"; fields(i)%grid="grid_scalar" 380 i = i + 1; fields(i)%vname="Dsst"; fields(i)%grid="grid_scalar" 381 i = i + 1; fields(i)%vname="tmask"; fields(i)%grid="grid_N_3D" 382 i = i + 1; fields(i)%vname="umask"; fields(i)%grid="grid_N_3D" 383 i = i + 1; fields(i)%vname="vmask"; fields(i)%grid="grid_N_3D" 384 i = i + 1; fields(i)%vname="smask"; fields(i)%grid="grid_N_3D" 385 i = i + 1; fields(i)%vname="gdepw_n"; fields(i)%grid="grid_N_3D" 386 i = i + 1; fields(i)%vname="e3t_n"; fields(i)%grid="grid_N_3D" 387 i = i + 1; fields(i)%vname="e3u_n"; fields(i)%grid="grid_N_3D" 388 i = i + 1; fields(i)%vname="e3v_n"; fields(i)%grid="grid_N_3D" 389 i = i + 1; fields(i)%vname="surf_ini"; fields(i)%grid="grid_N" 390 i = i + 1; fields(i)%vname="e3t_b"; fields(i)%grid="grid_N_3D" 391 i = i + 1; fields(i)%vname="e3t_n"; fields(i)%grid="grid_N_3D" 392 i = i + 1; fields(i)%vname="mxln"; fields(i)%grid="grid_N_3D" 393 i = i + 1; fields(i)%vname="e3t_m"; fields(i)%grid="grid_N_3D" 394 END SUBROUTINE set_rst_vars 395 290 396 291 397 SUBROUTINE set_rstw_active(rst_file) 292 398 !sets enabled = .TRUE. for each field in restart file 293 399 CHARACTER(len=*) :: rst_file 400 TYPE(xios_field) :: field_hdl 294 401 TYPE(xios_file) :: file_hdl 295 402 TYPE(xios_filegroup) :: filegroup_hdl 296 297 !set then name of the restart file (OUTPUT!) and enable available fields 298 if(lwp) WRITE(numout,*) 'Setting (output) restart filename (for XIOS) to: ',TRIM(rst_file) 403 INTEGER :: i 404 CHARACTER(lc) :: clpath 405 406 !set name of the restart file and enable available fields 407 if(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS write) to: ',rst_file 299 408 CALL xios_get_handle("file_definition", filegroup_hdl ) 300 409 CALL xios_add_child(filegroup_hdl, file_hdl, 'wrestart') 301 IF(wxioso.eq.1) THEN 302 CALL xios_set_file_attr( "wrestart", type="one_file", name = TRIM(rst_file), & 303 enabled=.TRUE., mode="write", output_freq=xios_timestep) 304 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in one_file mode' 305 ELSE 306 CALL xios_set_file_attr( "wrestart", type="multiple_file", name = TRIM(rst_file),& 307 enabled=.TRUE., mode="write", output_freq=xios_timestep) 308 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in multiple_file mode' 309 ENDIF 310 410 IF(wxioso.eq.1) THEN 411 CALL xios_set_file_attr( "wrestart", type="one_file", enabled=.TRUE.,& 412 mode="write", output_freq=xios_timestep) 413 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in one_file mode' 414 ELSE 415 CALL xios_set_file_attr( "wrestart", type="multiple_file", enabled=.TRUE.,& 416 mode="write", output_freq=xios_timestep) 417 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in multiple_file mode' 418 ENDIF 311 419 CALL xios_set_file_attr( "wrestart", name=trim(rst_file)) 312 CALL set_numro_active(file_hdl) 420 !defin files for restart context 421 DO i = 1, max_rst_fields 422 IF( rst_wfields(i)%active ) THEN 423 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_wfields(i)%vname)) 424 SELECT CASE (TRIM(rst_wfields(i)%grid)) 425 CASE ("grid_N_3D") 426 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 427 domain_ref="grid_N", axis_ref="deptht", prec = 8, operation = "instant") 428 CASE ("grid_N") 429 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 430 domain_ref="grid_N", prec = 8, operation = "instant") 431 CASE ("grid_vector") 432 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 433 axis_ref="deptht", prec = 8, operation = "instant") 434 CASE ("grid_scalar") 435 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 436 scalar_ref = "grid_scalar", prec = 8, operation = "instant") 437 END SELECT 438 ENDIF 439 END DO 440 END SUBROUTINE set_rstw_active 441 442 SUBROUTINE set_rst_context( ) 443 #if defined key_iomput 444 TYPE(xios_domaingroup) :: domaingroup_hdl 445 TYPE(xios_domain) :: domain_hdl 446 TYPE(xios_axisgroup) :: axisgroup_hdl 447 TYPE(xios_axis) :: axis_hdl 448 TYPE(xios_scalar) :: scalar_hdl 449 TYPE(xios_scalargroup) :: scalargroup_hdl 450 451 CALL xios_get_handle("domain_definition",domaingroup_hdl) 452 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 453 CALL set_grid("N", glamt, gphit, .TRUE.) 313 454 314 END SUBROUTINE set_rstw_active 315 316 SUBROUTINE set_numro_active(file_hdl) 317 TYPE(xios_field) :: field_hdl 318 TYPE(xios_file) :: file_hdl 319 320 CALL xios_add_child(file_hdl, field_hdl, "rdt") 321 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 322 scalar_ref = "grid_scalar", operation = "instant") 323 324 CALL xios_add_child(file_hdl, field_hdl, "rdttra1") 325 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 326 scalar_ref = "grid_scalar", operation = "instant") 327 328 CALL xios_add_child(file_hdl, field_hdl, "un") 329 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 330 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 331 332 CALL xios_add_child(file_hdl, field_hdl, "ub") 333 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 334 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 335 336 CALL xios_add_child(file_hdl, field_hdl, "vn") 337 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 338 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 339 340 CALL xios_add_child(file_hdl, field_hdl, "vb") 341 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 342 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 343 344 CALL xios_add_child(file_hdl, field_hdl, "tn") 345 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 346 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 347 348 CALL xios_add_child(file_hdl, field_hdl, "tb") 349 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 350 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 351 352 CALL xios_add_child(file_hdl, field_hdl, "sn") 353 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 354 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 355 356 CALL xios_add_child(file_hdl, field_hdl, "sb") 357 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 358 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 359 360 CALL xios_add_child(file_hdl, field_hdl, "sshn") 361 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 362 domain_ref = "grid_N", operation = "instant") 363 364 CALL xios_add_child(file_hdl, field_hdl, "sshb") 365 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 366 domain_ref = "grid_N", operation = "instant") 367 368 CALL xios_add_child(file_hdl, field_hdl, "hdivn") 369 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 370 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 371 372 CALL xios_add_child(file_hdl, field_hdl, "hdivb") 373 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 374 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 375 376 CALL xios_add_child(file_hdl, field_hdl, "rhop") 377 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 378 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 379 380 CALL xios_add_child(file_hdl, field_hdl, "rotn") 381 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 382 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 383 384 CALL xios_add_child(file_hdl, field_hdl, "rotb") 385 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 386 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 387 388 !in daymod.F90 389 CALL xios_add_child(file_hdl, field_hdl, "kt") 390 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 391 scalar_ref = "grid_scalar", operation = "instant") 392 393 CALL xios_add_child(file_hdl, field_hdl, "ndastp") 394 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 395 scalar_ref = "grid_scalar", operation = "instant") 396 397 CALL xios_add_child(file_hdl, field_hdl, "adatrj") 398 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 399 scalar_ref = "grid_scalar", operation = "instant") 400 !end daymod.F90 401 !sbcmod.F90 402 CALL xios_add_child(file_hdl, field_hdl, "utau_b") 403 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 404 domain_ref = "grid_N", operation = "instant") 405 406 CALL xios_add_child(file_hdl, field_hdl, "vtau_b") 407 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 408 domain_ref = "grid_N", operation = "instant") 409 410 CALL xios_add_child(file_hdl, field_hdl, "qns_b") 411 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 412 domain_ref = "grid_N", operation = "instant") 413 414 CALL xios_add_child(file_hdl, field_hdl, "emp_b") 415 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 416 domain_ref = "grid_N", operation = "instant") 417 418 CALL xios_add_child(file_hdl, field_hdl, "sfx_b") 419 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 420 domain_ref = "grid_N", operation = "instant") 421 !end sbcmod.F90 422 !ALL FIELDS ABOUVE ALWAYS 423 !zdftke.F90 424 #if defined key_zdftke || defined key_esopa 425 CALL xios_add_child(file_hdl, field_hdl, "en") 426 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 427 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 428 429 CALL xios_add_child(file_hdl, field_hdl, "avt") 430 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 431 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 432 433 CALL xios_add_child(file_hdl, field_hdl, "avm") 434 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 435 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 436 437 CALL xios_add_child(file_hdl, field_hdl, "avmu") 438 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 439 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 440 441 CALL xios_add_child(file_hdl, field_hdl, "avmv") 442 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 443 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 444 445 CALL xios_add_child(file_hdl, field_hdl, "dissl") 446 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 447 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 455 CALL xios_get_handle("axis_definition",axisgroup_hdl) 456 CALL xios_add_child(axisgroup_hdl, axis_hdl, "deptht") 457 !AGRIF fails to compile when unit= is in call to xios_set_axis_attr 458 ! CALL xios_set_axis_attr( "deptht", long_name="Vertical levels", unit="m", positive="down") 459 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels in meters", positive="down") 460 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 461 462 CALL xios_get_handle("scalar_definition", scalargroup_hdl) 463 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 448 464 #endif 449 !end zdftke.F90 450 !traqsr.F90 451 CALL xios_add_child(file_hdl, field_hdl, "qsr_hc_b") 452 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 453 domain_ref="grid_N", axis_ref="deptht" , operation = "instant") 454 455 CALL xios_add_child(file_hdl, field_hdl, "fraqsr_1lev") 456 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 457 domain_ref = "grid_N", operation = "instant") 458 !END traqsr.F90 459 #if defined key_dynspg_flt || defined key_esopa 460 !dynspg_flt.F90 461 CALL xios_add_child(file_hdl, field_hdl, "gcx") 462 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 463 domain_ref = "grid_N", operation = "instant") 464 465 CALL xios_add_child(file_hdl, field_hdl, "gcxb") 466 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 467 domain_ref = "grid_N", operation = "instant") 468 !end dynspg_flt.F90 469 #endif 470 !trasbc.F90 START 471 CALL xios_add_child(file_hdl, field_hdl, "sbc_hc_b") 472 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 473 domain_ref = "grid_N", operation = "instant") 474 475 CALL xios_add_child(file_hdl, field_hdl, "sbc_sc_b") 476 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 477 domain_ref = "grid_N", operation = "instant") 478 479 CALL xios_add_child(file_hdl, field_hdl, "fwf_isf_b") 480 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 481 domain_ref = "grid_N", operation = "instant") 482 483 CALL xios_add_child(file_hdl, field_hdl, "isf_sc_b") 484 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 485 domain_ref = "grid_N", operation = "instant") 486 487 CALL xios_add_child(file_hdl, field_hdl, "isf_hc_b") 488 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 489 domain_ref = "grid_N", operation = "instant") 490 !trasbc.F90 END 491 IF( lk_oasis) THEN 492 ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 493 IF( ln_coupled_iceshelf_fluxes ) THEN 494 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass") 495 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 496 scalar_ref = "grid_scalar", operation = "instant") 497 498 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_timelapsed") 499 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 500 scalar_ref = "grid_scalar", operation = "instant") 501 502 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass_roc") 503 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 504 scalar_ref = "grid_scalar", operation = "instant") 505 506 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass") 507 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 508 scalar_ref = "grid_scalar", operation = "instant") 509 510 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_timelapsed") 511 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 512 scalar_ref = "grid_scalar", operation = "instant") 513 514 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass_roc") 515 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 516 scalar_ref = "grid_scalar", operation = "instant") 517 ENDIF 518 ENDIF 519 #if defined key_zdfkpp 520 CALL xios_add_child(file_hdl, field_hdl, "rhd") 521 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 522 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 523 #endif 524 !dia_hsb_rst 525 #if defined key_diadct 526 IF( lk_diadct ) THEN 527 CALL xios_add_child(file_hdl, field_hdl, "frc_v") 528 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 529 scalar_ref = "grid_scalar", operation = "instant") 530 531 CALL xios_add_child(file_hdl, field_hdl, "frc_t") 532 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 533 scalar_ref = "grid_scalar", operation = "instant") 534 535 CALL xios_add_child(file_hdl, field_hdl, "frc_s") 536 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 537 scalar_ref = "grid_scalar", operation = "instant") 538 539 CALL xios_add_child(file_hdl, field_hdl, "ssh_ini") 540 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 541 domain_ref = "grid_N", operation = "instant") 542 543 CALL xios_add_child(file_hdl, field_hdl, "e3t_ini") 544 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 545 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 546 547 CALL xios_add_child(file_hdl, field_hdl, "hc_loc_ini") 548 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 549 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 550 551 CALL xios_add_child(file_hdl, field_hdl, "sc_loc_ini") 552 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 553 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 554 555 556 IF( .NOT. lk_vvl ) THEN 557 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_t") 558 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 559 scalar_ref = "grid_scalar", operation = "instant") 560 561 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_s") 562 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 563 scalar_ref = "grid_scalar", operation = "instant") 564 565 CALL xios_add_child(file_hdl, field_hdl, "ssh_hc_loc_ini") 566 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 567 domain_ref = "grid_N", operation = "instant") 568 569 CALL xios_add_child(file_hdl, field_hdl, "ssh_sc_loc_ini") 570 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 571 domain_ref = "grid_N", operation = "instant") 572 573 574 ENDIF 575 ENDIF 576 #endif 577 !end dia_hsb_rst 578 !domvvl.F90 579 IF( lk_vvl ) THEN 580 CALL xios_add_child(file_hdl, field_hdl, "fse3t_b") 581 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 582 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 583 584 CALL xios_add_child(file_hdl, field_hdl, "fse3t_n") 585 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 586 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 587 588 IF( lr_vvl_ztilde .OR. lr_vvl_layer ) THEN ! z_tilde and layer cases ! 589 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_b") 590 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 591 domain_ref = "grid_N", operation = "instant") 592 593 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_n") 594 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 595 domain_ref = "grid_N", operation = "instant") 596 END IF 597 IF( lr_vvl_ztilde ) THEN ! z_tilde case ! 598 CALL xios_add_child(file_hdl, field_hdl, "hdiv_lf") 599 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 600 domain_ref = "grid_N", operation = "instant") 601 ENDIF 602 ENDIF 603 !end domvvl.F90 604 !dynspg_ts.F90 605 #if defined key_dynspg_ts || defined key_esopa 606 CALL xios_add_child(file_hdl, field_hdl, "ub2_b") 607 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 608 domain_ref = "grid_N", operation = "instant") 609 610 CALL xios_add_child(file_hdl, field_hdl, "vb2_b") 611 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 612 domain_ref = "grid_N", operation = "instant") 613 614 615 IF (.NOT.ln_bt_av) THEN 616 CALL xios_add_child(file_hdl, field_hdl, "sshbb_e") 617 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 618 domain_ref = "grid_N", operation = "instant") 619 620 CALL xios_add_child(file_hdl, field_hdl, "ubb_e") 621 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 622 domain_ref = "grid_N", operation = "instant") 623 624 CALL xios_add_child(file_hdl, field_hdl, "vbb_e") 625 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 626 domain_ref = "grid_N", operation = "instant") 627 628 CALL xios_add_child(file_hdl, field_hdl, "sshb_e") 629 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 630 domain_ref = "grid_N", operation = "instant") 631 632 CALL xios_add_child(file_hdl, field_hdl, "ub_e") 633 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 634 domain_ref = "grid_N", operation = "instant") 635 636 CALL xios_add_child(file_hdl, field_hdl, "vb_e") 637 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 638 domain_ref = "grid_N", operation = "instant") 639 ENDIF 640 #if defined key_agrif 641 ! Save time integrated fluxes 642 IF ( .NOT.Agrif_Root() ) THEN 643 CALL xios_add_child(file_hdl, field_hdl, "ub2_i_b") 644 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 645 domain_ref = "grid_N", operation = "instant") 646 647 CALL xios_add_child(file_hdl, field_hdl, "vb2_i_b") 648 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 649 domain_ref = "grid_N", operation = "instant") 650 ENDIF 651 #endif 652 #endif 653 !end dynspg_ts.F90 654 !sbcapr.F90 655 IF( ln_apr_dyn) THEN 656 CALL xios_add_child(file_hdl, field_hdl, "ssh_ibb") 657 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 658 domain_ref = "grid_N", operation = "instant") 659 ENDIF 660 !end sbcapr.F90 661 !sbcrnf.F90 662 IF( ln_rnf ) THEN 663 CALL xios_add_child(file_hdl, field_hdl, "rnf_b") 664 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 665 domain_ref = "grid_N", operation = "instant") 666 667 CALL xios_add_child(file_hdl, field_hdl, "rnf_hc_b") 668 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 669 domain_ref = "grid_N", operation = "instant") 670 671 CALL xios_add_child(file_hdl, field_hdl, "rnf_sc_b") 672 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 673 domain_ref = "grid_N", operation = "instant") 674 ENDIF 675 !end sbcrnf.F90 676 !sbcssm.F90 677 IF( nn_components /= jp_iam_sas .AND. nn_fsbc .NE. 1) THEN 678 CALL xios_add_child(file_hdl, field_hdl, "nn_fsbc") 679 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 680 scalar_ref = "grid_scalar", operation = "instant") 681 682 CALL xios_add_child(file_hdl, field_hdl, "ssu_m") 683 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 684 domain_ref = "grid_N", operation = "instant") 685 686 CALL xios_add_child(file_hdl, field_hdl, "ssv_m") 687 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 688 domain_ref = "grid_N", operation = "instant") 689 690 CALL xios_add_child(file_hdl, field_hdl, "sst_m") 691 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 692 domain_ref = "grid_N", operation = "instant") 693 694 CALL xios_add_child(file_hdl, field_hdl, "sss_m") 695 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 696 domain_ref = "grid_N", operation = "instant") 697 698 CALL xios_add_child(file_hdl, field_hdl, "ssh_m") 699 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 700 domain_ref = "grid_N", operation = "instant") 701 702 CALL xios_add_child(file_hdl, field_hdl, "frq_m") 703 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 704 domain_ref = "grid_N", operation = "instant") 705 706 IF( lk_vvl ) THEN 707 CALL xios_add_child(file_hdl, field_hdl, "e3t_m") 708 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 709 domain_ref = "grid_N", operation = "instant") 710 ENDIF 711 ENDIF 712 !end sbcssm.F90 713 IF( lr_traadv_cen2 ) THEN 714 CALL xios_add_child(file_hdl, field_hdl, "avmb") 715 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 716 axis_ref = "deptht", operation = "instant") 717 718 CALL xios_add_child(file_hdl, field_hdl, "avtb") 719 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 720 axis_ref = "deptht", operation = "instant") 721 ENDIF 722 723 END SUBROUTINE set_numro_active 465 END SUBROUTINE set_rst_context 724 466 725 467 SUBROUTINE iom_swap( cdname ) … … 1631 1373 LOGICAL :: lx ! local xios write flag 1632 1374 INTEGER :: ivid ! variable id 1375 1633 1376 lx = .FALSE. 1634 1377 IF(PRESENT(lxios)) lx = lxios … … 1645 1388 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1646 1389 SELECT CASE (iom_file(kiomid)%iolib) 1647 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )1648 1390 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 1649 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar )1650 1391 CASE DEFAULT 1651 CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )1392 CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1652 1393 END SELECT 1653 1394 ENDIF … … 1666 1407 LOGICAL :: lx ! local xios write flag 1667 1408 INTEGER :: ivid ! variable id 1409 1668 1410 lx = .FALSE. 1669 1411 IF(PRESENT(lxios)) lx = lxios … … 1680 1422 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1681 1423 SELECT CASE (iom_file(kiomid)%iolib) 1682 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )1683 1424 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 1684 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar )1685 1425 CASE DEFAULT 1686 CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )1426 CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1687 1427 END SELECT 1688 1428 ENDIF … … 1699 1439 INTEGER , INTENT(in), OPTIONAL :: ktype ! variable external type 1700 1440 LOGICAL, OPTIONAL :: lxios ! xios write flag 1701 LOGICAL :: lx ! local xios write flag1441 LOGICAL :: lx 1702 1442 INTEGER :: ivid ! variable id 1443 1703 1444 lx = .FALSE. 1704 1445 IF(PRESENT(lxios)) lx = lxios … … 1715 1456 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1716 1457 SELECT CASE (iom_file(kiomid)%iolib) 1717 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )1718 1458 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 1719 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar )1720 1459 CASE DEFAULT 1721 CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )1460 CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1722 1461 END SELECT 1723 1462 ENDIF … … 1736 1475 LOGICAL :: lx ! local xios write flag 1737 1476 INTEGER :: ivid ! variable id 1477 1738 1478 lx = .FALSE. 1739 1479 IF(PRESENT(lxios)) lx = lxios … … 1750 1490 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1751 1491 SELECT CASE (iom_file(kiomid)%iolib) 1752 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )1753 1492 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1754 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar )1755 1493 CASE DEFAULT 1756 CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' )1494 CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1757 1495 END SELECT 1758 1496 ENDIF … … 1800 1538 SUBROUTINE iom_p3d( cdname, pfield3d ) 1801 1539 CHARACTER(LEN=*) , INTENT(in) :: cdname 1540 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: pfield3d 1802 1541 #if defined key_iomput 1803 1542 CALL xios_send_field(cdname, pfield3d) … … 1960 1699 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1961 1700 INTEGER :: ni,nj 1962 LOGICAL :: lxios1701 LOGICAL, INTENT(IN) :: lxios 1963 1702 1964 1703 ni=nlei-nldi+1 ; nj=nlej-nldj+1 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r8630 r8644 46 46 !$AGRIF_DO_NOT_TREAT 47 47 INTEGER, PUBLIC :: iom_open_init = 0 !: used to initialize iom_file(:)%nfid to 0 48 !XIOS readrestart48 !XIOS write restart 49 49 LOGICAL, PUBLIC :: lwxios !: read single file restart using XIOS 50 50 INTEGER, PUBLIC :: wxioso !: type of restart file when writing using XIOS 1 - single, 2 - multiple … … 71 71 END TYPE file_descriptor 72 72 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 73 74 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 95 73 75 !$AGRIF_END_DO_NOT_TREAT 76 77 TYPE, PUBLIC :: RST_FIELD 78 CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file 79 CHARACTER(len=30) :: grid = "NO_GRID" 80 LOGICAL :: active =.FALSE. ! for restart write only: true - write field, false do not write field 81 END TYPE RST_FIELD 82 TYPE(RST_FIELD), PUBLIC :: rst_wfields(max_rst_fields) 83 74 84 !!===================================================================== 75 85 END MODULE iom_def -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
r7646 r8644 126 126 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'x', kdompar(1,1) , idmy ), clinfo) 127 127 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'y', kdompar(2,1) , idmy ), clinfo) 128 CALL iom_nf90_check(NF90_DEF_DIM( if90id, ' z', jpk , idmy ), clinfo)129 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 't ', NF90_UNLIMITED, idmy ), clinfo)128 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', jpk , idmy ), clinfo) 129 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 130 130 ! global attributes 131 131 CALL iom_nf90_check(NF90_PUT_ATT( if90id, NF90_GLOBAL, 'DOMAIN_number_total' , jpnij ), clinfo) -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r8630 r8644 100 100 IF(.NOT.lwxios) THEN 101 101 SELECT CASE ( jprstlib ) 102 CASE ( jprstdimg ) ; WRITE(numout,*) &103 ' open ocean restart binary file: ',TRIM(clpath)//TRIM(clname)104 102 CASE DEFAULT ; WRITE(numout,*) & 105 103 ' open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname) … … 121 119 dlname = TRIM(Agrif_CFixed())//"_"//clname 122 120 ENDIF 123 CALL iom_ rstw_init( wxios_context, TRIM(clpath)//TRIM(dlname))121 CALL iom_init( wxios_context, TRIM(clpath)//TRIM(dlname)) 124 122 CALL xios_update_calendar(nitrst) 125 123 CALL iom_swap( cxios_context ) … … 146 144 IF(lwxios) CALL iom_swap( wxios_context ) 147 145 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt , lxios = lwxios) ! dynamics time step 148 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) , lxios = lwxios) ! surface tracer time step149 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics and tracer time step150 146 151 147 IF ( .NOT. ln_diurnal_only ) THEN 152 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub, lxios = lwxios )) ! before fields153 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb, lxios = lwxios ))154 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tsb(:,:,:,jp_tem), lxios = lwxios ))155 CALL iom_rstput( kt, nitrst, numrow, 'sb' , tsb(:,:,:,jp_sal), lxios = lwxios ))156 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb, lxios = lwxios ))148 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub, lxios = lwxios ) ! before fields 149 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb, lxios = lwxios ) 150 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tsb(:,:,:,jp_tem), lxios = lwxios ) 151 CALL iom_rstput( kt, nitrst, numrow, 'sb' , tsb(:,:,:,jp_sal), lxios = lwxios ) 152 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb, lxios = lwxios ) 157 153 ! 158 154 CALL iom_rstput( kt, nitrst, numrow, 'un' , un, lxios = lwxios ) ! now fields … … 164 160 ! extra variable needed for the ice sheet coupling 165 161 IF ( ln_iscpl ) THEN 166 CALL iom_rstput( kt, nitrst, numrow, 'tmask' , tmask 167 CALL iom_rstput( kt, nitrst, numrow, 'umask' , umask 168 CALL iom_rstput( kt, nitrst, numrow, 'vmask' , vmask 169 CALL iom_rstput( kt, nitrst, numrow, 'smask' , ssmask 170 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:) ) ! need to compute temperature correction171 CALL iom_rstput( kt, nitrst, numrow, 'e3u_n', e3u_n(:,:,:) ) ! need to compute bt conservation172 CALL iom_rstput( kt, nitrst, numrow, 'e3v_n', e3v_n(:,:,:) ) ! need to compute bt conservation173 CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw_n(:,:,:) ) ! need to compute extrapolation if vvl162 CALL iom_rstput( kt, nitrst, numrow, 'tmask' , tmask, lxios = lwxios ) ! need to extrapolate T/S 163 CALL iom_rstput( kt, nitrst, numrow, 'umask' , umask, lxios = lwxios ) ! need to correct barotropic velocity 164 CALL iom_rstput( kt, nitrst, numrow, 'vmask' , vmask, lxios = lwxios ) ! need to correct barotropic velocity 165 CALL iom_rstput( kt, nitrst, numrow, 'smask' , ssmask, lxios = lwxios) ! need to correct barotropic velocity 166 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:), lxios = lwxios ) ! need to compute temperature correction 167 CALL iom_rstput( kt, nitrst, numrow, 'e3u_n', e3u_n(:,:,:), lxios = lwxios ) ! need to compute bt conservation 168 CALL iom_rstput( kt, nitrst, numrow, 'e3v_n', e3v_n(:,:,:), lxios = lwxios ) ! need to compute bt conservation 169 CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw_n(:,:,:), lxios = lwxios ) ! need to compute extrapolation if vvl 174 170 END IF 175 171 ENDIF 176 172 177 IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst 178 173 IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst, lxios = lwxios ) 174 IF(lwxios) CALL iom_swap( cxios_context ) 179 175 IF( kt == nitrst ) THEN 180 176 IF(.NOT.lwxios) THEN -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
r8630 r8644 110 110 CALL ctl_warn( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' ) 111 111 ! 112 IF( lwxios ) THEN 113 CALL set_rstw_var_active('ssh_ibb') 114 ENDIF 112 115 END SUBROUTINE sbc_apr_init 113 116 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r8329 r8644 27 27 USE timing ! Timing 28 28 USE lib_fortran ! glob_sum 29 USE iom_def, ONLY : lwxios 29 30 30 31 IMPLICIT NONE … … 232 233 & 'at it= ', kt,' date= ', ndastp 233 234 IF(lwp) WRITE(numout,*) '~~~~' 234 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:) ) 235 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem) ) 236 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal) ) 235 IF( lwxios ) CALL iom_swap( wxios_context ) 236 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:), lxios = lwxios ) 237 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem), lxios = lwxios ) 238 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal), lxios = lwxios ) 239 IF( lwxios ) CALL iom_swap( cxios_context ) 237 240 ENDIF 238 241 ! … … 393 396 END DO 394 397 398 IF( lwxios ) THEN 399 CALL set_rstw_var_active('fwf_isf_b') 400 CALL set_rstw_var_active('isf_hc_b') 401 CALL set_rstw_var_active('isf_sc_b') 402 ENDIF 403 404 395 405 END SUBROUTINE sbc_isf_init 396 406 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r8630 r8644 342 342 IF( ln_wave ) CALL sbc_wave_init ! surface wave initialisation 343 343 ! 344 IF( lwxios ) THEN 345 CALL set_rstw_var_active('utau_b') 346 CALL set_rstw_var_active('vtau_b') 347 CALL set_rstw_var_active('qns_b') 348 ! The 3D heat content due to qsr forcing is treated in traqsr 349 ! CALL set_rstw_var_active('qsr_b') 350 CALL set_rstw_var_active('emp_b') 351 CALL set_rstw_var_active('sfx_b') 352 ENDIF 353 344 354 END SUBROUTINE sbc_init 345 355 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r8630 r8644 475 475 ENDIF 476 476 ! 477 IF( lwxios ) THEN 478 CALL set_rstw_var_active('rnf_b') 479 CALL set_rstw_var_active('rnf_hc_b') 480 CALL set_rstw_var_active('rnf_sc_b') 481 ENDIF 482 477 483 END SUBROUTINE sbc_rnf_init 478 484 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r8630 r8644 254 254 ENDIF 255 255 ! 256 IF( lwxios.AND.nn_fsbc > 1 ) THEN 257 CALL set_rstw_var_active('nn_fsbc') 258 CALL set_rstw_var_active('ssu_m') 259 CALL set_rstw_var_active('ssv_m') 260 CALL set_rstw_var_active('sst_m') 261 CALL set_rstw_var_active('sss_m') 262 CALL set_rstw_var_active('ssh_m') 263 CALL set_rstw_var_active('e3t_m') 264 CALL set_rstw_var_active('frq_m') 265 ENDIF 266 256 267 END SUBROUTINE sbc_ssm_init 257 268 -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
r8630 r8644 299 299 ! 300 300 CALL tra_adv_mle_init !== initialisation of the Mixed Layer Eddy parametrisation (MLE) ==! 301 lr_traadv_cen2 = ln_traadv_cen2302 301 ! 303 302 END SUBROUTINE tra_adv_init -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
r8630 r8644 438 438 ENDIF 439 439 ! 440 IF( lwxios ) THEN 441 CALL set_rstw_var_active('qsr_hc_b') 442 CALL set_rstw_var_active('fraqsr_1lev') 443 ENDIF 440 444 IF( nn_timing == 1 ) CALL timing_stop('tra_qsr_init') 441 445 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
r7646 r8644 34 34 USE timing ! Timing 35 35 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 36 USE iom_def, ONLY : lwxios 36 37 37 38 IMPLICIT NONE … … 1140 1141 CALL gls_rst( nit000, 'READ' ) !* read or initialize all required files 1141 1142 ! 1143 IF( lwxios ) THEN 1144 CALL set_rstw_var_active('en') 1145 CALL set_rstw_var_active('avt') 1146 CALL set_rstw_var_active('avm') 1147 CALL set_rstw_var_active('avmu') 1148 CALL set_rstw_var_active('avmv') 1149 CALL set_rstw_var_active('mxln') 1150 ENDIF 1151 1142 1152 IF( nn_timing == 1 ) CALL timing_stop('zdf_gls_init') 1143 1153 ! … … 1200 1210 ! ! ------------------- 1201 1211 IF(lwp) WRITE(numout,*) '---- gls-rst ----' 1202 CALL iom_rstput( kt, nitrst, numrow, 'en' , en ) 1203 CALL iom_rstput( kt, nitrst, numrow, 'avt' , avt_k ) 1204 CALL iom_rstput( kt, nitrst, numrow, 'avm' , avm_k ) 1205 CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k ) 1206 CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k ) 1207 CALL iom_rstput( kt, nitrst, numrow, 'mxln' , mxln ) 1212 IF( lwxios ) CALL iom_swap( wxios_context ) 1213 CALL iom_rstput( kt, nitrst, numrow, 'en' , en, lxios = lwxios ) 1214 CALL iom_rstput( kt, nitrst, numrow, 'avt' , avt_k, lxios = lwxios ) 1215 CALL iom_rstput( kt, nitrst, numrow, 'avm' , avm_k, lxios = lwxios ) 1216 CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k, lxios = lwxios ) 1217 CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k, lxios = lwxios ) 1218 CALL iom_rstput( kt, nitrst, numrow, 'mxln' , mxln, lxios = lwxios ) 1219 IF( lwxios ) CALL iom_swap( cxios_context ) 1208 1220 ! 1209 1221 ENDIF -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r8630 r8644 815 815 CALL tke_rst( nit000, 'READ' ) !* read or initialize all required files 816 816 ! 817 IF( lwxios ) THEN 818 CALL set_rstw_var_active('en') 819 CALL set_rstw_var_active('avt') 820 CALL set_rstw_var_active('avm') 821 CALL set_rstw_var_active('avmu') 822 CALL set_rstw_var_active('avmv') 823 CALL set_rstw_var_active('dissl') 824 ENDIF 825 817 826 END SUBROUTINE zdf_tke_init 818 827
Note: See TracChangeset
for help on using the changeset viewer.