1 | MODULE isfdiags |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE sbcisf *** |
---|
4 | !! Surface module : update surface ocean boundary condition under ice |
---|
5 | !! shelf |
---|
6 | !!====================================================================== |
---|
7 | !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav |
---|
8 | !! X.X ! 2006-02 (C. Wang ) Original code bg03 |
---|
9 | !! 3.4 ! 2013-03 (P. Mathiot) Merging + parametrization |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! sbc_isf : update sbc under ice shelf |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | |
---|
16 | USE in_out_manager ! I/O manager |
---|
17 | USE dom_oce |
---|
18 | USE isf ! ice shelf variable |
---|
19 | USE isfutils |
---|
20 | USE iom ! |
---|
21 | |
---|
22 | IMPLICIT NONE |
---|
23 | |
---|
24 | PRIVATE |
---|
25 | |
---|
26 | PUBLIC isf_diags_flx |
---|
27 | |
---|
28 | !!---------------------------------------------------------------------- |
---|
29 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
30 | !! $Id: sbcisf.F90 10536 2019-01-16 19:21:09Z mathiot $ |
---|
31 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | |
---|
34 | CONTAINS |
---|
35 | |
---|
36 | SUBROUTINE isf_diags_flx(ktop, kbot, phtbl, pfrac, cdisf, pqfwf, pqoce, pqlat, pqhc) |
---|
37 | !!--------------------------------------------------------------------- |
---|
38 | !! *** ROUTINE isf_diags_2dto3d *** |
---|
39 | !! |
---|
40 | !! ** Purpose : |
---|
41 | !! |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !!-------------------------- OUT ------------------------------------- |
---|
44 | !!-------------------------- IN ------------------------------------- |
---|
45 | INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot ! top and bottom level of the tbl |
---|
46 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac ! thickness of the tbl and fraction of last cell affected by the tbl |
---|
47 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqfwf, pqoce, pqlat, pqhc ! 2d var to map in 3d |
---|
48 | CHARACTER(LEN=256), INTENT(in) :: cdisf ! parametrisation or interactive melt |
---|
49 | !!--------------------------------------------------------------------- |
---|
50 | CHARACTER(LEN=256) :: cvarqfwf , cvarqoce , cvarqlat , cvarqhc |
---|
51 | CHARACTER(LEN=256) :: cvarqfwf3d, cvarqoce3d, cvarqlat3d, cvarqhc3d |
---|
52 | !!--------------------------------------------------------------------- |
---|
53 | ! |
---|
54 | ! output melt |
---|
55 | cvarqfwf = 'fwfisf_'//cdisf ; cvarqfwf3d = 'fwfisf3d_'//cdisf |
---|
56 | cvarqoce = 'qoceisf_'//cdisf ; cvarqoce3d = 'qoceisf3d_'//cdisf |
---|
57 | cvarqlat = 'qlatisf_'//cdisf ; cvarqlat3d = 'qlatisf3d_'//cdisf |
---|
58 | cvarqhc = 'qhcisf_'//cdisf ; cvarqhc3d = 'qhcisf3d_'//cdisf |
---|
59 | ! |
---|
60 | ! output 2d melt rate, latent heat and heat content flux |
---|
61 | CALL iom_put( TRIM(cvarqfwf), pqfwf(:,:) ) ! isf mass flux (opposite sign) |
---|
62 | CALL iom_put( TRIM(cvarqoce), pqoce(:,:) ) ! isf oce to ice flux (cpo*gt*dt) |
---|
63 | CALL iom_put( TRIM(cvarqlat), pqlat(:,:) ) ! isf oce to ice flux (cpo*gt*dt) |
---|
64 | CALL iom_put( TRIM(cvarqhc) , pqhc (:,:) ) ! isf heat content flux (cpo*fwf*Tfrz) |
---|
65 | ! |
---|
66 | ! output 3d Diagnostics |
---|
67 | IF ( iom_use( TRIM(cvarqfwf3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqfwf3d) , pqfwf(:,:)) |
---|
68 | IF ( iom_use( TRIM(cvarqoce3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqoce3d) , pqoce(:,:)) |
---|
69 | IF ( iom_use( TRIM(cvarqlat3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqlat3d) , pqoce(:,:)) |
---|
70 | IF ( iom_use( TRIM(cvarqhc3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqhc3d) , pqhc (:,:)) |
---|
71 | ! |
---|
72 | END SUBROUTINE |
---|
73 | |
---|
74 | SUBROUTINE isf_diags_2dto3d(ktop, kbot, phtbl, pfrac, cdvar, pvar2d) |
---|
75 | !!--------------------------------------------------------------------- |
---|
76 | !! *** ROUTINE isf_diags_2dto3d *** |
---|
77 | !! |
---|
78 | !! ** Purpose : |
---|
79 | !! |
---|
80 | !!---------------------------------------------------------------------- |
---|
81 | !!-------------------------- OUT ------------------------------------- |
---|
82 | !!-------------------------- IN ------------------------------------- |
---|
83 | INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot ! top and bottom level of the tbl |
---|
84 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac ! thickness of the tbl and fraction of last cell affected by the tbl |
---|
85 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pvar2d ! 2d var to map in 3d |
---|
86 | CHARACTER(LEN=256), INTENT(in) :: cdvar |
---|
87 | !!--------------------------------------------------------------------- |
---|
88 | INTEGER :: ji, jj, jk ! loop indices |
---|
89 | INTEGER :: ikt, ikb ! top and bottom level of the tbl |
---|
90 | REAL(wp), DIMENSION(jpi,jpj) :: zvar2d ! |
---|
91 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zvar3d ! 3d var to output |
---|
92 | !!--------------------------------------------------------------------- |
---|
93 | ! |
---|
94 | ! compute 3d output |
---|
95 | zvar2d(:,:) = pvar2d(:,:) / phtbl(:,:) |
---|
96 | zvar3d(:,:,:) = 0._wp |
---|
97 | ! |
---|
98 | DO jj = 1,jpj |
---|
99 | DO ji = 1,jpi |
---|
100 | ikt = ktop(ji,jj) |
---|
101 | ikb = kbot(ji,jj) |
---|
102 | DO jk = ikt, ikb - 1 |
---|
103 | zvar3d(ji,jj,jk) = zvar2d(ji,jj) * e3t_n(ji,jj,jk) |
---|
104 | END DO |
---|
105 | zvar3d(ji,jj,ikb) = zvar2d(ji,jj) * e3t_n(ji,jj,ikb) * pfrac(ji,jj) |
---|
106 | END DO |
---|
107 | END DO |
---|
108 | ! |
---|
109 | CALL iom_put( TRIM(cdvar) , zvar3d(:,:,:)) |
---|
110 | ! |
---|
111 | END SUBROUTINE isf_diags_2dto3d |
---|
112 | |
---|
113 | END MODULE isfdiags |
---|