From 8312c2be4cdd989a9858293c371f0d08afccbfaa Mon Sep 17 00:00:00 2001 From: apcraig Date: Fri, 26 Mar 2021 17:26:00 -0600 Subject: [PATCH 1/9] Update gx1 ic - update set_nml.gx1prod to match current production system - add apr 1 test case for gx1 - update landice tests, use gx1 - fix hmix default #585 - delete old code in ice_forcing.F90 (should have been done in earlier PR) --- cicecore/cicedynB/general/ice_forcing.F90 | 245 +----------------- configuration/scripts/ice_in | 3 + configuration/scripts/options/set_nml.gx1 | 4 +- configuration/scripts/options/set_nml.gx1apr | 5 + configuration/scripts/options/set_nml.gx1prod | 21 +- .../scripts/options/set_nml.seabedLKD | 6 + .../scripts/options/set_nml.seabedprob | 6 + configuration/scripts/tests/base_suite.ts | 5 +- 8 files changed, 42 insertions(+), 253 deletions(-) create mode 100644 configuration/scripts/options/set_nml.gx1apr create mode 100644 configuration/scripts/options/set_nml.seabedLKD create mode 100644 configuration/scripts/options/set_nml.seabedprob diff --git a/cicecore/cicedynB/general/ice_forcing.F90 b/cicecore/cicedynB/general/ice_forcing.F90 index 9c8688763..2a58e0653 100644 --- a/cicecore/cicedynB/general/ice_forcing.F90 +++ b/cicecore/cicedynB/general/ice_forcing.F90 @@ -2668,247 +2668,6 @@ subroutine JRA55_data end subroutine JRA55_data -!======================================================================= - - subroutine Jra55_data_old (yr) - - use ice_blocks, only: block, get_block - use ice_global_reductions, only: global_minval, global_maxval - use ice_domain, only: nblocks, distrb_info, blocks_ice - use ice_flux, only: fsnow, Tair, uatm, vatm, Qa, fsw, flw - use ice_grid, only: hm, tlon, tlat, tmask, umask - use ice_state, only: aice - use ice_calendar, only: days_per_year, use_leap_years - - integer (kind=int_kind), intent(in) :: & - yr ! current forcing year - - integer (kind=int_kind) :: & - ncid , & ! netcdf file id - i, j, n1, iblk, & - yrp , & ! year after yr in forcing cycle - recnum , & ! record number - maxrec , & ! maximum record number - recslot , & ! spline slot for current record - dataloc ! = 1 for data located in middle of time interval - ! = 2 for date located at end of time interval - - real (kind=dbl_kind) :: & - sec3hr , & ! number of seconds in 3 hours - secday , & ! number of seconds in day - eps, tt , & ! interpolation coeff calc - Tffresh , & - vmin, vmax - - logical (kind=log_kind) :: debug_n_d = .false. - - character (char_len_long) :: uwind_file_old - character(len=64) :: fieldname !netcdf field name - character(len=*), parameter :: subname = '(Jra55_data_old)' - - if (forcing_debug .and. my_task == master_task) write(nu_diag,*) subname,'fdbg start' - - call icepack_query_parameters(Tffresh_out=Tffresh) - call icepack_query_parameters(secday_out=secday) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__, line=__LINE__) - - sec3hr = secday/c8 ! seconds in 3 hours - maxrec = days_per_year*8 - - if (debug_n_d .and. my_task == master_task) then - write (nu_diag,*) subname,'recnum',recnum - write (nu_diag,*) subname,'maxrec',maxrec - write (nu_diag,*) subname,'days_per_year', days_per_year - endif - - !------------------------------------------------------------------- - ! 3-hourly data - ! states are instantaneous, 1st record is 00z Jan 1 - ! fluxes are 3 hour averages, 1st record is 00z-03z Jan 1 - ! Both states and fluxes have 1st record defined as 00z Jan 1 - ! interpolate states, do not interpolate fluxes - ! fluxes are held constant from [init period, end period) - !------------------------------------------------------------------- - ! File is NETCDF with winds in NORTH and EAST direction - ! file variable names are: - ! glbrad (shortwave W/m^2) - ! dlwsfc (longwave W/m^2) - ! wndewd (eastward wind m/s) - ! wndnwd (northward wind m/s) - ! airtmp (air temperature K) - ! spchmd (specific humidity kg/kg) - ! ttlpcp (precipitation kg/m s-1) - !------------------------------------------------------------------- - - uwind_file_old = uwind_file - call file_year(uwind_file,yr) - if (uwind_file /= uwind_file_old .and. my_task == master_task) then - write(nu_diag,*) subname,' reading forcing file = ',trim(uwind_file) - endif - - call ice_open_nc(uwind_file,ncid) - - do n1 = 1,2 - - if (n1 == 1) then - recnum = 8*int(yday) - 7 + int(real(msec,kind=dbl_kind)/sec3hr) - if (my_task == master_task .and. (recnum <= 2 .or. recnum >= maxrec-1)) then - write(nu_diag,*) subname,' reading forcing file 1st ts = ',trim(uwind_file) - endif - elseif (n1 == 2) then - recnum = 8*int(yday) - 7 + int(real(msec,kind=dbl_kind)/sec3hr) + 1 - if (recnum > maxrec) then - yrp = fyear_init + mod(myear,ycycle) ! next year - recnum = 1 - call file_year(uwind_file,yrp) - if (my_task == master_task) then - write(nu_diag,*) subname,' reading forcing file 2nd ts = ',trim(uwind_file) - endif - call ice_close_nc(ncid) - call ice_open_nc(uwind_file,ncid) - endif - endif - - if (debug_n_d .and. my_task == master_task) then - write(nu_diag,*) subname,' read recnum = ',recnum,n1 - endif - - fieldname = 'airtmp' - call ice_read_nc(ncid,recnum,fieldname,Tair_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - fieldname = 'wndewd' - call ice_read_nc(ncid,recnum,fieldname,uatm_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - fieldname = 'wndnwd' - call ice_read_nc(ncid,recnum,fieldname,vatm_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - fieldname = 'spchmd' - call ice_read_nc(ncid,recnum,fieldname,Qa_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - ! only read one timestep for fluxes, 3 hr average, no interpolation - if (n1 == 1) then - fieldname = 'glbrad' - call ice_read_nc(ncid,recnum,fieldname,fsw_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - fieldname = 'dlwsfc' - call ice_read_nc(ncid,recnum,fieldname,flw_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - - fieldname = 'ttlpcp' - call ice_read_nc(ncid,recnum,fieldname,fsnow_data(:,:,n1,:),debug_n_d, & - field_loc=field_loc_center, & - field_type=field_type_scalar) - endif - - enddo - - call ice_close_nc(ncid) - - ! reset uwind_file to original year - call file_year(uwind_file,yr) - - ! Compute interpolation coefficients - eps = 1.0e-6 - tt = real(mod(msec,nint(sec3hr)),kind=dbl_kind) - c2intp = tt / sec3hr - if (c2intp < c0 .and. c2intp > c0-eps) c2intp = c0 - if (c2intp > c1 .and. c2intp < c1+eps) c2intp = c1 - c1intp = 1.0_dbl_kind - c2intp - if (c2intp < c0 .or. c2intp > c1) then - write(nu_diag,*) subname,' ERROR: c2intp = ',c2intp - call abort_ice (error_message=subname//' ERROR: c2intp out of range', & - file=__FILE__, line=__LINE__) - endif - if (debug_n_d .and. my_task == master_task) then - write(nu_diag,*) subname,' c12intp = ',c1intp,c2intp - endif - - ! Interpolate - call interpolate_data (Tair_data, Tair) - call interpolate_data (uatm_data, uatm) - call interpolate_data (vatm_data, vatm) - call interpolate_data (Qa_data, Qa) - ! use 3 hr average for heat flux and precip fields - ! call interpolate_data (fsw_data, fsw) - ! call interpolate_data (flw_data, flw) - ! call interpolate_data (fsnow_data, fsnow) - fsw(:,:,:) = fsw_data(:,:,1,:) - flw(:,:,:) = flw_data(:,:,1,:) - fsnow(:,:,:) = fsnow_data(:,:,1,:) - - !$OMP PARALLEL DO PRIVATE(iblk,i,j) - do iblk = 1, nblocks - ! limit summer Tair values where ice is present - do j = 1, ny_block - do i = 1, nx_block - if (aice(i,j,iblk) > p1) Tair(i,j,iblk) = min(Tair(i,j,iblk), Tffresh+p1) - enddo - enddo - - do j = 1, ny_block - do i = 1, nx_block - Qa (i,j,iblk) = Qa (i,j,iblk) * hm(i,j,iblk) - Tair(i,j,iblk) = Tair(i,j,iblk) * hm(i,j,iblk) - uatm(i,j,iblk) = uatm(i,j,iblk) * hm(i,j,iblk) - vatm(i,j,iblk) = vatm(i,j,iblk) * hm(i,j,iblk) - fsw (i,j,iblk) = fsw (i,j,iblk) * hm(i,j,iblk) - flw (i,j,iblk) = flw (i,j,iblk) * hm(i,j,iblk) - fsnow(i,j,iblk) = fsnow (i,j,iblk) * hm(i,j,iblk) - enddo - enddo - - enddo ! iblk - !$OMP END PARALLEL DO - - if (debug_n_d .or. dbug) then - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'JRA55_bulk_data' - vmin = global_minval(fsw,distrb_info,tmask) - vmax = global_maxval(fsw,distrb_info,tmask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'fsw',vmin,vmax - vmin = global_minval(flw,distrb_info,tmask) - vmax = global_maxval(flw,distrb_info,tmask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'flw',vmin,vmax - vmin =global_minval(fsnow,distrb_info,tmask) - vmax =global_maxval(fsnow,distrb_info,tmask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'fsnow',vmin,vmax - vmin = global_minval(Tair,distrb_info,tmask) - vmax = global_maxval(Tair,distrb_info,tmask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'Tair',vmin,vmax - vmin = global_minval(uatm,distrb_info,umask) - vmax = global_maxval(uatm,distrb_info,umask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'uatm',vmin,vmax - vmin = global_minval(vatm,distrb_info,umask) - vmax = global_maxval(vatm,distrb_info,umask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'vatm',vmin,vmax - vmin = global_minval(Qa,distrb_info,tmask) - vmax = global_maxval(Qa,distrb_info,tmask) - if (my_task.eq.master_task) & - write (nu_diag,*) subname,'Qa',vmin,vmax - - endif ! dbug - - end subroutine Jra55_data_old - !======================================================================= ! ! AOMIP shortwave forcing @@ -4394,7 +4153,7 @@ subroutine ocn_data_ncar(dt) do j = 1, ny_block do i = 1, nx_block if (n == 2) sss (i,j,:) = c0 - if (n == 3) hmix (i,j,:) = c0 + if (n == 3) hmix (i,j,:) = c20 if (n == 4) uocn (i,j,:) = c0 if (n == 5) vocn (i,j,:) = c0 if (n == 6) ss_tltx(i,j,:) = c0 @@ -4403,7 +4162,7 @@ subroutine ocn_data_ncar(dt) do iblk = 1, nblocks if (hm(i,j,iblk) == c1) then if (n == 2) sss (i,j,iblk) = work1(i,j,iblk) - if (n == 3) hmix (i,j,iblk) = work1(i,j,iblk) + if (n == 3) hmix (i,j,iblk) = max(c20,work1(i,j,iblk)) if (n == 4) uocn (i,j,iblk) = work1(i,j,iblk) if (n == 5) vocn (i,j,iblk) = work1(i,j,iblk) if (n == 6) ss_tltx(i,j,iblk) = work1(i,j,iblk) diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index 2c9cf948b..8b1359d7e 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -2,6 +2,9 @@ days_per_year = 365 use_leap_years = .false. year_init = 1997 + month_init = 1 + day_init = 1 + sec_init = 0 istep0 = 0 dt = 3600.0 npt_unit = '1' diff --git a/configuration/scripts/options/set_nml.gx1 b/configuration/scripts/options/set_nml.gx1 index e1d18dc8b..fdea5980b 100644 --- a/configuration/scripts/options/set_nml.gx1 +++ b/configuration/scripts/options/set_nml.gx1 @@ -3,7 +3,7 @@ runtype = 'initial' year_init = 2005 use_leap_years = .true. use_restart_time = .false. -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced_gx1_v5.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.2005-01-01-00000.nc' grid_format = 'bin' grid_type = 'displaced_pole' grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/grid_gx1.bin' @@ -17,5 +17,5 @@ atm_data_format = 'nc' atm_data_type = 'JRA55_gx1' atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/JRA55' precip_units = 'mks' -ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/COREII' +ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/CESM/MONTHLY' bgc_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/WOA/MONTHLY' diff --git a/configuration/scripts/options/set_nml.gx1apr b/configuration/scripts/options/set_nml.gx1apr new file mode 100644 index 000000000..f17dbf20e --- /dev/null +++ b/configuration/scripts/options/set_nml.gx1apr @@ -0,0 +1,5 @@ +year_init = 2005 +month_init = 4 +day_init = 1 +sec_init = 0 +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.2005-04-01-00000.nc' diff --git a/configuration/scripts/options/set_nml.gx1prod b/configuration/scripts/options/set_nml.gx1prod index a26af8102..061e284bc 100644 --- a/configuration/scripts/options/set_nml.gx1prod +++ b/configuration/scripts/options/set_nml.gx1prod @@ -1,7 +1,16 @@ -year_init = 1958 -dt = 3600 -npt = 87600 +year_init = 2005 +npt_unit = 'y' +npt = 1 dumpfreq = 'm' -fyear_init = 1958 -ycycle = 52 -ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1' +fyear_init = 2005 +ycycle = 5 +ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/CESM/MONTHLY/' +use_bathymetry = .true. +seabed_stress = .true. +seabed_stress_method = 'LKD' +ocn_data_type = 'ncar' +ocn_data_format = 'nc' +oceanmixed_file = 'ocean_forcing_clim_2D_gx1.nc' +tr_brine = .true. +f_taubx = 'm' +f_tauby = 'm' diff --git a/configuration/scripts/options/set_nml.seabedLKD b/configuration/scripts/options/set_nml.seabedLKD new file mode 100644 index 000000000..b53977d36 --- /dev/null +++ b/configuration/scripts/options/set_nml.seabedLKD @@ -0,0 +1,6 @@ +use_bathymetry = .true. +seabed_stress = .true. +seabed_stress_method = 'LKD' +histfreq = 'm','d','x','x','x' +f_taubx = 'md' +f_tauby = 'md' diff --git a/configuration/scripts/options/set_nml.seabedprob b/configuration/scripts/options/set_nml.seabedprob new file mode 100644 index 000000000..d6ad877ee --- /dev/null +++ b/configuration/scripts/options/set_nml.seabedprob @@ -0,0 +1,6 @@ +use_bathymetry = .true. +seabed_stress = .true. +seabed_stress_method = 'probabilistic' +histfreq = 'm','d','x','x','x' +f_taubx = 'md' +f_tauby = 'md' diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 03389359a..5f56a6619 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -39,8 +39,9 @@ restart gx1 8x1 bgczclim,medium smoke gx1 24x1 medium,run90day,yi2008 smoke gx3 8x1 medium,run90day,yi2008 restart gx1 24x1 short -restart gx1 24x1 short,ml -restart gx3 8x1 short +restart gx1 16x2 seabedLKD,gx1apr,medium +restart gx1 15x2 seabedprob,medium +restart gx1 32x1 gx1prod,medium smoke gx3 4x2 fsd1,diag24,run5day,debug smoke gx3 8x2 fsd12,diag24,run5day,short restart gx3 4x2 fsd12,debug,short From a84a347c074ec2a1fa1a37354bb611c12c81a8cf Mon Sep 17 00:00:00 2001 From: apcraig Date: Sat, 27 Mar 2021 12:44:43 -0600 Subject: [PATCH 2/9] update gx1coreii initial condition --- configuration/scripts/options/set_nml.gx1coreii | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration/scripts/options/set_nml.gx1coreii b/configuration/scripts/options/set_nml.gx1coreii index 44b334194..739e27d4e 100644 --- a/configuration/scripts/options/set_nml.gx1coreii +++ b/configuration/scripts/options/set_nml.gx1coreii @@ -1,6 +1,7 @@ year_init = 1997 use_leap_years = .false. use_restart_time = .true. +ice_ic = '/glade/p/cesm/pcwg_dev/CICE_data/ic/gx1/iced_gx1_v5.nc' fyear_init = 2005 ycycle = 1 atm_data_format = 'bin' From 101e1c161850fb2a45039b3e8885ec8fb9a87478 Mon Sep 17 00:00:00 2001 From: apcraig Date: Sat, 27 Mar 2021 12:47:48 -0600 Subject: [PATCH 3/9] update icepack --- icepack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icepack b/icepack index e8df0ad84..ed0a991e4 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit e8df0ad8469b46b5ac6b32b4b42e52cd7f872a34 +Subproject commit ed0a991e469d77ead6cf8c472c9a9b96bf5c3db7 From c0364f4f6924009f9d949d6c0484e832c1c5a9c6 Mon Sep 17 00:00:00 2001 From: apcraig Date: Sat, 27 Mar 2021 12:50:44 -0600 Subject: [PATCH 4/9] add gx1 debug test, expected to fail --- configuration/scripts/tests/base_suite.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 5f56a6619..bc01ced4e 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -39,6 +39,7 @@ restart gx1 8x1 bgczclim,medium smoke gx1 24x1 medium,run90day,yi2008 smoke gx3 8x1 medium,run90day,yi2008 restart gx1 24x1 short +restart gx1 16x2 seabedLKD,gx1apr,medium,debug restart gx1 16x2 seabedLKD,gx1apr,medium restart gx1 15x2 seabedprob,medium restart gx1 32x1 gx1prod,medium From 270d2bbd34d676867f2a96c7e0699c629cb18e77 Mon Sep 17 00:00:00 2001 From: apcraig Date: Sun, 28 Mar 2021 17:05:55 -0600 Subject: [PATCH 5/9] Update version number to 6.2.0 --- cicecore/version.txt | 2 +- doc/source/conf.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cicecore/version.txt b/cicecore/version.txt index e16cf8bfe..cfd991555 100644 --- a/cicecore/version.txt +++ b/cicecore/version.txt @@ -1 +1 @@ -CICE 6.1.4 +CICE 6.2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index e876980ab..4cf2f580d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -62,9 +62,9 @@ # built documents. # # The short X.Y version. -version = u'6.1.4' +version = u'6.2.0' # The full version, including alpha/beta/rc tags. -version = u'6.1.4' +version = u'6.2.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 4dc3bf15908deffbd68dd400fc0513a6bae7b81f Mon Sep 17 00:00:00 2001 From: apcraig Date: Thu, 1 Apr 2021 12:36:33 -0600 Subject: [PATCH 6/9] Update gx3 and gx1 input filenames Update CI wget implementation #588 Create variable in ice_forcing.F90 called mixed_layer_depth_default and use it instead of c20 Fix bug in hourly output, created in time manager update #589 Set start year for all runs to 2005 and turn leap years on by default Update documentation in history output section to add information about hist_avg namelist, noted in #566 --- .github/workflows/test-cice.yml | 8 ++++---- cicecore/cicedynB/general/ice_forcing.F90 | 9 ++++++--- cicecore/shared/ice_calendar.F90 | 8 ++++++++ configuration/scripts/ice_in | 6 +++--- configuration/scripts/options/set_nml.box2001 | 1 + configuration/scripts/options/set_nml.boxdyn | 1 + configuration/scripts/options/set_nml.gx1 | 2 +- configuration/scripts/options/set_nml.gx1apr | 2 +- configuration/scripts/options/set_nml.gx1prod | 4 +++- configuration/scripts/options/set_nml.gx3sep | 6 ++++++ configuration/scripts/options/set_nml.ml | 2 +- configuration/scripts/tests/base_suite.ts | 2 +- doc/source/user_guide/ug_implementation.rst | 10 ++++++---- 13 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 configuration/scripts/options/set_nml.gx3sep diff --git a/.github/workflows/test-cice.yml b/.github/workflows/test-cice.yml index 1fdd8188d..32e784564 100644 --- a/.github/workflows/test-cice.yml +++ b/.github/workflows/test-cice.yml @@ -17,7 +17,7 @@ on: defaults: run: - shell: /bin/csh {0} + shell: /bin/csh -e {0} jobs: build: @@ -104,9 +104,9 @@ jobs: - name: download input data run: | cd $HOME/cice-dirs/input - 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 - 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 - wget https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz + wget --progress=dot:giga https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz + wget --progress=dot:giga 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 + wget --progress=dot:giga https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz pwd ls -alR # - name: run case diff --git a/cicecore/cicedynB/general/ice_forcing.F90 b/cicecore/cicedynB/general/ice_forcing.F90 index 2a58e0653..c7765e2b9 100644 --- a/cicecore/cicedynB/general/ice_forcing.F90 +++ b/cicecore/cicedynB/general/ice_forcing.F90 @@ -169,6 +169,9 @@ module ice_forcing ! PRIVATE: + real (dbl_kind), parameter :: & + mixed_layer_depth_default = c20 ! default mixed layer depth in m + logical (kind=log_kind), parameter :: & forcing_debug = .false. ! local debug flag @@ -4153,7 +4156,7 @@ subroutine ocn_data_ncar(dt) do j = 1, ny_block do i = 1, nx_block if (n == 2) sss (i,j,:) = c0 - if (n == 3) hmix (i,j,:) = c20 + if (n == 3) hmix (i,j,:) = mixed_layer_depth_default if (n == 4) uocn (i,j,:) = c0 if (n == 5) vocn (i,j,:) = c0 if (n == 6) ss_tltx(i,j,:) = c0 @@ -4162,7 +4165,7 @@ subroutine ocn_data_ncar(dt) do iblk = 1, nblocks if (hm(i,j,iblk) == c1) then if (n == 2) sss (i,j,iblk) = work1(i,j,iblk) - if (n == 3) hmix (i,j,iblk) = max(c20,work1(i,j,iblk)) + if (n == 3) hmix (i,j,iblk) = max(mixed_layer_depth_default,work1(i,j,iblk)) if (n == 4) uocn (i,j,iblk) = work1(i,j,iblk) if (n == 5) vocn (i,j,iblk) = work1(i,j,iblk) if (n == 6) ss_tltx(i,j,iblk) = work1(i,j,iblk) @@ -4277,7 +4280,7 @@ subroutine ocn_data_oned ss_tlty(:,:,:) = c0 frzmlt (:,:,:) = c0 ! freezing/melting potential (W/m^2) qdp (:,:,:) = c0 ! deep ocean heat flux (W/m^2) - hmix (:,:,:) = c20 ! ocean mixed layer depth + hmix (:,:,:) = mixed_layer_depth_default ! ocean mixed layer depth end subroutine ocn_data_oned diff --git a/cicecore/shared/ice_calendar.F90 b/cicecore/shared/ice_calendar.F90 index 622bd8000..8158313d9 100644 --- a/cicecore/shared/ice_calendar.F90 +++ b/cicecore/shared/ice_calendar.F90 @@ -62,6 +62,7 @@ module ice_calendar integer (kind=int_kind), public :: & seconds_per_day , & ! seconds per day + seconds_per_hour , & ! seconds per hour days_per_year , & ! number of days in one year daymo(months_per_year), & ! number of days in each month daycal(months_per_year+1) ! accumulated days in year to end of prior month @@ -169,12 +170,18 @@ subroutine init_calendar write(nu_diag,*) trim(subname),' ERROR secday should basically be an integer',secday call abort_ice(subname//'ERROR: improper secday') endif + seconds_per_hour = nint(secday/real(hours_per_day,kind=dbl_kind)) + if (abs(seconds_per_hour*hours_per_day - seconds_per_day) > 0) then + write(nu_diag,*) trim(subname),' ERROR seconds per day and hours per day inconsistent' + call abort_ice(subname//'ERROR: improper seconds_per_hour') + endif istep = 0 ! local timestep number myear=year_init ! year mmonth=month_init ! month mday=day_init ! day of the month msec=sec_init ! seconds into date + hour=0 ! computed in calendar, but needs some reasonable initial value istep1 = istep0 ! number of steps at current timestep ! real (dumped) or imagined (use to set calendar) idate0 = (myear)*10000 + mmonth*100 + mday ! date (yyyymmdd) @@ -343,6 +350,7 @@ subroutine calendar() idate = (myear)*10000 + mmonth*100 + mday ! date (yyyymmdd) yday = daycal(mmonth) + mday ! day of the year + hour = (msec+1)/(seconds_per_hour) elapsed_months = (myear - year_init)*months_per_year + mmonth - month_init elapsed_days = compute_days_between(year_init,month_init,day_init,myear,mmonth,mday) elapsed_hours = elapsed_days * hours_per_day diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index 8b1359d7e..a2d515800 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -1,7 +1,7 @@ &setup_nml days_per_year = 365 - use_leap_years = .false. - year_init = 1997 + use_leap_years = .true. + year_init = 2005 month_init = 1 day_init = 1 sec_init = 0 @@ -220,7 +220,7 @@ bgc_data_type = 'default' fe_data_type = 'default' ice_data_type = 'default' - fyear_init = 1997 + fyear_init = 2005 ycycle = 1 atm_data_format = 'bin' atm_data_dir = '/glade/u/home/tcraig/cice_data/' diff --git a/configuration/scripts/options/set_nml.box2001 b/configuration/scripts/options/set_nml.box2001 index 79382d84e..84cac67b2 100644 --- a/configuration/scripts/options/set_nml.box2001 +++ b/configuration/scripts/options/set_nml.box2001 @@ -1,4 +1,5 @@ days_per_year = 360 +use_leap_years = .false. npt = 240 ice_ic = 'default' restart = .false. diff --git a/configuration/scripts/options/set_nml.boxdyn b/configuration/scripts/options/set_nml.boxdyn index 72e89db5c..b9bb956fb 100644 --- a/configuration/scripts/options/set_nml.boxdyn +++ b/configuration/scripts/options/set_nml.boxdyn @@ -2,6 +2,7 @@ nilyr = 1 ice_ic = 'default' restart = .false. days_per_year = 360 +use_leap_years = .false. npt = 72 dumpfreq = 'd' dumpfreq_n = 2 diff --git a/configuration/scripts/options/set_nml.gx1 b/configuration/scripts/options/set_nml.gx1 index fdea5980b..be86bf075 100644 --- a/configuration/scripts/options/set_nml.gx1 +++ b/configuration/scripts/options/set_nml.gx1 @@ -3,7 +3,7 @@ runtype = 'initial' year_init = 2005 use_leap_years = .true. use_restart_time = .false. -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.2005-01-01-00000.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.gx1.2005-01-01-00000.210331.nc' grid_format = 'bin' grid_type = 'displaced_pole' grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/grid_gx1.bin' diff --git a/configuration/scripts/options/set_nml.gx1apr b/configuration/scripts/options/set_nml.gx1apr index f17dbf20e..e0763fb66 100644 --- a/configuration/scripts/options/set_nml.gx1apr +++ b/configuration/scripts/options/set_nml.gx1apr @@ -2,4 +2,4 @@ year_init = 2005 month_init = 4 day_init = 1 sec_init = 0 -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.2005-04-01-00000.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.gx1.2005-04-01-00000.210331.nc' diff --git a/configuration/scripts/options/set_nml.gx1prod b/configuration/scripts/options/set_nml.gx1prod index 061e284bc..f725c4367 100644 --- a/configuration/scripts/options/set_nml.gx1prod +++ b/configuration/scripts/options/set_nml.gx1prod @@ -1,4 +1,5 @@ year_init = 2005 +use_leap_years = .true. npt_unit = 'y' npt = 1 dumpfreq = 'm' @@ -10,7 +11,8 @@ seabed_stress = .true. seabed_stress_method = 'LKD' ocn_data_type = 'ncar' ocn_data_format = 'nc' -oceanmixed_file = 'ocean_forcing_clim_2D_gx1.nc' +oceanmixed_ice = .true. +oceanmixed_file = 'ocean_forcing_clim_2D_gx1.20210330.nc' tr_brine = .true. f_taubx = 'm' f_tauby = 'm' diff --git a/configuration/scripts/options/set_nml.gx3sep b/configuration/scripts/options/set_nml.gx3sep new file mode 100644 index 000000000..06b2cb77f --- /dev/null +++ b/configuration/scripts/options/set_nml.gx3sep @@ -0,0 +1,6 @@ +year_init = 2005 +month_init = 9 +day_init = 2 +sec_init = 7200 +use_leap_years = .true. +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx3/iced.2005-09-01-00000.nc' diff --git a/configuration/scripts/options/set_nml.ml b/configuration/scripts/options/set_nml.ml index 57a148fd1..0d00cbd5b 100644 --- a/configuration/scripts/options/set_nml.ml +++ b/configuration/scripts/options/set_nml.ml @@ -3,5 +3,5 @@ oceanmixed_ice = .true. ocn_data_type = 'ncar' ocn_data_format = 'nc' ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/CESM/MONTHLY' -oceanmixed_file = 'ocean_forcing_clim_2D_gx1.nc' +oceanmixed_file = 'ocean_forcing_clim_2D_gx1.20210330.nc' diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index bc01ced4e..9ecb13ecb 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -21,6 +21,7 @@ restart gx3 8x2 alt02,debug,short restart gx3 4x2 alt03,debug,short smoke gx3 4x4 alt04,debug,short smoke gx3 4x4 alt05,debug,short +smoke gx3 10x2 debug,diag1,run5day,gx3sep restart gbox128 4x2 short restart gbox128 4x2 boxdyn,short restart gbox128 4x2 boxdyn,short,debug @@ -40,7 +41,6 @@ smoke gx1 24x1 medium,run90day,yi2008 smoke gx3 8x1 medium,run90day,yi2008 restart gx1 24x1 short restart gx1 16x2 seabedLKD,gx1apr,medium,debug -restart gx1 16x2 seabedLKD,gx1apr,medium restart gx1 15x2 seabedprob,medium restart gx1 32x1 gx1prod,medium smoke gx3 4x2 fsd1,diag24,run5day,debug diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 88afdcf52..0dc950dc9 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -782,7 +782,8 @@ for history and restart files, and history and restart file must use the same io package. The namelist variable ``history_format`` further refines the format approach or style for some io packages. -Model output data is averaged over the period(s) given by ``histfreq`` and +Model output data can be written as instantaneous or average data as specified +by the ``hist_avg`` namelist flag. The data is written at the period(s) given by ``histfreq`` and ``histfreq_n``, and written to binary or netCDF files prepended by ``history_file`` in **ice_in**. These settings for history files are set in the **setup_nml** section of **ice_in** (see :ref:`tabnamelist`). @@ -821,8 +822,8 @@ is now a character string corresponding to ``histfreq`` or ‘x’ for none. files, no matter what the frequency is.) If there are no namelist flags with a given ``histfreq`` value, or if an element of ``histfreq_n`` is 0, then no file will be written at that frequency. The output period can be -discerned from the filenames. Because all history is average output, it's -not possible to write instananeous output at any frequency except every timestep. +discerned from the filenames. All history streams will be either instantaneous +or averaged as specified by the ``hist_avg`` namelist setting. For example, in the namelist: @@ -830,6 +831,7 @@ For example, in the namelist: ``histfreq`` = ’1’, ’h’, ’d’, ’m’, ’y’ ``histfreq_n`` = 1, 6, 0, 1, 1 + ``hist_avg`` = .true. ``f_hi`` = ’1’ ``f_hs`` = ’h’ ``f_Tsfc`` = ’d’ @@ -870,7 +872,7 @@ every 3 months, for example. If ``write_ic`` is set to true in **ice\_in**, a snapshot of the same set of history fields at the start of the run will be written to the history directory in **iceh\_ic.[timeID].nc(da)**. Several history variables are -hard-coded for instantaneous output regardless of the averaging flag, at +hard-coded for instantaneous output regardless of the ``hist_avg`` averaging flag, at the frequency given by their namelist flag. The normalized principal components of internal ice stress are computed From 86a3907d3c495d42939fb7f2aef60be5cda0138d Mon Sep 17 00:00:00 2001 From: apcraig Date: Fri, 2 Apr 2021 14:33:00 -0600 Subject: [PATCH 7/9] update ic filenames, tests, and documentation --- configuration/scripts/options/set_nml.gx1 | 2 +- configuration/scripts/options/set_nml.gx1apr | 2 +- .../{set_nml.gx3sep => set_nml.gx3sep2} | 2 +- configuration/scripts/tests/base_suite.ts | 2 +- doc/source/user_guide/ug_implementation.rst | 18 +++++++++--------- 5 files changed, 13 insertions(+), 13 deletions(-) rename configuration/scripts/options/{set_nml.gx3sep => set_nml.gx3sep2} (56%) diff --git a/configuration/scripts/options/set_nml.gx1 b/configuration/scripts/options/set_nml.gx1 index be86bf075..2e8d4f5b7 100644 --- a/configuration/scripts/options/set_nml.gx1 +++ b/configuration/scripts/options/set_nml.gx1 @@ -3,7 +3,7 @@ runtype = 'initial' year_init = 2005 use_leap_years = .true. use_restart_time = .false. -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.gx1.2005-01-01-00000.210331.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced_gx1_v6.2005-01-01.nc' grid_format = 'bin' grid_type = 'displaced_pole' grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/grid_gx1.bin' diff --git a/configuration/scripts/options/set_nml.gx1apr b/configuration/scripts/options/set_nml.gx1apr index e0763fb66..c150d5815 100644 --- a/configuration/scripts/options/set_nml.gx1apr +++ b/configuration/scripts/options/set_nml.gx1apr @@ -2,4 +2,4 @@ year_init = 2005 month_init = 4 day_init = 1 sec_init = 0 -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced.gx1.2005-04-01-00000.210331.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced_gx1_v6.2005-04-01.nc' diff --git a/configuration/scripts/options/set_nml.gx3sep b/configuration/scripts/options/set_nml.gx3sep2 similarity index 56% rename from configuration/scripts/options/set_nml.gx3sep rename to configuration/scripts/options/set_nml.gx3sep2 index 06b2cb77f..4eeefc64d 100644 --- a/configuration/scripts/options/set_nml.gx3sep +++ b/configuration/scripts/options/set_nml.gx3sep2 @@ -3,4 +3,4 @@ month_init = 9 day_init = 2 sec_init = 7200 use_leap_years = .true. -ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx3/iced.2005-09-01-00000.nc' +ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx3/iced_gx3_v6.2005-09-01.nc' diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 9ecb13ecb..e9985bca5 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -21,7 +21,7 @@ restart gx3 8x2 alt02,debug,short restart gx3 4x2 alt03,debug,short smoke gx3 4x4 alt04,debug,short smoke gx3 4x4 alt05,debug,short -smoke gx3 10x2 debug,diag1,run5day,gx3sep +smoke gx3 10x2 debug,diag1,run5day,gx3sep2 restart gbox128 4x2 short restart gbox128 4x2 boxdyn,short restart gbox128 4x2 boxdyn,short,debug diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 0dc950dc9..dff6f1742 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -829,15 +829,15 @@ For example, in the namelist: :: - ``histfreq`` = ’1’, ’h’, ’d’, ’m’, ’y’ - ``histfreq_n`` = 1, 6, 0, 1, 1 - ``hist_avg`` = .true. - ``f_hi`` = ’1’ - ``f_hs`` = ’h’ - ``f_Tsfc`` = ’d’ - ``f_aice`` = ’m’ - ``f_meltb`` = ’mh’ - ``f_iage`` = ’x’ + histfreq = ’1’, ’h’, ’d’, ’m’, ’y’ + histfreq_n = 1, 6, 0, 1, 1 + hist_avg = .true. + f_hi = ’1’ + f_hs = ’h’ + f_Tsfc = ’d’ + f_aice = ’m’ + f_meltb = ’mh’ + f_iage = ’x’ Here, ``hi`` will be written to a file on every timestep, ``hs`` will be written once every 6 hours, ``aice`` once a month, ``meltb`` once a month AND From dc8aa3231239fae428f2fe9d73231d1475c3ba25 Mon Sep 17 00:00:00 2001 From: apcraig Date: Mon, 5 Apr 2021 21:27:40 -0600 Subject: [PATCH 8/9] update color links in test results wiki --- configuration/scripts/tests/report_results.csh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configuration/scripts/tests/report_results.csh b/configuration/scripts/tests/report_results.csh index 2eb3731d5..e1f3a7342 100755 --- a/configuration/scripts/tests/report_results.csh +++ b/configuration/scripts/tests/report_results.csh @@ -82,11 +82,11 @@ if ("${shrepo}" !~ "*cice-consortium*") then endif set noglob -set green = "\![#00C000](https://placehold.it/15/00C000/000000?text=+)" -set red = "\![#F00000](https://placehold.it/15/F00000/000000?text=+)" -set orange = "\![#FFA500](https://placehold.it/15/FFA500/000000?text=+)" -set yellow = "\![#FFE600](https://placehold.it/15/FFE600/000000?text=+)" -set gray = "\![#AAAAAA](https://placehold.it/15/AAAAAA/000000?text=+)" +set green = "\![#00C000](images/00C000.png)" +set red = "\![#F00000](images/F00000.png)" +set orange = "\![#FFA500](images/FFA500.png)" +set yellow = "\![#FFE600](images/FFE600.png)" +set gray = "\![#AAAAAA](images/AAAAAA.png)" unset noglob #============================================================== From 016f4b7c95584891e29246dd5d83ca6d3713516f Mon Sep 17 00:00:00 2001 From: apcraig Date: Tue, 6 Apr 2021 15:42:20 -0600 Subject: [PATCH 9/9] update hmix initialization --- cicecore/cicedynB/general/ice_forcing.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicecore/cicedynB/general/ice_forcing.F90 b/cicecore/cicedynB/general/ice_forcing.F90 index c7765e2b9..d18b1ccd7 100644 --- a/cicecore/cicedynB/general/ice_forcing.F90 +++ b/cicecore/cicedynB/general/ice_forcing.F90 @@ -4156,7 +4156,7 @@ subroutine ocn_data_ncar(dt) do j = 1, ny_block do i = 1, nx_block if (n == 2) sss (i,j,:) = c0 - if (n == 3) hmix (i,j,:) = mixed_layer_depth_default + if (n == 3) hmix (i,j,:) = c0 if (n == 4) uocn (i,j,:) = c0 if (n == 5) vocn (i,j,:) = c0 if (n == 6) ss_tltx(i,j,:) = c0