CCSM/ESMF Stage-1 meeting

Tuesday May 16th, 1:30-3:00pm

Directors Conference room

Attending: Brian E., Brian K., Erik, Mariana, Tony and Nancy N.

  • Finish averaging options from last meeting next time, but do go over some issues I need now.
  • Finalize Stage-1 object interfaces
  • Go over Tony and Brian interface suggestions..
  • Alturnatives for time-averaging (next time)
  • Need to include time-averaging of ice/atm up to ocean daily (note for next time)
  • Need to get Stage-1 done and then meet again after it's going?
    (Want to get Stage-1 done by CCSM workshop.)
  • Go over seq_ccsm_drv.F90
    seq_ccsm_drv.F90

    Issues from last time we did NOT cover that I need to know about now...

  • Do I update clocksetup when ReadRestart runs? – no (intent(IN)) Seperate functionality.
  • New inputinfo method: call shr_inputinfo_ArchiveRestart( MasterTask, CCSMInit, async=.false., remove=.true., &
    restart_file=restart_file ) – ok
  • Remove restart_none with restart_option="none" – ok
  • Have restart alarm ring at last time-step so restarts are correctly written out (or ignored if restarts aren't on). – ok
  • Add restart_option "end" to just do restart at end of simulation (this is always on, unless restart_option set to "none") – ok
  • Additional data on restart files
            int shr_timemgr_clock_info_orb_mode ;
                    shr_timemgr_clock_info_orb_mode:long_name = "Clock info orbital mode" ;
                    shr_timemgr_clock_info_orb_mode:units = "list" ;
                    shr_timemgr_clock_info_orb_mode:_FillValue = 2000000000 ;
                    shr_timemgr_clock_info_orb_mode:missing_value = 2000000000 ;
                    shr_timemgr_clock_info_orb_mode:type = "Integer list" ;
                    shr_timemgr_clock_info_orb_mode:Orb_mode_calculated_based_on_fixed_year = 1 ;
                    shr_timemgr_clock_info_orb_mode:Orb_mode_fixed_by_orbit_parameters = 2 ;
    

    Time-manager methods need to add:

  • shr_timemgr_clockGetCurrCalDay( tm_clock, offset ) – returns real, ok
  • shr_timemgr_clocksInSync( SyncClock, myClock ) – ok
  • Remove shr_timemgr_clockInfo object, put clockinfo data directly into shr_timemgr_clockType object (afterward I remembered that I wanted to keep the clock-info object so that I could seperate it out when working with ESMF).

    Code Review requested changes to User Interface from Tony and Brian K.

    0.) Thanks go to Tony and Brian K!!!
    Tony and Brian did a TON of work and reviewed all of my code. They had
    TONS of excellent suggestions that have vastly improved the code functionality, readability, flexibility and consistency and usability with the rest of csm_share. We all need to be grateful for the effort they put in helping this project out. Kudo's go to Tony and Brian!
    1.) Change _Change interface names to _Put? – Yes!
    Some interface names are called things like "shr_timemgr_change"
    change this to "shr_timemgr_put" to be more consistent with rest of
    csm_share.
    I'm fine with doing this if the group agrees.
    2.) Changes to timemgr interface names? – Yes

    Current names:

     ! ! PUBLIC TYPES:
       public :: shr_timemgr_clockType         ! Wrapped clock object
       public :: shr_timemgr_setupType         ! Information to setup a clock
       public :: shr_timemgr_clockInfoType     ! Miscellaneous clock information
     ! !PUBLIC MEMBER FUNCTIONS
       public :: shr_timemgr_setupClock        ! Setup the clock
       public :: shr_timemgr_setupFromClock    ! Setup the clock based on an input clock
       public :: shr_timemgr_clockGet          ! Get data from the clock
       public :: shr_timemgr_getYMD            ! Get YYYYMMDD from an ESMF time instance
       public :: shr_timemgr_isLastStep        ! Return true if this is the last time-step
       public :: shr_timemgr_readRestart       ! Read time-manager restart information
       public :: shr_timemgr_writeRestart      ! Write restart information out to file
       public :: shr_timemgr_restartAlarmOff   ! Turn the restart alarm off
       public :: shr_timemgr_readNL            ! Read in the namelist for clock information
       public :: shr_timemgr_setDefaults       ! Set the default values for clock setup object
       public :: shr_timemgr_check             ! Check the setup object for valid settings
       public :: shr_timemgr_change            ! Change clock setup object values
       public :: shr_timemgr_get               ! Get clock setup object values
       public :: shr_timemgr_clockInfoGet      ! Get values from clock Info object
       public :: shr_timemgr_advanceClock      ! Advance the clock
       public :: shr_timemgr_setRestartAlarm   ! Turn the restart alarm on
       public :: shr_timemgr_isRestartAlarm    ! Return true if the restart alarm is on
       public :: shr_timemgr_print             ! Print clock information 
    

    Suggested names:

     (D) Same as (E) but added a few methods, (*) indicates methods that could be
        removed because a more generic method is available.
     ! ! PUBLIC TYPES:
       public :: shr_timemgr_clockType    ! clock object
       public :: shr_timemgr_NMLinfoType  ! namelist info used to init a clock
     
     ! !PUBLIC MEMBER FUNCTIONS
       public :: shr_timemgr_clockInitNMLinfo         ! init clock using nml info only
       public :: shr_timemgr_clockInitRestart         ! init clock using nml info AND restart file
       public :: shr_timemgr_clockInitClock           ! init clock using another clock
       public :: shr_timemgr_clockGetData             ! get misc data from clock (overloaded)
     * public :: shr_timemgr_clockGetDataSec          ! get elapsed-sec-on-day data from a clock
     * public :: shr_timemgr_clockGetDataYMD          ! get YYYYMMDD data from a clock
       public :: shr_timemgr_clockRestartWrite        ! put clock info into a restart file
       public :: shr_timemgr_clockPrint               ! print clock information
       public :: shr_timemgr_clockAdvance             ! advance the clock
       public :: shr_timemgr_clockAlarmIsOn           ! return true if the an alarm is on
     * public :: shr_timemgr_clockIsOnLastStep   ! return true if the clock is at stop_time
     * public :: shr_timemgr_clockAlarmIsOnRestart    ! return true if the restart alarm is on
       public :: shr_timemgr_clockAlarmTurnOn         ! turn an alarm on
       public :: shr_timemgr_clockAlarmTurnOff        ! turn an alarm off
     * public :: shr_timemgr_clockAlarmTurnOffRestart ! turn the restart alarm off
      public :: shr_timemgr_clockAlarmTurnOnRestart  ! turn the restart alarm on
       public :: shr_timemgr_NMLinfoRead              ! read clock nml info from a file
       public :: shr_timemgr_NMLinfoSetDefault        ! set the default values for NMLinfo object
       public :: shr_timemgr_NMLinfoCheck             ! verify valid settings of NMLinfo object
       public :: shr_timemgr_NMLinfoPutData           ! put misc values into NMLinfo object
       public :: shr_timemgr_NMLinfoGetData           ! get misc values from NMLinfo object
    
    I'm fine with the above except for the following:
  1. Stop time is NOT an alarm in ESMF – as such I don't want to treat
    it the same as other alarms.
  2. Personally, as all models need restart alarms – I think there should be special methods to deal with them. But, I do like the idea
    of having a general method for alarms – but we don't have need for other alarms at Stage-1, so this seems to be a Stage-2 idea. (At stage-2 we need alarms for each component).
  3. The principle I want to suggest we use is – "Make what's standard easy, and what's not standard more difficult (but not too difficult)".
    3.) - make mpicom and mastertask optional (or absent) – Yes.
    We actually talked about this at an earlier meeting. I'm fine with changing it if desired. So if mpicom and mastertask are not available,
    always read in namelist and don't do the broadcast (regardless of the build-time setting of HIDE_MPI.
    4.) Flexible interfaces for namelist objects...
    This is something I can't do at this time and try to meet get Stage-1 done by the deadline. But, this is a valid topic for Stage-2.
    Basically the interface I've proposed from the start has a hard-coded interface for datavalues.
    My interface looks like...
      call shr_timemgr_setDefaults( perpetual_run=perp_run, &
                                    perpetual_ymd=perp_ymd, Setup )
      ! Change some values in the setup object
      call shr_timemgr_change( Setup, start_ymd=my_start )
      ! Read in the timemgr namelist
      call shr_timemgr_readNL( nlfilename, LogPrint, MPICom, MasterTask, &
                               SetupOut )
      ! Get info from the clock-setup object
      ! call shr_timemgr_get( setup, stop_option=stop_option )
      ! Setup the clock
      call shr_timemgr_setupClock( setup, LogPrint=.true.,     
                                   desc="my_clock", &
                                   ClockOut=clock )
      ! Print out the clock
      call shr_timemgr_print( clock )
      ! Get info from the clock
      call shr_timemgr_clockGet( clock, CurrentYMD=ymd, currentTOD=tod )
    
    So the _change and _clockGet or other such methods have a list of
    items you can change or get.
    A flexible interface might look like:
      call shr_timemgr_setDefaults( Setup )
      call shr_timemgr_setDefaultValue( Setup, "perpetual_run", perp_run )
      call shr_timemgr_setDefaultValue( Setup, "perpetual_ymd", perp_ymd )
      ! Change some values in the setup object
      call shr_timemgr_change( Setup, "start_ymd", my_start )
      ! Read in the timemgr namelist
      call shr_timemgr_readNL( nlfilename, LogPrint, MPICom, MasterTask, &
                               SetupOut )
      ! Get info from the clock-setup object
      call shr_timemgr_get( setup, "stop_option", value=stop_option )
      ! Setup the clock
      call shr_timemgr_setupClock( setup, LogPrint=.true.,     
                                   desc="my_clock", &
                                   ClockOut=clock )
      ! Print out the clock
      call shr_timemgr_print( clock )
      ! Get info from the clock
      ymd = shr_timemgr_clockGet( clock, "CurrentYMD" )
      tod = shr_timemgr_clockGet( clock, "CurrentTOD" )
    
    Personally I do NOT want to go this direction for the following reasons:
  4. The interfaces I've proposed have been specific from the start – I needed this suggestion earlier in the design phase to get this done by Stage-1.
  5. However, this is a perfectly valid debate and good suggestions to decide on for Stage-II.
  6. There will be development time to make this change.
  7. The generic calls take up more code than the specific ones as the generic calls require one method call per item returned. For long lists of things you want to get out – this is bad.
  8. ESMF already has a generic object for handling namelist type data – the ConfigAttributes object. It solves some problems with namelists already and the development has been done.
  9. Why spend development costs to create our own ConfigAttributes object equivalent – why not leverage off ESMF?
  10. I don't expect that these underlying types will have a lot of development and changes going on with them (by nature they are data that span several components, the only reason to add data to them is for driver level information that you want to effect two or more components).
  11. Developments I expect: remove archive info, add orbit option to stay in sync with year, add ability for Paleo calendars?, add more options to control compenent execution (no_land, no_ice_nor_land, no_ice_nor_ocean), add new methods (without changing underlying data).
  • No labels