From 7b43a6f5dd8f2e97bf1ab2fa9294088559767022 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Tue, 10 Mar 2020 13:28:21 -0700 Subject: [PATCH 1/6] update cori port and update icepack (#416) --- configuration/scripts/machines/env.cori_intel | 4 ++-- icepack | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration/scripts/machines/env.cori_intel b/configuration/scripts/machines/env.cori_intel index 703177ef7..bd66b4313 100755 --- a/configuration/scripts/machines/env.cori_intel +++ b/configuration/scripts/machines/env.cori_intel @@ -29,12 +29,12 @@ module unload cray-hdf5-parallel module unload cray-netcdf module unload cray-netcdf-hdf5parallel module unload cray-parallel-netcdf -module load cray-netcdf/4.6.1.3 +module load cray-netcdf/4.6.3.2 module unload cray-libsci module unload craype -module load craype/2.5.18 +module load craype/2.6.2 setenv NETCDF_PATH ${NETCDF_DIR} setenv OMP_PROC_BIND true diff --git a/icepack b/icepack index 6a6bb3fe6..11e4ec057 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 6a6bb3fe62b80727e9b31145dcaf1bf224a359ef +Subproject commit 11e4ec0571ba90522c153d2fd511b6dfe338b64a From 771aecb6c4a191977a1c3a153a3a99e4d5d9259e Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Fri, 13 Mar 2020 10:10:50 -0700 Subject: [PATCH 2/6] update wave_spec_frac filename implementation and update icepack (#417) --- cicecore/cicedynB/general/ice_forcing.F90 | 23 ++++++++----------- .../drivers/direct/hadgem3/CICE_InitMod.F90 | 3 ++- cicecore/drivers/mct/cesm1/CICE_InitMod.F90 | 3 ++- cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 | 3 ++- cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 | 3 ++- .../drivers/standalone/cice/CICE_InitMod.F90 | 3 ++- configuration/scripts/options/set_nml.fsd1 | 2 +- configuration/scripts/options/set_nml.fsd12 | 3 +-- .../scripts/options/set_nml.fsd12ww3 | 3 +-- icepack | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cicecore/cicedynB/general/ice_forcing.F90 b/cicecore/cicedynB/general/ice_forcing.F90 index ee7d7301c..0632408bf 100755 --- a/cicecore/cicedynB/general/ice_forcing.F90 +++ b/cicecore/cicedynB/general/ice_forcing.F90 @@ -5167,7 +5167,6 @@ subroutine get_wave_spec real(kind=dbl_kind), dimension(nfreq) :: & wave_spectrum_profile ! wave spectrum - character(char_len_long) :: spec_file character(char_len) :: wave_spec_type logical (kind=log_kind) :: wave_spec character(len=*), parameter :: subname = '(get_wave_spec)' @@ -5193,23 +5192,21 @@ subroutine get_wave_spec wave_spectrum_profile, & wavefreq, dwavefreq) - ! read more realistic data from a file if ((trim(wave_spec_type) == 'constant').OR.(trim(wave_spec_type) == 'random')) then - if (trim(wave_spec_file(1:4)) == 'unkn') then - call abort_ice (subname//'ERROR: wave_spec_file '//trim(wave_spec_file)) - else + if (trim(wave_spec_file(1:4)) == 'unkn') then + call abort_ice (subname//'ERROR: wave_spec_file '//trim(wave_spec_file)) + else #ifdef ncdf - spec_file = trim(wave_spec_dir)//'/'//trim(wave_spec_file) - call ice_open_nc(spec_file,fid) - call ice_read_nc_xyf (fid, 1, 'efreq', wave_spectrum(:,:,:,:), dbug, & - field_loc_center, field_type_scalar) - call ice_close_nc(fid) + call ice_open_nc(wave_spec_file,fid) + call ice_read_nc_xyf (fid, 1, 'efreq', wave_spectrum(:,:,:,:), dbug, & + field_loc_center, field_type_scalar) + call ice_close_nc(fid) #else - write (nu_diag,*) "wave spectrum file not available, requires ncdf" - write (nu_diag,*) "wave spectrum file not available, using default profile" + write (nu_diag,*) "wave spectrum file not available, requires ncdf" + write (nu_diag,*) "wave spectrum file not available, using default profile" #endif - endif + endif endif endif diff --git a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 index 7ec28783f..b208bcbef 100644 --- a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 +++ b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 @@ -150,7 +150,8 @@ subroutine cice_init floe_rad_l, & ! fsd size lower bound in m (radius) floe_rad_c, & ! fsd size bin centre in m (radius) floe_binwidth, & ! fsd size bin width in m (radius) - c_fsd_range) ! string for history output + c_fsd_range, & ! string for history output + write_diags=(my_task == master_task)) ! write diag on master only call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message="subname", & diff --git a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 index 7e325e191..b5d2608a3 100644 --- a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 +++ b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 @@ -153,7 +153,8 @@ subroutine cice_init(mpicom_ice) floe_rad_l, & ! fsd size lower bound in m (radius) floe_rad_c, & ! fsd size bin centre in m (radius) floe_binwidth, & ! fsd size bin width in m (radius) - c_fsd_range) ! string for history output + c_fsd_range, & ! string for history output + write_diags=(my_task == master_task)) ! write diag on master only call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & diff --git a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 index 14db24c73..cb3e7bb98 100644 --- a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 @@ -153,7 +153,8 @@ subroutine cice_init(mpicom_ice) floe_rad_l, & ! fsd size lower bound in m (radius) floe_rad_c, & ! fsd size bin centre in m (radius) floe_binwidth, & ! fsd size bin width in m (radius) - c_fsd_range) ! string for history output + c_fsd_range, & ! string for history output + write_diags=(my_task == master_task)) ! write diag on master only call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & diff --git a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 index bd434dd80..fd9449efd 100644 --- a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 @@ -161,7 +161,8 @@ subroutine cice_init(mpi_comm) floe_rad_l, & ! fsd size lower bound in m (radius) floe_rad_c, & ! fsd size bin centre in m (radius) floe_binwidth, & ! fsd size bin width in m (radius) - c_fsd_range) ! string for history output + c_fsd_range, & ! string for history output + write_diags=(my_task == master_task)) ! write diag on master only call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & diff --git a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 index cc075f564..0b61433a3 100644 --- a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 +++ b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 @@ -153,7 +153,8 @@ subroutine cice_init floe_rad_l, & ! fsd size lower bound in m (radius) floe_rad_c, & ! fsd size bin centre in m (radius) floe_binwidth, & ! fsd size bin width in m (radius) - c_fsd_range) ! string for history output + c_fsd_range, & ! string for history output + write_diags=(my_task == master_task)) ! write diag on master only call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & diff --git a/configuration/scripts/options/set_nml.fsd1 b/configuration/scripts/options/set_nml.fsd1 index 9dd5463e5..042ed5f25 100644 --- a/configuration/scripts/options/set_nml.fsd1 +++ b/configuration/scripts/options/set_nml.fsd1 @@ -2,4 +2,4 @@ tr_fsd = .true. nfsd = 1 wave_spec_type = 'none' nfreq = 25 -ocn_data_format = 'nc' + diff --git a/configuration/scripts/options/set_nml.fsd12 b/configuration/scripts/options/set_nml.fsd12 index f9db3e9cb..620b2e96b 100644 --- a/configuration/scripts/options/set_nml.fsd12 +++ b/configuration/scripts/options/set_nml.fsd12 @@ -2,5 +2,4 @@ tr_fsd = .true. nfsd = 12 wave_spec_type = 'profile' nfreq = 25 -ocn_data_format = 'nc' -wave_spec_file = 'unknown_wave_spec_file' + diff --git a/configuration/scripts/options/set_nml.fsd12ww3 b/configuration/scripts/options/set_nml.fsd12ww3 index 7759aeff8..a8d5d06ac 100644 --- a/configuration/scripts/options/set_nml.fsd12ww3 +++ b/configuration/scripts/options/set_nml.fsd12ww3 @@ -2,5 +2,4 @@ tr_fsd = .true. nfsd = 12 wave_spec_type = 'constant' nfreq = 25 -ocn_data_format = 'nc' -wave_spec_file = 'ww3.20100101_efreq_remapgx3.nc' +wave_spec_file = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx3/ww3.20100101_efreq_remapgx3.nc' diff --git a/icepack b/icepack index 11e4ec057..edb8c3459 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 11e4ec0571ba90522c153d2fd511b6dfe338b64a +Subproject commit edb8c3459359f22af20d39d7defe97c4a8b2a419 From 6cc0d6be68c88276ead555563d71a9de796dc988 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 18 Mar 2020 09:45:03 -0600 Subject: [PATCH 3/6] remove guest Bouchat from template --- .zenodo.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 6eb59f0d5..a78ec1320 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -31,10 +31,6 @@ "affiliation": "Environment and Climate Change Canada", "name": "Philippe Blain" }, - { - "affiliation": "Environment and Climate Change Canada", - "name": "Amelie Bouchat" - }, { "affiliation": "National Oceanographic and Atmospheric Administration (CTR)", "name": "Anthony Craig" @@ -99,4 +95,4 @@ "relation": "isNewVersionOf" } ] -} \ No newline at end of file +} From 5f97e45e2362518d41bc1bfa5ba01f0002fac24e Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 18 Mar 2020 10:01:17 -0600 Subject: [PATCH 4/6] add Osinski to template --- .zenodo.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index a78ec1320..6a3217023 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -63,6 +63,10 @@ "affiliation": "Environment and Climate Change Canada", "name": "Jean-Francois Lemieux" }, + { + "affiliation": "Institute of Oceanology, Polish Academy of Sciences", + "name": "Robert Osinski" + }, { "affiliation": "Danish Meteorological Institute", "name": "Till Rasmussen" From 9040fe2be7146638ced75f36a513b665828db844 Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Thu, 26 Mar 2020 15:03:17 -0400 Subject: [PATCH 5/6] conda: Macros: add '-L' argument to the linker command (#418) On Linux, compiling CICE in serial mode under the conda environment currently fails as the linker does not find the NetCDF libraries. Compiling in parallel mode does work as the MPI compilation wrappers seem to pass the necessary flag to the linker under the hood. Explicitely tell the linker the location of the libraries using the `SLIBS` variable in the Macros file. To be on the safe side, also do it on macOS. --- configuration/scripts/machines/Macros.conda_linux | 2 +- configuration/scripts/machines/Macros.conda_macos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/scripts/machines/Macros.conda_linux b/configuration/scripts/machines/Macros.conda_linux index 59a6632d8..32c5ae012 100644 --- a/configuration/scripts/machines/Macros.conda_linux +++ b/configuration/scripts/machines/Macros.conda_linux @@ -40,7 +40,7 @@ LD:= $(FC) MODDIR += -I$(CONDA_PREFIX)/include # Libraries to be passed to the linker -SLIBS := -lnetcdf -lnetcdff +SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff # Necessary flag to compile with OpenMP support ifeq ($(ICE_THREADED), true) diff --git a/configuration/scripts/machines/Macros.conda_macos b/configuration/scripts/machines/Macros.conda_macos index beff37b6c..52bdd469d 100644 --- a/configuration/scripts/machines/Macros.conda_macos +++ b/configuration/scripts/machines/Macros.conda_macos @@ -43,7 +43,7 @@ MODDIR += -I$(CONDA_PREFIX)/include CFLAGS_HOST = -isysroot$(shell xcrun --show-sdk-path) # Libraries to be passed to the linker -SLIBS := -lnetcdf -lnetcdff +SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff # Necessary flag to compile with OpenMP support ifeq ($(ICE_THREADED), true) From 9ac1863e6b346a954d74110474e3b58d0f2345e4 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Mon, 30 Mar 2020 10:19:07 -0700 Subject: [PATCH 6/6] Update travis data download to zenodo, update conda macos Macros file CFLAGS_HOST (#424) * update conda macos Macros file to address older versions of sdk in setting CFLAGS_HOST * update travis data download to zenodo --- .travis.yml | 8 ++++---- configuration/scripts/machines/Macros.conda_macos | 7 ++++++- doc/source/user_guide/ug_running.rst | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9431185a5..bb8dd37b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,12 @@ addons: install: # Fetch CICE grid files and initial conditions - - "wget ftp://ftp.cgd.ucar.edu/archive/Model-Data/CICE/CICE_data_ic_grid.tar.gz && - tar xvfz CICE_data_ic_grid.tar.gz -C ~" + - "wget https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && + tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz -C ~" # Fetch forcing data - - "wget ftp://ftp.cgd.ucar.edu/archive/Model-Data/CICE/CICE_data_forcing_gx3_all.tar.gz && - tar xvfz CICE_data_forcing_gx3_all.tar.gz -C ~" + - "wget https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz && + tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz -C ~" # Mirror entire data folder #- "lftp ftp://anonymous:travis@travis-ci.org@ftp.cgd.ucar.edu diff --git a/configuration/scripts/machines/Macros.conda_macos b/configuration/scripts/machines/Macros.conda_macos index 52bdd469d..0d866d9a2 100644 --- a/configuration/scripts/machines/Macros.conda_macos +++ b/configuration/scripts/machines/Macros.conda_macos @@ -40,7 +40,12 @@ LD:= $(FC) MODDIR += -I$(CONDA_PREFIX)/include # Location of the system C header files (required on recent macOS to compile makdep) -CFLAGS_HOST = -isysroot$(shell xcrun --show-sdk-path) +SDKPATH = $(shell xcrun --show-sdk-path) +ifeq ($(strip $(SDKPATH)),) + CFLAGS_HOST := +else + CFLAGS_HOST = -isysroot $(SDKPATH) +endif # Libraries to be passed to the linker SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff diff --git a/doc/source/user_guide/ug_running.rst b/doc/source/user_guide/ug_running.rst index 30e53f6ab..7d7907998 100644 --- a/doc/source/user_guide/ug_running.rst +++ b/doc/source/user_guide/ug_running.rst @@ -671,7 +671,7 @@ If you prefer that some or all of the CICE directories be located somewhere else Note: if you wish, you can also create a complete machine port for your computer by leveraging the conda configuration as a starting point. See :ref:`porting`. -Next, create the "cice" conda environment from the ``environment.yml`` file: +Next, create the "cice" conda environment from the ``environment.yml`` file in the CICE source code repository. You will need to clone CICE to run the following command: .. code-block:: bash