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

Added JRA55 forcing for gx3 grid; modified ice-forcing.F90 to now han… #408

Merged
merged 9 commits into from
Feb 28, 2020
43 changes: 33 additions & 10 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,12 +2033,12 @@ 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'
Expand All @@ -2040,8 +2048,23 @@ subroutine JRA55_files(yr)
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
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'
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 = 'ICE_MACHINE_INPUTDATA/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_gx1_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/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 = 2008
atm_data_dir = 'ICE_MACHINE_INPUTDATA/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 = 'ICE_MACHINE_INPUTDATA/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 = 'ICE_MACHINE_INPUTDATA/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
3 changes: 2 additions & 1 deletion doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ Table of namelist options
"","``nfreq``", "25", "number of frequencies in ocean surface wave spectral forcing", ""
"\*","``atm_data_type``", "``default``", "constant values defined in the code", ""
"","", "``LYq``", "COREII Large-Yeager (AOMIP) forcing data", ":cite:`Large09`"
"","", "``JRA55``", "JRA55 forcing data :cite:`Tsujino18`", ""
"","", "``JRA55_gx1``", "JRA55 forcing data for gx1 grid :cite:`Tsujino18`", ""
"","", "``JRA55_gx3``", "JRA55 forcing data for gx3 grid :cite:`Tsujino18`", ""
"","", "``monthly``", "monthly forcing data", ""
"","", "``ncar``", "NCAR bulk forcing data", ""
"","", "``box2001``", "forcing data for :cite:`Hunke01` box problem", ""
Expand Down