[Dart-dev] [4287] DART/trunk/models/NOGAPS: Adding the bare-bones pieces for NOGAPS using the
nancy at ucar.edu
nancy at ucar.edu
Wed Feb 17 17:21:05 MST 2010
Revision: 4287
Author: thoar
Date: 2010-02-17 17:21:05 -0700 (Wed, 17 Feb 2010)
Log Message:
-----------
Adding the bare-bones pieces for NOGAPS using the
template model_mod.f90. Everything compiles, nothing runs.
Will add the nogaps_to_dart and dart_to_nogaps bits
when we know more about NOGAPS.
Added Paths:
-----------
DART/trunk/models/NOGAPS/model_mod.f90
DART/trunk/models/NOGAPS/shell_scripts/
DART/trunk/models/NOGAPS/work/
DART/trunk/models/NOGAPS/work/input.nml
DART/trunk/models/NOGAPS/work/mkmf_create_fixed_network_seq
DART/trunk/models/NOGAPS/work/mkmf_create_obs_sequence
DART/trunk/models/NOGAPS/work/mkmf_filter
DART/trunk/models/NOGAPS/work/mkmf_obs_diag
DART/trunk/models/NOGAPS/work/mkmf_obs_seq_to_netcdf
DART/trunk/models/NOGAPS/work/mkmf_obs_sequence_tool
DART/trunk/models/NOGAPS/work/mkmf_perfect_model_obs
DART/trunk/models/NOGAPS/work/mkmf_preprocess
DART/trunk/models/NOGAPS/work/mkmf_restart_file_tool
DART/trunk/models/NOGAPS/work/mkmf_wakeup_filter
DART/trunk/models/NOGAPS/work/path_names_create_fixed_network_seq
DART/trunk/models/NOGAPS/work/path_names_create_obs_sequence
DART/trunk/models/NOGAPS/work/path_names_filter
DART/trunk/models/NOGAPS/work/path_names_obs_diag
DART/trunk/models/NOGAPS/work/path_names_obs_seq_to_netcdf
DART/trunk/models/NOGAPS/work/path_names_obs_sequence_tool
DART/trunk/models/NOGAPS/work/path_names_perfect_model_obs
DART/trunk/models/NOGAPS/work/path_names_preprocess
DART/trunk/models/NOGAPS/work/path_names_restart_file_tool
DART/trunk/models/NOGAPS/work/path_names_wakeup_filter
DART/trunk/models/NOGAPS/work/quickbuild.csh
-------------- next part --------------
Added: DART/trunk/models/NOGAPS/model_mod.f90
===================================================================
--- DART/trunk/models/NOGAPS/model_mod.f90 (rev 0)
+++ DART/trunk/models/NOGAPS/model_mod.f90 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,589 @@
+! DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+! provided by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+
+module model_mod
+
+! <next few lines under version control, do not edit>
+! $URL: $
+! $Id: $
+! $Revision: $
+! $Date: $
+
+! This is a template showing the interfaces required for a model to be compliant
+! with the DART data assimilation infrastructure. The public interfaces listed
+! must all be supported with the argument lists as indicated. Many of the interfaces
+! are not required for minimal implementation (see the discussion of each
+! interface and look for NULL INTERFACE).
+
+! Modules that are absolutely required for use are listed
+use types_mod, only : r8, MISSING_R8
+use time_manager_mod, only : time_type, set_time
+use location_mod, only : location_type, get_close_maxdist_init, &
+ get_close_obs_init, get_close_obs, set_location
+use utilities_mod, only : register_module, error_handler, nc_check, &
+ E_ERR, E_MSG
+
+implicit none
+private
+
+public :: get_model_size, &
+ adv_1step, &
+ get_state_meta_data, &
+ model_interpolate, &
+ get_model_time_step, &
+ end_model, &
+ static_init_model, &
+ init_time, &
+ init_conditions, &
+ nc_write_model_atts, &
+ nc_write_model_vars, &
+ pert_model_state, &
+ get_close_maxdist_init, &
+ get_close_obs_init, &
+ get_close_obs, &
+ ens_mean_for_model
+
+
+! version controlled file description for error handling, do not edit
+character(len=128), parameter :: &
+ source = "$URL: $", &
+ revision = "$Revision: $", &
+ revdate = "$Date: $"
+
+! EXAMPLE: define model parameters here
+integer, parameter :: model_size = 3
+type(time_type) :: time_step
+type(location_type), allocatable :: state_loc(:)
+
+! EXAMPLE: perhaps a namelist here
+logical :: output_state_vector = .true.
+integer :: time_step_days = 0
+integer :: time_step_seconds = 3600
+namelist /model_nml/ output_state_vector, time_step_days, time_step_seconds
+
+contains
+
+!==================================================================
+
+
+
+subroutine static_init_model()
+!------------------------------------------------------------------
+!
+! Called to do one time initialization of the model. As examples,
+! might define information about the model size or model timestep.
+! In models that require pre-computed static data, for instance
+! spherical harmonic weights, these would also be computed here.
+! Can be a NULL INTERFACE for the simplest models.
+
+ real(r8) :: x_loc
+ integer :: i
+!integer :: iunit, io
+
+! Print module information to log file and stdout.
+call register_module(source, revision, revdate)
+
+! This is where you would read a namelist, for example.
+!call find_namelist_in_file("input.nml", "model_nml", iunit)
+!read(iunit, nml = model_nml, iostat = io)
+!call check_namelist_read(iunit, io, "model_nml")
+
+
+! Record the namelist values used for the run ...
+!if (do_nml_file()) write(nmlfileunit, nml=model_nml)
+!if (do_nml_term()) write( * , nml=model_nml)
+
+! Create storage for locations
+allocate(state_loc(model_size))
+
+! Define the locations of the model state variables
+! naturally, this can be done VERY differently for more complicated models.
+! set_location() is different for 1D vs. 3D models, not surprisingly.
+do i = 1, model_size
+ x_loc = (i - 1.0_r8) / model_size
+ ! must do one of these:
+ !state_loc(i) = set_location(x_loc)
+ !state_loc(i) = set_location(x_loc,y_loc,v_loc,v_type)
+end do
+
+! The time_step in terms of a time type must also be initialized.
+time_step = set_time(time_step_seconds, time_step_days)
+
+end subroutine static_init_model
+
+
+
+
+subroutine init_conditions(x)
+!------------------------------------------------------------------
+! subroutine init_conditions(x)
+!
+! Returns a model state vector, x, that is some sort of appropriate
+! initial condition for starting up a long integration of the model.
+! At present, this is only used if the namelist parameter
+! start_from_restart is set to .false. in the program perfect_model_obs.
+! If this option is not to be used in perfect_model_obs, or if no
+! synthetic data experiments using perfect_model_obs are planned,
+! this can be a NULL INTERFACE.
+
+real(r8), intent(out) :: x(:)
+
+x = MISSING_R8
+
+end subroutine init_conditions
+
+
+
+subroutine adv_1step(x, time)
+!------------------------------------------------------------------
+! subroutine adv_1step(x, time)
+!
+! Does a single timestep advance of the model. The input value of
+! the vector x is the starting condition and x is updated to reflect
+! the changed state after a timestep. The time argument is intent
+! in and is used for models that need to know the date/time to
+! compute a timestep, for instance for radiation computations.
+! This interface is only called if the namelist parameter
+! async is set to 0 in perfect_model_obs of filter or if the
+! program integrate_model is to be used to advance the model
+! state as a separate executable. If one of these options
+! is not going to be used (the model will only be advanced as
+! a separate model-specific executable), this can be a
+! NULL INTERFACE.
+
+real(r8), intent(inout) :: x(:)
+type(time_type), intent(in) :: time
+
+end subroutine adv_1step
+
+
+
+function get_model_size()
+!------------------------------------------------------------------
+!
+! Returns the size of the model as an integer. Required for all
+! applications.
+
+integer :: get_model_size
+
+get_model_size = model_size
+
+end function get_model_size
+
+
+
+subroutine init_time(time)
+!------------------------------------------------------------------
+!
+! Companion interface to init_conditions. Returns a time that is somehow
+! appropriate for starting up a long integration of the model.
+! At present, this is only used if the namelist parameter
+! start_from_restart is set to .false. in the program perfect_model_obs.
+! If this option is not to be used in perfect_model_obs, or if no
+! synthetic data experiments using perfect_model_obs are planned,
+! this can be a NULL INTERFACE.
+
+type(time_type), intent(out) :: time
+
+! for now, just set to 0
+time = set_time(0,0)
+
+end subroutine init_time
+
+
+
+subroutine model_interpolate(x, location, itype, obs_val, istatus)
+!------------------------------------------------------------------
+!
+! Given a state vector, a location, and a model state variable type,
+! interpolates the state variable field to that location and returns
+! the value in obs_val. The istatus variable should be returned as
+! 0 unless there is some problem in computing the interpolation in
+! which case an alternate value should be returned. The itype variable
+! is a model specific integer that specifies the type of field (for
+! instance temperature, zonal wind component, etc.). In low order
+! models that have no notion of types of variables, this argument can
+! be ignored. For applications in which only perfect model experiments
+! with identity observations (i.e. only the value of a particular
+! state variable is observed), this can be a NULL INTERFACE.
+
+real(r8), intent(in) :: x(:)
+type(location_type), intent(in) :: location
+integer, intent(in) :: itype
+real(r8), intent(out) :: obs_val
+integer, intent(out) :: istatus
+
+! Default for successful return
+istatus = 0
+
+end subroutine model_interpolate
+
+
+
+function get_model_time_step()
+!------------------------------------------------------------------
+!
+! Returns the the time step of the model; the smallest increment
+! in time that the model is capable of advancing the state in a given
+! implementation. This interface is required for all applications.
+
+type(time_type) :: get_model_time_step
+
+get_model_time_step = time_step
+
+end function get_model_time_step
+
+
+
+subroutine get_state_meta_data(index_in, location, var_type)
+!------------------------------------------------------------------
+!
+! Given an integer index into the state vector structure, returns the
+! associated location. A second intent(out) optional argument kind
+! can be returned if the model has more than one type of field (for
+! instance temperature and zonal wind component). This interface is
+! required for all filter applications as it is required for computing
+! the distance between observations and state variables.
+
+integer, intent(in) :: index_in
+type(location_type), intent(out) :: location
+integer, intent(out), optional :: var_type
+
+end subroutine get_state_meta_data
+
+
+
+subroutine end_model()
+!------------------------------------------------------------------
+!
+! Does any shutdown and clean-up needed for model. Can be a NULL
+! INTERFACE if the model has no need to clean up storage, etc.
+
+! good style ... perhaps you could deallocate stuff (from static_init_model?).
+! deallocate(state_loc)
+
+end subroutine end_model
+
+
+
+function nc_write_model_atts( ncFileID ) result (ierr)
+!------------------------------------------------------------------
+! TJH 24 Oct 2006 -- Writes the model-specific attributes to a netCDF file.
+! This includes coordinate variables and some metadata, but NOT
+! the model state vector. We do have to allocate SPACE for the model
+! state vector, but that variable gets filled as the model advances.
+!
+! As it stands, this routine will work for ANY model, with no modification.
+!
+! The simplest possible netCDF file would contain a 3D field
+! containing the state of 'all' the ensemble members. This requires
+! three coordinate variables -- one for each of the dimensions
+! [model_size, ensemble_member, time]. A little metadata is useful,
+! so we can also create some 'global' attributes.
+! This is what is implemented here.
+!
+! Once the simplest case is working, this routine (and nc_write_model_vars)
+! can be extended to create a more logical partitioning of the state vector,
+! fundamentally creating a netCDF file with variables that are easily
+! plotted. The bgrid model_mod is perhaps a good one to view, keeping
+! in mind it is complicated by the fact it has two coordinate systems.
+! There are stubs in this template, but they are only stubs.
+!
+! TJH 29 Jul 2003 -- for the moment, all errors are fatal, so the
+! return code is always '0 == normal', since the fatal errors stop execution.
+!
+! assim_model_mod:init_diag_output uses information from the location_mod
+! to define the location dimension and variable ID. All we need to do
+! is query, verify, and fill ...
+!
+! Typical sequence for adding new dimensions,variables,attributes:
+! NF90_OPEN ! open existing netCDF dataset
+! NF90_redef ! put into define mode
+! NF90_def_dim ! define additional dimensions (if any)
+! NF90_def_var ! define variables: from name, type, and dims
+! NF90_put_att ! assign attribute values
+! NF90_ENDDEF ! end definitions: leave define mode
+! NF90_put_var ! provide values for variable
+! NF90_CLOSE ! close: save updated netCDF dataset
+
+use typeSizes
+use netcdf
+
+integer, intent(in) :: ncFileID ! netCDF file identifier
+integer :: ierr ! return value of function
+
+integer :: nDimensions, nVariables, nAttributes, unlimitedDimID
+
+integer :: StateVarDimID ! netCDF pointer to state variable dimension (model size)
+integer :: MemberDimID ! netCDF pointer to dimension of ensemble (ens_size)
+integer :: TimeDimID ! netCDF pointer to time dimension (unlimited)
+
+integer :: StateVarVarID ! netCDF pointer to state variable coordinate array
+integer :: StateVarID ! netCDF pointer to 3D [state,copy,time] array
+
+character(len=129) :: errstring
+
+! we are going to need these to record the creation date in the netCDF file.
+! This is entirely optional, but nice.
+
+character(len=8) :: crdate ! needed by F90 DATE_AND_TIME intrinsic
+character(len=10) :: crtime ! needed by F90 DATE_AND_TIME intrinsic
+character(len=5) :: crzone ! needed by F90 DATE_AND_TIME intrinsic
+integer, dimension(8) :: values ! needed by F90 DATE_AND_TIME intrinsic
+character(len=NF90_MAX_NAME) :: str1
+
+integer :: i
+
+!-------------------------------------------------------------------------------
+! make sure ncFileID refers to an open netCDF file,
+! and then put into define mode.
+!-------------------------------------------------------------------------------
+
+ierr = -1 ! assume things go poorly
+
+call nc_check(nf90_inquire(ncFileID,nDimensions,nVariables,nAttributes,unlimitedDimID), &
+ "nc_write_model_atts", "inquire")
+call nc_check(nf90_redef(ncFileID), "nc_write_model_atts", "redef")
+
+!-------------------------------------------------------------------------------
+! We need the dimension ID for the number of copies/ensemble members, and
+! we might as well check to make sure that Time is the Unlimited dimension.
+! Our job is create the 'model size' dimension.
+!-------------------------------------------------------------------------------
+
+call nc_check(nf90_inq_dimid(ncid=ncFileID, name="copy", dimid=MemberDimID), &
+ "nc_write_model_atts", "inq_dimid copy")
+call nc_check(nf90_inq_dimid(ncid=ncFileID, name="time", dimid= TimeDimID), &
+ "nc_write_model_atts", "inq_dimid time")
+
+if ( TimeDimID /= unlimitedDimId ) then
+ write(errstring,*)"Time Dimension ID ",TimeDimID, &
+ " should equal Unlimited Dimension ID",unlimitedDimID
+ call error_handler(E_ERR,"nc_write_model_atts", errstring, source, revision, revdate)
+endif
+
+!-------------------------------------------------------------------------------
+! Define the model size / state variable dimension / whatever ...
+!-------------------------------------------------------------------------------
+call nc_check(nf90_def_dim(ncid=ncFileID, name="StateVariable", &
+ len=model_size, dimid=StateVarDimID), &
+ "nc_write_model_atts", "def_dim state")
+
+!-------------------------------------------------------------------------------
+! Write Global Attributes
+!-------------------------------------------------------------------------------
+
+call DATE_AND_TIME(crdate,crtime,crzone,values)
+write(str1,'(''YYYY MM DD HH MM SS = '',i4,5(1x,i2.2))') &
+ values(1), values(2), values(3), values(5), values(6), values(7)
+
+call nc_check(nf90_put_att(ncFileID, NF90_GLOBAL, "creation_date" ,str1), &
+ "nc_write_model_atts", "put_att creation_date")
+call nc_check(nf90_put_att(ncFileID, NF90_GLOBAL, "model_source" ,source), &
+ "nc_write_model_atts", "put_att model_source")
+call nc_check(nf90_put_att(ncFileID, NF90_GLOBAL, "model_revision",revision), &
+ "nc_write_model_atts", "put_att model_revision")
+call nc_check(nf90_put_att(ncFileID, NF90_GLOBAL, "model_revdate" ,revdate), &
+ "nc_write_model_atts", "put_att model_revdate")
+call nc_check(nf90_put_att(ncFileID, NF90_GLOBAL, "model","template"), &
+ "nc_write_model_atts", "put_att model")
+
+!-------------------------------------------------------------------------------
+! Here is the extensible part. The simplest scenario is to output the state vector,
+! parsing the state vector into model-specific parts is complicated, and you need
+! to know the geometry, the output variables (PS,U,V,T,Q,...) etc. We're skipping
+! complicated part.
+!-------------------------------------------------------------------------------
+
+if ( output_state_vector ) then
+
+ !----------------------------------------------------------------------------
+ ! Create a variable for the state vector
+ !----------------------------------------------------------------------------
+
+ ! Define the state vector coordinate variable and some attributes.
+ call nc_check(nf90_def_var(ncid=ncFileID,name="StateVariable", xtype=NF90_INT, &
+ dimids=StateVarDimID, varid=StateVarVarID), &
+ "nc_write_model_atts", "def_var StateVariable")
+ call nc_check(nf90_put_att(ncFileID, StateVarVarID,"long_name","State Variable ID"), &
+ "nc_write_model_atts", "put_att StateVariable long_name")
+ call nc_check(nf90_put_att(ncFileID, StateVarVarID, "units", "indexical"), &
+ "nc_write_model_atts", "put_att StateVariable units")
+ call nc_check(nf90_put_att(ncFileID, StateVarVarID, "valid_range", (/ 1, model_size /)), &
+ "nc_write_model_atts", "put_att StateVariable valid_range")
+
+ ! Define the actual (3D) state vector, which gets filled as time goes on ...
+ call nc_check(nf90_def_var(ncid=ncFileID, name="state", xtype=NF90_REAL, &
+ dimids = (/ StateVarDimID, MemberDimID, unlimitedDimID /), &
+ varid=StateVarID), "nc_write_model_atts", "def_var state")
+ call nc_check(nf90_put_att(ncFileID, StateVarID, "long_name", "model state or fcopy"), &
+ "nc_write_model_atts", "put_att state long_name")
+
+ ! Leave define mode so we can fill the coordinate variable.
+ call nc_check(nf90_enddef(ncfileID),"nc_write_model_atts", "state_vector enddef")
+
+ ! Fill the state variable coordinate variable
+ call nc_check(nf90_put_var(ncFileID, StateVarVarID, (/ (i,i=1,model_size) /)), &
+ "nc_write_model_atts", "put_var state")
+
+else
+
+ !----------------------------------------------------------------------------
+ ! We need to process the prognostic variables.
+ !----------------------------------------------------------------------------
+
+ ! This block is a stub for something more complicated.
+ ! Usually, the control for the execution of this block is a namelist variable.
+ ! Take a peek at the bgrid model_mod.f90 for a (rather complicated) example.
+
+ call nc_check(nf90_enddef(ncfileID), "nc_write_model_atts", "prognostic enddef")
+
+endif
+
+!-------------------------------------------------------------------------------
+! Flush the buffer and leave netCDF file open
+!-------------------------------------------------------------------------------
+call nc_check(nf90_sync(ncFileID),"nc_write_model_atts", "sync")
+
+ierr = 0 ! If we got here, things went well.
+
+end function nc_write_model_atts
+
+
+
+function nc_write_model_vars( ncFileID, statevec, copyindex, timeindex ) result (ierr)
+!------------------------------------------------------------------
+! TJH 24 Oct 2006 -- Writes the model variables to a netCDF file.
+!
+! TJH 29 Jul 2003 -- for the moment, all errors are fatal, so the
+! return code is always '0 == normal', since the fatal errors stop execution.
+!
+! For the lorenz_96 model, each state variable is at a separate location.
+! that's all the model-specific attributes I can think of ...
+!
+! assim_model_mod:init_diag_output uses information from the location_mod
+! to define the location dimension and variable ID. All we need to do
+! is query, verify, and fill ...
+!
+! Typical sequence for adding new dimensions,variables,attributes:
+! NF90_OPEN ! open existing netCDF dataset
+! NF90_redef ! put into define mode
+! NF90_def_dim ! define additional dimensions (if any)
+! NF90_def_var ! define variables: from name, type, and dims
+! NF90_put_att ! assign attribute values
+! NF90_ENDDEF ! end definitions: leave define mode
+! NF90_put_var ! provide values for variable
+! NF90_CLOSE ! close: save updated netCDF dataset
+
+use typeSizes
+use netcdf
+
+integer, intent(in) :: ncFileID ! netCDF file identifier
+real(r8), dimension(:), intent(in) :: statevec
+integer, intent(in) :: copyindex
+integer, intent(in) :: timeindex
+integer :: ierr ! return value of function
+
+integer :: nDimensions, nVariables, nAttributes, unlimitedDimID
+
+integer :: StateVarID
+
+!-------------------------------------------------------------------------------
+! make sure ncFileID refers to an open netCDF file,
+!-------------------------------------------------------------------------------
+
+ierr = -1 ! assume things go poorly
+
+call nc_check(nf90_inquire(ncFileID,nDimensions,nVariables,nAttributes,unlimitedDimID), &
+ "nc_write_model_vars", "inquire")
+
+if ( output_state_vector ) then
+
+ call nc_check(nf90_inq_varid(ncFileID, "state", StateVarID), &
+ "nc_write_model_vars", "inq_varid state" )
+ call nc_check(nf90_put_var(ncFileID, StateVarID, statevec, &
+ start=(/ 1, copyindex, timeindex /)), &
+ "nc_write_model_vars", "put_var state")
+
+else
+
+ !----------------------------------------------------------------------------
+ ! We need to process the prognostic variables.
+ !----------------------------------------------------------------------------
+
+ ! This block is a stub for something more complicated.
+ ! Usually, the control for the execution of this block is a namelist variable.
+ ! Take a peek at the bgrid model_mod.f90 for a (rather complicated) example.
+ !
+ ! Generally, it is necessary to take the statevec and decompose it into
+ ! the separate prognostic variables. In this (commented out) example,
+ ! global_Var is a user-defined type that has components like:
+ ! global_Var%ps, global_Var%t, ... etc. Each of those can then be passed
+ ! directly to the netcdf put_var routine. This may cause a huge storage
+ ! hit, so large models may want to avoid the duplication if possible.
+
+ ! call vector_to_prog_var(statevec, get_model_size(), global_Var)
+
+ ! the 'start' array is crucial. In the following example, 'ps' is a 2D
+ ! array, and the netCDF variable "ps" is a 4D array [lat,lon,copy,time]
+
+ ! call nc_check(nf90_inq_varid(ncFileID, "ps", psVarID), &
+ ! "nc_write_model_vars", "inq_varid ps")
+ ! call nc_check(nf90_put_var( ncFileID, psVarID, global_Var%ps, &
+ ! start=(/ 1, 1, copyindex, timeindex /)), &
+ ! "nc_write_model_vars", "put_var ps")
+
+endif
+
+!-------------------------------------------------------------------------------
+! Flush the buffer and leave netCDF file open
+!-------------------------------------------------------------------------------
+
+call nc_check(nf90_sync(ncFileID), "nc_write_model_vars", "sync")
+
+ierr = 0 ! If we got here, things went well.
+
+end function nc_write_model_vars
+
+
+
+subroutine pert_model_state(state, pert_state, interf_provided)
+!------------------------------------------------------------------
+!
+! Perturbs a model state for generating initial ensembles.
+! The perturbed state is returned in pert_state.
+! A model may choose to provide a NULL INTERFACE by returning
+! .false. for the interf_provided argument. This indicates to
+! the filter that if it needs to generate perturbed states, it
+! may do so by adding an O(0.1) magnitude perturbation to each
+! model state variable independently. The interf_provided argument
+! should be returned as .true. if the model wants to do its own
+! perturbing of states.
+
+real(r8), intent(in) :: state(:)
+real(r8), intent(out) :: pert_state(:)
+logical, intent(out) :: interf_provided
+
+pert_state = MISSING_R8
+interf_provided = .false.
+
+end subroutine pert_model_state
+
+
+
+
+subroutine ens_mean_for_model(ens_mean)
+!------------------------------------------------------------------
+! Not used in low-order models
+
+real(r8), intent(in) :: ens_mean(:)
+
+end subroutine ens_mean_for_model
+
+
+
+!===================================================================
+! End of model_mod
+!===================================================================
+end module model_mod
Added: DART/trunk/models/NOGAPS/work/input.nml
===================================================================
--- DART/trunk/models/NOGAPS/work/input.nml (rev 0)
+++ DART/trunk/models/NOGAPS/work/input.nml 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,282 @@
+&perfect_model_obs_nml
+ start_from_restart = .true.,
+ output_restart = .true.,
+ async = 2,
+ init_time_days = -1,
+ init_time_seconds = -1,
+ first_obs_days = -1,
+ first_obs_seconds = -1,
+ last_obs_days = -1,
+ last_obs_seconds = -1,
+ output_interval = 1,
+ trace_execution = .false.,
+ restart_in_file_name = "perfect_ics",
+ restart_out_file_name = "perfect_restart",
+ obs_seq_in_file_name = "obs_seq.in",
+ obs_seq_out_file_name = "obs_seq.perfect",
+ adv_ens_command = "./advance_model.csh"
+ output_timestamps = .false.,
+ trace_execution = .false.,
+ output_forward_op_errors = .false.,
+ print_every_nth_obs = -1,
+ silence = .false.,
+ /
+
+&filter_nml
+ async = 4,
+ adv_ens_command = "./advance_model.csh",
+ ens_size = 40,
+ start_from_restart = .true.,
+ output_restart = .true.,
+ obs_sequence_in_name = "obs_seq.out",
+ obs_sequence_out_name = "obs_seq.final",
+ restart_in_file_name = "filter_ics",
+ restart_out_file_name = "filter_restart",
+ init_time_days = -1,
+ init_time_seconds = -1,
+ first_obs_days = -1,
+ first_obs_seconds = -1,
+ last_obs_days = -1,
+ last_obs_seconds = -1,
+ num_output_state_members = 10,
+ num_output_obs_members = 10,
+ output_interval = 1,
+ num_groups = 1,
+ input_qc_threshold = 1.0,
+ outlier_threshold = 3.0,
+ output_forward_op_errors = .false.,
+ output_timestamps = .false.,
+ output_inflation = .true.,
+ trace_execution = .false.,
+ silence = .false.,
+
+ inf_flavor = 0, 0,
+ inf_initial_from_restart = .false., .false.,
+ inf_sd_initial_from_restart = .false., .false.,
+ inf_output_restart = .true., .true.,
+ inf_deterministic = .true., .true.,
+ inf_in_file_name = 'prior_inflate_ics', 'post_inflate_ics',
+ inf_out_file_name = 'prior_inflate_restart', 'post_inflate_restart',
+ inf_diag_file_name = 'prior_inflate_diag', 'post_inflate_diag',
+ inf_initial = 1.0, 1.0,
+ inf_sd_initial = 0.0, 0.0,
+ inf_damping = 1.0, 1.0,
+ inf_lower_bound = 1.0, 1.0,
+ inf_upper_bound = 1000000.0, 1000000.0,
+ inf_sd_lower_bound = 0.0, 0.0
+ /
+
+&smoother_nml
+ num_lags = 0,
+ start_from_restart = .false.,
+ output_restart = .false.,
+ restart_in_file_name = 'smoother_ics',
+ restart_out_file_name = 'smoother_restart'
+ /
+
+# cutoff of 0.03 (radians) is about 200km
+&assim_tools_nml
+ filter_kind = 1,
+ cutoff = 0.20,
+ sort_obs_inc = .true.,
+ spread_restoration = .false.,
+ sampling_error_correction = .false.,
+ adaptive_localization_threshold = -1,
+ print_every_nth_obs = 0
+ /
+
+&ensemble_manager_nml
+ single_restart_file_in = .false.,
+ single_restart_file_out = .false.,
+ perturbation_amplitude = 0.2
+ /
+
+&cov_cutoff_nml
+ select_localization = 1
+ /
+
+®_factor_nml
+ select_regression = 1,
+ input_reg_file = "time_mean_reg",
+ save_reg_diagnostics = .false.,
+ reg_diagnostics_file = "reg_diagnostics"
+ /
+
+&obs_sequence_nml
+ write_binary_obs_sequence = .false.
+ /
+
+&obs_kind_nml
+ assimilate_these_obs_types = 'FLOAT_TEMPERATURE',
+ 'FLOAT_SALINITY',
+ 'MOORING_SALINITY',
+ 'MOORING_TEMPERATURE',
+ 'XBT_TEMPERATURE',
+ /
+
+&preprocess_nml
+ input_obs_kind_mod_file = '../../../obs_kind/DEFAULT_obs_kind_mod.F90',
+ output_obs_kind_mod_file = '../../../obs_kind/obs_kind_mod.f90',
+ input_obs_def_mod_file = '../../../obs_def/DEFAULT_obs_def_mod.F90',
+ output_obs_def_mod_file = '../../../obs_def/obs_def_mod.f90',
+ input_files = '../../../obs_def/obs_def_ocean_mod.f90'
+ /
+
+&assim_model_nml
+ write_binary_restart_files = .true.,
+ netCDF_large_file_support = .true.
+ /
+
+&model_nml
+ assimilation_period_days = 1,
+ assimilation_period_seconds = 0,
+ model_perturbation_amplitude = 0.2,
+ output_state_vector = .false.,
+ debug = 0,
+ /
+
+&nogaps_to_dart_nml
+ nogaps_to_dart_output_file = 'dart.ud',
+ /
+
+&dart_to_nogaps_nml
+ dart_to_nogaps_input_file = 'dart.ic',
+ advance_time_present = .false.
+ /
+
+&location_nml
+ horiz_dist_only = .true.,
+ vert_normalization_pressure = 100000.0,
+ vert_normalization_height = 10000.0,
+ vert_normalization_level = 20.0,
+ approximate_distance = .false.,
+ nlon = 71,
+ nlat = 36,
+ output_box_info = .true.
+ /
+
+&utilities_nml
+ TERMLEVEL = 1,
+ module_details = .false.,
+ logfilename = 'dart_log.out',
+ nmlfilename = 'dart_log.nml'
+ /
+
+&restart_file_tool_nml
+ input_file_name = "filter_restart",
+ output_file_name = "filter_updated_restart",
+ ens_size = 1,
+ single_restart_file_in = .true.,
+ single_restart_file_out = .true.,
+ write_binary_restart_files = .true.,
+ overwrite_data_time = .false.,
+ new_data_days = -1,
+ new_data_secs = -1,
+ input_is_model_advance_file = .false.,
+ output_is_model_advance_file = .false.,
+ overwrite_advance_time = .false.,
+ new_advance_days = -1,
+ new_advance_secs = -1,
+ gregorian_cal = .true.
+ /
+
+&obs_sequence_tool_nml
+ filename_seq_list = 'list_of_obs_seq_files',
+ filename_out = 'obs_seq.out',
+ gregorian_cal = .true.
+ /
+
+# other possible obs tool namelist items:
+#
+# print out how many obs of each type are in the file:
+# print_only = .true.,
+#
+# keep only obs in time period:
+# first_obs_days = -1,
+# first_obs_seconds = -1,
+# last_obs_days = -1,
+# last_obs_seconds = -1,
+#
+# keep only obs in a bounding box:
+# min_lat = -90.0,
+# max_lat = 90.0,
+# min_lon = 0.0,
+# max_lon = 360.0,
+#
+# keep only the U and V radiosonde winds:
+# obs_types = 'RADIOSONDE_U_WIND_COMPONENT',
+# 'RADIOSONDE_V_WIND_COMPONENT',
+# keep_types = .true.,
+#
+# remove the U and V radiosonde winds:
+# obs_types = 'RADIOSONDE_U_WIND_COMPONENT',
+# 'RADIOSONDE_V_WIND_COMPONENT',
+# keep_types = .false.,
+#
+# keep only observations with a DART QC of 0:
+# qc_metadata = 'Dart quality control',
+# min_qc = 0,
+# max_qc = 0,
+#
+# keep only radiosonde temp obs between 250 and 300 K:
+# copy_metadata = 'NCEP BUFR observation',
+# copy_type = 'RADIOSONDE_TEMPERATURE',
+# min_copy = 250.0,
+# max_copy = 300.0,
+#
+
+# The times in the namelist for the obs_diag program are vectors
+# that follow the following sequence:
+# year month day hour minute second
+# max_num_bins can be used to specify a fixed number of bins,
+# in which case last_bin_center should be safely in the future.
+#
+# Acceptable latitudes range from [-90, 90]
+# Acceptable longitudes range from [ 0, Inf]
+
+&obs_diag_nml
+ obs_sequence_name = 'obs_seq.final',
+ obs_sequence_list = '',
+ first_bin_center = 2000, 1, 1, 0, 0, 0 ,
+ last_bin_center = 2000, 1,31, 0, 0, 0 ,
+ bin_separation = 0, 0, 1, 0, 0, 0 ,
+ bin_width = 0, 0, 1, 0, 0, 0 ,
+ time_to_skip = 0, 0, 0, 0, 0, 0 ,
+ max_num_bins = 1000,
+ rat_cri = 3.0,
+ input_qc_threshold = 1,
+ Nregions = 3,
+ lonlim1 = 30.0, 130.0, 290.0,
+ lonlim2 = 130.0, 270.0, 380.0,
+ latlim1 = -50.0, -50.0, -50.0,
+ latlim2 = 20.0, 50.0, 50.0,
+ reg_names = 'Indian Ocean', 'Pacific', 'Atlantic',
+ print_mismatched_locs = .false.,
+ print_obs_locations = .false.,
+ verbose = .true.,
+ hlevel = 10.0, 20.0, 30.0, 40.0, 100.0,
+ 200.0, 500.0, 1000.0, 2000.0, 3000.0
+ /
+
+&schedule_nml
+ calendar = 'Gregorian',
+ first_bin_start = 1999, 12, 31, 12, 0, 0 ,
+ first_bin_end = 2000, 1, 1, 12, 0, 0 ,
+ last_bin_end = 2000, 2, 1, 12, 0, 0 ,
+ bin_interval_days = 1,
+ bin_interval_seconds = 0,
+ max_num_bins = 1000,
+ print_table = .true.
+ /
+
+&obs_seq_to_netcdf_nml
+ obs_sequence_name = 'obs_seq.final'
+ obs_sequence_list = '',
+ append_to_netcdf = .false.,
+ lonlim1 = 0.0,
+ lonlim2 = 360.0,
+ latlim1 = -90.0,
+ latlim2 = 90.0,
+ verbose = .false.
+ /
+
Added: DART/trunk/models/NOGAPS/work/mkmf_create_fixed_network_seq
===================================================================
--- DART/trunk/models/NOGAPS/work/mkmf_create_fixed_network_seq (rev 0)
+++ DART/trunk/models/NOGAPS/work/mkmf_create_fixed_network_seq 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+# provided by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# $Id: $
+
+../../../mkmf/mkmf -p create_fixed_network_seq -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_create_fixed_network_seq
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL: $
+# $Revision: $
+# $Date: $
+
Property changes on: DART/trunk/models/NOGAPS/work/mkmf_create_fixed_network_seq
___________________________________________________________________
Added: svn:executable
+ *
Added: DART/trunk/models/NOGAPS/work/mkmf_create_obs_sequence
===================================================================
--- DART/trunk/models/NOGAPS/work/mkmf_create_obs_sequence (rev 0)
+++ DART/trunk/models/NOGAPS/work/mkmf_create_obs_sequence 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+# provided by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# $Id: $
+
+../../../mkmf/mkmf -p create_obs_sequence -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_create_obs_sequence
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL: $
+# $Revision: $
+# $Date: $
+
Property changes on: DART/trunk/models/NOGAPS/work/mkmf_create_obs_sequence
___________________________________________________________________
Added: svn:executable
+ *
Added: DART/trunk/models/NOGAPS/work/mkmf_filter
===================================================================
--- DART/trunk/models/NOGAPS/work/mkmf_filter (rev 0)
+++ DART/trunk/models/NOGAPS/work/mkmf_filter 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,64 @@
+#!/bin/csh
+#
+# DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+# provided by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# $Id: $
+#
+# usage: mkmf_filter [ -mpi | -nompi ]
+#
+# without any args, builds filter without mpi libraries, and it will run
+# as a normal executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
+
+if ( $#argv > 0 ) then
+ if ("$argv[1]" == "-mpi") then
+ setenv usingmpi 1
+ else if ("$argv[1]" == "-nompi") then
+ setenv usingmpi 0
+ else
+ echo "Unrecognized argument to mkmf_filter: $argv[1]"
+ echo "Usage: mkmf_filter [ -mpi | -nompi ]"
+ echo " default is to generate a Makefile without MPI support."
+ exit -1
+ endif
+else
+ setenv usingmpi 0
+endif
+
+
+# make a backup copy of the path_names file, and then use
+# sed to make sure it includes either the non-mpi subroutines,
+# or the subroutines which really call mpi.
+cp -f path_names_filter path_names_filter.back
+
+if ( $usingmpi ) then
+
+ echo "Making Makefile with MPI"
+ touch using_mpi_for_filter
+ sed -e 's;/null_mpi_util;/mpi_util;' path_names_filter.back >! path_names_filter
+ setenv wrapper_arg -w
+
+else
+
+ echo "Making Makefile without MPI"
+ rm -f using_mpi_for_filter
+ sed -e 's;/mpi_util;/null_mpi_util;' path_names_filter.back >! path_names_filter
+ setenv wrapper_arg ""
+
+endif
+
+# remove temp file and now really call mkmf to generate makefile
+rm -f path_names_filter.back
+
+../../../mkmf/mkmf -p filter -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." ${wrapper_arg} path_names_filter
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL: $
+# $Revision: $
+# $Date: $
+
Property changes on: DART/trunk/models/NOGAPS/work/mkmf_filter
___________________________________________________________________
Added: svn:executable
+ *
Added: DART/trunk/models/NOGAPS/work/mkmf_obs_diag
===================================================================
--- DART/trunk/models/NOGAPS/work/mkmf_obs_diag (rev 0)
+++ DART/trunk/models/NOGAPS/work/mkmf_obs_diag 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+# provided by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# $Id: $
+
+../../../mkmf/mkmf -p obs_diag -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_obs_diag
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL: $
+# $Revision: $
+# $Date: $
+
Property changes on: DART/trunk/models/NOGAPS/work/mkmf_obs_diag
___________________________________________________________________
Added: svn:executable
+ *
Added: DART/trunk/models/NOGAPS/work/mkmf_obs_seq_to_netcdf
===================================================================
--- DART/trunk/models/NOGAPS/work/mkmf_obs_seq_to_netcdf (rev 0)
+++ DART/trunk/models/NOGAPS/work/mkmf_obs_seq_to_netcdf 2010-02-18 00:21:05 UTC (rev 4287)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
+# provided by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# $Id: $
+
+../../../mkmf/mkmf -p obs_seq_to_netcdf -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_obs_seq_to_netcdf
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL: $
+# $Revision: $
+# $Date: $
+
Property changes on: DART/trunk/models/NOGAPS/work/mkmf_obs_seq_to_netcdf
___________________________________________________________________
Added: svn:executable
+ *
Added: DART/trunk/models/NOGAPS/work/mkmf_obs_sequence_tool
===================================================================
@@ Diff output truncated at 40000 characters. @@
More information about the Dart-dev
mailing list