MODULES / NAMELIST / FILES / REFERENCES / ERRORS / BUGS / PLANS PRIVATE COMPONENTS

PROGRAM dart_tf_wrf

Contact: Tim Hoar
Reviewers:  
Revision: $Revision: 1.1 $
Release Name: $Name: post_iceland $
Change Date: $Date: 2005/10/19 05:54:58 $
Change history: see CVS log

OVERVIEW

Program to convert WRF netCDF input files into DART format, and vice versa.




MODULES DIRECTLY USED

types_mod
time_manager_mod
utilities_mod
models/wrf/WRF_DART_utilities/wrf_data_module
assim_model_mod

MODULES INDIRECTLY USED

models/wrf/model_mod
models/wrf/module_map_utils
obs_kind_mod
location/threed_sphere/location_mod
random_seq_mod
random_nr_mod



NAMELIST

We adhere to the F90 standard of starting a namelist with an ampersand '&' and terminating with a slash '/'.

namelist / model_nml /  &
    output_state_vector, num_moist_vars, num_domains, calendar_type, surf_obs,
    h_diab, adv_mod_command

Discussion

The program uses the model_nml. See the description in model_mod.html




FILES

File formats

In the conversion from dart to WRF, the dart_wrf_vector file is usually one of the assim_model_state_ic# that the filter writes out to advance the ensemble. As input, the dart_wrf_vector includes the target time in addition to the valid time at the beginning of the file. As output, the dart_wrf_vector includes only the valid time at the beginning of the file and is usually renamed as assim_model_state_ud# as input to the filter for the next assimilation cycle.

The file wrf.info contains the target dart time, the valid dart time, the valid date, the number of domains, and the command used to executed the WRF model. The file wrf.info is created in the conversion from dart to WRF. In the conversion from WRF back to dart, the target time is read from the file wrf.info, which should then be the valid time. This will be the time written to the dart vector file. The rest of the information in the file wrf.info is only used by the program ensemble_init and by the script advance_model.csh.



REFERENCES


ERROR CODES and CONDITIONS

RoutineMessageComment
dart_open_and_alloc, transfer_dart_wrf n_moist = is too large. The maximum number of moist variables is 7. In order, they are [qv, qc, qr, qi, qs, qg, qnice]
transfer_dart_wrf n_values differ in transfer If you get to this point, there would an inconsistency between subroutines dart_open_and_alloc and transfer_dart_wrf.
trans_2d nx, ny, not compatible Dimensions nx, ny incompatible with incoming array a2d.
trans_3d nx, ny, nz, not compatible Dimensions nx, ny, nz incompatible with incoming array a3d.



KNOWN BUGS




FUTURE PLANS

  • This program has to be updated when new prognostic variables are included in the state vector, e.g. when tracers or chemical species are evolved in WRF. The program will also need to be updated to add parameters to be estimated.




    PRIVATE COMPONENTS


    call dart_open_and_alloc( wrf, dart, n_values, dart_unit, dart_to_wrf, debug )
    integer,          intent(out) ::  dart_unit 
    logical,          intent(in)  ::  dart_to_wrf, debug 
    type(wrf_dom),    intent(in)  ::  wrf 
    real(r8),         pointer     ::  dart(:) 
    integer,          intent(out) ::  n_values  
    

    Description

    Open a dart state vector file, determine the lenght of the dart state vector, and allocate the dart state vector variable.


    call transfer_dart_wrf ( dart_to_wrf, dart, wrf, n_values_in)
    logical,          intent(in) ::  dart_to_wrf 
    type(wrf_dom),    intent(in) ::  wrf 
    real(r8), pointer            ::  dart(:) 
    integer,          intent(in) ::  n_values_in 
    

    Description

    Transfert from dart state vector to a wrf structure, or vice versa.


    call trans_2d( one_to_two, a1d, a2d, nx, ny )
    integer,  intent(in) ::  nx,ny 
    real(r8), intent(in) ::  a1d(:) 
    real(r8), intent(in) ::  a2d(nx,ny) 
    logical,  intent(in) ::  one_to_two 
    

    Description

    Transfert data from a 2D array into a 1D array, or vice versa.


    call trans_3d( one_to_three, a1d, a3d, nx, ny, nz )
    integer,  intent(in) ::  nx,ny,nz 
    real(r8), intent(in) ::  a1d(:) 
    real(r8), intent(in) ::  a3d(:,:,:) 
    logical,  intent(in) ::  one_to_three 
    

    Description

    Transfert data from a 3D array into a 1D array, or vice versa.