Skip to content
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

add nocolons option to namelist.wps.all_options #96

Open
andreas-h opened this issue Dec 4, 2018 · 7 comments
Open

add nocolons option to namelist.wps.all_options #96

andreas-h opened this issue Dec 4, 2018 · 7 comments

Comments

@andreas-h
Copy link

It would be nice if nocolons would be added to the namelist.wps.all_options file, in order to improve discoverability by the user.

If welcome, I'm happy to submit a PR.

@mgduda
Copy link
Collaborator

mgduda commented Dec 4, 2018

It may have been quite some time since the nocolons option was actually tested, but assuming it works, I think submitting a PR to include it in the namelist.wps.all_options file sounds good to me.

@davegill
Copy link
Collaborator

davegill commented Dec 4, 2018

I seem to remember that the real program may not work with the nocolons option activated, where the metgrid file has underscores instead of colons.

@letmaik
Copy link

letmaik commented Dec 4, 2018

nocolons works in WRF but not WPS. In our fork for CMake we had to make changes to the following files: metgrid/src/{read,write}_met_module.F, ungrib/src/{datint,output,rrpr,ungrib}.F. In those files we simply replaced the colons with underscores in all cases without looking at a namelist option as it seemed to be a bit hard to get hold of it in certain cases.

@andreas-h
Copy link
Author

I used the nocolons option this week without problems in both WPS and real.exe.

@letmaik
Copy link

letmaik commented Dec 12, 2018

@andreas-h I seriously doubt that WPS in your case did not include colons in filenames. See some of the places below which unconditionally use colons. Can you name some example filenames that you got? Maybe we talk about different things.

! 1) BUILD FILENAME BASED ON TIME
met_out_filename = ' '
if (.not. source_is_constant) then
write(met_out_filename, '(a)') trim(fg_source)//':'//trim(datestr)
else
write(met_out_filename, '(a)') trim(fg_source)
end if

WPS/ungrib/src/output.F

Lines 133 to 157 in 99f3ef5

if (iflag.eq.1) then
if (nfiles.eq.0) then
open(iunit, file=trim(get_path(prefix))//'PFILE:'//HDATE(1:datelen), form='unformatted', &
position='REWIND')
nfiles = nfiles + 1
filedates(nfiles)(1:datelen) = hdate(1:datelen)
else
DOFILES : do k = 1, nfiles
if (hdate(1:datelen).eq.filedates(k)(1:datelen)) then
open(iunit, file=trim(get_path(prefix))//'PFILE:'//HDATE(1:datelen), form='unformatted',&
position='APPEND')
endif
enddo DOFILES
inquire (iunit, OPENED=LOPEN)
if (.not. LOPEN) then
open(iunit, file=trim(get_path(prefix))//'PFILE:'//HDATE(1:datelen), form='unformatted', &
position='REWIND')
nfiles = nfiles + 1
filedates(nfiles)(1:datelen) = hdate(1:datelen)
endif
endif
else if (iflag.eq.2) then
open(iunit, file=trim(prefix)//':'//HDATE(1:datelen), form='unformatted', &
position='REWIND')
endif

WPS/ungrib/src/ungrib.F

Lines 389 to 391 in 99f3ef5

! Now delete the temporary files:
call file_delete(filedates, nfiles, trim(get_path(prefix))//'PFILE:', interval)

@andreas-h
Copy link
Author

andreas-h commented Dec 13, 2018 via email

@douglowe
Copy link

douglowe commented Apr 6, 2023

Revisiting this request - I've found that the colons in the ungrib output is breaking my workflow when using singularity containers.

The following bind statement fails - singularity tries to bind a SFCFILE file instead:

--bind \
    /[local path]/SFCFILE:2020-01-04_12:/UWFwyQ/SFCFILE:2020-01-04_12:ro \

I do note that singularity v3.9 onwards might not be subject to this limitation (see sylabs/singularity#118) - but I'm stuck with singularity 3.5.2 on our local HPC system, which definitely can't cope with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants