Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NOAA-EMC/CICE
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2ffee5cd48e0c389bdf75c0d910b3f6d53263563
Choose a base ref
...
head repository: NOAA-EMC/CICE
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 635d9a100a736bd8d14ad091e879d5da6e4eb2bd
Choose a head ref

Commits on Mar 23, 2023

  1. Fix CESMCOUPLED compile issue in icepack. (CICE-Consortium#823)

    * Fix CESMCOUPLED compile problem in icepack
    dabail10 authored Mar 23, 2023
    Copy the full SHA
    9424497 View commit details

Commits on Apr 5, 2023

  1. Update global reduction implementation to improve performance, fix VP…

    … bug (CICE-Consortium#824)
    
    * Update global reduction implementation to improve performance, fix VP bug
    
    This was mainly done for situations like VP that need a fast global sum.
    The VP global sum is still slightly faster than the one computed in the
    infrastructure, so kept that implementation.  Found a bug in the workspace_y
    calculation in VP that was fixed.  Also found that the haloupdate call
    as part of the precondition step generally improves VP performance, so removed
    option to NOT call the haloupdate there.
    
    Separately, fixed a bug in the tripoleT global sum implementation, added
    a tripoleT global sum unit test, and resynced ice_exit.F90, ice_reprosum.F90,
    and ice_global_reductions.F90 between serial and mpi versions.
    
    - Refactor global sums to improve performance, move if checks outside do loops
    - Fix bug in tripoleT global sums, tripole seam masking
    - Update VP solver, use local global sum more often
    - Update VP solver, fix bug in workspace_y calculation
    - Update VP solver, always call haloupdate during precondition
    - Refactor ice_exit.F90 and sync serial and mpi versions
    - Sync ice_reprosum.F90 between serial and mpi versions
    - Update sumchk unit test to handle grids better
    - Add tripoleT sumchk test
    
    * Update VP global sum to exclude local implementation with tripole grids
    apcraig authored Apr 5, 2023
    Copy the full SHA
    5b0418a View commit details

Commits on May 17, 2023

  1. Add functionality to change hist_avg for each stream (CICE-Consortium…

    …#827)
    
    * Add functionality to change hist_avg for each stream
    
    * Fix some documentation
    
    * Try to fix sphinx problem
    
    * Fix hist_avg documentation
    
    * Add some metadata changes to time and time_bounds
    dabail10 authored May 17, 2023
    Copy the full SHA
    35ec167 View commit details

Commits on May 24, 2023

  1. Update Icepack to #6703bc533c968 May 22, 2023 (CICE-Consortium#829)

    Remove trailing blanks via automated tool in some Fortran files
    apcraig authored May 24, 2023
    Copy the full SHA
    b98b8ae View commit details

Commits on Jun 20, 2023

  1. Fix for mesh check in CESM driver (CICE-Consortium#830)

    * Fix for mesh check in CESM driver
    
    * Slightly different way to evaluate longitude difference
    
    * Slightly different way to evaluate longitude difference
    
    * Put the abs inside the mod
    
    * Add abort calls back in
    dabail10 authored Jun 20, 2023
    Copy the full SHA
    8e2aab2 View commit details
  2. Update .readthedocs.yaml, add pdf (CICE-Consortium#837)

    * update readthedocs.yaml, turn on pdf
    
    * update readthedocs.yaml, turn on pdf
    
    * update readthedocs.yaml, turn on pdf
    
    * update readthedocs.yaml, turn on pdf
    apcraig authored Jun 20, 2023
    Copy the full SHA
    7eb4dd7 View commit details

Commits on Jul 7, 2023

  1. Namelist option for time axis position. (CICE-Consortium#839)

    * Add option to change location in interval of time axis
    
    * Only use hist_time_axis when hist_avg is true
    
    * Add more comments and information in the documentation
    
    * Add a check on hist_time_axis as well as a global attribute
    
    * Abort if hist_time_axis is not set correctly.
    dabail10 authored Jul 7, 2023
    Copy the full SHA
    34dc667 View commit details

Commits on Jul 11, 2023

  1. Update Icepack to #d024340f19676b July 6, 2023 (CICE-Consortium#841)

    Remove deprecated COREII LYq forcing
    
    Remove deprecated print_points_state
    
    Update links in rst documentation to point to main, not master
    apcraig authored Jul 11, 2023
    Copy the full SHA
    766ff8d View commit details

Commits on Jul 13, 2023

  1. Add support for JRA55do (CICE-Consortium#843)

    * updating paths for local nrlssc builds
    
    * Add jra55do forcing option
    
    * Updated env.nrlssc_gnu for new local directory structure
    
    * Added JRA55do to file names. Added comments for each variable name at top of JRA55do_???_files subroutine
    
    * Make JRA55 forcing to use common subroutines. Search atm_data_type for specific cases
    
    * remove extraneous 'i' variable in JRA55_files
    
    * Changed JRA55 filename JRA55_grid instead of grid at end of filename
    
    * Add jra55do tests to base_suite and quick_suite. This is done via set_nml options.
    
    * Update forcing implementation to provide a little more flexibility for
    JRA55, JRA55do, and ncar bulk atm forcing files.
    
    * Update documentation
    
    * update Onyx port
    
    * Update forcing documentation
    
    Initial port to derecho_intel
    
    * clean up blank spaces
    
    ---------
    
    Co-authored-by: daveh150 <david.hebert@nrlssc.navy.mil>
    apcraig and daveh150 authored Jul 13, 2023
    Copy the full SHA
    f9d3002 View commit details

Commits on Jul 20, 2023

  1. Update Icepack to Consortium main #4728746, July 18 2023 (CICE-Consor…

    …tium#846)
    
    - fix optional arguments issues
    - fix hsn_new(1) bug
    
    Update optargs unit test, add new test cases
    
    Add opticep unit test, to test CICE calls to Icepack without optional arguments.
    Add new comparison option to comparelog.csh to compare a unit test with
    a standard CICE test.
    
    Update unittest_suite
    
    Update documentation about optional arguments and unit tests
    apcraig authored Jul 20, 2023
    Copy the full SHA
    9f42a62 View commit details

Commits on Jul 25, 2023

  1. Modification of edge mask computation when l_fixed_area=T in horizont…

    …al remapping (CICE-Consortium#833)
    
    * Use same method whether l_fixed_area=T or F to compute masks for edge fluxes
    
    * Corrected typo in comment
    
    * Cosmetic (indentation) change in ice_transport_remap.F90
    
    * Set l_fixed_area value depending of grid type
    
    * Modifs to the doc for l_fixed_area
    
    * Use umask for uvel,vvel initialization for boxslotcyl and change grid avg type from S to A in init_state
    
    * Temporary changes before next PR: l_fixed_area=F for B and C grid
    
    * Temporary changes before next PR: remove paragraph in the doc
    
    * Small modifs: l_fixed_area and grid_ice are defined in module ice_transport_remap
    JFLemieux73 authored Jul 25, 2023
    Copy the full SHA
    4cb296c View commit details

Commits on Aug 10, 2023

  1. Update conda_macos to fix problems with Github Actions testing (CICE-…

    …Consortium#853)
    
    * test ghactions
    
    * update master to main in github actions
    apcraig authored Aug 10, 2023
    Copy the full SHA
    7e8dc5b View commit details

Commits on Aug 18, 2023

  1. Updates to advanced snow physics implementation (CICE-Consortium#852)

    * Replace tr_snow flag with snwredist, snwgrain in some places (tr_snow is still used more generally).  Fix intent(out) compile issue in ice_read_write.F90. Replace badger with chicoma machine files.
    
    * update icepack to 86cae16d1b7c4c4f8
    
    ---------
    
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    eclare108213 and apcraig authored Aug 18, 2023
    Copy the full SHA
    8322416 View commit details

Commits on Aug 22, 2023

  1. Deprecate zsalinity (CICE-Consortium#851)

    * Deprecate zsalinity, mostly with ifdef and comments first for testing
    
    * Deprecate zsalinity, remove code
    
    * Add warning message for deprecated zsalinity
    
    * Update Icepack to #f5e093f5148554674 (deprecate zsalinity)
    apcraig authored Aug 22, 2023
    Copy the full SHA
    357103a View commit details

Commits on Aug 24, 2023

  1. Extend restart output controls, provide multiple frequency options (C…

    …ICE-Consortium#850)
    
    * Extend restart output controls, provide multiple streams for possible
    output frequencies.  Convert dumpfreq, dumpfreq_n, dumpfreq_base to
    arrays.
    
    Modify histfreq_base to make it an array as well.  Now each history stream
    can have it's own base time (init or zero).
    
    Update documentation.
    
    * Clean up implementation and documentation
    
    * Update PR to check github actions
    apcraig authored Aug 24, 2023
    Copy the full SHA
    933b148 View commit details

Commits on Aug 28, 2023

  1. Add logging features to nuopc/cmeps cap; deprecates zsalinity in cap (C…

    …ICE-Consortium#856)
    
    * merge latest master (#4)
    
    * Isotopes for CICE (CICE-Consortium#423)
    
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: David Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    
    * updated orbital calculations needed for cesm
    
    * fixed problems in updated orbital calculations needed for cesm
    
    * update CICE6 to support coupling with UFS
    
    * put in changes so that both ufsatm and cesm requirements for potential temperature and density are satisfied
    
    * Convergence on ustar for CICE. (CICE-Consortium#452) (#5)
    
    * Add atmiter_conv to CICE
    
    * Add documentation
    
    * trigger build the docs
    
    Co-authored-by: David A. Bailey <dbailey@ucar.edu>
    
    * update icepack submodule
    
    * Revert "update icepack submodule"
    
    This reverts commit e70d1ab.
    
    * update comp_ice.backend with temporary ice_timers fix
    
    * Fix threading problem in init_bgc
    
    * Fix additional OMP problems
    
    * changes for coldstart running
    
    * Move the forapps directory
    
    * remove cesmcoupled ifdefs
    
    * Fix logging issues for NUOPC
    
    * removal of many cpp-ifdefs
    
    * fix compile errors
    
    * fixes to get cesm working
    
    * fixed white space issue
    
    * Add restart_coszen namelist option
    
    * update icepack submodule
    
    * change Orion to orion in backend
    
    remove duplicate print lines from ice_transport_driver
    
    * add -link_mpi=dbg to debug flags (#8)
    
    * cice6 compile (#6)
    
    * enable debug build. fix to remove errors
    
    * fix an error in comp_ice.backend.libcice
    
    * change Orion to orion for machine identification
    
    * changes for consistency w/ current emc-cice5 (#13)
    
    Update to emc/develop fork to current CICE consortium 
    
    Co-authored-by: David A. Bailey <dbailey@ucar.edu>
    Co-authored-by: Tony Craig <apcraig@users.noreply.github.com>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
    
    * Fixcommit (#14)
    
    Align commit history between emc/develop and cice-consortium/master
    
    * Update CICE6 for integration to S2S
    
    
    * add wcoss_dell_p3 compiler macro
    
    * update to icepack w/ debug fix
    
    * replace SITE with MACHINE_ID
    
    * update compile scripts
    
    * Support TACC stampede (#19)
    
    * update icepack
    
    * add ice_dyn_vp module to CICE_InitMod
    
    * update gitmodules, update icepack
    
    * Update CICE to consortium master (#23)
    
    updates include:
    
    * deprecate upwind advection (CICE-Consortium#508)
    * add implicit VP solver (CICE-Consortium#491)
    
    * update icepack
    
    * switch icepack branches
    
    * update to icepack master but set abort flag in ITD routine
    to false
    
    * update icepack
    
    * Update CICE to latest Consortium master (#26)
    
    
    update CICE and Icepack
    
    * changes the criteria for aborting ice for thermo-conservation errors
    * updates the time manager
    * fixes two bugs in ice_therm_mushy
    * updates Icepack to Consortium master w/ flip of abort flag for troublesome IC cases
    
    * add cice changes for zlvs (#29)
    
    * update icepack and pointer
    
    * update icepack and revert gitmodules
    
    * Fix history features
    
    - Fix bug in history time axis when sec_init is not zero.
    - Fix issue with time_beg and time_end uninitialized values.
    - Add support for averaging with histfreq='1' by allowing histfreq_n to be any value
      in that case.  Extend and clean up construct_filename for history files.  More could
      be done, but wanted to preserve backwards compatibility.
    - Add new calendar_sec2hms to converts daily seconds to hh:mm:ss.  Update the
      calchk calendar unit tester to check this method
    - Remove abort test in bcstchk, this was just causing problems in regression testing
    - Remove known problems documentation about problems writing when istep=1.  This issue
      does not exist anymore with the updated time manager.
    - Add new tests with hist_avg = false.  Add set_nml.histinst.
    
    * revert set_nml.histall
    
    * fix implementation error
    
    * update model log output in ice_init
    
    * Fix QC issues
    
    - Add netcdf ststus checks and aborts in ice_read_write.F90
    - Check for end of file when reading records in ice_read_write.F90 for
      ice_read_nc methods
    - Update set_nml.qc to better specify the test, turn off leap years since we're cycling
      2005 data
    - Add check in c ice.t-test.py to make sure there is at least 1825 files, 5 years of data
    - Add QC run to base_suite.ts to verify qc runs to completion and possibility to use
      those results directly for QC validation
    - Clean up error messages and some indentation in ice_read_write.F90
    
    * Update testing
    
    - Add prod suite including 10 year gx1prod and qc test
    - Update unit test compare scripts
    
    * update documentation
    
    * reset calchk to 100000 years
    
    * update evp1d test
    
    * update icepack
    
    * update icepack
    
    * add memory profiling (#36)
    
    
    * add profile_memory calls to CICE cap
    
    * update icepack
    
    * fix rhoa when lowest_temp is 0.0
    
    * provide default value for rhoa when imported temp_height_lowest
    (Tair) is 0.0
    * resolves seg fault when frac_grid=false and do_ca=true
    
    * update icepack submodule
    
    * Update CICE for latest Consortium master (#38)
    
    
        * Implement advanced snow physics in icepack and CICE
        * Fix time-stamping of CICE history files
        * Fix CICE history file precision
    
    * Use CICE-Consortium/Icepack master (#40)
    
    * switch to icepack master at consortium
    
    * recreate cap update branch (#42)
    
    
    * add debug_model feature
    * add required variables and calls for tr_snow
    
    * remove 2 extraneous lines
    
    * remove two log print lines that were removed prior to
    merge of driver updates to consortium
    
    * duplicate gitmodule style for icepack
    
    * Update CICE to latest Consortium/main (#45)
    
    * Update CICE to Consortium/main (#48)
    
    
    Update OpenMP directives as needed including validation via new omp_suite. Fixed OpenMP in dynamics.
    Refactored eap puny/pi lookups to improve scalar performance
    Update Tsfc implementation to make sure land blocks don't set Tsfc to freezing temp
    Update for sea bed stress calculations
    
    * fix comment, fix env for orion and hera
    
    * replace save_init with step_prep in CICE_RunMod
    
    * fixes for cgrid repro
    
    * remove added haloupdates
    
    * baselines pass with these extra halo updates removed
    
    * change F->S for ocean velocities and tilts
    
    * fix debug failure when grid_ice=C
    
    * compiling in debug mode using -init=snan,arrays requires
    initialization of variables
    
    * respond to review comments
    
    * remove inserted whitespace for uvelE,N and vvelE,N
    
    * Add wave-cice coupling; update to Consortium main (#51)
    
    
    * add wave-ice fields
    * initialize aicen_init, which turns up as NaN in calc of floediam
    export
    * add call to icepack_init_wave to initialize wavefreq and dwavefreq
    * update to latest consortium main (PR 752)
    
    * add initializationsin ice_state
    
    * initialize vsnon/vsnon_init and vicen/vicen_init
    
    * Update CICE (#54)
    
    
    * update to include recent PRs to Consortium/main
    
    * fix for nudiag_set
    
    allow nudiag_set to be available outside of cesm; may prefer
    to fix in coupling interface
    
    * Update CICE for latest Consortium/main (#56)
    
    * add run time info
    
    * change real(8) to real(dbl)kind)
    
    * fix syntax
    
    * fix write unit
    
    * use cice_wrapper for ufs timer functionality
    
    * add elapsed model time for logtime
    
    * tidy up the wrapper
    
    * fix case for 'time since' at the first advance
    
    * add timer and forecast log
    
    * write timer values to timer log, not nu_diag
    * write log.ice.fXXX
    
    * only one time is needed
    
    * modify message written for log.ice.fXXX
    
    * change info in fXXX log file
    
    * Update CICE from Consortium/main (#62)
    
    
    * Fix CESMCOUPLED compile issue in icepack. (CICE-Consortium#823)
    * Update global reduction implementation to improve performance, fix VP bug (CICE-Consortium#824)
    * Update VP global sum to exclude local implementation with tripole grids
    * Add functionality to change hist_avg for each stream (CICE-Consortium#827)
    * Update Icepack to #6703bc533c968 May 22, 2023 (CICE-Consortium#829)
    * Fix for mesh check in CESM driver (CICE-Consortium#830)
    * Namelist option for time axis position. (CICE-Consortium#839)
    
    * reset timer after Advance to retrieve "wait time"
    
    * add logical control for enabling runtime info
    
    * remove zsal items from cap
    
    * fix typo
    
    ---------
    
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: David Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
    Co-authored-by: Minsuk Ji <57227195+MinsukJi-NOAA@users.noreply.github.com>
    Co-authored-by: Tony Craig <apcraig@users.noreply.github.com>
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
    Co-authored-by: Jun.Wang <Jun.Wang@noaa.gov>
    9 people authored Aug 28, 2023
    Copy the full SHA
    e8a69ab View commit details

Commits on Aug 31, 2023

  1. Update Icepack to #23b6c1272b50d42ca, Aug 30, 2023 (CICE-Consortium#857)

    Includes thin ice enthalpy fix, not bit-for-bit.
    apcraig authored Aug 31, 2023
    Copy the full SHA
    32dc48e View commit details

Commits on Sep 5, 2023

  1. Copy the full SHA
    cbbac74 View commit details

Commits on Sep 7, 2023

  1. Update Cheyenne and Derecho ports (CICE-Consortium#863)

    * Update cheyenne and derecho ports
    
    cheyenne_intel updated to intel/19/1/1, mpt/2.25
    cheyenne_gnu updated to gnu/8.3.0, mpt/2.25
    cheyenne_pgi updated to pgi/19.9, mpt/2.22
    derecho_intel minor updates
    derecho_intelclassic added
    derecho_inteloneapi added (not working)
    derecho_gnu added
    derecho_cray added
    derecho_nvhpc added
    
    cheyenne_pgi changed answers
    
    derecho_inteloneapi is not working, compiler issues
    
    fixes automated qc testing on cheyenne
    
    * Update permissions on env.chicoma_intel
    apcraig authored Sep 7, 2023
    Copy the full SHA
    714bab9 View commit details

Commits on Sep 8, 2023

  1. Update version to 6.4.2 (CICE-Consortium#864)

    Update License and Copyright
    
    Update Icepack for version/copyright
    apcraig authored Sep 8, 2023
    Copy the full SHA
    06282a5 View commit details

Commits on Sep 15, 2023

  1. More accurate calculation of areafact in remapping (CICE-Consortium#849)

    * Modified doc to specify that l_fixed_area is T for C-grid
    
    * Initial modifs to calc areafact based on linear interpolation of left and rigth values
    
    * put back l_fixed_area = .true. for C-grid
    
    * added temporary comments for PR review
    
    * Modified areafac calc for case 1 and case 2
    
    * Corrected minor compilation issues
    
    * Corrected conditions for case 1 to make sure areas add up
    
    * Small modif in l_fixed_area section to ensure only one condition is true
    
    * Modified conditions in locate triangle to be consistent with previous changes for case 1
    
    * Use other edge areafac_c for TL, BL, TR and BR triangles
    
    * Some comments removed
    
    * Fixed out of bounds areafac_ce and now use earea and narea
    
    * Replaced ib,ie,jb,je in locate_triangle using ilo,ihi,jlo,jhi
    
    * Modified areafac for TL1, BL2, TR1 and BR2 for area flux consistency
    
    * Cosmetic changes
    
    * Added comment to explain latest change
    
    * Modification of bugcheck condition for l_fixed_area=T
    
    * update areafac_c, areafac_ce in halo in dynamics
    
    ---------
    
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    JFLemieux73 and apcraig authored Sep 15, 2023
    Copy the full SHA
    01ed4db View commit details
  2. Copy the full SHA
    a5bb4f9 View commit details

Commits on Sep 25, 2023

  1. Copy the full SHA
    55342ca View commit details

Commits on Sep 29, 2023

  1. Add single grid channel capability and test for C-grid (CICE-Consorti…

    …um#875)
    
    * Added code for transport in one grid cell wide channels
    
    * Update remap advection to support transport in single gridcell channels
    
    Add single grid east and north channel configurations and tests
    
    * Update documentation
    
    * Remove temporary code comments
    
    ---------
    
    Co-authored-by: Jean-Francois Lemieux <jean-francois.lemieux@canada.ca>
    apcraig and JFLemieux73 authored Sep 29, 2023
    Copy the full SHA
    d466031 View commit details

Commits on Oct 5, 2023

  1. Update CICE for E3SM Icepack modifications (CICE-Consortium#879)

    * Update CICE to run with eclare108213/Icepack branch snicar (CICE-Consortium#100)
    
    * Update CICE to run with eclare108213/Icepack branch snicar
    
    - including eclare108213/Icepack#13, Sept 11, 2022
    - Passes full CICE test suite on cheyenne with 3 compilers except alt04 changes
      answers for all compilers and all tests.  CICE #fea412a55f was baseline.
    - Icepack submodule still points to standard version on main, need to be
      swapped manually to appropriate development version.
    
    * Remove faero_optics
    
    * update ciceexe string to account for USE_SNICARHC CPP
    
    * Update documentation
    
    * Update test suite to add modal testing
    
    * Point Icepack submodule to cice-consortium/E3SM-icepack-initial-integration
    
    Update to snicar branch merge, #8aef3f785ce
    
    * Add E3SM namelists for CICE. (CICE-Consortium#101)
    
    * New e3sm and e3smbgc namelist options
    
    * Update E3SM test options
    
    * Add a simple e3sm test suite
    
    * atmbndy is not actually different
    
    * Additional changes
    
    * add Tliquidus_max namelist parameter to CICE
    
    * Add Tf argument to icepack interfaces
    
    * Add constant option for tfrz_option
    
    * Fix some diagnostic prints and add to additional drivers
    
    * Update messages and change option in alt01
    
    * Update implementation for latest version of Icepack
    
    - Update tfrz_option, add _old options for backwards bit-for-bit
    - Fix unittests
    - Add hi_min to namelist and tests
    
    * Update Icepack
    
    * Update to E3SM-Project/Icepack/cice-consortium/E3SM-icepack-initial-integration including Icepack1.3.3 release, Dec 15, 2022.
    
    * Update Icepack to E3SM-Project/Icepack #87db73ba6d93747a9, current head of cice-consortium/E3SM-icepack-initial-integration Feb 3, 2023
    
    * Update boxchan1e and boxchan1n tests to tfrz_option = 'mushy_old' to recover Consortium main results
    
    Update Icepack to the latest hash on E3SM-Project Icepack cice-consortium/E3SM-icepack-initial-integration, #96f2fc707fc743d7
    
    Prior commit was a merge from CICE Consortium Main, #d466031001cf447bcd64220c842dcd2707f61e9, Sept 29, 2023
    
    * remove icepack
    
    * update icepack
    
    ---------
    
    Co-authored-by: David A. Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    3 people authored Oct 5, 2023
    Copy the full SHA
    deb247b View commit details

Commits on Oct 12, 2023

  1. Copy the full SHA
    2765630 View commit details

Commits on Oct 13, 2023

  1. Remove use of the deprecated "_old" tfrz_options in set_nml files. Th…

    …is (CICE-Consortium#883)
    
    changes answers for some test cases, as expected.
    
    Update tfrz_option implementation to not allow _old options.
    apcraig authored Oct 13, 2023
    Copy the full SHA
    48a92ef View commit details

Commits on Oct 18, 2023

  1. Update Icepack CPP USE_SNICARHC to NO_SNICARHC and update logic (CICE…

    …-Consortium#886)
    
    Update Icepack to version #0c548120ce44382 Oct 16, 2023 includes NO_SNICARHC
    apcraig authored Oct 18, 2023
    Copy the full SHA
    96b43fb View commit details
  2. Remove cicedynB link (CICE-Consortium#887)

    Update documentation
    apcraig authored Oct 18, 2023
    Copy the full SHA
    5ddb74d View commit details
  3. Copy the full SHA
    a9d6dc7 View commit details
  4. Update Documentation to clarify Namelist Inputs (CICE-Consortium#888)

    * Update Documentation to clarify Namelist Inputs
    
    * Update documentation
    apcraig authored Oct 18, 2023
    Copy the full SHA
    6ba070f View commit details
  5. Update update_ocn_f implementation, Add cpl_frazil namelist (CICE-Con…

    …sortium#889)
    
    * Update update_ocn_f implementation
    
    Add cpl_frazil namelist
    
    Add update_ocn_f and cpl_frazil to icepack_init_parameters call, set these
    values inside Icepack at initialization.
    
    Remove update_ocn_f argument from icepack_step_therm2 call
    
    Update runtime_diags and accum_hist to account for new Icepack and
    cpl_frazil implementation.  These may need an addition update later.
    
    * Update documentation
    apcraig authored Oct 18, 2023
    Copy the full SHA
    8916b9f View commit details

Commits on Oct 25, 2023

  1. Add atm_data_version to allow JRA55 forcing filenames to have a uniqu…

    …e version string (CICE-Consortium#876)
    
    * Add jra55date to allow JRA55 forcing to have creation date in file name
    
    * Changed jra55_date to atm_data_date. Added atm_data_date to docs.
    
    * Change jra55_date to atm_data_date. Update JRA55_files to include atm_data_date in file. Update case scripts/namelist.
    
    * change atm_data_date to atm_data_version. Update set_nml.tx1 default to corrected forcing version
    
    * Update doc to have atm_data_version in proper alphabetical order
    
    * Re-add set_nml.jra55. Deleted accitentally
    
    * Fix type-o in atm_data_dir documentation
    
    * Add atm_data_version to set_nml.jra55
    
    * fix spacing after changing atm_data_date to atm_data_version
    
    * Change atm_data_date to atm_data_version
    
    * Comment out JRA55 file debugging
    
    * Update dg_forcing docs to describe atm_data_version string
    
    * Uncomment JRA55 filename check. Added check for debug_forcing before writing output
    
    * Correct doc format/links in dg_forcing.rst
    daveh150 authored Oct 25, 2023
    Copy the full SHA
    d3698fb View commit details

Commits on Oct 26, 2023

  1. ice_dyn_evp: pass 'grid_location' for LKD seabed stress on C grid (CI…

    …CE-Consortium#893)
    
    When the C grid support was added in 078aab4 (Merge cgridDEV branch
    including C grid implementation and other fixes (CICE-Consortium#715), 2022-05-10),
    subroutine ice_dyn_shared::seabed_stress_factor_LKD gained a
    'grid_location' optional argument to indicate where to compute
    intermediate quantities and the seabed stress itself (originally added
    in 0f9f48b (ice_dyn_shared: add optional 'grid_location' argument to
    seabed_stress_factor_LKD, 2021-11-17)). This argument was however
    forgotten in ice_dyn_evp::evp when this subroutine was adapted for the C
    grid in 48c07c6 (ice_dyn_evp: compute seabed stress factor at CD-grid
    locations, 2021-11-17), such that currently the seabed stress is not
    computed at the correct grid location for the C and CD grids.
    
    Fix that by correctly passing the 'grid_location' argument. Note that
    the dummy argument is incorrectly declared as 'intent(inout)' in the
    subroutine, so change that to 'intent(in)' so we can pass in character
    constants.
    
    Closes: CICE-Consortium#891
    phil-blain authored Oct 26, 2023
    Copy the full SHA
    624c28b View commit details
  2. Copy the full SHA
    b4abca4 View commit details
  3. doc: update histfreq_base and hist_avg descriptions (CICE-Consortium#898

    )
    
    * doc: ug_implementation.rst: do not use curly quotes
    
    The namelist excerpt in section 'History' of the Implementation part of
    the user guide uses curly quotes (’) instead of regular straight quotes
    ('). This is probably a remnant of the LaTeX version of the doc. These
    quotes can't be used in Fortran and so copy pasting from the doc to the
    namelist causes runtime failures. Use straigth quotes instead.
    
    * doc: ug_implementation.rst: align histfreq_n with histfreq
    
    Align frequencies with their respective streams, which makes the example
    clearer.
    
    * doc: ug_implementation.rst: avoid "now" and "still"
    
    The documentation talks about the current version of the code, so it is
    unnecessary to use words like "now" and "still" to talk about the model
    features. Remove them.
    
    * doc: ug_implementation.rst: mention histfreq_base and hist_avg are per-stream
    
    In 35ec167 (Add functionality to change hist_avg for each stream
    (CICE-Consortium#827), 2023-05-17), hist_avg was made into an array, allowing each
    stream to individually be set to instantaneous or averaged mode. The
    first paragraph of the "History" section of the user guide was updated,
    but another paragraph a little below was not.
    
    In 933b148 (Extend restart output controls, provide multiple frequency
    options (CICE-Consortium#850), 2023-08-24), histfreq_base was also made into an array,
    but the "History" section of the user guide was not updated.
    
    Adjust the wording of the doc to reflect the fact that both hist_avg and
    histfreq_base are per-stream. Also adjust the namelist excerpt to make
    histfreq_base an array, and align hist_avg with it.
    
    * doc: ug_implementation.rst: refer to 'timemanager' after mentioning histfreq_base
    
    In 34dc667 (Namelist option for time axis position. (CICE-Consortium#839),
    2023-07-06), the namelist option hist_time_axis was added, and the
    "History" section of the user guide updated to mention it.
    
    The added sentence, however, separates the mention of 'histfreq_base'
    and the reference to the "Time manager" section, which explains the
    different allowed values for that variable. Move the reference up so
    both are next to each other.
    phil-blain authored Oct 26, 2023
    Copy the full SHA
    2e13606 View commit details

Commits on Oct 27, 2023

  1. Copy the full SHA
    0b5ca09 View commit details
  2. Split N/E grid computation out of Tlonlat, create NElonlat subroutine. (

    CICE-Consortium#899)
    
    * Split N/E grid computation out of Tlonlat, create NElonlat subroutine.
    
    See CICE-Consortium#897
    
    When TLON, TLAT, ANGLET are on the CICE grid, Tlonlat is NOT called.  This
    meant N and E grid info was never computed.  This would fail during history
    writing with invalid values in N and E grid arrays.  And it would also
    cause problem if the C-grid were run with this type of CICE grid.
    
    There are no test grids that have TLON, TLAT, ANGLET on them, so this
    error was not found in standard test suites.  This was detected by
    users.
    
    * Add gx3 grid/kmt files with TLON, TLAT, ANGLET netcdf grid test.
    
    The grid and kmt files were produced from a gx3 history file.  Results
    are not bit-for-bit with the standard gx3 runs, but seem to be roundoff
    different initially (as expected).
    apcraig authored Oct 27, 2023
    Copy the full SHA
    0484dcd View commit details
  3. Copy the full SHA
    32f233d View commit details
  4. Copy the full SHA
    ea241fa View commit details

Commits on Oct 28, 2023

  1. Copy the full SHA
    4450a3e View commit details

Commits on Nov 10, 2023

  1. Rename sum to asum, as "sum" is also a generic fortran function (CICE…

    …-Consortium#905)
    
    Co-authored-by: Mads Hvid Ribergaard <mhri@3vsrvp2.usr.dmi.dk>
    mhrib and Mads Hvid Ribergaard authored Nov 10, 2023
    Copy the full SHA
    5d09123 View commit details

Commits on Nov 16, 2023

  1. New 1d evp solver (CICE-Consortium#895)

    * New 1d evp solver
    
    * Small changes incl timer names and inclued private/publice in ice_dyn_core1d
    
    * fixed bug on gnu debug
    
    * moved halo update to evp1d, added deallocation, fixed bug
    
    * fixed deallocation dyn_evp1d
    
    * bugfix deallocate
    
    * Remove gather strintx and strinty
    
    * removed 4 test with evp1d and c/cd grid
    
    * Update of evp1d implementation
    
    - Rename halo_HTE_HTN to global_ext_halo and move into ice_grid.F90
    - Generalize global_ext_halo to work with any nghost size (was hardcoded for nghost=1)
    - Remove argument from dyn_evp1d_init, change to "use" of global grid variables
    - rename pgl_global_ext to save_ghte_ghtn
    - Update allocation of G_HTE, G_HTN
    - Add dealloc_grid to deallocate G_HTE and G_HTN at end of initialization
    - Add calls to dealloc_grid to all CICE_InitMod.F90 subroutines
    - Make dimension of evp1d arguments implicit size more consistently
    - Clean up indentation and formatting a bit
    
    * Clean up trailing blanks
    
    * resolved name conflicts
    
    * 1d grid var name change
    
    ---------
    
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    TillRasmussen and apcraig authored Nov 16, 2023
    Copy the full SHA
    8573ba8 View commit details

Commits on Nov 17, 2023

  1. Add missing logical "timer_stats" (CICE-Consortium#910)

    Co-authored-by: Mads Hvid Ribergaard <mhri@3vsrvp2.usr.dmi.dk>
    mhrib and Mads Hvid Ribergaard authored Nov 17, 2023
    Copy the full SHA
    d14bb69 View commit details

Commits on Nov 20, 2023

  1. Copy the full SHA
    1cf109b View commit details

Commits on Nov 23, 2023

  1. ice_history: refactor CMIP history variables (CICE-Consortium#906)

    * ice_flux: zero-initialize divu and shear in init_history_dyn
    
    'divu' and 'shear' are accessed in 'accum_hist' when writing the initial
    condition before they are initialized at the start of {eap, evp,
    implicit_solver}. This leads to runtime error when compiling with NaN
    initialization.
    
    Zero-initialize 'divu' and 'shear' in init_history_dyn, where the
    related variable 'strength' is already zero-initialized.
    
    * ice_history_shared: disallow 'x' in history frequency variables f_*'
    
    In the current code, nothing prevents users from leaving 'x' along with
    active frequencies in the individual namelist history frequency
    variables, for example:
    
        f_aice = 'xmd'
    
    This configuration does not work correctly, however. The corresponding
    history fields are correctly defined in
    ice_history_shared::define_hist_field, but since the calls to
    ice_history_shared::accum_hist_field in ice_history::accum_hist are only
    done after checking that the first element of each frequency variable is
    not 'x', the corresponding variables in the history files are all zero.
    
    Prevent that behaviour by actually disallowing 'x' in history frequency
    variables if any other frequencies are active. To implement that, add a
    check in the loop in define_hist_field, which loops through vhistfreq,
    (corresponding to f_aice, etc. in ice_history). Since this subroutine
    initializes 'id(:)' to zero and then writes a (non-zero) index in 'id'
    for any active frequency, it suffices to check that all previous indices
    are non-zero.
    
    * ice_history: remove uneeded conditions around CMIP history variables
    
    In ice_history::accum_hist, after the calls to accum_hist, we loop on
    the different output streams, and on the history variables in the
    avail_hist_fields array, to mask out land points and convert units for
    each output variable.
    
    Since 3c99e10 (Update CICE with CMIP changes. (CICE-Consortium#191), 2018-09-27), we
    also use this loop to do a special treatment for some CMIP variables
    (namely, averaging them only for time steps where ice is present, and
    masking points where ice is absent).
    
    This adjustment is done if the corresponding output frequency variable
    (f_sithick, etc.) does not have 'x' as its first element, and if the
    corresponding index in avail_hist_field for that variable/frequency
    (n_sithick(ns)) is not zero. Both conditions are in fact uneeded since
    they are always true.
    
    The first condition is always true because if the variable is found in
    the avail_hist_field array, which is ensured by the condition on line
    3645, then necessarily its corresponding namelist output frequency won't
    have 'x' as its first character (since this is enforced in
    ice_history_shared::define_hist_field).
    
    The second condition is always true because if the variable is found in
    the avail_hist_field array, then necessarily its index in that array,
    n_<var>(ns), is non-zero (see ice_history_shared::define_hist_field).
    
    Remove these uneeded conditions. This commit is best viewed with
    
        git show --color-moved --color-moved-ws=allow-indentation-change
    
    * ice_history: use loop index directly for CMIP variables
    
    In ice_history::accum_hist, there is a special treatment for some CMIP
    variables where they are averaged only for time steps where ice is
    present, and points where there is no ice are masked. This is done on
    the loop on output streams (with loop index n).
    
    This special averaging is done by accessing a2D and a3Dc using the
    variable n_<var>(ns), which corresponds to the index in the
    avail_hist_field array where this history variable/frequency is defined.
    By construction, this index correponds to the loop index 'n', for both
    the 2D and the 3D loops. Simplify the code by using 'n' directly.
    
    * ice_history_shared: add two logical components to ice_hist_field
    
    At the end of ice_history::accum_hist, we do a special processing for
    some CMIP variables: we average them only for time steps where ice is
    present, and also mask ice-free points. The code to do that is repeated
    for each variable to which it applies.
    
    In order to reduce code duplication, let's introduce two new logical
    components to our 'ice_hist_field' type, defaulting them to .false., and make them optional
    arguments in ice_history_shared::define_hist_field. This allows us to
    avoid defining them for each output variable. We'll set them for CMIP
    variables in a following commit.
    
    * ice_history: set avg_ice_present, mask_ice_free_points for relevant CMIP variables
    
    In the previous commit, we added two components to type ice_hist_field
    (avg_ice_present and mask_ice_free_points), relating to some special
    treatment for CMIP variables (whether to average only for time steps
    where the ice is present and to mask ice-free points).
    
    Set these to .true. in the call to 'define_hist_field' for the relevant
    2D variables [1], and set only 'avg_ice_present' to .true. for the 3D
    variables siitdthick and siitdsnthick, corresponding to the code under
    the "Mask out land points and convert units" loop in
    ice_history::accum_hist.
    
    [1]
    sithick
    siage
    sisnthick
    sitemptop
    sitempsnic
    sitempbot
    siu
    siv
    sidmasstranx
    sistrxdtop
    sistrydtop
    sistrxubot
    sistryubot
    sicompstren
    sispeed
    sidir
    sialb
    sihc
    siflswdtop
    siflswutop
    siflswdbot
    sifllwdtop
    sifllwutop
    siflsenstop
    siflsensupbot
    sifllatstop
    siflcondtop
    siflcondbot
    sipr
    sifb
    siflsaltbot
    siflfwbot
    siflfwdrain
    sidragtop
    sirdgthick
    siforcetiltx
    siforcetilty
    siforcecoriolx
    siforcecorioly
    siforceintstrx
    siforceintstry
    
    * ice_history: use avg_ice_present, mask_ice_free_points to reduce duplication
    
    Some CMIP variables are processed differently in
    ice_history::accum_hist: they are averaged only for time steps when ice
    is present, and points where ice is absent are masked. This processing
    is repeated for each of these variables in the 2D and 3Dc loops.
    
    To reduce code duplication, use the new components avg_ice_present and
    mask_ice_free_points of ice_hist_field to perform this processing only
    for variables that were defined accordingly. The relevant variables
    already have those components defined as of the previous commit.
    
    Note that we still need a separate loop for the variable 'sialb' (sea
    ice albedo) to mask points below the horizon.
    phil-blain authored Nov 23, 2023
    Copy the full SHA
    509e2c3 View commit details

Commits on Nov 28, 2023

  1. Update Icepack to #f6ff8f7c4d4cb6f (CICE-Consortium#913)

    * Update Icepack to #f6ff8f7c4d4cb6f
    
    Split the developer guide infrastructure section from the dynamics documentation
    
    Add a coding standard section to the documentation
    
    Add a couple sentences about the state of the parameter nghost to the documentation
    
    Update opticep to use the latest main code for the unit test
    
    * update documentation
    apcraig authored Nov 28, 2023
    Copy the full SHA
    21fab16 View commit details
  2. ice_history: allow per-stream suffix for history filenames (CICE-Cons…

    …ortium#912)
    
    * Add capability for h extension
    
    * Update documentation for hist_str
    
    * Change hist_str to hist_suffix
    
    * Change in default namelist
    
    * Update doc/source/cice_index.rst
    
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
    
    * One more hist_str
    
    ---------
    
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
    dabail10 and phil-blain authored Nov 28, 2023
    Copy the full SHA
    b14cedf View commit details

Commits on Dec 21, 2023

  1. Fix single channel debug failure, Update github actions testing (CICE…

    …-Consortium#922)
    
    * update ghactions testing
    
    * refactor min/max global reductions, code away from huge which was giving MPI some problems.
    apcraig authored Dec 21, 2023
    Copy the full SHA
    37f9a98 View commit details

Commits on Jan 11, 2024

  1. First round of housekeeping on ice_grid (CICE-Consortium#921)

    * removal of unused variables.
    
    * moved xav to transport. Could remove commented code. Could remove xav and yav as they are zero
    
    * Move derived parameters and only allocate if needed
    
    * bugfixes for cxp, cyp...
    
    * fix index and remove commented code in ice_grid
    
    * new version of transport_remap. xav, yav array where needed. xxav, yyav parameter
    
    * Removed comments rom ice_transport_remap and arrays for nonuniform grids
    TillRasmussen authored Jan 11, 2024
    Copy the full SHA
    1314e17 View commit details
Showing with 20,073 additions and 11,471 deletions.
  1. +1 −1 .github/PULL_REQUEST_TEMPLATE.md
  2. +40 −12 .github/workflows/test-cice.yml
  3. +1 −1 .gitmodules
  4. +29 −0 .readthedocs.yaml
  5. BIN LICENSE.pdf
  6. +6 −6 cice.setup
  7. +5 −162 cicecore/cicedyn/analysis/ice_diagnostics.F90
  8. +3 −222 cicecore/cicedyn/analysis/ice_diagnostics_bgc.F90
  9. +156 −587 cicecore/cicedyn/analysis/ice_history.F90
  10. +17 −113 cicecore/cicedyn/analysis/ice_history_bgc.F90
  11. +3 −3 cicecore/cicedyn/analysis/ice_history_pond.F90
  12. +96 −23 cicecore/cicedyn/analysis/ice_history_shared.F90
  13. +1 −1 cicecore/cicedyn/analysis/ice_history_snow.F90
  14. +671 −0 cicecore/cicedyn/dynamics/ice_dyn_core1d.F90
  15. +19 −3 cicecore/cicedyn/dynamics/ice_dyn_eap.F90
  16. +441 −412 cicecore/cicedyn/dynamics/ice_dyn_evp.F90
  17. +1,467 −0 cicecore/cicedyn/dynamics/ice_dyn_evp1d.F90
  18. +0 −1,921 cicecore/cicedyn/dynamics/ice_dyn_evp_1d.F90
  19. +112 −19 cicecore/cicedyn/dynamics/ice_dyn_shared.F90
  20. +37 −47 cicecore/cicedyn/dynamics/ice_dyn_vp.F90
  21. +12 −17 cicecore/cicedyn/dynamics/ice_transport_driver.F90
  22. +246 −267 cicecore/cicedyn/dynamics/ice_transport_remap.F90
  23. +15 −14 cicecore/cicedyn/general/ice_flux.F90
  24. +0 −6 cicecore/cicedyn/general/ice_flux_bgc.F90
  25. +167 −410 cicecore/cicedyn/general/ice_forcing.F90
  26. +3 −212 cicecore/cicedyn/general/ice_forcing_bgc.F90
  27. +401 −147 cicecore/cicedyn/general/ice_init.F90
  28. +2 −0 cicecore/cicedyn/general/ice_state.F90
  29. +48 −61 cicecore/cicedyn/general/ice_step_mod.F90
  30. +2 −129 cicecore/cicedyn/infrastructure/comm/mpi/ice_boundary.F90
  31. +32 −28 cicecore/cicedyn/infrastructure/comm/mpi/ice_exit.F90
  32. +18 −18 cicecore/cicedyn/infrastructure/comm/mpi/ice_gather_scatter.F90
  33. +183 −94 cicecore/cicedyn/infrastructure/comm/mpi/ice_global_reductions.F90
  34. +17 −17 cicecore/cicedyn/infrastructure/comm/mpi/ice_reprosum.F90
  35. +26 −26 cicecore/cicedyn/infrastructure/comm/mpi/ice_timers.F90
  36. +2 −130 cicecore/cicedyn/infrastructure/comm/serial/ice_boundary.F90
  37. +47 −22 cicecore/cicedyn/infrastructure/comm/serial/ice_exit.F90
  38. +16 −16 cicecore/cicedyn/infrastructure/comm/serial/ice_gather_scatter.F90
  39. +183 −94 cicecore/cicedyn/infrastructure/comm/serial/ice_global_reductions.F90
  40. +42 −42 cicecore/cicedyn/infrastructure/comm/serial/ice_timers.F90
  41. +27 −27 cicecore/cicedyn/infrastructure/ice_blocks.F90
  42. +92 −79 cicecore/cicedyn/infrastructure/ice_domain.F90
  43. +321 −316 cicecore/cicedyn/infrastructure/ice_grid.F90
  44. +35 −2 cicecore/cicedyn/infrastructure/ice_memusage.F90
  45. +637 −655 cicecore/cicedyn/infrastructure/ice_read_write.F90
  46. +6 −4 cicecore/cicedyn/infrastructure/ice_restart_driver.F90
  47. +1 −1 cicecore/cicedyn/infrastructure/ice_restoring.F90
  48. +18 −17 cicecore/cicedyn/infrastructure/io/io_binary/ice_history_write.F90
  49. +24 −31 cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90
  50. +1,080 −1,047 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90
  51. +281 −221 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90
  52. +723 −577 cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90
  53. +162 −65 cicecore/cicedyn/infrastructure/io/io_pio2/ice_pio.F90
  54. +588 −554 cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
  55. +0 −1 cicecore/cicedynB
  56. +2 −2 cicecore/drivers/direct/hadgem3/CICE.F90
  57. +8 −8 cicecore/drivers/direct/hadgem3/CICE_InitMod.F90
  58. +5 −3 cicecore/drivers/direct/hadgem3/CICE_RunMod.F90
  59. +8 −8 cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90
  60. +5 −3 cicecore/drivers/direct/nemo_concepts/CICE_RunMod.F90
  61. +8 −7 cicecore/drivers/mct/cesm1/CICE_InitMod.F90
  62. +6 −4 cicecore/drivers/mct/cesm1/CICE_RunMod.F90
  63. +2 −2 cicecore/drivers/mct/cesm1/CICE_copyright.txt
  64. +3 −3 cicecore/drivers/mct/cesm1/ice_import_export.F90
  65. +2 −1 cicecore/drivers/mct/cesm1/ice_prescribed_mod.F90
  66. +13 −14 cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
  67. +29 −22 cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90
  68. +2 −2 cicecore/drivers/nuopc/cmeps/CICE_copyright.txt
  69. +80 −12 cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90
  70. +111 −19 cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
  71. +186 −168 cicecore/drivers/nuopc/cmeps/ice_import_export.F90
  72. +16 −22 cicecore/drivers/nuopc/cmeps/ice_mesh_mod.F90
  73. +34 −28 cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90
  74. +2 −2 cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90
  75. +2 −2 cicecore/drivers/nuopc/dmi/CICE.F90
  76. +9 −8 cicecore/drivers/nuopc/dmi/CICE_FinalMod.F90
  77. +12 −13 cicecore/drivers/nuopc/dmi/CICE_InitMod.F90
  78. +31 −30 cicecore/drivers/nuopc/dmi/CICE_RunMod.F90
  79. +2 −2 cicecore/drivers/standalone/cice/CICE.F90
  80. +14 −14 cicecore/drivers/standalone/cice/CICE_InitMod.F90
  81. +13 −16 cicecore/drivers/standalone/cice/CICE_RunMod.F90
  82. +66 −22 cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90
  83. +66 −22 cicecore/drivers/unittest/halochk/CICE_InitMod.F90
  84. +122 −38 cicecore/drivers/unittest/optargs/optargs.F90
  85. +76 −40 cicecore/drivers/unittest/optargs/optargs_subs.F90
  86. +59 −0 cicecore/drivers/unittest/opticep/CICE.F90
  87. +71 −0 cicecore/drivers/unittest/opticep/CICE_FinalMod.F90
  88. +517 −0 cicecore/drivers/unittest/opticep/CICE_InitMod.F90
  89. +738 −0 cicecore/drivers/unittest/opticep/CICE_RunMod.F90
  90. +30 −0 cicecore/drivers/unittest/opticep/README
  91. +3,021 −0 cicecore/drivers/unittest/opticep/ice_init_column.F90
  92. +1,770 −0 cicecore/drivers/unittest/opticep/ice_step_mod.F90
  93. +66 −23 cicecore/drivers/unittest/sumchk/CICE_InitMod.F90
  94. +34 −25 cicecore/drivers/unittest/sumchk/sumchk.F90
  95. +18 −90 cicecore/shared/ice_arrays_column.F90
  96. +46 −31 cicecore/shared/ice_calendar.F90
  97. +436 −650 cicecore/shared/ice_distribution.F90
  98. +1 −10 cicecore/shared/ice_domain_size.F90
  99. +11 −11 cicecore/shared/ice_fileunits.F90
  100. +27 −141 cicecore/shared/ice_init_column.F90
  101. +8 −86 cicecore/shared/ice_restart_column.F90
  102. +9 −2 cicecore/shared/ice_restart_shared.F90
  103. +1 −1 cicecore/version.txt
  104. +4 −2 configuration/scripts/Makefile
  105. +62 −3 configuration/scripts/cice.batch.csh
  106. +3 −0 configuration/scripts/cice.build
  107. +48 −3 configuration/scripts/cice.launch.csh
  108. +1 −0 configuration/scripts/cice.settings
  109. +2 −1 configuration/scripts/cice_decomp.csh
  110. +56 −0 configuration/scripts/ciceplots.csh
  111. +148 −0 configuration/scripts/ciceplots2d.py
  112. +34 −8 configuration/scripts/ice_in
  113. +0 −56 configuration/scripts/machines/Macros.badger_intel
  114. +60 −0 configuration/scripts/machines/Macros.carpenter_cray
  115. +69 −0 configuration/scripts/machines/Macros.carpenter_gnu
  116. +69 −0 configuration/scripts/machines/Macros.carpenter_gnuimpi
  117. +59 −0 configuration/scripts/machines/Macros.carpenter_intel
  118. +59 −0 configuration/scripts/machines/Macros.carpenter_intelimpi
  119. +3 −3 configuration/scripts/machines/Macros.cheyenne_gnu
  120. +3 −3 configuration/scripts/machines/Macros.cheyenne_intel
  121. +3 −3 configuration/scripts/machines/Macros.cheyenne_pgi
  122. +58 −0 configuration/scripts/machines/Macros.chicoma_intel
  123. +1 −1 configuration/scripts/machines/Macros.compy_intel
  124. +14 −6 configuration/scripts/machines/Macros.conda_macos
  125. +66 −0 configuration/scripts/machines/Macros.derecho_cray
  126. +75 −0 configuration/scripts/machines/Macros.derecho_gnu
  127. +62 −0 configuration/scripts/machines/Macros.derecho_intel
  128. +62 −0 configuration/scripts/machines/Macros.derecho_intelclassic
  129. +62 −0 configuration/scripts/machines/Macros.derecho_inteloneapi
  130. +68 −0 configuration/scripts/machines/Macros.derecho_nvhpc
  131. +3 −3 configuration/scripts/machines/Macros.freya_intel
  132. +73 −0 configuration/scripts/machines/Macros.gadi_intel
  133. +1 −1 configuration/scripts/machines/Macros.gaffney_gnu
  134. +1 −1 configuration/scripts/machines/Macros.gaffney_intel
  135. +1 −1 configuration/scripts/machines/Macros.izumi_nag
  136. +1 −1 configuration/scripts/machines/Macros.koehr_intel
  137. +1 −1 configuration/scripts/machines/Macros.mustang_intel18
  138. +1 −1 configuration/scripts/machines/Macros.mustang_intel19
  139. +1 −1 configuration/scripts/machines/Macros.mustang_intel20
  140. +2 −2 configuration/scripts/machines/Macros.onyx_intel
  141. +56 −0 configuration/scripts/machines/Macros.perlmutter_cray
  142. +57 −0 configuration/scripts/machines/Macros.perlmutter_gnu
  143. +57 −0 configuration/scripts/machines/Macros.perlmutter_intel
  144. +0 −47 configuration/scripts/machines/env.badger_intel
  145. +54 −0 configuration/scripts/machines/env.carpenter_cray
  146. +58 −0 configuration/scripts/machines/env.carpenter_gnu
  147. +58 −0 configuration/scripts/machines/env.carpenter_gnuimpi
  148. +57 −0 configuration/scripts/machines/env.carpenter_intel
  149. +57 −0 configuration/scripts/machines/env.carpenter_intelimpi
  150. +10 −10 configuration/scripts/machines/env.cheyenne_gnu
  151. +10 −10 configuration/scripts/machines/env.cheyenne_intel
  152. +10 −10 configuration/scripts/machines/env.cheyenne_pgi
  153. +71 −0 configuration/scripts/machines/env.chicoma_intel
  154. +74 −0 configuration/scripts/machines/env.derecho_cray
  155. +74 −0 configuration/scripts/machines/env.derecho_gnu
  156. +74 −0 configuration/scripts/machines/env.derecho_intel
  157. +74 −0 configuration/scripts/machines/env.derecho_intelclassic
  158. +74 −0 configuration/scripts/machines/env.derecho_inteloneapi
  159. +74 −0 configuration/scripts/machines/env.derecho_nvhpc
  160. +56 −0 configuration/scripts/machines/env.gadi_intel
  161. +4 −3 configuration/scripts/machines/env.hera_intel
  162. +5 −5 configuration/scripts/machines/env.nrlssc_gnu
  163. +6 −6 configuration/scripts/machines/env.onyx_cray
  164. +6 −6 configuration/scripts/machines/env.onyx_gnu
  165. +6 −6 configuration/scripts/machines/env.onyx_intel
  166. +51 −0 configuration/scripts/machines/env.perlmutter_cray
  167. +51 −0 configuration/scripts/machines/env.perlmutter_gnu
  168. +51 −0 configuration/scripts/machines/env.perlmutter_intel
  169. +4 −0 configuration/scripts/machines/environment.yml
  170. +1 −0 configuration/scripts/options/set_env.iopio1
  171. +0 −1 configuration/scripts/options/set_env.iopio1p
  172. +0 −1 configuration/scripts/options/set_env.iopio2p
  173. +2 −0 configuration/scripts/options/set_env.opticep
  174. +1 −0 configuration/scripts/options/set_env.snicar
  175. +1 −1 configuration/scripts/options/set_nml.alt01
  176. +1 −0 configuration/scripts/options/set_nml.alt04
  177. +1 −1 configuration/scripts/options/set_nml.alt06
  178. +2 −0 configuration/scripts/options/set_nml.bgcskl
  179. +1 −0 configuration/scripts/options/set_nml.bgcsklclim
  180. +1 −0 configuration/scripts/options/set_nml.bgcz
  181. +1 −0 configuration/scripts/options/set_nml.bgczclim
  182. +1 −0 configuration/scripts/options/set_nml.bgczm
  183. +1 −1 configuration/scripts/options/set_nml.boxadv
  184. +56 −0 configuration/scripts/options/set_nml.boxchan1e
  185. +56 −0 configuration/scripts/options/set_nml.boxchan1n
  186. +1 −0 configuration/scripts/options/set_nml.boxnodyn
  187. +2 −0 configuration/scripts/options/set_nml.congel
  188. +13 −0 configuration/scripts/options/set_nml.e3sm
  189. +74 −0 configuration/scripts/options/set_nml.e3smbgc
  190. +3 −2 configuration/scripts/options/set_nml.gx1
  191. +3 −2 configuration/scripts/options/set_nml.gx3
  192. +3 −0 configuration/scripts/options/set_nml.gx3nc
  193. +1 −1 configuration/scripts/options/set_nml.gx3ncarbulk
  194. +2 −1 configuration/scripts/options/set_nml.histall
  195. +2 −1 configuration/scripts/options/set_nml.histdbg
  196. +2 −1 configuration/scripts/options/set_nml.histinst
  197. +2 −0 configuration/scripts/options/set_nml.iobinary
  198. +2 −0 configuration/scripts/options/set_nml.iocdf1
  199. +2 −0 configuration/scripts/options/set_nml.iocdf2
  200. +2 −0 configuration/scripts/options/set_nml.iocdf5
  201. +2 −0 configuration/scripts/options/set_nml.iohdf5
  202. +4 −0 configuration/scripts/options/set_nml.iohdf5opts
  203. +0 −2 configuration/scripts/options/set_nml.iopio1
  204. +0 −2 configuration/scripts/options/set_nml.iopio1p
  205. +0 −2 configuration/scripts/options/set_nml.iopio2
  206. +0 −2 configuration/scripts/options/set_nml.iopio2p
  207. +10 −0 configuration/scripts/options/set_nml.iopioopts
  208. +2 −0 configuration/scripts/options/set_nml.iopnetcdf1
  209. +2 −0 configuration/scripts/options/set_nml.iopnetcdf2
  210. +2 −0 configuration/scripts/options/set_nml.iopnetcdf5
  211. +4 −0 configuration/scripts/options/set_nml.jra55
  212. +3 −0 configuration/scripts/options/set_nml.jra55do
  213. +1 −1 configuration/scripts/options/set_nml.qc
  214. +1 −1 configuration/scripts/options/set_nml.run3dt
  215. +7 −0 configuration/scripts/options/set_nml.run8year
  216. +3 −0 configuration/scripts/options/set_nml.snicar
  217. +3 −0 configuration/scripts/options/set_nml.snicartest
  218. +3 −2 configuration/scripts/options/set_nml.tx1
  219. +0 −8 configuration/scripts/options/set_nml.zsal
  220. +11 −0 configuration/scripts/tests/base_suite.ts
  221. +23 −8 configuration/scripts/tests/baseline.script
  222. +11 −1 configuration/scripts/tests/comparelog.csh
  223. +27 −24 configuration/scripts/tests/decomp_suite.ts
  224. +6 −0 configuration/scripts/tests/e3sm_suite.ts
  225. +9 −9 configuration/scripts/tests/first_suite.ts
  226. +45 −36 configuration/scripts/tests/gridsys_suite.ts
  227. +41 −67 configuration/scripts/tests/io_suite.ts
  228. +0 −6 configuration/scripts/tests/omp_suite.ts
  229. +24 −24 configuration/scripts/tests/perf_suite.ts
  230. +1 −1 configuration/scripts/tests/prod_suite.ts
  231. +20 −1 configuration/scripts/tests/unittest_suite.ts
  232. +0 −129 configuration/scripts/timeseries.csh
  233. +59 −41 configuration/scripts/timeseries.py
  234. +29 −13 doc/source/cice_index.rst
  235. +3 −3 doc/source/conf.py
  236. +56 −0 doc/source/developer_guide/dg_about.rst
  237. +0 −79 doc/source/developer_guide/dg_dynamics.rst
  238. +15 −8 doc/source/developer_guide/dg_forcing.rst
  239. +86 −0 doc/source/developer_guide/dg_infra.rst
  240. +3 −3 doc/source/developer_guide/dg_other.rst
  241. +3 −2 doc/source/developer_guide/dg_scripts.rst
  242. +2 −2 doc/source/developer_guide/dg_tools.rst
  243. +1 −0 doc/source/developer_guide/index.rst
  244. +1 −1 doc/source/intro/about.rst
  245. +1 −1 doc/source/intro/citing.rst
  246. +1 −1 doc/source/intro/copyright.rst
  247. +5 −5 doc/source/master_list.bib
  248. +3 −4 doc/source/science_guide/sg_coupling.rst
  249. +23 −21 doc/source/science_guide/sg_dynamics.rst
  250. +2 −2 doc/source/science_guide/sg_fundvars.rst
  251. +13 −6 doc/source/science_guide/sg_horiztrans.rst
  252. +1 −1 doc/source/science_guide/sg_tracers.rst
  253. +96 −34 doc/source/user_guide/ug_case_settings.rst
  254. +207 −120 doc/source/user_guide/ug_implementation.rst
  255. +107 −82 doc/source/user_guide/ug_running.rst
  256. +13 −6 doc/source/user_guide/ug_testing.rst
  257. +2 −5 doc/source/user_guide/ug_troubleshooting.rst
  258. +1 −1 icepack
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -29,4 +29,4 @@ please refer to: <https://github.com/CICE-Consortium/About-Us/wiki/Resource-Inde
- [ ] No, does the documentation need to be updated at a later time?
- [ ] Yes
- [ ] No
- [ ] Please provide any additional information or relevant details below:
- [ ] Please document the changes in detail, including _why_ the changes are made. This will become part of the PR commit log.
52 changes: 40 additions & 12 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ name: GHActions
on:
push:
branches:
- master
- main
- 'CICE*'
- 'ghactions*'
pull_request:
@@ -27,8 +27,12 @@ jobs:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
# os: [macos-13]
# os: [ubuntu-latest]
include:
# - os: macos-13
# envdef: macos
# minicond: Miniconda3-latest-MacOSX-x86_64.sh
- os: macos-latest
envdef: macos
minicond: Miniconda3-latest-MacOSX-x86_64.sh
@@ -42,7 +46,6 @@ jobs:
run: |
sudo xcode-select -r
sudo xcode-select -s /Library/Developer/CommandLineTools
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/
echo "xcrun --show-sdk-path: $(xcrun --show-sdk-path)"
echo "xcode-select -p: $(xcode-select -p)"
- name: system info
@@ -51,7 +54,7 @@ jobs:
type wget
type curl
type csh
echo "readlink \$(which csh): $(python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $(which csh))"
echo "readlink \$(which csh): $(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' $(which csh))"
echo "csh --version: $(csh --version)"
echo "uname -a: $(uname -a)"
echo "sw_vers: $(sw_vers)"
@@ -98,10 +101,26 @@ jobs:
conda env create -f configuration/scripts/machines/environment.yml
- name: check conda env
run: |
conda activate cice && which mpicc && which mpifort && which make
conda activate cice && which clang && which gfortran && which mpicc && which mpifort && which make
clang --version
gfortran --version
mpifort --version
mpicc --version
make --version
# echo "mpifort -v:"
# mpifort -v
# echo "mpifort --showme:compile:"
# mpifort --showme:compile
# echo "mpifort --showme:link:"
# mpifort --showme:link
# echo "mpifort --showme:command:"
# mpifort --showme:command
# echo "mpifort --showme:libdirs:"
# mpifort --showme:libdirs
# echo "mpifort --showme:libs:"
# mpifort --showme:libs
# echo "mpifort --showme:incdirs:"
# mpifort --showme:incdirs
- name: check setup case
run: |
cd $HOME/cice
@@ -110,19 +129,28 @@ jobs:
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test smoke --testid c0
# - name: compile case
# run: |
# cd $HOME/cice
# ./cice.setup -m conda -e ${{ matrix.envdef }} -c case1
# cd case1
# ./cice.build
- name: run hello world unit test
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test unittest --pes 2x1 -s helloworld --testid hw01
cd *helloworld*hw01
./cice.build
./cice.run
- name: check cice compile
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} -c case1 --pes 2x2 -s diag1
cd case1
./cice.build
- name: download input data
run: |
cd $HOME/cice-dirs/input
wget --progress=dot:giga https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/records/10419929/files/CICE_data_gx3_forcing_JRA55_200501_20231220.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55_200501_20231220.tar.gz
pwd
cd CICE_data/forcing/gx3/JRA55/8XDAILY
ln -s JRA55_gx3_03hr_forcing_200501.nc JRA55_gx3_03hr_forcing_2005.nc
cd $HOME/cice-dirs/input
ls -alR
# - name: run case
# run: |
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "icepack"]
path = icepack
url = https://github.com/cice-consortium/Icepack
url = https://github.com/cice-consortium/icepack
29 changes: 29 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.7"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: doc/requirements.txt
Binary file modified LICENSE.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions cice.setup
Original file line number Diff line number Diff line change
@@ -684,7 +684,7 @@ EOF
set thrd = `echo ${pesx} | cut -d x -f 2`
set blckx = `echo ${pesx} | cut -d x -f 3`
set blcky = `echo ${pesx} | cut -d x -f 4`
set mblck = 0
set mblck = -1
if (${task} == 0 || ${thrd} == 0 || ${blckx} == 0 || ${blcky} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
@@ -696,7 +696,7 @@ EOF
set thrd = `echo ${pesx} | cut -d x -f 2`
set blckx = 0
set blcky = 0
set mblck = 0
set mblck = -1
if (${task} == 0 || ${thrd} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
@@ -708,7 +708,7 @@ EOF
set thrd = 1
set blckx = 0
set blcky = 0
set mblck = 0
set mblck = -1
if (${task} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
@@ -757,7 +757,7 @@ EOF
# update pesx based on use defined settings and machine limits to reflect actual value
set pesx = ${task}x${thrd}x${blckx}x${blcky}x${mblck}
if (${mblck} == 0) then
if (${mblck} <= 0) then
set pesx = ${task}x${thrd}x${blckx}x${blcky}
endif
if (${blckx} == 0 || ${blcky} == 0) then
@@ -838,7 +838,7 @@ EOF
endif
# from basic script dir to case
foreach file (cice.build cice.settings Makefile ice_in makdep.c setup_run_dirs.csh timeseries.csh timeseries.py)
foreach file (cice.build cice.settings Makefile ice_in makdep.c setup_run_dirs.csh ciceplots.csh ciceplots2d.py timeseries.py)
if !(-e ${ICE_SCRIPTS}/$file) then
echo "${0}: ERROR, ${ICE_SCRIPTS}/$file not found"
exit -1
@@ -1189,7 +1189,7 @@ source ./cice.settings
set bldstat = 0
if (\${dobuild} == true) then
if (\${doreuse} == true) then
set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}.\${ICE_SNICARHC}"
./cice.build --exe \${ciceexe}
set bldstat = \${status}
if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe}
167 changes: 5 additions & 162 deletions cicecore/cicedyn/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ subroutine runtime_diags (dt)
use ice_flux, only: alvdr, alidr, alvdf, alidf, evap, fsnow, frazil, &
fswabs, fswthru, flw, flwout, fsens, fsurf, flat, frzmlt_init, frain, fpond, &
fhocn_ai, fsalt_ai, fresh_ai, frazil_diag, &
update_ocn_f, Tair, Qa, fsw, fcondtop, meltt, meltb, meltl, snoice, &
update_ocn_f, cpl_frazil, Tair, Qa, fsw, fcondtop, meltt, meltb, meltl, snoice, &
dsnow, congel, sst, sss, Tf, fhocn, &
swvdr, swvdf, swidr, swidf, &
alvdr_init, alvdf_init, alidr_init, alidf_init
@@ -261,10 +261,8 @@ subroutine runtime_diags (dt)
!$OMP END PARALLEL DO
extentn = c0
extents = c0
extentn = global_sum(work1, distrb_info, field_loc_center, &
tarean)
extents = global_sum(work1, distrb_info, field_loc_center, &
tareas)
extentn = global_sum(work1, distrb_info, field_loc_center, tarean)
extents = global_sum(work1, distrb_info, field_loc_center, tareas)
extentn = extentn * m2_to_km2
extents = extents * m2_to_km2

@@ -724,8 +722,9 @@ subroutine runtime_diags (dt)
! frazil ice growth !! should not be multiplied by aice
! m/step->kg/m^2/s
work1(:,:,:) = frazil(:,:,:)*rhoi/dt
if (ktherm == 2 .and. .not.update_ocn_f) &
if (.not. update_ocn_f .and. ktherm == 2 .and. cpl_frazil == 'fresh_ice_correction') then
work1(:,:,:) = (frazil(:,:,:)-frazil_diag(:,:,:))*rhoi/dt
endif
frzn = c0
frzs = c0
frzn = global_sum(work1, distrb_info, &
@@ -1945,162 +1944,6 @@ subroutine print_state(plabel,i,j,iblk)
end subroutine print_state

!=======================================================================
#ifdef UNDEPRECATE_print_points_state

! This routine is useful for debugging.

subroutine print_points_state(plabel,ilabel)

use ice_grid, only: grid_ice
use ice_blocks, only: block, get_block
use ice_domain, only: blocks_ice
use ice_domain_size, only: ncat, nilyr, nslyr
use ice_state, only: aice0, aicen, vicen, vsnon, uvel, vvel, &
uvelE, vvelE, uvelE, vvelE, trcrn
use ice_flux, only: uatm, vatm, potT, Tair, Qa, flw, frain, fsnow, &
fsens, flat, evap, flwout, swvdr, swvdf, swidr, swidf, rhoa, &
frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltxU, strtltyU

character (len=*), intent(in),optional :: plabel
integer , intent(in),optional :: ilabel

! local variables

real (kind=dbl_kind) :: &
eidebug, esdebug, &
qi, qs, &
puny

integer (kind=int_kind) :: m, n, k, i, j, iblk, nt_Tsfc, nt_qice, nt_qsno
character(len=256) :: llabel

type (block) :: &
this_block ! block information for current block

character(len=*), parameter :: subname = '(print_points_state)'
! ----------------------

call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno)
call icepack_query_parameters(puny_out=puny)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

do m = 1, npnt
if (my_task == pmloc(m)) then
i = piloc(m)
j = pjloc(m)
iblk = pbloc(m)
this_block = get_block(blocks_ice(iblk),iblk)

if (present(ilabel)) then
write(llabel,'(i6,a1,i3,a1)') ilabel,':',m,':'
else
write(llabel,'(i3,a1)') m,':'
endif
if (present(plabel)) then
write(llabel,'(a)') 'pps:'//trim(plabel)//':'//trim(llabel)
else
write(llabel,'(a)') 'pps:'//trim(llabel)
endif

write(nu_diag,*) subname
write(nu_diag,*) trim(llabel),'istep1, my_task, i, j, iblk=', &
istep1, my_task, i, j, iblk
write(nu_diag,*) trim(llabel),'Global i and j=', &
this_block%i_glob(i), &
this_block%j_glob(j)
write(nu_diag,*) trim(llabel),'aice0=', aice0(i,j,iblk)

do n = 1, ncat
write(nu_diag,*) trim(llabel),'aicen=', n,aicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'vicen=', n,vicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'vsnon=', n,vsnon(i,j,n,iblk)
if (aicen(i,j,n,iblk) > puny) then
write(nu_diag,*) trim(llabel),'hin=', n,vicen(i,j,n,iblk)/aicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'hsn=', n,vsnon(i,j,n,iblk)/aicen(i,j,n,iblk)
endif
write(nu_diag,*) trim(llabel),'Tsfcn=',n,trcrn(i,j,nt_Tsfc,n,iblk)
enddo

eidebug = c0
do n = 1,ncat
do k = 1,nilyr
qi = trcrn(i,j,nt_qice+k-1,n,iblk)
write(nu_diag,*) trim(llabel),'qice= ',n,k, qi
eidebug = eidebug + qi
enddo
enddo
write(nu_diag,*) trim(llabel),'qice=',eidebug

esdebug = c0
do n = 1,ncat
if (vsnon(i,j,n,iblk) > puny) then
do k = 1,nslyr
qs = trcrn(i,j,nt_qsno+k-1,n,iblk)
write(nu_diag,*) trim(llabel),'qsnow=',n,k, qs
esdebug = esdebug + qs
enddo
endif
enddo
write(nu_diag,*) trim(llabel),'qsnow=',esdebug

write(nu_diag,*) trim(llabel),'uvel=',uvel(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvel=',vvel(i,j,iblk)
if (grid_ice == 'C') then
write(nu_diag,*) trim(llabel),'uvelE=',uvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelN=',vvelN(i,j,iblk)
elseif (grid_ice == 'CD') then
write(nu_diag,*) trim(llabel),'uvelE=',uvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelE=',vvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'uvelN=',uvelN(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelN=',vvelN(i,j,iblk)
endif

write(nu_diag,*) ' '
write(nu_diag,*) 'atm states and fluxes'
write(nu_diag,*) ' uatm = ',uatm (i,j,iblk)
write(nu_diag,*) ' vatm = ',vatm (i,j,iblk)
write(nu_diag,*) ' potT = ',potT (i,j,iblk)
write(nu_diag,*) ' Tair = ',Tair (i,j,iblk)
write(nu_diag,*) ' Qa = ',Qa (i,j,iblk)
write(nu_diag,*) ' rhoa = ',rhoa (i,j,iblk)
write(nu_diag,*) ' swvdr = ',swvdr(i,j,iblk)
write(nu_diag,*) ' swvdf = ',swvdf(i,j,iblk)
write(nu_diag,*) ' swidr = ',swidr(i,j,iblk)
write(nu_diag,*) ' swidf = ',swidf(i,j,iblk)
write(nu_diag,*) ' flw = ',flw (i,j,iblk)
write(nu_diag,*) ' frain = ',frain(i,j,iblk)
write(nu_diag,*) ' fsnow = ',fsnow(i,j,iblk)
write(nu_diag,*) ' '
write(nu_diag,*) 'ocn states and fluxes'
write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk)
write(nu_diag,*) ' sst = ',sst (i,j,iblk)
write(nu_diag,*) ' sss = ',sss (i,j,iblk)
write(nu_diag,*) ' Tf = ',Tf (i,j,iblk)
write(nu_diag,*) ' uocn = ',uocn (i,j,iblk)
write(nu_diag,*) ' vocn = ',vocn (i,j,iblk)
write(nu_diag,*) ' strtltxU= ',strtltxU(i,j,iblk)
write(nu_diag,*) ' strtltyU= ',strtltyU(i,j,iblk)
write(nu_diag,*) ' '
write(nu_diag,*) 'srf states and fluxes'
write(nu_diag,*) ' Tref = ',Tref (i,j,iblk)
write(nu_diag,*) ' Qref = ',Qref (i,j,iblk)
write(nu_diag,*) ' Uref = ',Uref (i,j,iblk)
write(nu_diag,*) ' fsens = ',fsens (i,j,iblk)
write(nu_diag,*) ' flat = ',flat (i,j,iblk)
write(nu_diag,*) ' evap = ',evap (i,j,iblk)
write(nu_diag,*) ' flwout = ',flwout(i,j,iblk)
write(nu_diag,*) ' '
call flush_fileunit(nu_diag)

endif ! my_task
enddo ! ncnt

end subroutine print_points_state
#endif
!=======================================================================

! prints error information prior to aborting

Loading