New Research Satellite Observation Class

Ross Bannister, July 2003, December 2003

For humidity data - fit to RH observations only


Last updated 11th December 2003


This document consists of the following sections:


Overview of development

The "ResSat" observation type is to replace the obsolescent "Sat120" observation type. The new type will allow assimilation of vertical profiles of temperature, ozone, and relative humidity measurements. Such profiles will normally be obtained from satellite retrievals (the Sat120 type could assimmilate only temperature).

There are two modes of the code (determined by the variable ResSatMode).

More information on the scientific details can be found as a DARC technical report via
"Layer Averaging Operators for 3d-Var". Changes to the code have been made, in the first instance, to the Var. Stable 19.5 version of the code.


Changes to existing code

The code changes are highlighted in the following table, listed by module. The links show the code with the changes. For purposes of the review, changes are highlighted with !**Ross**, but this comment will be deleted for before lodging.

VarMod_ObsInfo (1.82) .
VarMod_ObsInfo.f90
  • Added ozone in the Obheader_type
  • Added ozone in the Ob_type
  • Added ozone in the ModelOBheader_type
  • Added ozone in the ModelOB_type
  • Incremented NumObFiles to 20
  • Added "ResSat" to filename list
Note that the NumObFiles variable has been incremented by more than 1 to correspond to the entries in GenMod_ObsInfo (see below).
Var_YAllocate.f90
  • Added code for ozone profile
Var_YDeAllocate.f90
  • Added code for ozone profile
Var_YPrint.f90
  • Added code for ozone profile
Var_OBPrint.f90
  • Added code for ozone profile
Var_ObDeallocate.f90
  • Added code for ozone profile
Var_YSubtract.f90
  • Added code for ozone profile (lines 88-91)
Var_YScale.f90
  • Added code for ozone profile (lines 83-84)
Var_YRandom.f90
  • Added code for ozone profile (lines 64, 132-136)
Var_YDot.f90
  • Added code for ozone profile (lines 89-91)
Var_YCopy.f90
  • Added code for ozone profile (lines 368-395)
Var_YAdd.f90
  • Added code for ozone profile (lines 85-88)


GenMod_ObsInfo (1.26) .
GenMod_ObsInfo.f90
(Copy of Roger Brugge's code)
  • Included ObsGroupResSat=20 (line 406)
  • Incremented NumObsGroups=20 (line 407)
  • Other EnviSat changes required for OPS only (lines 500-502)


VarMod_ObsControl (1.109) .
Var_Obs2PenAndGrad.f90
  • USE variable ObsGroupResSat from GenMod_ObsInfo (see above)
  • Call to Var_ResSatPenAndGrad routine (in new module VarMod_ResSat (see below)
Var_InitObsControl.f90
  • USE variable ObsGroupResSat from GenMod_ObsInfo (see above)
  • USE variable ResSatStats from VarMod_ObsOptions (see below)
  • Make sure that cx % theta doesn't get changed to cx % T for ResSat type (old and new dynamics)
  • Include call to Var_SetupResSatStats (see below)


VarMod_ObsIO (1.126) .
Var_ObAndCxRead.f90
  • USE variable UseResSat from VarMod_ObsOptions (see below)
  • USE variable ObsGroupResSat from GenMod_ObsInfo (see above)
  • Check that the ResSat file is required


Special note - DARC only. This routine requires non-standard modifications to fix anomalous ATOVS data. This non-standard code will not be lodged.
Var_ObRead.f90
  • USE variable ObsGroupResSat from GenMod_ObsInfo (see above)
  • USE variable VarField_ozone from OpsMod_Constants (see below)
  • Declare new integer variable PntObOzone
  • In loop "AllVrbls", increment the Ivar variable to loop to 45 times and add ozone to the loop
  • In loop "UairVrbl1", add ozone (lines 646-647)
  • Label ResSat ozone, T, RH observations as representing pressure layers (line 680)
  • Store integer offsets to location of ozone profiles (line 764)
  • Make sure that the pressure data for the ResSat obs type is labelled as pressure layers - as for Sat120 (line 860)
  • Spotted and corrected unrelated error in existing comment ("!out" to "!in") (line 886)
  • Added ozone profile branch to CASE statement (lines 1164-1169)


Special note of caution - need to check (line 498 in the above "Ob % Header % ObsGroup = UMhdr % IntC(IC_ObsGroup))" does contain the number ObsGroupResSat. If not either update in OPS or do the quick-fix as lines 490-498 of DARC's previous version.

Special note of caution - need to check that MaxNumObVar is large enough. This is set in line 514 of this version of the code, and comes from the UM header. There is a 'quick-fix' in lines 516-519 of DARC's previous version.

Special note of caution - need to check that Ob%header%SatID%Status, Ob%header%SolarZenith%Status and Ob%header%Surface%Status have StatusAbsent for the ObsGroupResSat. Failure to do this will result in problems elsewhere (example bug fix in lines 1561-1572 of DARC's previous version.)

Special note of caution - need to check that pressure values are read-in from somewhere.

Action - remove WRITE statements before lodging

Special note - DARC only. This routine requires non-standard additions for reading profile dependent pressures
Var_CxRead.f90


Special note of caution - need to check (line 262 of this file) that Cx%Header%ObsGroup contains the number ObsGroupResSat. If not either update in OPS or do the quick-fix as lines 268-276 of DARC's previous version.

Action - remove WRITE statements before lodging


VarMod_ObsOptions (1.78) .
VarMod_ObsOptions.f90
  • Added LOGICAL variable "ResSatStats" (line 114)
  • Added LOGICAL variable "OzoneStats" (line 124)
  • Added LOGICAL variable "UseResSat" (line 157)
  • Added LOGICAL variables "UseResSatTs", "UseResSatRHs" and "UseResSatOzones" (lines 181-184)
  • Added INTEGER variable "ResSatMode" (line 213) (flag for switching between simple interpolation (=1), layer averaging (=2) - others planned later)
  • Added REAL variables "ResSatTWt", "ResSatRHWt" and "ResSatOzoneWt" (lines 264-266)
  • Added the above variables to the namelist
Var_ReadObservationNL.f90
  • USE variables "ResSatStats", "UseResStat", "UseResStatTs", "UseResSatRHs" and "UseResSatOzones" from VarMod_ObsOptions (see above) (line 112)
  • Added "ResSatStats" to CASE statement (line 195)
  • Added code to check ResSat flags (lines 287-294)
  • Added "UseResSat" to list (line 300)
  • Added line for ResSat (line 359)
  • Added line for ResSat (line 377)


OpsMod_Constants (1.27) .
OpsMod_Constants.f90
(Copy of Roger Brugge's code)
  • Add "VarField_ozone" and "VarField_plevelsa" (lines 164-165)


GenMod_Utilities (1.19) .
Gen_SpotTemperature.f90
  • Correct bugs which may cause problems in the future "999." to "999" (line 129) and "0." to "0" (line 141)



New code

The new code is highlighted in the following table, listed by module. The links show the code with descriptions.

VarMod_ResSat (1.1) .
VarMod_ResSat.f90
  • Equivalent of module used elsewhere set-up for the ResSat obs. type (actually adapted from Nesdis)
Var_SetupResSatStats.f90
  • Equivalent of routine used elsewhere set-up for the ResSat obs. type (actually adapted from Sonde)
Var_ResSatPenAndGrad.f90
  • Equivalent of routine used elsewhere to call routines to calculate model equivalents of ResSat obs, compute the adjoint with respect to the model obs, the penalty function contribution, and to calculate the adjoint state with respect to model columns.

    Action - remove WRITE statements before lodging
Var_ResSat2PenAndGrad.f90
  • Equivalent of routine used elsewhere to calculate ResSat penalty and gradient with respect to model observations (actually adapted from Nesdis)
Var_ResSatOperator.f90
  • Equivalent of routine used elsewhere to calculate model equivalents ob observations (actually adapted from Nesdis)
Var_ResSatOperator_Adj.f90
  • Equivalent of routine used elsewhere to calculate adjoints with respect to model columns (actually adapted from Nesdis)
Var_ResSatOperator_Test.f90
  • Equivalent to routines used elsewhere to perform adjoint test for layer averaging operators
Var_LayerAv.f90
  • Code to perform layer averaging of Cx+ columns to give model observations
Var_LayerAv_Adj.f90
  • Code to perform adjoint of layer averaging routine
Var_RHLayerAv.f90
  • Code to perform layer averaging of Cx+ columns of relative humidity to give model observations
Var_RHLayerAv_Adj.f90
  • Code to perform adjoint of layer averaging of Cx+ columns of relative humidity
Var_InterpOperator.f90
  • Adaption for use with ResSat from Var_ATOVSOperator (calls routines to perform vertical interpolation)
Var_InterpOperator_Adj.f90
  • Adaption for use with ResSat from Var_ATOVSOperator_Adj (calls routines to perform adjoint of vertical interpolation)
Var_InterpOperator_Test.f90
  • Equivalent to routines used elsewhere to perform adjoint test for interpolation operators
Var_VertInterpResSatObs.f90
  • Adapted from Var_VertInterpObs, allowing for obs level pressure data which is not contained in the Ob data structure
Var_VertInterpResSatObs_Adj.f90
  • Adapted from Var_VertInterpObs_Adj, allowing for obs level pressure data which is not contained in the Ob data structure



Code tests

(In preparation)
Tests (to be) performed are detailed in this table with links to results

Run Increments Stats stdout ResSat diagnostic output
Run 1: Run the standard code with all available obs, except ResSat obs O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout N/A
Run 2: Run modified code with all available obs, except ResSat obs O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout N/A
Run 3: Run modified code with all available obs, plus ResSat O3, T, RH obs, but with ResSat obs switched off O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout N/A
Run 4: Run modified code with all available obs, plus ResSat O3, T, RH obs, but with only ResSat O3 switched on O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 5: Run modified code with all available obs, plus ResSat O3 obs O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 6: Run modified code with all available obs, plus ResSat O3, T, RH obs, but with only ResSat T switched on O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 7: Run modified code with all available obs, plus ResSat T obs O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 8: Run modified code with all available obs, plus ResSat O3, T, RH obs, but with only ResSat RH switched on O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 9: Run modified code with all available obs, plus ResSat RH obs O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic
Run 10: Run modified code with all available obs, plus ResSat O3, T, RH obs with all three switched on O3: L1, L22, L35, L40
T: L1, L22, L35, L40
RH: L1, L22, L35, L40
Stats stdout Diagnostic