The GSI2DART converter was contributed by Craig Schwartz and Jamie Bresch of the Mesoscale & Microscale Meteorology Lab at NCAR. Thanks Craig and Jamie!
This converter is designed to convert observation files created by the Gridpoint Statistical Interpolation (GSI) system maintained by the National Oceanic and Atmospheric Administration (NOAA) into DART observation sequence files. The files created by GSI are ‘BIG_ENDIAN’ and have filenames such as:
The DART converter uses routines from the GSI system that use the Message Passing Interface (MPI) to process observations in parallel (even when converting a small amount of observations) so MPI is required to execute this observation converter.
Due to these prerequisites, we provide a detailed description of this directory to guide the user.
This directory contains copies of several source code files from GSI. The GSI source code is available via a Github repository managed by NOAA’s Environmental Modeling Center (EMC):
To differentiate between the sets of code, we refer to the root directory of the
NOAA-EMC repository as
GSI and refer to the root directory of this observation
GSI2DART/enkf copies seven files from
GSI/src mostly without modification:
Note that within
GSI the source file
kinds.F90 has an upper-case
suffix. Within the
GSI2DART observation converter, it gets preprocessed
mykinds.f90 with a lower-case
f90 suffix. Case-insensitive filesystems
should be banned … until then, it is more robust to implement some name change
The following three files had their open() statements modified to read
‘BIG_ENDIAN’ files without the need to compile EVERYTHING with
-convert big_endian compiler option. Using the DART open_file()
routine also provides some nice error handling.
iunit = open_file(obsfile,form='unformatted',action='read',convert='BIG_ENDIAN')
The source files within
gsi_to_dart.f90: the main program.
dart_obs_seq_mod.f90: the DART obs_seq output subroutine.
params.f90: the same module name as
GSI/src/enkf/params.f90but with different content. This version is used to avoid modifying
radinfo.f90: the same module name as
GSI/src/gsi/radinfo.f90but with different content. This version is used to avoid modifying
mpisetup.f90: the same module name as
GSI/src/enkf/mpisetup.f90but with different content. This version is used to avoid dependency on
Elsewhere in the repository
This observation converter required modifying two files and adding a module for radiance observation types.
../../forward_operators/obs_def_radiance_mod.f90which has radiance observation types
Additional files and directories
satinfois a file read by
radinfo.f90and must exist in the
datapathspecifies the directory containing the data to be converted – it is specified in the
submit.cshis contained in
GSI2DART/work/– it runs the gsi_to_dart converter once it has been compiled. Again, since GSI requires MPI, multiple processors must be requested to run the gsi_to_dart executable.
1. The converter requires an ensemble size greater than one and will MPI_Abort() if only one ensemble member is requested.
The following are issues previously recorded in the README:
Radiance and surface pressure bias correction
Surface pressure altimeter adjustment?
Specific humidity obs are transformed to relative humidity. What to do? [Just run EnSRF with psuedo_rh=.false. and assimilate RH obs]
DART must use W and PH as control variables [okay, EnSRF can do this too (nvars=6 for WRF-ARW)]
Does DART not do vertical localization for surface obs?
! If which_vert has no vertical definition for either location do only horizontal if(loc1%which_vert == VERTISUNDEF .or. loc2%which_vert == VERTISUNDEF) comp_h_only = .true. ! If both verts are surface, do only horizontal if(loc1%which_vert == VERTISSURFACE .and. loc2%which_vert == VERTISSURFACE) comp_h_only = .true.
Running with 32 bit reals
The converter has been tested with 64-bit reals as well as 32-bit reals (i.e. r8=r4 and -D_REAL_4). The answers are different only at the roundoff level.
This requires changes in two places:
DART/assimilation_code/modules/utilities/types_mod.f90change required: r8 = r4
If these are not set in a compatible fashion, you will fail to compile with the following error (or something similar):
../../../../observations/obs_converters/GSI2DART/dart_obs_seq_mod.f90(213): error #6284: There is no matching specific function for this generic function reference. [SET_LOCATION] location = set_location(lon, lat, vloc, which_vert) -----------------^