diff --git a/libglad/glad_io.F90.default b/libglad/glad_io.F90.default index dce640f4..df5abec8 100644 --- a/libglad/glad_io.F90.default +++ b/libglad/glad_io.F90.default @@ -1,6 +1,6 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: this file was automatically generated on -! Thu, 16 Nov 2017 22:28:05 +0000 +! Mon, 26 Feb 2018 02:27:00 +0000 ! from ncdf_template.F90.in !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -45,14 +45,14 @@ module glad_io ! written by Magnus Hagdorn, 2004 use glad_type + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in glad_io_create. module procedure is_enabled_0dint @@ -73,7 +73,6 @@ contains ! open all netCDF files for output use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -99,7 +98,6 @@ contains ! if necessary write to netCDF files use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glad_instance) :: data @@ -146,7 +144,6 @@ contains use parallel use glide_types use glad_type - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -378,7 +375,6 @@ contains subroutine glad_io_write(outfile,data) use parallel use glad_type - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -547,7 +543,6 @@ contains ! read from netCDF file use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glad_instance) :: data @@ -583,7 +578,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(glad_instance) :: data @@ -635,7 +629,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use glad_type use glimmer_paramets use glimmer_scales @@ -772,7 +765,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use glad_type implicit none @@ -795,7 +787,6 @@ contains use parallel use glide_types use glad_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -815,7 +806,6 @@ contains subroutine glad_avg_reset(outfile,data) use parallel use glad_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -836,7 +826,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type diff --git a/libglad/glad_mbal_io.F90.default b/libglad/glad_mbal_io.F90.default index 09fb9eef..0662cf6b 100644 --- a/libglad/glad_mbal_io.F90.default +++ b/libglad/glad_mbal_io.F90.default @@ -1,6 +1,6 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: this file was automatically generated on -! Thu, 16 Nov 2017 22:28:05 +0000 +! Mon, 26 Feb 2018 02:27:00 +0000 ! from ncdf_template.F90.in !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -45,14 +45,14 @@ module glad_mbal_io ! written by Magnus Hagdorn, 2004 use glad_type + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in glad_mbal_io_create. module procedure is_enabled_0dint @@ -73,7 +73,6 @@ contains ! open all netCDF files for output use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -99,7 +98,6 @@ contains ! if necessary write to netCDF files use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glad_instance) :: data @@ -146,7 +144,6 @@ contains use parallel use glide_types use glad_type - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -464,7 +461,6 @@ contains subroutine glad_mbal_io_write(outfile,data) use parallel use glad_type - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -612,7 +608,6 @@ contains ! read from netCDF file use glad_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glad_instance) :: data @@ -648,7 +643,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(glad_instance) :: data @@ -700,7 +694,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use glad_type use glimmer_paramets use glimmer_scales @@ -722,7 +715,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use glad_type implicit none @@ -817,7 +809,6 @@ contains use parallel use glide_types use glad_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -837,7 +828,6 @@ contains subroutine glad_mbal_avg_reset(outfile,data) use parallel use glad_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -858,7 +848,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type diff --git a/libglide/glide_io.F90.default b/libglide/glide_io.F90.default index 7e585624..2070dc0e 100644 --- a/libglide/glide_io.F90.default +++ b/libglide/glide_io.F90.default @@ -1,6 +1,6 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: this file was automatically generated on -! Thu, 16 Nov 2017 22:28:05 +0000 +! Mon, 26 Feb 2018 02:27:00 +0000 ! from ncdf_template.F90.in !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -46,14 +46,14 @@ module glide_io ! written by Magnus Hagdorn, 2004 use glide_types + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in glide_io_create. module procedure is_enabled_0dint @@ -74,7 +74,6 @@ contains ! open all netCDF files for output use glide_types use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -100,7 +99,6 @@ contains ! if necessary write to netCDF files use glide_types use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: data @@ -147,7 +145,6 @@ contains use parallel use glide_types use glide_types - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -4811,7 +4808,6 @@ contains subroutine glide_io_write(outfile,data) use parallel use glide_types - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -6147,7 +6143,6 @@ contains ! read from netCDF file use glide_types use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: data @@ -6183,7 +6178,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(glide_global_type) :: data @@ -6235,7 +6229,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use glide_types use glimmer_paramets use glimmer_scales @@ -7778,7 +7771,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use glide_types implicit none @@ -7873,7 +7865,6 @@ contains use parallel use glide_types use glide_types - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -7923,7 +7914,6 @@ contains subroutine glide_avg_reset(outfile,data) use parallel use glide_types - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -7974,7 +7964,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type diff --git a/libglimmer/glimmer_ncdf.F90 b/libglimmer/glimmer_ncdf.F90 index d8e97cb0..96d4fb4f 100644 --- a/libglimmer/glimmer_ncdf.F90 +++ b/libglimmer/glimmer_ncdf.F90 @@ -42,6 +42,9 @@ module glimmer_ncdf implicit none + integer, parameter :: glimmer_nc_vars_len = 1024 + !> maximum length for lists of variables in file + integer, parameter :: glimmer_nc_meta_len = 100 !> maximum length for meta data @@ -114,9 +117,9 @@ module glimmer_ncdf ! TODO - Create a variable for vars length so it can be made longer (Matt has this implemented in his subglacial hydrology branch) ! Apply it here for vars, vars_copy and to restart_variable_list in glimmer_ncparams.F90 - character(len=310) vars !> string containing variables to be processed - logical :: restartfile = .false. !> Set to true if we're writing a restart file - character(len=310) vars_copy !> string containing variables to be processed (retained copy) + character(len=glimmer_nc_vars_len) :: vars !> string containing variables to be processed + logical :: restartfile = .false. !> Set to true if we're writing a restart file + character(len=glimmer_nc_vars_len) :: vars_copy !> string containing variables to be processed (retained copy) end type glimmer_nc_stat diff --git a/libglimmer/ncdf_template.F90.in b/libglimmer/ncdf_template.F90.in index edda0fb7..6a8bffc3 100644 --- a/libglimmer/ncdf_template.F90.in +++ b/libglimmer/ncdf_template.F90.in @@ -40,14 +40,14 @@ module NAME_io ! written by Magnus Hagdorn, 2004 use DATAMOD + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in NAME_io_create. module procedure is_enabled_0dint @@ -68,7 +68,6 @@ contains ! open all netCDF files for output use DATAMOD use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -94,7 +93,6 @@ contains ! if necessary write to netCDF files use DATAMOD use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(DATATYPE) :: data @@ -141,7 +139,6 @@ contains use parallel use glide_types use DATAMOD - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -232,7 +229,6 @@ contains subroutine NAME_io_write(outfile,data) use parallel use DATAMOD - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -367,7 +363,6 @@ contains ! read from netCDF file use DATAMOD use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(DATATYPE) :: data @@ -403,7 +398,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(DATATYPE) :: data @@ -455,7 +449,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use DATAMOD use glimmer_paramets use glimmer_scales @@ -478,7 +471,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use DATAMOD implicit none @@ -502,7 +494,6 @@ contains use parallel use glide_types use DATAMOD - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -523,7 +514,6 @@ contains subroutine NAME_avg_reset(outfile,data) use parallel use DATAMOD - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -545,7 +535,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type diff --git a/libglint/glint_io.F90.default b/libglint/glint_io.F90.default index 065f40ff..0ddddd18 100644 --- a/libglint/glint_io.F90.default +++ b/libglint/glint_io.F90.default @@ -1,6 +1,6 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: this file was automatically generated on -! Thu, 16 Nov 2017 22:28:05 +0000 +! Mon, 26 Feb 2018 02:27:00 +0000 ! from ncdf_template.F90.in !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -45,14 +45,14 @@ module glint_io ! written by Magnus Hagdorn, 2004 use glint_type + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in glint_io_create. module procedure is_enabled_0dint @@ -73,7 +73,6 @@ contains ! open all netCDF files for output use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -99,7 +98,6 @@ contains ! if necessary write to netCDF files use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glint_instance) :: data @@ -146,7 +144,6 @@ contains use parallel use glide_types use glint_type - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -566,7 +563,6 @@ contains subroutine glint_io_write(outfile,data) use parallel use glint_type - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -784,7 +780,6 @@ contains ! read from netCDF file use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glint_instance) :: data @@ -820,7 +815,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(glint_instance) :: data @@ -872,7 +866,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use glint_type use glimmer_paramets use glimmer_scales @@ -1032,7 +1025,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use glint_type implicit none @@ -1055,7 +1047,6 @@ contains use parallel use glide_types use glint_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -1075,7 +1066,6 @@ contains subroutine glint_avg_reset(outfile,data) use parallel use glint_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -1096,7 +1086,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type diff --git a/libglint/glint_mbal_io.F90.default b/libglint/glint_mbal_io.F90.default index 48c9ba45..3996460e 100644 --- a/libglint/glint_mbal_io.F90.default +++ b/libglint/glint_mbal_io.F90.default @@ -1,6 +1,6 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! WARNING: this file was automatically generated on -! Thu, 16 Nov 2017 22:28:05 +0000 +! Mon, 26 Feb 2018 02:27:00 +0000 ! from ncdf_template.F90.in !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -45,14 +45,14 @@ module glint_mbal_io ! written by Magnus Hagdorn, 2004 use glint_type + use glimmer_ncdf implicit none private :: get_xtype, is_enabled, is_enabled_0dint, is_enabled_1dint, & is_enabled_2dint, is_enabled_0dreal, is_enabled_1dreal, is_enabled_2dreal, is_enabled_3dreal - character(310), save :: restart_variable_list='' ! list of variables needed for a restart -!TODO change 310 to a variable - see glimmer_ncdf.F90 in the definition for type glimmer_nc_stat for other instances of this value. + character(glimmer_nc_vars_len), save :: restart_variable_list='' ! list of variables needed for a restart interface is_enabled ! MJH 10/21/13: Interface needed for determining if arrays have been enabled. See notes below in glint_mbal_io_create. module procedure is_enabled_0dint @@ -73,7 +73,6 @@ contains ! open all netCDF files for output use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glide_global_type) :: model @@ -99,7 +98,6 @@ contains ! if necessary write to netCDF files use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glint_instance) :: data @@ -146,7 +144,6 @@ contains use parallel use glide_types use glint_type - use glimmer_ncdf use glimmer_ncio use glimmer_map_types use glimmer_log @@ -724,7 +721,6 @@ contains subroutine glint_mbal_io_write(outfile,data) use parallel use glint_type - use glimmer_ncdf use glimmer_paramets use glimmer_scales implicit none @@ -942,7 +938,6 @@ contains ! read from netCDF file use glint_type use glide_types - use glimmer_ncdf use glimmer_ncio implicit none type(glint_instance) :: data @@ -978,7 +973,6 @@ contains ! Read data from forcing files use glimmer_log use glide_types - use glimmer_ncdf implicit none type(glint_instance) :: data @@ -1030,7 +1024,6 @@ contains ! read variables from a netCDF file use parallel use glimmer_log - use glimmer_ncdf use glint_type use glimmer_paramets use glimmer_scales @@ -1052,7 +1045,6 @@ contains ! check if dimension sizes in file match dims of model use parallel use glimmer_log - use glimmer_ncdf use glide_types use glint_type implicit none @@ -1147,7 +1139,6 @@ contains use parallel use glide_types use glint_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -1167,7 +1158,6 @@ contains subroutine glint_mbal_avg_reset(outfile,data) use parallel use glint_type - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile ! structure containg output netCDF descriptor @@ -1188,7 +1178,6 @@ contains !> apply default type to be used in netCDF file integer function get_xtype(outfile,xtype) - use glimmer_ncdf implicit none type(glimmer_nc_output), pointer :: outfile !< derived type holding information about output file integer, intent(in) :: xtype !< the external netCDF type