COSIMA / libaccessom2

ACCESS-OM2 library
3 stars 7 forks source link

revert to directory existence check for restart #50

Closed aekiss closed 4 years ago

aekiss commented 4 years ago

this fixes https://github.com/COSIMA/libaccessom2/issues/48

aidanheerdegen commented 4 years ago

I'd rather make a PR that works for both Intel and gfortran. This will break the CI

aekiss commented 4 years ago

gah, oops sorry @aidanheerdegen

aidanheerdegen commented 4 years ago

No worries. I'll do another PR.

aekiss commented 4 years ago

I am starting a long 0.1deg IAF experiment and was wanting a config in master that worked... I guess the CI can be sorted out in a branch?

aidanheerdegen commented 4 years ago

Sure. Once you've checked out the code though, it shouldn't matter if the repo is changed.

russfiedler commented 4 years ago

Since only yatm inquires about the directory you could probably do something like execute_command_line('mkdir -p '//trim(self%config_dir)//'/RESTART',...)` checking the exit status and then proceed.

Otherwise, calling some C seems like the best option. See here (not the accepted answer).

https://stackoverflow.com/questions/9522933/test-whether-a-directory-exists-or-not