forked from NOAA-EMC/CICE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added DMI/nuopc driver and fixed ANGLET (CICE-Consortium#377)
* added driver_dmi * added CICE.F90 * moved DMI driver to correct location * Fix for bug in ice_Grid and anglet * merged changes from branch (coupled) * Removed icepack and Icepack directories to sort out submodule-mess * Added submodule icepack again. * reset icepack version
- Loading branch information
1 parent
85f7dac
commit fcbea1d
Showing
7 changed files
with
1,983 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
!======================================================================= | ||
! Copyright (c) 2019, Triad National Security, LLC | ||
! All rights reserved. | ||
! | ||
! Copyright 2019. Triad National Security, LLC. This software was | ||
! produced under U.S. Government contract DE-AC52-06NA25396 for Los | ||
! Alamos National Laboratory (LANL), which is operated by Triad | ||
! National Security, LLC for the U.S. Department of Energy. The U.S. | ||
! Government has rights to use, reproduce, and distribute this software. | ||
! NEITHER THE GOVERNMENT NOR TRIAD NATIONAL SECURITY, LLC MAKES ANY | ||
! WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF | ||
! THIS SOFTWARE. If software is modified to produce derivative works, | ||
! such modified software should be clearly marked, so as not to confuse | ||
! it with the version available from LANL. | ||
! | ||
! The full license and distribution policy are available from | ||
! https://github.com/CICE-Consortium | ||
! | ||
!======================================================================= | ||
#ifndef popcice | ||
! | ||
! Main driver routine for CICE. Initializes and steps through the model. | ||
! This program should be compiled if CICE is run as a separate executable, | ||
! but not if CICE subroutines are called from another program (e.g., CAM). | ||
! | ||
! authors Elizabeth C. Hunke and William H. Lipscomb, LANL | ||
! | ||
! 2006: Converted to free form source (F90) by Elizabeth Hunke | ||
! 2008: E. Hunke moved ESMF code to its own driver | ||
! | ||
program icemodel | ||
|
||
use CICE_InitMod | ||
use CICE_RunMod | ||
use CICE_FinalMod | ||
|
||
implicit none | ||
character(len=*), parameter :: subname='(icemodel)' | ||
|
||
!----------------------------------------------------------------- | ||
! Initialize CICE | ||
!----------------------------------------------------------------- | ||
|
||
call CICE_Initialize | ||
|
||
!----------------------------------------------------------------- | ||
! Run CICE | ||
!----------------------------------------------------------------- | ||
|
||
call CICE_Run | ||
|
||
!----------------------------------------------------------------- | ||
! Finalize CICE | ||
!----------------------------------------------------------------- | ||
|
||
call CICE_Finalize | ||
|
||
end program icemodel | ||
|
||
#endif | ||
!======================================================================= | ||
! | ||
! Wrapper for the print_state debugging routine. | ||
! Useful for debugging in the main driver (see ice.F_debug) | ||
! ip, jp, mtask are set in ice_diagnostics.F | ||
! | ||
! author Elizabeth C. Hunke, LANL | ||
! | ||
subroutine debug_ice(iblk, plabeld) | ||
|
||
use ice_kinds_mod | ||
use ice_calendar, only: istep1 | ||
use ice_communicate, only: my_task | ||
use ice_diagnostics, only: check_step, iblkp, ip, jp, mtask, print_state | ||
use ice_blocks, only: nx_block, ny_block | ||
|
||
character (char_len), intent(in) :: plabeld | ||
integer (kind=int_kind), intent(in) :: iblk | ||
|
||
! local | ||
integer (kind=int_kind) :: i, j | ||
character(len=*), parameter :: subname='(debug_ice)' | ||
|
||
if (istep1 >= check_step .and. & | ||
iblk==iblkp .and. my_task==mtask) then | ||
|
||
do j = 1, ny_block | ||
do i = 1, nx_block | ||
if (i==ip .and. j==jp) call print_state(plabeld,i,j,iblk) | ||
enddo | ||
enddo | ||
|
||
endif | ||
|
||
end subroutine debug_ice | ||
|
||
!======================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
!======================================================================= | ||
! | ||
! This module contains routines for the final exit of the CICE model, | ||
! including final output and clean exit from any message passing | ||
! environments and frameworks. | ||
! | ||
! authors: Philip W. Jones, LANL | ||
! 2006: Converted to free source form (F90) by Elizabeth Hunke | ||
! 2008: E. Hunke moved ESMF code to its own driver | ||
|
||
module CICE_FinalMod | ||
|
||
use ice_kinds_mod | ||
use ice_communicate, only: my_task, master_task | ||
use ice_exit, only: end_run, abort_ice | ||
use ice_fileunits, only: nu_diag, release_all_fileunits | ||
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted | ||
|
||
implicit none | ||
private | ||
public :: CICE_Finalize | ||
|
||
!======================================================================= | ||
|
||
contains | ||
|
||
!======================================================================= | ||
! | ||
! This routine shuts down CICE by exiting all relevent environments. | ||
|
||
subroutine CICE_Finalize | ||
|
||
use ice_restart_shared, only: runid | ||
use ice_timers, only: ice_timer_stop, ice_timer_print_all, timer_total | ||
|
||
character(len=*), parameter :: subname = '(CICE_Finalize)' | ||
|
||
!------------------------------------------------------------------- | ||
! stop timers and print timer info | ||
!------------------------------------------------------------------- | ||
|
||
call ice_timer_stop(timer_total) ! stop timing entire run | ||
call ice_timer_print_all(stats=.false.) ! print timing information | ||
|
||
call icepack_warnings_flush(nu_diag) | ||
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & | ||
file=__FILE__,line= __LINE__) | ||
|
||
if (my_task == master_task) then | ||
write(nu_diag, *) " " | ||
write(nu_diag, *) "CICE COMPLETED SUCCESSFULLY " | ||
write(nu_diag, *) " " | ||
endif | ||
|
||
!echmod if (nu_diag /= 6) close (nu_diag) ! diagnostic output | ||
call release_all_fileunits | ||
|
||
!------------------------------------------------------------------- | ||
! write 'finished' file if needed | ||
!------------------------------------------------------------------- | ||
|
||
if (runid == 'bering') call writeout_finished_file() | ||
|
||
!------------------------------------------------------------------- | ||
! quit MPI | ||
!------------------------------------------------------------------- | ||
|
||
#ifndef coupled | ||
#ifndef CICE_DMI | ||
call end_run ! quit MPI | ||
#endif | ||
#endif | ||
end subroutine CICE_Finalize | ||
|
||
!======================================================================= | ||
! | ||
! Write a file indicating that this run finished cleanly. This is | ||
! needed only for runs on machine 'bering' (set using runid = 'bering'). | ||
! | ||
! author: Adrian Turner, LANL | ||
|
||
subroutine writeout_finished_file() | ||
|
||
use ice_restart_shared, only: restart_dir | ||
|
||
character(len=char_len_long) :: filename | ||
character(len=*), parameter :: subname = '(writeout_finished_file)' | ||
|
||
if (my_task == master_task) then | ||
|
||
filename = trim(restart_dir)//"finished" | ||
open(11,file=filename) | ||
write(11,*) "finished" | ||
close(11) | ||
|
||
endif | ||
|
||
end subroutine writeout_finished_file | ||
|
||
!======================================================================= | ||
|
||
end module CICE_FinalMod | ||
|
||
!======================================================================= |
Oops, something went wrong.