/[MITgcm]/MITgcm/pkg/ctrl/ctrl_init.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_init.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.34 by gforget, Tue Jul 13 00:02:06 2010 UTC revision 1.35 by mlosch, Wed Jan 19 08:29:35 2011 UTC
# Line 467  c--   Northern obc. Line 467  c--   Northern obc.
467          call cal_TimePassed( xx_obcsnstartdate, modelstartdate,          call cal_TimePassed( xx_obcsnstartdate, modelstartdate,
468       &                       difftime, mythid )       &                       difftime, mythid )
469          call cal_ToSeconds ( difftime, diffsecs, mythid )          call cal_ToSeconds ( difftime, diffsecs, mythid )
470          startrec = int((modelstart - diffsecs)/xx_obcsnperiod) + 1          if ( xx_obcsnperiod .EQ. 0 ) then
471          startrec = (startrec - 1)*nobcs + 1           startrec = 1
472          endrec   = int((modelend   - diffsecs)/xx_obcsnperiod) + 2           endrec   = 12*nobcs
473          endrec   = (endrec - startrec + 1)*nobcs          else
474             startrec = int((modelstart - diffsecs)/xx_obcsnperiod) + 1
475             startrec = (startrec - 1)*nobcs + 1
476             endrec   = int((modelend   - diffsecs)/xx_obcsnperiod) + 2
477             endrec   = (endrec - startrec + 1)*nobcs
478            endif
479  # else  # else
480          startrec = 1          if ( xx_obcsnperiod .EQ. 0 ) then
481          endrec   = 1           startrec = 1
482             endrec   = nobcs
483            else
484             startrec = 1
485             endrec = (int((endTime - startTime)/xx_obcsnperiod) + 1)*nobcs
486            endif
487  # endif  # endif
488          diffrec  = endrec          diffrec  = endrec - startrec + 1
489          call ctrl_init_ctrlvar (          call ctrl_init_ctrlvar (
490       &       xx_obcsn_file, 11, 111, diffrec, startrec, endrec,       &       xx_obcsn_file, 11, 111, diffrec, startrec, endrec,
491       &       snx, 1, nr, 'm', 'xz', mythid )       &       snx, 1, nr, 'm', 'xz', mythid )
# Line 493  c--   Southern obc. Line 503  c--   Southern obc.
503          call cal_TimePassed( xx_obcssstartdate, modelstartdate,          call cal_TimePassed( xx_obcssstartdate, modelstartdate,
504       &                       difftime, mythid )       &                       difftime, mythid )
505          call cal_ToSeconds ( difftime, diffsecs, mythid )          call cal_ToSeconds ( difftime, diffsecs, mythid )
506          startrec = int((modelstart - diffsecs)/xx_obcssperiod) + 1          if ( xx_obcssperiod .EQ. 0 ) then
507          startrec = (startrec - 1)*nobcs + 1           startrec = 1
508          endrec   = int((modelend   - diffsecs)/xx_obcssperiod) + 2           endrec   = 12*nobcs
509          endrec   = (endrec - startrec + 1)*nobcs          else
510             startrec = int((modelstart - diffsecs)/xx_obcssperiod) + 1
511             startrec = (startrec - 1)*nobcs + 1
512             endrec   = int((modelend   - diffsecs)/xx_obcssperiod) + 2
513             endrec   = (endrec - startrec + 1)*nobcs
514            endif
515  # else  # else
516          startrec = 1          if ( xx_obcssperiod .EQ. 0 ) then
517          endrec   = 1           startrec = 1
518             endrec   = nobcs
519            else
520             startrec = 1
521             endrec = (int((endTime - startTime)/xx_obcssperiod) + 1)*nobcs
522            endif
523  # endif  # endif
524          diffrec  = endrec          diffrec  = endrec - startrec + 1
525          call ctrl_init_ctrlvar (          call ctrl_init_ctrlvar (
526       &       xx_obcss_file, 12, 112, diffrec, startrec, endrec,       &       xx_obcss_file, 12, 112, diffrec, startrec, endrec,
527       &       snx, 1, nr, 'm', 'xz', mythid )       &       snx, 1, nr, 'm', 'xz', mythid )
# Line 519  c--   Western obc. Line 539  c--   Western obc.
539          call cal_TimePassed( xx_obcswstartdate, modelstartdate,          call cal_TimePassed( xx_obcswstartdate, modelstartdate,
540       &                       difftime, mythid )       &                       difftime, mythid )
541          call cal_ToSeconds ( difftime, diffsecs, mythid )          call cal_ToSeconds ( difftime, diffsecs, mythid )
542          startrec = int((modelstart - diffsecs)/xx_obcswperiod) + 1          if ( xx_obcswperiod .EQ. 0 ) then
543          startrec = (startrec - 1)*nobcs + 1           startrec = 1
544          endrec   = int((modelend   - diffsecs)/xx_obcswperiod) + 2           endrec   = 12*nobcs
545          endrec   = (endrec - startrec + 1)*nobcs          else
546             startrec = int((modelstart - diffsecs)/xx_obcswperiod) + 1
547             startrec = (startrec - 1)*nobcs + 1
548             endrec   = int((modelend   - diffsecs)/xx_obcswperiod) + 2
549             endrec   = (endrec - startrec + 1)*nobcs
550            endif
551  # else  # else
552          startrec = 1          if ( xx_obcswperiod .EQ. 0 ) then
553          endrec   = 1           startrec = 1
554             endrec   = nobcs
555            else
556             startrec = 1
557             endrec = (int((endTime - startTime)/xx_obcswperiod) + 1)*nobcs
558            endif
559  # endif  # endif
560          diffrec  = endrec          diffrec  = endrec - startrec + 1
561          call ctrl_init_ctrlvar (          call ctrl_init_ctrlvar (
562       &       xx_obcsw_file, 13, 113, diffrec, startrec, endrec,       &       xx_obcsw_file, 13, 113, diffrec, startrec, endrec,
563       &       1, sny, nr, 'm', 'yz', mythid )       &       1, sny, nr, 'm', 'yz', mythid )
# Line 545  c--   Eastern obc. Line 575  c--   Eastern obc.
575          call cal_TimePassed( xx_obcsestartdate, modelstartdate,          call cal_TimePassed( xx_obcsestartdate, modelstartdate,
576       &                       difftime, mythid )       &                       difftime, mythid )
577          call cal_ToSeconds ( difftime, diffsecs, mythid )          call cal_ToSeconds ( difftime, diffsecs, mythid )
578          startrec = int((modelstart - diffsecs)/xx_obcseperiod) + 1          if ( xx_obcseperiod .EQ. 0 ) then
579          startrec = (startrec - 1)*nobcs + 1           startrec = 1
580          endrec   = int((modelend   - diffsecs)/xx_obcseperiod) + 2           endrec   = 12*nobcs
581          endrec   = (endrec - startrec + 1)*nobcs          else
582             startrec = int((modelstart - diffsecs)/xx_obcseperiod) + 1
583             startrec = (startrec - 1)*nobcs + 1
584             endrec   = int((modelend   - diffsecs)/xx_obcseperiod) + 2
585             endrec   = (endrec - startrec + 1)*nobcs
586            endif
587  # else  # else
588          startrec = 1          if ( xx_obcseperiod .EQ. 0 ) then
589          endrec   = 1           startrec = 1
590             endrec   = nobcs
591            else
592             startrec = 1
593             endrec = (int((endTime - startTime)/xx_obcseperiod) + 1)*nobcs
594            endif
595  # endif  # endif
596          diffrec  = endrec          diffrec  = endrec - startrec + 1
597          call ctrl_init_ctrlvar (          call ctrl_init_ctrlvar (
598       &       xx_obcse_file, 14, 114, diffrec, startrec, endrec,       &       xx_obcse_file, 14, 114, diffrec, startrec, endrec,
599       &       1, sny, nr, 'm', 'yz', mythid )       &       1, sny, nr, 'm', 'yz', mythid )

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.22