[Dart-dev] DART/branches Revision: 11093

dart at ucar.edu dart at ucar.edu
Fri Feb 10 13:56:03 MST 2017


hendric at ucar.edu
2017-02-10 13:56:03 -0700 (Fri, 10 Feb 2017)
65
moving write_model_time to a more logical position in the code.




Modified: DART/branches/rma_single_file/models/POP/model_mod.f90
===================================================================
--- DART/branches/rma_single_file/models/POP/model_mod.f90	2017-02-10 20:51:20 UTC (rev 11092)
+++ DART/branches/rma_single_file/models/POP/model_mod.f90	2017-02-10 20:56:03 UTC (rev 11093)
@@ -3654,45 +3654,6 @@
 
 
 !--------------------------------------------------------------------
-!> write time to the output file
-!> this is only called when creating a file from scratch
-
-
-subroutine write_model_time(ncid, dart_time)
-
-integer,         intent(in) :: ncid
-type(time_type), intent(in) :: dart_time
-
-integer :: iyear, imonth, iday, ihour, iminute, isecond
-
-if ( .not. module_initialized ) call static_init_model
-
-call get_date(dart_time, iyear, imonth, iday, ihour, iminute, isecond)
-
-! begin define mode
-call nc_check(nf90_Redef(ncid),"redef")
-
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iyear'  , iyear), &
-                       'write_model_time', 'put_att iyear')
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'imonth' , imonth), &
-                       'write_model_time', 'put_att imonth')
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iday'   , iday), &
-                       'write_model_time', 'put_att iday')
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'ihour'  , ihour), &
-                       'write_model_time', 'put_att ihour')
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iminute', iminute), &
-                       'write_model_time', 'put_att iminute')
-call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'isecond', isecond), &
-                       'write_model_time', 'put_att isecond')
-call nc_check(nf90_put_att(ncid, NF90_GLOBAL, 'calendar', 'Gregorian'), &
-                       'write_model_time', 'put_att calendar')
-
-call nc_check( nf90_Enddef(ncid),"write_model_time", "Enddef" )
-
-end subroutine write_model_time
-
-
-!--------------------------------------------------------------------
 !> read the time from the input file
 !> Stolen from pop model_mod.f90 restart_to_sv
 
@@ -3742,6 +3703,45 @@
 
 
 !--------------------------------------------------------------------
+!> write time to the output file
+!> this is only called when creating a file from scratch
+
+
+subroutine write_model_time(ncid, dart_time)
+
+integer,         intent(in) :: ncid
+type(time_type), intent(in) :: dart_time
+
+integer :: iyear, imonth, iday, ihour, iminute, isecond
+
+if ( .not. module_initialized ) call static_init_model
+
+call get_date(dart_time, iyear, imonth, iday, ihour, iminute, isecond)
+
+! begin define mode
+call nc_check(nf90_Redef(ncid),"redef")
+
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iyear'  , iyear), &
+                       'write_model_time', 'put_att iyear')
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'imonth' , imonth), &
+                       'write_model_time', 'put_att imonth')
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iday'   , iday), &
+                       'write_model_time', 'put_att iday')
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'ihour'  , ihour), &
+                       'write_model_time', 'put_att ihour')
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'iminute', iminute), &
+                       'write_model_time', 'put_att iminute')
+call nc_check( nf90_put_att(ncid, NF90_GLOBAL, 'isecond', isecond), &
+                       'write_model_time', 'put_att isecond')
+call nc_check(nf90_put_att(ncid, NF90_GLOBAL, 'calendar', 'Gregorian'), &
+                       'write_model_time', 'put_att calendar')
+
+call nc_check( nf90_Enddef(ncid),"write_model_time", "Enddef" )
+
+end subroutine write_model_time
+
+
+!--------------------------------------------------------------------
 !> pass the vertical localization coordinate to assim_tools_mod
 
 


More information about the Dart-dev mailing list