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

Add JRA55do to forcing #831

Closed
wants to merge 8 commits into from
Closed
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
119 changes: 49 additions & 70 deletions cicecore/cicedyn/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,14 @@ subroutine init_forcing_atmo
file=__FILE__, line=__LINE__)
endif

if (use_leap_years .and. (trim(atm_data_type) /= 'JRA55_gx1' .and. &
trim(atm_data_type) /= 'JRA55_gx3' .and. &
trim(atm_data_type) /= 'JRA55_tx1' .and. &
trim(atm_data_type) /= 'hycom' .and. &
trim(atm_data_type) /= 'box2001')) then
if (use_leap_years .and. (trim(atm_data_type) /= 'JRA55_gx1' .and. &
trim(atm_data_type) /= 'JRA55_gx3' .and. &
trim(atm_data_type) /= 'JRA55_tx1' .and. &
trim(atm_data_type) /= 'JRA55do_gx1' .and. &
trim(atm_data_type) /= 'JRA55do_gx3' .and. &
trim(atm_data_type) /= 'JRA55do_tx1' .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'
write(nu_diag,*) 'JRA55, default , and box2001 atmospheric data'
call abort_ice(error_message=subname, file=__FILE__, line=__LINE__)
Expand All @@ -302,12 +305,13 @@ subroutine init_forcing_atmo
elseif (trim(atm_data_type) == 'LYq') then
call LY_files(fyear)
#endif
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) == 'JRA55_tx1') then
call JRA55_tx1_files(fyear)
elseif ((trim(atm_data_type) == 'JRA55_gx1') .or. &
(trim(atm_data_type) == 'JRA55_gx3') .or. &
(trim(atm_data_type) == 'JRA55_tx1') .or. &
(trim(atm_data_type) == 'JRA55do_gx1') .or. &
(trim(atm_data_type) == 'JRA55do_gx3') .or. &
(trim(atm_data_type) == 'JRA55do_tx1')) then
call JRA55_files(fyear)
elseif (trim(atm_data_type) == 'hadgem') then
call hadgem_files(fyear)
elseif (trim(atm_data_type) == 'monthly') then
Expand Down Expand Up @@ -648,11 +652,12 @@ subroutine get_forcing_atmo
elseif (trim(atm_data_type) == 'LYq') then
call LY_data
#endif
elseif (trim(atm_data_type) == 'JRA55_gx1') then
call JRA55_data
elseif (trim(atm_data_type) == 'JRA55_gx3') then
call JRA55_data
elseif (trim(atm_data_type) == 'JRA55_tx1') then
elseif ((trim(atm_data_type) == 'JRA55_gx1') .or. &
(trim(atm_data_type) == 'JRA55_gx3') .or. &
(trim(atm_data_type) == 'JRA55_tx1') .or. &
(trim(atm_data_type) == 'JRA55do_gx1') .or. &
(trim(atm_data_type) == 'JRA55do_gx3') .or. &
(trim(atm_data_type) == 'JRA55do_tx1')) then
call JRA55_data
elseif (trim(atm_data_type) == 'hadgem') then
call hadgem_data
Expand Down Expand Up @@ -1593,15 +1598,7 @@ 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_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'
elseif (trim(atm_data_type) == 'JRA55_tx1') then ! netcdf
elseif (index(trim(atm_data_type),'JRA55') > 0) 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 @@ -2255,67 +2252,49 @@ end subroutine LY_files
#endif
!=======================================================================

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

character(len=*), parameter :: subname = '(JRA55_gx1_files)'
! local variables
character(len=3) :: &
grd ! gx3, gx1, tx1

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

if (local_debug .and. my_task == master_task) write(nu_diag,*) subname,'fdbg start'

uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55_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)
! check for grid version using fortran INDEX intrinsic
if (index(trim(atm_data_type),'gx1') > 0) then
grd = 'gx1'
else if (index(trim(atm_data_type),'gx3') > 0) then
grd = 'gx3'
else if (index(trim(atm_data_type),'tx1') > 0) then
grd = 'tx1'
else
call abort_ice(error_message=subname//' unknown grid type')
endif
end subroutine JRA55_gx1_files

!=======================================================================

subroutine JRA55_tx1_files(yr)
!
integer (kind=int_kind), intent(in) :: &
yr ! current forcing year

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

if (local_debug .and. my_task == master_task) write(nu_diag,*) subname,'fdbg start'

uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55_03hr_forcing_tx1_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)

! check if JRA55 or JRA55do
if (index(trim(atm_data_type),'JRA55do') > 0) then
uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55do_'//grd//'_03hr_forcing_2005.nc'
else ! assumes only other option os JRA55
uwind_file = &
trim(atm_data_dir)//'/8XDAILY/JRA55_'//grd//'_03hr_forcing_2005.nc'
endif
end subroutine JRA55_tx1_files

!=======================================================================

subroutine JRA55_gx3_files(yr)
!
integer (kind=int_kind), intent(in) :: &
yr ! current forcing year

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

if (local_debug .and. my_task == master_task) write(nu_diag,*) subname,'fdbg start'

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

end subroutine JRA55_files

!=======================================================================
#ifdef UNDEPRECATE_LYq
!=======================================================================
!
Expand Down
10 changes: 5 additions & 5 deletions configuration/scripts/machines/env.nrlssc_gnu
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ setenv ICE_MACHINE_MACHINFO "nrlssc"
setenv ICE_MACHINE_ENVNAME gnu
setenv ICE_MACHINE_ENVINFO "gnu"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR /u/data/hebert/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /u/data/hebert/CICE_RUNS
setenv ICE_MACHINE_BASELINE /u/data/hebert/CICE_BASELINE
setenv ICE_MACHINE_WKDIR /u/hebert/data/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /u/hebert/data/
setenv ICE_MACHINE_BASELINE /u/hebert/data/CICE_BASELINE
setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_QUEUE "standard"
setenv ICE_MACHINE_TPNODE 20 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 1
setenv ICE_MACHINE_TPNODE 28 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 8
setenv ICE_MACHINE_QSTAT "qstat "
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.jra55do_gx1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
atm_data_format = 'nc'
atm_data_type = 'JRA55do_gx1'
atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/JRA55do'
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.jra55do_gx3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
atm_data_format = 'nc'
atm_data_type = 'JRA55do_gx3'
atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx3/JRA55do'
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.jra55do_tx1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
atm_data_format = 'nc'
atm_data_type = 'JRA55do_tx1'
atm_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/tx1/JRA55do'
3 changes: 3 additions & 0 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ smoke gx3 4x1 diag1,run5day,thread smoke_gx3_8x2_diag1_
smoke gx3 1x8 diag1,run5day,evp1d
restart gx1 40x4 droundrobin,medium
restart tx1 40x4 dsectrobin,medium
restart tx1 40x4 dsectrobin,medium,jra55do_tx1
restart gx3 4x4 none
restart gx3 10x4 maskhalo
restart gx3 6x2 alt01
Expand Down Expand Up @@ -46,12 +47,14 @@ smoke gbox80 1x1 boxslotcyl
smoke gbox12 1x1x12x12x1 boxchan,diag1,debug
restart gx3 8x2 modal
smoke gx3 8x2 bgcz
smoke gx3 8x2 jra55do_gx3
smoke gx3 8x2 bgczm,debug
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 medium,run90day,yi2008
smoke gx1 24x1 medium,run90day,yi2008,jra55do_gx1
smoke gx3 8x1 medium,run90day,yi2008
restart gx1 24x1 short
restart gx1 16x2 seabedLKD,gx1apr,short,debug
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/tests/quick_suite.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test Grid PEs Sets BFB-compare
smoke gx3 8x2 diag1,run5day
smoke gx3 8x2 diag1,run5day,jra55do_gx3
smoke gx3 1x1 diag1,run1day
restart gbox128 8x1 diag1
restart gx3 4x2 debug,diag1
Expand Down