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

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

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

revision 1.1 by heimbach, Mon Oct 22 21:14:07 2012 UTC revision 1.2 by jmc, Tue Oct 23 13:20:49 2012 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4  #include "SEAICE_OPTIONS.h"  #include "SEAICE_OPTIONS.h"
5    
# Line 21  C     |      into the correct category b Line 23  C     |      into the correct category b
23  C     |      -> simpleSchemeFlag = .TRUE.  C     |      -> simpleSchemeFlag = .TRUE.
24  C     |  C     |
25  C     |   b) a scheme that assumes a log-normal distribution based  C     |   b) a scheme that assumes a log-normal distribution based
26  C     |      on the mean ice thickness and a standard decviation  C     |      on the mean ice thickness and a standard decviation
27  C     |      of LND_sigma=0.25  C     |      of LND_sigma=0.25
28  C     |      -> simpleSchemeFlag = .FALSE.  C     |      -> simpleSchemeFlag = .FALSE.
29  C     |  C     |
# Line 75  C Line 77  C
77  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
78        _RL dummyTime        _RL dummyTime
79    
80  C     local variables for picking up ITD from single category pickup file  C     local variables for picking up ITD from single category pickup file
81        INTEGER LND_i, LND_iend        INTEGER LND_i, LND_iend
82  C     parameters for log-normal distribution (LND)  C     parameters for log-normal distribution (LND)
83        _RL LND_sigma, LND_mu        _RL LND_sigma, LND_mu
# Line 119  C--      Assume log-normal ITD: Line 121  C--      Assume log-normal ITD:
121              DO i=1-OLx,sNx+OLx              DO i=1-OLx,sNx+OLx
122  C  C
123  C            initialize log-normal distribution  C            initialize log-normal distribution
124               LND_mu = log(HEFF(i,j,bi,bj)/AREA(i,j,bi,bj))               LND_mu = log(HEFF(i,j,bi,bj)/AREA(i,j,bi,bj))
125       &                - 0.5*LND_sigma*LND_sigma       &                - 0.5*LND_sigma*LND_sigma
126               LND_x(1) = 0.+LND_dx/2.               LND_x(1) = 0.+LND_dx/2.
127  C            make thickness bins  C            make thickness bins
128               DO LND_i=2,LND_iend               DO LND_i=2,LND_iend
129                LND_x(LND_i)=LND_x(LND_i-1)+LND_dx                LND_x(LND_i)=LND_x(LND_i-1)+LND_dx
130               ENDDO               ENDDO
131  C            log-normal distribution:  C            log-normal distribution:
132               DO LND_i=2,LND_iend               DO LND_i=2,LND_iend
133                LND_tmp = log(LND_x(LND_i))-LND_mu                LND_tmp = log(LND_x(LND_i))-LND_mu
134                LND_pdf(LND_i)= 1.                LND_pdf(LND_i)= 1.
135       &             / (LND_x(LND_i)*LND_sigma*sqrt(2*3.1416))       &             / (LND_x(LND_i)*LND_sigma*sqrt(2*3.1416))
136       &             * exp( -(LND_tmp*LND_tmp)       &             * exp( -(LND_tmp*LND_tmp)
137       &             /       (2*LND_sigma*LND_sigma) )       &             /       (2*LND_sigma*LND_sigma) )
138       &             * AREA(i,j,bi,bj)       &             * AREA(i,j,bi,bj)
139               ENDDO               ENDDO
140  C            assign bins to ice thickness categories  C            assign bins to ice thickness categories
141               k=1               k=1
142               DO LND_i=1,LND_iend               DO LND_i=1,LND_iend
143                IF ( LND_x(LND_i).GT.Hlimit(k) ) k=k+1                IF ( LND_x(LND_i).GT.Hlimit(k) ) k=k+1
144                AREAITD(i,j,k,bi,bj) = AREAITD(i,j,k,bi,bj)                AREAITD(i,j,k,bi,bj) = AREAITD(i,j,k,bi,bj)
145       &                             + LND_pdf(LND_i)*LND_dx       &                             + LND_pdf(LND_i)*LND_dx
146                HEFFITD(i,j,k,bi,bj) = HEFFITD(i,j,k,bi,bj)                HEFFITD(i,j,k,bi,bj) = HEFFITD(i,j,k,bi,bj)
147       &                             + LND_pdf(LND_i)*LND_x(LND_i)*LND_dx       &                             + LND_pdf(LND_i)*LND_x(LND_i)*LND_dx
148               ENDDO               ENDDO
149  C  C
150              ENDDO              ENDDO
151             ENDDO             ENDDO
152            ENDDO            ENDDO
153           ENDDO           ENDDO
154    
155        ENDIF        ENDIF
156    
157  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
158  C     finally sort into correct ice thickness category  C     finally sort into correct ice thickness category
159  C      and compute bulk variables  C      and compute bulk variables
160  C      (needed for dynamic solver at beginning of seaice_model.F)  C      (needed for dynamic solver at beginning of seaice_model.F)
161        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
162         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 166  C      (needed for dynamic solver at beg Line 168  C      (needed for dynamic solver at beg
168  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
169  #endif /* SEAICE_ITD */  #endif /* SEAICE_ITD */
170        RETURN        RETURN
171        END SUBROUTINE SEAICE_ITD_PICKUP        END
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22