[Dart-dev] [9591] DART/trunk/models/LMDZ: Updated the copyright from 2011 to 2013.

nancy at ucar.edu nancy at ucar.edu
Fri Jan 22 17:07:31 MST 2016


Revision: 9591
Author:   thoar
Date:     2016-01-22 17:07:31 -0700 (Fri, 22 Jan 2016)
Log Message:
-----------
Updated the copyright from 2011 to 2013. 
Updated the revision control blocks to be consistent with best practices.
The model_mod had the wrong 'intent' for some pointers being allocated
in init_model_instance() and end_model_instance().

There are 3 unused routines and lots of unused variables.
I'd love to prune out the unused variables, at least.
Also - I'm not wild about the use of public state variables.

The input.nml references ../../../obs_def/obs_def_insat_mod.f90
and 'INSAT3D_TEMPERATURE', 'INSAT3D_SPECIFIC_HUMIDITY' ... which
do not exist on the trunk. I have a query out for them.

Modified Paths:
--------------
    DART/trunk/models/LMDZ/dart_to_lmdz.f90
    DART/trunk/models/LMDZ/lmdz_to_dart.f90
    DART/trunk/models/LMDZ/model_mod.f90

-------------- next part --------------
Modified: DART/trunk/models/LMDZ/dart_to_lmdz.f90
===================================================================
--- DART/trunk/models/LMDZ/dart_to_lmdz.f90	2016-01-22 23:35:24 UTC (rev 9590)
+++ DART/trunk/models/LMDZ/dart_to_lmdz.f90	2016-01-23 00:07:31 UTC (rev 9591)
@@ -1,6 +1,8 @@
-! DART software - Copyright 2004 - 2011 UCAR. This open source software is
+! DART software - Copyright 2004 - 2013 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$
 
 program dart_to_lmdz
 
@@ -19,7 +21,8 @@
                             initialize_utilities, finalize_utilities, &
                             logfileunit, nmlfileunit, do_nml_file, do_nml_term, &
                             check_namelist_read, find_namelist_in_file
-use       model_mod, only : data_2d_type,data_3d_type, init_model_instance, write_lmdz_init, &
+use       model_mod, only : data_2d_type,data_3d_type, init_model_instance, &
+                            write_lmdz_init, &
                             vector_to_prog_var, static_init_model, get_model_size
 use assim_model_mod, only : aread_state_restart, open_restart_read, close_restart
 use time_manager_mod, only : time_type, print_time, print_date
@@ -27,20 +30,20 @@
 implicit none
 
 ! version controlled file description for error handling, do not edit
-character(len=128), parameter :: &
-   source   = "$URL$", &
-   revision = "$Revision$", &
-   revdate  = "$Date$"
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len= 32), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
 
 !------------------------------------------------------------------
 ! The namelist variables
 !------------------------------------------------------------------
 
-character (len = 128) :: dart_to_lmdz_input_file  = 'dart_ics'
-character (len = 128) :: dart_to_lmdz_output_file = 'start.nc'
-logical               :: advance_time_present    = .true.
+character(len=256) :: dart_to_lmdz_input_file  = 'dart_ics'
+character(len=256) :: dart_to_lmdz_output_file = 'start.nc'
+logical            :: advance_time_present     = .true.
 
-namelist /dart_to_lmdz_nml/ dart_to_lmdz_input_file,  &
+namelist /dart_to_lmdz_nml/ dart_to_lmdz_input_file, &
                            dart_to_lmdz_output_file, &
                            advance_time_present
 

Modified: DART/trunk/models/LMDZ/lmdz_to_dart.f90
===================================================================
--- DART/trunk/models/LMDZ/lmdz_to_dart.f90	2016-01-22 23:35:24 UTC (rev 9590)
+++ DART/trunk/models/LMDZ/lmdz_to_dart.f90	2016-01-23 00:07:31 UTC (rev 9591)
@@ -1,17 +1,12 @@
-! DART software - Copyright 2004 - 2011 UCAR. This open source software is
+! DART software - Copyright 2004 - 2013 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$
 
 program lmdz_to_dart
 
 !----------------------------------------------------------------------
-! <next few lines under version control, do not edit>
-! $URL:https://proxy.subversion.ucar.edu/DAReS/DART/releases/Kodiak/models/LMDZ/lmdz_to_dart.f90  $
-! $Id$
-! $Revision$
-! $Date$
-
-!----------------------------------------------------------------------
 ! purpose: interface between LMDZ and DART
 !
 ! method: Read LMDZ 'initial' file (netCDF format) for model state and time.
@@ -19,13 +14,13 @@
 !         Write out state vector in "proprietary" format for DART
 !----------------------------------------------------------------------
 
-
 use        types_mod, only : r8
 use    utilities_mod, only : initialize_utilities, finalize_utilities, do_output,     &
                              check_namelist_read, find_namelist_in_file, nmlfileunit, &
                              do_nml_file, do_nml_term
-use        model_mod, only : data_2d_type,data_3d_type, init_model_instance, end_model_instance, &
-                             prog_var_to_vector, read_lmdz_init, static_init_model,PS,T,U,V,Q,CLDLIQ
+use        model_mod, only : data_2d_type,data_3d_type, init_model_instance, &
+                             end_model_instance, prog_var_to_vector, read_lmdz_init, &
+                             static_init_model, PS, T, U, V, Q, CLDLIQ
 use  assim_model_mod, only : static_init_assim_model, get_model_size, &
                              open_restart_write, awrite_state_restart, close_restart
 use time_manager_mod, only : time_type
@@ -33,18 +28,17 @@
 implicit none
 
 ! version controlled file description for error handling, do not edit
-character(len=128), parameter :: &
-   source   = "$URL$", &
-   revision = "$Revision$", &
-   revdate  = "$Date$"
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len= 32), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
 
-
 !-----------------------------------------------------------------------
 ! namelist parameters with default values.
 !-----------------------------------------------------------------------
 
-character (len = 128) :: lmdz_to_dart_input_file  = 'start.nc'
-character (len = 128) :: lmdz_to_dart_output_file = 'dart_ics'
+character(len=256) :: lmdz_to_dart_input_file  = 'start.nc'
+character(len=256) :: lmdz_to_dart_output_file = 'dart_ics'
 
 namelist /lmdz_to_dart_nml/ lmdz_to_dart_input_file, lmdz_to_dart_output_file
 
@@ -62,9 +56,6 @@
 call check_namelist_read(iunit, io, "lmdz_to_dart_nml")
 
 ! Record the namelist values
-
-! do_nml_file () :  *** return whether nml should be written to nml file 
-
 if (do_nml_file()) write(nmlfileunit, nml=lmdz_to_dart_nml)
 if (do_nml_term()) write(     *     , nml=lmdz_to_dart_nml)
 
@@ -77,14 +68,12 @@
 x_size = get_model_size()
 allocate(statevector(x_size))
 
-
 ! Allocate the instance of the lmdz model type for storage
 call init_model_instance(PS, T, U, V, Q, CLDLIQ)
 
 ! Read the file lmdz state fragments into var;
 ! transform fields into state vector for DART
 
-
 call read_lmdz_init(lmdz_to_dart_input_file, model_time)
 
 call prog_var_to_vector(statevector, PS, T, U, V, Q, CLDLIQ)
@@ -99,3 +88,10 @@
 call finalize_utilities()
 
 end program lmdz_to_dart
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/trunk/models/LMDZ/model_mod.f90
===================================================================
--- DART/trunk/models/LMDZ/model_mod.f90	2016-01-22 23:35:24 UTC (rev 9590)
+++ DART/trunk/models/LMDZ/model_mod.f90	2016-01-23 00:07:31 UTC (rev 9591)
@@ -1,6 +1,8 @@
-! DART software - Copyright 2004 - 2011 UCAR. This open source software is
+! DART software - Copyright 2004 - 2013 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$
 
 module model_mod
 
@@ -19,7 +21,7 @@
                              find_namelist_in_file, check_namelist_read,logfileunit,file_exist,  &
                              get_unit
 use mpi_utilities_mod, only : my_task_id, task_count
-!-------------------------------------------------------------------------
+
 use     location_mod,  only : location_type, get_location, set_location, query_location,         &
                               LocationDims, LocationName, LocationLName,horiz_dist_only,         &
                               vert_is_level, vert_is_pressure, vert_is_height,vert_is_surface,   &
@@ -28,7 +30,7 @@
                               get_close_type, get_close_maxdist_init, get_close_obs_init,        &
                               get_dist,loc_get_close_obs => get_close_obs
 
-! BEGIN DART PREPROCESS USED KINDS
+
 use     obs_kind_mod, only : KIND_U_WIND_COMPONENT, KIND_V_WIND_COMPONENT,KIND_PRESSURE,         &
                              KIND_SURFACE_PRESSURE, KIND_TEMPERATURE,KIND_SPECIFIC_HUMIDITY,     &
                              KIND_CLOUD_LIQUID_WATER, KIND_SURFACE_ELEVATION
@@ -36,7 +38,6 @@
 
 ! end of use statements
 !==============================================================================================
-!
 ! LMDZ global/module declarations
 
 implicit none
@@ -44,29 +45,43 @@
 
 ! The first block are the 16 required interfaces.  The following block
 ! are additional useful interfaces that utility programs can call.
-public ::                                                            &
-   static_init_model, get_model_size, get_model_time_step,           &
-   pert_model_state, get_state_meta_data, model_interpolate,         &
-   nc_write_model_atts, nc_write_model_vars,                         &
-   init_conditions, init_time, adv_1step, end_model,                 &
-   get_close_maxdist_init, get_close_obs_init, get_close_obs,        &
-   ens_mean_for_model
+public :: static_init_model,      &
+          get_model_size,         &
+          get_model_time_step,    &
+          pert_model_state,       &
+          get_state_meta_data,    &
+          model_interpolate,      &
+          nc_write_model_atts,    &
+          nc_write_model_vars,    &
+          init_conditions,        &
+          init_time,              &
+          adv_1step,              &
+          end_model,              &
+          get_close_maxdist_init, &
+          get_close_obs_init,     &
+          get_close_obs,          &
+          ens_mean_for_model
 
-public ::                                                            &
-   data_2d_type,data_3d_type,PS,T,U,V,Q,CLDLIQ, prog_var_to_vector,  &
-    vector_to_prog_var,  read_lmdz_init, read_lmdz_init_size,        &
-   init_model_instance, end_model_instance, write_lmdz_init, coord_index
-   
+public :: data_2d_type, &
+          data_3d_type, &
+          PS, T, U, V, Q, CLDLIQ, &
+          prog_var_to_vector, &
+          vector_to_prog_var, &
+          read_lmdz_init, &
+          read_lmdz_init_size, &
+          init_model_instance, &
+          end_model_instance, &
+          write_lmdz_init, &
+          coord_index
 
-
 !----------------------------------------------------------------------------
 !----------------------------------------------------------------------------
 
 ! version controlled file description for error handling, do not edit
-character(len=128), parameter :: &
-   source   = "$URL$", &
-   revision = "$Revision$", &
-   revdate  = "$Date$"
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len= 32), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
 
 ! Ensemble mean is used so that the same "state" will be used for the heigh calculations
 ! on all processors, for all ensemble members.
@@ -191,7 +206,7 @@
 logical                 :: do_out
 
 ! common message string used by many subroutines
-character(len=150)               :: msgstring, string2
+character(len=512)               :: msgstring, string2
 !----
 character (len=8), allocatable   :: cflds(:)
 integer                          :: nflds         ! # fields to read
@@ -807,16 +822,17 @@
 
 ! Initialize the storage space and return
 ! keep some others name of variabls
-    type(data_2D_type), intent(in) :: PS_local
-    type(data_3D_type), intent(in) :: U_local,V_local,T_local,Q_local,CLDLIQ_local
 
-    allocate(PS_local%vals(lon%length,lat%length))
-    allocate(T_local%vals(lon%length,lat%length,sigs%length))
-    allocate(U_local%vals(slon%length,lat%length,sigs%length))
-    allocate(V_local%vals(lon%length,slat%length,sigs%length))
-    allocate(Q_local%vals(lon%length,lat%length,sigs%length))
-    allocate(CLDLIQ_local%vals(lon%length,lat%length,sigs%length))
+    type(data_2D_type), intent(out) :: PS_local
+    type(data_3D_type), intent(out) :: U_local,V_local,T_local,Q_local,CLDLIQ_local
 
+    allocate(    PS_local%vals( lon%length, lat%length))
+    allocate(     T_local%vals( lon%length, lat%length, sigs%length))
+    allocate(     U_local%vals(slon%length, lat%length, sigs%length))
+    allocate(     V_local%vals( lon%length,slat%length, sigs%length))
+    allocate(     Q_local%vals( lon%length, lat%length, sigs%length))
+    allocate(CLDLIQ_local%vals( lon%length, lat%length, sigs%length))
+
 end subroutine init_model_instance
 
 
@@ -826,8 +842,8 @@
 
 ! Initialize the storage space and return
 ! keep some others name of variables
-    type(data_2D_type), intent(in) :: PS_local
-    type(data_3D_type), intent(in) ::  U_local,V_local,T_local,Q_local,CLDLIQ_local
+    type(data_2D_type), intent(inout) :: PS_local
+    type(data_3D_type), intent(inout) ::  U_local,V_local,T_local,Q_local,CLDLIQ_local
 
     deallocate(PS_local%vals)
     deallocate(U_local%vals)
@@ -4378,6 +4394,14 @@
 end subroutine degree_to_rad
 
 
+!===================================================================
+! End of model_mod
+!===================================================================
+end module model_mod
 
-!======================================================
-end module
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+


More information about the Dart-dev mailing list