Skip to content

Commit

Permalink
Added JRA55 forcing for gx3 grid; modified ice-forcing.F90 to now han…
Browse files Browse the repository at this point in the history
…dle both the gx1 and gx3 grid. JRA55 forcing files named were changed to include gx1 and gx3
  • Loading branch information
rallard77 committed Feb 20, 2020
1 parent 2e1c3b7 commit ce51d33
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 19 deletions.
53 changes: 39 additions & 14 deletions cicecore/cicedynB/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module ice_forcing
ocn_data_format, & ! 'bin'=binary or 'nc'=netcdf
atm_data_type, & ! 'default', 'monthly', 'ncar',
! 'LYq' or 'hadgem' or 'oned' or
! 'JRA55'
! 'JRA55_gx1' or 'JRA55_gx3'
bgc_data_type, & ! 'default', 'clim'
ocn_data_type, & ! 'default', 'clim', 'ncar', 'oned',
! 'hadgem_sst' or 'hadgem_sst_uvocn'
Expand Down Expand Up @@ -241,8 +241,8 @@ subroutine init_forcing_atmo
file=__FILE__, line=__LINE__)
endif

if (use_leap_years .and. (trim(atm_data_type) /= 'JRA55' .and. &
trim(atm_data_type) /= 'default' .and. &
if (use_leap_years .and. (trim(atm_data_type) /= 'JRA55_gx1' .and. &
trim(atm_data_type) /= 'JRA55_gx3' .and. &
trim(atm_data_type) /= 'hycom' .and. &
trim(atm_data_type) /= 'box2001')) then
write(nu_diag,*) 'use_leap_years option is currently only supported for'
Expand All @@ -259,8 +259,10 @@ subroutine init_forcing_atmo
call NCAR_files(fyear)
elseif (trim(atm_data_type) == 'LYq') then
call LY_files(fyear)
elseif (trim(atm_data_type) == 'JRA55') then
call JRA55_files(fyear)
elseif (trim(atm_data_type) == 'JRA55_gx1') then
call JRA55_gx1_files(fyear)
elseif (trim(atm_data_type) == 'JRA55_gx3') then
call JRA55_gx3_files(fyear)
elseif (trim(atm_data_type) == 'hadgem') then
call hadgem_files(fyear)
elseif (trim(atm_data_type) == 'monthly') then
Expand Down Expand Up @@ -556,7 +558,9 @@ subroutine get_forcing_atmo
call ncar_data
elseif (trim(atm_data_type) == 'LYq') then
call LY_data
elseif (trim(atm_data_type) == 'JRA55') then
elseif (trim(atm_data_type) == 'JRA55_gx1') then
call JRA55_data(fyear)
elseif (trim(atm_data_type) == 'JRA55_gx3') then
call JRA55_data(fyear)
elseif (trim(atm_data_type) == 'hadgem') then
call hadgem_data
Expand Down Expand Up @@ -1395,7 +1399,11 @@ subroutine file_year (data_file, yr)
i = index(data_file,'.nc') - 5
tmpname = data_file
write(data_file,'(a,i4.4,a)') tmpname(1:i), yr, '.nc'
elseif (trim(atm_data_type) == 'JRA55') then ! netcdf
elseif (trim(atm_data_type) == 'JRA55_gx1') then ! netcdf
i = index(data_file,'.nc') - 5
tmpname = data_file
write(data_file,'(a,i4.4,a)') tmpname(1:i), yr, '.nc'
elseif (trim(atm_data_type) == 'JRA55_gx3') then ! netcdf
i = index(data_file,'.nc') - 5
tmpname = data_file
write(data_file,'(a,i4.4,a)') tmpname(1:i), yr, '.nc'
Expand Down Expand Up @@ -2025,23 +2033,38 @@ subroutine LY_files (yr)
endif ! master_task

end subroutine LY_files
subroutine JRA55_files(yr)
subroutine JRA55_gx1_files(yr)
!
integer (kind=int_kind), intent(in) :: &
yr ! current forcing year

character(len=*), parameter :: subname = '(JRA55_files)'
character(len=*), parameter :: subname = '(JRA55_gx1_files)'

uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55_03hr_forcing_2005.nc'
trim(atm_data_dir)//'/8XDAILY/JRA55_gx1_03hr_forcing_2005.nc'
call file_year(uwind_file,yr)
if (my_task == master_task) then
write (nu_diag,*) ' '
write (nu_diag,*) 'Atmospheric data files:'
write (nu_diag,*) trim(uwind_file)
endif
end subroutine JRA55_files
end subroutine JRA55_gx1_files
subroutine JRA55_gx3_files(yr)
!
integer (kind=int_kind), intent(in) :: &
yr ! current forcing year

character(len=*), parameter :: subname = '(JRA55_gx3_files)'

uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55_gx3_03hr_forcing_2005.nc'
call file_year(uwind_file,yr)
if (my_task == master_task) then
write (nu_diag,*) ' '
write (nu_diag,*) 'Atmospheric data files:'
write (nu_diag,*) trim(uwind_file)
endif
end subroutine JRA55_gx3_files
!=======================================================================
!
! read Large and Yeager atmospheric data
Expand Down Expand Up @@ -5157,22 +5180,24 @@ subroutine get_wave_spec
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! if no wave data is provided, wave_spectrum is zero everywhere
wave_spectrum(:,:,:,:) = c0
wave_spec_dir = ocn_data_dir
dbug = .false.

! wave spectrum and frequencies
if (wave_spec) then
! get hardwired frequency bin info and a dummy wave spectrum profile
! the latter is used if wave_spec_type == profile
call icepack_init_wave(nfreq, &
wave_spectrum_profile, &
wavefreq, dwavefreq)

! default, for testing only
do k = 1, nfreq
wave_spectrum(:,:,k,:) = wave_spectrum_profile(k)
enddo

! read more realistic data from a file
if ((trim(wave_spec_type) == 'constant').OR.(trim(wave_spec_type) == 'random')) then
if (trim(wave_spec_type) == 'file') then
if (trim(wave_spec_file(1:4)) == 'unkn') then
call abort_ice (subname//'ERROR: wave_spec_file '//trim(wave_spec_file))
else
Expand Down
15 changes: 14 additions & 1 deletion configuration/scripts/cice.batch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,20 @@ cat >> ${jobfile} << EOFB
#PBS -l walltime=${batchtime}
EOFB

else if (${ICE_MACHINE} =~ thunder* || ${ICE_MACHINE} =~ gordon* || ${ICE_MACHINE} =~ conrad* || ${ICE_MACHINE} =~ gaffney* || ${ICE_MACHINE} =~ koehr*) then
else if (${ICE_MACHINE} =~ gordon*) then
if (${runlength} > 0) set queue = "standard"
cat >> ${jobfile} << EOFB
#PBS -N ${shortcase}
#PBS -q ${queue}
#PBS -A ${acct}
#PBS -l select=${nnodes}:ncpus=${maxtpn}:mpiprocs=${taskpernode}
#PBS -l walltime=${batchtime}
#PBS -j oe
###PBS -M [email protected]
###PBS -m be
EOFB

else if (${ICE_MACHINE} =~ thunder* || ${ICE_MACHINE} =~ conrad* || ${ICE_MACHINE} =~ gaffney* || ${ICE_MACHINE} =~ koehr*) then
cat >> ${jobfile} << EOFB
#PBS -N ${shortcase}
#PBS -q ${queue}
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.jra55
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maskhalo_bound = .true.
fyear_init = 2005
atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/JRA55'
atm_data_format = 'nc'
atm_data_type = 'JRA55'
atm_data_type = 'JRA55_gx1'
precip_units = 'mks'
ocn_data_dir = 'default'
bgc_data_dir = 'default'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.jra55_2008
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maskhalo_dyn = .true.
maskhalo_remap = .true.
maskhalo_bound = .true.
fyear_init = 2008
atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/JRA55'
atm_data_dir = '/p/work1/allard/CICE_data/forcing/gx1/JRA55'
atm_data_format = 'nc'
atm_data_type = 'JRA55'
precip_units = 'mks'
Expand Down
17 changes: 17 additions & 0 deletions configuration/scripts/options/set_nml.jra55_gx1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
year_init = 2005
ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx1/iced_gx1_v5.nc'
grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/grid_gx1.bin'
kmt_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/kmt_gx1.bin'
bathymetry_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx1/global_gx1.bathy.nc'
use_leap_years = .true.
use_restart_time = .false.
maskhalo_dyn = .true.
maskhalo_remap = .true.
maskhalo_bound = .true.
fyear_init = 2005
atm_data_dir = '/p/work1/allard/CICE_data/forcing/gx1/JRA55'
atm_data_format = 'nc'
atm_data_type = 'JRA55_gx1'
precip_units = 'mks'
ocn_data_dir = 'default'
bgc_data_dir = 'default'
17 changes: 17 additions & 0 deletions configuration/scripts/options/set_nml.jra55_gx3
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
year_init = 2005
ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx3/iced_gx3_v5.nc'
grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/grid_gx3.bin'
kmt_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/kmt_gx3.bin'
bathymetry_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/global_gx3.bathy.nc'
use_leap_years = .true.
use_restart_time = .false.
maskhalo_dyn = .true.
maskhalo_remap = .true.
maskhalo_bound = .true.
fyear_init = 2005
atm_data_dir = '/p/work1/allard/CICE_data/forcing/gx3/JRA55'
atm_data_format = 'nc'
atm_data_type = 'JRA55_gx3'
precip_units = 'mks'
ocn_data_dir = 'default'
bgc_data_dir = 'default'
17 changes: 17 additions & 0 deletions configuration/scripts/options/set_nml.jra55_gx3_2008
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
year_init = 2008
ice_ic = 'ICE_MACHINE_INPUTDATA/CICE_data/ic/gx3/iced_gx3_v5.nc'
grid_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/grid_gx3.bin'
kmt_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/kmt_gx3.bin'
bathymetry_file = 'ICE_MACHINE_INPUTDATA/CICE_data/grid/gx3/global_gx3.bathy.nc'
use_leap_years = .true.
use_restart_time = .false.
maskhalo_dyn = .true.
maskhalo_remap = .true.
maskhalo_bound = .true.
fyear_init = 2008
atm_data_dir = '/p/work1/allard/CICE_data/forcing/gx3/JRA55'
atm_data_format = 'nc'
atm_data_type = 'JRA55_gx3'
precip_units = 'mks'
ocn_data_dir = 'default'
bgc_data_dir = 'default'
6 changes: 4 additions & 2 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ smoke gx3 8x1 bgcskl,debug
#smoke gx3 4x1 bgcz,thread smoke_gx3_8x2_bgcz
restart gx1 4x2 bgcsklclim,medium
restart gx1 8x1 bgczclim,medium
smoke gx1 24x1 jra55_2008,medium,run90day
restart gx1 24x1 jra55,short
smoke gx1 24x1 jra55_gx1_2008,medium,run90day
smoke gx3 8x1 jra55_gx3_2008,medium,run90day
restart gx1 24x1 jra55_gx1,short
restart gx3 8x1 jra55_gx3,short
smoke gx3 4x2 fsd1,diag24,run5day,debug
smoke gx3 8x2 fsd12,diag24,run5day,short
restart gx3 4x2 fsd12,debug,short
Expand Down

0 comments on commit ce51d33

Please sign in to comment.