diff --git a/.gitmodules b/.gitmodules index 22e452f35..71515ddd8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "icepack"] path = icepack - url = https://github.com/cice-consortium/Icepack + url = https://github.com/E3SM-Project/Icepack.git + branch = cice-consortium/E3SM-icepack-initial-integration diff --git a/cice.setup b/cice.setup index 586fe3464..74648868e 100755 --- a/cice.setup +++ b/cice.setup @@ -1174,7 +1174,7 @@ source ./cice.settings set bldstat = 0 if (\${dobuild} == true) then if (\${doreuse} == true) then - set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}" + set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}.\${ICE_SNICARHC}" ./cice.build --exe \${ciceexe} set bldstat = \${status} if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe} diff --git a/cicecore/cicedynB/general/ice_forcing_bgc.F90 b/cicecore/cicedynB/general/ice_forcing_bgc.F90 index fc440834c..69c3ea311 100644 --- a/cicecore/cicedynB/general/ice_forcing_bgc.F90 +++ b/cicecore/cicedynB/general/ice_forcing_bgc.F90 @@ -17,13 +17,13 @@ module ice_forcing_bgc use ice_calendar, only: dt, istep, msec, mday, mmonth use ice_fileunits, only: nu_diag use ice_arrays_column, only: restore_bgc, & - bgc_data_dir, fe_data_type, optics_file, optics_file_fieldname + bgc_data_dir, fe_data_type use ice_constants, only: c0, p1 use ice_constants, only: field_loc_center, field_type_scalar use ice_exit, only: abort_ice use ice_forcing, only: bgc_data_type use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted - use icepack_intfc, only: icepack_nspint, icepack_max_aero, & + use icepack_intfc, only: icepack_nspint_3bd, icepack_max_aero, & icepack_max_algae, icepack_max_doc, icepack_max_dic use icepack_intfc, only: icepack_query_tracer_flags, & icepack_query_parameters, icepack_query_parameters, & @@ -32,8 +32,7 @@ module ice_forcing_bgc implicit none private public :: get_forcing_bgc, get_atm_bgc, fzaero_data, alloc_forcing_bgc, & - init_bgc_data, faero_data, faero_default, faero_optics, & - fiso_default + init_bgc_data, faero_data, faero_default, fiso_default integer (kind=int_kind) :: & bgcrecnum = 0 ! old record number (save between steps) @@ -840,166 +839,6 @@ subroutine init_bgc_data (fed1,fep1) end subroutine init_bgc_data -!======================================================================= -! -! Aerosol optical properties for bulk and modal aerosol formulation -! X_bc_tab properties are from snicar_optics_5bnd_mam_c140303 (Mark Flanner 2009) -! ==> "Mie optical parameters for CLM snowpack treatment" Includes -! ice (effective radii from 30-1500um), black carbon, organic carbon and dust -! -! authors: Elizabeth Hunke, LANL - - subroutine faero_optics - - use ice_broadcast, only: broadcast_array - use ice_read_write, only: ice_open_nc, ice_close_nc - use ice_communicate, only: my_task, master_task - use ice_arrays_column, only: & - kaer_tab, & ! aerosol mass extinction cross section (m2/kg) - waer_tab, & ! aerosol single scatter albedo (fraction) - gaer_tab, & ! aerosol asymmetry parameter (cos(theta)) - kaer_bc_tab, & ! BC mass extinction cross section (m2/kg) - waer_bc_tab, & ! BC single scatter albedo (fraction) - gaer_bc_tab, & ! BC aerosol asymmetry parameter (cos(theta)) - bcenh ! BC absorption enhancement factor - -#ifdef USE_NETCDF - use netcdf -#endif - - ! local parameters - - logical (kind=log_kind) :: modal_aero - - integer (kind=int_kind) :: & - varid , & ! variable id - status , & ! status output from netcdf routines - n, k ! index - - real (kind=dbl_kind) :: & - amin, amax, asum ! min, max values and sum of input array - - integer (kind=int_kind) :: & - fid ! file id for netCDF file - - character (char_len_long) :: & - fieldname ! field name in netcdf file - - character(len=*), parameter :: subname = '(faero_optics)' - - ! this data is used in bulk aerosol treatment in dEdd radiation - kaer_tab = reshape((/ & ! aerosol mass extinction cross section (m2/kg) - 11580.61872, 5535.41835, 2793.79690, & - 25798.96479, 11536.03871, 4688.24207, & - 196.49772, 204.14078, 214.42287, & - 2665.85867, 2256.71027, 820.36024, & - 840.78295, 1028.24656, 1163.03298, & - 387.51211, 414.68808, 450.29814/), & - (/icepack_nspint,icepack_max_aero/)) - waer_tab = reshape((/ & ! aerosol single scatter albedo (fraction) - 0.29003, 0.17349, 0.06613, & - 0.51731, 0.41609, 0.21324, & - 0.84467, 0.94216, 0.95666, & - 0.97764, 0.99402, 0.98552, & - 0.94146, 0.98527, 0.99093, & - 0.90034, 0.96543, 0.97678/), & - (/icepack_nspint,icepack_max_aero/)) - gaer_tab = reshape((/ & ! aerosol asymmetry parameter (cos(theta)) - 0.35445, 0.19838, 0.08857, & - 0.52581, 0.32384, 0.14970, & - 0.83162, 0.78306, 0.74375, & - 0.68861, 0.70836, 0.54171, & - 0.70239, 0.66115, 0.71983, & - 0.78734, 0.73580, 0.64411/), & - (/icepack_nspint,icepack_max_aero/)) - - ! this data is used in MODAL AEROSOL treatment in dEdd radiation - kaer_bc_tab = reshape((/ & ! aerosol mass extinction cross section (m2/kg) - 12955.44732, 5946.89461, 2772.33366, & - 12085.30664, 7438.83131, 3657.13084, & - 9753.99698, 7342.87139, 4187.79304, & - 7815.74879, 6659.65096, 4337.98863, & - 6381.28194, 5876.78408, 4254.65054, & - 5326.93163, 5156.74532, 4053.66581, & - 4538.09763, 4538.60875, 3804.10884, & - 3934.17604, 4020.20799, 3543.27199, & - 3461.20656, 3587.80962, 3289.98060, & - 3083.03396, 3226.27231, 3052.91441/), & - (/icepack_nspint,10/)) - - waer_bc_tab = reshape((/ & ! aerosol single scatter albedo (fraction) - 0.26107, 0.15861, 0.06535, & - 0.37559, 0.30318, 0.19483, & - 0.42224, 0.36913, 0.27875, & - 0.44777, 0.40503, 0.33026, & - 0.46444, 0.42744, 0.36426, & - 0.47667, 0.44285, 0.38827, & - 0.48635, 0.45428, 0.40617, & - 0.49440, 0.46328, 0.42008, & - 0.50131, 0.47070, 0.43128, & - 0.50736, 0.47704, 0.44056/), & - (/icepack_nspint,10/)) - - gaer_bc_tab = reshape((/ & ! aerosol asymmetry parameter (cos(theta)) - 0.28328, 0.19644, 0.10498, & - 0.44488, 0.32615, 0.19612, & - 0.54724, 0.41611, 0.26390, & - 0.61711, 0.48475, 0.31922, & - 0.66673, 0.53923, 0.36632, & - 0.70296, 0.58337, 0.40732, & - 0.73002, 0.61960, 0.44344, & - 0.75064, 0.64959, 0.47551, & - 0.76663, 0.67461, 0.50415, & - 0.77926, 0.69561, 0.52981/),& - (/icepack_nspint,10/)) - - bcenh(:,:,:) = c0 - - call icepack_query_parameters(modal_aero_out=modal_aero) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__, line=__LINE__) - - if (modal_aero) then -#ifdef USE_NETCDF - if (my_task == master_task) then - write (nu_diag,*) ' ' - write (nu_diag,*) 'Read optics for modal aerosol treament in' - write (nu_diag,*) trim(optics_file) - write (nu_diag,*) 'Read optics file field name = ',trim(optics_file_fieldname) - call ice_open_nc(optics_file,fid) - - fieldname=optics_file_fieldname - - status = nf90_inq_varid(fid, trim(fieldname), varid) - - if (status /= nf90_noerr) then - call abort_ice (subname//'ERROR: Cannot find variable '//trim(fieldname)) - endif - status = nf90_get_var( fid, varid, bcenh, & - start=(/1,1,1,1/), & - count=(/3,10,8,1/) ) - do n=1,10 - amin = minval(bcenh(:,n,:)) - amax = maxval(bcenh(:,n,:)) - asum = sum (bcenh(:,n,:)) - write(nu_diag,*) ' min, max, sum =', amin, amax, asum - enddo - call ice_close_nc(fid) - endif !master_task - do n=1,3 - do k=1,8 - call broadcast_array(bcenh(n,:,k), master_task) - enddo - enddo -#else - call abort_ice(subname//'ERROR: USE_NETCDF cpp not defined', & - file=__FILE__, line=__LINE__) -#endif - endif ! modal_aero - - end subroutine faero_optics - !======================================================================= end module ice_forcing_bgc diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index c2cc986f8..ae512a4eb 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -158,7 +158,7 @@ subroutine input_data character (len=char_len) :: shortwave, albedo_type, conduct, fbot_xfer_type, & tfrz_option, frzpnd, atmbndy, wave_spec_type, snwredist, snw_aging_table, & - capping_method + capping_method, snw_ssp_table logical (kind=log_kind) :: calc_Tsfc, formdrag, highfreq, calc_strair, wave_spec, & sw_redist, calc_dragio, use_smliq_pnd, snwgrain @@ -255,7 +255,7 @@ subroutine input_data Cf, Pstar, Cstar, Ktens namelist /shortwave_nml/ & - shortwave, albedo_type, & + shortwave, albedo_type, snw_ssp_table, & albicev, albicei, albsnowv, albsnowi, & ahmax, R_ice, R_pnd, R_snw, & sw_redist, sw_frac, sw_dtemp, & @@ -437,6 +437,7 @@ subroutine input_data advection = 'remap' ! incremental remapping transport scheme conserv_check = .false. ! tracer conservation check shortwave = 'ccsm3' ! 'ccsm3' or 'dEdd' (delta-Eddington) + snw_ssp_table = 'test' ! 'test' or 'snicar' dEdd_snicar_ad table data albedo_type = 'ccsm3' ! 'ccsm3' or 'constant' #ifdef UNDEPRECATE_0LAYER ktherm = 1 ! -1 = OFF, 0 = 0-layer, 1 = BL99, 2 = mushy thermo @@ -902,6 +903,7 @@ subroutine input_data call broadcast_scalar(advection, master_task) call broadcast_scalar(conserv_check, master_task) call broadcast_scalar(shortwave, master_task) + call broadcast_scalar(snw_ssp_table, master_task) call broadcast_scalar(albedo_type, master_task) call broadcast_scalar(ktherm, master_task) call broadcast_scalar(coriolis, master_task) @@ -1188,7 +1190,7 @@ subroutine input_data write(nu_diag,*) subname//' ERROR: invalid seabed stress method' write(nu_diag,*) subname//' ERROR: seabed_stress_method should be LKD or probabilistic' endif - abort_list = trim(abort_list)//":34" + abort_list = trim(abort_list)//":48" endif endif @@ -1283,10 +1285,10 @@ subroutine input_data abort_list = trim(abort_list)//":7" endif - if (trim(shortwave) /= 'dEdd' .and. tr_pond .and. calc_tsfc) then + if (shortwave(1:4) /= 'dEdd' .and. tr_pond .and. calc_tsfc) then if (my_task == master_task) then write(nu_diag,*) subname//' ERROR: tr_pond=T, calc_tsfc=T, invalid shortwave' - write(nu_diag,*) subname//' ERROR: Must use shortwave=dEdd' + write(nu_diag,*) subname//' ERROR: Must use shortwave=dEdd or dEdd_snicar_ad' endif abort_list = trim(abort_list)//":8" endif @@ -1399,19 +1401,20 @@ subroutine input_data abort_list = trim(abort_list)//":36" endif - if (trim(shortwave) /= 'dEdd' .and. tr_aero) then + if (shortwave(1:4) /= 'dEdd' .and. tr_aero) then if (my_task == master_task) then write(nu_diag,*) subname//' ERROR: tr_aero=T, invalid shortwave' - write(nu_diag,*) subname//' ERROR: Must use shortwave=dEdd' + write(nu_diag,*) subname//' ERROR: Must use shortwave=dEdd or dEdd_snicar_ad' endif abort_list = trim(abort_list)//":10" endif - if (trim(shortwave) /= 'dEdd' .and. snwgrain) then + if (shortwave(1:4) /= 'dEdd' .and. snwgrain) then if (my_task == master_task) then - write (nu_diag,*) 'WARNING: snow grain radius activated but' - write (nu_diag,*) 'WARNING: dEdd shortwave is not.' + write (nu_diag,*) subname//' ERROR: snow grain radius is activated' + write (nu_diag,*) subname//' ERROR: Must use shortwave=dEdd or dEdd_snicar_ad' endif + abort_list = trim(abort_list)//":29" endif if ((rfracmin < -puny .or. rfracmin > c1+puny) .or. & @@ -1689,7 +1692,7 @@ subroutine input_data write(nu_diag,1020) ' nilyr = ', nilyr, ' : number of ice layers (equal thickness)' write(nu_diag,1020) ' nslyr = ', nslyr, ' : number of snow layers (equal thickness)' write(nu_diag,1020) ' nblyr = ', nblyr, ' : number of bio layers (equal thickness)' - if (trim(shortwave) == 'dEdd') & + if (shortwave(1:4) == 'dEdd') & write(nu_diag,*) 'dEdd interior and sfc scattering layers are used in both ice, snow (unequal)' write(nu_diag,1020) ' ncat = ', ncat, ' : number of ice categories' if (kcatbound == 0) then @@ -1937,19 +1940,24 @@ subroutine input_data write(nu_diag,*) '--------------------------------' if (trim(shortwave) == 'dEdd') then tmpstr2 = ' : delta-Eddington multiple-scattering method' + elseif (trim(shortwave) == 'dEdd_snicar_ad') then + tmpstr2 = ' : delta-Eddington multiple-scattering method with SNICAR AD' elseif (trim(shortwave) == 'ccsm3') then tmpstr2 = ' : NCAR CCSM3 distribution method' else tmpstr2 = ' : unknown value' endif write(nu_diag,1030) ' shortwave = ', trim(shortwave),trim(tmpstr2) - if (trim(shortwave) == 'dEdd') then + if (shortwave(1:4) == 'dEdd') then write(nu_diag,1002) ' R_ice = ', R_ice,' : tuning parameter for sea ice albedo' write(nu_diag,1002) ' R_pnd = ', R_pnd,' : tuning parameter for ponded sea ice albedo' write(nu_diag,1002) ' R_snw = ', R_snw,' : tuning parameter for snow broadband albedo' write(nu_diag,1002) ' dT_mlt = ', dT_mlt,' : change in temperature per change in snow grain radius' write(nu_diag,1002) ' rsnw_mlt = ', rsnw_mlt,' : maximum melting snow grain radius' write(nu_diag,1002) ' kalg = ', kalg,' : absorption coefficient for algae' + if (trim(shortwave) == 'dEdd_snicar_ad') then + write(nu_diag,1030) ' snw_ssp_table = ', trim(snw_ssp_table) + endif else if (trim(albedo_type) == 'ccsm3') then tmpstr2 = ' : NCAR CCSM3 albedos' @@ -2120,7 +2128,7 @@ subroutine input_data write(nu_diag,*) 'Using default dEdd melt pond scheme for testing only' endif - if (trim(shortwave) == 'dEdd') then + if (shortwave(1:4) == 'dEdd') then write(nu_diag,1002) ' hs0 = ', hs0,' : snow depth of transition to bare sea ice' endif @@ -2415,7 +2423,7 @@ subroutine input_data call icepack_init_parameters(ustar_min_in=ustar_min, albicev_in=albicev, albicei_in=albicei, & albsnowv_in=albsnowv, albsnowi_in=albsnowi, natmiter_in=natmiter, atmiter_conv_in=atmiter_conv, & - emissivity_in=emissivity, & + emissivity_in=emissivity, snw_ssp_table_in=snw_ssp_table, & ahmax_in=ahmax, shortwave_in=shortwave, albedo_type_in=albedo_type, R_ice_in=R_ice, R_pnd_in=R_pnd, & R_snw_in=R_snw, dT_mlt_in=dT_mlt, rsnw_mlt_in=rsnw_mlt, & kstrength_in=kstrength, krdg_partic_in=krdg_partic, krdg_redist_in=krdg_redist, mu_rdg_in=mu_rdg, & diff --git a/cicecore/cicedynB/general/ice_step_mod.F90 b/cicecore/cicedynB/general/ice_step_mod.F90 index b6f8741c0..6c9ca8a8b 100644 --- a/cicecore/cicedynB/general/ice_step_mod.F90 +++ b/cicecore/cicedynB/general/ice_step_mod.F90 @@ -146,8 +146,7 @@ subroutine prep_radiation (iblk) alidr_init(i,j,iblk) = alidr_ai(i,j,iblk) alidf_init(i,j,iblk) = alidf_ai(i,j,iblk) - call icepack_prep_radiation (ncat=ncat, nilyr=nilyr, nslyr=nslyr, & - scale_factor=scale_factor(i,j,iblk), & + call icepack_prep_radiation (scale_factor=scale_factor(i,j,iblk), & aice = aice (i,j, iblk), aicen = aicen (i,j, :,iblk), & swvdr = swvdr (i,j, iblk), swvdf = swvdf (i,j, iblk), & swidr = swidr (i,j, iblk), swidf = swidf (i,j, iblk), & @@ -1223,8 +1222,7 @@ subroutine step_radiation (dt, iblk) fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, & albicen, albsnon, albpndn, & alvdrn, alidrn, alvdfn, alidfn, apeffn, trcrn_sw, snowfracn, & - kaer_tab, waer_tab, gaer_tab, kaer_bc_tab, waer_bc_tab, & - gaer_bc_tab, bcenh, swgrid, igrid + swgrid, igrid use ice_blocks, only: block, get_block use ice_calendar, only: calendar_type, days_per_year, nextsw_cday, yday, msec use ice_domain, only: blocks_ice @@ -1333,9 +1331,7 @@ subroutine step_radiation (dt, iblk) if (tmask(i,j,iblk)) then - call icepack_step_radiation (dt=dt, ncat=ncat, & - nblyr=nblyr, nilyr=nilyr, nslyr=nslyr, & - dEdd_algae=dEdd_algae, & + call icepack_step_radiation (dt=dt, & swgrid=swgrid(:), igrid=igrid(:), & fbri=fbri(:), & aicen=aicen(i,j, :,iblk), & @@ -1355,11 +1351,6 @@ subroutine step_radiation (dt, iblk) days_per_year=days_per_year, & nextsw_cday=nextsw_cday, yday=yday, & sec=msec, & - kaer_tab=kaer_tab, kaer_bc_tab=kaer_bc_tab(:,:), & - waer_tab=waer_tab, waer_bc_tab=waer_bc_tab(:,:), & - gaer_tab=gaer_tab, gaer_bc_tab=gaer_bc_tab(:,:), & - bcenh=bcenh(:,:,:), & - modal_aero=modal_aero, & swvdr =swvdr (i,j ,iblk), swvdf =swvdf (i,j ,iblk), & swidr =swidr (i,j ,iblk), swidf =swidf (i,j ,iblk), & coszen =coszen (i,j ,iblk), fsnow =fsnow (i,j ,iblk), & diff --git a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 index 87dc8d9a1..b932b8c45 100644 --- a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 +++ b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 @@ -18,7 +18,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_configure + use icepack_intfc, only: icepack_configure, icepack_init_radiation use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & icepack_query_tracer_indices, icepack_query_tracer_sizes @@ -78,7 +78,7 @@ subroutine cice_init use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, alloc_forcing, get_wave_spec use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_data, faero_default, faero_optics, alloc_forcing_bgc + faero_data, faero_default, alloc_forcing_bgc use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runid, runtype @@ -170,15 +170,13 @@ subroutine cice_init call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(subname, & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 b/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 index 87dc8d9a1..b932b8c45 100644 --- a/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 +++ b/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 @@ -18,7 +18,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_configure + use icepack_intfc, only: icepack_configure, icepack_init_radiation use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & icepack_query_tracer_indices, icepack_query_tracer_sizes @@ -78,7 +78,7 @@ subroutine cice_init use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, alloc_forcing, get_wave_spec use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_data, faero_default, faero_optics, alloc_forcing_bgc + faero_data, faero_default, alloc_forcing_bgc use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runid, runtype @@ -170,15 +170,13 @@ subroutine cice_init call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(subname, & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 index cfc5bece9..10f855b85 100644 --- a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 +++ b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 @@ -19,7 +19,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_init_snow + use icepack_intfc, only: icepack_init_snow, icepack_init_radiation use icepack_intfc, only: icepack_configure use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & @@ -80,7 +80,7 @@ subroutine cice_init(mpicom_ice) use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, get_wave_spec, init_snowtable use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_default, faero_optics, alloc_forcing_bgc, fiso_default + faero_default, alloc_forcing_bgc, fiso_default use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runtype @@ -186,6 +186,7 @@ subroutine cice_init(mpicom_ice) call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso, tr_snow_out=tr_snow) @@ -193,9 +194,6 @@ subroutine cice_init(mpicom_ice) if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 index f9b5116d0..0b1b72b1c 100644 --- a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 @@ -8,7 +8,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_init_snow + use icepack_intfc, only: icepack_init_snow, icepack_init_radiation use icepack_intfc, only: icepack_configure use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags @@ -86,7 +86,7 @@ subroutine cice_init2() use ice_flux , only: init_history_dyn, init_flux_atm, init_flux_ocn use ice_forcing , only: init_snowtable use ice_forcing_bgc , only: get_forcing_bgc, get_atm_bgc - use ice_forcing_bgc , only: faero_default, faero_optics, alloc_forcing_bgc, fiso_default + use ice_forcing_bgc , only: faero_default, alloc_forcing_bgc, fiso_default use ice_history , only: init_hist, accum_hist use ice_restart_shared , only: restart, runtype use ice_init , only: input_data, init_state @@ -155,6 +155,7 @@ subroutine cice_init2() call init_diags ! initialize diagnostic output points call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso, tr_snow_out=tr_snow) @@ -162,10 +163,6 @@ subroutine cice_init2() if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) then - call faero_optics !initialize aerosol optical property tables - end if - ! snow aging lookup table initialization if (tr_snow) then ! advanced snow physics call icepack_init_snow() diff --git a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 index 78d462d4c..b0033c5aa 100644 --- a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 @@ -18,7 +18,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_init_snow + use icepack_intfc, only: icepack_init_snow, icepack_init_radiation use icepack_intfc, only: icepack_configure use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & @@ -84,7 +84,7 @@ subroutine cice_init(mpi_comm) use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, get_wave_spec, init_snowtable use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_default, faero_optics, alloc_forcing_bgc, fiso_default + faero_default, alloc_forcing_bgc, fiso_default use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runtype @@ -189,6 +189,7 @@ subroutine cice_init(mpi_comm) call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso, tr_snow_out=tr_snow) @@ -196,9 +197,6 @@ subroutine cice_init(mpi_comm) if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 index 07a151a01..0ddd3c0f8 100644 --- a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 +++ b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 @@ -19,7 +19,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_init_snow + use icepack_intfc, only: icepack_init_snow, icepack_init_radiation use icepack_intfc, only: icepack_configure use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & @@ -80,7 +80,7 @@ subroutine cice_init use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, get_wave_spec, init_snowtable use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_default, faero_optics, alloc_forcing_bgc, fiso_default + faero_default, alloc_forcing_bgc, fiso_default use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runtype @@ -183,6 +183,7 @@ subroutine cice_init call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso, tr_snow_out=tr_snow) @@ -190,9 +191,6 @@ subroutine cice_init if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 index ad355d783..6963aaf3f 100644 --- a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 @@ -18,7 +18,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_configure + use icepack_intfc, only: icepack_configure, icepack_init_radiation use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & icepack_query_tracer_indices, icepack_query_tracer_sizes @@ -78,7 +78,7 @@ subroutine cice_init use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, get_wave_spec use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_default, faero_optics, alloc_forcing_bgc, fiso_default + faero_default, alloc_forcing_bgc, fiso_default use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runtype @@ -174,6 +174,7 @@ subroutine cice_init call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso) @@ -181,9 +182,6 @@ subroutine cice_init if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 index ad355d783..6963aaf3f 100644 --- a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 @@ -18,7 +18,7 @@ module CICE_InitMod use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave - use icepack_intfc, only: icepack_configure + use icepack_intfc, only: icepack_configure, icepack_init_radiation use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & icepack_query_tracer_indices, icepack_query_tracer_sizes @@ -78,7 +78,7 @@ subroutine cice_init use ice_forcing, only: init_forcing_ocn, init_forcing_atmo, & get_forcing_atmo, get_forcing_ocn, get_wave_spec use ice_forcing_bgc, only: get_forcing_bgc, get_atm_bgc, & - faero_default, faero_optics, alloc_forcing_bgc, fiso_default + faero_default, alloc_forcing_bgc, fiso_default use ice_grid, only: init_grid1, init_grid2, alloc_grid use ice_history, only: init_hist, accum_hist use ice_restart_shared, only: restart, runtype @@ -174,6 +174,7 @@ subroutine cice_init call init_history_therm ! initialize thermo history variables call init_history_dyn ! initialize dynamic history variables call calc_timesteps ! update timestep counter if not using npt_unit="1" + call icepack_init_radiation ! initialize icepack shortwave tables call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero) call icepack_query_tracer_flags(tr_iso_out=tr_iso) @@ -181,9 +182,6 @@ subroutine cice_init if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - if (tr_aero .or. tr_zaero) call faero_optics !initialize aerosol optical - !property tables - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. diff --git a/cicecore/shared/ice_arrays_column.F90 b/cicecore/shared/ice_arrays_column.F90 index c9e8be8db..b636b2a00 100644 --- a/cicecore/shared/ice_arrays_column.F90 +++ b/cicecore/shared/ice_arrays_column.F90 @@ -13,7 +13,7 @@ module ice_arrays_column use ice_blocks, only: nx_block, ny_block use ice_domain_size, only: max_blocks, ncat, nilyr, nslyr, & nblyr, nfsd, nfreq - use icepack_intfc, only: icepack_nspint + use icepack_intfc, only: icepack_nspint_3bd use icepack_intfc, only: icepack_query_tracer_sizes, icepack_query_parameters, & icepack_query_tracer_flags, & icepack_warnings_flush, icepack_warnings_aborted, icepack_query_tracer_sizes @@ -125,22 +125,6 @@ module ice_arrays_column public :: & fswpenln ! visible SW entering ice layers (W m-2) - ! aerosol optical properties -> band | - ! v aerosol - ! for combined dust category, use category 4 properties - real (kind=dbl_kind), dimension(:,:), allocatable, public :: & - kaer_tab, & ! aerosol mass extinction cross section (m2/kg) - waer_tab, & ! aerosol single scatter albedo (fraction) - gaer_tab ! aerosol asymmetry parameter (cos(theta)) - - real (kind=dbl_kind), dimension(:,:), allocatable, public :: & - kaer_bc_tab, & ! BC mass extinction cross section (m2/kg) - waer_bc_tab, & ! BC single scatter albedo (fraction) - gaer_bc_tab ! BC aerosol asymmetry parameter (cos(theta)) - - real (kind=dbl_kind), dimension(:,:,:), allocatable, public :: & - bcenh ! BC absorption enhancement factor - ! biogeochemistry components real (kind=dbl_kind), dimension (:), allocatable, public :: & @@ -276,10 +260,6 @@ module ice_arrays_column character(char_len_long), public :: & bgc_data_dir ! directory for biogeochemistry data - character(char_len_long), public :: & - optics_file, & ! modal aero optics file - optics_file_fieldname ! modal aero optics file fieldname - real (kind=dbl_kind), dimension(:), allocatable, public :: & R_C2N_DON ! carbon to nitrogen mole ratio of DON pool @@ -426,17 +406,6 @@ subroutine alloc_arrays_column stat=ierr) if (ierr/=0) call abort_ice(subname//' Out of Memory3') - allocate( & - kaer_tab(icepack_nspint,max_aero), & ! aerosol mass extinction cross section (m2/kg) - waer_tab(icepack_nspint,max_aero), & ! aerosol single scatter albedo (fraction) - gaer_tab(icepack_nspint,max_aero), & ! aerosol asymmetry parameter (cos(theta)) - kaer_bc_tab(icepack_nspint,nmodal1), & ! BC mass extinction cross section (m2/kg) - waer_bc_tab(icepack_nspint,nmodal1), & ! BC single scatter albedo (fraction) - gaer_bc_tab(icepack_nspint,nmodal1), & ! BC aerosol asymmetry parameter (cos(theta)) - bcenh(icepack_nspint,nmodal1,nmodal2), & ! BC absorption enhancement factor - stat=ierr) - if (ierr/=0) call abort_ice(subname//' Out of Memory4') - ! floe size distribution allocate( & floe_rad_l (nfsd) , & ! fsd size lower bound in m (radius) diff --git a/cicecore/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index 5339aa6ec..d73eee12f 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/ice_init_column.F90 @@ -188,7 +188,6 @@ subroutine init_shortwave albsnon, alvdrn, alidrn, alvdfn, alidfn, fswsfcn, & fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, & fswintn, albpndn, apeffn, trcrn_sw, dhsn, ffracn, snowfracn, & - kaer_tab, waer_tab, gaer_tab, kaer_bc_tab, waer_bc_tab, gaer_bc_tab, bcenh, & swgrid, igrid use ice_blocks, only: block, get_block use ice_calendar, only: dt, calendar_type, & @@ -324,7 +323,7 @@ subroutine init_shortwave do j = jlo, jhi do i = ilo, ihi - if (trim(shortwave) == 'dEdd') then ! delta Eddington + if (shortwave(1:4) == 'dEdd') then ! delta Eddington #ifndef CESMCOUPLED ! initialize orbital parameters @@ -349,9 +348,7 @@ subroutine init_shortwave enddo if (tmask(i,j,iblk)) then - call icepack_step_radiation (dt=dt, ncat=ncat, & - nblyr=nblyr, nilyr=nilyr, nslyr=nslyr, & - dEdd_algae=dEdd_algae, & + call icepack_step_radiation (dt=dt, & swgrid=swgrid(:), igrid=igrid(:), & fbri=fbri(:), & aicen=aicen(i,j,:,iblk), & @@ -371,11 +368,6 @@ subroutine init_shortwave days_per_year=days_per_year, & nextsw_cday=nextsw_cday, yday=yday, & sec=msec, & - kaer_tab=kaer_tab, kaer_bc_tab=kaer_bc_tab(:,:), & - waer_tab=waer_tab, waer_bc_tab=waer_bc_tab(:,:), & - gaer_tab=gaer_tab, gaer_bc_tab=gaer_bc_tab(:,:), & - bcenh=bcenh(:,:,:), & - modal_aero=modal_aero, & swvdr=swvdr(i,j,iblk), swvdf=swvdf(i,j,iblk),& swidr=swidr(i,j,iblk), swidf=swidf(i,j,iblk),& coszen=coszen(i,j,iblk), fsnow=fsnow(i,j,iblk),& @@ -1044,7 +1036,7 @@ end subroutine init_hbrine subroutine input_zbgc - use ice_arrays_column, only: restore_bgc, optics_file, optics_file_fieldname + use ice_arrays_column, only: restore_bgc use ice_broadcast, only: broadcast_scalar use ice_restart_column, only: restart_bgc, restart_zsal, & restart_hbrine @@ -1087,7 +1079,7 @@ subroutine input_zbgc restore_bgc, restart_bgc, scale_bgc, solve_zsal, restart_zsal, & tr_bgc_Nit, tr_bgc_C, tr_bgc_chl, tr_bgc_Am, tr_bgc_Sil, & tr_bgc_DMS, tr_bgc_PON, tr_bgc_hum, tr_bgc_DON, tr_bgc_Fe, & - grid_o, grid_o_t, l_sk, grid_oS, optics_file, optics_file_fieldname, & + grid_o, grid_o_t, l_sk, grid_oS, & l_skS, phi_snow, initbio_frac, frazil_scav, & ratio_Si2N_diatoms , ratio_Si2N_sp , ratio_Si2N_phaeo , & ratio_S2N_diatoms , ratio_S2N_sp , ratio_S2N_phaeo , & @@ -1144,8 +1136,6 @@ subroutine input_zbgc tr_brine = .false. ! brine height differs from ice height tr_zaero = .false. ! z aerosol tracers modal_aero = .false. ! use modal aerosol treatment of aerosols - optics_file = 'unknown_optics_file' ! modal aerosol optics file - optics_file_fieldname = 'unknown_optics_fieldname' ! modal aerosol optics file fieldname restore_bgc = .false. ! restore bgc if true solve_zsal = .false. ! update salinity tracer profile from solve_S_dt restart_bgc = .false. ! biogeochemistry restart @@ -1363,8 +1353,6 @@ subroutine input_zbgc call broadcast_scalar(tr_zaero, master_task) call broadcast_scalar(dEdd_algae, master_task) call broadcast_scalar(modal_aero, master_task) - call broadcast_scalar(optics_file, master_task) - call broadcast_scalar(optics_file_fieldname, master_task) call broadcast_scalar(grid_o, master_task) call broadcast_scalar(grid_o_t, master_task) call broadcast_scalar(l_sk, master_task) @@ -1552,9 +1540,9 @@ subroutine input_zbgc abort_flag = 107 endif - if (dEdd_algae .AND. trim(shortwave) /= 'dEdd') then + if (dEdd_algae .AND. shortwave(1:4) /= 'dEdd') then if (my_task == master_task) then - write(nu_diag,*) subname,' ERROR: dEdd_algae = T but shortwave /= dEdd' + write(nu_diag,*) subname,' ERROR: dEdd_algae = T but shortwave /= dEdd or dEdd_snicar_ad' endif abort_flag = 108 endif @@ -1573,9 +1561,9 @@ subroutine input_zbgc abort_flag = 110 endif - if (modal_aero .AND. trim(shortwave) /= 'dEdd') then + if (modal_aero .AND. shortwave(1:4) /= 'dEdd') then if (my_task == master_task) then - write(nu_diag,*) subname,' ERROR: modal_aero = T but shortwave /= dEdd' + write(nu_diag,*) subname,' ERROR: modal_aero = T but shortwave /= dEdd or dEdd_snicar_ad' endif abort_flag = 111 endif @@ -1734,8 +1722,6 @@ subroutine input_zbgc write(nu_diag,1010) ' solve_zbgc = ', solve_zbgc write(nu_diag,1010) ' tr_zaero = ', tr_zaero write(nu_diag,1020) ' number of aerosols = ', n_zaero - write(nu_diag,1031) ' optics_file = ', trim(optics_file) - write(nu_diag,1031) ' optics_file_fieldname = ', trim(optics_file_fieldname) ! bio parameters write(nu_diag,1000) ' grid_o = ', grid_o write(nu_diag,1000) ' grid_o_t = ', grid_o_t diff --git a/configuration/scripts/cice.build b/configuration/scripts/cice.build index d75d74253..dcb6c19e8 100755 --- a/configuration/scripts/cice.build +++ b/configuration/scripts/cice.build @@ -124,6 +124,9 @@ else if (${ICE_IOTYPE} =~ pio*) then else set IODIR = io_binary endif +if (${ICE_SNICARHC} == 'true') then + setenv ICE_CPPDEFS "${ICE_CPPDEFS} -DUSE_SNICARHC" +endif ### List of source code directories (in order of importance). cat >! Filepath << EOF diff --git a/configuration/scripts/cice.settings b/configuration/scripts/cice.settings index 76ae6ad9e..ee4709940 100644 --- a/configuration/scripts/cice.settings +++ b/configuration/scripts/cice.settings @@ -44,6 +44,7 @@ setenv ICE_COMMDIR mpi if (${ICE_NTASKS} == 1) setenv ICE_COMMDIR serial ### Specialty code +setenv ICE_SNICARHC false # compile with big hardcoded snicar table setenv ICE_BLDDEBUG false # build debug flags setenv ICE_COVERAGE false # build coverage flags diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index ec582873a..7bfb490ee 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -181,6 +181,7 @@ &shortwave_nml shortwave = 'dEdd' + snw_ssp_table = 'test' albedo_type = 'ccsm3' albicev = 0.78 albicei = 0.36 @@ -301,8 +302,6 @@ restart_hbrine = .false. tr_zaero = .false. modal_aero = .false. - optics_file = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/snicar_optics_5bnd_snow_and_aerosols.nc' - optics_file_fieldname = 'modalBCabsorptionParameter5band' skl_bgc = .false. z_tracers = .false. dEdd_algae = .false. diff --git a/configuration/scripts/options/set_env.snicar b/configuration/scripts/options/set_env.snicar new file mode 100644 index 000000000..91c70cb4b --- /dev/null +++ b/configuration/scripts/options/set_env.snicar @@ -0,0 +1 @@ +setenv ICE_SNICARHC true diff --git a/configuration/scripts/options/set_nml.bgczm b/configuration/scripts/options/set_nml.bgczm new file mode 100644 index 000000000..2644576cd --- /dev/null +++ b/configuration/scripts/options/set_nml.bgczm @@ -0,0 +1,30 @@ +nilyr = 7 +nslyr = 1 +ncat = 5 +nblyr = 7 +n_aero = 0 +n_zaero = 3 +n_algae = 3 +n_doc = 2 +n_dic = 0 +n_don = 1 +n_fed = 1 +n_fep = 1 +ice_ic = 'none' +tr_brine = .true. +tr_zaero = .true. +z_tracers = .true. +solve_zbgc = .true. +scale_bgc = .true. +bgc_data_type = 'default' +tr_bgc_Nit = .true. +tr_bgc_C = .true. +tr_bgc_Am = .true. +tr_bgc_Sil = .true. +tr_bgc_DMS = .true. +tr_bgc_PON = .true. +tr_bgc_hum = .true. +tr_bgc_DON = .true. +tr_bgc_Fe = .true. +modal_aero = .true. +# dEdd_algae = .true. diff --git a/configuration/scripts/options/set_nml.modal b/configuration/scripts/options/set_nml.modal new file mode 100644 index 000000000..767160a53 --- /dev/null +++ b/configuration/scripts/options/set_nml.modal @@ -0,0 +1,4 @@ +shortwave = 'dEdd' +tr_aero = .true. +modal_aero = .true. + diff --git a/configuration/scripts/options/set_nml.snicar b/configuration/scripts/options/set_nml.snicar new file mode 100644 index 000000000..5fab713c4 --- /dev/null +++ b/configuration/scripts/options/set_nml.snicar @@ -0,0 +1,3 @@ + shortwave = 'dEdd_snicar_ad' + snw_ssp_table = 'snicar' + diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index d4bbe8031..3007380ab 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -43,8 +43,9 @@ smoke gbox128 4x4 boxrestore,short,debug restart gbox80 1x1 box2001 smoke gbox80 1x1 boxslotcyl smoke gbox12 1x1x12x12x1 boxchan,diag1,debug +restart gx3 8x2 modal smoke gx3 8x2 bgcz -smoke gx3 8x2 bgcz,debug +smoke gx3 8x2 bgczm,debug smoke gx3 8x1 bgcskl,debug #smoke gx3 4x1 bgcz,thread smoke_gx3_8x2_bgcz restart gx1 4x2 bgcsklclim,medium diff --git a/configuration/scripts/tests/io_suite.ts b/configuration/scripts/tests/io_suite.ts index 01ea21ec2..84d064f32 100644 --- a/configuration/scripts/tests/io_suite.ts +++ b/configuration/scripts/tests/io_suite.ts @@ -23,7 +23,7 @@ restart gx3 8x4 alt04,histall,ionetcdf,cdf64 restart gx3 8x4 alt05,histall,ionetcdf,precision8,cdf64 restart gx3 16x2 alt06,histall,ionetcdf restart gx3 16x2 alt07,histall,ionetcdf -restart gx3 30x1 bgcz,histall,ionetcdf +restart gx3 30x1 bgczm,histall,ionetcdf restart gx3 15x2 bgcskl,histall,ionetcdf,precision8 restart gx3 31x1 isotope,histall,ionetcdf,cdf64 restart gx3 14x2 fsd12,histall,ionetcdf,precision8 @@ -37,7 +37,7 @@ restart gx3 8x4 alt04,histall,iopio1,precision8,cdf64 restart gx3 8x4 alt05,histall,iopio1,cdf64 restart gx3 32x1 alt06,histall,iopio1,precision8 restart gx3 32x1 alt07,histall,iopio1,precision8 -restart gx3 16x2 bgcz,histall,iopio1,precision8 +restart gx3 16x2 bgczm,histall,iopio1,precision8 restart gx3 30x1 bgcskl,histall,iopio1 restart gx3 8x4 isotope,histall,iopio1,precision8,cdf64 restart gx3 12x2 fsd12,histall,iopio1,cdf64 @@ -51,7 +51,7 @@ restart gx3 8x4 alt04,histall,iopio2 restart gx3 8x4 alt05,histall,iopio2,precision8,cdf64 restart gx3 16x2 alt06,histall,iopio2,cdf64 restart gx3 16x2 alt07,histall,iopio2,cdf64 -restart gx3 16x2 bgcz,histall,iopio2,cdf64 +restart gx3 16x2 bgczm,histall,iopio2,cdf64 restart gx3 30x1 bgcskl,histall,iopio2,precision8 restart gx3 8x4 isotope,histall,iopio2 restart gx3 12x2 fsd12,histall,iopio2,precision8,cdf64 @@ -65,7 +65,7 @@ restart gx3 8x4 alt04,histall,iopio1p,precision8 restart gx3 8x4 alt05,histall,iopio1p restart gx3 6x4 alt06,histall,iopio1p,precision8,cdf64 restart gx3 6x4 alt07,histall,iopio1p,precision8,cdf64 -restart gx3 16x2 bgcz,histall,iopio1p,precision8,cdf64 +restart gx3 16x2 bgczm,histall,iopio1p,precision8,cdf64 restart gx3 30x1 bgcskl,histall,iopio1p,cdf64 restart gx3 8x4 isotope,histall,iopio1p,precision8 restart gx3 12x2 fsd12,histall,iopio1p @@ -79,7 +79,7 @@ restart gx3 8x4 alt04,histall,iopio2p,cdf64 restart gx3 8x4 alt05,histall,iopio2p,precision8 restart gx3 24x1 alt06,histall,iopio2p restart gx3 24x1 alt07,histall,iopio2p -restart gx3 16x2 bgcz,histall,iopio2p +restart gx3 16x2 bgczm,histall,iopio2p restart gx3 30x1 bgcskl,histall,iopio2p,precision8,cdf64 restart gx3 8x4 isotope,histall,iopio2p,cdf64 restart gx3 12x2 fsd12,histall,iopio2p,precision8 diff --git a/configuration/scripts/tests/nothread_suite.ts b/configuration/scripts/tests/nothread_suite.ts index 93839b000..a262ec135 100644 --- a/configuration/scripts/tests/nothread_suite.ts +++ b/configuration/scripts/tests/nothread_suite.ts @@ -54,7 +54,7 @@ restart gx3 12x1 short #restart gx1 24x1 short smoke gx3 16x1 bgcz -smoke gx3 16x1 bgcz,debug +smoke gx3 16x1 bgczm,debug smoke gx3 24x1 bgcskl,debug #tcraig, hangs nodes intermittently on izumi #restart gx1 128x1 bgcsklclim,medium diff --git a/configuration/scripts/tests/omp_suite.ts b/configuration/scripts/tests/omp_suite.ts index 5d5e18376..686fa72db 100644 --- a/configuration/scripts/tests/omp_suite.ts +++ b/configuration/scripts/tests/omp_suite.ts @@ -8,7 +8,7 @@ smoke gx3 4x4 alt04,reprosum,run10day smoke gx3 4x4 alt05,reprosum,run10day smoke gx3 8x2 alt06,reprosum,run10day smoke gx3 7x2 alt07,reprosum,run10day -smoke gx3 8x2 bgcz,reprosum,run10day +smoke gx3 8x2 bgczm,reprosum,run10day smoke gx1 15x2 reprosum,run10day smoke gx1 15x2 seabedprob,reprosum,run10day smoke gx3 14x2 fsd12,reprosum,run10day @@ -34,7 +34,7 @@ smoke gx3 8x1 alt04,reprosum,run10day,cmplogrest,thread smoke gx3 8x1 alt05,reprosum,run10day,cmplogrest,thread smoke_gx3_4x4_alt05_reprosum_run10day smoke gx3 8x1 alt06,reprosum,run10day,cmplogrest,thread smoke_gx3_8x2_alt06_reprosum_run10day smoke gx3 8x1 alt07,reprosum,run10day,cmplogrest,thread smoke_gx3_7x2_alt07_reprosum_run10day -smoke gx3 8x1 bgcz,reprosum,run10day,cmplogrest,thread smoke_gx3_8x2_bgcz_reprosum_run10day +smoke gx3 8x1 bgczm,reprosum,run10day,cmplogrest,thread smoke_gx3_8x2_bgczm_reprosum_run10day smoke gx1 18x1 reprosum,run10day,cmplogrest,thread smoke_gx1_15x2_reprosum_run10day smoke gx1 18x1 seabedprob,reprosum,run10day,cmplogrest,thread smoke_gx1_15x2_reprosum_run10day_seabedprob smoke gx3 8x1 fsd12,reprosum,run10day,cmplogrest,thread smoke_gx3_14x2_fsd12_reprosum_run10day @@ -62,7 +62,7 @@ smoke gx3 4x4 alt04,reprosum,run10day,gridc smoke gx3 4x4 alt05,reprosum,run10day,gridc smoke gx3 8x2 alt06,reprosum,run10day,gridc smoke gx3 7x2 alt07,reprosum,run10day,gridc -smoke gx3 8x2 bgcz,reprosum,run10day,gridc +smoke gx3 8x2 bgczm,reprosum,run10day,gridc smoke gx1 15x2 reprosum,run10day,gridc smoke gx1 15x2 seabedprob,reprosum,run10day,gridc smoke gx3 14x2 fsd12,reprosum,run10day,gridc @@ -88,7 +88,7 @@ smoke gx3 8x1 alt04,reprosum,run10day,cmplogrest,thread,grid smoke gx3 8x1 alt05,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_4x4_alt05_gridc_reprosum_run10day smoke gx3 8x1 alt06,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_8x2_alt06_gridc_reprosum_run10day smoke gx3 8x1 alt07,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_7x2_alt07_gridc_reprosum_run10day -smoke gx3 8x1 bgcz,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_8x2_bgcz_gridc_reprosum_run10day +smoke gx3 8x1 bgczm,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_8x2_bgczm_gridc_reprosum_run10day smoke gx1 18x1 reprosum,run10day,cmplogrest,thread,gridc smoke_gx1_15x2_gridc_reprosum_run10day smoke gx1 18x1 seabedprob,reprosum,run10day,cmplogrest,thread,gridc smoke_gx1_15x2_gridc_reprosum_run10day_seabedprob smoke gx3 8x1 fsd12,reprosum,run10day,cmplogrest,thread,gridc smoke_gx3_14x2_fsd12_gridc_reprosum_run10day @@ -116,7 +116,7 @@ smoke gx3 4x4 alt04,reprosum,run10day,gridcd smoke gx3 4x4 alt05,reprosum,run10day,gridcd smoke gx3 8x2 alt06,reprosum,run10day,gridcd smoke gx3 7x2 alt07,reprosum,run10day,gridcd -smoke gx3 8x2 bgcz,reprosum,run10day,gridcd +smoke gx3 8x2 bgczm,reprosum,run10day,gridcd smoke gx1 15x2 reprosum,run10day,gridcd smoke gx1 15x2 seabedprob,reprosum,run10day,gridcd smoke gx3 14x2 fsd12,reprosum,run10day,gridcd @@ -142,7 +142,7 @@ smoke gx3 8x1 alt04,reprosum,run10day,cmplogrest,thread,grid smoke gx3 8x1 alt05,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_4x4_alt05_gridcd_reprosum_run10day smoke gx3 8x1 alt06,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_8x2_alt06_gridcd_reprosum_run10day smoke gx3 8x1 alt07,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_7x2_alt07_gridcd_reprosum_run10day -smoke gx3 8x1 bgcz,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_8x2_bgcz_gridcd_reprosum_run10day +smoke gx3 8x1 bgczm,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_8x2_bgczm_gridcd_reprosum_run10day smoke gx1 18x1 reprosum,run10day,cmplogrest,thread,gridcd smoke_gx1_15x2_gridcd_reprosum_run10day smoke gx1 18x1 seabedprob,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx1_15x2_gridcd_reprosum_run10day_seabedprob smoke gx3 8x1 fsd12,reprosum,run10day,cmplogrest,thread,gridcd smoke_gx3_14x2_fsd12_gridcd_reprosum_run10day diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index 99679e791..c62e96df7 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -503,8 +503,6 @@ either Celsius or Kelvin units). "ocn_data_type", "source of surface temperature, salinity data", "" "omega", "angular velocity of Earth", "7.292\ :math:`\times`\ 10\ :math:`^{-5}` rad/s" "opening", "rate of ice opening due to divergence and shear", "1/s" - "optics_file", "optics filename associated with modal aerosols", "" - "optics_file_fieldname", "optics file fieldname that is read", "" "**P**", "", "" "p001", "1/1000", "" "p01", "1/100", "" @@ -619,7 +617,7 @@ either Celsius or Kelvin units). "shcoef", "transfer coefficient for sensible heat", "" "shear", "strain rate II component", "1/s" "shlat", "southern latitude of artificial mask edge", "30\ :math:`^\circ`\ N" - "shortwave", "flag for shortwave parameterization (‘ccsm3’ or ‘dEdd’)", "" + "shortwave", "flag for shortwave parameterization (‘ccsm3’ or ‘dEdd’ or 'dEdd_snicar_ad')", "" "sig1(2)", "principal stress components (diagnostic)", "" "sil", "silicate concentration", "mmol/m\ :math:`^3`" "sinw", "sine of the turning angle in water", "0." diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 64264613c..eac4e7ede 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -37,6 +37,7 @@ can be found in :ref:`cicecpps`. The following CPPs are available. "NO_I8", "Converts integer*8 to integer*4. This could have adverse affects for certain algorithms including the ddpdd implementation associated with the ``bfbflag``" "NO_R16", "Converts real*16 to real*8. This could have adverse affects for certain algorithms including the lsum16 implementation associated with the ``bfbflag``" "USE_NETCDF", "Turns on netcdf code. This is normally on and is needed for released configurations. An older value, ncdf, is still supported" + "USE_SNICARHC", "Includes compilation of large dEdd hardcoded (HC) SNICAR table in Icepack" "","" "**Application Macros**", "" "CESMCOUPLED", "Turns on code changes for the CESM coupled application " @@ -121,6 +122,7 @@ can be modified as needed. "ICE_QUEUE", "string", "batch queue name", "set by cice.setup or by default" "ICE_THREADED", "true, false", "force threading in compile, will always compile threaded if ICE_NTHRDS :math:`> 1`", "false" "ICE_COMMDIR", "mpi, serial", "specify infrastructure comm version", "set by ICE_NTASKS" + "ICE_SNICARHC", "true, false", "turn on hardcoded (HC) SNICAR tables in Icepack", "false" "ICE_BLDDEBUG", "true, false", "turn on compile debug flags", "false" "ICE_COVERAGE", "true, false", "turn on code coverage flags", "false" @@ -515,7 +517,10 @@ shortwave_nml "``R_pnd``", "real", "tuning parameter for ponded sea ice albedo from Delta-Eddington shortwave", "0.0" "``R_snw``", "real", "tuning parameter for snow (broadband albedo) from Delta-Eddington shortwave", "1.5" "``shortwave``", "``ccsm3``", "NCAR CCSM3 shortwave distribution method", "``ccsm3``" - "", "``dEdd``", "Delta-Eddington method", "" + "", "``dEdd``", "Delta-Eddington method (3-band)", "" + "", "``dEdd_snicar_ad``", "Delta-Eddington method with 5 band snow", "" + "``snw_ssp_table``", "``snicar``", "lookup table for `dEdd_snicar_ad`", "``test``" + "", "``test``", "reduced lookup table for `dEdd_snicar_ad` testing", "" "``sw_dtemp``", "real", "temperature difference from melt to start redistributing", "0.02" "``sw_frac``", "real", "fraction redistributed", "0.9" "``sw_redist``", "logical", "redistribute internal shortwave to surface", "``.false.``" @@ -774,8 +779,6 @@ zbgc_nml "``mu_max_phaeo``", "real", "maximum growth rate phaeocystis per day", "0.851" "``mu_max_sp``", "real", "maximum growth rate small plankton per day", "0.851" "``nitratetype``", "real", "mobility type between stationary and mobile nitrate", "-1.0" - "``optics_file``", "string", "optics file associated with modal aerosols", "unknown_optics_file" - "``optics_file_fieldname``", "string", "optics file fieldname to read", "unknown_optics_fieldname" "``op_dep_min``", "real", "light attenuates for optical depths exceeding min", "0.1" "``phi_snow``", "real", "snow porosity for brine height tracer", "0.5" "``ratio_chl2N_diatoms``", "real", "algal chl to N in mg/mmol diatoms", "2.1" diff --git a/icepack b/icepack index 3a039e598..8aef3f785 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 3a039e598e6395333a278bb1822f03e9bc954ac6 +Subproject commit 8aef3f785ceb7ba5594db922fa2a7063ab94a09d