Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated new surface data including soil order for Phosphorus Cycle. #268

Merged
merged 1 commit into from
Jul 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/lnd/clm/bld/namelist_files/checkmapfiles.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ begin
;
; go the other direction now check the _a variables
;
mksrf_files = (/"mksrf_fvegtyp", "mksrf_fglacier", "mksrf_furbtopo", "mksrf_flndtopo", "mksrf_flai", "mksrf_fsoitex", "mksrf_fsoicol", "mksrf_ffrac", "mksrf_fmax", "mksrf_ftopo", "mksrf_firrig", "mksrf_forganic", "mksrf_flakwat", "mksrf_fwetlnd", "mksrf_furban", "mksrf_fvocef"/)
mksrf_files = (/"mksrf_fvegtyp", "mksrf_fglacier", "mksrf_furbtopo", "mksrf_flndtopo", "mksrf_flai", "mksrf_fsoitex", "mksrf_fsoicol","mksrf_fsoiord", "mksrf_ffrac", "mksrf_fmax", "mksrf_ftopo", "mksrf_firrig", "mksrf_forganic", "mksrf_flakwat", "mksrf_fwetlnd", "mksrf_furban", "mksrf_fvocef"/)
do i = 0, dimsizes(mapgrids)-1
grid = str_get_field( mapgrids(i), 1, "_" );
lmask = str_get_field( mapgrids(i), 2, "_" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ lnd/clm2/surfdata_map/surfdata_1x1_urbanc_alpha_simyr2000_c130927.nc</fsurdat>

<!-- for pre-industrial simulations - year 1850 -->
<fsurdat hgrid="360x720cru" sim_year="1850" use_crop=".false." >
lnd/clm2/surfdata_map/surfdata_360x720cru_simyr1850_c130927.nc</fsurdat>
lnd/clm2/surfdata_map/surfdata_360x720cru_simyr1850_c150626.nc</fsurdat>
<fsurdat hgrid="48x96" sim_year="1850" use_crop=".false." >
lnd/clm2/surfdata_map/surfdata_48x96_simyr1850_c130927.nc</fsurdat>

<fsurdat hgrid="0.9x1.25" sim_year="1850" use_crop=".false." >
lnd/clm2/surfdata_map/surfdata_0.9x1.25_simyr1850_c130927.nc</fsurdat>
lnd/clm2/surfdata_map/surfdata_0.9x1.25_simyr1850_c150626.nc</fsurdat>
<fsurdat hgrid="1.9x2.5" sim_year="1850" use_crop=".false." >
lnd/clm2/surfdata_map/surfdata_1.9x2.5_simyr1850_c130927.nc</fsurdat>
lnd/clm2/surfdata_map/surfdata_1.9x2.5_simyr1850_c150626.nc</fsurdat>
<fsurdat hgrid="10x15" sim_year="1850" use_crop=".false." >
lnd/clm2/surfdata_map/surfdata_10x15_simyr1850_c130927.nc</fsurdat>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<lmask type="veg" hirespft="on">MODIS</lmask>
<lmask type="urb" >LandScan2004</lmask>
<lmask type="col" >MODIS</lmask>
<lmask type="ord" >MODIS</lmask>
<lmask type="org" >ISRIC-WISE</lmask>
<lmask type="glc" >GLOBE-Gardner</lmask>
<lmask type="glc" mergeGIS="on">GLOBE-Gardner-mergeGIS</lmask>
Expand All @@ -149,6 +150,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<hgrid type="veg" hirespft="on">3x3min</hgrid>
<hgrid type="urb" >3x3min</hgrid>
<hgrid type="col" >0.5x0.5</hgrid>
<hgrid type="ord" >0.5x0.5</hgrid>
<hgrid type="org" >5x5min</hgrid>
<hgrid type="glc" >3x3min</hgrid>
<hgrid type="fmx" >3x3min</hgrid>
Expand All @@ -171,6 +173,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<mksrf_filename type="veg" >mksrf_fvegtyp</mksrf_filename>
<mksrf_filename type="urb" >mksrf_furban</mksrf_filename>
<mksrf_filename type="col" >mksrf_fsoicol</mksrf_filename>
<mksrf_filename type="ord" >mksrf_fsoiord</mksrf_filename>
<mksrf_filename type="org" >mksrf_forganic</mksrf_filename>
<mksrf_filename type="glc" >mksrf_fglacier</mksrf_filename>
<mksrf_filename type="fmx" >mksrf_fmax</mksrf_filename>
Expand Down Expand Up @@ -206,6 +209,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<mksrf_fsoicol hgrid="0.5x0.5" lmask="MODIS"
>lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_soilcol_global_c090324.nc</mksrf_fsoicol>

<mksrf_fsoiord hgrid="0.5x0.5" lmask="MODIS"
>lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_soilord_global_c150313.nc</mksrf_fsoiord>

<mksrf_forganic hgrid="5x5min" lmask="ISRIC-WISE"
>lnd/clm2/rawdata/mksrf_organic_10level_5x5min_ISRIC-WISE-NCSCD_nlev7_c120830.nc</mksrf_forganic>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ in its attributes. (Only used if scripgriddata_src_type = UGRID.)
<!-- -->
<entry id="mksrf_filename" type="char*256" category="mksurfdata"
group="default_settings"
valid_values="mksrf_fsoitex,mksrf_forganic,mksrf_flakwat,mksrf_fwetlnd,mksrf_fmax,mksrf_fmax,mksrf_fglacier,mksrf_fvocef,mksrf_furbtopo,mksrf_flndtopo,firrig,mksrf_furban,mksrf_fvegtyp,mksrf_fsoicol,mksrf_flai,mksrf_fgdp,mksrf_fpeat,mksrf_fabm,mksrf_ftopostats,mksrf_fvic,mksrf_fch4" >
valid_values="mksrf_fsoitex,mksrf_forganic,mksrf_flakwat,mksrf_fwetlnd,mksrf_fmax,mksrf_fmax,mksrf_fglacier,mksrf_fvocef,mksrf_furbtopo,mksrf_flndtopo,firrig,mksrf_furban,mksrf_fvegtyp,mksrf_fsoicol,mksrf_fsoiord,mksrf_flai,mksrf_fgdp,mksrf_fpeat,mksrf_fabm,mksrf_ftopostats,mksrf_fvic,mksrf_fch4" >
Filename for mksurfdata_map to remap raw data into the output surface dataset
</entry>

Expand Down Expand Up @@ -540,6 +540,11 @@ Soil texture dataset for mksurfdata
Soil color dataset for mksurfdata
</entry>

<entry id="mksrf_fsoiord" type="char*256" category="mksurfdata"
input_pathname="abs" group="clmexp" valid_values="" >
Soil order dataset for mksurfdata
</entry>

<entry id="mksrf_fmax" type="char*256" category="mksurfdata"
input_pathname="abs" group="clmexp" valid_values="" >
Soil max fraction dataset for mksurfdata
Expand Down
6 changes: 4 additions & 2 deletions models/lnd/clm/tools/clm4_5/mksurfdata_map/mksurfdata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

my $definition = Build::NamelistDefinition->new( $nldef_file );

my $CSMDATA = "/glade/p/cesm/cseg/inputdata";
my $CSMDATA = "/lustre/atlas1/cli900/world-shared/cesm/inputdata";

my %opts = (
hgrid=>"all",
Expand Down Expand Up @@ -418,7 +418,7 @@ ($)
}
my $mopts = "$queryopts -namelist default_settings $usrnam";
my $mkopts = "-csmdata $CSMDATA -silent -justvalue -namelist clmexp $usrnam";
foreach my $typ ( "lak", "veg", "voc", "top", "tex", "col",
foreach my $typ ( "lak", "veg", "voc", "top", "tex", "col","ord",
"fmx", "lai", "urb", "org", "glc", "utp", "wet",
"gdp", "peat","abm", "topostats" , "vic", "ch4") {
my $lmask = `$scrdir/../../../bld/queryDefaultNamelist.pl $mopts -options type=$typ,mergeGIS=$merge_gis,hirespft=$hirespft -var lmask`;
Expand Down Expand Up @@ -514,6 +514,7 @@ ($)
map_fpft = '$map{'veg'}'
map_fglacier = '$map{'glc'}'
map_fsoicol = '$map{'col'}'
map_fsoiord = '$map{'ord'}'
map_furban = '$map{'urb'}'
map_fmax = '$map{'fmx'}'
map_forganic = '$map{'org'}'
Expand Down Expand Up @@ -633,6 +634,7 @@ ($)
print $fh <<"EOF";
mksrf_fvegtyp = '$vegtyp'
mksrf_fsoicol = '$datfil{'col'}'
mksrf_fsoiord = '$datfil{'ord'}'
mksrf_flai = '$datfil{'lai'}'
EOF
my $ofile = "surfdata_${res}_${desc_yr0}_${sdate}";
Expand Down
17 changes: 17 additions & 0 deletions models/lnd/clm/tools/clm4_5/mksurfdata_map/src/Makefile.titan
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Makefile for mksurfdata_map

# set up for titan
#setenv LIB_NETCDF /opt/cray/netcdf/4.3.2/PGI/141/lib
#setenv INC_NETCDF /opt/cray/netcdf/4.3.2/PGI/141/include
#setenv LDFLAGS := $(shell /opt/cray/netcdf/4.3.2/bin/nf-config --flibs)
#setenv USER_FC := pgf90
# end for titan

EXENAME = ../mksurfdata_map

# Set optimization on by default
ifeq ($(OPT),$(null))
OPT := TRUE
endif

include Makefile.common
4 changes: 4 additions & 0 deletions models/lnd/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ subroutine mkfile(domain, fname, dynlanduse)
str = get_filename(map_fsoicol)
call check_ret(nf_put_att_text(ncid, NF_GLOBAL, &
'map_soil_color_file', len_trim(str), trim(str)), subname)

str = get_filename(map_fsoiord)
call check_ret(nf_put_att_text(ncid, NF_GLOBAL, &
'map_soil_order_file', len_trim(str), trim(str)), subname)

str = get_filename(map_forganic)
call check_ret(nf_put_att_text(ncid, NF_GLOBAL, &
Expand Down
Loading