diff --git a/src/serialbox-fortran/m_ser_ftg.f90 b/src/serialbox-fortran/m_ser_ftg.f90 index 20eaf488..3e4d4e29 100644 --- a/src/serialbox-fortran/m_ser_ftg.f90 +++ b/src/serialbox-fortran/m_ser_ftg.f90 @@ -535,7 +535,10 @@ SUBROUTINE ftg_write_logical_0d(fieldname, field) IF (.NOT. bullshit) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:loc', TRIM(ADJUSTL(ftg_loc_hex(C_LOC(field))))) END IF @@ -562,7 +565,10 @@ SUBROUTINE ftg_write_logical_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -594,7 +600,10 @@ SUBROUTINE ftg_write_logical_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -628,7 +637,10 @@ SUBROUTINE ftg_write_logical_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -662,7 +674,10 @@ SUBROUTINE ftg_write_logical_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -690,7 +705,10 @@ SUBROUTINE ftg_write_bool_0d(fieldname, field) IF (.NOT. bullshit) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:loc', TRIM(ADJUSTL(ftg_loc_hex(C_LOC(field))))) END IF @@ -717,7 +735,10 @@ SUBROUTINE ftg_write_bool_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -749,7 +770,10 @@ SUBROUTINE ftg_write_bool_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -782,7 +806,10 @@ SUBROUTINE ftg_write_bool_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -816,7 +843,10 @@ SUBROUTINE ftg_write_bool_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'bool', fs_boolsize(), lbounds, ubounds) END IF @@ -844,7 +874,10 @@ SUBROUTINE ftg_write_int_0d(fieldname, field) IF (.NOT. bullshit) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:loc', TRIM(ADJUSTL(ftg_loc_hex(C_LOC(field))))) END IF @@ -871,7 +904,10 @@ SUBROUTINE ftg_write_int_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'int', fs_intsize(), lbounds, ubounds) END IF @@ -903,7 +939,10 @@ SUBROUTINE ftg_write_int_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'int', fs_intsize(), lbounds, ubounds) END IF @@ -936,7 +975,10 @@ SUBROUTINE ftg_write_int_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'int', fs_intsize(), lbounds, ubounds) END IF @@ -970,7 +1012,10 @@ SUBROUTINE ftg_write_int_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'int', fs_intsize(), lbounds, ubounds) END IF @@ -998,7 +1043,10 @@ SUBROUTINE ftg_write_long_0d(fieldname, field) IF (.NOT. bullshit) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:loc', TRIM(ADJUSTL(ftg_loc_hex(C_LOC(field))))) END IF @@ -1025,7 +1073,10 @@ SUBROUTINE ftg_write_long_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'long', fs_longsize(), lbounds, ubounds) END IF @@ -1057,7 +1108,10 @@ SUBROUTINE ftg_write_long_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'long', fs_longsize(), lbounds, ubounds) END IF @@ -1090,7 +1144,10 @@ SUBROUTINE ftg_write_long_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'long', fs_longsize(), lbounds, ubounds) END IF @@ -1124,7 +1181,10 @@ SUBROUTINE ftg_write_long_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'long', fs_longsize(), lbounds, ubounds) END IF @@ -1179,7 +1239,10 @@ SUBROUTINE ftg_write_float_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'float', fs_floatsize(), lbounds, ubounds) END IF @@ -1211,7 +1274,10 @@ SUBROUTINE ftg_write_float_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'float', fs_floatsize(), lbounds, ubounds) END IF @@ -1244,7 +1310,10 @@ SUBROUTINE ftg_write_float_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'float', fs_floatsize(), lbounds, ubounds) END IF @@ -1278,7 +1347,10 @@ SUBROUTINE ftg_write_float_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'float', fs_floatsize(), lbounds, ubounds) END IF @@ -1306,7 +1378,10 @@ SUBROUTINE ftg_write_double_0d(fieldname, field) IF (.NOT. bullshit) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:loc', TRIM(ADJUSTL(ftg_loc_hex(C_LOC(field))))) END IF @@ -1333,7 +1408,10 @@ SUBROUTINE ftg_write_double_1d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'double', fs_doublesize(), lbounds, ubounds) END IF @@ -1365,7 +1443,10 @@ SUBROUTINE ftg_write_double_2d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'double', fs_doublesize(), lbounds, ubounds) END IF @@ -1398,7 +1479,10 @@ SUBROUTINE ftg_write_double_3d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'double', fs_doublesize(), lbounds, ubounds) END IF @@ -1432,7 +1516,10 @@ SUBROUTINE ftg_write_double_4d(fieldname, field, lbounds, ubounds) IF (SIZE(field) > 0) THEN CALL fs_write_field(ftg_get_serializer(), ftg_get_savepoint(), fieldname, field, lbounds, ubounds) serializer_has_written = .TRUE. +<<<<<<< HEAD CALL fs_add_field_metainfo(serializer, TRIM(fieldname), 'ftg:registered_only', .FALSE.) +======= +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git ELSE CALL ftg_register_only_internal(fieldname, 'double', fs_doublesize(), lbounds, ubounds) END IF @@ -1543,11 +1630,16 @@ SUBROUTINE ftg_read_bool_2d(fieldname, field) LOGICAL(KIND=C_BOOL), INTENT(OUT), TARGET :: field(:,:) LOGICAL :: registered_only +<<<<<<< HEAD IF (.NOT. ignore_not_existing .OR. ftg_field_exists(fieldname)) THEN CALL fs_get_field_metainfo(serializer, fieldname, 'ftg:registered_only', registered_only) IF (.NOT. registered_only) THEN CALL fs_read_field(serializer, savepoint, fieldname, field) END IF +======= + IF (.NOT. ignore_not_existing .OR. (ftg_field_exists(fieldname) .AND. fs_get_total_size(serializer, fieldname) > 0)) THEN + CALL fs_read_field(serializer, savepoint, fieldname, field) +>>>>>>> branch 'ftg-zerosize' of github-chovyy:chovyy/serialbox2.git END IF END SUBROUTINE ftg_read_bool_2d