[Dart-dev] DART/branches Revision: 11646
dart at ucar.edu
dart at ucar.edu
Fri May 19 10:04:20 MDT 2017
thoar at ucar.edu
2017-05-19 10:04:17 -0600 (Fri, 19 May 2017)
186
tidied up the code before I give it back to Tarkeshwar.
This version ensures that all public interfaces initialize the
module - and the routines are prefaced by doxygen-style comments.
Modified: DART/branches/LMDZ_trunk/models/LMDZ/model_mod.f90
===================================================================
--- DART/branches/LMDZ_trunk/models/LMDZ/model_mod.f90 2017-05-18 22:55:43 UTC (rev 11645)
+++ DART/branches/LMDZ_trunk/models/LMDZ/model_mod.f90 2017-05-19 16:04:17 UTC (rev 11646)
@@ -6,9 +6,9 @@
module model_mod
-!--------------------------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
! Assimilation interface for LMDZ model
-!-------------------------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
! This is the interface between the LMDZ atmospheric model and DART.
! There are 16 required public interfaces whose arguments CANNOT be changed.
! There are potentially many other public routines that are typically
@@ -20,8 +20,8 @@
!
! based on subroutines from others models especially CAM in the DART package
! NOTE: This interface codes do not convert LMDZ state vectors 'ucov', 'vcov' and 'teta'
-! in natural winds fields (u,v) and temperaure (t) . Hence it is required to convert
-! them inside LMDZ before writting LMDZ restart file. Similarly
+! in natural winds fields (u,v) and temperaure (t). Hence it is required to
+! convert them inside LMDZ before writting LMDZ restart file. Similarly
! conversion from (u,v,t) to (ucov,vcov,teta) is required outside of this
! program. For more details please see LMDZ5_modified_codes/README
!
@@ -438,12 +438,15 @@
! Better damping algorithm for state variables near/in the LMDZ damped levels
! at the top of the model.
+
+
+model_reff = 101325.0_r8 !! surface refrence pressure in LMDZ
+
if (vert_coord == 'pressure') then
!FIXME LMDZ's model_top is 1/2 level below the highest level, so
! apm instead of ap ???.
!model_top = apm%vals(1) !
model_top = ap%vals(1) !
- model_reff = 101325.0_r8 !! surface refrence pressure in LMDZ
! The (lon,lat) here must match the ones in the definition of vert_only_loc
! in get_close_obs.
@@ -527,11 +530,9 @@
write(*,*) 'TJH leaving static_init_model'
-!=======================================================================
end subroutine static_init_model
-
!-----------------------------------------------------------------------
!>
@@ -572,6 +573,7 @@
end subroutine read_lmdz_init_size
+
!-----------------------------------------------------------------------
!>
@@ -623,11 +625,9 @@
call rad_to_degree(var)
end if
-if (cfield(1:2) == 'ap'.OR.cfield(1:2) == 'bp') then
+
+if (cfield(1:2) == 'ap' .OR. cfield(1:2) == 'bp' .OR. cfield=='temps') then
var%resolution = MISSING_R8
-elseif (var%length < 2 .and. cfield == 'temps') then
- ! sometimes there is only 1 time in the file.
- var%resolution = MISSING_R8
else
resol_1 = var%vals(2) - var%vals(1)
resol = 1.0_r8/resol_1
@@ -655,14 +655,13 @@
end subroutine read_lmdz_coord
- subroutine init_grid_1d_instance(var, length, num_atts)
-!=======================================================================
-! subroutine init_grid_1d_instance(var)
-!
-! Initializes an instance of a lmdz grid variable
+!-----------------------------------------------------------------------
+!> Initializes an instance of a lmdz grid variable
+subroutine init_grid_1d_instance(var, length, num_atts)
+
type(grid_1d_type), intent(out) :: var
-integer, intent(in ) :: length, num_atts
+integer, intent(in ) :: length, num_atts
! Initialize the storage space and return
allocate( var%vals (length))
@@ -674,19 +673,17 @@
!var%length = length
More information about the Dart-dev
mailing list