Changeset 9970
- Timestamp:
- 2018-07-19T10:41:25+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r9499 r9970 65 65 PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 66 66 PRIVATE iom_set_rst_context, iom_set_rstw_active, iom_set_rstr_active 67 PUBLIC iom_set_rstw_var_active, iom_set_rst_vars68 67 # endif 68 PUBLIC iom_set_rstw_var_active, iom_set_rstw_core, iom_set_rst_vars 69 69 70 70 INTERFACE iom_get … … 80 80 MODULE PROCEDURE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 81 81 END INTERFACE 82 INTERFACE iom_put83 MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d84 END INTERFACE82 INTERFACE iom_put 83 MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 84 END INTERFACE 85 85 86 86 !!---------------------------------------------------------------------- … … 91 91 CONTAINS 92 92 93 SUBROUTINE iom_init( cdname, fname )93 SUBROUTINE iom_init( cdname, fname, ld_tmppatch ) 94 94 !!---------------------------------------------------------------------- 95 95 !! *** ROUTINE *** … … 100 100 CHARACTER(len=*), INTENT(in) :: cdname 101 101 CHARACTER(len=*), OPTIONAL, INTENT(in) :: fname 102 LOGICAL , OPTIONAL, INTENT(in) :: ld_tmppatch 102 103 #if defined key_iomput 103 104 ! … … 109 110 ! 110 111 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds 111 !!---------------------------------------------------------------------- 112 LOGICAL :: ll_tmppatch = .TRUE. !: seb: patch before we remove periodicity 113 INTEGER :: nldi_save, nlei_save !: and close boundaries in output files 114 INTEGER :: nldj_save, nlej_save !: 115 !!---------------------------------------------------------------------- 116 ! 117 ! seb: patch before we remove periodicity and close boundaries in output files 118 IF( PRESENT(ld_tmppatch) ) THEN ; ll_tmppatch = ld_tmppatch 119 ELSE ; ll_tmppatch = .TRUE. 120 ENDIF 121 IF ( ll_tmppatch ) THEN 122 nldi_save = nldi ; nlei_save = nlei 123 nldj_save = nldj ; nlej_save = nlej 124 IF( nimpp == 1 ) nldi = 1 125 IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 126 IF( njmpp == 1 ) nldj = 1 127 IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 128 ENDIF 112 129 ! 113 130 ALLOCATE( zt_bnds(2,jpk), zw_bnds(2,jpk) ) … … 232 249 DEALLOCATE( zt_bnds, zw_bnds ) 233 250 ! 251 IF ( ll_tmppatch ) THEN 252 nldi = nldi_save ; nlei = nlei_save 253 nldj = nldj_save ; nlej = nlej_save 254 ENDIF 234 255 #endif 235 256 ! … … 245 266 INTEGER :: i 246 267 LOGICAL :: llis_set 247 268 CHARACTER(LEN=256) :: clinfo ! info character 269 270 #if defined key_iomput 248 271 llis_set = .FALSE. 249 272 … … 263 286 nstop = nstop + 1 264 287 ENDIF 288 #else 289 clinfo = 'iom_set_rstw_var_active: key_iomput is needed to use XIOS restart read/write functionality' 290 CALL ctl_stop('STOP', TRIM(clinfo)) 291 #endif 265 292 266 293 END SUBROUTINE iom_set_rstw_var_active … … 276 303 !sets enabled = .TRUE. for each field in restart file 277 304 CHARACTER(len=256) :: rst_file 305 306 #if defined key_iomput 278 307 TYPE(xios_field) :: field_hdl 279 308 TYPE(xios_file) :: file_hdl … … 319 348 ENDIF 320 349 END DO 350 #endif 321 351 END SUBROUTINE iom_set_rstr_active 322 352 … … 328 358 !!--------------------------------------------------------------------- 329 359 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 330 360 CHARACTER(LEN=256) :: clinfo ! info character 361 #if defined key_iomput 331 362 IF(cdmdl == "OPA") THEN 332 363 !from restart.F90 … … 362 393 CALL iom_set_rstw_var_active('sbc_sc_b') 363 394 ENDIF 395 #else 396 clinfo = 'iom_set_rstw_core: key_iomput is needed to use XIOS restart read/write functionality' 397 CALL ctl_stop('STOP', TRIM(clinfo)) 398 #endif 364 399 END SUBROUTINE iom_set_rstw_core 365 400 … … 539 574 SUBROUTINE iom_set_rst_context( ) 540 575 !!--------------------------------------------------------------------- 541 !! *** SUBROUTINE iom_set_rst r_active***576 !! *** SUBROUTINE iom_set_rst_context *** 542 577 !! 543 578 !! ** Purpose : Define domain, axis and grid for restart (read/write) … … 869 904 IF( PRESENT(kdimsz) ) THEN 870 905 i_nvd = iom_file(kiomid)%ndims(iiv) 871 IF( i_nvd == size(kdimsz) ) THEN872 kdimsz( :) = iom_file(kiomid)%dimsz(1:i_nvd,iiv)906 IF( i_nvd <= size(kdimsz) ) THEN 907 kdimsz(1:i_nvd) = iom_file(kiomid)%dimsz(1:i_nvd,iiv) 873 908 ELSE 874 909 WRITE(ctmp1,*) i_nvd, size(kdimsz) … … 929 964 ENDIF 930 965 ELSE 966 #if defined key_iomput 931 967 IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 932 968 CALL iom_swap( TRIM(crxios_context) ) 933 969 CALL xios_recv_field( trim(cdvar), pvar) 934 970 CALL iom_swap( TRIM(cxios_context) ) 971 #else 972 nstop = nstop + 1 973 clinfo = 'Can not use XIOS in iom_g0d, file: '//trim(clname)//', var:'//trim(cdvar) 974 #endif 935 975 ENDIF 936 976 END SUBROUTINE iom_g0d … … 1115 1155 ! Identify the domain in case of jpdom_local definition 1116 1156 IF( idom == jpdom_local ) THEN 1157 WRITE(numout,*) jpi,jpj,idimsz(1),idimsz(2),nlci,nlcj,nlei,nldi,nlej,nldj 1158 CALL FLUSH(numout) 1117 1159 IF( idimsz(1) == jpi .AND. idimsz(2) == jpj ) THEN ; idom = jpdom_local_full 1118 1160 ELSEIF( idimsz(1) == nlci .AND. idimsz(2) == nlcj ) THEN ; idom = jpdom_local_noextra … … 1292 1334 CALL iom_swap( TRIM(crxios_context) ) 1293 1335 IF( PRESENT(pv_r3d) ) THEN 1336 pv_r3d(:, :, :) = 0. 1294 1337 if(lwp) write(numout,*) 'XIOS RST READ (3D): ',trim(cdvar) 1295 1338 CALL xios_recv_field( trim(cdvar), pv_r3d) … … 1298 1341 ENDIF 1299 1342 ELSEIF( PRESENT(pv_r2d) ) THEN 1343 pv_r2d(:, :) = 0. 1300 1344 if(lwp) write(numout,*) 'XIOS RST READ (2D): ', trim(cdvar) 1301 1345 CALL xios_recv_field( trim(cdvar), pv_r2d) … … 1304 1348 ENDIF 1305 1349 ELSEIF( PRESENT(pv_r1d) ) THEN 1350 pv_r1d(:) = 0. 1306 1351 if(lwp) write(numout,*) 'XIOS RST READ (1D): ', trim(cdvar) 1307 1352 CALL xios_recv_field( trim(cdvar), pv_r1d) … … 1716 1761 #if defined key_iomput 1717 1762 !!---------------------------------------------------------------------- 1718 !! 'key_iomput' IOMinterface1763 !! 'key_iomput' XIOS interface 1719 1764 !!---------------------------------------------------------------------- 1720 1765 -
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r9499 r9970 80 80 !$AGRIF_END_DO_NOT_TREAT 81 81 ! 82 TYPE(RST_FIELD), PUBLIC :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields)82 TYPE(RST_FIELD), PUBLIC, SAVE :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields) 83 83 ! 84 84 !!---------------------------------------------------------------------- -
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
r9499 r9970 253 253 ! return the simension size 254 254 IF( PRESENT(kdimsz) ) THEN 255 IF( i_nvd == SIZE(kdimsz) ) THEN256 kdimsz( :) = iom_file(kiomid)%dimsz(1:i_nvd,kiv)255 IF( i_nvd <= SIZE(kdimsz) ) THEN 256 kdimsz(1:i_nvd) = iom_file(kiomid)%dimsz(1:i_nvd,kiv) 257 257 ELSE 258 258 WRITE(ctmp1,*) i_nvd, SIZE(kdimsz) -
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
r9499 r9970 361 361 9000 FORMAT(a41,i4.4,a14) 362 362 9001 FORMAT(a59) 363 9002 FORMAT(a20,i4.4,a36,i 3.3)363 9002 FORMAT(a20,i4.4,a36,i4.4) 364 364 9003 FORMAT(a20,i4.4,a17,i4.4) 365 365 9004 FORMAT(a11,i4.4,a26,i4.4,a14) -
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r9499 r9970 62 62 CHARACTER(lc) :: clpath ! full path to ocean output restart file 63 63 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 64 CHARACTER(LEN=256) :: clinfo ! info character 64 65 !!---------------------------------------------------------------------- 65 66 ! … … 110 111 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 111 112 ELSE 113 #if defined key_iomput 112 114 cwxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 113 115 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 116 118 clpname = TRIM(Agrif_CFixed())//"_"//clname 117 119 ENDIF 118 CALL iom_init( cwxios_context, TRIM(clpath)//TRIM(clpname) )120 CALL iom_init( cwxios_context, TRIM(clpath)//TRIM(clpname), .false. ) 119 121 CALL xios_update_calendar(nitrst) 120 122 CALL iom_swap( cxios_context ) 123 #else 124 clinfo = 'Can not use XIOS in rst_opn' 125 CALL ctl_stop(TRIM(clinfo)) 126 #endif 121 127 ENDIF 122 128 lrst_oce = .TRUE. … … 222 228 IF( .NOT.lxios_set ) THEN 223 229 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS' 224 CALL iom_init( crxios_context )230 CALL iom_init( crxios_context, ld_tmppatch = .false. ) 225 231 lxios_set = .TRUE. 226 232 ENDIF 227 233 ENDIF 228 234 IF( TRIM(Agrif_CFixed()) /= '0' .AND. lrxios) THEN 229 CALL iom_init( crxios_context )235 CALL iom_init( crxios_context, ld_tmppatch = .false. ) 230 236 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for AGRIF' 231 237 lxios_set = .TRUE. -
branches/UKMO/dev_merge_2017_CICE_interface_SI3_JGLR/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
r9942 r9970 165 165 ndaice_da(jpi,jpj) , nfresh_da(jpi,jpj) , nfsalt_da(jpi,jpj) , & 166 166 #endif 167 sstfrz(jpi,jpj) , STAT= ierr(2) )167 sstfrz(jpi,jpj) , qsr_ice_tr(jpi,jpj,jpl), STAT= ierr(2) ) 168 168 IF( ln_cpl ) ALLOCATE( u_ice(jpi,jpj) , t1_ice (jpi,jpj,jpl) , & 169 169 & v_ice(jpi,jpj) , alb_ice(jpi,jpj,1) , & 170 & emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj, 1) , &170 & emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj,jpl) , & 171 171 & a_ip(jpi,jpj,jpl) , v_ip(jpi,jpj,jpl) , tsfc_ice(jpi,jpj,jpl) , & 172 172 & cnd_ice(jpi,jpj,jpl) , STAT=ierr(3) )
Note: See TracChangeset
for help on using the changeset viewer.