FMS 2025.01-dev
Flexible Modeling System
Loading...
Searching...
No Matches
fm_yaml_mod

Reads entries from a field table yaml into a nested object for use in the field manager. More...

Data Types

type  fmattr_t
 This type represents a subparameter block for a given variable parameter. This type contains the name of the associated parameter and the subparameter key/value pairs. More...
 
type  fmmodel_t
 This type represents the entries for a given model, e.g. land, ocean, atmosphere. This type contains the name of the model, the block id, and the variables within this model. More...
 
type  fmtable_t
 This type contains the field types within a field table. More...
 
type  fmtype_t
 This type represents the entries for a specific field type, e.g. a tracer. This type contains the name of the field type, the block id, and the models within this field type. More...
 
type  fmvar_t
 This type represents the entries for a given variable, e.g. dust. This type contains the name of the variable, the block id, the key/value pairs for the variable's parameters, and any applicable subparameters. More...
 

Functions/Subroutines

subroutine build_fmmodel (fmmodel, yfid)
 Populates an fmModel, which is assumed to already have its id parameter set.
 
subroutine, public build_fmtable (fmtable, filename)
 Subroutine to populate an fmTable by reading a yaml file, given an optional filename.
 
subroutine build_fmtype (fmtype, yfid)
 Populates an fmType, which is assumed to already have its id parameter set.
 
subroutine build_fmvar (fmvar, yfid)
 Populates an fmVar and creates any associated fmAttrs.
 
subroutine fmvar_read_attrs (fmvar, yfid, method_keys, method_values)
 Reads the attribute blocks attached to a variable and populates the associated fmAttr structures. Returns two arrays containing key/value pairs of all methods defined via attribute blocks.
 

Detailed Description

Reads entries from a field table yaml into a nested object for use in the field manager.

Author
Eric Stofferahn

Data Type Documentation

◆ fm_yaml_mod::fmattr_t

type fm_yaml_mod::fmattr_t

This type represents a subparameter block for a given variable parameter. This type contains the name of the associated parameter and the subparameter key/value pairs.

Definition at line 48 of file fm_yaml.F90.

Collaboration diagram for fmattr_t:
[legend]

Public Attributes

integer id
 block id of this var
 
character(len=:), dimension(:), allocatable keys
 name of the attribute
 
character(len=:), allocatable paramname
 name of associated parameter
 
character(len=:), dimension(:), allocatable values
 value of the attribute
 

Member Data Documentation

◆ id

integer id

block id of this var

Definition at line 49 of file fm_yaml.F90.

◆ keys

character(len=:), dimension(:), allocatable keys

name of the attribute

Definition at line 51 of file fm_yaml.F90.

◆ paramname

character(len=:), allocatable paramname

name of associated parameter

Definition at line 50 of file fm_yaml.F90.

◆ values

character(len=:), dimension(:), allocatable values

value of the attribute

Definition at line 52 of file fm_yaml.F90.

◆ fm_yaml_mod::fmmodel_t

type fm_yaml_mod::fmmodel_t

This type represents the entries for a given model, e.g. land, ocean, atmosphere. This type contains the name of the model, the block id, and the variables within this model.

Definition at line 70 of file fm_yaml.F90.

Collaboration diagram for fmmodel_t:
[legend]

Public Attributes

integer id
 block id of this model
 
character(len=:), allocatable name
 name of the model
 
type(fmvar_t), dimension(:), allocatable variables
 variables in this model
 

Member Data Documentation

◆ id

integer id

block id of this model

Definition at line 71 of file fm_yaml.F90.

◆ name

character(len=:), allocatable name

name of the model

Definition at line 72 of file fm_yaml.F90.

◆ variables

type (fmvar_t), dimension(:), allocatable variables

variables in this model

Definition at line 73 of file fm_yaml.F90.

◆ fm_yaml_mod::fmtable_t

type fm_yaml_mod::fmtable_t

This type contains the field types within a field table.

Definition at line 87 of file fm_yaml.F90.

Collaboration diagram for fmtable_t:
[legend]

Public Attributes

type(fmtype_t), dimension(:), allocatable types
 field types in this table
 

Member Data Documentation

◆ types

type (fmtype_t), dimension(:), allocatable types

field types in this table

Definition at line 88 of file fm_yaml.F90.

◆ fm_yaml_mod::fmtype_t

type fm_yaml_mod::fmtype_t

This type represents the entries for a specific field type, e.g. a tracer. This type contains the name of the field type, the block id, and the models within this field type.

Definition at line 79 of file fm_yaml.F90.

Collaboration diagram for fmtype_t:
[legend]

Public Attributes

integer id
 block id of this type
 
type(fmmodel_t), dimension(:), allocatable models
 models in this type
 
character(len=:), allocatable name
 name of the type
 

Member Data Documentation

◆ id

integer id

block id of this type

Definition at line 80 of file fm_yaml.F90.

◆ models

type (fmmodel_t), dimension(:), allocatable models

models in this type

Definition at line 82 of file fm_yaml.F90.

◆ name

character(len=:), allocatable name

name of the type

Definition at line 81 of file fm_yaml.F90.

◆ fm_yaml_mod::fmvar_t

type fm_yaml_mod::fmvar_t

This type represents the entries for a given variable, e.g. dust. This type contains the name of the variable, the block id, the key/value pairs for the variable's parameters, and any applicable subparameters.

Definition at line 59 of file fm_yaml.F90.

Collaboration diagram for fmvar_t:
[legend]

Public Attributes

type(fmattr_t), dimension(:), allocatable attributes
 attributes in this var
 
integer id
 block id of this var
 
character(len=:), dimension(:), allocatable keys
 names of params
 
character(len=:), allocatable name
 name of the variable
 
character(len=:), dimension(:), allocatable values
 values of params
 

Member Data Documentation

◆ attributes

type (fmattr_t), dimension(:), allocatable attributes

attributes in this var

Definition at line 64 of file fm_yaml.F90.

◆ id

integer id

block id of this var

Definition at line 60 of file fm_yaml.F90.

◆ keys

character(len=:), dimension(:), allocatable keys

names of params

Definition at line 62 of file fm_yaml.F90.

◆ name

character(len=:), allocatable name

name of the variable

Definition at line 61 of file fm_yaml.F90.

◆ values

character(len=:), dimension(:), allocatable values

values of params

Definition at line 63 of file fm_yaml.F90.

Function/Subroutine Documentation

◆ build_fmmodel()

subroutine build_fmmodel ( type(fmmodel_t), intent(inout)  fmmodel,
integer, intent(in)  yfid 
)
private

Populates an fmModel, which is assumed to already have its id parameter set.

Parameters
[in,out]fmmodelmodel object
[in]yfidfile id of the yaml file

Definition at line 157 of file fm_yaml.F90.

◆ build_fmtable()

subroutine, public build_fmtable ( type(fmtable_t), intent(out)  fmtable,
character(len=*), intent(in), optional  filename 
)

Subroutine to populate an fmTable by reading a yaml file, given an optional filename.

Parameters
[out]fmtablethe field table
[in]filenamethe name of the yaml file

Definition at line 97 of file fm_yaml.F90.

◆ build_fmtype()

subroutine build_fmtype ( type(fmtype_t), intent(inout)  fmtype,
integer, intent(in)  yfid 
)
private

Populates an fmType, which is assumed to already have its id parameter set.

Parameters
[in,out]fmtypetype object
[in]yfidfile id of the yaml file

Definition at line 122 of file fm_yaml.F90.

◆ build_fmvar()

subroutine build_fmvar ( type(fmvar_t), intent(inout)  fmvar,
integer, intent(in)  yfid 
)
private

Populates an fmVar and creates any associated fmAttrs.

Parameters
[in,out]fmvarvariable object
[in]yfidfile id of the yaml file

Definition at line 192 of file fm_yaml.F90.

◆ fmvar_read_attrs()

subroutine fmvar_read_attrs ( type(fmvar_t), intent(inout)  fmvar,
integer, intent(in)  yfid,
character(:), dimension(:), intent(out), allocatable  method_keys,
character(:), dimension(:), intent(out), allocatable  method_values 
)
private

Reads the attribute blocks attached to a variable and populates the associated fmAttr structures. Returns two arrays containing key/value pairs of all methods defined via attribute blocks.

Parameters
[in,out]fmvarvariable object
[in]yfidfile id of the yaml file
[out]method_keysMethod keys (names of attribute blocks)
[out]method_valuesMethod values from attribute blocks

Definition at line 266 of file fm_yaml.F90.