/[MITgcm]/MITgcm/pkg/seaice/seaice_check.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_check.F

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

revision 1.65 by gforget, Thu Mar 8 01:15:02 2012 UTC revision 1.66 by jmc, Sun Mar 11 13:41:38 2012 UTC
# Line 95  C--   check ice cover fraction formula Line 95  C--   check ice cover fraction formula
95       &     (SEAICE_areaLossFormula.NE.3).OR.SEAICE_doOpenWaterGrowth       &     (SEAICE_areaLossFormula.NE.3).OR.SEAICE_doOpenWaterGrowth
96       &     .OR.SEAICE_doOpenWaterMelt ) ) THEN       &     .OR.SEAICE_doOpenWaterMelt ) ) THEN
97          WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: ',          WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: ',
98       &       'to use SEAICE_GROWTH_LEGACY, you need to set'       &       'to use SEAICE_GROWTH_LEGACY, you need to set'
99          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
100          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
101       &   'SEAICE_areaGainFormula.EQ.2, SEAICE_areaLossFormula.EQ.3, '       &   'SEAICE_areaGainFormula.EQ.2, SEAICE_areaLossFormula.EQ.3, '
# Line 119  C--   check ice cover fraction formula Line 119  C--   check ice cover fraction formula
119          STOP 'ABNORMAL END: S/R SEAICE_CHECK'          STOP 'ABNORMAL END: S/R SEAICE_CHECK'
120        ENDIF        ENDIF
121    
 C--   deal with the old ways of specifying mcPheePiston & frazilFrac terms  
   
 C     a) check that the short lived SEAICEturbFluxFormula was not  
 C     specified  
       IF   ( SEAICEturbFluxFormula .NE. UNSET_I ) THEN  
        WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: SEAICEturbFluxFormula ',  
      &  ' was retired. Instead set SEAICE_mcPheePiston for the '  
        CALL PRINT_ERROR( msgBuf, myThid )  
        WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: turbulent flux (melt only)',  
      &  ' SEAICE_frazilFrac (case of T below freezing temperature). '  
        CALL PRINT_ERROR( msgBuf, myThid )  
        STOP 'ABNORMAL END: S/R SEAICE_CHECK'  
       ENDIF  
   
 C     b) if specified then use the old way (short lived) of specifying  
 C     SEAICE_mcPheeTaper  
       IF   ( SEAICE_availHeatTaper .NE. UNSET_RL ) THEN  
        SEAICE_mcPheeTaper = SEAICE_availHeatTaper  
 C issue warning  
       ENDIF  
   
 C     c) if specified then use the original way of specifying this  
         IF ( SEAICE_availHeatFrac .NE. UNSET_RL ) then  
           SEAICE_mcPheePiston = SEAICE_availHeatFrac *  
      &      dRf(kSurface)/SEAICE_deltaTtherm  
           IF ( SEAICE_availHeatFracFrz .EQ. UNSET_RL ) THEN  
             SEAICE_frazilFrac = SEAICE_availHeatFrac  
           ELSE  
             SEAICE_frazilFrac = SEAICE_availHeatFracFrz  
           ENDIF  
 c ? need something for the case of just specifying SEAICE_availHeatFracFrz  
 c ? issue warning  
         ENDIF  
   
 C     d) if specified then use the second oldest way of specifying this  
         IF ( SEAICE_gamma_t .NE. UNSET_RL ) then        
           SEAICE_mcPheePiston = dRf(kSurface)/SEAICE_gamma_t  
           IF ( SEAICE_gamma_t_frz .EQ. UNSET_RL ) THEN  
             SEAICE_frazilFrac = SEAICE_deltaTtherm/SEAICE_gamma_t  
           ELSE  
             SEAICE_frazilFrac = SEAICE_deltaTtherm/SEAICE_gamma_t_frz  
           ENDIF  
 C ? need something for the case of just specifying SEAICE_gamma_t_frz  
 C ? issue warning  
         ENDIF  
   
   
122  C--   check concistency of turbulent flux term etc. specification  C--   check concistency of turbulent flux term etc. specification
123    
124        SEAICE_mcphee_max=dRf(kSurface)/SEAICE_deltaTtherm        SEAICE_mcphee_max=drF(kSurface)/SEAICE_deltaTtherm
125        IF ( ( ( SEAICE_mcPheePiston .LT. 0. _d 0 ).OR.        IF ( usePW79thermodynamics .AND.
126       &       ( SEAICE_mcPheePiston .GT. SEAICE_mcphee_max ) ).AND.       &     ( SEAICE_mcPheePiston .LT. 0. _d 0 .OR.
127       &     ( usePW79thermodynamics ) ) THEN       &       SEAICE_mcPheePiston .GT. SEAICE_mcphee_max ) ) THEN
128         WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:',         WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:',
129       &  ' SEAICE_mcPheePiston is out of bounds.'       &  ' SEAICE_mcPheePiston is out of bounds.'
130         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
131         WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:',         WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:',
132       &  ' They must lie within 0. and drf(1)/SEAICE_deltaTtherm '       &  ' They must lie within 0. and drF(1)/SEAICE_deltaTtherm '
133         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
134         STOP 'ABNORMAL END: S/R SEAICE_CHECK'         STOP 'ABNORMAL END: S/R SEAICE_CHECK'
135        ENDIF        ENDIF
# Line 194  C--   check concistency of turbulent flu Line 147  C--   check concistency of turbulent flu
147    
148        IF ( ( SEAICE_mcPheeTaper .LT. 0. _d 0 ) .OR.        IF ( ( SEAICE_mcPheeTaper .LT. 0. _d 0 ) .OR.
149       &     ( SEAICE_mcPheeTaper .GT. 1. _d 0 ) ) THEN       &     ( SEAICE_mcPheeTaper .GT. 1. _d 0 ) ) THEN
150           WRITE(msgBuf,'(A)')           WRITE(msgBuf,'(2A)')
151       &      'SEAICE_mcPheeTaper cannot be specified  '//       &      'SEAICE_mcPheeTaper cannot be specified  ',
152       &      'outside of the [0. 1.] range'       &      'outside of the [0. 1.] range'
153           CALL PRINT_ERROR( msgBuf , myThid)           CALL PRINT_ERROR( msgBuf , myThid)
154           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
# Line 258  c to be added : if SEAICE_ageTracer we s Line 211  c to be added : if SEAICE_ageTracer we s
211    
212        IF ( ( SItrFromOceanFrac(iTracer) .LT. 0. _d 0 ) .OR.        IF ( ( SItrFromOceanFrac(iTracer) .LT. 0. _d 0 ) .OR.
213       &     ( SItrFromOceanFrac(iTracer) .GT. 1. _d 0 ) ) THEN       &     ( SItrFromOceanFrac(iTracer) .GT. 1. _d 0 ) ) THEN
214           WRITE(msgBuf,'(A)')           WRITE(msgBuf,'(2A)')
215       &      'SItrFromOceanFrac cannot be specified  '//       &      'SItrFromOceanFrac cannot be specified  ',
216       &      'outside of the [0. 1.] range'       &      'outside of the [0. 1.] range'
217           CALL PRINT_ERROR( msgBuf , myThid)           CALL PRINT_ERROR( msgBuf , myThid)
218           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
# Line 267  c to be added : if SEAICE_ageTracer we s Line 220  c to be added : if SEAICE_ageTracer we s
220    
221        IF ( ( SItrFromFloodFrac(iTracer) .LT. 0. _d 0 ) .OR.        IF ( ( SItrFromFloodFrac(iTracer) .LT. 0. _d 0 ) .OR.
222       &     ( SItrFromFloodFrac(iTracer) .GT. 1. _d 0 ) ) THEN       &     ( SItrFromFloodFrac(iTracer) .GT. 1. _d 0 ) ) THEN
223           WRITE(msgBuf,'(A)')           WRITE(msgBuf,'(2A)')
224       &      'SItrFromFloodFrac cannot be specified  '//       &      'SItrFromFloodFrac cannot be specified  ',
225       &      'outside of the [0. 1.] range'       &      'outside of the [0. 1.] range'
226           CALL PRINT_ERROR( msgBuf , myThid)           CALL PRINT_ERROR( msgBuf , myThid)
227           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
# Line 276  c to be added : if SEAICE_ageTracer we s Line 229  c to be added : if SEAICE_ageTracer we s
229    
230  c      IF ( (SItrName(iTracer).EQ.'salinity') .AND.  c      IF ( (SItrName(iTracer).EQ.'salinity') .AND.
231  c     &     (SItrMate(iTracer).NE.'HEFF') ) THEN  c     &     (SItrMate(iTracer).NE.'HEFF') ) THEN
232  c         WRITE(msgBuf,'(A)')  c         WRITE(msgBuf,'(2A)')
233  c     &      'SItrName = "salinity" requires  '//  c     &      'SItrName = "salinity" requires  ',
234  c     &      'SItrMate = "HEFF" '  c     &      'SItrMate = "HEFF" '
235  c         CALL PRINT_ERROR( msgBuf , myThid)  c         CALL PRINT_ERROR( msgBuf , myThid)
236  c         STOP 'ABNORMAL END: S/R SEAICE_READPARMS'  c         STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
# Line 286  c      ENDIF Line 239  c      ENDIF
239        IF ( (SItrName(iTracer).NE.'salinity').AND.        IF ( (SItrName(iTracer).NE.'salinity').AND.
240       &     ( (SItrFromOceanFrac(iTracer).NE.ZERO).OR.       &     ( (SItrFromOceanFrac(iTracer).NE.ZERO).OR.
241       &       (SItrFromFloodFrac(iTracer).NE.ZERO) ) ) THEN       &       (SItrFromFloodFrac(iTracer).NE.ZERO) ) ) THEN
242           WRITE(msgBuf,'(A)')           WRITE(msgBuf,'(2A)')
243       &      'SItrFromOceanFrac / SItrFromFloodFrac is only  '//       &      'SItrFromOceanFrac / SItrFromFloodFrac is only  ',
244       &      'available for SItrName = "salinity" (for now)'       &      'available for SItrName = "salinity" (for now)'
245           CALL PRINT_ERROR( msgBuf , myThid)           CALL PRINT_ERROR( msgBuf , myThid)
246           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'           STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
247        ENDIF        ENDIF
248    
249        ENDDO        ENDDO
250  #endif        #endif
251          
252  C--   Check advection schemes  C--   Check advection schemes
253        checkAdvSchArea = SEAICEadvArea .AND. (        checkAdvSchArea = SEAICEadvArea .AND. (
254       &     SEAICEadvSchArea.NE.ENUM_UPWIND_1RST .AND.       &     SEAICEadvSchArea.NE.ENUM_UPWIND_1RST .AND.
# Line 501  C--   SEAICE_ALLOW_TD_IF is obsolete: is Line 454  C--   SEAICE_ALLOW_TD_IF is obsolete: is
454          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
455       &    'SEAICE_CHECK: turbulent ice-ocn heat flux default changed.'       &    'SEAICE_CHECK: turbulent ice-ocn heat flux default changed.'
456          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
457          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
458       &   'SEAICE_CHECK:    To recover the old default : set '       &   'SEAICE_CHECK:    To recover the old default : set '
459          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
460          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
461       &   'SEAICE_CHECK:    SEAICE_mcPheePiston to the first ocn level'       &   'SEAICE_CHECK:    SEAICE_mcPheePiston to the first ocn level'
462          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
463          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
464       &   'SEAICE_CHECK:    thickness divided by SEAICE_deltaTtherm.'       &   'SEAICE_CHECK:    thickness divided by SEAICE_deltaTtherm.'
465          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
466    
467  C--   SEAICE_DO_OPEN_WATER_GROWTH is obsolete: issue warning and stop.  C--   SEAICE_DO_OPEN_WATER_GROWTH is obsolete: issue warning and stop.
468  #if defined(SEAICE_DO_OPEN_WATER_GROWTH) || \  #if defined(SEAICE_DO_OPEN_WATER_GROWTH) || \
469      defined(SEAICE_DO_OPEN_WATER_MELT)        defined(SEAICE_DO_OPEN_WATER_MELT)
470           WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: ',           WRITE(msgBuf,'(2A)') 'SEAICE_CHECK: ',
471       &     'SEAICE_DO_OPEN_WATER_GROWTH / MELT options are obsolete'       &     'SEAICE_DO_OPEN_WATER_GROWTH / MELT options are obsolete'
472           CALL PRINT_ERROR( msgBuf, myThid )           CALL PRINT_ERROR( msgBuf, myThid )
# Line 675  C--   pkg/seaice requires pkg/exf with f Line 628  C--   pkg/seaice requires pkg/exf with f
628          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
629       &    'SEAICE_CHECK: variable freezing point is new default.'       &    'SEAICE_CHECK: variable freezing point is new default.'
630          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
631          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
632       &    'SEAICE_CHECK:    To recover old constant freezing : '       &    'SEAICE_CHECK:    To recover old constant freezing : '
633          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
634          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
635       &    'SEAICE_CHECK:    set SEAICE_tempFrz0 = -1.96 and '       &    'SEAICE_CHECK:    set SEAICE_tempFrz0 = -1.96 and '
636          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
637          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
638       &    'SEAICE_CHECK:    SEAICE_dTempFrz_dS = 0.'       &    'SEAICE_CHECK:    SEAICE_dTempFrz_dS = 0.'
639          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf , myThid)
640    

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

  ViewVC Help
Powered by ViewVC 1.1.22