Skip to content
Snippets Groups Projects
Commit 3c52500e authored by Dethinne Thomas's avatar Dethinne Thomas
Browse files

start working on the MARglf

parent 0e8e1d50
No related branches found
No related tags found
No related merge requests found
......@@ -835,6 +835,7 @@ c=====================================================================72
call wri_1st(y,nyear,ngt)
call fill_table(ngt)
call write_res
call make_marglf
2455 continue
enddo ! end of loop on ngt
......
subroutine make_marglf
! function to interpolate
use mardim
implicit none
real sector(3), glf(mx,my,3), lai(mx,my,3)
integer i,j
logical file_exists
DO j=1,my
DO i=1,mx
lai(i,j,1) = tlamth_2d(i,j)
lai(i,j,2) = tlamth_2d(i,j)
lai(i,j,3) = tlamth_2d(i,j)
glf(i,j,1) = 1
glf(i,j,2) = 1
glf(i,j,3) = 1
enddo
enddo
INQUIRE(FILE="MARglf.nc", EXIST=file_exists)
if (file_exists) call system('rm -rf MARglf.nc')
call CF_INI_FILE("MARglf.nc","title")
call CF_CREATE_DIM("time","-",1,1.)
do i=1,3
sector(i)=i
enddo
call CF_CREATE_DIM("x","-",mx,1)
call CF_CREATE_DIM("y","-",my,1)
call CF_CREATE_DIM("SECTOR","-",sector,1)
call CF_CREATE_VAR("GLF","GLF CARAIB" ,"%","-","x","y","-" )
call CF_CREATE_VAR("LAI","LAI CARAIB" ,"m/m","-","x","y","-" )
call CF_CREATE_FILE("MARglf.nc")
call CF_write ("MARglf.nc", 'GLF',1,
. mx, my, sector, glf)
call CF_write ("MARglf.nc", 'LAI',1,
. mx, my, sector, lai)
end subroutine make_marglf
......@@ -123,8 +123,8 @@ subroutine INIglf(ihamr_glf, nhamr_glf, newglfINI)
open(unit=11, status='old', form='unformatted', file='MARglf.DAT')
rewind 11
else
call CF_READ2D('MARglf.nc','LAI',jdarGE,mx,my,nvx,lai_caraib)
call CF_READ2D('MARglf.nc','GLF',jdarGE,mx,my,nvx,glf_caraib)
call CF_READ2D('MARglf.nc','LAI',1,mx,my,nvx,lai_caraib)
call CF_READ2D('MARglf.nc','GLF',1,mx,my,nvx,glf_caraib)
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment