ESCOMP / POP2-CESM

Parallel Ocean Program (POP2) in CESM
http://www.cesm.ucar.edu/models/cesm2/ocean/
4 stars 24 forks source link

namelist variable chl_file_fmt not broadcast #22

Open klindsay28 opened 4 years ago

klindsay28 commented 4 years ago

The namelist variable chl_file_fmt is not being broadcast after the sw_absorption_nml namelist is read by master task.

If a user specifies a non-default valid value, e.g. 'nc', then the code hangs during file open, because master task calls open_read_netcdf and non-master tasks call open_read_binary.

This affects all versions of POP.

The patch is straightforward:

--- /gpfs/u/home/cmip6/cesm_tags/cesm2_omip_n02/components/pop/source/sw_absorption.F90 2019-06-15 15:12:39.421423340 -0600
+++ ./sw_absorption.F90 2020-03-11 09:46:49.052803398 -0600
@@ -327,6 +327,7 @@
    call broadcast_scalar(jerlov_water_type,     master_task)
    call broadcast_scalar(chl_option,            master_task)
    call broadcast_scalar(chl_filename,          master_task)
+   call broadcast_scalar(chl_file_fmt,          master_task)

    if (sw_absorption_type .ne. 'top-layer'.and.  &
           sw_absorption_type .ne. 'jerlov'.and.  &