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

Contents of /MITgcm/pkg/seaice/seaice_model.F

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


Revision 1.5 - (show annotations) (download)
Tue Feb 18 05:33:55 2003 UTC (21 years, 3 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint48i_post, checkpoint50, checkpoint50b_pre, checkpoint48f_post, checkpoint48h_post, checkpoint50a_post, checkpoint49, checkpoint48g_post, checkpoint50b_post
Changes since 1.4: +12 -16 lines
Merging from release1_p12:
o Modifications for using pkg/exf with pkg/seaice
  - improved description of the various forcing configurations
  - added basic radiation bulk formulae to pkg/exf
  - units/sign fix for evap computation in exf_getffields.F
  - updated verification/global_with_exf/results/output.txt
o Added pkg/sbo for computing IERS Special Bureau for the Oceans
  (SBO) core products, including oceanic mass, center-of-mass,
  angular, and bottom pressure (see pkg/sbo/README.sbo).
o Lower bound for viscosity/diffusivity in pkg/kpp/kpp_routines.F
  to avoid negative values in shallow regions.
  - updated verification/natl_box/results/output.txt
  - updated verification/lab_sea/results/output.txt
o MPI gather, scatter: eesupp/src/gather_2d.F and scatter_2d.F
o Added useSingleCpuIO option (see PARAMS.h).
o Updated useSingleCpuIO option in mdsio_writefield.F to
  work with multi-field files, e.g., for single-file pickup.
o pkg/seaice:
  - bug fix in growth.F: QNET for no shortwave case
  - added HeffFile for specifying initial sea-ice thickness
  - changed SEAICE_EXTERNAL_FLUXES wind stress implementation
o Added missing /* */ to CPP comments in pkg/seaice, pkg/exf,
  kpp_transport_t.F, forward_step.F, and the_main_loop.F
o pkg/seaice:
  - adjoint-friendly modifications
  - added a SEAICE_WRITE_PICKUP at end of the_model_main.F

1 C $Header:
2
3 #include "SEAICE_OPTIONS.h"
4
5 CStartOfInterface
6 SUBROUTINE seaice_model( myTime, myIter, myThid )
7 C /==========================================================\
8 C | SUBROUTINE SEAICE_MODEL |
9 C | o Time stepping of sea ice model. |
10 C |==========================================================|
11 C \==========================================================/
12 IMPLICIT NONE
13
14 C === Global variables ===
15 #include "SIZE.h"
16 #include "EEPARAMS.h"
17 #include "DYNVARS.h"
18 #include "PARAMS.h"
19 #include "FFIELDS.h"
20 #include "SEAICE.h"
21 #include "SEAICE_PARAMS.h"
22 #include "SEAICE_EXTERNAL.h"
23
24 #ifdef ALLOW_AUTODIFF_TAMC
25 # include "tamc.h"
26 #endif
27
28 #ifdef SEAICE_EXTERNAL_FORCING
29 #include "SEAICE_FFIELDS.h"
30 #endif
31
32 C === Routine arguments ===
33 C myTime - Simulation time
34 C myIter - Simulation timestep number
35 C myThid - Thread no. that called this routine.
36 _RL myTime
37 INTEGER myIter
38 INTEGER myThid
39 CEndOfInterface
40
41 #ifdef ALLOW_SEAICE
42
43 C === Local variables ===
44 C i,j,bi,bj - Loop counters
45
46 INTEGER i, j, bi, bj
47
48 #ifdef SEAICE_EXTERNAL_FORCING
49 C-- Atmospheric state and runoff are from
50 C pkg/exf, which does not update edges.
51 _EXCH_XY_R8( uwind, myThid )
52 _EXCH_XY_R8( vwind, myThid )
53 _EXCH_XY_R8( atemp, myThid )
54 _EXCH_XY_R8( aqh, myThid )
55 _EXCH_XY_R8( lwdown, myThid )
56 _EXCH_XY_R8( swdown, mythid )
57 _EXCH_XY_R8( precip, myThid )
58 _EXCH_XY_R8( evap, myThid )
59 _EXCH_XY_R8( runoff, myThid )
60 #else /* SEAICE_EXTERNAL_FORCING */
61 C-- Load atmospheric state and runoff.
62 CALL SEAICE_GET_FORCING ( myTime, myIter, myThid )
63 #endif /* SEAICE_EXTERNAL_FORCING */
64
65 C-- Third level model velocity is used as proxy for geostrophic velocity
66 DO bj=myByLo(myThid),myByHi(myThid)
67 DO bi=myBxLo(myThid),myBxHi(myThid)
68 DO j=0,sNy+1
69 DO i=0,sNx+1
70 GWATX(I,J,bi,bj)=HALF*(uVel(i+1,j,3,bi,bj)
71 & +uVel(i+1,j+1,3,bi,bj))
72 GWATY(I,J,bi,bj)=HALF*(vVel(i,j+1,3,bi,bj)
73 & +vVel(i+1,j+1,3,bi,bj))
74 #ifdef SEAICE_DEBUG
75 c write(*,'(2i4,2i2,f7.1,7f12.3)')
76 c & ,i,j,bi,bj,UVM(I,J,bi,bj)
77 c & ,GWATX(I,J,bi,bj),GWATY(I,J,bi,bj)
78 c & ,uVel(i+1,j,3,bi,bj),uVel(i+1,j+1,3,bi,bj)
79 c & ,vVel(i,j+1,3,bi,bj),vVel(i+1,j+1,3,bi,bj)
80 #endif
81 ENDDO
82 ENDDO
83 ENDDO
84 ENDDO
85
86 C solve ice momentum equations and calculate ocean surface stress
87 CALL DYNSOLVER ( myTime, myIter, myThid )
88
89 C NOW DO ADVECTION
90 CALL ADVECT( UICE, VICE, HEFF, HEFFM, myThid )
91 CALL ADVECT( UICE, VICE, AREA, HEFFM, myThid )
92
93 C NOW DO GROWTH
94 C MUST CALL GROWTH ONLY AFTER CALLING ADVECTION
95 CALL GROWTH( myTime, myIter, myThid)
96
97 C-- Update overlap regions for a bunch of stuff
98 _BARRIER
99 CALL SEAICE_EXCH( HEFF, myThid )
100 CALL SEAICE_EXCH( AREA, myThid )
101 _EXCH_XY_R4(fu , myThid )
102 _EXCH_XY_R4(fv , myThid )
103 _EXCH_XY_R4(EmPmR, myThid )
104 _EXCH_XY_R4(Qnet , myThid )
105 _EXCH_XY_R4(surfaceTendencyTice, myThid )
106 #ifdef SHORTWAVE_HEATING
107 _EXCH_XY_R4(Qsw , myThid )
108 #endif
109 _EXCH_XYZ_R8(theta , myThid )
110
111 C-- Sea ice diagnostics.
112 CALL SEAICE_DO_DIAGS( myTime, myIter, myThid )
113
114 C-- Write sea ice restart files
115 CALL SEAICE_WRITE_PICKUP ( .FALSE.,
116 & myTime+deltaTClock, myIter+1, myThid )
117
118 C---------------------------------------------------
119 C OOH NOOOO we need to move the whole stuff
120 C---------------------------------------------------
121 #ifdef ALLOW_AUTODIFF_TAMC
122 CRG CADJ store UICE,VICE,AREA,HEFF,fu,fv,EmPmR,Qnet,Qsw = comlev1_bibj
123 #endif
124
125 C-- Call sea-ice cost function routine
126 CRG CALL SEAICE_COST( myTime, myIter, myThid )
127
128 #endif /* ALLOW_SEAICE */
129
130 RETURN
131 END

  ViewVC Help
Powered by ViewVC 1.1.22