Skip to content

Commit

Permalink
Merge pull request #2301 from GEOS-ESM/feature/jk/doc_check
Browse files Browse the repository at this point in the history
Feature/jk/doc check
  • Loading branch information
mathomp4 authored Aug 8, 2023
2 parents 92b639e + 2b66149 commit 6001603
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
54 changes: 30 additions & 24 deletions base/Plain_netCDF_Time.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#include "MAPL_ErrLog.h"
#include "unused_dummy.H"

!
!>
!### MODULE: `MAPL_plain_netCDF_Time`
!
! Author: GMAO SI-Team
!
module MAPL_plain_netCDF_Time
use MAPL_KeywordEnforcerMod
use MAPL_ExceptionHandling
Expand All @@ -25,15 +31,15 @@ module MAPL_plain_netCDF_Time
procedure :: time_esmf_2_nc_int
end interface convert_time_esmf2nc

!! interface get_ncfile_dimension
!C interface get_ncfile_dimension
! procedure :: get_ncfile_dimension
! procedure :: get_ncfile_dimension_I8
!! end interface get_ncfile_dimension
!C end interface get_ncfile_dimension
!
!! interface get_v1d_netcdf
!C interface get_v1d_netcdf
! procedure :: get_v1d_netcdf_R8
! procedure :: get_v1d_netcdf_R8_I8
!! end interface get_v1d_netcdf
!C end interface get_v1d_netcdf


interface get_v2d_netcdf
Expand Down Expand Up @@ -91,8 +97,8 @@ subroutine get_ncfile_dimension(filename, nlon, nlat, tdim, key_lon, key_lat, ke
endif
call check_nc_status(nf90_close(ncid), _RC)

!! debug summary
!!write(6,*) "get_ncfile_dimension: nlat, nlon, tdim = ", nlat, nlon, tdim
! debug summary
!write(6,*) "get_ncfile_dimension: nlat, nlon, tdim = ", nlat, nlon, tdim
end subroutine get_ncfile_dimension

!
Expand Down Expand Up @@ -131,8 +137,8 @@ end subroutine get_ncfile_dimension
! endif
! call check_nc_status(nf90_close(ncid), _RC)
!
! !! debug summary
! !!write(6,*) "get_ncfile_dimension: nlat, nlon, tdim = ", nlat, nlon, tdim
! !- debug summary
! !write(6,*) "get_ncfile_dimension: nlat, nlon, tdim = ", nlat, nlon, tdim
! end subroutine get_ncfile_dimension_I8
!

Expand Down Expand Up @@ -285,7 +291,7 @@ subroutine time_esmf_2_nc_int (time, tunit, n, rc)

! check
! -----
!! write(6, *) 'dt in unit second is', n
! write(6, *) 'dt in unit second is', n

if(present(rc)) rc=0
end subroutine time_esmf_2_nc_int
Expand Down Expand Up @@ -316,10 +322,10 @@ subroutine parse_timeunit_i4 (tunit, n, t0, dt, rc)
read(s1, '(i4,a1,i2,a1,i2)') y, c1, m, c1, d
read(s2, '(i2,a1,i2,a1,i2)') hour, c1, min, c1, sec

!! write(6,*) 's_time, s_unit', trim(s_time), trim(s_unit)
!! write(6,*) 's1, s2 ', trim(s1), trim(s2)
!! write(6,*) 'y, m, d', y, m, d
!! write(6,*) 'hour,min,sec', hour,min,sec
! write(6,*) 's_time, s_unit', trim(s_time), trim(s_unit)
! write(6,*) 's1, s2 ', trim(s1), trim(s2)
! write(6,*) 'y, m, d', y, m, d
! write(6,*) 'hour,min,sec', hour,min,sec

if (trim(s_unit) == 'seconds') then
isec=n
Expand Down Expand Up @@ -364,10 +370,10 @@ subroutine parse_timeunit_i8 (tunit, n, t0, dt, rc)
read(s1, '(i4,a1,i2,a1,i2)') y, c1, m, c1, d
read(s2, '(i2,a1,i2,a1,i2)') hour, c1, min, c1, sec

!! write(6,*) 's_time, s_unit', trim(s_time), trim(s_unit)
!! write(6,*) 's1, s2 ', trim(s1), trim(s2)
!! write(6,*) 'y, m, d', y, m, d
!! write(6,*) 'hour,min,sec', hour,min,sec
! write(6,*) 's_time, s_unit', trim(s_time), trim(s_unit)
! write(6,*) 's1, s2 ', trim(s1), trim(s2)
! write(6,*) 'y, m, d', y, m, d
! write(6,*) 'hour,min,sec', hour,min,sec

if (trim(s_unit) == 'seconds') then
isec=n
Expand Down Expand Up @@ -462,7 +468,7 @@ subroutine bisect_find_LB_R8_I8 (xa, x, n, n_LB, n_UB, rc)
if(present(n_UB)) UB=n_UB
klo=LB; khi=UB; dk=1

!! write(6,*) 'init klo, khi', klo, khi
! write(6,*) 'init klo, khi', klo, khi
if ( xa(LB ) > xa(UB) ) then
klo= UB
khi= LB
Expand All @@ -477,13 +483,13 @@ subroutine bisect_find_LB_R8_I8 (xa, x, n, n_LB, n_UB, rc)

rc=-1
if ( x <= xa(klo) ) then
!!write(6,*) 'xa(klo), xa(khi), x', xa(klo), xa(khi), x
!write(6,*) 'xa(klo), xa(khi), x', xa(klo), xa(khi), x
n=klo-1
!!write(6,*) 'warning in bisect_find_LB_R8_I8: x < array:LB'
!write(6,*) 'warning in bisect_find_LB_R8_I8: x < array:LB'
return
elseif ( x > xa(khi) ) then
n=khi
!!write(6,*) 'warning in bisect_find_LB_R8_I8: x > array:UB'
!write(6,*) 'warning in bisect_find_LB_R8_I8: x > array:UB'
return
endif

Expand Down Expand Up @@ -520,9 +526,9 @@ subroutine convert_twostring_2_esmfinterval (symd, shms, interval, rc)
s2=trim(shms)
read(s2, '(3i2)') hh, mm, ss

!!! debug
!!write(6,'(3a10)') 's1, s2', s1, s2
!!write(6,*) 'int y,m,d,hh,mm,ss', y,m,d,hh,mm,ss
! debug
!write(6,'(3a10)') 's1, s2', s1, s2
!write(6,*) 'int y,m,d,hh,mm,ss', y,m,d,hh,mm,ss

call ESMF_TimeIntervalSet(interval, yy=y, mm=m, d=d, h=hh, m=mm, s=ss, rc=rc)

Expand Down
20 changes: 15 additions & 5 deletions base/tests/Test_CFIO_Bundle.pf
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
! Simple unit test for CFIO Read/Write Bundle
!

!------------------------------------------------------------------------------
! Global Modeling and Assimilation Office (GMAO) !
! Goddard Earth Observing System (GEOS) !
! MAPL Component !
!------------------------------------------------------------------------------
!
#include "MAPL_Generic.h"

!
!>
!### MODULE: `Test_CFIO_Bundle`
!
! Author: GMAO SI-Team
!
! `Test_CFIO_Bundle` is a simple unit test for CFIO Read/Write Bundle.
!
module Test_CFIO_Bundle
use pfunit
use ESMF
Expand Down Expand Up @@ -209,7 +219,7 @@ contains
_VERIFY(STATUS)
call ESMF_ConfigSetAttribute(config, value=ny, Label='NY:', rc=status)
_VERIFY(STATUS)
!!$ call ESMF_ConfigSetAttribute(config, value=gridname, Label='GRIDNAME:', rc = status )
!C$ call ESMF_ConfigSetAttribute(config, value=gridname, Label='GRIDNAME:', rc = status )
call ESMF_ConfigGetAttribute(config, value=gridname, Label='GRIDNAME:', rc = status )
_VERIFY(STATUS)
call ESMF_ConfigSetAttribute(config, value=KM_WORLD, Label='LM:', rc = status )
Expand Down
1 change: 1 addition & 0 deletions generic/MAPL_Generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ end subroutine I_SetServices
!=============================================================================
!>
! `MAPL_GenericSetServices` performs the following tasks:
!
!- Allocate an instance of MAPL\_GenericState, wrap it, and set it as the
! GC's internal state.
!- Exract the grid and configuration from the GC and save them in the
Expand Down

0 comments on commit 6001603

Please sign in to comment.