- Timestamp:
- 2016-04-07T16:32:24+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GC3p0_package/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r6439 r6440 94 94 CHARACTER(len=*), INTENT(in) :: cdname 95 95 #if defined key_iomput 96 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) 97 CHARACTER(len=19) :: cldate 98 CHARACTER(len=10) :: clname 99 INTEGER :: ji 96 #if ! defined key_xios2 97 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) 98 CHARACTER(len=19) :: cldate 99 #else 100 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 101 TYPE(xios_date) :: start_date 102 #endif 103 CHARACTER(len=10) :: clname 104 INTEGER :: ji 100 105 ! 101 106 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_bnds 102 107 !!---------------------------------------------------------------------- 103 108 #if ! defined key_xios2 104 109 ALLOCATE( z_bnds(jpk,2) ) 110 #else 111 ALLOCATE( z_bnds(2,jpk) ) 112 #endif 105 113 106 114 clname = cdname … … 110 118 111 119 ! calendar parameters 120 #if ! defined key_xios2 112 121 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 113 122 CASE ( 1) ; CALL xios_set_context_attr(TRIM(clname), calendar_type= "Gregorian") … … 117 126 WRITE(cldate,"(i4.4,'-',i2.2,'-',i2.2,' 00:00:00')") nyear,nmonth,nday 118 127 CALL xios_set_context_attr(TRIM(clname), start_date=cldate ) 119 128 #else 129 ! Calendar type is now defined in xml file 130 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 131 CASE ( 1) ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 132 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 133 CASE ( 0) ; CALL xios_define_calendar( TYPE = "NoLeap" , time_origin = xios_date(1900,01,01,00,00,00), & 134 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 135 CASE (30) ; CALL xios_define_calendar( TYPE = "D360" , time_origin = xios_date(1900,01,01,00,00,00), & 136 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 137 END SELECT 138 #endif 120 139 ! horizontal grid definition 140 121 141 CALL set_scalar 122 142 … … 170 190 171 191 ! Add vertical grid bounds 192 #if ! defined key_xios2 172 193 z_bnds(: ,1) = gdepw_1d(:) 173 194 z_bnds(1:jpkm1,2) = gdepw_1d(2:jpk) 174 195 z_bnds(jpk: ,2) = gdepw_1d(jpk) + e3t_1d(jpk) 196 #else 197 z_bnds(1 ,:) = gdepw_1d(:) 198 z_bnds(2,1:jpkm1) = gdepw_1d(2:jpk) 199 z_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 200 #endif 201 175 202 CALL iom_set_axis_attr( "deptht", bounds=z_bnds ) 176 203 CALL iom_set_axis_attr( "depthu", bounds=z_bnds ) 177 204 CALL iom_set_axis_attr( "depthv", bounds=z_bnds ) 178 z_bnds(: ,2) = gdept_1d(:) 179 z_bnds(2:jpk,1) = gdept_1d(1:jpkm1) 180 z_bnds(1 ,1) = gdept_1d(1) - e3w_1d(1) 205 206 #if ! defined key_xios2 207 z_bnds(: ,2) = gdept_1d(:) 208 z_bnds(2:jpk,1) = gdept_1d(1:jpkm1) 209 z_bnds(1 ,1) = gdept_1d(1) - e3w_1d(1) 210 #else 211 z_bnds(2,: ) = gdept_1d(:) 212 z_bnds(1,2:jpk) = gdept_1d(1:jpkm1) 213 z_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 214 #endif 181 215 CALL iom_set_axis_attr( "depthw", bounds=z_bnds ) 216 182 217 183 218 # if defined key_floats … … 1156 1191 REAL(wp), DIMENSION(:) , OPTIONAL, INTENT(in) :: lonvalue, latvalue 1157 1192 REAL(wp), DIMENSION(:,:) , OPTIONAL, INTENT(in) :: bounds_lon, bounds_lat, area 1158 LOGICAL, DIMENSION(:,:) , OPTIONAL, INTENT(in) :: mask 1159 1193 #if ! defined key_xios2 1194 LOGICAL, DIMENSION(:,:) , OPTIONAL, INTENT(in) :: mask 1195 #else 1196 LOGICAL, DIMENSION(:) , OPTIONAL, INTENT(in) :: mask 1197 #endif 1198 1199 #if ! defined key_xios2 1160 1200 IF ( xios_is_valid_domain (cdid) ) THEN 1161 1201 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & … … 1164 1204 & lonvalue=lonvalue, latvalue=latvalue, mask=mask, nvertex=nvertex, bounds_lon=bounds_lon, & 1165 1205 & bounds_lat=bounds_lat, area=area ) 1166 ENDIF 1167 1206 ENDIF 1168 1207 IF ( xios_is_valid_domaingroup(cdid) ) THEN 1169 1208 CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & … … 1173 1212 & bounds_lat=bounds_lat, area=area ) 1174 1213 ENDIF 1214 1215 #else 1216 IF ( xios_is_valid_domain (cdid) ) THEN 1217 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1218 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1219 & lonvalue_1D=lonvalue, latvalue_1D=latvalue, mask_1D=mask, nvertex=nvertex, bounds_lon_1D=bounds_lon, & 1220 & bounds_lat_1D=bounds_lat, area=area, type='curvilinear') 1221 ENDIF 1222 IF ( xios_is_valid_domaingroup(cdid) ) THEN 1223 CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1224 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1225 & lonvalue_1D=lonvalue, latvalue_1D=latvalue, mask_1D=mask, nvertex=nvertex, bounds_lon_1D=bounds_lon, & 1226 & bounds_lat_1D=bounds_lat, area=area, type='curvilinear' ) 1227 ENDIF 1228 #endif 1175 1229 CALL xios_solve_inheritance() 1176 1230 1177 1231 END SUBROUTINE iom_set_domain_attr 1232 1233 #if defined key_xios2 1234 SUBROUTINE iom_set_zoom_domain_attr( cdid, ibegin, jbegin, ni, nj) 1235 CHARACTER(LEN=*) , INTENT(in) :: cdid 1236 INTEGER , OPTIONAL, INTENT(in) :: ibegin, jbegin, ni, nj 1237 1238 IF ( xios_is_valid_zoom_domain (cdid) ) THEN 1239 CALL xios_set_zoom_domain_attr ( cdid, ibegin=ibegin, jbegin=jbegin, ni=ni, & 1240 & nj=nj) 1241 ENDIF 1242 END SUBROUTINE iom_set_zoom_domain_attr 1243 #endif 1178 1244 1179 1245 … … 1183 1249 REAL(wp), DIMENSION(:,:), OPTIONAL, INTENT(in) :: bounds 1184 1250 IF ( PRESENT(paxis) ) THEN 1251 #if ! defined key_xios2 1185 1252 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, size=SIZE(paxis), value=paxis ) 1186 1253 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, size=SIZE(paxis), value=paxis ) 1254 #else 1255 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, n_glo=SIZE(paxis), value=paxis ) 1256 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, n_glo=SIZE(paxis), value=paxis ) 1257 #endif 1187 1258 ENDIF 1188 1259 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, bounds=bounds ) … … 1191 1262 END SUBROUTINE iom_set_axis_attr 1192 1263 1193 1194 1264 SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset ) 1195 1265 CHARACTER(LEN=*) , INTENT(in) :: cdid 1196 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_op 1197 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_offset 1198 IF ( xios_is_valid_field (cdid) ) CALL xios_set_field_attr ( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1199 IF ( xios_is_valid_fieldgroup(cdid) ) CALL xios_set_fieldgroup_attr( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1266 #if ! defined key_xios2 1267 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_op 1268 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_offset 1269 #else 1270 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_op 1271 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_offset 1272 #endif 1273 IF ( xios_is_valid_field (cdid) ) CALL xios_set_field_attr & 1274 & ( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1275 IF ( xios_is_valid_fieldgroup(cdid) ) CALL xios_set_fieldgroup_attr & 1276 & ( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1200 1277 CALL xios_solve_inheritance() 1201 1278 END SUBROUTINE iom_set_field_attr 1202 1203 1279 1204 1280 SUBROUTINE iom_set_file_attr( cdid, name, name_suffix ) … … 1213 1289 SUBROUTINE iom_get_file_attr( cdid, name, name_suffix, output_freq ) 1214 1290 CHARACTER(LEN=*) , INTENT(in ) :: cdid 1215 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix, output_freq 1291 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix 1292 #if ! defined key_xios2 1293 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: output_freq 1294 #else 1295 TYPE(xios_duration) ,OPTIONAL , INTENT(out) :: output_freq 1296 #endif 1216 1297 LOGICAL :: llexist1,llexist2,llexist3 1217 1298 !--------------------------------------------------------------------- 1218 1299 IF( PRESENT( name ) ) name = '' ! default values 1219 1300 IF( PRESENT( name_suffix ) ) name_suffix = '' 1301 #if ! defined key_xios2 1220 1302 IF( PRESENT( output_freq ) ) output_freq = '' 1303 #else 1304 IF( PRESENT( output_freq ) ) output_freq = xios_duration(0,0,0,0,0,0) 1305 #endif 1221 1306 IF ( xios_is_valid_file (cdid) ) THEN 1222 1307 CALL xios_solve_inheritance() … … 1239 1324 CHARACTER(LEN=*) , INTENT(in) :: cdid 1240 1325 LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) :: mask 1326 #if ! defined key_xios2 1241 1327 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask=mask ) 1242 1328 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask=mask ) 1329 #else 1330 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask_3D=mask ) 1331 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask_3D=mask ) 1332 #endif 1243 1333 CALL xios_solve_inheritance() 1244 1334 END SUBROUTINE iom_set_grid_attr … … 1282 1372 ni=nlei-nldi+1 ; nj=nlej-nldj+1 1283 1373 1284 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1374 #if ! defined key_xios2 1375 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1376 #else 1377 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) 1378 #endif 1285 1379 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1286 1380 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & … … 1296 1390 END SELECT 1297 1391 ! 1392 #if ! defined key_xios2 1298 1393 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni,nj /)) /= 0. ) 1394 #else 1395 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni*nj /)) /= 0. ) 1396 #endif 1299 1397 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,:),(/ni,nj,jpk/)) /= 0. ) 1300 1398 ENDIF … … 1430 1528 ALLOCATE( zlon(ni*nj) ) ; zlon(:) = 0. 1431 1529 1530 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots) 1531 #if ! defined key_xios2 1432 1532 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1433 1533 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) … … 1435 1535 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1436 1536 ! 1437 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots)1438 1537 CALL iom_set_domain_attr ('ptr', zoom_ibegin=ix, zoom_nj=jpjglo) 1538 #else 1539 ! Pas teste : attention aux indices ! 1540 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1541 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1542 CALL iom_set_domain_attr("gznl", lonvalue = zlon, & 1543 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1544 CALL iom_set_zoom_domain_attr ("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 1545 #endif 1546 1439 1547 CALL iom_update_file_name('ptr') 1440 1548 ! … … 1450 1558 REAL(wp), DIMENSION(1) :: zz = 1. 1451 1559 !!---------------------------------------------------------------------- 1560 #if ! defined key_xios2 1452 1561 CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea, jbegin=1, ni=1, nj=1) 1562 #else 1563 CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea-1, jbegin=0, ni=1, nj=1) 1564 #endif 1453 1565 CALL iom_set_domain_attr('scalarpoint', data_dim=2, data_ibegin = 1, data_ni = 1, data_jbegin = 1, data_nj = 1) 1454 1566 1455 1567 zz=REAL(narea,wp) 1456 1568 CALL iom_set_domain_attr('scalarpoint', lonvalue=zz, latvalue=zz) 1457 1569 1458 1570 END SUBROUTINE set_scalar 1459 1571 … … 1479 1591 REAL(wp) ,DIMENSION( 3) :: zlonpira ! longitudes of pirata moorings 1480 1592 REAL(wp) ,DIMENSION( 9) :: zlatpira ! latitudes of pirata moorings 1593 #if defined key_xios2 1594 TYPE(xios_duration) :: f_op, f_of 1595 #endif 1596 1481 1597 !!---------------------------------------------------------------------- 1482 1598 ! 1483 1599 ! frequency of the call of iom_put (attribut: freq_op) 1484 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts') 1485 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op = cl1//'ts', freq_offset='0ts') 1486 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC_scalar' , freq_op = cl1//'ts', freq_offset='0ts') 1487 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('ptrc_T' , freq_op = cl1//'ts', freq_offset='0ts') 1488 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('diad_T' , freq_op = cl1//'ts', freq_offset='0ts') 1600 #if ! defined key_xios2 1601 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op=cl1//'ts', freq_offset='0ts') 1602 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op=cl1//'ts', freq_offset='0ts') 1603 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC_scalar' , freq_op=cl1//'ts', freq_offset='0ts') 1604 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('ptrc_T' , freq_op=cl1//'ts', freq_offset='0ts') 1605 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('diad_T' , freq_op=cl1//'ts', freq_offset='0ts') 1606 #else 1607 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 1608 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC' , freq_op=f_op, freq_offset=f_of) 1609 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op=f_op, freq_offset=f_of) 1610 f_op%timestep = nn_dttrc ; f_of%timestep = 0 ; CALL iom_set_field_attr('ptrc_T' , freq_op=f_op, freq_offset=f_of) 1611 f_op%timestep = nn_dttrc ; f_of%timestep = 0 ; CALL iom_set_field_attr('diad_T' , freq_op=f_op, freq_offset=f_of) 1612 #endif 1489 1613 1490 1614 ! output file names (attribut: name) … … 1508 1632 ! Equatorial section (attributs: jbegin, ni, name_suffix) 1509 1633 CALL dom_ngb( 0., 0., ix, iy, cl1 ) 1634 #if ! defined key_xios2 1510 1635 CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 1636 #else 1637 CALL iom_set_zoom_domain_attr ('Eq'//cl1, jbegin=iy-1, ni=jpiglo) 1638 #endif 1511 1639 CALL iom_get_file_attr ('Eq'//cl1, name_suffix = clsuff ) 1512 1640 CALL iom_set_file_attr ('Eq'//cl1, name_suffix = TRIM(clsuff)//'_Eq') … … 1588 1716 ENDIF 1589 1717 clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon)) 1718 #if ! defined key_xios2 1590 1719 CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 1720 #else 1721 CALL iom_set_zoom_domain_attr (TRIM(clname)//cl1, ibegin= ix-1, jbegin= iy-1) 1722 #endif 1591 1723 CALL iom_get_file_attr (TRIM(clname)//cl1, name_suffix = clsuff ) 1592 1724 CALL iom_set_file_attr (TRIM(clname)//cl1, name_suffix = TRIM(clsuff)//'_'//TRIM(clname)) … … 1617 1749 REAL(wp) :: zsec 1618 1750 LOGICAL :: llexist 1619 !!---------------------------------------------------------------------- 1751 #if defined key_xios2 1752 TYPE(xios_duration) :: output_freq 1753 #endif 1754 !!---------------------------------------------------------------------- 1755 1620 1756 1621 1757 DO jn = 1,2 1622 1758 #if ! defined key_xios2 1623 1759 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = clfreq ) 1760 #else 1761 output_freq = xios_duration(0,0,0,0,0,0) 1762 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = output_freq ) 1763 #endif 1624 1764 IF( jn == 2 ) CALL iom_get_file_attr( cdid, name_suffix = clname ) 1625 1765 … … 1632 1772 END DO 1633 1773 1774 #if ! defined key_xios2 1634 1775 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1635 1776 DO WHILE ( idx /= 0 ) … … 1644 1785 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1645 1786 END DO 1646 1787 #else 1788 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1789 DO WHILE ( idx /= 0 ) 1790 IF ( output_freq%timestep /= 0) THEN 1791 WRITE(clfreq,'(I18,A2)')INT(output_freq%timestep),'ts' 1792 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1793 ELSE IF ( output_freq%hour /= 0 ) THEN 1794 WRITE(clfreq,'(I19,A1)')INT(output_freq%hour),'h' 1795 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1796 ELSE IF ( output_freq%day /= 0 ) THEN 1797 WRITE(clfreq,'(I19,A1)')INT(output_freq%day),'d' 1798 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1799 ELSE IF ( output_freq%month /= 0 ) THEN 1800 WRITE(clfreq,'(I19,A1)')INT(output_freq%month),'m' 1801 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1802 ELSE IF ( output_freq%year /= 0 ) THEN 1803 WRITE(clfreq,'(I19,A1)')INT(output_freq%year),'y' 1804 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1805 ELSE 1806 CALL ctl_stop('error in the name of file id '//TRIM(cdid), & 1807 & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) ) 1808 ENDIF 1809 clname = clname(1:idx-1)//TRIM(ADJUSTL(clfreq))//clname(idx+6:LEN_TRIM(clname)) 1810 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1811 END DO 1812 #endif 1647 1813 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1648 1814 DO WHILE ( idx /= 0 ) … … 1673 1839 END DO 1674 1840 1841 IF( jn == 1 .AND. TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 1675 1842 IF( jn == 1 ) CALL iom_set_file_attr( cdid, name = clname ) 1676 1843 IF( jn == 2 ) CALL iom_set_file_attr( cdid, name_suffix = clname ) … … 1720 1887 ENDIF 1721 1888 1889 !$AGRIF_DO_NOT_TREAT 1890 ! Should be fixed in the conv 1722 1891 IF( llfull ) THEN 1723 1892 clfmt = TRIM(clfmt)//",'_',i2.2,':',i2.2,':',i2.2" … … 1730 1899 WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday ! date of the end of run 1731 1900 ENDIF 1901 !$AGRIF_END_DO_NOT_TREAT 1732 1902 1733 1903 END FUNCTION iom_sdate
Note: See TracChangeset
for help on using the changeset viewer.