December 1, 2005

What's new:
1.  A set of code to read real surface observations and produce an obs sequence, based on the dates set in wrf1d_namelist.input.  This is called create_real_network.

The following steps should be followed to create a set of real surface observations (e.g., for the BAMEX period using the observations from the ARM site) to be assimilated:

a. Run create_obs_sequence.
   * For surface observations from ARM there is no need for quality control values as the observations are already quality controled.
b. Run create_real_network_seq
   * Edit wrf1d.namelist.input and input.nml properly:

    wrf1d.namelist.input:
     * At present only sequences from true observations files  can be produced (i.e., it is not possible to produce "observations" sequences based on WRF output).
     * The following options have to be chosen in wrf1.namelist.input:

        init_f = .TRUE.
	rnd_init = .FALSE.
	rnd_force = .FALSE.
	init_f_type = 'OBS'
  
       For BAMEX period for example, the following options should be chosen:
       The soundings file:
        init_f_file='sgpsondewnpnC1.b1.BAMEX.nc'
       The surface observations file (SMOS):
        init_smos_file='sgp30smosE13.b1.BAMEX.nc'
       Sequences of surface observations are produced only for days for which soundings are available.
       The following is an example of chosen suitable dates and hours for BAMEX soundings:
         start_year_f=2003
         start_month_f=5
         start_day_f=10
         start_hour_f=11
         start_minute_f=30
         start_forecast=0 
       The length of the surface observations sequence is determined by "forecast_length".
	Soundings for BAMEX period are available every 6 hours, therefore
         interval_f=21600
        All other intervals according to the available observations files.
	
	input.nml:
         The relevant parameters to create the sequence of real observations are:
        * start_real_obs: The time in seconds, after initialization, at which we want to start the assimilation of surface observations in the DART-PBL_1D run. For example, if we want to start assimilation of surface observations at 13Z when running DART-PBL_1D, we will run create_real_network_seq with "start_hour_f=11" and "start_minute_f=30" in wrf1d.namelist.input as described above, and "start_real_obs=5400" in input.nml. 
        * real_obs_period: the surface observations frequency we want in our real observations file (i.e., the assimilation frequency of surface observations). For BAMEX example, surface observations are available every 1800 secs, therefore, real_obs_period can be any factor of 1800.


2.  The model is date-aware now, and it will be very helpful when running experiments to understand all the time controls.  The GREGORIAN calendar is synched between DART and the model.  One must make sure that the initialization times given to DART makes sense relative to the date specified in wrf1d_namelist.input.
  The following parameters should be chosen carefuly:
    start_year_f
    start_month_f
    start_day_f
    start_hour_f
    start_minute_f
  These denote date and time of the day at which soundings used for initialization and forcing of the PBL_1D model are available, or initialization times of WRF runs used for initialization and forcing of the PBL_1D. These are given in GREGORIAN notation.
   start_forecast: seconds after the date and time defined above to start the PBL_1D run. These does not mean that the assimilation of surface observations is started at this time. 

3.  The ability to initialize the soil and profiles from observations.  We have not implemented a perturbation method about observed profiles, so only single runs can be initialized from obs.

4.  More robust initialization with lots more error checking.

5.  Basic parameter estimation infrastructure.

Some background on the code is given in driver.F and PBLcolumn.pdf
and at 
http://www.mmm.ucar.edu/wrf/users/workshops/WS2005/presentations/session4/6-Pagowski.pdf
http://www.mmm.ucar.edu/mm5/workshop/ws04/Session1/Pagowski.Mariusz_web.pdf

Input to the 1d WRF can consist of idealized profiles built based
on namelist, profiles derived from 3d WRF runs, or profiles derived
from observations.  It is currently not possible to run ensembles from
observations because a perturbation strategy about an observed profile
is not implemented.  The input files must be in a specific netCDF format.
Little error checking is done.

Output contains final profiles of wind, potential temperature and mixing
ratio, time series of soil temperature and moisture and some similarity
diagnostics  (see subroutine output_wrf_profiles in module_wrf.F)

Below parameters used in namelist are described

-----------------------------
&record1 - contains general specifications on physics options,
vertical grid, time step etc.

init_f  - TRUE if input is obtained from profiles derived from 3d WRF runs
         (follows to &record2)
         FALSE if input is idealized (follows to &record2)

rnd_init - TRUE if requesting random selection for input (i.e. a random ensemble member) 

*** As of now rnd_init works only with WRF profiles?****

           FALSE if requesting input from a specific date/time
           
init_f_type - OBS to get initialization and forcing input from provided obs
              WRF to get it from 3D WRF output

BL and surface schemes - options:

  CHARACTER(len=15) :: bl_pbl_physics='MYJPBLSCHEME',sf_sfclay_physics='SFCLAYSCHEME'
  CHARACTER(len=15) :: bl_pbl_physics='MYJPBLSCHEME',sf_sfclay_physics='MYJSFCSCHEME'
  CHARACTER(len=15) :: bl_pbl_physics='MRFPBLSCHEME',sf_sfclay_physics='SFCLAYSCHEME'
  CHARACTER(len=15) :: bl_pbl_physics='YSUPBLSCHEME',sf_sfclay_physics='SFCLAYSCHEME'
  CHARACTER(len=15) :: sf_surface_physics='LSMSCHEME'
  CHARACTER(len=15) :: sf_surface_physics='RUCLSMSCHEME'
  CHARACTER(len=15) :: sf_surface_physics='SLABSCHEME'
  CHARACTER(len=15) :: sf_surface_physics='SIMPLESCHEME' - skin 
temperature varies sinusoidally

dt - timestep for integration

nz - numbers of vertical levels (grid is read from file "grid_wrf1d.ascii")

deep_soil_moisture - if deep soil moisture not available what fraction
of saturated value

P_QV - set to 2 if moist run

PQ?  - set to 3,4,5,6 depending on how many moisture variables used
(could water, raid water, ice, snow, graupel). In BL only P_QV/P_QC count

ifsnow - self-explaining

isfflx - if surface fluxes considered

pblh_ref - reference height of the PBL- not currently used

indir/outdir - input/output directories

-----------------------------
&record2 - for initial profiles derived from 3d WRF or OBS

init_f_file - 3x3xnz WRF cube derived from 3d WRF forecast (WRF)
            - file containing soundings (OBS)

init_flux_file - file containing radiative flux obs (OBS)

init_soil_file - file containing 2-point soil probe obs (OBS)

init_smos_file - file containing shelter obs, which is used to specify 
                 initial profiles if it is available, and used to
                 create obs networks.

uvg_file - if force_uvg = .true., geostrophic winds from this file replace
those from init_f_file.  This file contains single profiles that look
like the observations (sounding) file.

force_uvg = logical to use independent geostrophic winds, rather than the
full winds from init_f_file, which are also imposed constant below z_g.

out_f_file - output file with profiles at intervals specified in the
namelist below

output_state_vector - TRUE to output DART vector (only used with DART)

The following time variables are the Gregorian start of the model. *** Of the column?*** It is not clear because
we have start_forecast too ***
If init_rnd = .FALSE. they also request specific input forcing for the
OBS case.

*** If init_rnd = .TRUE. only start_hour_f and start_minute_f are relevant to define the initialization time of
WRF runs, dates are not needed as random combinations of profiles from different days valid at a given time are used.


  start_year_f 
  start_month_f 
  start_day_f 
  start_hour_f 
  start_minute_f

start_forecast - time interval after the above time (above time is sounding availability or WRF initialization, right?) to begin column ***?
simulation (seconds)

forecast_length - length of PBL_1D simulation (seconds). This does not mean that assimilation of surface observations starts at this time. Assimilation of surface obs will start at any time greater or equal to this at which obs are avavailable in the real obs file (created as explained above).

interval_f - intervals at which WRF|OBS is available for forcing
the profiles (seconds). ***It is the users responsibility to provided this correctly. If provided incorrectly wrong profiles from WRF will be chosen to initialize and force the PBL_1D

interval_flux - intervals at which WRF|OBS is available for forcing
the radiative fluxes (seconds)

interval_soil - intervals at which WRF|OBS is available for forcing
the soil (seconds); currently, only the initialization time is used

interval_smos - intervals at which WRF|OBS is available for creating
obs networks; currently, the initialization time is also used to
help specify the lower profiles

interval_uvg - intervals for separately-specified geostrophic winds,
if force_uvg = .true.

splineinterval - some interpolation of profile forcings from WRF|OBS is
done with cubic splines (seconds)

splineinterval_flux - some interpolation of forcings from WRF|OBS is
done with cubic splines (seconds)

splineinterval_smos - some interpolation of forcings from WRF|OBS is
done with cubic splines (seconds); currently not used

outfinterval -  how often vertical profiles are output
(see out_f_file above)

rnd_seed_val - random value for specifying weights for obtaining
ensembles for DART assimilation (if not interested in random
profile mixing set control_w=1. in module_wrf_init_and_bc.F)

z_g - below this geostrophic wind is taken at u(z_g), v(z_g)
Above this height u_g=u, v_g=v. This simplification is due
to the fact that geostrophic wind calculated from pressure in 
3d WRF significantly departs from the actual wind above the boundary
layer. It is not clear why it is so since gravity waves are probably 
not a factor (e.g similar departures for hours 1, 2, 3 etc of the 
forecast). Let me know if you have better ideas.

------------------------------------
&record3 - for runs starting from idealized profiles, BUT ALSO USED WHEN
           OTHER INPUT DATA IS UNAVAILABLE OR MISSING

odayfraction - .25 stands for 06 LST, .5 for 12 LST etc

totdayfraction - when to end integration, .25 stands for 06 LST, etc

outinterval - output interval for vertical profiles

dtamplitude_ref - daily amplitude for surface temperature (only for
surface_physics='SIMPLESCHEME')

dtdz_ref - temperature gradient, -999 for adiabatic gradient

u_g_ref - u-dir geostrophic wind

v_g_ref - v-dir geostrophic wind

qsrat_ref - saturation fraction for mixing ratio see
module_initialize.F how qv is initialized in module_initialize.F

rland_ref - 1 when land, 0 when water

mminlu_ref - which landuse table used

julday_ref - julian day

lu_index_ref - landuse category

mavail_ref - moisture availability

ivgtyp_ref - vegetation type

isltyp_ref - soil type

vegfra_ref - vegetation fraction

zo_ref - roughness in m

emiss_ref - emissivity

thc_ref - thermal inertia

albedo_ref - albedo

ts_ref - skin temperature
(only for surface_physics='SIMPLESCHEME')

tmn_ref - deep soil temperature
(only for surface_physics='SIMPLESCHEME')

ps_ref - surface pressure

lat_ref - latitude  of the place

lon_ref - longitude of the place

***Some selected parameters from input.nml***

   init_time_days = 146956,
   init_time_seconds = 43200,

These have to match the times given in wrf1d.namelist.input


