Changeset 9984
- Timestamp:
- 2018-07-20T15:46:02+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/IOM/iom.F90
r9930 r9984 150 150 ! 151 151 IF( TRIM(cdname) == TRIM(cxios_context) ) THEN 152 CALL set_grid( "T", glamt, gphit, .FALSE. )153 CALL set_grid( "U", glamu, gphiu, .FALSE. )154 CALL set_grid( "V", glamv, gphiv, .FALSE. )155 CALL set_grid( "W", glamt, gphit, .FALSE. )152 CALL set_grid( "T", glamt, gphit, .FALSE., .FALSE. ) 153 CALL set_grid( "U", glamu, gphiu, .FALSE., .FALSE. ) 154 CALL set_grid( "V", glamv, gphiv, .FALSE., .FALSE. ) 155 CALL set_grid( "W", glamt, gphit, .FALSE., .FALSE. ) 156 156 CALL set_grid_znl( gphit ) 157 157 ! … … 171 171 CALL dom_grid_crs ! Save the parent grid information & Switch to coarse grid domain 172 172 ! 173 CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE. )174 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE. )175 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE. )176 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE. )173 CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 174 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. ) 175 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. ) 176 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 177 177 CALL set_grid_znl( gphit_crs ) 178 178 ! … … 227 227 IF( TRIM(cdname) == TRIM(crxios_context) ) THEN 228 228 !set names of the fields in restart file IF using XIOS to read data 229 CALL iom_set_rst_context( )229 CALL iom_set_rst_context(.TRUE.) 230 230 CALL iom_set_rst_vars(rst_rfields) 231 231 !set which fields are to be read from restart file … … 233 233 ELSE IF( TRIM(cdname) == TRIM(cwxios_context) ) THEN 234 234 !set names of the fields in restart file IF using XIOS to write data 235 CALL iom_set_rst_context( )235 CALL iom_set_rst_context(.FALSE.) 236 236 CALL iom_set_rst_vars(rst_wfields) 237 237 !set which fields are to be written to a restart file … … 571 571 END SUBROUTINE iom_set_rstw_active 572 572 573 SUBROUTINE iom_set_rst_context( 573 SUBROUTINE iom_set_rst_context(ld_rstr) 574 574 !!--------------------------------------------------------------------- 575 575 !! *** SUBROUTINE iom_set_rst_context *** … … 579 579 !! 580 580 !!--------------------------------------------------------------------- 581 LOGICAL, INTENT(IN) :: ld_rstr 582 !ld_rstr is true for restart context. There is no need to define grid for 583 !restart read, because it's read from file 581 584 #if defined key_iomput 582 585 TYPE(xios_domaingroup) :: domaingroup_hdl … … 589 592 CALL xios_get_handle("domain_definition",domaingroup_hdl) 590 593 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 591 CALL set_grid("N", glamt, gphit, .TRUE. )594 CALL set_grid("N", glamt, gphit, .TRUE., ld_rstr) 592 595 593 596 CALL xios_get_handle("axis_definition",axisgroup_hdl) … … 1935 1938 1936 1939 1937 SUBROUTINE set_grid( cdgrd, plon, plat, ldxios )1940 SUBROUTINE set_grid( cdgrd, plon, plat, ldxios, ldrxios ) 1938 1941 !!---------------------------------------------------------------------- 1939 1942 !! *** ROUTINE set_grid *** … … 1947 1950 INTEGER :: ni, nj 1948 1951 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1949 LOGICAL, INTENT(IN) :: ldxios 1952 LOGICAL, INTENT(IN) :: ldxios, ldrxios 1950 1953 !!---------------------------------------------------------------------- 1951 1954 ! … … 1955 1958 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1956 1959 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1957 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & 1960 !don't define lon and lat for restart reading context. 1961 IF ( .NOT.ldrxios ) & 1962 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & 1958 1963 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1959 1964 !
Note: See TracChangeset
for help on using the changeset viewer.