Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wave_spec_frac filename implementation and update icepack #417

Merged
merged 2 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions cicecore/cicedynB/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/direct/hadgem3/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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", &
Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/mct/cesm1/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/nuopc/dmi/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/standalone/cice/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.fsd1
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ tr_fsd = .true.
nfsd = 1
wave_spec_type = 'none'
nfreq = 25
ocn_data_format = 'nc'

3 changes: 1 addition & 2 deletions configuration/scripts/options/set_nml.fsd12
Original file line number Diff line number Diff line change
Expand Up @@ -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'

3 changes: 1 addition & 2 deletions configuration/scripts/options/set_nml.fsd12ww3
Original file line number Diff line number Diff line change
Expand Up @@ -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'