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

bgcNICE tests and bug fix #203

Merged
merged 5 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 5 additions & 3 deletions columnphysics/icepack_zbgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,11 @@ subroutine icepack_biogeochemistry(dt, &
else
first_ice(n) = .true.
if (tr_brine) trcrn(nt_fbri,n) = c1
do mm = 1,nbtrcr
trcrn(nt_zbgc_frac-1+mm,n) = zbgc_frac_init(mm)
enddo
if (z_tracers) then
do mm = 1,nbtrcr
trcrn(nt_zbgc_frac-1+mm,n) = zbgc_frac_init(mm)
enddo
endif
if (n == 1) Rayleigh_criteria = .false.
if (solve_zsal) trcrn(nt_bgc_S:nt_bgc_S+nblyr-1,n) = c0
endif
Expand Down
31 changes: 19 additions & 12 deletions configuration/driver/icedrv_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ module icedrv_forcing
ocn_data_format, & ! 'bin'=binary or 'nc'=netcdf
bgc_data_format, & ! 'bin'=binary or 'nc'=netcdf
atm_data_type, & ! 'default', 'clim', 'CFS'
ocn_data_type, & ! 'default'
bgc_data_type, & ! 'default'
ocn_data_type, & ! 'default', 'SHEBA'
bgc_data_type, & ! 'default', 'ISPOL', 'NICE'
atm_data_file, & ! atmospheric forcing data file
ocn_data_file, & ! ocean forcing data file
ice_data_file, & ! ice forcing data file
bgc_data_file, & ! biogeochemistry forcing data file
precip_units ! 'mm_per_month', 'mm_per_sec', 'mks'

character(char_len_long), public :: &
Expand Down Expand Up @@ -547,7 +551,8 @@ subroutine atm_CFS
character (char_len_long) filename
character(len=*), parameter :: subname='(atm_CFS)'

filename = trim(data_dir)//'/CFS/cfsv2_2015_220_70_01hr.txt'
! atm_data_file = 'cfsv2_2015_220_70_01hr.txt'
filename = trim(data_dir)//'/CFS/'//trim(atm_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down Expand Up @@ -869,8 +874,9 @@ subroutine atm_ISPOL
character (char_len_long) filename

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

filename = trim(data_dir)//'/ISPOL_2004/ISPOL_atm_forcing.txt'

! atm_data_file = 'ISPOL_atm_forcing.txt'
filename = trim(data_dir)//'/ISPOL_2004/'//trim(atm_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down Expand Up @@ -927,7 +933,8 @@ subroutine atm_NICE

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

filename = trim(data_dir)//'/NICE_2015/NICE_atm_forcing.txt'
! atm_data_file = 'NICE_atm_forcing.txt'
filename = trim(data_dir)//'/NICE_2015/'//trim(atm_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down Expand Up @@ -980,8 +987,8 @@ subroutine ocn_NICE

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

filename = &
trim(data_dir)//'/NICE_2015/oceanmixed_daily_3.txt'
! ocn_data_file = 'oceanmixed_daily_3.txt'
filename = trim(data_dir)//'/NICE_2015/'//trim(ocn_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down Expand Up @@ -1030,8 +1037,8 @@ subroutine ocn_ISPOL

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

filename = &
trim(data_dir)//'/ISPOL_2004/pop_frc.gx1v3.051202_but_hblt_from_010815_ispol.txt'
! ocn_data_file = 'pop_frc.gx1v3.051202_but_hblt_from_010815_ispol.txt'
filename = trim(data_dir)//'/ISPOL_2004/'//trim(ocn_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down Expand Up @@ -1101,8 +1108,8 @@ subroutine ice_open_clos

character (char_len_long) filename

filename = &
trim(data_dir)//'/SHEBA/open_clos_lindsay.dat'
! ice_data_file = 'open_clos_lindsay.dat'
filename = trim(data_dir)//'/SHEBA/'//trim(ice_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down
6 changes: 3 additions & 3 deletions configuration/driver/icedrv_forcing_bgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module icedrv_forcing_bgc

subroutine init_forcing_bgc

use icedrv_forcing, only: data_dir, bgc_data_type
use icedrv_forcing, only: data_dir, bgc_data_type, bgc_data_file

integer (kind=int_kind) :: &
ntime, &
Expand All @@ -50,9 +50,9 @@ subroutine init_forcing_bgc
trim(bgc_data_type) == 'NICE') then

if (trim(bgc_data_type) == 'ISPOL') &
filename = trim(data_dir)//'/ISPOL_2004/nutrients_daily_ISPOL_WOA_field3.txt'
filename = trim(data_dir)//'/ISPOL_2004/'//trim(bgc_data_file)
if (trim(bgc_data_type) == 'NICE') &
filename = trim(data_dir)//'/NICE_2015/nutrients_daily_ISPOL_WOA_field3.txt'
filename = trim(data_dir)//'/NICE_2015/'//trim(bgc_data_file)

write (nu_diag,*) 'Reading ',filename

Expand Down
17 changes: 17 additions & 0 deletions configuration/driver/icedrv_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ subroutine input_data
use icedrv_flux, only: default_season
use icedrv_forcing, only: precip_units, fyear_init, ycycle
use icedrv_forcing, only: atm_data_type, ocn_data_type, bgc_data_type
use icedrv_forcing, only: atm_data_file, ocn_data_file, bgc_data_file
use icedrv_forcing, only: ice_data_file
use icedrv_forcing, only: atm_data_format, ocn_data_format, bgc_data_format
use icedrv_forcing, only: data_dir
use icedrv_forcing, only: oceanmixed_ice, restore_ocn, trestore
Expand Down Expand Up @@ -145,6 +147,8 @@ subroutine input_data
tfrz_option, default_season, &
precip_units, fyear_init, ycycle, &
atm_data_type, ocn_data_type, bgc_data_type, &
atm_data_file, ocn_data_file, bgc_data_file, &
ice_data_file, &
atm_data_format, ocn_data_format, bgc_data_format, &
data_dir, trestore, restore_ocn

Expand Down Expand Up @@ -217,13 +221,17 @@ subroutine input_data
ycycle = 1 ! number of years in forcing cycle
atm_data_format = 'bin' ! file format ('bin'=binary or 'nc'=netcdf)
atm_data_type = 'default' ! source of atmospheric forcing data
atm_data_file = ' ' ! atmospheric forcing data file
precip_units = 'mks' ! 'mm_per_month' or
! 'mm_per_sec' = 'mks' = kg/m^2 s
oceanmixed_ice = .false. ! if true, use internal ocean mixed layer
ocn_data_format = 'bin' ! file format ('bin'=binary or 'nc'=netcdf)
ocn_data_type = 'default' ! source of ocean forcing data
ocn_data_file = ' ' ! ocean forcing data file
ice_data_file = ' ' ! ice forcing data file (opening, closing)
bgc_data_format = 'bin' ! file format ('bin'=binary or 'nc'=netcdf)
bgc_data_type = 'default' ! source of BGC forcing data
bgc_data_file = ' ' ! biogeochemistry forcing data file
data_dir = ' ' ! root location of data files
restore_ocn = .false. ! restore sst if true
trestore = 90 ! restoring timescale, days (0 instantaneous)
Expand Down Expand Up @@ -534,6 +542,15 @@ subroutine input_data
write(nu_diag,*) ' bgc_data_type = ', &
trim(bgc_data_type)

write(nu_diag,*) ' atm_data_file = ', &
trim(atm_data_file)
write(nu_diag,*) ' ocn_data_file = ', &
trim(ocn_data_file)
write(nu_diag,*) ' bgc_data_file = ', &
trim(bgc_data_file)
write(nu_diag,*) ' ice_data_file = ', &
trim(ice_data_file)

if (trim(atm_data_type)=='default') &
write(nu_diag,*) ' default_season = ', trim(default_season)

Expand Down
4 changes: 4 additions & 0 deletions configuration/scripts/icepack_in
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
fyear_init = 2015
ycycle = 1
data_dir = '/Users/ftuser/Desktop/CICE-Consortium/ICEPACK_DATA/'
atm_data_file = 'unknown_atm_data_file'
ocn_data_file = 'unknown_ocn_data_file'
bgc_data_file = 'unknown_bgc_data_file'
ice_data_file = 'open_clos_lindsay.dat'
atm_data_format = 'bin'
ocn_data_format = 'bin'
bgc_data_format = 'bin'
Expand Down
35 changes: 0 additions & 35 deletions configuration/scripts/options/set_env.bgc

This file was deleted.

3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.alt04
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
restore_ocn = .true.
trestore = 0
atm_data_type = 'CFS'
atm_data_file = 'cfsv2_2015_220_70_01hr.txt'
ocn_data_type = 'SHEBA'
ice_data_file = 'open_clos_lindsay.dat'
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.bgcISPOL
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
atm_data_type = 'ISPOL'
ocn_data_type = 'ISPOL'
bgc_data_type = 'ISPOL'
atm_data_file = 'ISPOL_atm_forcing_05092018.txt'
ocn_data_file = 'pop_frc.gx1v3.051202_but_hblt_from_010815_ispol.txt'
bgc_data_file = 'nutrients_daily_ISPOL_WOA_field3.txt'
tr_brine = .true.
tr_zaero = .true.
z_tracers = .true.
Expand Down
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.bgcNICE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
atm_data_type = 'NICE'
ocn_data_type = 'NICE'
bgc_data_type = 'NICE'
atm_data_file = 'NICE_atm_forcing_05092018.txt'
ocn_data_file = 'oceanmixed_daily_3.txt'
bgc_data_file = 'nutrients_daily_ISPOL_WOA_field3.txt'
tr_brine = .true.
tr_zaero = .false.
z_tracers = .true.
Expand Down
6 changes: 3 additions & 3 deletions configuration/scripts/options/set_nml.bgcsklNICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ year_init = 2015
fyear_init = 2015
restore_ocn = .true.
trestore = 1
bgc_data_type = 'unknown'
tr_brine = .true.
skl_bgc = .true.
atm_data_type = 'NICE'
ocn_data_type = 'NICE'
bgc_data_type = 'NICE'
atm_data_file = 'NICE_atm_forcing_05092018.txt'
ocn_data_file = 'oceanmixed_daily_3.txt'
bgc_data_file = 'nutrients_daily_ISPOL_WOA_field3.txt'
bgc_flux_type = 'Jin2006'
sil_data_type = 'default'
nit_data_type = 'default'
tr_bgc_Nit = .true.
tr_bgc_C = .true.
tr_bgc_Am = .true.
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ smoke col 1x1 diag1,run1year
smoke col 1x1 debug,run1year
smoke col 1x1 debug,bgcISPOL
smoke col 1x1 debug,bgcNICE
smoke col 1x1 debug,bgcsklNICE
smoke col 1x1 debug,run1year,thermo1
smoke col 1x1 debug,run1year,swccsm3
smoke col 1x1 debug,run1year,alt01
Expand All @@ -17,7 +18,6 @@ restart col 1x1 pondcesm
restart col 1x1 pondlvl
restart col 1x1 pondtopo
restart col 1x1 bgcISPOL
restart col 1x1 bgcNICE
restart col 1x1 thermo1
restart col 1x1 swccsm3
restart col 1x1 alt01
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/tests/travis_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ smoke col 1x1 diag1,run1year
smoke col 1x1 debug,run1year
smoke col 1x1 debug,bgcISPOL
smoke col 1x1 debug,bgcNICE
smoke col 1x1 debug,bgcsklNICE
smoke col 1x1 debug,run1year,thermo1
smoke col 1x1 debug,run1year,swccsm3
smoke col 1x1 debug,run1year,alt01
Expand All @@ -14,7 +15,6 @@ restart col 1x1 pondcesm
restart col 1x1 pondlvl
restart col 1x1 pondtopo
restart col 1x1 bgcISPOL
restart col 1x1 bgcNICE
restart col 1x1 thermo1
restart col 1x1 swccsm3
restart col 1x1 alt01
Expand Down
6 changes: 5 additions & 1 deletion doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ column physics.
"", "``ISPOL``", "ISPOL experiment data (see :ref:`force`)", ""
"", "``NICE``", "N-ICE experiment data (see :ref:`force`)", ""
"``data_dir``", "path/", "path to forcing data directory", ""
"``atm_data_file``", "filename", "file containing atmospheric data", ""
"``ocn_data_file``", "filename", "file containing ocean data", ""
"``ice_data_file``", "filename", "file containing ice opening, closing data", ""
"``bgc_data_file``", "filename", "file containing biogeochemistry data", ""
"``calc_strair``", "true", "calculate wind stress and speed", ""
"", "false", "read wind stress and speed from files", ""
"``highfreq``", "true/false", "high-frequency atmo coupling", ""
Expand Down Expand Up @@ -254,7 +258,7 @@ column physics.
"``bgc_data_dir``", "``/nitrate_and_silicate/forcing_directory/``", "", "'``/nitrate_and_silicate/forcing_directory/``'"
"``bgc_data_type``", "``default``", "fixed, spatially homogeneous constant values defined in the code", ""
"", "``clim``", "monthly climatology data file (see icedrv_forcing_bgc.F90) :cite:`GLBA06`", ""
"", "``NICE``", "NICE experiment data", ""
"", "``NICE``", "N-ICE experiment data", ""
"", "``ISPOL``", "ISPOL experiment data", ""
"``tr_bgc_Nit``", "true/false", "nitrate tracer", "``.true.``"
"``tr_bgc_C``", "true/false", "dissolved organic carbon tracers and dissolved inorganic carbon tracers (not yet implemented)", "``.true.``"
Expand Down
6 changes: 5 additions & 1 deletion doc/source/user_guide/ug_running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ Icepack requires near surface atmospheric data at a single point which are set
in ``forcing_nml`` with the ``atm_data_type`` in the namelist (see :ref:`tabsettings`).
The required fields to force icepack include: downwelling long wave and shortwave
radiative fluxes, latent and sensible heat fluxes, precipitation rate, and near
surface potential temperature and specific humidity.
surface potential temperature and specific humidity. The filenames ``atm_data_file``,
``ocn_data_file``, ``ice_data_file``, and ``bgc_data_file``
must also be provided for options other than the default and climatological forcing
cases. Current filenames can be found in the options scripts in
**configuration/scripts/options** and in the forcing data directories.


1) **Climate Forecast System (CFS)**
Expand Down