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

Version number in netcdf #121

Merged
merged 5 commits into from
Apr 11, 2018
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
2 changes: 2 additions & 0 deletions cice.setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/csh -f

set ICE_SANDBOX = `pwd`
set ICE_VERSION = `cat cicecore/version.txt | sed -e 's/ /_/g'`
set ICE_SCRIPTS = "${ICE_SANDBOX}/configuration/scripts"
set initargv = ( $argv[*] )

Expand Down Expand Up @@ -500,6 +501,7 @@ cat >! ${fimods} << EOF1
nprocs = ${task}
distribution_type = '${ICE_DECOMP_DECOMP}'
processor_shape = '${ICE_DECOMP_DSHAPE}'
version_name = '${ICE_VERSION}'
EOF1

# If this is a baseline-compare test, modify ICE_RUNDIR
Expand Down
3 changes: 3 additions & 0 deletions cicecore/cicedynB/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ module ice_history_shared
character (len=char_len_long), public :: &
pointer_file ! input pointer file for restarts

character (len=char_len), public :: &
version_name

!---------------------------------------------------------------
! Instructions for adding a field: (search for 'example')
! Here:
Expand Down
5 changes: 3 additions & 2 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ subroutine input_data
restart, restart_ext, restart_dir, restart_file, pointer_file, &
runid, runtype, use_restart_time, restart_format, lcdf64
use ice_history_shared, only: hist_avg, history_dir, history_file, &
incond_dir, incond_file
incond_dir, incond_file, version_name
use ice_flux, only: update_ocn_f, l_mpond_fresh
use ice_flux_bgc, only: cpl_bgc
use ice_forcing, only: &
Expand Down Expand Up @@ -136,7 +136,7 @@ subroutine input_data
print_global, print_points, latpnt, lonpnt, &
dbug, histfreq, histfreq_n, hist_avg, &
history_dir, history_file, cpl_bgc, &
write_ic, incond_dir, incond_file
write_ic, incond_dir, incond_file, version_name

namelist /grid_nml/ &
grid_format, grid_type, grid_file, kmt_file, &
Expand Down Expand Up @@ -237,6 +237,7 @@ subroutine input_data
grid_file = 'unknown_grid_file'
gridcpl_file = 'unknown_gridcpl_file'
kmt_file = 'unknown_kmt_file'
version_name = 'unknown_version_name'

kitd = 1 ! type of itd conversions (0 = delta, 1 = linear)
kcatbound = 1 ! category boundary formula (0 = old, 1 = new, etc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ subroutine ice_write_hist (ns)
if (status /= nf90_noerr) call abort_ice( &
'ice Error: global attribute contents')

title = 'Los Alamos Sea Ice Model (CICE) Version 5'
write(title,'(2a)') 'Los Alamos Sea Ice Model, ', trim(version_name)
status = nf90_put_att(ncid,nf90_global,'source',title)
if (status /= nf90_noerr) call abort_ice( &
'ice Error: global attribute source')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ subroutine ice_write_hist (ns)
title = 'Diagnostic and Prognostic Variables'
status = pio_put_att(File,pio_global,'contents',trim(title))

title = 'Los Alamos Sea Ice Model (CICE) Version 5'
write(title,'(2a)') 'Los Alamos Sea Ice Model, ', trim(version_name)
status = pio_put_att(File,pio_global,'source',trim(title))

if (use_leap_years) then
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/ice_in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
write_ic = .true.
incond_dir = './history/'
incond_file = 'iceh_ic'
version_name = 'undefined_version_name'
/

&grid_nml
Expand Down