/[MITgcm]/MITgcm/pkg/obcs/obcs_prescribe_read.F
ViewVC logotype

Diff of /MITgcm/pkg/obcs/obcs_prescribe_read.F

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

revision 1.22 by dimitri, Fri Apr 25 21:57:49 2008 UTC revision 1.24 by mlosch, Tue Jun 2 14:58:54 2009 UTC
# Line 127  c     == end of interface == Line 127  c     == end of interface ==
127       U     OBWt,   OBWt0,   OBWt1,   OBWtfile,       U     OBWt,   OBWt0,   OBWt1,   OBWtfile,
128       U     OBWs,   OBWs0,   OBWs1,   OBWsfile,       U     OBWs,   OBWs0,   OBWs1,   OBWsfile,
129  #   ifdef ALLOW_SEAICE  #   ifdef ALLOW_SEAICE
130       I     siobEstartdate, siobEperiod,       I     siobWstartdate, siobWperiod,
131       U     OBWa,   OBWa0,   OBWa1,   OBWafile,       U     OBWa,   OBWa0,   OBWa1,   OBWafile,
132       U     OBWh,   OBWh0,   OBWh1,   OBWhfile,       U     OBWh,   OBWh0,   OBWh1,   OBWhfile,
133       U     OBWsl,  OBWsl0,  OBWsl1,  OBWslfile,       U     OBWsl,  OBWsl0,  OBWsl1,  OBWslfile,
# Line 292  c     == local variables == Line 292  c     == local variables ==
292  # ifdef ALLOW_PTRACERS  # ifdef ALLOW_PTRACERS
293        integer iTracer        integer iTracer
294  # endif /* ALLOW_PTRACERS */  # endif /* ALLOW_PTRACERS */
   
295  c     == end of interface ==  c     == end of interface ==
296        if ( obcsperiod .eq. -12 ) then  
297          if ( obcsperiod .eq. -12. _d 0 ) then
298  c     obcsperiod=-12 means input file contains 12 monthly means  c     obcsperiod=-12 means input file contains 12 monthly means
299  c     record numbers are assumed 1 to 12 corresponding to  c     record numbers are assumed 1 to 12 corresponding to
300  c     Jan. through Dec.  c     Jan. through Dec.
# Line 304  c     Jan. through Dec. Line 304  c     Jan. through Dec.
304       I                        mycurrenttime, mycurrentiter, mythid       I                        mycurrenttime, mycurrentiter, mythid
305       &           )       &           )
306    
307        elseif ( obcsperiod .lt. 0 ) then        elseif ( obcsperiod .lt. 0. _d 0 ) then
308         print *, 'obcsperiod is out of range'         print *, 'obcsperiod is out of range'
309         STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_XZ'         STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_XZ'
310        else        else
# Line 316  c     get record numbers and interpolati Line 316  c     get record numbers and interpolati
316       O                       count0, count1, year0, year1,       O                       count0, count1, year0, year1,
317       I                       mycurrenttime, mycurrentiter, mythid       I                       mycurrenttime, mycurrentiter, mythid
318       &                      )       &                      )
 # ifdef ALLOW_SEAICE  
        IF (useSEAICE) THEN  
         call exf_GetFFieldRec(  
      I                       siobstartdate, siobperiod,  
      I                       useYearlyFields,  
      O                       fac, first, changed,  
      O                       count0, count1, year0, year1,  
      I                       mycurrenttime, mycurrentiter, mythid  
      &                      )  
        ENDIF  
 # endif /* ALLOW_SEAICE */  
319        endif        endif
   
320        call exf_set_obcs_xz(  OBu, OBu0, OBu1, OBufile, 'u'        call exf_set_obcs_xz(  OBu, OBu0, OBu1, OBufile, 'u'
321       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
322       I                     , obcsperiod, count0, count1, year0, year1       I                     , obcsperiod, count0, count1, year0, year1
# Line 345  c     get record numbers and interpolati Line 333  c     get record numbers and interpolati
333       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
334       I                     , obcsperiod, count0, count1, year0, year1       I                     , obcsperiod, count0, count1, year0, year1
335       I                     , mycurrenttime, mycurrentiter, mythid )       I                     , mycurrenttime, mycurrentiter, mythid )
336    # ifdef ALLOW_PTRACERS
337          if ( usePTRACERS ) then
338           do iTracer = 1, PTRACERS_numInUse
339            call exf_set_obcs_xz(  OBptr (1-Olx,1,1,1,iTracer)
340         I                       , OBptr0(1-Olx,1,1,1,iTracer)
341         I                       , OBptr1(1-Olx,1,1,1,iTracer)
342         I                       , OBptrFile(iTracer), 's'
343         I                       , fac, first, changed, useYearlyFields
344         I                       , obcsperiod, count0, count1, year0, year1
345         I                       , mycurrenttime, mycurrentiter, mythid )
346           enddo
347          endif
348    # endif /* ALLOW_PTRACERS */
349  # ifdef ALLOW_SEAICE  # ifdef ALLOW_SEAICE
350        IF (useSEAICE) THEN        IF (useSEAICE) THEN
351           if ( siobperiod .eq. -12. _d 0 ) then
352    c     siobperiod=-12 means input file contains 12 monthly means
353    c     record numbers are assumed 1 to 12 corresponding to
354    c     Jan. through Dec.
355            call cal_GetMonthsRec(
356         O                        fac, first, changed,
357         O                        count0, count1,
358         I                        mycurrenttime, mycurrentiter, mythid
359         &           )
360    
361           elseif ( siobperiod .lt. 0. _d 0 ) then
362            print *, 'siobperiod is out of range'
363            STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_XZ'
364           else
365    c     get record numbers and interpolation factor
366            call exf_GetFFieldRec(
367         I                       siobstartdate, siobperiod,
368         I                       useYearlyFields,
369         O                       fac, first, changed,
370         O                       count0, count1, year0, year1,
371         I                       mycurrenttime, mycurrentiter, mythid
372         &                      )
373           endif
374         call exf_set_obcs_x (  OBa, OBa0, OBa1, OBafile, 's'         call exf_set_obcs_x (  OBa, OBa0, OBa1, OBafile, 's'
375       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
376       I                     , siobperiod, count0, count1, year0, year1       I                     , siobperiod, count0, count1, year0, year1
# Line 373  c     get record numbers and interpolati Line 397  c     get record numbers and interpolati
397       I                     , mycurrenttime, mycurrentiter, mythid )       I                     , mycurrenttime, mycurrentiter, mythid )
398        ENDIF        ENDIF
399  # endif /* ALLOW_SEAICE */  # endif /* ALLOW_SEAICE */
 # ifdef ALLOW_PTRACERS  
       if ( usePTRACERS ) then  
        do iTracer = 1, PTRACERS_numInUse  
         call exf_set_obcs_xz(  OBptr (1-Olx,1,1,1,iTracer)  
      I                       , OBptr0(1-Olx,1,1,1,iTracer)  
      I                       , OBptr1(1-Olx,1,1,1,iTracer)  
      I                       , OBptrFile(iTracer), 's'  
      I                       , fac, first, changed, useYearlyFields  
      I                       , obcsperiod, count0, count1, year0, year1  
      I                       , mycurrenttime, mycurrentiter, mythid )  
        enddo  
       endif  
 # endif /* ALLOW_PTRACERS */  
400    
401  #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */  #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */
402        RETURN        RETURN
# Line 502  c     == local variables == Line 513  c     == local variables ==
513  # endif /* ALLOW_PTRACERS */  # endif /* ALLOW_PTRACERS */
514    
515  c     == end of interface ==  c     == end of interface ==
516        if ( obcsperiod .eq. -12 ) then        if ( obcsperiod .eq. -12. _d 0 ) then
517  c     obcsperiod=-12 means input file contains 12 monthly means  c     obcsperiod=-12 means input file contains 12 monthly means
518  c     record numbers are assumed 1 to 12 corresponding to  c     record numbers are assumed 1 to 12 corresponding to
519  c     Jan. through Dec.  c     Jan. through Dec.
# Line 512  c     Jan. through Dec. Line 523  c     Jan. through Dec.
523       I                        mycurrenttime, mycurrentiter, mythid       I                        mycurrenttime, mycurrentiter, mythid
524       &           )       &           )
525    
526        elseif ( obcsperiod .lt. 0 ) then        elseif ( obcsperiod .lt. 0. _d 0 ) then
527         print *, 'obcsperiod is out of range'         print *, 'obcsperiod is out of range'
528         STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_YZ'         STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_YZ'
529        else        else
# Line 524  c     get record numbers and interpolati Line 535  c     get record numbers and interpolati
535       O                       count0, count1, year0, year1,       O                       count0, count1, year0, year1,
536       I                       mycurrenttime, mycurrentiter, mythid       I                       mycurrenttime, mycurrentiter, mythid
537       &                      )       &                      )
 # ifdef ALLOW_SEAICE  
        IF (useSEAICE) THEN  
         call exf_GetFFieldRec(  
      I                       siobstartdate, siobperiod,  
      I                       useYearlyFields,  
      O                       fac, first, changed,  
      O                       count0, count1, year0, year1,  
      I                       mycurrenttime, mycurrentiter, mythid  
      &                      )  
        ENDIF  
 # endif /* ALLOW_SEAICE */  
538        endif        endif
   
539        call exf_set_obcs_yz(  OBu, OBu0, OBu1, OBufile, 'u'        call exf_set_obcs_yz(  OBu, OBu0, OBu1, OBufile, 'u'
540       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
541       I                     , obcsperiod, count0, count1, year0, year1       I                     , obcsperiod, count0, count1, year0, year1
# Line 553  c     get record numbers and interpolati Line 552  c     get record numbers and interpolati
552       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
553       I                     , obcsperiod, count0, count1, year0, year1       I                     , obcsperiod, count0, count1, year0, year1
554       I                     , mycurrenttime, mycurrentiter, mythid )       I                     , mycurrenttime, mycurrentiter, mythid )
555    # ifdef ALLOW_PTRACERS
556          if ( usePTRACERS ) then
557           do iTracer = 1, PTRACERS_numInUse
558            call exf_set_obcs_yz(  OBptr (1-Olx,1,1,1,iTracer)
559         I                       , OBptr0(1-Olx,1,1,1,iTracer)
560         I                       , OBptr1(1-Olx,1,1,1,iTracer)
561         I                       , OBptrFile(iTracer), 's'
562         I                       , fac, first, changed, useYearlyFields
563         I                       , obcsperiod, count0, count1, year0, year1
564         I                       , mycurrenttime, mycurrentiter, mythid )
565           enddo
566          endif
567    # endif /* ALLOW_PTRACERS */
568  # ifdef ALLOW_SEAICE  # ifdef ALLOW_SEAICE
569        IF (useSEAICE) THEN        IF (useSEAICE) THEN
570           if ( siobperiod .eq. -12. _d 0 ) then
571    c     siobperiod=-12 means input file contains 12 monthly means
572    c     record numbers are assumed 1 to 12 corresponding to
573    c     Jan. through Dec.
574            call cal_GetMonthsRec(
575         O                        fac, first, changed,
576         O                        count0, count1,
577         I                        mycurrenttime, mycurrentiter, mythid
578         &           )
579    
580           elseif ( siobperiod .lt. 0. _d 0 ) then
581            print *, 'siobperiod is out of range'
582            STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_XZ'
583           else
584    c     get record numbers and interpolation factor
585            call exf_GetFFieldRec(
586         I                       siobstartdate, siobperiod,
587         I                       useYearlyFields,
588         O                       fac, first, changed,
589         O                       count0, count1, year0, year1,
590         I                       mycurrenttime, mycurrentiter, mythid
591         &                      )
592           endif
593         call exf_set_obcs_y (  OBa, OBa0, OBa1, OBafile, 's'         call exf_set_obcs_y (  OBa, OBa0, OBa1, OBafile, 's'
594       I                     , fac, first, changed, useYearlyFields       I                     , fac, first, changed, useYearlyFields
595       I                     , siobperiod, count0, count1, year0, year1       I                     , siobperiod, count0, count1, year0, year1
# Line 581  c     get record numbers and interpolati Line 616  c     get record numbers and interpolati
616       I                     , mycurrenttime, mycurrentiter, mythid )       I                     , mycurrenttime, mycurrentiter, mythid )
617        ENDIF        ENDIF
618  # endif /* ALLOW_SEAICE */  # endif /* ALLOW_SEAICE */
 # ifdef ALLOW_PTRACERS  
       if ( usePTRACERS ) then  
        do iTracer = 1, PTRACERS_numInUse  
         call exf_set_obcs_yz(  OBptr (1-Olx,1,1,1,iTracer)  
      I                       , OBptr0(1-Olx,1,1,1,iTracer)  
      I                       , OBptr1(1-Olx,1,1,1,iTracer)  
      I                       , OBptrFile(iTracer), 's'  
      I                       , fac, first, changed, useYearlyFields  
      I                       , obcsperiod, count0, count1, year0, year1  
      I                       , mycurrenttime, mycurrentiter, mythid )  
        enddo  
       endif  
 # endif /* ALLOW_PTRACERS */  
619    
620  #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */  #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */
621        RETURN        RETURN

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.22