67 & title, source, institution, & ! (in)
68 & dims, dimsizes, longnames, units, &
70 & xtypes, conventions, gt_version, &
73 & namelist_filename, &
75 & slice_start, slice_end, slice_stride, &
80 & origin_date, origin_date_invalid, &
82 & flag_mpi_gather, flag_mpi_split &
90 use gtool_history,
only: historyaxiscreate, historyaxisaddattr
97 use netcdf,
only: nf90_emaxdims, nf90_max_dims
102 & dccaldateinquire, dccalinquire, dccaldefault
103 use dc_date,
only: dcdifftimecreate, evalbyunit,
tochar, tocharcal, eval
109 character(*),
intent(in):: title
112 character(*),
intent(in):: source
115 character(*),
intent(in):: institution
118 character(*),
intent(in):: dims(:)
137 integer,
intent(in):: dimsizes (:)
165 character(*),
intent(in):: longnames (:)
185 character(*),
intent(in):: units(:)
215 character(*),
intent(in),
optional:: xtypes(:)
245 character(*),
intent(in),
optional:: conventions
264 character(*),
intent(in),
optional:: gt_version
286 logical,
intent(in),
optional:: all_output
322 character(*),
intent(in),
optional:: file_prefix
325 character(*),
intent(in),
optional:: namelist_filename
349 integer,
intent(in),
optional:: slice_start(:)
359 integer,
intent(in),
optional:: slice_end(:)
371 integer,
intent(in),
optional:: slice_stride(:)
381 logical,
intent(in),
optional:: space_average(:)
394 logical,
intent(in),
optional:: time_average
399 integer,
intent(in),
optional:: newfile_interval
410 character(*),
intent(in),
optional:: rank
415 type(
dc_datetime),
intent(in),
optional:: origin_date
422 logical,
intent(in),
optional:: origin_date_invalid
426 type(dc_cal_date),
intent(in),
optional:: start_date
431 type(dc_cal),
intent(in),
optional:: cal
440 logical,
intent(in),
optional:: flag_mpi_gather
457 logical,
intent(in),
optional:: flag_mpi_split
471 character(STRING):: Name
488 character(STRING):: File
503 character(TOKEN):: IntUnit
506 character(TOKEN):: Precision
522 character(STRING):: FilePrefix
525 logical:: TimeAverage
538 real(DP):: OriginValue
541 character(TOKEN):: OriginUnit
544 real(DP):: TerminusValue
547 character(TOKEN):: TerminusUnit
550 integer:: SliceStart(1:NF90_MAX_DIMS)
553 integer:: SliceEnd(1:NF90_MAX_DIMS)
565 integer:: SliceStride(1:NF90_MAX_DIMS)
568 logical:: SpaceAverage(1:NF90_MAX_DIMS)
571 integer:: NewFileIntValue
574 character(TOKEN):: NewFileIntUnit
578 namelist /gtool_historyauto_nml/ &
580 & intvalue, intunit, &
583 & timeaverage, alloutput, &
584 & originvalue, originunit, &
585 & terminusvalue, terminusunit, &
586 & slicestart, sliceend, slicestride, spaceaverage, &
587 & newfileintvalue, newfileintunit
608 integer:: blank_index
610 character(STRING):: cause_c
615 character(TOKEN):: pos_nml
619 character(TOKEN):: my_xtype
621 real(DP):: interval_work, origin_work, terminus_work
624 real(DP),
parameter:: time_eps = epsilon(1.0_dp)
626 character(STRING):: date_str
627 character(TOKEN):: cal_str
628 integer:: origin_year, origin_month, origin_day, origin_hour, origin_min
629 real(DP):: origin_sec
630 integer:: month_in_year, hour_in_day, min_in_hour
631 integer,
pointer:: day_in_month(:) =>null()
632 real(DP):: sec_in_min
633 character(*),
parameter:: subname =
"HistoryAutoCreate3"
635 call beginsub(subname, version = version)
644 cause_c =
'gtool_historyauto'
661 if (
size(dimsizes) /=
numdims )
then
662 cause_c =
'dimsizes, dims'
663 elseif (
size(longnames) /=
numdims )
then
664 cause_c =
'longnames, dims'
665 elseif (
size(units) /=
numdims )
then
666 cause_c =
'units, dims'
668 if ( trim(cause_c) /=
"" )
then
673 if (
numdims > nf90_max_dims )
then
681 if ( dimsizes(
numdims) /= 0 )
then
683 &
'time dimension must be specified to the last of "dims"' )
719 if ( blank_index > 1 )
then
729 if (
present(xtypes) )
then
730 if (
size(xtypes) >= i )
then
735 call historyaxiscreate( &
737 & name = dims(i),
size = dimsizes(i), &
738 & longname = longnames(i), units = units(i), &
741 allocate(
data_axes(i) % a_axis( dimsizes(i) ) )
742 data_axes(i) % a_axis = (/ ( real( j, dp ), j = 1, dimsizes(i) ) /)
749 if (
present(cal) )
then
758 if (
present(start_date) )
then
760 call dccaldateinquire( &
761 & date_str = date_str, &
762 & date = start_date, &
767 call dccaldateinquire( &
768 & origin_year, origin_month, origin_day, &
769 & origin_hour, origin_min, origin_sec, &
770 & date = start_date, &
776 & month_in_year = month_in_year, &
777 & day_in_month_ptr = day_in_month , &
778 & hour_in_day = hour_in_day , &
779 & min_in_hour = min_in_hour , &
780 & sec_in_min = sec_in_min , &
785 select case ( trim(cal_str) )
788 &
' since ' // trim(date_str)
791 &
' since ' // trim(date_str)
794 &
' since ' // trim(date_str)
797 &
' since ' // trim(date_str)
800 &
' since ' // trim(date_str)
805 call historyaxisaddattr( &
807 & attrname =
'origin', &
808 &
value =
'origin_year origin_month origin_day ' // &
809 &
'origin_hour origin_min origin_sec' )
819 call historyaxisaddattr( &
821 & attrname =
'calendar', &
824 if ( trim(cal_str) ==
'user_defined' )
then
832 deallocate( day_in_month )
834 elseif (
present(origin_date) &
836 call eval( origin_date, &
837 & day = date_day, sec = date_sec )
838 if ( date_day /= 0 .or. abs(date_sec) > time_eps )
then
840 &
' since ' //
tochar(origin_date)
842 call historyaxisaddattr( &
844 & attrname =
'calendar', &
845 &
value = tocharcal(origin_date) )
861 if (
present(interval) )
then
867 interval_work = - 1.0
873 origin_work = evalbyunit( origin,
'sec' )
884 & precision =
'float', &
885 & fileprefix = file_prefix, &
886 & interval_value = interval_work, &
888 & origin_value = origin_work, &
889 & origin_unit =
'sec', &
891 & terminus_value = terminus_work, &
893 & time_average = time_average, &
894 & slice_start = slice_start, &
895 & slice_end = slice_end, &
896 & slice_stride = slice_stride, &
897 & space_average = space_average, &
898 & newfile_intvalue = newfile_interval, &
906 & namelist_filename, mode =
'r' )
912 & c1 = trim(namelist_filename), rank_mpi = msnot_rank )
914 do while ( trim(pos_nml) /=
'APPEND' .and. iostat_nml == 0 )
920 & interval_value = intvalue, &
921 & interval_unit = intunit, &
922 & precision = precision, &
923 & time_average = timeaverage, &
924 & origin_value = originvalue, &
925 & origin_unit = originunit, &
926 & terminus_value = terminusvalue, &
927 & terminus_unit = terminusunit, &
928 & slice_start = slicestart, &
929 & slice_end = sliceend, &
930 & slice_stride = slicestride, &
931 & space_average = spaceaverage, &
932 & newfile_intvalue = newfileintvalue, &
933 & newfile_intunit = newfileintunit, &
934 & fileprefix = fileprefix )
936 read( unit = unit_nml, &
937 & nml = gtool_historyauto_nml, &
938 & iostat = iostat_nml )
939 inquire( unit = unit_nml, &
940 & position = pos_nml )
942 if ( iostat_nml == 0 )
then
947 if ( .not. intvalue > 0.0 )
then
948 intvalue = interval_work
951 if ( .not. originvalue > 0.0 )
then
952 originvalue = origin_work
955 if ( .not. terminusvalue > 0.0 )
then
956 terminusvalue = terminus_work
967 & interval_value = intvalue, &
968 & interval_unit = intunit, &
969 & precision = precision, &
970 & time_average = timeaverage, &
971 & origin_value = originvalue, &
972 & origin_unit = originunit, &
973 & terminus_value = terminusvalue, &
974 & terminus_unit = terminusunit, &
975 & slice_start = slicestart, &
976 & slice_end = sliceend, &
977 & slice_stride = slicestride, &
978 & space_average = spaceaverage, &
979 & newfile_intvalue = newfileintvalue, &
980 & newfile_intunit = newfileintunit, &
981 & fileprefix = fileprefix )
986 if ( trim(name) ==
'' )
then
992 if ( trim(file) ==
'' ) file = trim(fileprefix) //
'<Name>.nc'
994 if ( trim(name) ==
'' )
then
1004 & d = (/ intvalue /), c1 = trim( intunit ), rank_mpi = msnot_rank )
1008 & d = (/ originvalue /), c1 = trim( originunit ), rank_mpi = msnot_rank )
1010 & d = (/ terminusvalue /), c1 = trim( terminusunit ), rank_mpi = msnot_rank )
1012 & i = slicestart(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1014 & i = sliceend(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1016 & i = slicestride(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1018 & l = spaceaverage(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1020 & i = (/ newfileintvalue /), c1 = trim( newfileintunit ), rank_mpi = msnot_rank )
1025 & i = (/iostat_nml/), rank_mpi = msnot_rank )
1036 call messagenotify(
'M',
sub_sname,
'----- "gtool_historyauto_nml" is not loaded" -----', rank_mpi = msnot_rank )
1041 & interval_value = intvalue, &
1042 & interval_unit = intunit, &
1043 & precision = precision, &
1044 & time_average = timeaverage, &
1045 & origin_value = originvalue, &
1046 & origin_unit = originunit, &
1047 & terminus_value = terminusvalue, &
1048 & terminus_unit = terminusunit, &
1049 & slice_start = slicestart, &
1050 & slice_end = sliceend, &
1051 & slice_stride = slicestride, &
1052 & space_average = spaceaverage, &
1053 & newfile_intvalue = newfileintvalue, &
1054 & newfile_intunit = newfileintunit, &
1055 & fileprefix = fileprefix )
1063 & d = (/ intvalue /), c1 = trim( intunit ), rank_mpi = msnot_rank )
1067 & d = (/ originvalue /), c1 = trim( originunit ), rank_mpi = msnot_rank )
1069 & d = (/ terminusvalue /), c1 = trim( terminusunit ), rank_mpi = msnot_rank )
1071 & i = slicestart(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1073 & i = sliceend(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1075 & i = slicestride(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1077 & l = spaceaverage(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
1079 & i = (/ newfileintvalue /), c1 = trim( newfileintunit ), rank_mpi = msnot_rank )
1090 call storeerror(stat, subname, cause_c = cause_c)
1091 call endsub(subname,
'stat=%d', i = (/stat/) )
1097 & title, source, institution, & ! (in)
1098 & dims, dimsizes, longnames, units, &
1099 & xtypes, conventions, gt_version,&
1102 & namelist_filename, &
1103 & interval, origin, terminus, &
1104 & slice_start, slice_end, slice_stride, &
1107 & newfile_interval, &
1109 & origin_date, origin_date_invalid, &
1110 & start_date, cal, &
1111 & flag_mpi_gather, flag_mpi_split &
1172 use netcdf,
only: nf90_emaxdims, nf90_max_dims
1177 use dc_date,
only: dcdifftimecreate, evalbyunit
1183 character(*),
intent(in):: title
1186 character(*),
intent(in):: source
1189 character(*),
intent(in):: institution
1192 character(*),
intent(in):: dims(:)
1211 integer,
intent(in):: dimsizes (:)
1239 character(*),
intent(in):: longnames (:)
1259 character(*),
intent(in):: units(:)
1279 character(*),
intent(in),
optional:: xtypes(:)
1309 character(*),
intent(in),
optional:: conventions
1328 character(*),
intent(in),
optional:: gt_version
1350 logical,
intent(in),
optional:: all_output
1386 character(*),
intent(in),
optional:: file_prefix
1389 character(*),
intent(in),
optional:: namelist_filename
1401 real,
intent(in),
optional:: interval
1413 real,
intent(in),
optional:: origin
1425 real,
intent(in),
optional:: terminus
1437 integer,
intent(in),
optional:: slice_start(:)
1447 integer,
intent(in),
optional:: slice_end(:)
1457 integer,
intent(in),
optional:: slice_stride(:)
1467 logical,
intent(in),
optional:: space_average(:)
1480 logical,
intent(in),
optional:: time_average
1485 integer,
intent(in),
optional:: newfile_interval
1496 character(*),
intent(in),
optional:: rank
1503 type(
dc_datetime),
intent(in),
optional:: origin_date
1510 logical,
intent(in),
optional:: origin_date_invalid
1515 type(dc_cal_date),
intent(in),
optional:: start_date
1520 type(dc_cal),
intent(in),
optional:: cal
1529 logical,
intent(in),
optional:: flag_mpi_gather
1546 logical,
intent(in),
optional:: flag_mpi_split
1557 integer:: blank_index
1558 type(
dc_difftime):: interval_difftime, origin_difftime, terminus_difftime
1560 character(STRING):: cause_c
1561 character(*),
parameter:: subname =
"HistoryAutoCreate2"
1572 cause_c =
'gtool_historyauto'
1581 if (
size(dimsizes) /=
numdims )
then
1582 cause_c =
'dimsizes, dims'
1583 elseif (
size(longnames) /=
numdims )
then
1584 cause_c =
'longnames, dims'
1585 elseif (
size(units) /=
numdims )
then
1586 cause_c =
'units, dims'
1588 if ( trim(cause_c) /=
"" )
then
1593 if (
numdims > nf90_max_dims )
then
1594 stat = nf90_emaxdims
1601 if ( dimsizes(
numdims) /= 0 )
then
1603 &
'time dimension must be specified to the last of "dims"' )
1614 if ( blank_index > 1 )
then
1622 if (
present(interval) )
then
1623 call dcdifftimecreate( &
1624 & interval_difftime, &
1627 call dcdifftimecreate( &
1628 & interval_difftime, &
1635 if (
present(origin) )
then
1636 call dcdifftimecreate( &
1637 & origin_difftime, &
1640 call dcdifftimecreate( &
1641 & origin_difftime, &
1645 if (
present(terminus) )
then
1646 call dcdifftimecreate( &
1647 & terminus_difftime, &
1650 call dcdifftimecreate( &
1651 & terminus_difftime, &
1659 & title = title, source = source, &
1660 & institution = institution, &
1661 & dims = dims, dimsizes = dimsizes, &
1662 & longnames = longnames, units = units, &
1663 & origin = origin_difftime, &
1664 & terminus = terminus_difftime, &
1665 & xtypes = xtypes, &
1666 & conventions = conventions, &
1667 & gt_version = gt_version, &
1668 & all_output = all_output, &
1669 & file_prefix = file_prefix, &
1670 & namelist_filename = namelist_filename, &
1671 & interval = interval_difftime, &
1672 & slice_start = slice_start, &
1673 & slice_end = slice_end, &
1674 & slice_stride = slice_stride, &
1675 & space_average = space_average, &
1676 & time_average = time_average, &
1677 & newfile_interval = newfile_interval, &
1679 & origin_date = origin_date, &
1680 & origin_date_invalid = origin_date_invalid, &
1681 & start_date = start_date, &
1683 & flag_mpi_gather = flag_mpi_gather, &
1684 & flag_mpi_split = flag_mpi_split )
1687 call storeerror(stat, subname, cause_c = cause_c)
1694 & title, source, institution, & ! (in)
1695 & dims, dimsizes, longnames, units, &
1696 & origin, terminus, &
1697 & xtypes, conventions, gt_version, &
1700 & namelist_filename, &
1702 & slice_start, slice_end, slice_stride, &
1705 & newfile_interval, &
1707 & origin_date, origin_date_invalid, &
1708 & start_date, cal, &
1709 & flag_mpi_gather, flag_mpi_split &
1767 use gtool_history,
only: historyaxiscreate, historyaxisaddattr
1774 use netcdf,
only: nf90_emaxdims, nf90_max_dims
1779 & dccaldateinquire, dccalinquire, dccaldefault, dccalconvertbyunit
1780 use dc_date,
only: dcdifftimecreate, evalbyunit,
tochar, tocharcal, eval
1786 character(*),
intent(in):: title
1789 character(*),
intent(in):: source
1792 character(*),
intent(in):: institution
1795 character(*),
intent(in):: dims(:)
1814 integer,
intent(in):: dimsizes (:)
1842 character(*),
intent(in):: longnames (:)
1862 character(*),
intent(in):: units(:)
1882 real(DP),
intent(in):: origin
1887 real(DP),
intent(in):: terminus
1892 character(*),
intent(in),
optional:: xtypes(:)
1922 character(*),
intent(in),
optional:: conventions
1941 character(*),
intent(in),
optional:: gt_version
1963 logical,
intent(in),
optional:: all_output
1999 character(*),
intent(in),
optional:: file_prefix
2002 character(*),
intent(in),
optional:: namelist_filename
2014 real(DP),
intent(in),
optional:: interval
2026 integer,
intent(in),
optional:: slice_start(:)
2036 integer,
intent(in),
optional:: slice_end(:)
2048 integer,
intent(in),
optional:: slice_stride(:)
2058 logical,
intent(in),
optional:: space_average(:)
2071 logical,
intent(in),
optional:: time_average
2076 integer,
intent(in),
optional:: newfile_interval
2087 character(*),
intent(in),
optional:: rank
2092 type(
dc_datetime),
intent(in),
optional:: origin_date
2099 logical,
intent(in),
optional:: origin_date_invalid
2103 type(dc_cal_date),
intent(in),
optional:: start_date
2108 type(dc_cal),
intent(in),
optional:: cal
2117 logical,
intent(in),
optional:: flag_mpi_gather
2134 logical,
intent(in),
optional:: flag_mpi_split
2148 character(STRING):: Name
2165 character(STRING):: File
2180 character(TOKEN):: IntUnit
2183 character(TOKEN):: Precision
2199 character(STRING):: FilePrefix
2202 logical:: TimeAverage
2215 real(DP):: OriginValue
2218 character(TOKEN):: OriginUnit
2221 real(DP):: TerminusValue
2224 character(TOKEN):: TerminusUnit
2227 integer:: SliceStart(1:NF90_MAX_DIMS)
2230 integer:: SliceEnd(1:NF90_MAX_DIMS)
2242 integer:: SliceStride(1:NF90_MAX_DIMS)
2245 logical:: SpaceAverage(1:NF90_MAX_DIMS)
2248 integer:: NewFileIntValue
2251 character(TOKEN):: NewFileIntUnit
2255 namelist /gtool_historyauto_nml/ &
2257 & intvalue, intunit, &
2260 & timeaverage, alloutput, &
2261 & originvalue, originunit, &
2262 & terminusvalue, terminusunit, &
2263 & slicestart, sliceend, slicestride, spaceaverage, &
2264 & newfileintvalue, newfileintunit
2285 integer:: blank_index
2287 character(STRING):: cause_c
2290 integer:: iostat_nml
2292 character(TOKEN):: pos_nml
2296 character(TOKEN):: my_xtype
2298 real(DP):: interval_work, origin_work, terminus_work
2301 real(DP),
parameter:: time_eps = epsilon(1.0_dp)
2302 integer:: msnot_rank
2303 character(STRING):: date_str
2304 character(TOKEN):: cal_str
2305 integer:: origin_year, origin_month, origin_day, origin_hour, origin_min
2306 real(DP):: origin_sec
2307 integer:: month_in_year, hour_in_day, min_in_hour
2308 integer,
pointer:: day_in_month(:) =>null()
2309 real(DP):: sec_in_min
2310 character(*),
parameter:: subname =
"HistoryAutoCreate1"
2312 call beginsub(subname, version = version)
2321 cause_c =
'gtool_historyauto'
2338 if (
size(dimsizes) /=
numdims )
then
2339 cause_c =
'dimsizes, dims'
2340 elseif (
size(longnames) /=
numdims )
then
2341 cause_c =
'longnames, dims'
2342 elseif (
size(units) /=
numdims )
then
2343 cause_c =
'units, dims'
2345 if ( trim(cause_c) /=
"" )
then
2350 if (
numdims > nf90_max_dims )
then
2351 stat = nf90_emaxdims
2358 if ( dimsizes(
numdims) /= 0 )
then
2360 &
'time dimension must be specified to the last of "dims"' )
2396 if ( blank_index > 1 )
then
2406 if (
present(xtypes) )
then
2407 if (
size(xtypes) >= i )
then
2408 my_xtype = xtypes(i)
2412 call historyaxiscreate( &
2414 & name = dims(i),
size = dimsizes(i), &
2415 & longname = longnames(i), units = units(i), &
2416 & xtype = my_xtype )
2418 allocate(
data_axes(i) % a_axis( dimsizes(i) ) )
2419 data_axes(i) % a_axis = (/ ( real( j, dp ), j = 1, dimsizes(i) ) /)
2426 if (
present(cal) )
then
2435 if (
present(start_date) )
then
2437 call dccaldateinquire( &
2438 & date_str = date_str, &
2439 & date = start_date, &
2444 call dccaldateinquire( &
2445 & origin_year, origin_month, origin_day, &
2446 & origin_hour, origin_min, origin_sec, &
2447 & date = start_date, &
2451 call dccalinquire( &
2453 & month_in_year = month_in_year, &
2454 & day_in_month_ptr = day_in_month , &
2455 & hour_in_day = hour_in_day , &
2456 & min_in_hour = min_in_hour , &
2457 & sec_in_min = sec_in_min , &
2462 select case ( trim(cal_str) )
2463 case (
'gregorian' )
2465 &
' since ' // trim(date_str)
2468 &
' since ' // trim(date_str)
2471 &
' since ' // trim(date_str)
2474 &
' since ' // trim(date_str)
2477 &
' since ' // trim(date_str)
2482 call historyaxisaddattr( &
2484 & attrname =
'origin', &
2485 &
value =
'origin_year origin_month origin_day ' // &
2486 &
'origin_hour origin_min origin_sec' )
2496 call historyaxisaddattr( &
2498 & attrname =
'calendar', &
2501 if ( trim(cal_str) ==
'user_defined' )
then
2509 deallocate( day_in_month )
2511 elseif (
present(origin_date) &
2513 call eval( origin_date, &
2514 & day = date_day, sec = date_sec )
2515 if ( date_day /= 0 .or. abs(date_sec) > time_eps )
then
2517 &
' since ' //
tochar(origin_date)
2519 call historyaxisaddattr( &
2521 & attrname =
'calendar', &
2522 &
value = tocharcal(origin_date) )
2538 if (
present(interval) )
then
2539 interval_work = interval
2545 interval_work = - 1.0
2553 terminus_work = terminus
2566 & precision =
'float', &
2567 & fileprefix = file_prefix, &
2568 & interval_value = interval_work, &
2570 & origin_value = origin_work, &
2571 & origin_unit =
'sec', &
2573 & terminus_value = terminus_work, &
2575 & time_average = time_average, &
2576 & slice_start = slice_start, &
2577 & slice_end = slice_end, &
2578 & slice_stride = slice_stride, &
2579 & space_average = space_average, &
2580 & newfile_intvalue = newfile_interval, &
2588 & namelist_filename, mode =
'r' )
2594 & c1 = trim(namelist_filename), rank_mpi = msnot_rank )
2596 do while ( trim(pos_nml) /=
'APPEND' .and. iostat_nml == 0 )
2602 & interval_value = intvalue, &
2603 & interval_unit = intunit, &
2604 & precision = precision, &
2605 & time_average = timeaverage, &
2606 & origin_value = originvalue, &
2607 & origin_unit = originunit, &
2608 & terminus_value = terminusvalue, &
2609 & terminus_unit = terminusunit, &
2610 & slice_start = slicestart, &
2611 & slice_end = sliceend, &
2612 & slice_stride = slicestride, &
2613 & space_average = spaceaverage, &
2614 & newfile_intvalue = newfileintvalue, &
2615 & newfile_intunit = newfileintunit, &
2616 & fileprefix = fileprefix )
2618 read( unit = unit_nml, &
2619 & nml = gtool_historyauto_nml, &
2620 & iostat = iostat_nml )
2621 inquire( unit = unit_nml, &
2622 & position = pos_nml )
2624 if ( iostat_nml == 0 )
then
2629 if ( .not. intvalue > 0.0 )
then
2630 intvalue = interval_work
2633 if ( .not. originvalue > 0.0 )
then
2634 originvalue = origin_work
2637 if ( .not. terminusvalue > 0.0 )
then
2638 terminusvalue = terminus_work
2649 & interval_value = intvalue, &
2650 & interval_unit = intunit, &
2651 & precision = precision, &
2652 & time_average = timeaverage, &
2653 & origin_value = originvalue, &
2654 & origin_unit = originunit, &
2655 & terminus_value = terminusvalue, &
2656 & terminus_unit = terminusunit, &
2657 & slice_start = slicestart, &
2658 & slice_end = sliceend, &
2659 & slice_stride = slicestride, &
2660 & space_average = spaceaverage, &
2661 & newfile_intvalue = newfileintvalue, &
2662 & newfile_intunit = newfileintunit, &
2663 & fileprefix = fileprefix )
2668 if ( trim(name) ==
'' )
then
2674 if ( trim(file) ==
'' ) file = trim(fileprefix) //
'<Name>.nc'
2676 if ( trim(name) ==
'' )
then
2686 & d = (/ intvalue /), c1 = trim( intunit ), rank_mpi = msnot_rank )
2690 & d = (/ originvalue /), c1 = trim( originunit ), rank_mpi = msnot_rank )
2692 & d = (/ terminusvalue /), c1 = trim( terminusunit ), rank_mpi = msnot_rank )
2694 & i = slicestart(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2696 & i = sliceend(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2698 & i = slicestride(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2700 & l = spaceaverage(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2702 & i = (/ newfileintvalue /), c1 = trim( newfileintunit ), rank_mpi = msnot_rank )
2707 & i = (/iostat_nml/), rank_mpi = msnot_rank )
2718 call messagenotify(
'M',
sub_sname,
'----- "gtool_historyauto_nml" is not loaded" -----', rank_mpi = msnot_rank )
2723 & interval_value = intvalue, &
2724 & interval_unit = intunit, &
2725 & precision = precision, &
2726 & time_average = timeaverage, &
2727 & origin_value = originvalue, &
2728 & origin_unit = originunit, &
2729 & terminus_value = terminusvalue, &
2730 & terminus_unit = terminusunit, &
2731 & slice_start = slicestart, &
2732 & slice_end = sliceend, &
2733 & slice_stride = slicestride, &
2734 & space_average = spaceaverage, &
2735 & newfile_intvalue = newfileintvalue, &
2736 & newfile_intunit = newfileintunit, &
2737 & fileprefix = fileprefix )
2745 & d = (/ intvalue /), c1 = trim( intunit ), rank_mpi = msnot_rank )
2749 & d = (/ originvalue /), c1 = trim( originunit ), rank_mpi = msnot_rank )
2751 & d = (/ terminusvalue /), c1 = trim( terminusunit ), rank_mpi = msnot_rank )
2753 & i = slicestart(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2755 & i = sliceend(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2757 & i = slicestride(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2759 & l = spaceaverage(1:
numdims-1), n = (/
numdims-1 /), rank_mpi = msnot_rank )
2761 & i = (/ newfileintvalue /), c1 = trim( newfileintunit ), rank_mpi = msnot_rank )
2772 call storeerror(stat, subname, cause_c = cause_c)
2773 call endsub(subname,
'stat=%d', i = (/stat/) )
subroutine historyautocreate2(title, source, institution, dims, dimsizes, longnames, units, xtypes, conventions, gt_version, all_output, file_prefix, namelist_filename, interval, origin, terminus, slice_start, slice_end, slice_stride, space_average, time_average, newfile_interval, rank, origin_date, origin_date_invalid, start_date, cal, flag_mpi_gather, flag_mpi_split)
subroutine historyautocreate3(title, source, institution, dims, dimsizes, longnames, units, origin, terminus, xtypes, conventions, gt_version, all_output, file_prefix, namelist_filename, interval, slice_start, slice_end, slice_stride, space_average, time_average, newfile_interval, rank, origin_date, origin_date_invalid, start_date, cal, flag_mpi_gather, flag_mpi_split)
subroutine historyautocreate1(title, source, institution, dims, dimsizes, longnames, units, origin, terminus, xtypes, conventions, gt_version, all_output, file_prefix, namelist_filename, interval, slice_start, slice_end, slice_stride, space_average, time_average, newfile_interval, rank, origin_date, origin_date_invalid, start_date, cal, flag_mpi_gather, flag_mpi_split)