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 ) |
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 ) |
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 ) |
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 ) |