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