[Dart-dev] DART/branches Revision: 12530

dart at ucar.edu dart at ucar.edu
Wed Apr 18 09:57:37 MDT 2018


thoar at ucar.edu
2018-04-18 09:57:36 -0600 (Wed, 18 Apr 2018)
23
Mostly just comments.




Modified: DART/branches/openggcm/models/openggcm/model_mod.f90
===================================================================
--- DART/branches/openggcm/models/openggcm/model_mod.f90	2018-04-17 22:44:50 UTC (rev 12529)
+++ DART/branches/openggcm/models/openggcm/model_mod.f90	2018-04-18 15:57:36 UTC (rev 12530)
@@ -62,6 +62,8 @@
 
 use              cotr_mod, only : transform, cotr_set, cotr, xyzdeg, degxyz
 
+use   openggcm_interp_mod, only : g_oplus_pre, g_oplus_int, nsearch
+
 use typesizes
 use netcdf 
 
@@ -214,13 +216,12 @@
 ! Domain id to be used by routines in state_structure_mod
 integer :: domain_id
 
+!------------------------------------------------------------------
 contains
-
 !------------------------------------------------------------------
-!------------------------------------------------------------------
 
-!> Called to do one time initialization of the model. In this case,
-!> it reads in the grid information.
+!> Called to do one-time initialization of the model.
+!> Read the namelist, initialize the grid ...
 
 subroutine static_init_model()
 
@@ -345,9 +346,12 @@
 real(r8)    :: hgt_fract
 integer     :: hstatus
 type(grid_type), pointer :: mygrid
+logical     :: interp_initialized = .false.
 
 if ( .not. module_initialized ) call static_init_model
 
+if ( .not. interp_initialized ) call initialize_interpolation()
+
 ! Let's assume failure.  Set return val to missing, then the code can
 ! just set istatus to something indicating why it failed, and return.
 ! If the interpolation is good, the interp_val will be set to the 
@@ -1554,9 +1558,9 @@
 type(grid_type), intent(inout) :: grid_handle !< geo or mag grid handle
 logical,         intent(in)    :: conv !< if true, the grid has conversion arrays
 
-!>@todo use dim_order_list ... maybe ... at least check for consistency with variable shape
-! so that when we use the indices for the variable, we are sure that the indices will work
-! on the coordinate arrays
+!>@todo use dim_order_list ... maybe ... at least check for consistency with 
+! variable shape so that when we use the indices for the variable, we are sure 
+! that the indices will work on the coordinate arrays
 
 allocate(grid_handle%longitude(grid_handle%nheight, grid_handle%nlat, grid_handle%nlon))
 allocate(grid_handle%latitude( grid_handle%nheight, grid_handle%nlat, grid_handle%nlon))
@@ -1763,11 +1767,22 @@
 end subroutine make_dim_order_table
 
 !----------------------------------------------------------------------
-!------------------------------------------------------------------
-! End of model_mod
-!------------------------------------------------------------------
 
+!> Initialize the interpolation routines.
+
+subroutine initialize_interpolation()
+
+call g_oplus_pre(geo_grid%nlon, geo_grid%nlat, geo_grid%nheight,&
+                 geo_grid%longitude, &
+                 geo_grid%latitude, &
+                 geo_grid%height, test_case)
+
+end subroutine initialize_interpolation
+
+
+!----------------------------------------------------------------------
 end module model_mod
+!----------------------------------------------------------------------
 
 ! <next few lines under version control, do not edit>
 ! $URL$

Modified: DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90
===================================================================
--- DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90	2018-04-17 22:44:50 UTC (rev 12529)
+++ DART/branches/openggcm/models/openggcm/openggcm_interp_mod.f90	2018-04-18 15:57:36 UTC (rev 12530)
@@ -6,6 +6,8 @@
 
 module openggcm_interp_mod
 
+!>@todo remove the 'stop' and write(0,*) 
+
 use        types_mod, only : r4, r8
 
 use    utilities_mod, only : register_module, initialize_utilities,      &
@@ -13,7 +15,6 @@
                              error_handler, E_ERR, E_MSG, nmlfileunit,   &
                              do_nml_file, do_nml_term, logfileunit,      &
                              finalize_utilities 
-


More information about the Dart-dev mailing list