/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/adstreamice_invert_surf_forthick.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/adstreamice_invert_surf_forthick.F

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


Revision 1.3 - (show annotations) (download)
Wed Aug 27 19:29:12 2014 UTC (11 years, 3 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +16 -13 lines
updating contrib streamice repo with latest files, and separated out convergence checks; and parameterised maximum iteration counts and interface w shelfice for coupling

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/adstreamice_invert_surf_forthick.F,v 1.4 2014/07/09 16:09:48 dgoldberg Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5 #include "STREAMICE_OPTIONS.h"
6
7 SUBROUTINE ADSTRMICE_H_INV (myThid)
8
9 ! This S/R finds a thickness (H) that gives surf elev S with bed R
10
11 #include "SIZE.h"
12 #include "GRID.h"
13 #include "SET_GRID.h"
14 #include "EEPARAMS.h"
15 #include "PARAMS.h"
16 #include "STREAMICE.h"
17 !#include "CTRL_GENARR.h"
18
19 INTEGER myThid
20
21 #ifdef ALLOW_STREAMICE
22
23 _RL resid, f, fp, hf, htmp
24 _RL rhoi, rhow, r, i_r, delta
25 INTEGER ITER, i, j, bi, bj
26 _RL ETA_GL_STREAMICE
27 EXTERNAL ETA_GL_STREAMICE
28 _RL ETA_GL_STREAMICE_PRIME
29 ! EXTERNAL PHI_GL_STREAMICE_PRIME
30
31 _RL H(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
32 ! _RL Rtmp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
33 _RL r_low_si_ad(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
34 common /streamice_rlow_ad/ r_low_si_ad
35 _RL h_streamice_ad(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
36 common /streamice_fields_rl_ad/ h_streamice_ad
37
38 ! il=ILNBLNK( xx_genarr2d_file(iarr) )
39 ! write(fnamegeneric(1:80),'(2a,i10.10)')
40 ! & xx_genarr2d_file(iarr)(1:il),'.',optimcycle
41 ! CALL ACTIVE_READ_XY ( fnamegeneric, tmpfld2d, 1,
42 ! & doglobalread, ladinit, optimcycle,
43 ! & myThid, xx_genarr2d_dummy(iarr) )
44
45
46
47 ! CALL ACTIVE_READ_XY ( 'H_adjust.data', H, 1,
48 ! & doglobalread, ladinit, optimcycle,
49 ! & myThid,
50
51 ! CALL READ_FLD_XY_RL( 'R_low_adjust.data', ' ', Rtmp,
52 ! & 0, myThid )
53
54 CALL STREAMICE_INVERT_SURF_FORTHICK (
55 O H,
56 I surf_el_streamice,
57 I R_low_si,
58 I delta,
59 I myThid)
60
61 rhoi = streamice_density
62 rhow = streamice_density_ocean_avg
63 r=rhoi/rhow
64 i_r = 1/r
65 delta=1-r
66
67 DO bj=myByLo(myThid), myByHi(myThid)
68 DO bi=myBxLo(myThid), myBxHi(myThid)
69 do j = 1,sNy
70 do i = 1,sNx
71
72 hf = -1.0 * i_r * R_low_si (i,j,bi,bj)
73
74 fp = ETA_GL_STREAMICE_PRIME (
75 & H (i,j,bi,bj)-hf,
76 & delta,
77 & 1. _d 0,
78 & delta*hf,
79 & streamice_smooth_gl_width)
80
81 r_low_si_ad (i,j,bi,bj) =
82 & r_low_si_ad (i,j,bi,bj) -
83 & i_r * (fp-delta)/fp *
84 & h_streamice_ad(i,j,bi,bj)
85
86 enddo
87 enddo
88 enddo
89 enddo
90
91
92 #endif
93 RETURN
94 END

  ViewVC Help
Powered by ViewVC 1.1.22