Changeset 5928 for branches/2015
- Timestamp:
- 2015-11-26T14:06:35+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5918_nemo_v3_6_STABLE_XIOS2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r5923 r5928 94 94 CHARACTER(len=*), INTENT(in) :: cdname 95 95 #if defined key_iomput 96 #if defined XIOS197 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0)98 CHARACTER(len=19) :: cldate99 #else 100 TYPE(xios_duration) 101 TYPE(xios_date) :: start_date102 #endif 103 CHARACTER(len=10) :: clname104 INTEGER ::ji96 #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 105 105 ! 106 106 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_bnds 107 107 !!---------------------------------------------------------------------- 108 #if defined XIOS1108 #if ! defined key_xios2 109 109 ALLOCATE( z_bnds(jpk,2) ) 110 110 #else … … 118 118 119 119 ! calendar parameters 120 #if defined XIOS1120 #if ! defined key_xios2 121 121 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 122 122 CASE ( 1) ; CALL xios_set_context_attr(TRIM(clname), calendar_type= "Gregorian") … … 129 129 ! Calendar type is now defined in xml file 130 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),start_date = xios_date(nyear,nmonth,nday,0,0,0)) 132 CASE ( 0) ; CALL xios_define_calendar(TYPE="NoLeap", time_origin=xios_date(1900,01,01,00,00,00),start_date = xios_date(nyear,nmonth,nday,0,0,0)) 133 CASE (30) ; CALL xios_define_calendar(TYPE="D360", time_origin=xios_date(1900,01,01,00,00,00),start_date = xios_date(nyear,nmonth,nday,0,0,0)) 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) ) 134 137 END SELECT 135 138 #endif 136 139 ! horizontal grid definition 137 140 138 #if defined XIOS1141 #if ! defined key_xios2 139 142 CALL set_scalar 140 143 #endif … … 189 192 190 193 ! Add vertical grid bounds 191 #if defined XIOS1194 #if ! defined key_xios2 192 195 z_bnds(: ,1) = gdepw_1d(:) 193 196 z_bnds(1:jpkm1,2) = gdepw_1d(2:jpk) … … 196 199 z_bnds(1 ,:) = gdepw_1d(:) 197 200 z_bnds(2,1:jpkm1) = gdepw_1d(2:jpk) 198 z_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk)201 z_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 199 202 #endif 200 203 … … 202 205 CALL iom_set_axis_attr( "depthu", bounds=z_bnds ) 203 206 CALL iom_set_axis_attr( "depthv", bounds=z_bnds ) 204 #if defined XIOS1 205 z_bnds(: ,2) = gdept_1d(:) 206 z_bnds(2:jpk,1) = gdept_1d(1:jpkm1) 207 z_bnds(1 ,1) = gdept_1d(1) - e3w_1d(1) 208 #else 209 z_bnds(2,:) = gdept_1d(:) 210 z_bnds(1,2:jpk) = gdept_1d(1:jpkm1) 211 z_bnds(1,1) = gdept_1d(1) - e3w_1d(1) 207 208 #if ! defined key_xios2 209 z_bnds(: ,2) = gdept_1d(:) 210 z_bnds(2:jpk,1) = gdept_1d(1:jpkm1) 211 z_bnds(1 ,1) = gdept_1d(1) - e3w_1d(1) 212 #else 213 z_bnds(2,: ) = gdept_1d(:) 214 z_bnds(1,2:jpk) = gdept_1d(1:jpkm1) 215 z_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 212 216 #endif 213 217 CALL iom_set_axis_attr( "depthw", bounds=z_bnds ) 218 214 219 215 220 # if defined key_floats … … 1190 1195 LOGICAL, DIMENSION(:,:) , OPTIONAL, INTENT(in) :: mask 1191 1196 1192 #if defined XIOS11197 #if ! defined key_xios2 1193 1198 IF ( xios_is_valid_domain (cdid) ) THEN 1194 1199 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & … … 1224 1229 END SUBROUTINE iom_set_domain_attr 1225 1230 1226 #if ! defined XIOS11231 #if defined key_xios2 1227 1232 SUBROUTINE iom_set_zoom_domain_attr( cdid, ibegin, jbegin, ni, nj) 1228 1233 CHARACTER(LEN=*) , INTENT(in) :: cdid … … 1242 1247 REAL(wp), DIMENSION(:,:), OPTIONAL, INTENT(in) :: bounds 1243 1248 IF ( PRESENT(paxis) ) THEN 1244 #if defined XIOS11249 #if ! defined key_xios2 1245 1250 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, size=SIZE(paxis), value=paxis ) 1246 1251 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, size=SIZE(paxis), value=paxis ) … … 1257 1262 SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset ) 1258 1263 CHARACTER(LEN=*) , INTENT(in) :: cdid 1259 #if defined XIOS11260 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_op1261 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_offset1262 #else 1263 TYPE(xios_duration) 1264 TYPE(xios_duration) 1264 #if ! defined key_xios2 1265 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_op 1266 CHARACTER(LEN=*) ,OPTIONAL , INTENT(in) :: freq_offset 1267 #else 1268 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_op 1269 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_offset 1265 1270 #endif 1266 1271 IF ( xios_is_valid_field (cdid) ) CALL xios_set_field_attr ( cdid, freq_op=freq_op, freq_offset=freq_offset ) … … 1281 1286 CHARACTER(LEN=*) , INTENT(in ) :: cdid 1282 1287 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix 1283 #if defined XIOS11288 #if ! defined key_xios2 1284 1289 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: output_freq 1285 1290 #else … … 1290 1295 IF( PRESENT( name ) ) name = '' ! default values 1291 1296 IF( PRESENT( name_suffix ) ) name_suffix = '' 1292 #if defined XIOS11297 #if ! defined key_xios2 1293 1298 IF( PRESENT( output_freq ) ) output_freq = '' 1294 1299 #else … … 1315 1320 CHARACTER(LEN=*) , INTENT(in) :: cdid 1316 1321 LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) :: mask 1317 #if defined XIOS11322 #if ! defined key_xios2 1318 1323 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask=mask ) 1319 1324 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask=mask ) … … 1363 1368 ni=nlei-nldi+1 ; nj=nlej-nldj+1 1364 1369 1365 #if defined XIOS11370 #if ! defined key_xios2 1366 1371 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) 1367 1372 #else … … 1516 1521 1517 1522 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots) 1518 #if defined XIOS11523 #if ! defined key_xios2 1519 1524 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1520 1525 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) … … 1574 1579 REAL(wp) ,DIMENSION( 3) :: zlonpira ! longitudes of pirata moorings 1575 1580 REAL(wp) ,DIMENSION( 9) :: zlatpira ! latitudes of pirata moorings 1576 #if ! defined XIOS11581 #if defined key_xios2 1577 1582 TYPE(xios_duration) :: freq_op, freq_offset 1578 1583 #endif … … 1581 1586 ! 1582 1587 ! frequency of the call of iom_put (attribut: freq_op) 1583 #if defined XIOS11588 #if ! defined key_xios2 1584 1589 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts') 1585 1590 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op = cl1//'ts', freq_offset='0ts') … … 1589 1594 #else 1590 1595 freq_op%timestep=1 ; freq_offset%timestep=0 ; CALL iom_set_field_attr('field_definition', freq_op = freq_op, freq_offset=freq_offset) 1591 freq_op%timestep=nn_fsbc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('SBC' , freq_op = freq_op, freq_offset=freq_offset)1592 freq_op%timestep=nn_fsbc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op = freq_op, freq_offset=freq_offset)1593 freq_op%timestep=nn_dttrc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('ptrc_T' , freq_op = freq_op, freq_offset=freq_offset)1594 freq_op%timestep=nn_dttrc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('diad_T' , freq_op = freq_op, freq_offset=freq_offset)1596 freq_op%timestep=nn_fsbc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('SBC' , freq_op = freq_op, freq_offset=freq_offset) 1597 freq_op%timestep=nn_fsbc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op = freq_op, freq_offset=freq_offset) 1598 freq_op%timestep=nn_dttrc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('ptrc_T' , freq_op = freq_op, freq_offset=freq_offset) 1599 freq_op%timestep=nn_dttrc ; freq_offset%timestep=0 ; CALL iom_set_field_attr('diad_T' , freq_op = freq_op, freq_offset=freq_offset) 1595 1600 #endif 1596 1601 … … 1615 1620 ! Equatorial section (attributs: jbegin, ni, name_suffix) 1616 1621 CALL dom_ngb( 0., 0., ix, iy, cl1 ) 1617 #if defined XIOS11622 #if ! defined key_xios2 1618 1623 CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 1619 1624 #else … … 1699 1704 ENDIF 1700 1705 clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon)) 1701 #if defined XIOS11706 #if ! defined key_xios2 1702 1707 CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 1703 1708 #else … … 1732 1737 REAL(wp) :: zsec 1733 1738 LOGICAL :: llexist 1734 #if ! defined XIOS11739 #if defined key_xios2 1735 1740 TYPE(xios_duration) :: output_freq 1736 1741 #endif … … 1739 1744 1740 1745 DO jn = 1,2 1741 #if defined XIOS11746 #if ! defined key_xios2 1742 1747 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = clfreq ) 1743 1748 #else … … 1755 1760 END DO 1756 1761 1757 #if defined XIOS11762 #if ! defined key_xios2 1758 1763 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1759 1764 DO WHILE ( idx /= 0 )
Note: See TracChangeset
for help on using the changeset viewer.