DO n = 1, num_nests

   Initialize input of static fields                              (input_init)
   Initialize storage module                                    (storage_init)

   Read global attributes                                  (read_global_attrs)

   Read a static field                                       (read_next_field)
   Store static field                                      (storage_put_field) 
   ...
   Read a static field                                       (read_next_field)
   Store static field                                      (storage_put_field) 

   Close input of static fields                                  (input_close)

   DO t = 1, num_times

      FOREACH degribbed field
         Read degribbed field for time t                                 (???)
         Interpolate field to model grid                                 (???) 
         Store interpolated field                          (storage_put_field) 
      END

      Initialize output for nest/time                            (output_init) 

      Write nest global attributes                        (write_global_attrs)

      Retrieve an interpolated field for output            (storage_get_field)
      Write the field to I/O API                                 (write_field) 
      ...
      Retrieve an interpolated field for output            (storage_get_field)
      Write the field to I/O API                                 (write_field) 

      Close output for nest/time                                (output_close)

      Clear all time-dependent data from storage       (storage_delete_all_td)

   END DO

   Clear all time-independent data from storage           (storage_delete_all)

END DO
