/[lmdze]/trunk/phylmd/Interface_surf/interfoce_lim.f
ViewVC logotype

Annotation of /trunk/phylmd/Interface_surf/interfoce_lim.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 202 - (hide annotations)
Wed Jun 8 12:23:41 2016 UTC (8 years ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf/interfoce_lim.f
File size: 1118 byte(s)
Promoted lmt_pas from local variable of physiq to variable of module
conf_gcm_m.

Removed variable run_off of module interface_surf. Was not
used. Called run_off_ter in LMDZ, but not used nor printed there
either.

Simplified logic in interfoce_lim. The way it was convoluted with
interfsurf_hq and clmain was quite a mess. Extracted reading of SST
into a separate procedure: read_sst. We do not need SST and pctsrf_new
at the same time: SST is not needed for sea-ice surface. I did not
like this programming: going through the procedure repeatedly for
different purposes and testing inside whether there was something to
do or it was already done. Reading is now only controlled by itap and
lmt_pas, instead of debut, jour, jour_lu and deja_lu. Now we do not
copy from pct_tmp to pctsrf_new every time step.

Simplified processing of pctsrf in clmain and below. It was quite
troubling: pctsrf_new was intent out in interfoce_lim but only defined
for ocean and sea-ice. Also the idea of having arrays for all
surfaces, pcsrf and pctsrf_new, in interfsurf_hq, which is called for
a particular surface, was troubling. pctsrf_new for all surfaces was
intent out in intefsurf_hq, but not defined for all surfaces at each
call. Removed argument pctsrf_new of clmain: was a duplicate of pctsrf
on output, and not used in physiq. Replaced pctsrf_new in clmain by
pctsrf_new_oce and pctsrf_new_sic, which were the only ones modified.

1 guez 54 module interfoce_lim_m
2    
3     implicit none
4    
5     contains
6    
7 guez 202 SUBROUTINE interfoce_lim(jour, pctsrf_new_oce, pctsrf_new_sic)
8 guez 54
9 guez 175 ! lecture conditions limites
10 guez 104 ! Cette routine sert d'interface entre le modèle atmosphérique et
11     ! un fichier de conditions aux limites.
12 guez 54
13 guez 104 ! Laurent FAIRHEAD, February 2000
14 guez 54
15 guez 178 USE netcdf, ONLY: nf90_nowrite
16 guez 104 use netcdf95, only: NF95_CLOSE, nf95_get_var, NF95_INQ_VARID, nf95_open
17 guez 54
18 guez 104 integer, intent(IN):: jour ! jour a lire dans l'annee
19 guez 54
20 guez 202 real, intent(out):: pctsrf_new_oce(:), pctsrf_new_sic(:) ! (klon)
21 guez 104 ! sous-maille fractionnelle
22    
23     ! Local:
24 guez 106 integer ncid, varid ! pour NetCDF
25 guez 104
26 guez 54 ! --------------------------------------------------
27    
28 guez 202 call NF95_OPEN ('limit.nc', NF90_NOWRITE, ncid)
29 guez 106
30 guez 202 ! Fraction "ocean"
31     call NF95_INQ_VARID(ncid, 'FOCE', varid)
32     call NF95_GET_VAR(ncid, varid, pctsrf_new_oce, start = (/1, jour/))
33 guez 54
34 guez 202 ! Fraction "glace de mer"
35     call NF95_INQ_VARID(ncid, 'FSIC', varid)
36     call NF95_GET_VAR(ncid, varid, pctsrf_new_sic, start = (/1, jour/))
37 guez 54
38 guez 202 call NF95_CLOSE(ncid)
39 guez 54
40     END SUBROUTINE interfoce_lim
41    
42     end module interfoce_lim_m

  ViewVC Help
Powered by ViewVC 1.1.21