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, &