40 character(len=LENMODELNAME) :: modelname
41 character(len=LENCOMPONENTNAME) :: modeltype
42 character(len=LINELENGTH) :: modelfname
43 character(len=LINELENGTH) :: nc_fname
45 integer(I4B) :: nctype
46 integer(I4B) :: disenum
61 logical(LGP) :: active
85 integer(I4B),
intent(in) :: iout
88 character(len=LENMEMPATH) :: modelnam_mempath, model_mempath, ext
89 integer(I4B),
pointer :: disenum
93 do n = 1, model_dynamic_pkgs%Count()
95 allocate (export_model)
104 model_mempath =
create_mem_path(component=model_dynamic_input%modelname, &
107 call mem_setptr(disenum,
'DISENUM', model_mempath)
110 call export_model%init(model_dynamic_input, disenum, iout)
114 modelnam_mempath, found)
119 modelnam_mempath, found)
126 ext =
file_ext(export_model%nc_fname)
127 if (ext /=
'nc')
then
128 errmsg =
'NetCDF output file name must use ".nc" extension. '// &
129 'Filename="'//trim(export_model%nc_fname)//
'".'
143 class(*),
pointer :: obj
148 if (
associated(obj))
then
152 call export_model%post_prepare()
161 class(*),
pointer :: obj
166 if (
associated(obj))
then
170 call export_model%post_step()
179 class(*),
pointer :: obj
184 if (
associated(obj))
then
188 call export_model%destroy()
189 deallocate (export_model)
190 nullify (export_model)
201 subroutine init(this, loaders, disenum, iout)
205 integer(I4B),
intent(in) :: disenum
206 integer(I4B),
intent(in) :: iout
207 this%loaders => loaders
208 this%modelname = loaders%modelname
209 this%modeltype = loaders%modeltype
210 this%modelfname = loaders%modelfname
213 this%disenum = disenum
215 nullify (this%nc_export)
223 if (
associated(this%nc_export))
then
224 call this%nc_export%export_input()
233 if (
associated(this%nc_export))
then
234 call this%nc_export%step()
243 if (
associated(this%nc_export))
then
244 call this%nc_export%destroy()
245 deallocate (this%nc_export)
246 nullify (this%nc_export)
255 class(*),
pointer :: obj
264 integer(I4B),
intent(in) :: idx
266 class(*),
pointer :: obj
271 if (
associated(obj))
then
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
integer(i4b), parameter lenmodelname
maximum length of the model name
integer(i4b), parameter lenmempath
maximum length of the memory path
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the ModelExportModule.
subroutine post_step(this)
model export container post step actions
subroutine, public modelexports_post_prepare()
export model list post prepare step
subroutine destroy(this)
destroy model export container
subroutine, public modelexports_destroy()
destroy export model list
subroutine, public modelexports_post_step()
export model list post step
type(listtype), public export_models
subroutine post_prepare(this)
model export container post prepare step actions
class(exportmodeltype) function, pointer, public get_export_model(idx)
get model export object by index
subroutine add_export_model(export_model)
add model export object to list
subroutine, public modelexports_create(iout)
create export container variable for all local models
logical(lgp) function, public nc_export_active()
is netcdf export configured for any model
This module contains the NCModelExportModule.
@, public netcdf_structured
netcdf structrured export
@, public netcdf_mesh2d
netcdf ugrid layered mesh export
@, public netcdf_undef
undefined netcdf export type
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
This module contains the SourceCommonModule.
character(len=lenpackagetype) function, public file_ext(filename)
input file extension
A generic heterogeneous doubly-linked list.
abstract type for model netcdf export type