-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding datetime in rpointer file with backward compatibility #486
Adding datetime in rpointer file with backward compatibility #486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a couple comments/suggestions. And a larger thing that I'll make an issue about.
route/build/src/io_rpointfile.f90
Outdated
|
||
ierr=0; message='io_rpfile/' | ||
|
||
if (present(curDatetime)) then | ||
sec_in_day = curDatetime%hour()*60*60+curDatetime%minute()*60+nint(curDatetime%sec()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change 60*60 to nint(secphour) and 60 to nint(secpmin) in public_vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
route/build/cpl/RtmMod.F90
Outdated
locfn = './'// trim(rpntfil)//trim(inst_suffix) | ||
nio = getavu() ! get available unit number | ||
|
||
! construct rpoint file name with datetime - simDatetime has three datetime at previous(0), current(1) and next(2) time stamp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change rpoint to rpointer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
!-------------------------------------------------------- | ||
|
||
if (masterproc) then | ||
write(iulog,*) 'Reading restart pointer file....' | ||
endif | ||
|
||
nio = getavu() | ||
locfn = './'// trim(rpntfil)//trim(inst_suffix) | ||
nio = getavu() ! get available unit number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, that new FORTRAN constructs allow you to NOT need getavu() anymore. There's a way to open a file with an available unit.
This would be a good modernization effort to do. But, not completely required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing in RtmFileUtils that is maybe useful is opnfil, but the use of getavu and relavu could be removed and handled within opnfil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for suggestions on ascii file handling (#490). I will clean this up with another PR. This RtmFileUtils and ascii_utils could be merged and several routines (getavu and relavu, getSpareUnit) can be removed.
Adding string of datetime (
yyyy-mm-dd-sssss
format) to the end ofrpointer.rof
for only cesm-coupling mode. This is the backward compatibility. standalone does not use this for now.Resolve #484