[821] | 1 | MODULE iceini_2 |
---|
[3] | 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE iceini *** |
---|
[821] | 4 | !! Sea-ice model : LIM 2.0 Sea ice model Initialization |
---|
[3] | 5 | !!====================================================================== |
---|
[2715] | 6 | !! History : 1.0 ! 2002-08 (G. Madec) F90: Free form and modules |
---|
| 7 | !! 2.0 ! 2003-08 (C. Ethe) add ice_run |
---|
| 8 | !! 3.3 ! 2009-05 (G. Garric, C. Bricaud) addition of the lim2_evp case |
---|
| 9 | !! 4.0 ! 2011-02 (G. Madec) dynamical allocation |
---|
[508] | 10 | !!---------------------------------------------------------------------- |
---|
[821] | 11 | #if defined key_lim2 |
---|
[3] | 12 | !!---------------------------------------------------------------------- |
---|
[821] | 13 | !! 'key_lim2' : LIM 2.0 sea-ice model |
---|
[3] | 14 | !!---------------------------------------------------------------------- |
---|
[3625] | 15 | !! ice_init_2 : sea-ice model initialization |
---|
| 16 | !! ice_run_2 : Definition some run parameter for ice model |
---|
[3] | 17 | !!---------------------------------------------------------------------- |
---|
[3625] | 18 | USE phycst ! physical constants |
---|
| 19 | USE dom_oce ! ocean domain |
---|
| 20 | USE sbc_oce ! surface boundary condition: ocean |
---|
| 21 | USE sbc_ice ! LIM2 surface boundary condition |
---|
| 22 | USE dom_ice_2 ! LIM2 ice domain |
---|
| 23 | USE par_ice_2 ! LIM2 parameters |
---|
| 24 | USE thd_ice_2 ! LIM2 thermodynamical variables |
---|
| 25 | USE ice_2 ! LIM2 ice variable |
---|
| 26 | USE limmsh_2 ! LIM2 mesh |
---|
| 27 | USE limistate_2 ! LIM2 initial state |
---|
| 28 | USE limrst_2 ! LIM2 restart |
---|
| 29 | USE limsbc_2 ! LIM2 surface boundary condition |
---|
[4325] | 30 | USE limdia_2 |
---|
[3625] | 31 | USE in_out_manager ! I/O manager |
---|
| 32 | USE lib_mpp ! MPP library |
---|
| 33 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[2715] | 34 | |
---|
[3] | 35 | IMPLICIT NONE |
---|
| 36 | PRIVATE |
---|
| 37 | |
---|
[1228] | 38 | PUBLIC ice_init_2 ! called by sbcice_lim_2.F90 |
---|
[3] | 39 | |
---|
| 40 | !!---------------------------------------------------------------------- |
---|
[2715] | 41 | !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) |
---|
[5341] | 42 | !! $Id$ |
---|
[2528] | 43 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 44 | !!---------------------------------------------------------------------- |
---|
| 45 | CONTAINS |
---|
| 46 | |
---|
[821] | 47 | SUBROUTINE ice_init_2 |
---|
[3] | 48 | !!---------------------------------------------------------------------- |
---|
[821] | 49 | !! *** ROUTINE ice_init_2 *** |
---|
[3] | 50 | !! |
---|
[2528] | 51 | !! ** purpose : initialisation of LIM-2 domain and variables |
---|
[3] | 52 | !!---------------------------------------------------------------------- |
---|
[2715] | 53 | INTEGER :: ierr |
---|
| 54 | !!---------------------------------------------------------------------- |
---|
[508] | 55 | ! |
---|
[2715] | 56 | IF(lwp) THEN |
---|
| 57 | WRITE(numout,*) |
---|
| 58 | WRITE(numout,*) 'ice_init_2 : LIM-2 sea-ice - initialization' |
---|
| 59 | WRITE(numout,*) '~~~~~~~~~~~ ' |
---|
| 60 | ENDIF |
---|
[4607] | 61 | ! |
---|
[2715] | 62 | ! ! Allocate the ice arrays |
---|
| 63 | ierr = ice_alloc_2 () ! ice variables |
---|
| 64 | ierr = ierr + dom_ice_alloc_2() ! domain |
---|
| 65 | ierr = ierr + sbc_ice_alloc () ! surface forcing |
---|
| 66 | ierr = ierr + thd_ice_alloc_2() ! thermodynamics |
---|
[3294] | 67 | |
---|
[2715] | 68 | IF( lk_mpp ) CALL mpp_sum( ierr ) |
---|
| 69 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'ice_init_2 : unable to allocate ice arrays' ) |
---|
| 70 | |
---|
| 71 | ! ! adequation jpk versus ice/snow layers |
---|
| 72 | IF( jpl > jpk .OR. jplayersp1 > jpk ) CALL ctl_stop( 'STOP', & |
---|
| 73 | & 'ice_init: the 3rd dimension of workspace arrays is too small.', & |
---|
| 74 | & 'use more ocean levels or less ice layers/categories.' ) |
---|
| 75 | |
---|
[4147] | 76 | ! ! Open the reference and configuration namelist files and namelist output file |
---|
| 77 | CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) |
---|
| 78 | CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) |
---|
[4624] | 79 | IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) |
---|
[4309] | 80 | |
---|
[4306] | 81 | ! ! Open the namelist file |
---|
[2528] | 82 | ! |
---|
| 83 | CALL ice_run_2 ! read in namelist some run parameters |
---|
| 84 | ! |
---|
[6140] | 85 | rdt_ice = nn_fsbc * rdt ! sea-ice time step |
---|
[2528] | 86 | numit = nit000 - 1 |
---|
| 87 | ! |
---|
| 88 | CALL lim_msh_2 ! ice mesh initialization |
---|
| 89 | ! |
---|
| 90 | ! ! Initial sea-ice state |
---|
| 91 | IF( .NOT.ln_rstart ) THEN ; CALL lim_istate_2 ! start from rest: sea-ice deduced from sst |
---|
| 92 | ELSE ; CALL lim_rst_read_2 ! start from a restart file |
---|
[3] | 93 | ENDIF |
---|
[508] | 94 | ! |
---|
[4508] | 95 | IF( .NOT.lk_mpp ) CALL lim_dia_init_2 ! online diagnostics in mono proc only |
---|
[4325] | 96 | ! |
---|
[2715] | 97 | tn_ice(:,:,1) = sist(:,:) ! ice temperature known by the ocean |
---|
| 98 | fr_i (:,:) = 1.0 - frld(:,:) ! sea-ice fraction known by the ocean |
---|
[2528] | 99 | ! |
---|
[2715] | 100 | CALL lim_sbc_init_2 ! ice surface boundary condition |
---|
| 101 | ! |
---|
[2730] | 102 | IF( lk_lim2_vp ) THEN ; IF(lwp) WRITE(numout,*) ' VP rheology - B-grid case' |
---|
| 103 | ELSE ; IF(lwp) WRITE(numout,*) ' EVP rheology - C-grid case' |
---|
[2715] | 104 | ENDIF |
---|
| 105 | ! |
---|
[821] | 106 | END SUBROUTINE ice_init_2 |
---|
[3] | 107 | |
---|
| 108 | |
---|
[821] | 109 | SUBROUTINE ice_run_2 |
---|
[3] | 110 | !!------------------------------------------------------------------- |
---|
[821] | 111 | !! *** ROUTINE ice_run_2 *** |
---|
[3] | 112 | !! |
---|
| 113 | !! ** Purpose : Definition some run parameter for ice model |
---|
| 114 | !! |
---|
| 115 | !! ** Method : Read the namicerun namelist and check the parameter |
---|
| 116 | !! values called at the first timestep (nit000) |
---|
| 117 | !! |
---|
| 118 | !! ** input : Namelist namicerun |
---|
| 119 | !!------------------------------------------------------------------- |
---|
[5341] | 120 | NAMELIST/namicerun/ cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & |
---|
| 121 | ln_limdyn, ln_limdmp, acrit, hsndif, hicdif |
---|
[4147] | 122 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[3] | 123 | !!------------------------------------------------------------------- |
---|
[508] | 124 | ! |
---|
[4147] | 125 | REWIND( numnam_ice_ref ) ! Namelist namicerun in reference namelist : Parameters for ice |
---|
| 126 | READ ( numnam_ice_ref, namicerun, IOSTAT = ios, ERR = 901) |
---|
| 127 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in reference namelist', lwp ) |
---|
| 128 | |
---|
| 129 | REWIND( numnam_ice_cfg ) ! Namelist namicerun in configuration namelist : Parameters for ice |
---|
| 130 | READ ( numnam_ice_cfg, namicerun, IOSTAT = ios, ERR = 902 ) |
---|
| 131 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in configuration namelist', lwp ) |
---|
[4624] | 132 | IF(lwm) WRITE ( numoni, namicerun ) |
---|
[2528] | 133 | ! |
---|
| 134 | IF(lwp) THEN ! control print |
---|
[3] | 135 | WRITE(numout,*) |
---|
| 136 | WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' |
---|
| 137 | WRITE(numout,*) ' ~~~~~~' |
---|
[76] | 138 | WRITE(numout,*) ' switch for ice dynamics (1) or not (0) ln_limdyn = ', ln_limdyn |
---|
[675] | 139 | WRITE(numout,*) ' Ice damping ln_limdmp = ', ln_limdmp |
---|
[76] | 140 | WRITE(numout,*) ' minimum fraction for leads in the NH (SH) acrit(1/2) = ', acrit(:) |
---|
[3] | 141 | WRITE(numout,*) ' computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif |
---|
| 142 | WRITE(numout,*) ' computation of temp. in ice (=0) or not (=9999) hicdif = ', hicdif |
---|
| 143 | ENDIF |
---|
[508] | 144 | ! |
---|
[821] | 145 | END SUBROUTINE ice_run_2 |
---|
[3] | 146 | |
---|
| 147 | #else |
---|
| 148 | !!---------------------------------------------------------------------- |
---|
[821] | 149 | !! Default option : Empty module NO LIM 2.0 sea-ice model |
---|
[3] | 150 | !!---------------------------------------------------------------------- |
---|
| 151 | CONTAINS |
---|
[821] | 152 | SUBROUTINE ice_init_2 ! Empty routine |
---|
| 153 | END SUBROUTINE ice_init_2 |
---|
[3] | 154 | #endif |
---|
| 155 | |
---|
| 156 | !!====================================================================== |
---|
[821] | 157 | END MODULE iceini_2 |
---|