UFO
ufo_metoffice_bmatrixstatic_mod Module Reference

Fortran module containing the full b-matrix data type and methods for the 1D-Var. More...

Data Types

type  ufo_metoffice_bmatrixstatic
 

Functions/Subroutines

subroutine ufo_metoffice_bmatrixstatic_setup (self, variables, filepath, qtotal_flag)
 Routine to read and setup the 1D-Var B-matrix. More...
 
subroutine ufo_metoffice_bmatrixstatic_delete (self)
 Routine to delete and squash the 1D-Var B-matrix. More...
 
subroutine rttovonedvarcheck_covariance_initbmatrix (self)
 Routine to initialize the 1D-Var B-matrix. More...
 
subroutine rttovonedvarcheck_covariance_getbmatrix (self, fileunit, b_elementsused, fieldlist)
 Routine to initialize the 1D-Var B-matrix. More...
 
subroutine ufo_metoffice_bmatrixstatic_reset (self, latitude, b_matrix, b_inverse, b_sigma)
 Routine to create error covariances for a single observation. More...
 
subroutine rttovonedvarcheck_create_fields_in (fields_in, variables, qtotal_flag)
 Create a subset of the b-matrix. Used for testing. More...
 

Variables

character(len=200) message
 
integer, parameter, public nfieldtypes_ukmo = 19
 number of fieldtypes More...
 
integer, parameter, public ufo_metoffice_fieldtype_t = 1
 temperature More...
 
integer, parameter, public ufo_metoffice_fieldtype_q = 2
 specific humidity profile More...
 
integer, parameter, public ufo_metoffice_fieldtype_t2 = 3
 surface air temperature More...
 
integer, parameter, public ufo_metoffice_fieldtype_q2 = 4
 surface spec humidity More...
 
integer, parameter, public ufo_metoffice_fieldtype_tstar = 5
 surface skin temperature More...
 
integer, parameter, public ufo_metoffice_fieldtype_pstar = 6
 surface pressure More...
 
integer, parameter, public ufo_metoffice_fieldtype_o3total = 7
 total column ozone - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_not_used = 8
 not currently in use - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_ql = 9
 liquid water profile - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_qt = 10
 total water profile More...
 
integer, parameter, public ufo_metoffice_fieldtype_windspeed = 11
 surface wind speed More...
 
integer, parameter, public ufo_metoffice_fieldtype_o3profile = 12
 ozone - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_lwp = 13
 liquid water path - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_mwemiss = 14
 microwave emissivity - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_qi = 15
 ice profile - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_cloudtopp = 16
 single-level cloud top pressure More...
 
integer, parameter, public ufo_metoffice_fieldtype_cloudfrac = 17
 effective cloud fraction More...
 
integer, parameter, public ufo_metoffice_fieldtype_emisspc = 18
 emissivity prinipal components - not currently setup More...
 
integer, parameter, public ufo_metoffice_fieldtype_cf = 19
 cloud fraction profile - not currently setup More...
 
character(len= *), dimension(nfieldtypes_ukmo), parameter, public ufo_metoffice_fieldtype_text = (/ var_ts, var_q, var_sfc_t2m, var_sfc_q2m, var_sfc_tskin, var_sfc_p2m, 'ozone (total column)', '[unused field type] ', var_clw, 'q total ', var_sfc_wspeed, 'ozone (profile) ', 'liquid water path ', var_sfc_emiss, var_cli, 'cloud top pressure ', 'cloud fraction ', 'emissivity pcs ', var_cldfrac /)
 

Detailed Description

Fortran module containing the full b-matrix data type and methods for the 1D-Var.

Function/Subroutine Documentation

◆ rttovonedvarcheck_covariance_getbmatrix()

subroutine ufo_metoffice_bmatrixstatic_mod::rttovonedvarcheck_covariance_getbmatrix ( type (ufo_metoffice_bmatrixstatic), intent(inout)  self,
integer, intent(in)  fileunit,
integer, dimension(:), intent(in), optional  b_elementsused,
integer, dimension(:), intent(inout), optional  fieldlist 
)
private

Routine to initialize the 1D-Var B-matrix.

Met Office OPS Heritage: Ops_SatRad_GetBmatrix.f90

read the input file and allocate and fill in all the components of the bmatrix structure, with the exception of proxy variables.

notes:

it is assumed a valid bmatrix file is available and has been opened ready for reading, accessed via the input unit number.

two optional arguments are provided to allow a submatrix to be formed from the original file, either depending on a list of fields to be used for retrieval, or a list of specific element numbers to be retained.

the file header may begin with any number of comment lines, which are defined as those using either # or ! as the first non-blank character.

immediately following any comments, the header should then contain information on the size of the matrix to be read in, and a description of each matrix element. memory will be allocated depending on these matrix specifications.

each matrix should then have a one line header containing the latitude bounds and a latitude band id. band id numbers should be sequential in latitude. i.e. band 1 will begin at -90.0, band 2 from -60.0 ... (or however wide we choose the bands).

we also calculate an inverse of each b matrix, used in the current 1d-var for cost function monitoring only but it may be required for other minimization methods at some point.

standard deviations are also stored in a separate vector.

proxy variables are provided to allow manipulation of the chosen matrix during processing without affecting the original. we might wish to do this, for example, to take account of the different surface temperature errors for land and sea. this routine makes no assumption about the use of these variables, hence no space is allocated. nullification of unused pointers should take place outside (use the ops_satrad_initbmatrix routine).

Author
Met Office
Date
09/06/2020: Created
Parameters
[in,out]selfB-matrix covariance
[in]fileunitfree file unit number
[in]b_elementsusedoptional: list of elements used
[in,out]fieldlistoptional: list of fields used

Definition at line 272 of file ufo_metoffice_bmatrixstatic_mod.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rttovonedvarcheck_covariance_initbmatrix()

subroutine ufo_metoffice_bmatrixstatic_mod::rttovonedvarcheck_covariance_initbmatrix ( type(ufo_metoffice_bmatrixstatic), intent(out)  self)
private

Routine to initialize the 1D-Var B-matrix.

Met Office OPS Heritage: Ops_SatRad_InitBmatrix.f90

Author
Met Office
Date
09/06/2020: Created
Parameters
[out]selfB-matrix Covariance

Definition at line 202 of file ufo_metoffice_bmatrixstatic_mod.f90.

Here is the caller graph for this function:

◆ rttovonedvarcheck_create_fields_in()

subroutine ufo_metoffice_bmatrixstatic_mod::rttovonedvarcheck_create_fields_in ( integer, dimension(:), intent(inout), allocatable  fields_in,
character(len=*), dimension(:), intent(in)  variables,
logical, intent(in)  qtotal_flag 
)
private

Create a subset of the b-matrix. Used for testing.

Author
Met Office
Date
09/06/2020: Created
Parameters
[in,out]fields_inArray to specify fields used
[in]variablesModel variables in B matrix
[in]qtotal_flagFlag for qtotal

Definition at line 646 of file ufo_metoffice_bmatrixstatic_mod.f90.

Here is the caller graph for this function:

◆ ufo_metoffice_bmatrixstatic_delete()

subroutine ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_bmatrixstatic_delete ( class(ufo_metoffice_bmatrixstatic), intent(inout)  self)
private

Routine to delete and squash the 1D-Var B-matrix.

Met Office OPS Heritage: Ops_SatRad_SquashBmatrix.f90

Author
Met Office
Date
09/06/2020: Created
Parameters
[in,out]selfB-matrix Covariance

Definition at line 171 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_bmatrixstatic_reset()

subroutine ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_bmatrixstatic_reset ( class(ufo_metoffice_bmatrixstatic), intent(in)  self,
real(kind_real), intent(in)  latitude,
real(kind_real), dimension(:,:), intent(out)  b_matrix,
real(kind_real), dimension(:,:), intent(out)  b_inverse,
real(kind_real), dimension(:), intent(out)  b_sigma 
)
private

Routine to create error covariances for a single observation.

Met Office OPS Heritage: Ops_SatRad_ResetCovariances.f90

Author
Met Office
Date
08/09/2020: Created
Parameters
[in]selfB-matrix covariance

Definition at line 575 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_bmatrixstatic_setup()

subroutine ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_bmatrixstatic_setup ( class(ufo_metoffice_bmatrixstatic), intent(inout)  self,
character(len=*), dimension(:), intent(in)  variables,
character(len=*), intent(in)  filepath,
logical, intent(in)  qtotal_flag 
)
private

Routine to read and setup the 1D-Var B-matrix.

Author
Met Office
Date
09/06/2020: Created
Parameters
[in,out]selfB-matrix Covariance
[in]variablesModel variables in B matrix
[in]filepathPath to B matrix file
[in]qtotal_flagFlag for qtotal

Definition at line 104 of file ufo_metoffice_bmatrixstatic_mod.f90.

Here is the call graph for this function:

Variable Documentation

◆ message

character(len=200) ufo_metoffice_bmatrixstatic_mod::message

Definition at line 39 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ nfieldtypes_ukmo

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::nfieldtypes_ukmo = 19

number of fieldtypes

Definition at line 52 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_cf

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_cf = 19

cloud fraction profile - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_cloudfrac

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_cloudfrac = 17

effective cloud fraction

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_cloudtopp

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_cloudtopp = 16

single-level cloud top pressure

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_emisspc

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_emisspc = 18

emissivity prinipal components - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_lwp

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_lwp = 13

liquid water path - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_mwemiss

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_mwemiss = 14

microwave emissivity - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_not_used

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_not_used = 8

not currently in use - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_o3profile

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_o3profile = 12

ozone - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_o3total

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_o3total = 7

total column ozone - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_pstar

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_pstar = 6

surface pressure

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_q

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_q = 2

specific humidity profile

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_q2

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_q2 = 4

surface spec humidity

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_qi

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_qi = 15

ice profile - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_ql

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_ql = 9

liquid water profile - not currently setup

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_qt

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_qt = 10

total water profile

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_t

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_t = 1

temperature

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_t2

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_t2 = 3

surface air temperature

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_text

character(len=*), dimension(nfieldtypes_ukmo), parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_text = (/ var_ts, var_q, var_sfc_t2m, var_sfc_q2m, var_sfc_tskin, var_sfc_p2m, 'ozone (total column)', '[unused field type] ', var_clw, 'q total ', var_sfc_wspeed, 'ozone (profile) ', 'liquid water path ', var_sfc_emiss, var_cli, 'cloud top pressure ', 'cloud fraction ', 'emissivity pcs ', var_cldfrac /)

Definition at line 74 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_tstar

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_tstar = 5

surface skin temperature

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.

◆ ufo_metoffice_fieldtype_windspeed

integer, parameter, public ufo_metoffice_bmatrixstatic_mod::ufo_metoffice_fieldtype_windspeed = 11

surface wind speed

Definition at line 53 of file ufo_metoffice_bmatrixstatic_mod.f90.