diff --git a/src/subscript/grav_subs_maps/grav_subs_maps.py b/src/subscript/grav_subs_maps/grav_subs_maps.py index 0d83869e7..bc9b6bcdf 100644 --- a/src/subscript/grav_subs_maps/grav_subs_maps.py +++ b/src/subscript/grav_subs_maps/grav_subs_maps.py @@ -215,7 +215,16 @@ def main_gravmaps( if singledate not in added_dates: if singledate in restart_index: rsb = rest.restartView(restart_index[singledate]) - grav.add_survey_RFIP(singledate, rsb) + if rest.has_kw("RFIPGAS"): + grav.add_survey_RFIP(singledate, rsb) + else: + logger.info( + "RFIPGAS missing in restart file. " + "Cannot use RFIP in gravity calculations. " + "Will try to use RPORV method instead" + ) + grav.add_survey_RPORV(singledate, rsb) + subsidence.add_survey_PRESSURE(singledate, rsb) added_dates.append(singledate) else: diff --git a/src/subscript/grav_subs_points/grav_subs_points.py b/src/subscript/grav_subs_points/grav_subs_points.py index d2006147f..6d57c170d 100644 --- a/src/subscript/grav_subs_points/grav_subs_points.py +++ b/src/subscript/grav_subs_points/grav_subs_points.py @@ -325,7 +325,16 @@ def main_gravpoints( if singledate not in added_dates: if singledate in restart_index: rsb = rest.restartView(restart_index[singledate]) - grav.add_survey_RFIP(singledate, rsb) + if rest.has_kw("RFIPGAS"): + grav.add_survey_RFIP(singledate, rsb) + else: + logger.info( + "RFIPGAS missing in restart file. " + "Cannot use RFIP in gravity calculations. " + "Will try to use RPORV method instead" + ) + grav.add_survey_RPORV(singledate, rsb) + subsidence.add_survey_PRESSURE(singledate, rsb) added_dates.append(singledate) else: