Back to home page

MITgcm

 
 

    


File indexing completed on 2023-02-07 06:10:16 UTC

view on githubraw file Latest commit 2b959ba3 on 2023-02-06 20:20:10 UTC
869864d4b6 Patr*0001 #include "SEAICE_OPTIONS.h"
                0002 
                0003       subroutine seaice_cost_init_fixed( mythid )
                0004 
48513acaa3 Jean*0005 C     ==================================================================
                0006 C     SUBROUTINE seaice_cost_init_fixed
                0007 C     ==================================================================
                0008 C
                0009 C     o Set contributions to the cost function and the cost function
                0010 C       itself to zero. The cost function and the individual contribu-
                0011 C       tions are defined in the header file "SEAICE_COST.h".
                0012 C
                0013 C     ==================================================================
                0014 C     SUBROUTINE seaice_cost_init_fixed
                0015 C     ==================================================================
869864d4b6 Patr*0016 
                0017       implicit none
                0018 
48513acaa3 Jean*0019 C     == global variables ==
869864d4b6 Patr*0020 #include "EEPARAMS.h"
                0021 #include "SIZE.h"
                0022 #include "PARAMS.h"
dcf0f3bd0f Patr*0023 #ifdef ALLOW_COST
                0024 # include "SEAICE_COST.h"
                0025 #endif
869864d4b6 Patr*0026 #ifdef ALLOW_CAL
                0027 # include "cal.h"
                0028 #endif
                0029 
48513acaa3 Jean*0030 C     == routine arguments ==
869864d4b6 Patr*0031       integer mythid
                0032 
2b959ba38e Mart*0033 #if (defined ALLOW_COST && defined ALLOW_COST_ICE)
48513acaa3 Jean*0034 C     == local variables ==
869864d4b6 Patr*0035       integer tempDate1(4)
                0036       integer tempDate2(4)
48513acaa3 Jean*0037 C     == end of interface ==
869864d4b6 Patr*0038 
                0039 #ifdef ALLOW_CAL
                0040 
                0041       _BEGIN_MASTER( myThid )
                0042 
2b959ba38e Mart*0043       IF ( useCAL ) THEN
48513acaa3 Jean*0044 C--   Sea-ice cost function start and stop times in model seconds.
869864d4b6 Patr*0045         call cal_FullDate  ( costIceStart1 , costIceStart2,
                0046      &                       tempDate1     , mythid )
48513acaa3 Jean*0047         call cal_TimePassed( modelStartDate, tempDate1    ,
869864d4b6 Patr*0048      &                       tempDate2     , mythid )
                0049         call cal_ToSeconds ( tempDate2 , costIceStart , mythid )
                0050         costIceStart = costIceStart + startTime
48513acaa3 Jean*0051 
                0052         if ( costIceEnd1.EQ.0 ) then
                0053 C-      use "modelEndDate" as default value for costIceEnd
                0054           costIceEnd1 = modelEndDate(1)
                0055           costIceEnd2 = modelEndDate(2)
                0056         endif
869864d4b6 Patr*0057         call cal_FullDate  ( costIceEnd1   , costIceEnd2  ,
                0058      &                       tempDate1     , mythid )
48513acaa3 Jean*0059         call cal_TimePassed( modelStartDate, tempDate1    ,
869864d4b6 Patr*0060      &                       tempDate2     , mythid )
                0061         call cal_ToSeconds ( tempDate2 , costIceEnd , mythid )
                0062         costIceEnd = costIceEnd + startTime
48513acaa3 Jean*0063 C--
2b959ba38e Mart*0064       ENDIF
869864d4b6 Patr*0065       _END_MASTER( mythid )
                0066 
                0067       _BARRIER
                0068 
2b959ba38e Mart*0069 #endif /* ALLOW_CAL */
                0070 #endif /* ALLOW_COST and ALLOW_COST_ICE */
dcf0f3bd0f Patr*0071 
48513acaa3 Jean*0072       RETURN
                0073       END