From 89e8e8c2791553c9ab35dcfc738ecebdda0ebdac Mon Sep 17 00:00:00 2001 From: hakase hayashida Date: Wed, 9 Jun 2021 20:32:50 +1000 Subject: [PATCH] allow simulations without input files for gas exchange when they are not used. with this commit, no need to make unnecessary input files for higher resolutions. --- src/mom5/ocean_csiro_bgc/csiro_bgc.F90 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mom5/ocean_csiro_bgc/csiro_bgc.F90 b/src/mom5/ocean_csiro_bgc/csiro_bgc.F90 index 12a2172242..6a1de1545e 100755 --- a/src/mom5/ocean_csiro_bgc/csiro_bgc.F90 +++ b/src/mom5/ocean_csiro_bgc/csiro_bgc.F90 @@ -2024,14 +2024,16 @@ subroutine csiro_bgc_start (time, domain, grid) !{ trim(atmpress_file)) endif !} -pistonveloc_id = init_external_field(pistonveloc_file, & +if (gasx_from_file) then + pistonveloc_id = init_external_field(pistonveloc_file, & pistonveloc_name, & domain = Domain%domain2d) -if (pistonveloc_id .eq. 0) then !{ - call mpp_error(FATAL, trim(error_header) // & + if (pistonveloc_id .eq. 0) then !{ + call mpp_error(FATAL, trim(error_header) // & 'Could not open pistonveloc file: ' // & trim(pistonveloc_file)) -endif !} + endif !} +endif #ifdef ACCESS_CM if (id_adic .ne. 0 .and. .not. use_access_co2) then @@ -2048,14 +2050,16 @@ subroutine csiro_bgc_start (time, domain, grid) !{ endif !} endif -seaicefract_id = init_external_field(seaicefract_file, & +if (ice_file4gasx) then + seaicefract_id = init_external_field(seaicefract_file, & seaicefract_name, & domain = Domain%domain2d) -if (seaicefract_id .eq. 0) then !{ - call mpp_error(FATAL, trim(error_header) // & + if (seaicefract_id .eq. 0) then !{ + call mpp_error(FATAL, trim(error_header) // & 'Could not open seaicefract file: ' // & trim(seaicefract_file)) -endif !} + endif !} +endif dust_id = init_external_field(dust_file, & dust_name, &